@shumai-one/shumai 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/chunk-01052ssf.js +32 -0
- package/bin/{chunk-w4ydfy9d.js → chunk-02fvcrej.js} +4 -4
- package/bin/chunk-0bj887zm.js +2 -0
- package/bin/chunk-167z646e.js +2 -0
- package/bin/chunk-1ktk6764.js +10 -0
- package/bin/{chunk-p1ed0pa6.js → chunk-1nvd90g2.js} +1 -1
- package/bin/{chunk-kywdke0y.js → chunk-1wfg56z3.js} +5 -5
- package/bin/{chunk-ahgq10a7.js → chunk-257dcd2f.js} +2 -2
- package/bin/chunk-26qn7fek.js +2 -0
- package/bin/chunk-2cdxm1cp.js +55 -0
- package/bin/chunk-2jj4j8cn.js +3 -0
- package/bin/chunk-2ne2b54t.js +2 -0
- package/bin/{chunk-qqj2m1b1.js → chunk-2nhgdqdg.js} +2 -2
- package/bin/chunk-2vbeqczj.js +1 -0
- package/bin/chunk-37p6bcx2.js +1 -0
- package/bin/chunk-3ckkwdjx.js +13 -0
- package/bin/chunk-3knfx6dm.js +1 -0
- package/bin/chunk-3z85zxkn.js +1 -0
- package/bin/chunk-4mws03es.js +5 -0
- package/bin/chunk-54tbfvya.js +2 -0
- package/bin/chunk-55h9ze53.js +2 -0
- package/bin/chunk-56kh5fxc.js +1 -0
- package/bin/chunk-576nj64j.js +2 -0
- package/bin/{chunk-dfecgpce.js → chunk-5wapd171.js} +13 -13
- package/bin/chunk-6cnqjngz.js +1 -0
- package/bin/chunk-73yncv54.js +2 -0
- package/bin/chunk-7g46e1wy.js +3 -0
- package/bin/{chunk-jq3pq545.js → chunk-7naa7tpn.js} +2 -2
- package/bin/{chunk-am6dg0a5.js → chunk-7sgrtxbt.js} +2 -2
- package/bin/{chunk-3me1v3z5.js → chunk-7v7mypc6.js} +2 -2
- package/bin/chunk-82tps5n1.js +2 -0
- package/bin/chunk-84x8p7v5.js +1 -0
- package/bin/{chunk-fxtzy5f5.js → chunk-88jg9dq5.js} +2 -2
- package/bin/chunk-8cjet7pp.js +12 -0
- package/bin/chunk-8fyg9dy4.js +2 -0
- package/bin/chunk-8gtfgkrn.js +2 -0
- package/bin/chunk-8mqbztj8.js +2 -0
- package/bin/chunk-8xb6yz11.js +2 -0
- package/bin/chunk-8yjsmr7g.js +2 -0
- package/bin/chunk-91rb0jpb.js +2 -0
- package/bin/chunk-96qpjght.js +2 -0
- package/bin/chunk-9f1xk1nt.js +1 -0
- package/bin/chunk-9mk9cvbk.js +1 -0
- package/bin/{chunk-r5g84kj4.js → chunk-9n1w5dw1.js} +3 -3
- package/bin/chunk-9nw5w8vh.js +1 -0
- package/bin/{chunk-3j82q2gj.js → chunk-9t3p4xp6.js} +1 -1
- package/bin/chunk-9xhjy897.js +11 -0
- package/bin/chunk-9zsv6d2f.js +1 -0
- package/bin/chunk-a411xhmm.js +7 -0
- package/bin/{chunk-s01p4w8d.js → chunk-a74g6h8a.js} +2 -2
- package/bin/chunk-ah8fjb6f.js +2 -0
- package/bin/chunk-atfz7g7e.js +2 -0
- package/bin/{chunk-swz6v48q.js → chunk-b5rhvzv9.js} +2 -2
- package/bin/{chunk-bg6waaf9.js → chunk-b7bnp021.js} +2 -2
- package/bin/chunk-cf5axr8c.js +1 -0
- package/bin/chunk-cgmebxx6.js +2 -0
- package/bin/chunk-cwat1jwx.js +3 -0
- package/bin/chunk-cz13a82m.js +3 -0
- package/bin/chunk-dk42gf7v.js +2 -0
- package/bin/chunk-e4f56spj.js +4 -0
- package/bin/chunk-e4yscwen.js +18 -0
- package/bin/chunk-eb7mzbfm.js +1 -0
- package/bin/chunk-er14d498.js +3 -0
- package/bin/{chunk-bs6saf4d.js → chunk-eyjfhdp9.js} +2 -2
- package/bin/chunk-f25fe9th.js +393 -0
- package/bin/chunk-f6avg5qe.js +129 -0
- package/bin/chunk-fatmqnp1.js +2 -0
- package/bin/chunk-fvx9k1dc.js +2 -0
- package/bin/{chunk-h6f2gyt5.js → chunk-g22wmpk1.js} +2 -2
- package/bin/chunk-g6sdezec.js +2 -0
- package/bin/chunk-gtf19jc1.js +2 -0
- package/bin/chunk-gxepkvt2.js +2 -0
- package/bin/chunk-h1n7jqnw.js +1 -0
- package/bin/chunk-hfm82066.js +2 -0
- package/bin/chunk-hnkcgvcj.js +3 -0
- package/bin/{chunk-agcnbjxk.js → chunk-hpbn0k9n.js} +2 -2
- package/bin/{chunk-d4hk62q2.js → chunk-hpwv4am3.js} +4 -4
- package/bin/{chunk-acmr8v0d.js → chunk-hw6czrya.js} +1 -1
- package/bin/{chunk-r9gp9yqw.js → chunk-hzkjgcre.js} +1 -1
- package/bin/chunk-j2s311yc.js +3 -0
- package/bin/{chunk-6hzktewz.js → chunk-jt02kpfc.js} +2 -2
- package/bin/{chunk-c60j1b4w.js → chunk-jt0ykktx.js} +1 -1
- package/bin/{chunk-sd6w0z6a.js → chunk-jzgbxqdg.js} +2 -2
- package/bin/chunk-kj6h5j5a.js +4 -0
- package/bin/chunk-km4gn6b6.js +1 -0
- package/bin/chunk-knj2s8mg.js +16 -0
- package/bin/{chunk-1eqw2dpx.js → chunk-kvhf12b4.js} +2 -2
- package/bin/chunk-m0q2cgfg.js +2 -0
- package/bin/chunk-m82tkhaa.js +11 -0
- package/bin/chunk-m9adtgzk.js +2 -0
- package/bin/{chunk-0tvnfy4k.js → chunk-mcj1xpcc.js} +2 -2
- package/bin/chunk-mcw198kg.js +13 -0
- package/bin/{chunk-9s0k533c.js → chunk-mwktrwtx.js} +1 -1
- package/bin/{chunk-wsprap60.js → chunk-mzsw9var.js} +2 -2
- package/bin/chunk-ns33grgx.js +2 -0
- package/bin/{chunk-xsfy8hz3.js → chunk-ny1kbmxt.js} +2 -2
- package/bin/{chunk-16n160h1.js → chunk-p3f5aevs.js} +1 -1
- package/bin/chunk-p3j6ydk1.js +1 -0
- package/bin/chunk-p4s95471.js +2 -0
- package/bin/chunk-pk406dgy.js +2 -0
- package/bin/chunk-q2bew2vc.js +2 -0
- package/bin/chunk-q5vkxee3.js +5 -0
- package/bin/{chunk-hzv1mhr5.js → chunk-q83h0hkx.js} +2 -2
- package/bin/{chunk-fre31bhw.js → chunk-q8w4mbw4.js} +2 -2
- package/bin/{chunk-b7qs7hxg.js → chunk-qwpkcp8d.js} +2 -2
- package/bin/chunk-r1xer8gn.js +5 -0
- package/bin/chunk-s1e4qy3q.js +14 -0
- package/bin/{chunk-b9d8xdhb.js → chunk-s9ksftq2.js} +1 -1
- package/bin/chunk-srxp5jav.js +42 -0
- package/bin/chunk-swtwaaqe.js +1 -0
- package/bin/chunk-tagdrg7p.js +1 -0
- package/bin/{chunk-d18v5vmp.js → chunk-tekwpkjf.js} +2 -2
- package/bin/chunk-twtxnzbv.js +2 -0
- package/bin/{chunk-c6f8x05m.js → chunk-v05rrxp5.js} +2 -2
- package/bin/{chunk-ht5rht98.js → chunk-v5cn90cf.js} +2 -2
- package/bin/chunk-v5mcjwxy.js +2 -0
- package/bin/{chunk-jb8vbeb0.js → chunk-vcrmjtcz.js} +2 -2
- package/bin/chunk-vkzasgxw.js +2 -0
- package/bin/chunk-vp3czaeh.js +7 -0
- package/bin/chunk-x03jwaga.js +8 -0
- package/bin/chunk-x342vzdx.js +2 -0
- package/bin/chunk-x8mjh387.js +5 -0
- package/bin/chunk-xc54vhfz.js +2 -0
- package/bin/chunk-xvkwbczx.js +3 -0
- package/bin/chunk-y241cxff.js +1 -0
- package/bin/chunk-yk12hydf.js +7 -0
- package/bin/chunk-ympbfzz4.js +2 -0
- package/bin/{chunk-n412a1hp.js → chunk-yq32evnn.js} +6 -6
- package/bin/chunk-z1p13dnc.js +2 -0
- package/bin/chunk-zarz3sqn.js +211 -0
- package/bin/chunk-zezje74z.js +4 -0
- package/bin/chunk-zrszykjf.js +3 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +942 -1015
- package/package.json +7 -7
- package/prisma/migrations/20261026024507_hash_api_tokens/migration.sql +28 -0
- package/prisma/migrations/20261026031904_add_audit_log_via/migration.sql +2 -0
- package/prisma/migrations/20261029024626_add_oauth_and_jwks/migration.sql +205 -0
- package/prisma/migrations/20261029030321_default_empty_arrays_oauth/migration.sql +25 -0
- package/prisma/schema.prisma +186 -1
- package/bin/chunk-0502p2k7.js +0 -3
- package/bin/chunk-0b0t6y8h.js +0 -11
- package/bin/chunk-1vt9ss7d.js +0 -2
- package/bin/chunk-23780yj6.js +0 -3
- package/bin/chunk-2cpsfc87.js +0 -1
- package/bin/chunk-2w0d9veg.js +0 -2
- package/bin/chunk-2xp9prpq.js +0 -1
- package/bin/chunk-3gqs15zq.js +0 -2
- package/bin/chunk-3pw7z25v.js +0 -3
- package/bin/chunk-3tx9v8kj.js +0 -2
- package/bin/chunk-3wdtp4ht.js +0 -1
- package/bin/chunk-57axjy7y.js +0 -1
- package/bin/chunk-5aqthcm6.js +0 -5
- package/bin/chunk-5gq4q1bb.js +0 -2
- package/bin/chunk-5r1br11d.js +0 -2
- package/bin/chunk-61hrdg0g.js +0 -1
- package/bin/chunk-6aa4xmnw.js +0 -2
- package/bin/chunk-6mrgtn78.js +0 -18
- package/bin/chunk-6s55r0z9.js +0 -1
- package/bin/chunk-6vkfzzvt.js +0 -5
- package/bin/chunk-7dprpnm6.js +0 -2
- package/bin/chunk-7rycq6wb.js +0 -129
- package/bin/chunk-895gzdtp.js +0 -7
- package/bin/chunk-8d1p8qpv.js +0 -1
- package/bin/chunk-8r3k84dh.js +0 -2
- package/bin/chunk-99sarrvt.js +0 -3
- package/bin/chunk-b21z62fj.js +0 -1
- package/bin/chunk-bv589v2m.js +0 -3
- package/bin/chunk-c8kjpmfe.js +0 -2
- package/bin/chunk-c9xyejnk.js +0 -2
- package/bin/chunk-cb9peqy5.js +0 -2
- package/bin/chunk-ckczqmrz.js +0 -5
- package/bin/chunk-cr33cs6j.js +0 -2
- package/bin/chunk-cxet91kt.js +0 -2
- package/bin/chunk-d7e351jd.js +0 -6
- package/bin/chunk-ebcfbn00.js +0 -2
- package/bin/chunk-f0b4a9y3.js +0 -2
- package/bin/chunk-fkn6f4qt.js +0 -4
- package/bin/chunk-g78vapcm.js +0 -2
- package/bin/chunk-gdpfwxea.js +0 -4
- package/bin/chunk-gwqqq0b1.js +0 -32
- package/bin/chunk-h3cwf9aw.js +0 -2
- package/bin/chunk-h4ty530v.js +0 -16
- package/bin/chunk-h58yfx7w.js +0 -2
- package/bin/chunk-h9ngpxyd.js +0 -1
- package/bin/chunk-hbr17jvr.js +0 -13
- package/bin/chunk-hc0xbmtt.js +0 -5
- package/bin/chunk-j9t7tvt5.js +0 -2
- package/bin/chunk-jvt8q0eg.js +0 -2
- package/bin/chunk-jzgtthsj.js +0 -3
- package/bin/chunk-jzjhg7ng.js +0 -1
- package/bin/chunk-k547syp2.js +0 -2
- package/bin/chunk-k7sjpke6.js +0 -2
- package/bin/chunk-k8ct1qgv.js +0 -3
- package/bin/chunk-k9q4nn8b.js +0 -11
- package/bin/chunk-keetdtxb.js +0 -2
- package/bin/chunk-kjjw8mbg.js +0 -1
- package/bin/chunk-mey80kv9.js +0 -54
- package/bin/chunk-nfncawpm.js +0 -12
- package/bin/chunk-nvwt8atc.js +0 -1
- package/bin/chunk-p1d500sf.js +0 -211
- package/bin/chunk-q0vs124k.js +0 -2
- package/bin/chunk-q5795f3s.js +0 -2
- package/bin/chunk-q5j3b0h5.js +0 -3
- package/bin/chunk-qd7pvaxb.js +0 -2
- package/bin/chunk-qhpt7170.js +0 -2
- package/bin/chunk-qt78vs3g.js +0 -2
- package/bin/chunk-ra6mdjr0.js +0 -1
- package/bin/chunk-ryfvaz6v.js +0 -3
- package/bin/chunk-s22eapcc.js +0 -2
- package/bin/chunk-sbg86tch.js +0 -2
- package/bin/chunk-sbqy6m8t.js +0 -1
- package/bin/chunk-sdp9w627.js +0 -14
- package/bin/chunk-sn0nypvd.js +0 -42
- package/bin/chunk-sv92vkyh.js +0 -2
- package/bin/chunk-t6cn018t.js +0 -3
- package/bin/chunk-ts4d1mxf.js +0 -2
- package/bin/chunk-wkdkc12e.js +0 -4
- package/bin/chunk-xgnvktq6.js +0 -10
- package/bin/chunk-xjw3mpvx.js +0 -1
- package/bin/chunk-xznq2axj.js +0 -1
- package/bin/chunk-y4v08wq7.js +0 -1
- package/bin/chunk-yncvy335.js +0 -3
- package/bin/chunk-ytzddcj2.js +0 -1
- package/bin/chunk-zxqasmvz.js +0 -2
package/bin/chunk-k9q4nn8b.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ca,wo,sr,Ge,nn,er,Ht}from"./chunk-6mrgtn78.js";import{w,V}from"./chunk-t6cn018t.js";var Wo=w(function(hr){var{Readable:Gt}=V("stream"),{NoOpLogger:Wt,normalizeProvider:ge}=sr(),{HttpResponse:me,HttpRequest:F}=Ht(),{parseRfc7231DateTime:$t,v4:Ae}=er(),{hasOwn:Vt}=wo(),be=(e)=>e?.body instanceof Gt||typeof ReadableStream<"u"&&e?.body instanceof ReadableStream,zt=["AccessDeniedException","AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Yt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],jt=["TimeoutError","RequestTimeout","RequestTimeoutException"],Kt=[500,502,503,504],Xt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Qt=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND","EAI_AGAIN"],W=(e)=>e?.$retryable!==void 0,ye=(e)=>zt.includes(e.name),Se=(e)=>e.$metadata?.clockSkewCorrected,_e=(e)=>{let i=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(e&&e instanceof TypeError))return!1;return i.has(e.message)},T=(e)=>e.$metadata?.httpStatusCode===429||Yt.includes(e.name)||e.$retryable?.throttling==!0,R=(e,i=0)=>W(e)||Se(e)||e.name==="InvalidSignatureException"&&e.message?.includes("Signature expired")||jt.includes(e.name)||Xt.includes(e?.code||"")||Qt.includes(e?.code||"")||Kt.includes(e.$metadata?.httpStatusCode||0)||_e(e)||we(e)||e.cause!==void 0&&i<=10&&R(e.cause,i+1),Me=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let i=e.$metadata.httpStatusCode;if(500<=i&&i<=599&&!R(e))return!0;return!1}return!1};function we(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}var ve=100,N=20000,Ee=500,I=500,Te=5,Re=10,z=1,D="amz-sdk-invocation-id",C="amz-sdk-request";function Pe(e,i){if(!me.isInstance(e))return;for(let a in e.headers){if(!Vt(e.headers,a))continue;let c=a.toLowerCase();if(c==="retry-after"){let s=e.headers[a],o=NaN;if(s.endsWith("GMT"))try{o=($t(s).getTime()-Date.now())/1000}catch(u){i?.trace?.("Failed to parse retry-after header"),i?.trace?.(u)}else if(s.match(/ GMT, ((\d+)|(\d+\.\d+))$/))o=Number(s.match(/ GMT, ([\d.]+)$/)?.[1]);else if(s.match(/^((\d+)|(\d+\.\d+))$/))o=Number(s);else if(Date.parse(s)>=Date.now())o=(Date.parse(s)-Date.now())/1000;if(isNaN(o))return;return new Date(Date.now()+o*1000)}else if(c==="x-amz-retry-after"){let s=e.headers[a],o=Number(s);if(isNaN(o)){i?.trace?.(`Failed to parse x-amz-retry-after=${s}`);return}return new Date(Date.now()+o)}}}function Jt(e,i){return Pe(e,i)}var xe=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(Error(),e);if(typeof e==="string")return Error(e);return Error(`AWS SDK error wrapper for ${e}`)};function Oe(e){return(i)=>(a,c)=>async(s)=>{let o=await i.retryStrategy(),u=await i.maxAttempts();if(tr(o)){o=o;let t=await o.acquireInitialRetryToken((c.partition_id??"")+(c.__retryLongPoll?":longpoll":"")),r=Error(),n=0,p=0,{request:d}=s,l=F.isInstance(d);if(l)d.headers[D]=Ae();while(!0)try{if(l)d.headers[C]=`attempt=${n+1}; max=${u}`;let{response:f,output:h}=await a(s);return o.recordSuccess(t),h.$metadata.attempts=n+1,h.$metadata.totalRetryDelay=p,{response:f,output:h}}catch(f){let h=rr(f,i.logger);if(r=xe(f),l&&e(d))throw(c.logger instanceof Wt?console:c.logger)?.warn("An error was encountered in a non-retryable streaming request."),r;try{t=await o.refreshRetryTokenForRetry(t,h)}catch(A){if(!r.$metadata)r.$metadata={};throw r.$metadata.attempts=n+1,r.$metadata.totalRetryDelay=p,r}n=t.getRetryCount();let g=t.getRetryDelay();if(p+=(t?.$retryLog?.acquisitionDelay??0)+g,g>0)await Zt(g)}}else{if(o=o,o?.mode)c.userAgent=[...c.userAgent||[],["cfg/retry-mode",o.mode]];return o.retry(a,s)}}}var Zt=(e)=>new Promise((i)=>setTimeout(i,e)),tr=(e)=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",rr=(e,i)=>{let a={error:e,errorType:nr(e)},c=Pe(e.$response,i);if(c)a.retryAfterHint=c;return a},nr=(e)=>{if(T(e))return"THROTTLING";if(R(e))return"TRANSIENT";if(Me(e))return"SERVER_ERROR";return"CLIENT_ERROR"},ke={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function ir(e){let i=Oe(e);return(a)=>({applyToStack:(c)=>{c.add(i(a),ke)}})}class P{static setTimeoutFn=(e,i)=>setTimeout(e,i);beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(e){let i;this.updateMeasuredRate();let a=e;if(a?.errorType==="THROTTLING"||T(a?.error??e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),i=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),i=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(i,2*this.measuredTxRate);this.updateTokenBucketRate(s)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(e){if(!this.enabled)return;this.refillTokenBucket();while(e>this.availableTokens){let i=(e-this.availableTokens)/this.fillRate*1000;await new Promise((a)=>P.setTimeoutFn(a,i)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let i=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+i),this.lastTimestamp=e}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),i=Math.floor(e*2)/2;if(this.requestCount++,i>this.lastTxRateBucket){let a=this.requestCount/(i-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(a*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=i}}getPrecise(e){return parseFloat(e.toFixed(8))}}class m{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return m.v2026?50:100}static throttlingDelay(){return m.v2026?1000:500}static cost(){return m.v2026?14:5}static throttlingCost(){return m.v2026?5:10}static modifiedCostType(){return m.v2026?"THROTTLING":"TRANSIENT"}}class Fe{x=m.delay();computeNextBackoffDelay(e){let i=Math.random(),a=2,c=i*Math.min(this.x*2**e,N);return Math.floor(c)}setDelayBase(e){this.x=e}}class H{delay;count;cost;longPoll;$retryLog={acquisitionDelay:0};constructor(e,i,a,c){this.delay=e,this.count=i,this.cost=a,this.longPoll=c}getRetryCount(){return this.count}getRetryDelay(){return Math.min(N,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var S;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(S||(S={}));var M=3,Ie=S.STANDARD,k={incompatible:1,attempts:2,capacity:3},E=class{mode=S.STANDARD;retryBackoffStrategy;capacity=I;maxAttemptsProvider;baseDelay;constructor(i){if(typeof i==="number")this.maxAttemptsProvider=async()=>i;else if(typeof i==="function")this.maxAttemptsProvider=i;else if(i&&typeof i==="object")this.maxAttemptsProvider=async()=>i.maxAttempts,this.baseDelay=i.baseDelay,this.retryBackoffStrategy=i.backoff;this.maxAttemptsProvider??=async()=>M,this.baseDelay??=m.delay(),this.retryBackoffStrategy??=new Fe}async acquireInitialRetryToken(i){return new H(m.delay(),0,void 0,m.v2026&&i.includes(":longpoll"))}async refreshRetryTokenForRetry(i,a){let c=await this.getMaxAttempts(),s=this.retryCode(i,a,c),o=s===0,u=i.isLongPoll?.();if(o||u){let t=a.errorType;this.retryBackoffStrategy.setDelayBase(t==="THROTTLING"?m.throttlingDelay():this.baseDelay);let r=this.retryBackoffStrategy.computeNextBackoffDelay(i.getRetryCount()),n=r;if(a.retryAfterHint instanceof Date)n=Math.max(r,Math.min(a.retryAfterHint.getTime()-Date.now(),r+5000));if(!o){let p=m.v2026&&s===k.capacity&&u?n:0;if(p>0)await new Promise((d)=>setTimeout(d,p))}else{let p=this.getCapacityCost(t);this.capacity-=p;let d=new H(0,i.getRetryCount()+1,p,i.isLongPoll?.()??!1);return await new Promise((l)=>setTimeout(l,n)),d.$retryLog.acquisitionDelay=n,d}}throw Error("No retry token available")}recordSuccess(i){this.capacity=Math.min(I,this.capacity+(i.getRetryCost()??z))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(i){return console.warn(`Max attempts provider could not resolve. Using default of ${M}`),M}}retryCode(i,a,c){let s=i.getRetryCount()+1,o=this.isRetryableError(a.errorType)?0:k.incompatible,u=s<c?0:k.attempts,t=this.capacity>=this.getCapacityCost(a.errorType)?0:k.capacity;return o||u||t}getCapacityCost(i){return i===m.modifiedCostType()?m.throttlingCost():m.cost()}isRetryableError(i){return i==="THROTTLING"||i==="TRANSIENT"}},Ne=class{mode=S.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(i,a){let{rateLimiter:c}=a??{};this.rateLimiter=c??new P,this.standardRetryStrategy=a?new E({maxAttempts:typeof i==="number"?i:3,...a}):new E(i)}async acquireInitialRetryToken(i){let a=await this.standardRetryStrategy.acquireInitialRetryToken(i);return await this.rateLimiter.getSendToken(),a}async refreshRetryTokenForRetry(i,a){this.rateLimiter.updateClientSendingRate(a);let c=await this.standardRetryStrategy.refreshRetryTokenForRetry(i,a);return await this.rateLimiter.getSendToken(),c}recordSuccess(i){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(i)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class De extends E{computeNextBackoffDelay;constructor(e,i=m.delay()){super(typeof e==="function"?e:async()=>e);if(typeof i==="number")this.computeNextBackoffDelay=()=>i;else this.computeNextBackoffDelay=i;this.retryBackoffStrategy.computeNextBackoffDelay=(a)=>{let c=a+1;return this.computeNextBackoffDelay(c)}}}var or=(e,i)=>{let a=e,c=z,s=Te,o=Re,u=e,t=(d)=>d.name==="TimeoutError"?o:s,r=(d)=>t(d)<=u;return Object.freeze({hasRetryTokens:r,retrieveRetryTokens:(d)=>{if(!r(d))throw Error("No retry token available");let l=t(d);return u-=l,l},releaseRetryTokens:(d)=>{u+=d??c,u=Math.min(u,a)}})},Ce=(e,i)=>Math.floor(Math.min(N,Math.random()*2**i*e)),Be=(e)=>{if(!e)return!1;return W(e)||ye(e)||T(e)||R(e)};class Y{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=S.STANDARD;constructor(e,i){this.maxAttemptsProvider=e,this.retryDecider=i?.retryDecider??Be,this.delayDecider=i?.delayDecider??Ce,this.retryQuota=i?.retryQuota??or(I)}shouldRetry(e,i,a){return i<a&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)}async getMaxAttempts(){let e;try{e=await this.maxAttemptsProvider()}catch(i){e=M}return e}async retry(e,i,a){let c,s=0,o=0,u=await this.getMaxAttempts(),{request:t}=i;if(F.isInstance(t))t.headers[D]=Ae();while(!0)try{if(F.isInstance(t))t.headers[C]=`attempt=${s+1}; max=${u}`;if(a?.beforeRequest)await a.beforeRequest();let{response:r,output:n}=await e(i);if(a?.afterRequest)a.afterRequest(r);return this.retryQuota.releaseRetryTokens(c),n.$metadata.attempts=s+1,n.$metadata.totalRetryDelay=o,{response:r,output:n}}catch(r){let n=xe(r);if(s++,this.shouldRetry(n,s,u)){c=this.retryQuota.retrieveRetryTokens(n);let p=this.delayDecider(T(n)?Ee:ve,s),d=ar(n.$response),l=Math.max(d||0,p);o+=l,await new Promise((f)=>setTimeout(f,l));continue}if(!n.$metadata)n.$metadata={};throw n.$metadata.attempts=s,n.$metadata.totalRetryDelay=o,n}}}var ar=(e)=>{if(!me.isInstance(e))return;let i=Object.keys(e.headers).find((o)=>o.toLowerCase()==="retry-after");if(!i)return;let a=e.headers[i],c=Number(a);if(!Number.isNaN(c))return Math.min(c*1000,20000);let s=new Date(a);return Math.min(s.getTime()-Date.now(),20000)};class Le extends Y{rateLimiter;constructor(e,i){let{rateLimiter:a,...c}=i??{};super(e,c);this.rateLimiter=a??new P,this.mode=S.ADAPTIVE}async retry(e,i){return super.retry(e,i,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:(a)=>{this.rateLimiter.updateClientSendingRate(a)}})}}var q="AWS_MAX_ATTEMPTS",G="max_attempts",cr={environmentVariableSelector:(e)=>{let i=e[q];if(!i)return;let a=parseInt(i);if(Number.isNaN(a))throw Error(`Environment variable ${q} mast be a number, got "${i}"`);return a},configFileSelector:(e)=>{let i=e[G];if(!i)return;let a=parseInt(i);if(Number.isNaN(a))throw Error(`Shared config file entry ${G} mast be a number, got "${i}"`);return a},default:M},ur=(e,i)=>{let{retryStrategy:a,retryMode:c}=e,{defaultMaxAttempts:s=M,defaultBaseDelay:o=m.delay()}=i??{},u=ge(e.maxAttempts??s),t=a?Promise.resolve(a):void 0,r=async()=>{let n=await u();if(await ge(c)()===S.ADAPTIVE)return new Ne(u,{maxAttempts:n,baseDelay:o});return new E({maxAttempts:n,baseDelay:o})};return Object.assign(e,{maxAttempts:u,retryStrategy:()=>t??=r()})},Ue="AWS_RETRY_MODE",He="retry_mode",dr={environmentVariableSelector:(e)=>e[Ue],configFileSelector:(e)=>e[He],default:Ie},qe=()=>(e)=>async(i)=>{let{request:a}=i;if(F.isInstance(a))delete a.headers[D],delete a.headers[C];return e(i)},We={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},lr=(e)=>({applyToStack:(i)=>{i.addRelativeTo(qe(),We)}}),fr=Oe(be),pr=ir(be);hr.AdaptiveRetryStrategy=Ne;hr.CONFIG_MAX_ATTEMPTS=G;hr.CONFIG_RETRY_MODE=He;hr.ConfiguredRetryStrategy=De;hr.DEFAULT_MAX_ATTEMPTS=M;hr.DEFAULT_RETRY_DELAY_BASE=ve;hr.DEFAULT_RETRY_MODE=Ie;hr.DefaultRateLimiter=P;hr.DeprecatedAdaptiveRetryStrategy=Le;hr.DeprecatedStandardRetryStrategy=Y;hr.ENV_MAX_ATTEMPTS=q;hr.ENV_RETRY_MODE=Ue;hr.INITIAL_RETRY_TOKENS=I;hr.INVOCATION_ID_HEADER=D;hr.MAXIMUM_RETRY_DELAY=N;hr.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=cr;hr.NODE_RETRY_MODE_CONFIG_OPTIONS=dr;hr.NO_RETRY_INCREMENT=z;hr.REQUEST_HEADER=C;hr.RETRY_COST=Te;hr.RETRY_MODES=S;hr.Retry=m;hr.StandardRetryStrategy=E;hr.THROTTLING_RETRY_DELAY_BASE=Ee;hr.TIMEOUT_RETRY_COST=Re;hr.defaultDelayDecider=Ce;hr.defaultRetryDecider=Be;hr.getOmitRetryHeadersPlugin=lr;hr.getRetryAfterHint=Jt;hr.getRetryPlugin=pr;hr.isBrowserNetworkError=_e;hr.isClockSkewCorrectedError=Se;hr.isClockSkewError=ye;hr.isNodeJsHttp2TransientError=we;hr.isRetryableByTrait=W;hr.isServerError=Me;hr.isThrottlingError=T;hr.isTransientError=R;hr.omitRetryHeadersMiddleware=qe;hr.omitRetryHeadersMiddlewareOptions=We;hr.resolveRetryConfig=ur;hr.retryMiddleware=fr;hr.retryMiddlewareOptions=ke});var Ve=w(function(on){var _={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID"),TRACEPARENT:Symbol.for("_AWS_LAMBDA_TRACEPARENT"),TRACESTATE:Symbol.for("_AWS_LAMBDA_TRACESTATE"),BAGGAGE:Symbol.for("_AWS_LAMBDA_BAGGAGE")},j=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");if(!j)globalThis.awslambda=globalThis.awslambda||{};class B{static PROTECTED_KEYS=_;isProtectedKey(e){return Object.values(_).includes(e)}getRequestId(){return this.get(_.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(_.X_RAY_TRACE_ID)}getTenantId(){return this.get(_.TENANT_ID)}getTraceparent(){return this.get(_.TRACEPARENT)}getTracestate(){return this.get(_.TRACESTATE)}getBaggage(){return this.get(_.BAGGAGE)}}class $e extends B{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(e){return this.currentContext?.[e]}set(e,i){if(this.isProtectedKey(e))throw Error(`Cannot modify protected Lambda context field: ${String(e)}`);this.currentContext=this.currentContext||{},this.currentContext[e]=i}run(e,i){return this.currentContext=e,i()}}class X extends B{als;static async create(){let e=new X,i=await import("async_hooks");return e.als=new i.AsyncLocalStorage,e}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(e){return this.als.getStore()?.[e]}set(e,i){if(this.isProtectedKey(e))throw Error(`Cannot modify protected Lambda context field: ${String(e)}`);let a=this.als.getStore();if(!a)throw Error("No context available");a[e]=i}run(e,i){return this.als.run(e,i)}}on.InvokeStore=void 0;(function(e){let i=null;async function a(c){if(!i)i=(async()=>{let o=c===!0||"AWS_LAMBDA_MAX_CONCURRENCY"in process.env?await X.create():new $e;if(!j&&globalThis.awslambda?.InvokeStore)return globalThis.awslambda.InvokeStore;else if(!j&&globalThis.awslambda)return globalThis.awslambda.InvokeStore=o,o;else return o})();return i}e.getInstanceAsync=a,e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{if(i=null,globalThis.awslambda?.InvokeStore)delete globalThis.awslambda.InvokeStore;globalThis.awslambda={InvokeStore:void 0}}}:void 0})(on.InvokeStore||(on.InvokeStore={}));on.InvokeStoreBase=B});var vo=w(function(vn){var{getSmithyContext:Q,hasOwn:cn}=wo();vn.getSmithyContext=Q;var{HttpRequest:J}=Ht(),{requestBuilder:un}=Ht();vn.requestBuilder=un;var{HttpApiKeyAuthLocation:ze}=Ca(),dn=(e,i)=>{if(!i||i.length===0)return e;let a=[];for(let c of i)for(let s of e)if(s.schemeId.split("#")[1]===c)a.push(s);for(let c of e)if(!a.find(({schemeId:s})=>s===c.schemeId))a.push(c);return a};function ln(e){let i=new Map;for(let a of e)i.set(a.schemeId,a);return i}var Z=(e,i)=>(a,c)=>async(s)=>{let o=e.httpAuthSchemeProvider(await i.httpAuthSchemeParametersProvider(e,c,s.input)),u=e.authSchemePreference?await e.authSchemePreference():[],t=dn(o,u),r=ln(e.httpAuthSchemes),n=Q(c),p=[];for(let d of t){let l=r.get(d.schemeId);if(!l){p.push(`HttpAuthScheme \`${d.schemeId}\` was not enabled for this service.`);continue}let f=l.identityProvider(await i.identityProviderConfigProvider(e));if(!f){p.push(`HttpAuthScheme \`${d.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:h={},signingProperties:g={}}=d.propertiesExtractor?.(e,c)||{};d.identityProperties=Object.assign(d.identityProperties||{},h),d.signingProperties=Object.assign(d.signingProperties||{},g),n.selectedHttpAuthScheme={httpAuthOption:d,identity:await f(d.identityProperties),signer:l.signer};break}if(!n.selectedHttpAuthScheme)throw Error(p.join(`
|
|
3
|
-
`));return a(s)},Ye={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},fn=(e,{httpAuthSchemeParametersProvider:i,identityProviderConfigProvider:a})=>({applyToStack:(c)=>{c.addRelativeTo(Z(e,{httpAuthSchemeParametersProvider:i,identityProviderConfigProvider:a}),Ye)}}),je={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},pn=(e,{httpAuthSchemeParametersProvider:i,identityProviderConfigProvider:a})=>({applyToStack:(c)=>{c.addRelativeTo(Z(e,{httpAuthSchemeParametersProvider:i,identityProviderConfigProvider:a}),je)}}),hn=(e)=>(i)=>{throw i},gn=(e,i)=>{},Ke=(e)=>(i,a)=>async(c)=>{if(!J.isInstance(c.request))return i(c);let o=Q(a).selectedHttpAuthScheme;if(!o)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:u={}},identity:t,signer:r}=o,n=await i({...c,request:await r.sign(c.request,t,u)}).catch((r.errorHandler||hn)(u));return(r.successHandler||gn)(n.response,u),n},Xe={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},mn=(e)=>({applyToStack:(i)=>{i.addRelativeTo(Ke(),Xe)}}),An=(e)=>{if(typeof e==="function")return e;let i=Promise.resolve(e);return()=>i},bn=async(e,i,a,c=(o)=>o,...s)=>{let o=new e(a);return o=c(o)??o,await i.send(o,...s)};function yn(e,i,a,c,s){return async function*(u,t,...r){let n=t,p=u.startingToken??n[a],d=!0,l;while(d){if(n[a]=p,s)n[s]=n[s]??u.pageSize;if(u.client instanceof e)l=await bn(i,u.client,t,u.withCommand,...r);else throw Error(`Invalid client, expected instance of ${e.name}`);yield l;let f=p;p=Sn(l,c),d=!!(p&&(!u.stopOnSameToken||p!==f))}return}}var Sn=(e,i)=>{let a=e,c=i.split(".");for(let s of c){if(!a||typeof a!=="object")return;a=a[s]}return a};function _n(e,i,a){if(!e.__smithy_context)e.__smithy_context={features:{}};else if(!e.__smithy_context.features)e.__smithy_context.features={};e.__smithy_context.features[i]=a}class Qe{authSchemes=new Map;constructor(e){for(let i in e){if(!cn(e,i))continue;let a=e[i];if(a!==void 0)this.authSchemes.set(i,a)}}getIdentityProvider(e){return this.authSchemes.get(e)}}class Je{async sign(e,i,a){if(!a)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!a.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!a.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!i.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let c=J.clone(e);if(a.in===ze.QUERY)c.query[a.name]=i.apiKey;else if(a.in===ze.HEADER)c.headers[a.name]=a.scheme?`${a.scheme} ${i.apiKey}`:i.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+a.in+"`");return c}}class Ze{async sign(e,i,a){let c=J.clone(e);if(!i.token)throw Error("request could not be signed with `token` since the `token` is not defined");return c.headers.Authorization=`Bearer ${i.token}`,c}}class et{async sign(e,i,a){return e}}var tt=(e)=>function(a){return nt(a)&&a.expiration.getTime()-Date.now()<e},rt=300000,Mn=tt(rt),nt=(e)=>e.expiration!==void 0,wn=(e,i,a)=>{if(e===void 0)return;let c=typeof e!=="function"?async()=>Promise.resolve(e):e,s,o,u,t=!1,r=async(n)=>{if(!o)o=c(n);try{s=await o,u=!0,t=!1}finally{o=void 0}return s};if(i===void 0)return async(n)=>{if(!u||n?.forceRefresh)s=await r(n);return s};return async(n)=>{if(!u||n?.forceRefresh)s=await r(n);if(t)return s;if(!a(s))return t=!0,s;if(i(s))return await r(n),s;return s}};vn.DefaultIdentityProviderConfig=Qe;vn.EXPIRATION_MS=rt;vn.HttpApiKeyAuthSigner=Je;vn.HttpBearerAuthSigner=Ze;vn.NoAuthSigner=et;vn.createIsIdentityExpiredFunction=tt;vn.createPaginator=yn;vn.doesIdentityRequireRefresh=nt;vn.getHttpAuthSchemeEndpointRuleSetPlugin=fn;vn.getHttpAuthSchemePlugin=pn;vn.getHttpSigningPlugin=mn;vn.httpAuthSchemeEndpointRuleSetMiddlewareOptions=Ye;vn.httpAuthSchemeMiddleware=Z;vn.httpAuthSchemeMiddlewareOptions=je;vn.httpSigningMiddleware=Ke;vn.httpSigningMiddlewareOptions=Xe;vn.isIdentityExpired=Mn;vn.memoizeIdentityProvider=wn;vn.normalizeProvider=An;vn.setFeature=_n});var it=w(function(x,ee){(function(e,i){typeof x=="object"&&typeof ee=="object"?ee.exports=i():typeof define=="function"&&define.amd?define([],i):typeof x=="object"?x.bowser=i():e.bowser=i()})(x,function(){return function(e){var i={};function a(c){if(i[c])return i[c].exports;var s=i[c]={i:c,l:!1,exports:{}};return e[c].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=e,a.c=i,a.d=function(c,s,o){a.o(c,s)||Object.defineProperty(c,s,{enumerable:!0,get:o})},a.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},a.t=function(c,s){if(1&s&&(c=a(c)),8&s)return c;if(4&s&&typeof c=="object"&&c&&c.__esModule)return c;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:c}),2&s&&typeof c!="string")for(var u in c)a.d(o,u,function(t){return c[t]}.bind(null,u));return o},a.n=function(c){var s=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(s,"a",s),s},a.o=function(c,s){return Object.prototype.hasOwnProperty.call(c,s)},a.p="",a(a.s=90)}({17:function(e,i,a){i.__esModule=!0,i.default=void 0;var c=a(18),s=function(){function o(){}return o.getFirstMatch=function(u,t){var r=t.match(u);return r&&r.length>0&&r[1]||""},o.getSecondMatch=function(u,t){var r=t.match(u);return r&&r.length>1&&r[2]||""},o.matchAndReturnConst=function(u,t,r){if(u.test(t))return r},o.getWindowsVersionName=function(u){switch(u){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},o.getMacOSVersionName=function(u){var t=u.split(".").splice(0,2).map(function(p){return parseInt(p,10)||0});t.push(0);var r=t[0],n=t[1];if(r===10)switch(n){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},o.getAndroidVersionName=function(u){var t=u.split(".").splice(0,2).map(function(r){return parseInt(r,10)||0});if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?"Cupcake":t[0]===1&&t[1]>=6?"Donut":t[0]===2&&t[1]<2?"Eclair":t[0]===2&&t[1]===2?"Froyo":t[0]===2&&t[1]>2?"Gingerbread":t[0]===3?"Honeycomb":t[0]===4&&t[1]<1?"Ice Cream Sandwich":t[0]===4&&t[1]<4?"Jelly Bean":t[0]===4&&t[1]>=4?"KitKat":t[0]===5?"Lollipop":t[0]===6?"Marshmallow":t[0]===7?"Nougat":t[0]===8?"Oreo":t[0]===9?"Pie":void 0},o.getVersionPrecision=function(u){return u.split(".").length},o.compareVersions=function(u,t,r){r===void 0&&(r=!1);var n=o.getVersionPrecision(u),p=o.getVersionPrecision(t),d=Math.max(n,p),l=0,f=o.map([u,t],function(h){var g=d-o.getVersionPrecision(h),A=h+Array(g+1).join(".0");return o.map(A.split("."),function(v){return Array(20-v.length).join("0")+v}).reverse()});for(r&&(l=d-Math.min(n,p)),d-=1;d>=l;){if(f[0][d]>f[1][d])return 1;if(f[0][d]===f[1][d]){if(d===l)return 0;d-=1}else if(f[0][d]<f[1][d])return-1}},o.map=function(u,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(u,t);for(r=0;r<u.length;r+=1)n.push(t(u[r]));return n},o.find=function(u,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(u,t);for(r=0,n=u.length;r<n;r+=1){var p=u[r];if(t(p,r))return p}},o.assign=function(u){for(var t,r,n=u,p=arguments.length,d=Array(p>1?p-1:0),l=1;l<p;l++)d[l-1]=arguments[l];if(Object.assign)return Object.assign.apply(Object,[u].concat(d));var f=function(){var h=d[t];typeof h=="object"&&h!==null&&Object.keys(h).forEach(function(g){n[g]=h[g]})};for(t=0,r=d.length;t<r;t+=1)f();return u},o.getBrowserAlias=function(u){return c.BROWSER_ALIASES_MAP[u]},o.getBrowserTypeByAlias=function(u){return c.BROWSER_MAP[u]||""},o}();i.default=s,e.exports=i.default},18:function(e,i,a){i.__esModule=!0,i.ENGINE_MAP=i.OS_MAP=i.PLATFORMS_MAP=i.BROWSER_MAP=i.BROWSER_ALIASES_MAP=void 0,i.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},i.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},i.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},i.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},i.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,i,a){i.__esModule=!0,i.default=void 0;var c,s=(c=a(91))&&c.__esModule?c:{default:c},o=a(18);function u(r,n){for(var p=0;p<n.length;p++){var d=n[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(r,d.key,d)}}var t=function(){function r(){}var n,p,d;return r.getParser=function(l,f,h){if(f===void 0&&(f=!1),h===void 0&&(h=null),typeof l!="string")throw Error("UserAgent should be a string");return new s.default(l,f,h)},r.parse=function(l,f){return f===void 0&&(f=null),new s.default(l,f).getResult()},n=r,d=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(p=null)&&u(n.prototype,p),d&&u(n,d),r}();i.default=t,e.exports=i.default},91:function(e,i,a){i.__esModule=!0,i.default=void 0;var c=r(a(92)),s=r(a(93)),o=r(a(94)),u=r(a(95)),t=r(a(17));function r(p){return p&&p.__esModule?p:{default:p}}var n=function(){function p(l,f,h){if(f===void 0&&(f=!1),h===void 0&&(h=null),l==null||l==="")throw Error("UserAgent parameter can't be empty");this._ua=l;var g=!1;typeof f=="boolean"?(g=f,this._hints=h):this._hints=f!=null&&typeof f=="object"?f:null,this.parsedResult={},g!==!0&&this.parse()}var d=p.prototype;return d.getHints=function(){return this._hints},d.hasBrand=function(l){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var f=l.toLowerCase();return this._hints.brands.some(function(h){return h.brand&&h.brand.toLowerCase()===f})},d.getBrandVersion=function(l){if(this._hints&&Array.isArray(this._hints.brands)){var f=l.toLowerCase(),h=this._hints.brands.find(function(g){return g.brand&&g.brand.toLowerCase()===f});return h?h.version:void 0}},d.getUA=function(){return this._ua},d.test=function(l){return l.test(this._ua)},d.parseBrowser=function(){var l=this;this.parsedResult.browser={};var f=t.default.find(c.default,function(h){if(typeof h.test=="function")return h.test(l);if(Array.isArray(h.test))return h.test.some(function(g){return l.test(g)});throw Error("Browser's test function is not valid")});return f&&(this.parsedResult.browser=f.describe(this.getUA(),this)),this.parsedResult.browser},d.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},d.getBrowserName=function(l){return l?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},d.getBrowserVersion=function(){return this.getBrowser().version},d.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},d.parseOS=function(){var l=this;this.parsedResult.os={};var f=t.default.find(s.default,function(h){if(typeof h.test=="function")return h.test(l);if(Array.isArray(h.test))return h.test.some(function(g){return l.test(g)});throw Error("Browser's test function is not valid")});return f&&(this.parsedResult.os=f.describe(this.getUA())),this.parsedResult.os},d.getOSName=function(l){var f=this.getOS().name;return l?String(f).toLowerCase()||"":f||""},d.getOSVersion=function(){return this.getOS().version},d.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},d.getPlatformType=function(l){l===void 0&&(l=!1);var f=this.getPlatform().type;return l?String(f).toLowerCase()||"":f||""},d.parsePlatform=function(){var l=this;this.parsedResult.platform={};var f=t.default.find(o.default,function(h){if(typeof h.test=="function")return h.test(l);if(Array.isArray(h.test))return h.test.some(function(g){return l.test(g)});throw Error("Browser's test function is not valid")});return f&&(this.parsedResult.platform=f.describe(this.getUA())),this.parsedResult.platform},d.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},d.getEngineName=function(l){return l?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},d.parseEngine=function(){var l=this;this.parsedResult.engine={};var f=t.default.find(u.default,function(h){if(typeof h.test=="function")return h.test(l);if(Array.isArray(h.test))return h.test.some(function(g){return l.test(g)});throw Error("Browser's test function is not valid")});return f&&(this.parsedResult.engine=f.describe(this.getUA())),this.parsedResult.engine},d.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},d.getResult=function(){return t.default.assign({},this.parsedResult)},d.satisfies=function(l){var f=this,h={},g=0,A={},v=0;if(Object.keys(l).forEach(function(y){var O=l[y];typeof O=="string"?(A[y]=O,v+=1):typeof O=="object"&&(h[y]=O,g+=1)}),g>0){var ue=Object.keys(h),de=t.default.find(ue,function(y){return f.isOS(y)});if(de){var le=this.satisfies(h[de]);if(le!==void 0)return le}var fe=t.default.find(ue,function(y){return f.isPlatform(y)});if(fe){var pe=this.satisfies(h[fe]);if(pe!==void 0)return pe}}if(v>0){var qt=Object.keys(A),he=t.default.find(qt,function(y){return f.isBrowser(y,!0)});if(he!==void 0)return this.compareVersion(A[he])}},d.isBrowser=function(l,f){f===void 0&&(f=!1);var h=this.getBrowserName().toLowerCase(),g=l.toLowerCase(),A=t.default.getBrowserTypeByAlias(g);return f&&A&&(g=A.toLowerCase()),g===h},d.compareVersion=function(l){var f=[0],h=l,g=!1,A=this.getBrowserVersion();if(typeof A=="string")return l[0]===">"||l[0]==="<"?(h=l.substr(1),l[1]==="="?(g=!0,h=l.substr(2)):f=[],l[0]===">"?f.push(1):f.push(-1)):l[0]==="="?h=l.substr(1):l[0]==="~"&&(g=!0,h=l.substr(1)),f.indexOf(t.default.compareVersions(A,h,g))>-1},d.isOS=function(l){return this.getOSName(!0)===String(l).toLowerCase()},d.isPlatform=function(l){return this.getPlatformType(!0)===String(l).toLowerCase()},d.isEngine=function(l){return this.getEngineName(!0)===String(l).toLowerCase()},d.is=function(l,f){return f===void 0&&(f=!1),this.isBrowser(l,f)||this.isOS(l)||this.isPlatform(l)},d.some=function(l){var f=this;return l===void 0&&(l=[]),l.some(function(h){return f.is(h)})},p}();i.default=n,e.exports=i.default},92:function(e,i,a){i.__esModule=!0,i.default=void 0;var c,s=(c=a(17))&&c.__esModule?c:{default:c},o=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/gptbot/i],describe:function(t){var r={name:"GPTBot"},n=s.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/chatgpt-user/i],describe:function(t){var r={name:"ChatGPT-User"},n=s.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/oai-searchbot/i],describe:function(t){var r={name:"OAI-SearchBot"},n=s.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(t){var r={name:"ClaudeBot"},n=s.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(t){var r={name:"Omgilibot"},n=s.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/diffbot/i],describe:function(t){var r={name:"Diffbot"},n=s.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/perplexitybot/i],describe:function(t){var r={name:"PerplexityBot"},n=s.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/perplexity-user/i],describe:function(t){var r={name:"Perplexity-User"},n=s.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/youbot/i],describe:function(t){var r={name:"YouBot"},n=s.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/meta-webindexer/i],describe:function(t){var r={name:"Meta-WebIndexer"},n=s.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/meta-externalads/i],describe:function(t){var r={name:"Meta-ExternalAds"},n=s.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/meta-externalagent/i],describe:function(t){var r={name:"Meta-ExternalAgent"},n=s.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/meta-externalfetcher/i],describe:function(t){var r={name:"Meta-ExternalFetcher"},n=s.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/googlebot/i],describe:function(t){var r={name:"Googlebot"},n=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/linespider/i],describe:function(t){var r={name:"Linespider"},n=s.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/amazonbot/i],describe:function(t){var r={name:"AmazonBot"},n=s.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/bingbot/i],describe:function(t){var r={name:"BingCrawler"},n=s.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/baiduspider/i],describe:function(t){var r={name:"BaiduSpider"},n=s.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/duckduckbot/i],describe:function(t){var r={name:"DuckDuckBot"},n=s.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/ia_archiver/i],describe:function(t){var r={name:"InternetArchiveCrawler"},n=s.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(t){var r={name:"SlackBot"},n=s.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(t){var r={name:"Opera"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/opr\/|opios/i],describe:function(t){var r={name:"Opera"},n=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/SamsungBrowser/i],describe:function(t){var r={name:"Samsung Internet for Android"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/Whale/i],describe:function(t){var r={name:"NAVER Whale Browser"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/PaleMoon/i],describe:function(t){var r={name:"Pale Moon"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/MZBrowser/i],describe:function(t){var r={name:"MZ Browser"},n=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/focus/i],describe:function(t){var r={name:"Focus"},n=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/swing/i],describe:function(t){var r={name:"Swing"},n=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/coast/i],describe:function(t){var r={name:"Opera Coast"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var r={name:"Opera Touch"},n=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/yabrowser/i],describe:function(t){var r={name:"Yandex Browser"},n=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/ucbrowser/i],describe:function(t){var r={name:"UC Browser"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/Maxthon|mxios/i],describe:function(t){var r={name:"Maxthon"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/epiphany/i],describe:function(t){var r={name:"Epiphany"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/puffin/i],describe:function(t){var r={name:"Puffin"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/sleipnir/i],describe:function(t){var r={name:"Sleipnir"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/k-meleon/i],describe:function(t){var r={name:"K-Meleon"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/micromessenger/i],describe:function(t){var r={name:"WeChat"},n=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/qqbrowser/i],describe:function(t){var r={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/msie|trident/i],describe:function(t){var r={name:"Internet Explorer"},n=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/\sedg\//i],describe:function(t){var r={name:"Microsoft Edge"},n=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/edg([ea]|ios)/i],describe:function(t){var r={name:"Microsoft Edge"},n=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/vivaldi/i],describe:function(t){var r={name:"Vivaldi"},n=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/seamonkey/i],describe:function(t){var r={name:"SeaMonkey"},n=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/sailfish/i],describe:function(t){var r={name:"Sailfish"},n=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(r.version=n),r}},{test:[/silk/i],describe:function(t){var r={name:"Amazon Silk"},n=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/phantom/i],describe:function(t){var r={name:"PhantomJS"},n=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/slimerjs/i],describe:function(t){var r={name:"SlimerJS"},n=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var r={name:"BlackBerry"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var r={name:"WebOS Browser"},n=s.default.getFirstMatch(o,t)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/bada/i],describe:function(t){var r={name:"Bada"},n=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/tizen/i],describe:function(t){var r={name:"Tizen"},n=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/qupzilla/i],describe:function(t){var r={name:"QupZilla"},n=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/librewolf/i],describe:function(t){var r={name:"LibreWolf"},n=s.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var r={name:"Firefox"},n=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/electron/i],describe:function(t){var r={name:"Electron"},n=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(t){var r={name:"Sogou Browser"},n=s.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,t),p=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t),d=s.default.getFirstMatch(/se ([\d.]+)x/i,t),l=n||p||d;return l&&(r.version=l),r}},{test:[/MiuiBrowser/i],describe:function(t){var r={name:"Miui"},n=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:function(t){return!!t.hasBrand("DuckDuckGo")||t.test(/\sDdg\/[\d.]+$/i)},describe:function(t,r){var n={name:"DuckDuckGo"};if(r){var p=r.getBrandVersion("DuckDuckGo");if(p)return n.version=p,n}var d=s.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,t);return d&&(n.version=d),n}},{test:function(t){return t.hasBrand("Brave")},describe:function(t,r){var n={name:"Brave"};if(r){var p=r.getBrandVersion("Brave");if(p)return n.version=p,n}return n}},{test:[/chromium/i],describe:function(t){var r={name:"Chromium"},n=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/chrome|crios|crmo/i],describe:function(t){var r={name:"Chrome"},n=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/GSA/i],describe:function(t){var r={name:"Google Search"},n=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:function(t){var r=!t.test(/like android/i),n=t.test(/android/i);return r&&n},describe:function(t){var r={name:"Android Browser"},n=s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/playstation 4/i],describe:function(t){var r={name:"PlayStation 4"},n=s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/safari|applewebkit/i],describe:function(t){var r={name:"Safari"},n=s.default.getFirstMatch(o,t);return n&&(r.version=n),r}},{test:[/.*/i],describe:function(t){var r=t.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(r,t),version:s.default.getSecondMatch(r,t)}}}];i.default=u,e.exports=i.default},93:function(e,i,a){i.__esModule=!0,i.default=void 0;var c,s=(c=a(17))&&c.__esModule?c:{default:c},o=a(18),u=[{test:[/Roku\/DVP/],describe:function(t){var r=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:r}}},{test:[/windows phone/i],describe:function(t){var r=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:r}}},{test:[/windows /i],describe:function(t){var r=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=s.default.getWindowsVersionName(r);return{name:o.OS_MAP.Windows,version:r,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var r={name:o.OS_MAP.iOS},n=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(r.version=n),r}},{test:[/macintosh/i],describe:function(t){var r=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=s.default.getMacOSVersionName(r),p={name:o.OS_MAP.MacOS,version:r};return n&&(p.versionName=n),p}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var r=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:r}}},{test:[/OpenHarmony/i],describe:function(t){var r=s.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.HarmonyOS,version:r}}},{test:function(t){var r=!t.test(/like android/i),n=t.test(/android/i);return r&&n},describe:function(t){var r=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=s.default.getAndroidVersionName(r),p={name:o.OS_MAP.Android,version:r};return n&&(p.versionName=n),p}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var r=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:o.OS_MAP.WebOS};return r&&r.length&&(n.version=r),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var r=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||s.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:r}}},{test:[/bada/i],describe:function(t){var r=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:r}}},{test:[/tizen/i],describe:function(t){var r=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:r}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var r=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:r}}}];i.default=u,e.exports=i.default},94:function(e,i,a){i.__esModule=!0,i.default=void 0;var c,s=(c=a(17))&&c.__esModule?c:{default:c},o=a(18),u=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(t){var r=s.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return r&&(n.model=r),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var r=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return r&&!n},describe:function(t){var r=s.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:r}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(t){var r=s.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,t),n={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return r&&(n.model=r),n}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return t.getBrowserName(!0)==="blackberry"},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return t.getBrowserName(!0)==="bada"},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return t.getBrowserName()==="windows phone"},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var r=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&r>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return t.getOSName(!0)==="android"},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return t.getOSName(!0)==="macos"},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return t.getOSName(!0)==="windows"},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return t.getOSName(!0)==="linux"},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return t.getOSName(!0)==="playstation 4"},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return t.getOSName(!0)==="roku"},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];i.default=u,e.exports=i.default},95:function(e,i,a){i.__esModule=!0,i.default=void 0;var c,s=(c=a(17))&&c.__esModule?c:{default:c},o=a(18),u=[{test:function(t){return t.getBrowserName(!0)==="microsoft edge"},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var r=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:r}}},{test:[/trident/i],describe:function(t){var r={name:o.ENGINE_MAP.Trident},n=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:function(t){return t.test(/presto/i)},describe:function(t){var r={name:o.ENGINE_MAP.Presto},n=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:function(t){var r=t.test(/gecko/i),n=t.test(/like gecko/i);return r&&!n},describe:function(t){var r={name:o.ENGINE_MAP.Gecko},n=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var r={name:o.ENGINE_MAP.WebKit},n=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}}];i.default=u,e.exports=i.default}})})});var Ot=w(function(qi){var{Retry:Yn,RETRY_MODES:st}=Wo(),{HttpRequest:oe,parseUrl:jn}=Ht(),{InvokeStore:ot}=Ve(),{normalizeProvider:Kn}=vo(),{platform:Xn,release:Qn}=V("os"),{versions:te,env:at}=V("process"),{isValidHostLabel:Jn,isIpAddress:ft,customEndpointFunctions:Zn}=nn(),{EndpointError:ei,resolveEndpoint:ti}=nn();qi.EndpointError=ei;qi.isIpAddress=ft;qi.resolveEndpoint=ti;var{loadConfig:ri,NODE_REGION_CONFIG_OPTIONS:pt,NODE_REGION_CONFIG_FILE_OPTIONS:ht}=Ge(),{REGION_ENV_NAME:ni,REGION_INI_NAME:ii,resolveRegionConfig:si}=Ge();qi.NODE_REGION_CONFIG_FILE_OPTIONS=ht;qi.NODE_REGION_CONFIG_OPTIONS=pt;qi.REGION_ENV_NAME=ni;qi.REGION_INI_NAME=ii;qi.resolveRegionConfig=si;var U={warningEmitted:!1},oi=(e)=>{if(e&&!U.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){U.warningEmitted=!0;return}let i=parseInt(e.substring(1,e.indexOf("."))),a=22;if(i<a)U.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
|
|
4
|
-
versions published after the first week of January 2027
|
|
5
|
-
will require node >=${a}. You are running node ${e}.
|
|
6
|
-
|
|
7
|
-
To continue receiving updates to AWS services, bug fixes,
|
|
8
|
-
and security updates please upgrade to node >=${a}.
|
|
9
|
-
|
|
10
|
-
More information can be found at: https://a.co/c895JFp`)}},ai=()=>(e,i)=>async(a)=>(i.__retryLongPoll=!0,e(a)),ci={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},ui=(e)=>({applyToStack:(i)=>{i.add(ai(),ci)}});function di(e,i,a){if(!e.$source)e.$source={};return e.$source[i]=a,e}Yn.v2026||=typeof process==="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";function b(e,i,a){if(!e.__aws_sdk_context)e.__aws_sdk_context={features:{}};else if(!e.__aws_sdk_context.features)e.__aws_sdk_context.features={};e.__aws_sdk_context.features[i]=a}function li(e,i,a){if(!e.$source)e.$source={};return e.$source[i]=a,e}function fi(e){return e}var gt=(e)=>(i)=>async(a)=>{if(!oe.isInstance(a.request))return i(a);let{request:c}=a,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!c.headers[":authority"])delete c.headers.host,c.headers[":authority"]=c.hostname+(c.port?":"+c.port:"");else if(!c.headers.host){let o=c.hostname;if(c.port!=null)o+=`:${c.port}`;c.headers.host=o}return i(a)},mt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},pi=(e)=>({applyToStack:(i)=>{i.add(gt(e),mt)}}),At=()=>(e,i)=>async(a)=>{try{let c=await e(a),{clientName:s,commandName:o,logger:u,dynamoDbDocumentClientOptions:t={}}=i,{overrideInputFilterSensitiveLog:r,overrideOutputFilterSensitiveLog:n}=t,p=r??i.inputFilterSensitiveLog,d=n??i.outputFilterSensitiveLog,{$metadata:l,...f}=c.output;return u?.info?.({clientName:s,commandName:o,input:p(a.input),output:d(f),metadata:l}),c}catch(c){let{clientName:s,commandName:o,logger:u,dynamoDbDocumentClientOptions:t={}}=i,{overrideInputFilterSensitiveLog:r}=t,n=r??i.inputFilterSensitiveLog;throw u?.error?.({clientName:s,commandName:o,input:n(a.input),error:c,metadata:c.$metadata}),c}},bt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},hi=(e)=>({applyToStack:(i)=>{i.add(At(),bt)}}),yt={step:"build",tags:["RECURSION_DETECTION","TRACE_CONTEXT_PROPAGATION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},gi="AWS_LAMBDA_FUNCTION_NAME",mi="_X_AMZN_TRACE_ID",re="X-Amzn-Trace-Id",se="traceparent",St="tracestate",_t="baggage",Mt=()=>(e)=>async(i)=>{let{request:a}=i;if(!oe.isInstance(a))return e(i);let c;{let s=Object.keys(a.headers??{}).find((o)=>o.toLowerCase()===re.toLowerCase())??re;if(!a.headers.hasOwnProperty(s)){let o=process.env[gi],u=process.env[mi];c??=await ot.getInstanceAsync();let r=c?.getXRayTraceId()??u,n=(p)=>typeof p==="string"&&p.length>0;if(n(o)&&n(r))a.headers[re]=r}}if(Ai(a.headers),!a.headers[se]){let o=(c??=await ot.getInstanceAsync())?.getTraceparent?.();if(o){a.headers[se]=o;let u=c?.getTracestate?.();if(u)a.headers[St]=u;let t=c?.getBaggage?.();if(t)a.headers[_t]=t}}return e(i)};function Ai(e){for(let i of Object.keys(e)){let a=i.toLowerCase();if(i!==a&&(a===se||a===St||a===_t))e[a]=e[i],delete e[i]}}var bi=(e)=>({applyToStack:(i)=>{i.add(Mt(),yt)}}),ae=void 0;function yi(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function Si(e){let i=Kn(e.userAgentAppId??ae),{customUserAgent:a}=e;return Object.assign(e,{customUserAgent:typeof a==="string"?[[a]]:a,userAgentAppId:async()=>{let c=await i();if(!yi(c)){let s=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof c!=="string")s?.warn("userAgentAppId must be a string or undefined.");else if(c.length>50)s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return c}})}var wt={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],version:"1.1"},vt=wt,Et="",Tt=(e)=>{let{partitions:i}=vt;for(let c of i){let{regions:s,outputs:o}=c;for(let[u,t]of Object.entries(s))if(u===e)return{...o,...t}}for(let c of i){let{regionRegex:s,outputs:o}=c;if(new RegExp(s).test(e))return{...o}}let a=i.find((c)=>c.id==="aws");if(!a)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...a.outputs}},Rt=(e,i="")=>{vt=e,Et=i},_i=()=>{Rt(wt,"")},Pt=()=>Et,Mi=/\d{12}\.ddb/;async function wi(e,i,a){if(a.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")b(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof i.retryStrategy==="function"){let o=await i.retryStrategy();if(typeof o.mode==="string")switch(o.mode){case st.ADAPTIVE:b(e,"RETRY_MODE_ADAPTIVE","F");break;case st.STANDARD:b(e,"RETRY_MODE_STANDARD","E");break}}if(typeof i.accountIdEndpointMode==="function"){let o=e.endpointV2;if(String(o?.url?.hostname).match(Mi))b(e,"ACCOUNT_ID_ENDPOINT","O");switch(await i.accountIdEndpointMode?.()){case"disabled":b(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":b(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":b(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){let o=s;if(o.accountId)b(e,"RESOLVED_ACCOUNT_ID","T");for(let[u,t]of Object.entries(o.$source??{}))b(e,u,t)}}var ct="user-agent",ne="x-amz-user-agent",ut=" ",ie="/",vi=/[^!$%&'*+\-.^_`|~\w]/g,Ei=/[^!$%&'*+\-.^_`|~\w#]/g,dt="-",Ti=1024;function Ri(e){let i="";for(let a in e){let c=e[a];if(i.length+c.length+1<=Ti){if(i.length)i+=","+c;else i+=c;continue}break}return i}var xt=(e)=>(i,a)=>async(c)=>{let{request:s}=c;if(!oe.isInstance(s))return i(c);let{headers:o}=s,u=a?.userAgent?.map(L)||[],t=(await e.defaultUserAgentProvider()).map(L);await wi(a,e,c);let r=a;t.push(`m/${Ri(Object.assign({},a.__smithy_context?.features,r.__aws_sdk_context?.features))}`);let n=e?.customUserAgent?.map(L)||[],p=await e.userAgentAppId();if(p)t.push(L(["app",`${p}`]));let d=Pt(),l=(d?[d]:[]).concat([...t,...u,...n]).join(ut),f=[...t.filter((h)=>h.startsWith("aws-sdk-")),...n].join(ut);if(e.runtime!=="browser"){if(f)o[ne]=o[ne]?`${o[ct]} ${f}`:f;o[ct]=l}else o[ne]=l;return i({...c,request:s})},L=(e)=>{let i=e[0].split(ie).map((u)=>u.replace(vi,dt)).join(ie),a=e[1]?.replace(Ei,dt),c=i.indexOf(ie),s=i.substring(0,c),o=i.substring(c+1);if(s==="api")o=o.toLowerCase();return[s,o,a].filter((u)=>u&&u.length>0).reduce((u,t,r)=>{switch(r){case 0:return t;case 1:return`${u}/${t}`;default:return`${u}#${t}`}},"")},kt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Pi=(e)=>({applyToStack:(i)=>{i.add(xt(e),kt)}}),xi=()=>{let e=["deno","bun","llrt"];for(let i of e)if(te[i])return[`md/${i}`,te[i]];return["md/nodejs",te.node]},Ft={isCrtAvailable:!1},Oi=()=>{if(Ft.isCrtAvailable)return["md/crt-avail"];return null},It=({serviceId:e,clientVersion:i})=>{let a=xi();return async(c)=>{let s=[["aws-sdk-js",i],["ua","2.1"],[`os/${Xn()}`,Qn()],["lang/js"],a],o=Oi();if(o)s.push(o);if(e)s.push([`api/${e}`,i]);if(at.AWS_EXECUTION_ENV)s.push([`exec-env/${at.AWS_EXECUTION_ENV}`]);let u=await c?.userAgentAppId?.();return u?[...s,[`app/${u}`]]:[...s]}},ki=It,Nt="AWS_SDK_UA_APP_ID",Dt="sdk_ua_app_id",Fi="sdk-ua-app-id",Ii={environmentVariableSelector:(e)=>e[Nt],configFileSelector:(e)=>e[Dt]??e[Fi],default:ae},Ni=({serviceId:e,clientVersion:i})=>async(a)=>{let c=it(),s=c.parse??c.default.parse??(()=>""),o=typeof window<"u"&&window?.navigator?.userAgent?s(window.navigator.userAgent):void 0,u=[["aws-sdk-js",i],["ua","2.1"],[`os/${o?.os?.name||"other"}`,o?.os?.version],["lang/js"],["md/browser",`${o?.browser?.name??"unknown"}_${o?.browser?.version??"unknown"}`]];if(e)u.push([`api/${e}`,i]);let t=await a?.userAgentAppId?.();if(t)u.push([`app/${t}`]);return u},Di={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux";return},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari";return}},ce=(e,i=!1)=>{if(i){for(let a of e.split("."))if(!ce(a))return!1;return!0}if(!Jn(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(ft(e))return!1;return!0},lt=":",Ci="/",Ct=(e)=>{let i=e.split(lt);if(i.length<6)return null;let[a,c,s,o,u,...t]=i;if(a!=="arn"||c===""||s===""||t.join(lt)==="")return null;let r=t.map((n)=>n.split(Ci)).flat();return{partition:c,service:s,region:o,accountId:u,resourceId:r}},Bt={isVirtualHostableS3Bucket:ce,parseArn:Ct,partition:Tt};Zn.aws=Bt;var Bi=(e)=>{if(typeof e.endpointProvider!=="function")throw Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:i}=e;if(i===void 0)e.endpoint=async()=>Lt(e.endpointProvider({Region:typeof e.region==="function"?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint==="function"?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint==="function"?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:void 0},{logger:e.logger}));return e},Lt=(e)=>jn(e.url);function Li(e={}){return ri({...pt,async default(){if(!Ut.silence)console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");return"us-east-1"}},{...ht,...e})}var Ut={silence:!1},Ui=(e)=>({setRegion(i){e.region=i},region(){return e.region}}),Hi=(e)=>({region:e.region()});qi.DEFAULT_UA_APP_ID=ae;qi.NODE_APP_ID_CONFIG_OPTIONS=Ii;qi.UA_APP_ID_ENV_NAME=Nt;qi.UA_APP_ID_INI_NAME=Dt;qi.awsEndpointFunctions=Bt;qi.createDefaultUserAgentProvider=It;qi.createUserAgentStringParsingProvider=Ni;qi.crtAvailability=Ft;qi.defaultUserAgent=ki;qi.emitWarningIfUnsupportedVersion=oi;qi.fallback=Di;qi.getAwsRegionExtensionConfiguration=Ui;qi.getHostHeaderPlugin=pi;qi.getLoggerPlugin=hi;qi.getLongPollPlugin=ui;qi.getRecursionDetectionPlugin=bi;qi.getUserAgentMiddlewareOptions=kt;qi.getUserAgentPlugin=Pi;qi.getUserAgentPrefix=Pt;qi.hostHeaderMiddleware=gt;qi.hostHeaderMiddlewareOptions=mt;qi.isVirtualHostableS3Bucket=ce;qi.loggerMiddleware=At;qi.loggerMiddlewareOptions=bt;qi.parseArn=Ct;qi.partition=Tt;qi.recursionDetectionMiddleware=Mt;qi.recursionDetectionMiddlewareOptions=yt;qi.resolveAwsRegionExtensionConfiguration=Hi;qi.resolveDefaultAwsRegionalEndpointsConfig=Bi;qi.resolveHostHeaderConfig=fi;qi.resolveUserAgentConfig=Si;qi.setCredentialFeature=di;qi.setFeature=b;qi.setPartitionInfo=Rt;qi.setTokenFeature=li;qi.state=U;qi.stsRegionDefaultResolver=Li;qi.stsRegionWarning=Ut;qi.toEndpointV1=Lt;qi.useDefaultPartitionInfo=_i;qi.userAgentMiddleware=xt});
|
|
11
|
-
export{Wo,vo,Ot};
|
package/bin/chunk-keetdtxb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{P,m,_,u,E,L,t,o,G,Z,g,I,O,On,Mt,ve,wt,ar,lr,pe,we,Ne,C,M_,k_,O_,K_,Uf,yh,Iy,Ky,vb,wb,_r,rg,sp,up,wg,OS,zS,uE,Fg,zp,Gd,fT,I1,rm,nm,tM,Sn,om,le,gt,Br,Fr,Ei,Fe,Le,Ze,Be,oe,Io,Ws,Gt,dr}from"./chunk-p1d500sf.js";import{In}from"./chunk-cxet91kt.js";import{xu,Ys}from"./chunk-xgnvktq6.js";import{Mo}from"./chunk-agcnbjxk.js";var qe=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],ie=I("brain",qe);E();function Mi({projectId:p,contextAssetId:S,file:b,currentTime:de,frameRate:j,startTimecode:J,formatTimestamp:F,onTyping:me,onSelectMessage:U,selectedMessageId:ce}){let{isHistoryMode:h,setIsHistoryMode:R,currentSessionId:ue,chatAssets:fe,removeAsset:ge,messages:y,historySessions:X,isStreaming:A,fetchHistorySessions:Y,loadSession:xe,deleteSession:he,startNewSession:ee,sendMessage:be,abortActiveSession:ye,selectedAgentId:M,setSelectedAgentId:q,inputText:ke,setInputText:_e}=dr(),{teamId:f,ensureTeamIdForProject:te}=gt(),{videoTimeDisplayMode:Se}=Gt(),[D,H]=u(null);m(()=>{if(p)te(p)},[p,te]);let{data:Te=[],isSuccess:re}=Z({queryKey:["chat-agents",p],queryFn:async()=>{if(!p)return[];let e=await g.api.projects[":projectId"]["chat-agents"].$get({param:{projectId:p}});if(!e.ok)throw Error("failed to fetch agents");return e.json()},enabled:!!p}),T=Te.filter((e)=>e.type==="chat"&&e.enabled);m(()=>{if(!re)return;if(T.length>0){if(!T.some((r)=>r.id===M))q(T[0].id)}else if(M!==null)q(null)},[re,T,M,q]);let se=_(null),B=_(null),Q=_(!0),K=_(!0);m(()=>{K.current=!0,Q.current=!0},[p,S,h]),m(()=>{let e=B.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!e)return;let{scrollTop:r,isAtBottom:l}=dr.getState(),s=setTimeout(()=>{if(l)e.scrollTop=e.scrollHeight;else e.scrollTop=r;let c=setTimeout(()=>{K.current=!1},50);return()=>clearTimeout(c)},0);return()=>clearTimeout(s)},[p,S,h]),m(()=>{let e=B.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!e)return;let r=()=>{if(K.current)return;let l=e.scrollTop,s=e.scrollHeight-l-e.clientHeight<10;dr.getState().setScrollState(l,s)};return e.addEventListener("scroll",r),()=>{e.removeEventListener("scroll",r)}},[p,S,h]);let{ref:Ce,isDropTarget:Ae}=Br({id:"chatbot-sidebar",data:{type:"chatbot-sidebar"}});m(()=>{if(!h){let{isAtBottom:e}=dr.getState();if(e||A){let r=Q.current?"auto":"smooth";se.current?.scrollIntoView({behavior:r})}Q.current=!1}},[y,A,h]),m(()=>{if(h&&f)Y(f)},[h,Y,f]);let k=G(),Me=P(()=>{k.invalidateQueries({queryKey:["search"]}),k.invalidateQueries({queryKey:["folders"]}),k.invalidateQueries({queryKey:["files"]}),k.invalidateQueries({queryKey:["file"]}),k.invalidateQueries({queryKey:["version_stacks"]}),k.invalidateQueries({queryKey:["projects"]})},[k]),z=(e)=>{if(typeof e==="string")return e;if(Array.isArray(e))return e.map((r)=>{if(typeof r==="string")return r;if(r&&typeof r==="object"&&"type"in r&&r.type==="text"&&"text"in r)return String(r.text);return""}).join("");return""},ae=(e)=>e.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:"),je=(e)=>{switch(e.role){case"user":case"custom":{let r=e;if(e.role==="custom"&&r.customType==="context_display_info"){let c=r.details?.assets||[];if(c.length===0)return null;return o("div",{className:"text-xs text-muted-foreground bg-muted/40 p-2.5 rounded-lg border border-border/50 space-y-1 my-1",children:[t("div",{className:"font-semibold",children:k_()}),t("ul",{className:"list-disc list-inside space-y-0.5",children:c.map((n)=>o("li",{className:"truncate",children:[n.name," ",o("span",{className:"text-muted-foreground/70",children:["(",n.type,")"]})]},n.id))})]},e.id)}if(e.role==="user"||r.customType==="shumai_message"){let s=r.details,c=s?.referencedAssets||[],n=s?.attachedFiles||[],i=s?.position,x=s?.annotation||s?.annotations&&s.annotations.length>0,d=!s?.currentAsset?.id||S&&s.currentAsset.id===S||b?.id&&s.currentAsset.id===b.id,v=ce===e.id,N="";if(i?.type==="time")if(F)N=F(i.seconds);else if(j){let a=Math.round(i.seconds*j);N=In(a,j,Se,J)}else{let a=Math.floor(i.seconds/60),w=Math.floor(i.seconds%60);N=`${a.toString().padStart(2,"0")}:${w.toString().padStart(2,"0")}`}else if(i?.type==="page")N=Fg({page:i.page});let ne=z(r.content),Re=n.length>0||c.length>0;return t("div",{onClick:()=>{if(d&&U)U(e)},className:C("flex flex-col items-end w-full group transition-all duration-150",d&&(x||i)&&"cursor-pointer"),children:o("div",{className:C("bg-primary text-primary-foreground rounded-lg px-3 py-2 text-sm whitespace-pre-wrap shadow-xs break-words transition-all border",Re?"w-full":"max-w-[85%]",v?"border-blue-500 dark:border-blue-400":"border-transparent"),children:[o("div",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:[x&&t("span",{className:"inline-flex items-center align-middle mr-1.5 p-0.5 rounded bg-primary-foreground/20 text-primary-foreground",title:Iy(),children:t(Ei,{className:"w-3.5 h-3.5"})}),i&&t("span",{className:"inline-flex items-center align-middle mr-1.5 px-1.5 py-0.5 rounded text-xs font-mono font-bold bg-primary-foreground/20 text-primary-foreground",children:N}),ne&&t("span",{children:ne})]}),n.length>0&&o("div",{className:"mt-2.5 w-full",children:[t("div",{className:"text-xs font-medium text-primary-foreground/70 mb-1",children:O_()}),t("div",{className:"flex flex-col gap-1.5 w-full",children:n.map((a)=>{let w=a.name||"file",V=Ws(w)||a.mediaType==="image"||a.mimeType?.startsWith("image/");return o("div",{className:C("group/att relative flex items-center w-full max-w-full rounded-lg border border-primary-foreground/15 bg-primary-foreground/10 hover:bg-primary-foreground/15 transition-colors overflow-hidden",V?"h-18 p-1.5 gap-2.5 cursor-pointer":"h-9 px-2.5 gap-2.5"),onClick:(W)=>{if(W.stopPropagation(),a.url)if(V)H({url:a.url,name:w});else window.open(a.url,"_blank","noreferrer")},children:[V&&a.url?t("div",{className:"h-full aspect-square rounded-md overflow-hidden bg-black/20 shrink-0",children:t("img",{src:a.url,alt:w,className:"w-full h-full object-cover group-hover/att:scale-105 transition-transform duration-200"})}):t(ar,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}),t("div",{className:"min-w-0 flex-1 overflow-hidden",children:t("p",{className:"text-xs font-medium text-primary-foreground truncate block w-full",title:w,children:w})}),a.url&&t("a",{href:a.url,target:"_blank",rel:"noreferrer",download:w,className:"p-1 text-primary-foreground/70 hover:text-primary-foreground shrink-0 rounded-md hover:bg-primary-foreground/20 transition-colors opacity-0 group-hover/att:opacity-100",onClick:(W)=>W.stopPropagation(),title:_r(),children:t(wt,{className:"w-3.5 h-3.5"})})]},a.id)})})]}),c.length>0&&o("div",{className:"mt-2.5 w-full",children:[t("div",{className:"text-xs font-medium text-primary-foreground/70 mb-1",children:M_()}),t("div",{className:"flex flex-col gap-1.5 w-full",children:c.map((a)=>o("div",{className:"flex items-center justify-between w-full h-9 px-2.5 rounded-lg border border-primary-foreground/15 bg-primary-foreground/10 hover:bg-primary-foreground/15 transition-colors overflow-hidden",children:[o("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[a.type==="folder"?t(lr,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}):t(ar,{className:"w-4 h-4 text-primary-foreground/70 shrink-0"}),t("span",{className:"text-xs font-medium truncate text-primary-foreground",title:a.name,children:a.name})]}),t("span",{className:"text-[10px] text-primary-foreground/60 uppercase shrink-0 font-mono ml-2",children:a.type})]},a.id))})]})]})},e.id)}let l=r.content||"";return t("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:z(l)},e.id)}case"assistant":{let l=e.content;if(!l)return null;let s=[];if(l.forEach((n,i)=>{if(!n||typeof n!=="object")return;let x=n;switch(x.type){case"text":{let d=x.text;if(typeof d!=="string"||!d.trim())return;s.push(t("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{components:{pre:({node:v,...N})=>t("pre",{className:"whitespace-pre-wrap break-all break-words bg-muted text-foreground p-4 rounded-md border border-border/50 font-mono text-sm",...N})},children:ae(d)})},`txt-${i}`));break}case"thinking":{let d=x.thinking;if(typeof d!=="string"||!d.trim())return;s.push(o("details",{className:"group border border-border/50 rounded-lg bg-muted/20 my-2 overflow-hidden",children:[o("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-medium text-muted-foreground select-none cursor-pointer hover:bg-muted/40 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[t(ie,{className:"h-3.5 w-3.5 text-primary/70 animate-pulse"}),t("span",{children:zp()||"Thinking"}),t(ve,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),t("div",{className:"p-3 pt-0 text-xs text-muted-foreground/90 border-t border-border/40 bg-muted/10 leading-relaxed prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap font-sans",children:t(Io,{children:ae(d)})})]},`think-${i}`));break}case"toolCall":{let d=String(x.name||x.toolName||Sn()),v=x.arguments||x.args;s.push(o("details",{className:"group border border-border/50 rounded-lg bg-violet-500/5 my-2 overflow-hidden",children:[o("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-semibold text-violet-600 dark:text-violet-400 select-none cursor-pointer hover:bg-violet-500/10 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[t(Mo,{className:"h-3.5 w-3.5"}),t("span",{children:Uf()}),t("span",{className:"font-mono bg-violet-500/10 px-1.5 py-0.5 rounded text-[11px] text-violet-700 dark:text-violet-300",children:d}),t(ve,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),!!v&&o("div",{className:"p-3 pt-0 text-[10px] text-muted-foreground/90 border-t border-border/40 bg-violet-500/5 font-sans",children:[t("div",{className:"text-[9px] text-muted-foreground/60 uppercase font-bold tracking-wider mb-1.5",children:rm()||"Arguments"}),t("pre",{className:"font-mono bg-muted/30 p-2 rounded border border-border/30 overflow-x-auto max-h-32",children:JSON.stringify(v,null,2)})]})]},`tool-${i}`));break}case"image":{let d=String(x.mimeType||"image/png"),v=String(x.data||"");s.push(t("div",{className:"my-2 max-w-full",children:v?t("img",{src:v.startsWith("data:")?v:`data:${d};base64,${v}`,alt:"Attached asset",className:"max-h-60 rounded border border-border/50 object-contain shadow-xs"}):t("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:sp()})},`img-${i}`));break}default:{let d=JSON.stringify(n,null,2);if(d==="{}")return;s.push(t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:d},`other-${i}`))}}}),s.length===0)return null;let c=!1;if(l.length>0){let n=l[l.length-1];if(typeof n==="string"&&n.trim().length>0)c=!0;else if(n&&typeof n==="object"){let i=n;if(i.type==="text"&&typeof i.text==="string"&&i.text.trim().length>0)c=!0}}return o("div",{className:"flex flex-col w-full space-y-1",children:[t("div",{className:"space-y-2 w-full",children:s}),c&&t("div",{className:"text-[10px] text-muted-foreground self-start italic pt-1",children:Ky()})]},e.id)}case"toolResult":return t("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/40 p-2 rounded-md border border-border/50",children:t("span",{className:"font-semibold",children:nm({name:e.toolName||"tool"})})},e.id);case"thinking_level_change":{let l=e.content||"";return t("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:z(l)},e.id)}default:return null}};return o("div",{ref:Ce,className:C("relative flex flex-col h-full bg-background transition-colors duration-200 min-h-0"),children:[Ae&&t("div",{className:"absolute inset-0 bg-accent/30 border-2 border-primary z-50 pointer-events-none flex items-center justify-center p-6 text-center animate-in fade-in duration-150",children:o("div",{className:"bg-background/95 text-foreground px-4 py-3 rounded-xl border border-border/80 flex flex-col items-center gap-2 shadow-lg max-w-[80%] animate-in zoom-in-95 duration-150",children:[t(Mt,{className:"h-6 w-6 text-primary animate-bounce"}),t("span",{className:"text-sm font-semibold text-foreground",children:yh()})]})}),o("div",{className:"h-12 border-b border-border flex items-center justify-between px-4 flex-shrink-0 bg-background/50 backdrop-blur-sm",children:[o("div",{className:"flex items-center gap-2",children:[h&&t("button",{onClick:()=>R(!1),className:"p-1 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:K_(),children:t(xu,{className:"h-4 w-4"})}),t(Mt,{className:"h-5 w-5 text-primary"}),t("span",{className:"font-semibold text-sm",children:h?rg():fT()})]}),t("div",{className:"flex items-center gap-1",children:!h?o(L,{children:[t("button",{onClick:ee,className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:wg(),children:t(pe,{className:"h-4 w-4"})}),t("button",{onClick:()=>R(!0),className:"p-1.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",title:rg(),children:t(On,{className:"h-4 w-4"})})]}):o("button",{onClick:()=>{ee(),R(!1)},className:"flex items-center gap-1 text-xs bg-primary text-primary-foreground px-2.5 py-1 rounded-md hover:bg-primary/90 transition-colors shadow-xs cursor-pointer",children:[t(pe,{className:"h-3.5 w-3.5"}),t("span",{children:wg()})]})})]}),h?t(le,{className:"flex-1 p-3",children:X.length===0?t("div",{className:"text-center text-xs text-muted-foreground py-8",children:zS()}):t("div",{className:"space-y-1",children:X.map((e)=>{let r=e.id===ue;return o("div",{onClick:()=>{if(f)xe(f,e.id),R(!1)},className:C("group flex items-center justify-between p-2.5 rounded-lg text-xs cursor-pointer transition-all border border-transparent",r?"bg-accent/80 text-accent-foreground font-medium border-border/40":"hover:bg-muted/60 text-muted-foreground hover:text-foreground"),children:[o("div",{className:"flex flex-col min-w-0 pr-2",children:[t("span",{className:"truncate text-foreground font-medium text-xs",children:e.name||om()}),t("span",{className:"text-[10px] text-muted-foreground",children:Fr(e.updatedAt)})]}),t("button",{onClick:(l)=>{if(l.stopPropagation(),f&&window.confirm(wb()))he(f,e.id)},className:"opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-destructive p-1 rounded hover:bg-muted cursor-pointer",title:vb(),children:t(we,{className:"h-4 w-4"})})]},e.id)})})}):o(L,{children:[t(le,{ref:B,className:"flex-1 p-4 min-h-0 [&>div>div]:!block",children:y.length===0?o("div",{className:"flex flex-col items-center justify-center h-48 border-2 border-dashed border-border rounded-lg text-muted-foreground p-4 text-center",children:[t(Mt,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),t("p",{className:"text-sm",children:yh()})]}):o("div",{className:"space-y-4 pb-4",children:[y.map(je),A&&y.length>0&&(y[y.length-1].role==="user"||y[y.length-1].customType==="shumai_message")&&o("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground italic",children:[t(O,{className:"h-3 w-3 animate-spin text-primary"}),t("span",{children:I1()})]}),t("div",{ref:se})]})}),t("div",{className:"p-2 flex-shrink-0 bg-background",children:t(Ys,{projectId:p,value:ke,onChangeText:_e,placeholder:tM(),disabled:!M||!f,isStreaming:A,onAbort:()=>{if(f)ye(f)},allowMentions:!1,allowAttachments:!0,workspaceAssets:fe,onRemoveWorkspaceAsset:ge,allowMarkup:!0,canMarkup:!!b&&["image","video","pdf"].includes(b.proxyType||""),markupDisabledTooltip:!b?uE():up(),allowTimestamp:b?.proxyType==="video"||b?.proxyType==="pdf",currentTime:de,frameRate:j||b?.media?.metadata?.frameRate||30,startTimecode:J||b?.media?.metadata?.startTimecode,formatTimestamp:F||(b?.proxyType==="pdf"?(e)=>Fg({page:Math.round(e)}):void 0),onTyping:me,onSendMessage:(e,r,l,s,c,n)=>{if(!f)return;be(f,e,p,S,Me,r,l,c,n)},bottomLeftExtra:t("div",{className:"flex items-center gap-1.5 min-w-0 max-w-full",children:T.length>0?o(Fe,{value:M||"",onValueChange:(e)=>q(e),disabled:A,children:[t(Ze,{className:"h-8 border-none bg-transparent hover:bg-muted text-muted-foreground hover:text-foreground focus:ring-0 focus:ring-offset-0 px-2 py-0 gap-1.5 text-xs shrink-0 select-none shadow-none max-w-full cursor-pointer",children:t(Le,{placeholder:Gd()})}),t(Be,{children:T.map((e)=>t(oe,{value:e.id,className:"cursor-pointer",children:o("div",{className:"flex items-center gap-2",children:[e.avatar?t("img",{src:e.avatar,alt:e.name,className:"w-4 h-4 rounded-full object-cover"}):t(Mt,{className:"w-4 h-4 text-muted-foreground"}),t("span",{className:"text-xs",children:e.name})]})},e.id))})]}):t("div",{className:"flex items-center gap-1.5 px-2 py-1 text-[11px] text-muted-foreground/60 italic select-none",children:t("span",{children:OS()})})})})})]}),D&&o("div",{className:"fixed inset-0 z-[100] bg-black/95 flex flex-col items-center justify-center p-4 animate-in fade-in duration-200",onClick:()=>H(null),children:[t("button",{className:"absolute top-4 right-4 text-white/70 hover:text-white hover:bg-white/20 rounded-full p-2 transition-colors z-50 cursor-pointer",children:t(Ne,{className:"w-8 h-8"})}),t("div",{className:"w-full h-full flex items-center justify-center p-2",children:t("img",{src:D.url,alt:D.name,className:"max-w-full max-h-[85vh] object-contain rounded shadow-2xl cursor-zoom-out",onClick:(e)=>{e.stopPropagation(),H(null)}})}),t("div",{className:"absolute bottom-6 text-white text-sm font-medium bg-black/50 px-4 py-2 rounded-full backdrop-blur-sm",children:D.name})]})]})}
|
|
2
|
-
export{Mi};
|
package/bin/chunk-kjjw8mbg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m,N,u,E,L,t,o,pt,Pe,ze,g,O,ta,Gn,io,Ce,Ie,Te,p_,my,Hf,Qc,FS,Sn,gt,Nt,Sr,Gt,Tt,bm}from"./chunk-p1d500sf.js";import{Mr}from"./chunk-5aqthcm6.js";import{tr}from"./chunk-qd7pvaxb.js";import{hn,gn,An,fr,Ye,Qe}from"./chunk-g78vapcm.js";E();var j=(a)=>{if(!a)return"??";return a.split(" ").map((r)=>r[0]).slice(0,2).join("").toUpperCase()};function C(){let{projectId:a}=F.useParams(),{teamId:r,ensureTeamIdForProject:n}=gt(),h=Pe();m(()=>{n(a)},[a,n]);let{data:i}=tr(bm(a)),d=i?.rootFolder,[y,w]=u(240),{fileListLeftSidebarCollapsed:c,setFileListLeftSidebarCollapsed:I}=Gt(),{data:f,isLoading:k,fetchNextPage:p,hasNextPage:b,isFetchingNextPage:l}=pt({queryKey:["collections",a],queryFn:async({pageParam:e})=>{let s=await g.api.projects[":projectId"].collections.$get({param:{projectId:a},query:{first:"20",after:e}});if(!s.ok)throw Error("Failed to fetch collections");return await s.json()},initialPageParam:"",getNextPageParam:(e)=>e.pageInfo?.cursor||void 0,enabled:!!a}),{ref:T,inView:x}=Nt();m(()=>{if(x&&b&&!l)p()},[x,b,l,p]);let v=N(()=>f?.pages.flatMap((e)=>e.data)||[],[f]);if(!r||!d||!i)return t(Tt,{});return t("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:o("div",{className:"flex flex-1 overflow-hidden relative",children:[!c&&t("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>I(!0)}),!c&&o(L,{children:[t("div",{className:"bg-background",style:{width:y},children:t(Sr,{teamId:r,projectId:a,projectName:i.name??"",rootFolderId:d})}),t(Mr,{onResize:(e)=>{w((s)=>Math.max(180,Math.min(400,s+e)))},className:"hidden md:block"})]}),o("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[t("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:o("div",{className:"flex items-center gap-2",children:[t(ta,{className:"h-5 w-5 text-primary"}),t("h1",{className:"font-bold text-lg text-foreground",children:p_()})]})}),t("div",{className:"flex-1 overflow-y-auto p-6",children:k?t("div",{className:"flex justify-center items-center h-64",children:t("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):v.length===0?o("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[t(io,{className:"h-10 w-10 text-muted-foreground/50"}),t("p",{children:FS()})]}):o("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[o(hn,{children:[t(gn,{children:o(fr,{className:"hover:bg-transparent bg-muted/20",children:[t(Ye,{className:"font-semibold px-4 py-3",children:my()}),t(Ye,{className:"font-semibold px-4 py-3",children:Qc()}),t(Ye,{className:"font-semibold px-4 py-3 w-[200px]",children:Hf()})]})}),t(An,{children:v.map((e)=>o(fr,{className:"hover:bg-muted/10 transition-colors cursor-pointer",onClick:()=>h({to:"/projects/$projectId/collections/$collectionId",params:{projectId:a,collectionId:e.id}}),children:[t(Qe,{className:"font-medium px-4 py-3.5",children:o("div",{className:"flex items-center gap-2",children:[t(ta,{className:"h-4 w-4 text-primary shrink-0"}),t("span",{className:"text-foreground font-semibold hover:underline",children:e.name})]})}),t(Qe,{className:"px-4 py-3.5",children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{className:"h-6 w-6",children:[e.creator?.image&&t(Ie,{src:e.creator.image,alt:e.creator.name,className:"object-cover"}),t(Te,{className:"text-[10px]",children:j(e.creator?.name)})]}),t("span",{className:"text-sm font-medium text-foreground truncate max-w-[200px]",children:e.creator?.name||Sn()})]})}),t(Qe,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:o("div",{className:"flex items-center gap-2",children:[t(Gn,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),t("span",{children:new Date(e.createdAt).toLocaleDateString()})]})})]},e.id))})]}),t("div",{ref:T,className:"h-10 w-full flex items-center justify-center",children:l&&t(O,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var F=ze("/projects/$projectId/collections/")({component:C});export{F as Route};
|
package/bin/chunk-mey80kv9.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qe}from"./chunk-t6cn018t.js";var cs={};qe(cs,{bigint:()=>_a,boolean:()=>Ec,date:()=>ga,number:()=>Pm,string:()=>Rm});function Fe(t){let o=Object.values(t).filter((c)=>typeof c==="number");return Object.entries(t).filter(([c,u])=>o.indexOf(+c)===-1).map(([c,u])=>u)}function ft(t,o="|"){return t.map((n)=>ht(n)).join(o)}function we(t,o){if(typeof o==="bigint")return o.toString();return o}function ke(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw Error("cached value already set")}}}function eo(t){return t===null||t===void 0}function Ue(t){let o=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(o,n)}function to(t,o){let n=t/o,c=Math.round(n),u=4*Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-c)<u)return 0;return n-c}var Qr=Symbol("evaluating");function ro(t,o,n){let c=void 0;Object.defineProperty(t,o,{get(){if(c===Qr)return;if(c===void 0)c=Qr,c=n();return c},set(u){Object.defineProperty(t,o,{value:u})},configurable:!0})}function L(t,o,n){Object.defineProperty(t,o,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ae(...t){let o={};for(let n of t){let c=Object.getOwnPropertyDescriptors(n);Object.assign(o,c)}return Object.defineProperties({},o)}function oo(t){return JSON.stringify(t)}function no(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function ge(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var io=ke(()=>{if(B.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(t){return!1}});function me(t){if(ge(t)===!1)return!1;let o=t.constructor;if(o===void 0)return!0;if(typeof o!=="function")return!0;let n=o.prototype;if(ge(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function mt(t){if(me(t))return{...t};if(Array.isArray(t))return[...t];if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);return t}var so=new Set(["string","number","symbol"]);function le(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(t,o,n){let c=new t._zod.constr(o??t._zod.def);if(!o||n?.parent)c._zod.parent=t;return c}function P(t){let o=t;if(!o)return{};if(typeof o==="string")return{error:()=>o};if(o?.message!==void 0){if(o?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");o.error=o.message}if(delete o.message,typeof o.error==="string")return{...o,error:()=>o.error};return o}function ht(t){if(typeof t==="bigint")return t.toString()+"n";if(typeof t==="string")return`"${t}"`;return`${t}`}function co(t){return Object.keys(t).filter((o)=>t[o]._zod.optin!==void 0&&t[o]._zod.optout==="optional")}var uo=(()=>({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]}))();function Zc(t,o){let n=t._zod.def,c=n.checks;if(c&&c.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let p=ae(t._zod.def,{get shape(){let f={};for(let m of Reflect.ownKeys(o)){if(!Object.prototype.hasOwnProperty.call(n.shape,m))throw Error(`Unrecognized key: "${String(m)}"`);if(!o[m])continue;L(f,m,n.shape[m])}return L(this,"shape",f),f},checks:[]});return Y(t,p)}function Pc(t,o){let n=t._zod.def,c=n.checks;if(c&&c.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let p=ae(t._zod.def,{get shape(){let f={...t._zod.def.shape};for(let m of Reflect.ownKeys(o)){if(!Object.prototype.hasOwnProperty.call(n.shape,m))throw Error(`Unrecognized key: "${String(m)}"`);if(!o[m])continue;delete f[m]}return L(this,"shape",f),f},checks:[]});return Y(t,p)}function Oc(t,o){if(!me(o))throw Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let p=t._zod.def.shape;for(let f of Reflect.ownKeys(o))if(Object.getOwnPropertyDescriptor(p,f)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=ae(t._zod.def,{get shape(){let p={...t._zod.def.shape,...o};return L(this,"shape",p),p}});return Y(t,u)}function Ic(t,o){if(!me(o))throw Error("Invalid input to safeExtend: expected a plain object");let n=ae(t._zod.def,{get shape(){let c={...t._zod.def.shape,...o};return L(this,"shape",c),c}});return Y(t,n)}function Tc(t,o){if(!o?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ae(t._zod.def,{get shape(){let c={...t._zod.def.shape,...o._zod.def.shape};return L(this,"shape",c),c},get catchall(){return o._zod.def.catchall},checks:o._zod.def.checks??[]});return Y(t,n)}function ao(t,o,n,c="partial"){let p=o._zod.def.checks;if(p&&p.length>0)throw Error(`.${c}() cannot be used on object schemas containing refinements`);let m=ae(o._zod.def,{get shape(){let _=o._zod.def.shape,g={..._};if(n)for(let b of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(_,b))throw Error(`Unrecognized key: "${String(b)}"`);if(!n[b])continue;g[b]=t?new t({type:"optional",innerType:_[b]}):_[b]}else for(let b of Reflect.ownKeys(_))g[b]=t?new t({type:"optional",innerType:_[b]}):_[b];return L(this,"shape",g),g},checks:[]});return Y(o,m)}function Ac(t,o,n){let c=ae(o._zod.def,{get shape(){let u=o._zod.def.shape,p={...u};if(n)for(let f of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(p,f))throw Error(`Unrecognized key: "${String(f)}"`);if(!n[f])continue;p[f]=new t({type:"nonoptional",innerType:u[f]})}else for(let f of Reflect.ownKeys(u))p[f]=new t({type:"nonoptional",innerType:u[f]});return L(this,"shape",p),p}});return Y(o,c)}function he(t,o=0){if(t.aborted===!0)return!0;for(let n=o;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function lo(t,o=0){if(t.aborted===!0)return!0;for(let n=o;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function Q(t,o){return o.map((n)=>{var c;return(c=n).path??(c.path=[]),n.path.unshift(t),n})}function $e(t){return typeof t==="string"?t:t?.message}function _t(t,o,n){var c;for(let u=o;u<t.length;u++)(c=t[u]).schema??(c.schema=n)}function oe(t,o,n){var c;let u=t.inst?._zod?.traits;if(u?.has("$ZodType"))if(u.has("$ZodCheck"))(c=t).schema??(c.schema=t.inst);else t.schema=t.inst;let p=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,f=t.message?t.message:$e(t.inst?._zod.def?.error?.(t))??$e(p?.(t))??$e(o?.error?.(t))??$e(n.customError?.(t))??$e(n.localeError?.(t))??"Invalid input",{inst:m,schema:_,continue:g,input:b,...v}=t;if(v.path??(v.path=[]),v.message=f,o?.reportInput)v.input=b;return v}var Nc=/[\uD800-\uDBFF]/;function Me(t){let o=t.length;if(!Nc.test(t))return o;let n=o;for(let c=0;c<o-1;c++)if((t.charCodeAt(c)&64512)===55296&&(t.charCodeAt(c+1)&64512)===56320)n--,c++;return n}function Je(t){if(Array.isArray(t))return"array";if(typeof t==="string")return"string";return"unknown"}function po(t){let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return o}function _e(...t){let[o,n,c]=t;if(typeof o==="string")return{message:o,code:"custom",input:n,inst:c};return{...o}}function fo(t,o){for(let n in o){let c=Object.getOwnPropertyDescriptor(o,n);if(c.get)Object.defineProperty(t,n,{...c,enumerable:!1});else Cc(t,n,c.value)}}function de(t,o,n,c=!0){return Object.defineProperty(t,o,{configurable:!0,writable:!0,enumerable:c,value:n}),n}function gt(t,o,n){return de(t,o,n,!1)}function Cc(t,o,n){Object.defineProperty(t,o,{configurable:!0,get(){return this==null?n:de(this,o,n.bind(this))},set(c){de(this,o,c)}})}function jc(t,o){let n=Object.getPrototypeOf(t);return o in n?void 0:n}var pt,ue=!1,Rc={configurable:!0,get(){ue=!0;return}};function I(t,o,n){let c=Object.getPrototypeOf(t._zod);if(o in c&&pt!==t._zod){pt=void 0;return}pt=t._zod,Object.defineProperty(c,o,{configurable:!0,get(){Object.defineProperty(this,o,Rc);let u=ue;ue=!1;try{let p=n(this);if(ue)delete this[o];else Object.defineProperty(this,o,{configurable:!0,writable:!0,value:p});return ue=ue||u,p}catch(p){throw delete this[o],ue=ue||u,p}},set(u){Object.defineProperty(this,o,{configurable:!0,writable:!0,value:u})}})}function Dc(t,o,n,c){let u=jc(t,o);if(!u)return;Object.defineProperty(u,o,{configurable:!0,get(){let p={configurable:!0,writable:!0,enumerable:c,value:void 0};return Object.defineProperty(this,o,p),p.value=n(this),Object.defineProperty(this,o,p),p.value},set(p){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:c,value:p})}})}var Lc="~constantCatch";function mo(t){let o=()=>t;return o[Lc]=!0,o}var ho,jr=Object.freeze({status:"aborted"}),xt={value:void 0,enumerable:!1},go="captureStackTrace"in Error?Error:null;function Fc(t){let o=go;if(o){let n=o.stackTraceLimit;if(typeof n==="number"){try{o.stackTraceLimit=0}catch{return go=null,new t}try{return new t}finally{o.stackTraceLimit=n}}}return new t}function z(t,o,n,c){let u={};function p(w){this.def=w,this.constr=v,this.traits=new Set}p.prototype=u;let f=n,m=f&&new WeakSet;function _(w,k){if(!w._zod){xt.value=new p(k);try{Object.defineProperty(w,"_zod",xt)}finally{xt.value=void 0}}if(w._zod.traits.has(t))return;if(w._zod.traits.add(t),o(w,k),m){let S=Object.getPrototypeOf(w),O=w._zod.constr.prototype,J=S;while(J&&J!==O)J=Object.getPrototypeOf(J);let q=J??S;if(!m.has(q))m.add(q),fo(q,f)}let Z=v.prototype;for(let S in Z){if(!Object.prototype.hasOwnProperty.call(Z,S))continue;if(!(S in w))w[S]=Z[S].bind(w)}}let g=c?.Parent??Object;class b extends g{}Object.defineProperty(b,"name",{value:t});function v(w){let k=c?.Parent?Fc(b):this;_(k,w);let Z=k._zod.deferred;if(Z){for(let O of Z)O();k._zod.deferred=void 0}let S=globalThis.__zod_globalConfig?.postProcessor;if(S)S(k);return k}return Object.defineProperty(v,"init",{value:_}),Object.defineProperty(v,Symbol.hasInstance,{value:(w)=>{if(c?.Parent&&w instanceof c.Parent)return!0;return w?._zod?.traits?.has(t)}}),Object.defineProperty(v,"name",{value:t}),v}class ne extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ze extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`);this.name="ZodEncodeError"}}(ho=globalThis).__zod_globalConfig??(ho.__zod_globalConfig={});var B=globalThis.__zod_globalConfig;function W(t){if(t)Object.assign(B,t);return B}function Uc(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,we,2)),t.message}function Mc(t){this._zod.message=t}var Jc={get:Uc,set:Mc,enumerable:!0,configurable:!0},bt={value:void 0,enumerable:!1},zt={value:void 0,enumerable:!1},xo=new WeakSet([Object.prototype,Error.prototype]),yo=(t,o)=>{t.name="$ZodError",bt.value=t._zod,Object.defineProperty(t,"_zod",bt),zt.value=o,Object.defineProperty(t,"issues",zt),bt.value=void 0,zt.value=void 0,Object.defineProperty(t,"message",Jc);let n=Object.getPrototypeOf(t);if(!xo.has(n))xo.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let c=()=>this.message;return Object.defineProperty(this,"toString",{value:c,configurable:!0,writable:!0}),c},set(c){Object.defineProperty(this,"toString",{value:c,configurable:!0,writable:!0})}})},ii=z("$ZodError",yo),vt=z("$ZodError",yo,void 0,{Parent:Error});function Bc(t,o,n){if(!Object.prototype.hasOwnProperty.call(t,o))if(o==="__proto__")Object.defineProperty(t,o,{value:n(),writable:!0,enumerable:!0,configurable:!0});else t[o]=n();return t[o]}function $t(t,o=(n)=>n.message){let n={},c=[];for(let u of t.issues)if(u.path.length>0)Bc(n,u.path[0],()=>[]).push(o(u));else c.push(o(u));return{formErrors:c,fieldErrors:n}}function wt(t,o=(n)=>n.message){let n={_errors:[]},c=(u,p=[])=>{for(let f of u.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map((m)=>c({issues:m},[...p,...f.path]));else if(f.code==="invalid_key")c({issues:f.issues},[...p,...f.path]);else if(f.code==="invalid_element")c({issues:f.issues},[...p,...f.path]);else{let m=[...p,...f.path];if(m.length===0)n._errors.push(o(f));else{let _=n,g=0;while(g<m.length){let b=m[g],v=g===m.length-1;if(b==="_errors"){if(v)_._errors.push(o(f));g++;continue}if(!Object.prototype.hasOwnProperty.call(_,b))Object.defineProperty(_,b,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let w=_[b];if(v)w._errors.push(o(f));_=w,g++}}}};return c(t),n}function Vc(t){let o=[],n=t.map((c)=>typeof c==="object"?c.key:c);for(let c of n)if(typeof c==="number")o.push(`[${c}]`);else if(typeof c==="symbol")o.push(`[${JSON.stringify(String(c))}]`);else if(/[^\w$]/.test(c))o.push(`[${JSON.stringify(c)}]`);else{if(o.length)o.push(".");o.push(c)}return o.join("")}function vf(t){let o=[],n=[...t.issues].sort((c,u)=>(c.path??[]).length-(u.path??[]).length);for(let c of n)if(o.push(`\u2716 ${c.message}`),c.path?.length)o.push(` \u2192 at ${Vc(c.path)}`);return o.join(`
|
|
3
|
-
`)}function Be(t,o){return{callee:o?.callee??t,Err:o?.Err}}var Ve=(t)=>{let o=(n,c,u,p)=>{let f=u?{...u,async:!1}:{async:!1},m=n._zod.run({value:c,issues:[]},f);if(m instanceof Promise)throw new ne;if(m.issues.length){let _=new(p?.Err??t)(m.issues.map((g)=>oe(g,f,W())));throw dt(_,p?.callee??o),_}return m.value};return o};var Ke=(t)=>{let o=async(n,c,u,p)=>{let f=u?{...u,async:!0}:{async:!0},m=n._zod.run({value:c,issues:[]},f);if(m instanceof Promise)m=await m;if(m.issues.length){let _=new(p?.Err??t)(m.issues.map((g)=>oe(g,f,W())));throw dt(_,p?.callee??o),_}return m.value};return o};var Pe=(t)=>(o,n,c)=>{let u=c?{...c,async:!1}:{async:!1},p=o._zod.run({value:n,issues:[]},u);if(p instanceof Promise)throw new ne;return p.issues.length?{success:!1,error:new(t??ii)(p.issues.map((f)=>oe(f,u,W())))}:{success:!0,data:p.value}},bo=Pe(vt),Oe=(t)=>async(o,n,c)=>{let u=c?{...c,async:!0}:{async:!0},p=o._zod.run({value:n,issues:[]},u);if(p instanceof Promise)p=await p;return p.issues.length?{success:!1,error:new t(p.issues.map((f)=>oe(f,u,W())))}:{success:!0,data:p.value}},zo=Oe(vt);var vo=(t)=>{let o=Ve(t),n=(c,u,p,f)=>{let m=p?{...p,direction:"backward"}:{direction:"backward"};return o(c,u,m,Be(n,f))};return n};var $o=(t)=>{let o=Ve(t),n=(c,u,p,f)=>o(c,u,p,Be(n,f));return n};var wo=(t)=>{let o=Ke(t),n=async(c,u,p,f)=>{let m=p?{...p,direction:"backward"}:{direction:"backward"};return await o(c,u,m,Be(n,f))};return n};var ko=(t)=>{let o=Ke(t),n=async(c,u,p,f)=>await o(c,u,p,Be(n,f));return n};var Zo=(t)=>(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Pe(t)(o,n,u)};var Po=(t)=>(o,n,c)=>Pe(t)(o,n,c);var So=(t)=>async(o,n,c)=>{let u=c?{...c,direction:"backward"}:{direction:"backward"};return Oe(t)(o,n,u)};var Oo=(t)=>async(o,n,c)=>Oe(t)(o,n,c);var Io=/^[cC][0-9a-z]{6,}$/,Eo=/^[0-9a-z]+$/,To=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,No=/^[0-9a-vA-V]{20}$/,Co=/^[A-Za-z0-9]{27}$/,jo=/^[a-zA-Z0-9_-]{21}$/;function Ro(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}var Do=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Lo=/^([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})$/,Zt=(t)=>{if(!t)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}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var Fo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var Wc="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Uo(){return new RegExp(Wc,"u")}var Mo=/^(?:(?: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])$/,Jo=/^(([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}|:))$/;var Bo=/^((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])$/,Vo=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ko=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Pt=/^[A-Za-z0-9_-]*$/;var Wo=/^https?$/,Go=/^\+[1-9]\d{6,14}$/;var qo="(?:(?:\\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])))";function Gc(t){return new RegExp(`^${t}$`)}var Yo=Gc(qo);function kt(t){return typeof t.precision==="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.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{${t.precision}}`:t.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Xo(t){return new RegExp(`^${kt(t)}$`)}function Ho(t){let o=["Z"];if(t.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${kt({precision:t.precision,seconds:!0})}(?:${o.join("|")})`,c=t.local?`${n}|${kt({precision:t.precision})}`:n;return new RegExp(`^${qo}T(?:${c})$`)}var Qo=(t)=>{let o=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${o}$`)},en=/^-?\d+n?$/,We=/^-?\d+$/,Ie=/^-?\d+(?:\.\d+)?$/,tn=/^(?:true|false)$/i,rn=/^null$/i;var on=/^[^A-Z]*$/,nn=/^[^a-z]*$/;var M=z("$ZodCheck",(t,o)=>{var n;t._zod??(t._zod={}),t._zod.def=o,(n=t._zod).onattach??(n.onattach=[])});var Ot=(t)=>{let o=t.value;return!eo(o)&&o.length!==void 0},Ge={number:"number",bigint:"bigint",object:"date"},It=z("$ZodCheckLessThan",(t,o)=>{M.init(t,o);let n=Ge[typeof o.value];t._zod.onattach.push((c)=>{let u=c._zod.bag,p=(o.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(o.value<p)if(o.inclusive)u.maximum=o.value;else u.exclusiveMaximum=o.value}),t._zod.check=(c)=>{if(o.inclusive?c.value<=o.value:c.value<o.value)return;c.issues.push({origin:Ge[typeof c.value]??n,code:"too_big",maximum:typeof o.value==="object"?o.value.getTime():o.value,input:c.value,inclusive:o.inclusive,inst:t,continue:!o.abort})}}),Et=z("$ZodCheckGreaterThan",(t,o)=>{M.init(t,o);let n=Ge[typeof o.value];t._zod.onattach.push((c)=>{let u=c._zod.bag,p=(o.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(o.value>p)if(o.inclusive)u.minimum=o.value;else u.exclusiveMinimum=o.value}),t._zod.check=(c)=>{if(o.inclusive?c.value>=o.value:c.value>o.value)return;c.issues.push({origin:Ge[typeof c.value]??n,code:"too_small",minimum:typeof o.value==="object"?o.value.getTime():o.value,input:c.value,inclusive:o.inclusive,inst:t,continue:!o.abort})}}),sn=z("$ZodCheckMultipleOf",(t,o)=>{M.init(t,o),t._zod.onattach.push((n)=>{var c;(c=n._zod.bag).multipleOf??(c.multipleOf=o.value)}),t._zod.check=(n)=>{if(typeof n.value!==typeof o.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?o.value!==BigInt(0)&&n.value%o.value===BigInt(0):to(n.value,o.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:o.value,input:n.value,inst:t,continue:!o.abort})}}),cn=z("$ZodCheckNumberFormat",(t,o)=>{M.init(t,o),o.format=o.format||"float64";let n=o.format?.includes("int"),c=n?"int":"number",[u,p]=uo[o.format];t._zod.onattach.push((f)=>{let m=f._zod.bag;if(m.format=o.format,m.minimum=u,m.maximum=p,n)m.pattern=We}),t._zod.check=(f)=>{let m=f.value;if(n){if(!Number.isInteger(m)){f.issues.push({expected:c,format:o.format,code:"invalid_type",continue:!1,input:m,inst:t});return}if(!Number.isSafeInteger(m)){if(m>0)f.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:c,inclusive:!0,continue:!o.abort});else f.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:c,inclusive:!0,continue:!o.abort});return}}if(m<u)f.issues.push({origin:"number",input:m,code:"too_small",minimum:u,inclusive:!0,inst:t,continue:!o.abort});if(m>p)f.issues.push({origin:"number",input:m,code:"too_big",maximum:p,inclusive:!0,inst:t,continue:!o.abort})}});var un=z("$ZodCheckMaxLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag.maximum??Number.POSITIVE_INFINITY;if(o.maximum<u)c._zod.bag.maximum=o.maximum}),t._zod.check=(c)=>{let u=c.value,p=u.length;if((typeof u==="string"&&p>o.maximum?Me(u):p)<=o.maximum)return;let m=Je(u);c.issues.push({origin:m,code:"too_big",maximum:o.maximum,inclusive:!0,input:u,inst:t,continue:!o.abort})}}),an=z("$ZodCheckMinLength",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(o.minimum>u)c._zod.bag.minimum=o.minimum}),t._zod.check=(c)=>{let u=c.value,p=u.length;if((typeof u==="string"&&p>=o.minimum&&p<o.minimum*2?Me(u):p)>=o.minimum)return;let m=Je(u);c.issues.push({origin:m,code:"too_small",minimum:o.minimum,inclusive:!0,input:u,inst:t,continue:!o.abort})}}),ln=z("$ZodCheckLengthEquals",(t,o)=>{var n;M.init(t,o),(n=t._zod.def).when??(n.when=Ot),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.minimum=o.length,u.maximum=o.length,u.length=o.length}),t._zod.check=(c)=>{let u=c.value,p=u.length,f=typeof u==="string"&&p>=o.length&&p<=o.length*2?Me(u):p;if(f===o.length)return;let m=Je(u),_=f>o.length;c.issues.push({origin:m,..._?{code:"too_big",maximum:o.length}:{code:"too_small",minimum:o.length},inclusive:!0,exact:!0,input:c.value,inst:t,continue:!o.abort})}}),Ee=z("$ZodCheckStringFormat",(t,o)=>{var n,c;if(M.init(t,o),t._zod.onattach.push((u)=>{let p=u._zod.bag;if(p.format=o.format,o.pattern)p.patterns??(p.patterns=new Set),p.patterns.add(o.pattern)}),o.pattern)(n=t._zod).check??(n.check=(u)=>{if(o.pattern.lastIndex=0,o.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:o.format,input:u.value,...o.pattern?{pattern:o.pattern.toString()}:{},inst:t,continue:!o.abort})});else(c=t._zod).check??(c.check=()=>{})}),pn=z("$ZodCheckRegex",(t,o)=>{Ee.init(t,o),t._zod.check=(n)=>{if(o.pattern.lastIndex=0,o.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:o.pattern.toString(),inst:t,continue:!o.abort})}}),fn=z("$ZodCheckLowerCase",(t,o)=>{o.pattern??(o.pattern=on),Ee.init(t,o)}),dn=z("$ZodCheckUpperCase",(t,o)=>{o.pattern??(o.pattern=nn),Ee.init(t,o)}),mn=z("$ZodCheckIncludes",(t,o)=>{M.init(t,o);let n=le(o.includes),c=new RegExp(typeof o.position==="number"?`^.{${o.position},}${n}`:n);o.pattern=c,t._zod.onattach.push((u)=>{let p=u._zod.bag;p.patterns??(p.patterns=new Set),p.patterns.add(c)}),t._zod.check=(u)=>{if(u.value.includes(o.includes,o.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:o.includes,input:u.value,inst:t,continue:!o.abort})}}),hn=z("$ZodCheckStartsWith",(t,o)=>{M.init(t,o);let n=new RegExp(`^${le(o.prefix)}.*`);o.pattern??(o.pattern=n),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(n)}),t._zod.check=(c)=>{if(c.value.startsWith(o.prefix))return;c.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:o.prefix,input:c.value,inst:t,continue:!o.abort})}}),_n=z("$ZodCheckEndsWith",(t,o)=>{M.init(t,o);let n=new RegExp(`.*${le(o.suffix)}$`);o.pattern??(o.pattern=n),t._zod.onattach.push((c)=>{let u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(n)}),t._zod.check=(c)=>{if(c.value.endsWith(o.suffix))return;c.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:o.suffix,input:c.value,inst:t,continue:!o.abort})}});var gn=z("$ZodCheckOverwrite",(t,o)=>{M.init(t,o),t._zod.check=(n)=>{n.value=o.tx(n.value)}});class Tt{constructor(t=[],o={}){this.content=[],this.indent=0,this.args=t,this.closed=o}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t==="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
4
|
-
`).filter((p)=>p),c=Math.min(...n.map((p)=>p.length-p.trimStart().length)),u=n.map((p)=>p.slice(c)).map((p)=>" ".repeat(this.indent*2)+p);for(let p of u)this.content.push(p)}compile(){let t=Function,o=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
5
|
-
${o.join(`
|
|
6
|
-
`)}
|
|
7
|
-
};`)(...Object.values(this.closed))}}var yn={major:4,minor:5,patch:4};var E=z("$ZodType",(t,o)=>{var n;t??(t={}),t._zod.def=o,t._zod.bag=t._zod.bag||{},t._zod.version=yn;let c=t._zod.def.checks,u=t._zod.traits.has("$ZodCheck")?[t,...c??[]]:c?.length?[...c]:[];for(let p of u)for(let f of p._zod.onattach)f(t);if(u.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let p=(m,_,g)=>{if(m.memo)return m;let b=he(m),v;for(let w of _){if(w._zod.def.when){if(lo(m))continue;if(!w._zod.def.when(m))continue}else if(b)continue;let k=m.issues.length,Z=w._zod.check(m);if(Z instanceof Promise&&g?.async===!1)throw new ne;if(v||Z instanceof Promise)v=(v??Promise.resolve()).then(async()=>{if(await Z,m.issues.length===k)return;if(_t(m.issues,k,t),!b)b=he(m,k)});else{if(m.issues.length===k)continue;if(_t(m.issues,k,t),!b)b=he(m,k)}}if(v)return v.then(()=>m);return m},f=(m,_,g)=>{if(he(m))return m.aborted=!0,m;let b=p(_,u,g);if(b instanceof Promise){if(g.async===!1)throw new ne;return b.then((v)=>t._zod.parse(v,g))}return t._zod.parse(b,g)};t._zod.run=(m,_)=>{if(_.skipChecks)return t._zod.parse(m,_);if(_.direction==="backward"){let b=t._zod.parse({value:m.value,issues:[]},{..._,skipChecks:!0});if(b instanceof Promise)return b.then((v)=>f(v,m,_));return f(b,m,_)}let g=t._zod.parse(m,_);if(g instanceof Promise){if(_.async===!1)throw new ne;return g.then((b)=>p(b,u,_))}return p(g,u,_)}}},{get "~standard"(){return gt(this,"~standard",jt(this))},set "~standard"(t){de(this,"~standard",t)}}),bn=(t)=>t.success?{value:t.data}:{issues:t.error?.issues};function jt(t){return{validate:(o)=>{try{return bn(bo(t,o))}catch(n){return zo(t,o).then(bn)}},vendor:"zod",version:1}}var He=z("$ZodString",(t,o)=>{E.init(t,o),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qo(t._zod.bag),t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=String(n.value)}catch(u){}if(typeof n.value==="string")return n;return n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),j=z("$ZodStringFormat",(t,o)=>{Ee.init(t,o),He.init(t,o)}),An=z("$ZodGUID",(t,o)=>{o.pattern??(o.pattern=Lo),j.init(t,o)}),Nn=z("$ZodUUID",(t,o)=>{if(o.version){let c={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[o.version];if(c===void 0)throw Error(`Invalid UUID version: "${o.version}"`);o.pattern??(o.pattern=Zt(c))}else o.pattern??(o.pattern=Zt());j.init(t,o)}),Cn=z("$ZodEmail",(t,o)=>{o.pattern??(o.pattern=Fo),j.init(t,o)}),jn=1,Rn=2;function qc(t,o){if(!o.normalize&&o.protocol?.source===Wo.source&&!/^https?:\/\//i.test(t))return jn;try{return new URL(t)}catch{return Rn}}var Yc=/[\t\n\r]/g;function Xc(t){return t.replace(Yc,"")}function Hc(t,o){return o.lastIndex=0,o.test(t.hostname)}function Qc(t,o){return o.lastIndex=0,o.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var Dn=z("$ZodURL",(t,o)=>{j.init(t,o),t._zod.check=(n)=>{try{let c=n.value.trim(),u=qc(c,o);if(u===jn){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!o.abort});return}if(u===Rn){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort});return}if(o.hostname&&!Hc(u,o.hostname))n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:o.hostname.source,input:n.value,inst:t,continue:!o.abort});if(o.protocol&&!Qc(u,o.protocol))n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:o.protocol.source,input:n.value,inst:t,continue:!o.abort});n.value=o.normalize?u.href:Xc(c);return}catch(c){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!o.abort})}}}),Ln=z("$ZodEmoji",(t,o)=>{o.pattern??(o.pattern=Uo()),j.init(t,o)}),Fn=z("$ZodNanoID",(t,o)=>{if(o.length!==void 0&&(!Number.isInteger(o.length)||o.length<1))throw Error(`Invalid nanoid length: ${o.length}`);o.pattern??(o.pattern=o.length===void 0?jo:Ro(o.length)),j.init(t,o)}),Un=z("$ZodCUID",(t,o)=>{o.pattern??(o.pattern=Io),j.init(t,o)}),Mn=z("$ZodCUID2",(t,o)=>{o.pattern??(o.pattern=Eo),j.init(t,o)}),Jn=z("$ZodULID",(t,o)=>{o.pattern??(o.pattern=To),j.init(t,o)}),Bn=z("$ZodXID",(t,o)=>{o.pattern??(o.pattern=No),j.init(t,o)}),Vn=z("$ZodKSUID",(t,o)=>{o.pattern??(o.pattern=Co),j.init(t,o)}),Kn=z("$ZodISODateTime",(t,o)=>{if(o.pattern??(o.pattern=Ho(o)),j.init(t,o),o.local||o.precision===-1)t._zod.bag.laxFormat=!0,t._zod.onattach.push((n)=>{n._zod.bag.laxFormat=!0})}),Wn=z("$ZodISODate",(t,o)=>{o.pattern??(o.pattern=Yo),j.init(t,o)}),Gn=z("$ZodISOTime",(t,o)=>{o.pattern??(o.pattern=Xo(o)),j.init(t,o)}),qn=z("$ZodISODuration",(t,o)=>{o.pattern??(o.pattern=Do),j.init(t,o)}),Yn=z("$ZodIPv4",(t,o)=>{o.pattern??(o.pattern=Mo),j.init(t,o),t._zod.bag.format="ipv4"}),eu=/^[0-9a-fA-F:.]+$/;function Xn(t){if(!eu.test(t))return!1;try{return new URL(`http://[${t}]`),!0}catch{return!1}}var Hn=z("$ZodIPv6",(t,o)=>{o.pattern??(o.pattern=Jo),j.init(t,o),t._zod.bag.format="ipv6",t._zod.check=(n)=>{if(!Xn(n.value))n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!o.abort})}});var Qn=z("$ZodCIDRv4",(t,o)=>{o.pattern??(o.pattern=Bo),j.init(t,o)});function tu(t){let o=t.split("/");if(o.length!==2)return!1;let[n,c]=o;if(!c)return!1;let u=Number(c);if(`${u}`!==c)return!1;if(u<0||u>128)return!1;return Xn(n)}var ei=z("$ZodCIDRv6",(t,o)=>{o.pattern??(o.pattern=Vo),j.init(t,o),t._zod.check=(n)=>{if(!tu(n.value))n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!o.abort})}});function ti(t){if(t==="")return!0;if(/\s/.test(t))return!1;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var ri=z("$ZodBase64",(t,o)=>{o.pattern??(o.pattern=Ko),j.init(t,o),t._zod.bag.contentEncoding="base64",t._zod.check=(n)=>{if(ti(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!o.abort})}});function ru(t){if(!Pt.test(t))return!1;let o=t.replace(/[-_]/g,(c)=>c==="-"?"+":"/"),n=o.padEnd(Math.ceil(o.length/4)*4,"=");return ti(n)}var oi=z("$ZodBase64URL",(t,o)=>{o.pattern??(o.pattern=Pt),j.init(t,o),t._zod.bag.contentEncoding="base64url",t._zod.check=(n)=>{if(ru(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!o.abort})}}),ni=z("$ZodE164",(t,o)=>{o.pattern??(o.pattern=Go),j.init(t,o)});function ou(t,o=null){try{let n=t.split(".");if(n.length!==3)return!1;let[c]=n;if(!c)return!1;let u=JSON.parse(atob(c));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(o&&(!("alg"in u)||u.alg!==o))return!1;return!0}catch{return!1}}var si=z("$ZodJWT",(t,o)=>{j.init(t,o),t._zod.check=(n)=>{if(ou(n.value,o.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!o.abort})}});var Lt=z("$ZodNumber",(t,o)=>{E.init(t,o),t._zod.pattern=t._zod.bag.pattern??Ie,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=Number(n.value)}catch(f){}let u=n.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return n;let p=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?String(u):void 0:void 0;return n.issues.push({expected:"number",code:"invalid_type",input:u,inst:t,...p?{received:p}:{}}),n}}),ui=z("$ZodNumberFormat",(t,o)=>{cn.init(t,o),Lt.init(t,o)}),pi=z("$ZodBoolean",(t,o)=>{E.init(t,o),t._zod.pattern=tn,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=Boolean(n.value)}catch(p){}let u=n.value;if(typeof u==="boolean")return n;return n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:t}),n}}),fi=z("$ZodBigInt",(t,o)=>{E.init(t,o),t._zod.pattern=en,t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=BigInt(n.value)}catch(u){}if(typeof n.value==="bigint")return n;return n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}});var di=z("$ZodNull",(t,o)=>{E.init(t,o),t._zod.pattern=rn,t._zod.values=new Set([null]),t._zod.parse=(n,c)=>{let u=n.value;if(u===null)return n;return n.issues.push({expected:"null",code:"invalid_type",input:u,inst:t}),n}}),mi=z("$ZodAny",(t,o)=>{E.init(t,o),t._zod.parse=(n)=>n}),hi=z("$ZodUnknown",(t,o)=>{E.init(t,o),t._zod.parse=(n)=>n}),_i=z("$ZodNever",(t,o)=>{E.init(t,o),t._zod.parse=(n,c)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),gi=z("$ZodVoid",(t,o)=>{E.init(t,o),t._zod.parse=(n,c)=>{let u=n.value;if(typeof u>"u")return n;return n.issues.push({expected:"void",code:"invalid_type",input:u,inst:t}),n}}),xi=z("$ZodDate",(t,o)=>{E.init(t,o),t._zod.parse=(n,c)=>{if(o.coerce)try{n.value=new Date(n.value)}catch(m){}let u=n.value,p=u instanceof Date;if(p&&!Number.isNaN(u.getTime()))return n;return n.issues.push({expected:"date",code:"invalid_type",input:u,...p?{received:"Invalid Date"}:{},inst:t}),n}});function zn(t,o,n){if(t.issues.length)o.issues.push(...Q(n,t.issues));o.value[n]=t.value}var yi=z("$ZodArray",(t,o)=>{E.init(t,o);let n=B.memoizer;n?.attach(t),t._zod.parse=(c,u)=>{let p=c.value;if(!Array.isArray(p))return c.issues.push({expected:"array",code:"invalid_type",input:p,inst:t}),c;c.value=n?n.alloc(t,c,Array(p.length),u):Array(p.length);let f=[];for(let m=0;m<p.length;m++){let _=p[m],g=o.element._zod.run({value:_,issues:[]},u);if(g instanceof Promise)f.push(g.then((b)=>zn(b,c,m)));else zn(g,c,m)}if(f.length)return Promise.all(f).then(()=>c);return c}});function Xe(t,o,n,c,u,p){let f=n in c,m=p==="optional";if(!f&&m&&u==="optional")return;if(t.issues.length){if(u!==void 0&&m&&!f)return;o.issues.push(...Q(n,t.issues))}if(!f&&u===void 0){if(!t.issues.length)o.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}if(t.value===void 0){if(f)o.value[n]=void 0}else o.value[n]=t.value}var nu=[];function bi(t){let o=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),c=n.length?n:nu,u=c.length?[...o,...c]:o;for(let f of u)if(!t.shape?.[f]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(f)}": expected a Zod schema`);let p=co(t.shape);return{...t,allKeys:u,symbolKeys:c,keySet:new Set(o),numKeys:o.length,optionalKeys:new Set(p)}}function zi(t,o,n,c,u,p){let f=[],m=u.keySet,_=u.catchall._zod,g=_.def.type,{optin:b,optout:v}=_;for(let w in o){if(m.has(w))continue;if(w==="__proto__"){if(g==="never")f.push(w);continue}if(g==="never"){f.push(w);continue}let k=_.run({value:o[w],issues:[]},c);if(k instanceof Promise)t.push(k.then((Z)=>Xe(Z,n,w,o,b,v)));else Xe(k,n,w,o,b,v)}if(f.length)n.issues.push({code:"unrecognized_keys",keys:f,input:o,inst:p,continue:!0});if(!t.length)return n;return Promise.all(t).then(()=>n)}var At=new WeakMap,iu=z("$ZodObject",(t,o)=>{if(E.init(t,o),!Object.getOwnPropertyDescriptor(o,"shape")?.get){let _=o.shape;At.set(o,_),Object.defineProperty(o,"shape",{get:()=>{let g={..._};return Object.defineProperty(o,"shape",{value:g}),At.set(o,g),g}})}let c=ke(()=>bi(o));I(t,"propValues",(_)=>{let g=_.def.shape,b={};for(let v in g){let w=g[v]._zod;if(w.values){if(!Object.prototype.hasOwnProperty.call(b,v))L(b,v,new Set);for(let k of w.values)b[v].add(k);if(w.optin!==void 0)b[v].add(void 0)}}return b});let u=ge,p=o.catchall,f,m=B.memoizer;m?.attach(t),t._zod.parse=(_,g)=>{f??(f=c.value);let b=_.value;if(!u(b))return _.issues.push({expected:"object",code:"invalid_type",input:b,inst:t}),_;_.value=m?m.alloc(t,_,{},g):{};let v=[],w=f.shape;for(let k of f.allKeys){if(k==="__proto__")continue;let Z=w[k],S=Z._zod.optin,O=Z._zod.optout,J=Z._zod.run({value:b[k],issues:[]},g);if(J instanceof Promise)v.push(J.then((q)=>Xe(q,_,k,b,S,O)));else Xe(J,_,k,b,S,O)}if(!p)return v.length?Promise.all(v).then(()=>_):_;return zi(v,b,_,g,c.value,t)}}),vi=z("$ZodObjectJIT",(t,o)=>{iu.init(t,o);let n=t._zod.parse,c=ke(()=>bi(o)),u=B.memoizer,p=(k)=>{let Z=c.value,S=Z.symbolKeys,O=new Tt(["payload","ctx"],{shape:k,inst:t,memo:u,syms:S}),J=(K)=>`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`,q=(K,R)=>`
|
|
8
|
-
for (let i = 0; i < ${K}.issues.length; i++) {
|
|
9
|
-
const iss = ${K}.issues[i];
|
|
10
|
-
iss.path = iss.path ? [${R}, ...iss.path] : [${R}];
|
|
11
|
-
payload.issues.push(iss);
|
|
12
|
-
}`;O.write("const input = payload.value;");let qr=Object.create(null),$c=0;for(let K of Z.allKeys)qr[K]=`key_${$c++}`;O.write(u?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let K of Z.allKeys){if(K==="__proto__")continue;let R=qr[K],H=typeof K==="symbol"?`syms[${S.indexOf(K)}]`:oo(K),lt=`${H} in input`,Yr=k[K],Xr=Yr?._zod?.optin,Hr=Xr!==void 0,wc=Yr?._zod?.optout==="optional";if(O.write(`const ${R} = ${J(H)};`),Hr&&wc){let kc=Xr==="optional"?`${R}_present`:`${R}.value !== undefined || ${R}_present`;O.write(`
|
|
13
|
-
const ${R}_present = ${lt};
|
|
14
|
-
if (!${R}.issues.length || ${R}_present) {
|
|
15
|
-
if (${R}.issues.length) {${q(R,H)}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (${kc}) {
|
|
19
|
-
newResult[${H}] = ${R}.value;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
`)}else if(!Hr)O.write(`
|
|
24
|
-
const ${R}_present = ${lt};
|
|
25
|
-
if (${R}.issues.length) {${q(R,H)}
|
|
26
|
-
}
|
|
27
|
-
if (!${R}_present && !${R}.issues.length) {
|
|
28
|
-
payload.issues.push({
|
|
29
|
-
code: "invalid_type",
|
|
30
|
-
expected: "nonoptional",
|
|
31
|
-
input: undefined,
|
|
32
|
-
path: [${H}]
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (${R}_present) {
|
|
37
|
-
newResult[${H}] = ${R}.value;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
`);else O.write(`
|
|
41
|
-
if (${R}.issues.length) {${q(R,H)}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (${R}.value === undefined) {
|
|
45
|
-
if (${lt}) {
|
|
46
|
-
newResult[${H}] = undefined;
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
newResult[${H}] = ${R}.value;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
`)}return O.write("payload.value = newResult;"),O.write("return payload;"),O.compile()},f,m=ge,_=!B.jitless,b=_&&io.value,v=o.catchall,w;t._zod.parse=(k,Z)=>{w??(w=c.value);let S=k.value;if(!m(S))return k.issues.push({expected:"object",code:"invalid_type",input:S,inst:t}),k;if(_&&b&&Z?.async===!1&&Z.jitless!==!0){if(!f)f=p(o.shape);if(k=f(k,Z),!v)return k;return zi([],S,k,Z,w,t)}return n(k,Z)}});function vn(t,o,n,c){for(let p of t)if(p.issues.length===0)return o.value=p.value,o;let u=t.filter((p)=>!he(p));if(u.length===1)return o.value=u[0].value,u[0];return o.issues.push({code:"invalid_union",input:o.value,inst:n,errors:t.map((p)=>p.issues.map((f)=>oe(f,c,W())))}),o}var Ft=z("$ZodUnion",(t,o)=>{E.init(t,o),I(t,"optin",(c)=>c.def.options.some((u)=>u._zod.optin==="defaulted")?"defaulted":c.def.options.some((u)=>u._zod.optin!==void 0)?"optional":void 0),I(t,"optout",(c)=>c.def.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),I(t,"values",(c)=>{if(c.def.options.every((u)=>u._zod.values))return new Set(c.def.options.flatMap((u)=>Array.from(u._zod.values)));return}),I(t,"pattern",(c)=>{if(c.def.options.every((u)=>u._zod.pattern)){let u=c.def.options.map((p)=>p._zod.pattern);return new RegExp(`^(${u.map((p)=>Ue(p.source)).join("|")})$`)}return});let n=o.options.length===1?o.options[0]._zod.run:null;t._zod.parse=(c,u)=>{if(n)return n(c,u);let p=!1,f=[];for(let m of o.options){let _=m._zod.run({value:c.value,issues:[]},u);if(_ instanceof Promise)f.push(_),p=!0;else{if(_.issues.length===0)return _;f.push(_)}}if(!p)return vn(f,c,t,u);return Promise.all(f).then((m)=>vn(m,c,t,u))}});var wi=z("$ZodDiscriminatedUnion",(t,o)=>{o.inclusive=!1,Ft.init(t,o);let n=t._zod.parse;I(t,"propValues",(u)=>{let p={};for(let f of u.def.options){let m=f._zod.propValues;if(!m||Object.keys(m).length===0)throw Error(`Invalid discriminated union option at index "${u.def.options.indexOf(f)}"`);for(let[_,g]of Object.entries(m)){if(!Object.prototype.hasOwnProperty.call(p,_))L(p,_,new Set);for(let b of g)p[_].add(b)}}return p}),o.options.forEach((u,p)=>{let f=At.get(u._zod.def);if(f&&!Object.prototype.hasOwnProperty.call(f,o.discriminator))throw Error(`Invalid discriminated union option at index "${p}"`)});let c=ke(()=>{let u=o.options,p=new Map;for(let f of u){let m=f._zod.propValues?.[o.discriminator];if(!m||m.size===0)throw Error(`Invalid discriminated union option at index "${o.options.indexOf(f)}"`);for(let _ of m){if(p.has(_))throw Error(`Duplicate discriminator value "${String(_)}"`);p.set(_,f)}}return p});t._zod.parse=(u,p)=>{let f=u.value;if(!ge(f))return u.issues.push({code:"invalid_type",expected:"object",input:f,inst:t}),u;let m=c.value.get(f?.[o.discriminator]);if(m)return m._zod.run(u,p);if(o.unionFallback||p.direction==="backward")return n(u,p);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:o.discriminator,options:Array.from(c.value.keys()),input:f,path:[o.discriminator],inst:t}),u}}),ki=z("$ZodIntersection",(t,o)=>{E.init(t,o),t._zod.parse=(n,c)=>{let u=n.value,p=o.left._zod.run({value:u,issues:[]},c),f=o.right._zod.run({value:u,issues:[]},c);if(p instanceof Promise||f instanceof Promise)return Promise.all([p,f]).then(([_,g])=>$n(n,_,g));return $n(n,p,f)}});function Nt(t,o){if(t===o)return{valid:!0,data:t};if(t instanceof Date&&o instanceof Date&&+t===+o)return{valid:!0,data:t};if(me(t)&&me(o)){let n=Object.keys(o),c=Object.keys(t).filter((p)=>n.indexOf(p)!==-1),u={...t,...o};if(Object.prototype.hasOwnProperty.call(u,"__proto__"))delete u.__proto__;for(let p of c){if(p==="__proto__")continue;let f=Nt(t[p],o[p]);if(!f.valid)return{valid:!1,mergeErrorPath:[p,...f.mergeErrorPath]};u[p]=f.data}return{valid:!0,data:u}}if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let c=0;c<t.length;c++){let u=t[c],p=o[c],f=Nt(u,p);if(!f.valid)return{valid:!1,mergeErrorPath:[c,...f.mergeErrorPath]};n.push(f.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function $n(t,o,n){let c=new Map,u,p=new Map,f=(g,b)=>{let v;if(g.code==="unrecognized_keys"&&!g.path?.length)u??(u=g),v=g.keys;else if(g.code==="invalid_key"&&g.origin==="record"&&g.path?.length===1){let w=String(g.path[0]);if(!p.has(w))p.set(w,g);v=[w]}else return!1;for(let w of v){if(!c.has(w))c.set(w,{});c.get(w)[b]=!0}return!0};for(let g of o.issues)if(!f(g,"l"))t.issues.push(g);for(let g of n.issues)if(!f(g,"r"))t.issues.push(g);let m=[...c].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(m.length){let g=u?m.filter((b)=>u.keys.includes(b)):[];if(g.length)t.issues.push({...u,keys:g});for(let b of m)if(!g.includes(b)&&p.has(b))t.issues.push(p.get(b))}let _=Nt(o.value,n.value);if(!_.valid){if(he(t))return t;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(_.mergeErrorPath)}`)}return t.value=_.data,t}var Zi=z("$ZodTuple",(t,o)=>{E.init(t,o);let n=o.items,c=B.memoizer;c?.attach(t),t._zod.parse=(u,p)=>{let f=u.value;if(!Array.isArray(f))return u.issues.push({input:f,inst:t,expected:"tuple",code:"invalid_type"}),u;u.value=c?c.alloc(t,u,[],p):[];let m=[],_=wn(n,"optin"),g=wn(n,"optout");if(!o.rest){if(f.length<_)return u.issues.push({code:"too_small",minimum:_,inclusive:!0,input:f,inst:t,origin:"array"}),u;if(f.length>n.length)u.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:f,inst:t,origin:"array"})}let b=Array(n.length);for(let v=0;v<n.length;v++){let w=n[v]._zod.run({value:f[v],issues:[]},p);if(w instanceof Promise)m.push(w.then((k)=>{b[v]=k}));else b[v]=w}if(o.rest){let v=n.length-1,w=f.slice(n.length);for(let k of w){v++;let Z=o.rest._zod.run({value:k,issues:[]},p);if(Z instanceof Promise)m.push(Z.then((S)=>kn(S,u,v)));else kn(Z,u,v)}}if(m.length)return Promise.all(m).then(()=>Zn(b,u,n,f,g));return Zn(b,u,n,f,g)}});function wn(t,o){for(let n=t.length-1;n>=0;n--)if(!(o==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function kn(t,o,n){if(t.issues.length)o.issues.push(...Q(n,t.issues));o.value[n]=t.value}function Zn(t,o,n,c,u){for(let p=0;p<n.length;p++){let f=t[p],m=p<c.length;if(!m&&p>=u&&n[p]._zod.optin==="optional"){o.value.length=p;break}if(f.issues.length){if(!m&&p>=u){o.value.length=p;break}o.issues.push(...Q(p,f.issues))}o.value[p]=f.value}for(let p=o.value.length-1;p>=c.length;p--)if(n[p]._zod.optout==="optional"&&o.value[p]===void 0)o.value.length=p;else break;return o}var Pi=z("$ZodRecord",(t,o)=>{E.init(t,o);let n=B.memoizer;n?.attach(t),t._zod.parse=(c,u)=>{let p=c.value;if(!me(p))return c.issues.push({expected:"record",code:"invalid_type",input:p,inst:t}),c;let f=[],m=o.keyType._zod.values;if(m&&!o.partial){c.value=n?n.alloc(t,c,{},u):{};let _=new Set;for(let b of m)if(typeof b==="string"||typeof b==="number"||typeof b==="symbol"){if(_.add(typeof b==="number"?b.toString():b),b==="__proto__")continue;let v=o.keyType._zod.run({value:b,issues:[]},u);if(v instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(v.issues.length){c.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map((Z)=>oe(Z,u,W())),input:b,path:[b],inst:t});continue}let w=v.value;if(w==="__proto__")continue;let k=o.valueType._zod.run({value:p[b],issues:[]},u);if(k instanceof Promise)f.push(k.then((Z)=>{if(Z.issues.length)c.issues.push(...Q(b,Z.issues));c.value[w]=Z.value}));else{if(k.issues.length)c.issues.push(...Q(b,k.issues));c.value[w]=k.value}}let g;for(let b in p)if(!_.has(b))if(o.mode==="loose"){if(b==="__proto__")continue;c.value[b]=p[b]}else g=g??[],g.push(b);if(g&&g.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:g,continue:!0})}else{c.value=n?n.alloc(t,c,{},u):{};let _;for(let g of Reflect.ownKeys(p)){if(g==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(p,g))continue;let b=o.keyType._zod.run({value:g,issues:[]},u);if(b instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof g==="string"&&Ie.test(g)&&b.issues.length){let Z=o.keyType._zod.run({value:Number(g),issues:[]},u);if(Z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(Z.issues.length===0)b=Z}if(b.issues.length){if(o.mode==="loose")c.value[g]=p[g];else if(m)_=_??[],_.push(g);else c.issues.push({code:"invalid_key",origin:"record",issues:b.issues.map((Z)=>oe(Z,u,W())),input:g,path:[g],inst:t});continue}let w=b.value;if(w==="__proto__")continue;let k=o.valueType._zod.run({value:p[g],issues:[]},u);if(k instanceof Promise)f.push(k.then((Z)=>{if(Z.issues.length)c.issues.push(...Q(g,Z.issues));c.value[w]=Z.value}));else{if(k.issues.length)c.issues.push(...Q(g,k.issues));c.value[w]=k.value}}if(_&&_.length>0)c.issues.push({code:"unrecognized_keys",input:p,inst:t,keys:_,continue:!0})}if(f.length)return Promise.all(f).then(()=>c);return c}});var Si=z("$ZodEnum",(t,o)=>{E.init(t,o);let n=Fe(o.entries),c=new Set(n);t._zod.values=c;let u=n.filter((p)=>so.has(typeof p));t._zod.pattern=new RegExp(u.length?`^(${u.map((p)=>le(p.toString())).join("|")})$`:"^[^\\s\\S]$"),t._zod.parse=(p,f)=>{let m=p.value;if(c.has(m))return p;return p.issues.push({code:"invalid_value",values:n,input:m,inst:t}),p}}),Oi=z("$ZodLiteral",(t,o)=>{E.init(t,o);let n=new Set(o.values);t._zod.values=n,t._zod.pattern=new RegExp(o.values.length?`^(${o.values.map((c)=>typeof c==="string"?le(c):c?le(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$"),t._zod.parse=(c,u)=>{let p=c.value;if(n.has(p))return c;return c.issues.push({code:"invalid_value",values:o.values,input:p,inst:t}),c}});var Ii=z("$ZodTransform",(t,o)=>{E.init(t,o),t._zod.optin="optional",B.memoizer?.guard(t),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Ze(t.constructor.name);let u=o.transform(n.value,n);if(c.async)return(u instanceof Promise?u:Promise.resolve(u)).then((f)=>(n.value=f,n));if(u instanceof Promise)throw new ne;return n.value=u,n}});function Pn(t,o){return t.value=o.issues.length?void 0:o.value,t}var Ut=z("$ZodOptional",(t,o)=>{E.init(t,o),I(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",I(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c,void 0]):void 0}),I(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Ue(c.source)})?$`):void 0}),t._zod.parse=(n,c)=>{if(n.value===void 0){if(o.innerType._zod.optin!=="defaulted")return n;let u=o.innerType._zod.run({value:n.value,issues:[]},c);if(u instanceof Promise)return u.then((p)=>Pn(n,p));return Pn(n,u)}return o.innerType._zod.run(n,c)}}),Ei=z("$ZodExactOptional",(t,o)=>{Ut.init(t,o),I(t,"values",(n)=>n.def.innerType._zod.values),I(t,"pattern",(n)=>n.def.innerType._zod.pattern),t._zod.parse=(n,c)=>o.innerType._zod.run(n,c)}),Ti=z("$ZodNullable",(t,o)=>{E.init(t,o),I(t,"optin",(n)=>n.def.innerType._zod.optin),I(t,"optout",(n)=>n.def.innerType._zod.optout),I(t,"pattern",(n)=>{let c=n.def.innerType._zod.pattern;return c?new RegExp(`^(${Ue(c.source)}|null)$`):void 0}),I(t,"values",(n)=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,c)=>{if(n.value===null)return n;return o.innerType._zod.run(n,c)}}),Ai=z("$ZodDefault",(t,o)=>{E.init(t,o),t._zod.optin="defaulted",I(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);if(n.value===void 0)return n.value=o.defaultValue,n;let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>Sn(p,o));return Sn(u,o)}});function Sn(t,o){if(t.value===void 0)t.value=o.defaultValue;return t}var Ni=z("$ZodPrefault",(t,o)=>{E.init(t,o),t._zod.optin="defaulted",I(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);if(n.value===void 0)n.value=o.defaultValue;return o.innerType._zod.run(n,c)}}),Ci=z("$ZodNonOptional",(t,o)=>{E.init(t,o),I(t,"values",(n)=>{let c=n.def.innerType._zod.values;return c?new Set([...c].filter((u)=>u!==void 0)):void 0}),t._zod.parse=(n,c)=>{let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>On(p,t));return On(u,t)}});function On(t,o){if(!t.issues.length&&t.value===void 0)t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:o});return t}function In(t,o,n,c){if(!o.issues.length){if(t.value=o.value,o.memo)t.memo=!0;return t}return t.value=n.catchValue({...o,value:t.value,error:{issues:o.issues.map((u)=>oe(u,c,W()))},input:t.value}),t}var ji=z("$ZodCatch",(t,o)=>{E.init(t,o),I(t,"optin",(n)=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),I(t,"optout",(n)=>n.def.innerType._zod.optout),I(t,"values",(n)=>n.def.innerType._zod.values),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);let u=o.innerType._zod.run({value:n.value,issues:[]},c);if(u instanceof Promise)return u.then((p)=>In(n,p,o,c));return In(n,u,o,c)}});var Mt=z("$ZodPipe",(t,o)=>{E.init(t,o),I(t,"values",(n)=>n.def.in._zod.values),I(t,"optin",(n)=>n.def.in._zod.optin),I(t,"optout",(n)=>n.def.out._zod.optout),I(t,"propValues",(n)=>n.def.in._zod.propValues),t._zod.parse=(n,c)=>{if(c.direction==="backward"){let p=o.out._zod.run(n,c);if(p instanceof Promise)return p.then((f)=>Ye(f,o.in,c));return Ye(p,o.in,c)}let u=o.in._zod.run(n,c);if(u instanceof Promise)return u.then((p)=>Ye(p,o.out,c));return Ye(u,o.out,c)}});function Ye(t,o,n){if(t.issues.some((c)=>c.code!=="unrecognized_keys"))return t.aborted=!0,t;return o._zod.run({value:t.value,issues:t.issues},n)}var Ri=z("$ZodPreprocess",(t,o)=>{Mt.init(t,o)}),Di=z("$ZodReadonly",(t,o)=>{E.init(t,o),I(t,"propValues",(n)=>n.def.innerType._zod.propValues),I(t,"values",(n)=>n.def.innerType._zod.values),I(t,"optin",(n)=>n.def.innerType?._zod?.optin),I(t,"optout",(n)=>n.def.innerType?._zod?.optout),t._zod.parse=(n,c)=>{if(c.direction==="backward")return o.innerType._zod.run(n,c);let u=o.innerType._zod.run(n,c);if(u instanceof Promise)return u.then(En);return En(u)}});function En(t){if(!t.memo)t.value=Object.freeze(t.value);return t}var Li=z("$ZodLazy",(t,o)=>{E.init(t,o),ro(t._zod,"innerType",()=>{let n=o;if(!n._cachedInner)n._cachedInner=o.getter();return n._cachedInner}),I(t,"pattern",(n)=>n.innerType?._zod?.pattern),I(t,"propValues",(n)=>n.innerType?._zod?.propValues),I(t,"optin",(n)=>n.innerType?._zod?.optin??void 0),I(t,"optout",(n)=>n.innerType?._zod?.optout??void 0),t._zod.parse=(n,c)=>t._zod.innerType._zod.run(n,c)}),Fi=z("$ZodCustom",(t,o)=>{M.init(t,o),E.init(t,o),t._zod.parse=(n,c)=>n,t._zod.check=(n)=>{let c=n.value,u=o.fn(c);if(u instanceof Promise)return u.then((p)=>Tn(p,n,c,t));Tn(u,n,c,t);return}});function Tn(t,o,n,c){if(!t){let u={code:"custom",input:n,inst:c,path:[...c._zod.def.path??[]],continue:!c._zod.def.abort};if(c._zod.def.params)u.params=c._zod.def.params;o.issues.push(_e(u))}}class Ji extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}}var Bt="~memo",Ui=[];function Jt(t){return t.map((o)=>o.path?{...o,path:o.path.slice()}:{...o})}var Mi=new WeakMap;function Bi(t,o){let n=Mi.get(t);if(n!==void 0)return n;if(o.has(t))return!0;o.add(t);let c=!1,u=(m)=>{if(!c&&m?._zod&&Bi(m,o))c=!0},p=t._zod.def,f=p.type;switch(f){case"object":{for(let m of Reflect.ownKeys(p.shape))u(p.shape[m]);u(p.catchall);break}case"array":u(p.element);break;case"tuple":for(let m of p.items)u(m);u(p.rest);break;case"record":case"map":u(p.keyType),u(p.valueType);break;case"set":u(p.valueType);break;case"union":for(let m of p.options)u(m);break;case"intersection":u(p.left),u(p.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":u(p.innerType);break;case"pipe":u(p.in),u(p.out);break;case"function":u(p.input),u(p.output);break;case"lazy":u(t._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let m in p){let _=Object.getOwnPropertyDescriptor(p,m);if(!_||_.get)continue;let g=_.value;if(!g||typeof g!=="object")continue;if(g._zod)u(g);else if(Array.isArray(g))for(let b of g)u(b)}}return o.delete(t),Mi.set(t,c),c}function su(t,o){let n=t.buckets.get(o);if(!n)n=new Map,t.buckets.set(o,n);return n}var Qe,et=[],cu={alloc(t,o,n){let c=Qe;if(!c)return n;Qe=void 0;let u={value:n,issues:null};return c.set(o.value,u),et.push(u),n},guard(t){var o;(o=t._zod).deferred??(o.deferred=[]),t._zod.deferred.push(()=>{let n=t._zod.parse,c=(u,p)=>{if(p.direction!=="backward"&&uu(p,u.value))throw new Ji;return n(u,p)};if(t._zod.parse=c,t._zod.run===n)t._zod.run=c})},attach(t){var o;let n,c,u;(o=t._zod).deferred??(o.deferred=[]),t._zod.deferred.push(()=>{let p=t._zod.parse,f=(m,_)=>{if(n===void 0){if(n=Bi(t,new Set),!n){if(t._zod.parse=p,t._zod.run===f)t._zod.run=p;return p(m,_)}}let g=m.value;if(g===null||typeof g!=="object")return p(m,_);let b=_[Bt];if(!b)b={buckets:new Map,backEdges:void 0},_[Bt]=b;let v;if(c===_)v=u;else v=su(b,t),c=_,u=v;let w=v.get(g);if(w){if(m.value=w.value,w.issues){if(w.issues.length)m.issues.push(...Jt(w.issues))}else m.memo=!0,b.backEdges??(b.backEdges=new Set),b.backEdges.add(w.value);return m}Qe=v;let k=et.length,Z=p(m,_);Qe=void 0;let S=et.length>k?et.pop():void 0;if(Z instanceof Promise)return Z.then((O)=>{if(S)S.issues=O.issues.length?Jt(O.issues):Ui;return O});if(S)S.issues=Z.issues.length?Jt(Z.issues):Ui;return Z};if(t._zod.parse=f,t._zod.run===p)t._zod.run=f})}};function Vt(){return cu}function uu(t,o){let n=t[Bt]?.backEdges;return n!==void 0&&o!==null&&typeof o==="object"&&n.has(o)}var au=()=>{let t={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 o(p){return t[p]??null}let n={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",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},c={nan:"NaN"};function u(p,f){if(p==="number"&&typeof f==="number"&&!Number.isFinite(f))return String(f);return c[p]??p}return(p)=>{switch(p.code){case"invalid_type":{let f=u(p.expected),m=po(p.input),_=u(m,p.input);return`Invalid input: expected ${f}, received ${_}`}case"invalid_value":if(p.values.length===1)return`Invalid input: expected ${ht(p.values[0])}`;return`Invalid option: expected one of ${ft(p.values,"|")}`;case"too_big":{let f=p.exact?"exactly ":p.inclusive?"<=":"<",m=o(p.origin);if(m)return`Too big: expected ${p.origin??"value"} to have ${f}${p.maximum.toString()} ${m.unit??"elements"}`;return`Too big: expected ${p.origin??"value"} to be ${f}${p.maximum.toString()}`}case"too_small":{let f=p.exact?"exactly ":p.inclusive?">=":">",m=o(p.origin);if(m)return`Too small: expected ${p.origin} to have ${f}${p.minimum.toString()} ${m.unit}`;return`Too small: expected ${p.origin} to be ${f}${p.minimum.toString()}`}case"invalid_format":{let f=p;if(f.format==="starts_with")return`Invalid string: must start with "${f.prefix}"`;if(f.format==="ends_with")return`Invalid string: must end with "${f.suffix}"`;if(f.format==="includes")return`Invalid string: must include "${f.includes}"`;if(f.format==="regex")return`Invalid string: must match pattern ${f.pattern}`;return`Invalid ${n[f.format]??p.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${p.divisor}`;case"unrecognized_keys":return`Unrecognized key${p.keys.length>1?"s":""}: ${ft(p.keys,", ")}`;case"invalid_key":return`Invalid key in ${p.origin}`;case"invalid_union":if(p.options&&Array.isArray(p.options)&&p.options.length>0)return`Invalid discriminator value. Expected ${p.options.map((m)=>`'${m}'`).join(" | ")}`;if(p.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${p.origin}`;default:return"Invalid input"}}};function Kt(){return{localeError:au()}}var Vi;class Ki{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){let n=o[0];if(this._map.set(t,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,t);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let o=this._map.get(t);if(o&&typeof o==="object"&&"id"in o)this._idmap.delete(o.id);return this._map.delete(t),this}get(t){let o=t._zod.parent;if(o){let n={...this.get(o)??{}};delete n.id;let c={...n,...this._map.get(t)};return Object.keys(c).length?c:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Wi(){return new Ki}(Vi=globalThis).__zod_globalRegistry??(Vi.__zod_globalRegistry=Wi());var pe=globalThis.__zod_globalRegistry;function Gi(t,o){return new t({type:"string",...P(o)})}function qi(t,o){return new t({type:"string",coerce:!0,...P(o)})}function Wt(t,o){return new t({type:"string",format:"email",check:"string_format",abort:!1,...P(o)})}function Yi(t,o){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...P(o)})}function Xi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...P(o)})}function Hi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...P(o)})}function Qi(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...P(o)})}function es(t,o){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...P(o)})}function Gt(t,o){return new t({type:"string",format:"url",check:"string_format",abort:!1,...P(o)})}function ts(t,o){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...P(o)})}function rs(t,o){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...P(o)})}function os(t,o){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...P(o)})}function ns(t,o){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...P(o)})}function is(t,o){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...P(o)})}function ss(t,o){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...P(o)})}function us(t,o){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...P(o)})}function qt(t,o){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...P(o)})}function Yt(t,o){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...P(o)})}function as(t,o){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...P(o)})}function ls(t,o){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...P(o)})}function ps(t,o){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...P(o)})}function fs(t,o){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...P(o)})}function ds(t,o){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...P(o)})}function ms(t,o){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...P(o)})}function tt(t,o){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...P(o)})}function rt(t,o){return new t({type:"string",format:"date",check:"string_format",...P(o)})}function Xt(t,o){return new t({type:"string",format:"time",check:"string_format",precision:null,...P(o)})}function Ht(t,o){return new t({type:"string",format:"duration",check:"string_format",...P(o)})}function hs(t,o){return new t({type:"number",checks:[],...P(o)})}function _s(t,o){return new t({type:"number",coerce:!0,checks:[],...P(o)})}function gs(t,o){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...P(o)})}function xs(t,o){return new t({type:"boolean",...P(o)})}function ys(t,o){return new t({type:"boolean",coerce:!0,...P(o)})}function bs(t,o){return new t({type:"bigint",coerce:!0,...P(o)})}function zs(t,o){return new t({type:"null",...P(o)})}function vs(t){return new t({type:"any"})}function $s(t){return new t({type:"unknown"})}function ws(t,o){return new t({type:"never",...P(o)})}function ks(t,o){return new t({type:"void",...P(o)})}function Zs(t,o){return new t({type:"date",...P(o)})}function Ps(t,o){return new t({type:"date",coerce:!0,...P(o)})}function ye(t,o){return new It({check:"less_than",...P(o),value:t,inclusive:!1})}function ie(t,o){return new It({check:"less_than",...P(o),value:t,inclusive:!0})}function be(t,o){return new Et({check:"greater_than",...P(o),value:t,inclusive:!1})}function ce(t,o){return new Et({check:"greater_than",...P(o),value:t,inclusive:!0})}function Te(t,o){return new sn({check:"multiple_of",...P(o),value:t})}function ot(t,o){return new un({check:"max_length",...P(o),maximum:t})}function ze(t,o){return new an({check:"min_length",...P(o),minimum:t})}function nt(t,o){return new ln({check:"length_equals",...P(o),length:t})}function Qt(t,o){return new pn({check:"string_format",format:"regex",...P(o),pattern:t})}function er(t){return new fn({check:"string_format",format:"lowercase",...P(t)})}function tr(t){return new dn({check:"string_format",format:"uppercase",...P(t)})}function rr(t,o){return new mn({check:"string_format",format:"includes",...P(o),includes:t})}function or(t,o){return new hn({check:"string_format",format:"starts_with",...P(o),prefix:t})}function nr(t,o){return new _n({check:"string_format",format:"ends_with",...P(o),suffix:t})}function fe(t){return new gn({check:"overwrite",tx:t})}function ir(t){return fe((o)=>o.normalize(t))}function sr(){return fe((t)=>t.trim())}function cr(){return fe((t)=>t.toLowerCase())}function ur(){return fe((t)=>t.toUpperCase())}function ar(){return fe((t)=>no(t))}function Ss(t,o,n){return new t({type:"array",element:o,...P(n)})}function Os(t,o,n){let c=P(n);return c.abort??(c.abort=!0),new t({type:"custom",check:"custom",fn:o,...c})}function Is(t,o,n){return new t({type:"custom",check:"custom",fn:o,...P(n)})}function Es(t,o){let n=lu((c)=>(c.addIssue=(u)=>{if(typeof u==="string")c.issues.push(_e(u,c.value,n._zod.def));else{let p=u;if(p.fatal)p.continue=!1;if(p.code??(p.code="custom"),!("input"in p))p.input=c.value;p.inst??(p.inst=n),p.continue??(p.continue=!n._zod.def.abort),c.issues.push(_e(p))}},t(c.value,c)),o);return n}function lu(t,o){let n=new M({check:"custom",...P(o)});return n._zod.check=t,n}function Ae(t,...o){for(let n of o)for(let c of Reflect.ownKeys(n))if(Object.prototype.propertyIsEnumerable.call(n,c))L(t,c,n[c]);return t}function Ce(t){let o=t?.target??"draft-2020-12";if(o==="draft-4")o="draft-04";if(o==="draft-7")o="draft-07";return{processors:t.processors??{},metadataRegistry:t?.metadata??pe,target:o,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function F(t,o,n,c,u){let p=typeof o.unrepresentable==="function"?o.unrepresentable({zodSchema:t,path:c.path,message:u}):o.unrepresentable;if(p==="any")return!1;if(p===void 0||p==="throw")throw Error(u);return Object.assign(n,p),!0}function C(t,o,n={path:[],schemaPath:[]}){var c;let u=t._zod.def,p=o.seen.get(t);if(p){if(p.count++,n.schemaPath.includes(t))p.cycle=n.path;return p.schema}let f={schema:{},count:1,cycle:void 0,path:n.path};o.seen.set(t,f),o.sharedDefsExtractedFor=void 0,o.sharedEmitDoneFor=void 0;let m=t._zod.toJSONSchema?.();if(m)f.schema=m;else{let b={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(o,f.schema,b);else{let w=f.schema,k=o.processors[u.type];if(!k)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);k(t,o,w,b)}let v=t._zod.parent;if(v){if(!f.ref)f.ref=v;C(v,o,b),o.seen.get(v).isParent=!0}}let _=o.metadataRegistry.get(t);if(_)Ae(f.schema,_);if(o.io==="input"&&V(t))delete f.schema.examples,delete f.schema.default;if(o.io==="input"&&"_prefault"in f.schema)(c=f.schema).default??(c.default=f.schema._prefault);return delete f.schema._prefault,o.seen.get(t).schema}function Ts(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function je(t,o){let n=t.seen.get(o);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;let c=new Map;for(let f of t.seen.entries()){let m=t.metadataRegistry.get(f[0])?.id;if(m){let _=c.get(m);if(_&&_!==f[0])throw Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);c.set(m,f[0])}}let u=(f)=>{let m=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let v=t.external.registry.get(f[0])?.id,w=t.external.uri??((Z)=>Z);if(v)return{ref:w(v)};let k=f[1].defId??f[1].schema.id??`schema${t.counter++}`;return f[1].defId=k,{defId:k,ref:`${w("__shared")}#/${m}/${Ts(k)}`}}let _="#",g=`${_}/${m}/`;if(f[1]===n&&!f[1].schema.id)return{ref:_};let b=f[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:g+Ts(b)}},p=(f)=>{if(f[1].schema.$ref)return;let m=f[1],{ref:_,defId:g}=u(f);if(m.def={...m.schema},g)m.defId=g;let b=m.schema;for(let v in b)delete b[v];b.$ref=_};if(t.cycles==="throw")for(let f of t.seen.entries()){let m=f[1];if(m.cycle)throw Error(`Cycle detected: #/${m.cycle?.join("/")}/<root>
|
|
53
|
-
|
|
54
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of t.seen.entries()){let m=f[1];if(o===f[0]){p(f);continue}if(t.external){let g=t.external.registry.get(f[0])?.id;if(o!==f[0]&&g){p(f);continue}}if(t.metadataRegistry.get(f[0])?.id){p(f);continue}if(m.cycle){p(f);continue}if(m.count>1){if(t.reused==="ref"){p(f);continue}}}if(t.external)t.sharedDefsExtractedFor=t.external}function Cs(t){let o=t.anyOf;if(!Array.isArray(o)||o.length===0||t.type!==void 0)return;let n=[];for(let c of o){if(!c||typeof c!=="object")return;Cs(c);let u=Object.keys(c);if(u.length!==1||u[0]!=="type")return;let p=c.type;for(let f of Array.isArray(p)?p:[p]){if(typeof f!=="string")return;if(!n.includes(f))n.push(f)}}delete t.anyOf,t.type=n.length===1?n[0]:n}var js=new Set(["type","properties","required","additionalProperties"]),As=["oneOf","anyOf"];function Ns(t){let o=t.additionalProperties;if(o===void 0||o===!1||typeof o!=="object"||o===null)return null;return Object.keys(o).length?o:null}function lr(t){let o=[];for(let p of t){if(typeof p!=="object"||p.type!=="object")return null;for(let f in p)if(!js.has(f))return null;o.push(p)}let n={},c=new Set;for(let p of o){for(let f in p.properties){if(Object.prototype.hasOwnProperty.call(n,f))continue;let m=[];for(let g of o){let b=g.properties?.[f]??Ns(g);if(b===null||b===void 0)continue;if(!m.some((v)=>JSON.stringify(v)===JSON.stringify(b)))m.push(b)}let _=m.length===1?m[0]:lr(m)??{allOf:m};L(n,f,_)}for(let f of p.required??[])c.add(f)}let u={type:"object",properties:n};if(c.size)u.required=[...c];if(o.every((p)=>p.additionalProperties===!1))u.additionalProperties=!1;else{let p=[];for(let f of o){let m=Ns(f);if(m&&!p.some((_)=>JSON.stringify(_)===JSON.stringify(m)))p.push(m)}if(p.length===1)u.additionalProperties=p[0];else if(p.length>1)u.additionalProperties={allOf:p}}return u}function pu(t){let o=t.allOf;if(!Array.isArray(o)||o.length<2)return;for(let u of js)if(u in t)return;let n=o.filter((u)=>As.some((p)=>Array.isArray(u[p]))),c=null;if(!n.length)c=lr(o);else{let u=n[0],p=As.find((_)=>Array.isArray(u[_]));if(Object.keys(u).length!==1)return;let f=o.filter((_)=>_!==u),m=u[p].map((_)=>lr([...f,_]));if(m.some((_)=>!_))return;c={[p]:m}}if(!c)return;delete t.allOf,Ae(t,c)}function Re(t,o){let n=t.seen.get(o);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let c=(m)=>{let _=t.seen.get(m);if(_.ref===null)return;let g=_.def??_.schema,b={...g},v=_.ref;if(_.ref=null,v){c(v);let k=t.seen.get(v),Z=k.schema;if(Z.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"))g.allOf=g.allOf??[],g.allOf.push(Z);else Ae(g,Z);if(Ae(g,b),m._zod.parent===v)for(let O in g){if(O==="$ref"||O==="allOf")continue;if(!(O in b))delete g[O]}if(Z.$ref&&k.def)for(let O in g){if(O==="$ref"||O==="allOf")continue;if(O in k.def&&JSON.stringify(g[O])===JSON.stringify(k.def[O]))delete g[O]}}let w=m._zod.parent;if(w&&w!==v){c(w);let k=t.seen.get(w);if(k?.schema.$ref){if(g.$ref=k.schema.$ref,k.def)for(let Z in g){if(Z==="$ref"||Z==="allOf")continue;if(Z in k.def&&JSON.stringify(g[Z])===JSON.stringify(k.def[Z]))delete g[Z]}}}t.override({zodSchema:m,jsonSchema:g,path:_.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(let m of[...t.seen.entries()].reverse())c(m[0]);if(t.target!=="openapi-3.0")for(let m of t.seen.entries())Cs(m[1].def??m[1].schema);for(let m of t.deferred)m();if(t.intersections.length){let m=new Map;for(let _ of t.seen.values())for(let g of[_.schema,_.def]){let b=g?.allOf;if(!Array.isArray(b))continue;let v=m.get(b);if(v)v.push(g);else m.set(b,[g])}for(let _ of t.intersections)for(let g of m.get(_)??[])pu(g)}}let u={};if(t.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if(t.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if(t.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if(t.target==="openapi-3.0");if(t.external?.uri){let m=t.external.registry.get(o)?.id;if(!m)throw Error("Schema is missing an `id` property");u.$id=t.external.uri(m)}Ae(u,n.defId?n.schema:n.def??n.schema);let p=t.metadataRegistry.get(o)?.id;if(p!==void 0&&u.id===p)delete u.id;let f=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(let m of t.seen.entries()){let _=m[1];if(_.def&&_.defId){if(_.def.id===_.defId)delete _.def.id;L(f,_.defId,_.def)}}if(t.external)t.sharedEmitDoneFor=t.external;if(t.external);else if(Object.keys(f).length>0)if(t.target==="draft-2020-12")u.$defs=f;else u.definitions=f;try{let m=JSON.parse(JSON.stringify(u));return Object.defineProperty(m,"~standard",{value:{...o["~standard"],jsonSchema:{input:Ne(o,"input",t.processors),output:Ne(o,"output",t.processors)}},enumerable:!1,writable:!1}),m}catch(m){throw Error("Error converting schema to JSON.")}}function V(t,o){let n=o??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let c=t._zod.def;if(c.type==="transform")return!0;if(c.type==="array")return V(c.element,n);if(c.type==="set")return V(c.valueType,n);if(c.type==="lazy")return V(c.getter(),n);if(c.type==="promise"||c.type==="optional"||c.type==="nonoptional"||c.type==="nullable"||c.type==="readonly"||c.type==="default"||c.type==="prefault"||c.type==="catch")return V(c.innerType,n);if(c.type==="intersection")return V(c.left,n)||V(c.right,n);if(c.type==="record"||c.type==="map")return V(c.keyType,n)||V(c.valueType,n);if(c.type==="pipe"){if(t._zod.traits.has("$ZodCodec"))return!0;return V(c.in,n)||V(c.out,n)}if(c.type==="object"){for(let u in c.shape)if(V(c.shape[u],n))return!0;return!1}if(c.type==="union"){for(let u of c.options)if(V(u,n))return!0;return!1}if(c.type==="tuple"){for(let u of c.items)if(V(u,n))return!0;if(c.rest&&V(c.rest,n))return!0;return!1}return!1}var Rs=(t,o={})=>(n)=>{let c=Ce({...n,processors:o});return C(t,c),je(c,t),Re(c,t)},Ne=(t,o,n={})=>(c)=>{let{libraryOptions:u,target:p}=c??{},f=Ce({...u??{},target:p,io:o,processors:n});return C(t,f),je(f,t),Re(f,t)};var fu={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},dr=(t,o,n,c)=>{let u=n;u.type="string";let{minimum:p,maximum:f,format:m,patterns:_,contentEncoding:g,laxFormat:b}=t._zod.bag;if(typeof p==="number")u.minLength=p;if(typeof f==="number")u.maxLength=f;if(m){if(u.format=fu[m]??m,u.format==="")delete u.format;if(m==="time"||b)delete u.format}if(g)u.contentEncoding=g;if(_&&_.size>0){let v=[..._];if(v.length===1)u.pattern=v[0].source;else if(v.length>1)u.allOf=[...v.map((w)=>({...o.target==="draft-07"||o.target==="draft-04"||o.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))]}},mr=(t,o,n,c)=>{let u=n,{minimum:p,maximum:f,format:m,multipleOf:_,exclusiveMaximum:g,exclusiveMinimum:b}=t._zod.bag;if(typeof m==="string"&&m.includes("int"))u.type="integer";else u.type="number";let v=typeof b==="number"&&b>=(p??Number.NEGATIVE_INFINITY),w=typeof g==="number"&&g<=(f??Number.POSITIVE_INFINITY),k=o.target==="draft-04"||o.target==="openapi-3.0";if(v)if(k)u.minimum=b,u.exclusiveMinimum=!0;else u.exclusiveMinimum=b;else if(typeof p==="number")u.minimum=p;if(w)if(k)u.maximum=g,u.exclusiveMaximum=!0;else u.exclusiveMaximum=g;else if(typeof f==="number")u.maximum=f;if(typeof _==="number")if(Number.isFinite(_)&&_!==0)u.multipleOf=Math.abs(_);else F(t,o,u,c,`A multipleOf divisor of ${_} cannot be represented in JSON Schema`)},hr=(t,o,n,c)=>{n.type="boolean"},_r=(t,o,n,c)=>{F(t,o,n,c,"BigInt cannot be represented in JSON Schema")},Fs=(t,o,n,c)=>{F(t,o,n,c,"Symbols cannot be represented in JSON Schema")},gr=(t,o,n,c)=>{if(o.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},Us=(t,o,n,c)=>{F(t,o,n,c,"Undefined cannot be represented in JSON Schema")},xr=(t,o,n,c)=>{F(t,o,n,c,"Void cannot be represented in JSON Schema")},yr=(t,o,n,c)=>{n.not={}},br=(t,o,n,c)=>{},zr=(t,o,n,c)=>{},vr=(t,o,n,c)=>{F(t,o,n,c,"Date cannot be represented in JSON Schema")},$r=(t,o,n,c)=>{let u=t._zod.def,p=Fe(u.entries);if(p.length===0){n.not={};return}if(p.every((f)=>typeof f==="number"))n.type="number";if(p.every((f)=>typeof f==="string"))n.type="string";n.enum=p},wr=(t,o,n,c)=>{let u=t._zod.def;if(u.values.length===0){n.not={};return}let p=[];for(let f of u.values)if(f===void 0){if(F(t,o,n,c,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof f==="bigint"){if(F(t,o,n,c,"BigInt literals cannot be represented in JSON Schema"))return;p.push(Number(f))}else p.push(f);if(p.length===0);else if(p.length===1){let f=p[0];if(n.type=f===null?"null":typeof f,o.target==="draft-04"||o.target==="openapi-3.0")n.enum=[f];else n.const=f}else{if(p.every((f)=>typeof f==="number"))n.type="number";if(p.every((f)=>typeof f==="string"))n.type="string";if(p.every((f)=>typeof f==="boolean"))n.type="boolean";if(p.every((f)=>f===null))n.type="null";n.enum=p}},Ms=(t,o,n,c)=>{F(t,o,n,c,"NaN cannot be represented in JSON Schema")},Js=(t,o,n,c)=>{let u=n,p=t._zod.pattern;if(!p)throw Error("Pattern not found in template literal");u.type="string",u.pattern=p.source},Bs=(t,o,n,c)=>{let u=n,p={type:"string",format:"binary",contentEncoding:"binary"},{minimum:f,maximum:m,mime:_}=t._zod.bag;if(f!==void 0)p.minLength=f;if(m!==void 0)p.maxLength=m;if(_)if(_.length===1)p.contentMediaType=_[0],Object.assign(u,p);else Object.assign(u,p),u.anyOf=_.map((g)=>({contentMediaType:g}));else Object.assign(u,p)},Vs=(t,o,n,c)=>{n.type="boolean"},kr=(t,o,n,c)=>{F(t,o,n,c,"Custom types cannot be represented in JSON Schema")},Ks=(t,o,n,c)=>{F(t,o,n,c,"Function types cannot be represented in JSON Schema")},Zr=(t,o,n,c)=>{F(t,o,n,c,"Transforms cannot be represented in JSON Schema")},Ws=(t,o,n,c)=>{F(t,o,n,c,"Map cannot be represented in JSON Schema")},Gs=(t,o,n,c)=>{F(t,o,n,c,"Set cannot be represented in JSON Schema")},Pr=(t,o,n,c)=>{let u=n,p=t._zod.def,{minimum:f,maximum:m}=t._zod.bag;if(typeof f==="number")u.minItems=f;if(typeof m==="number")u.maxItems=m;u.type="array",u.items=C(p.element,o,{...c,path:[...c.path,"items"]})};function De(t){let o=t._zod.def;if(o.type==="pipe"&&o.in._zod.traits.has("$ZodTransform"))return De(o.out);if(o.type==="catch")return De(o.innerType);return t._zod.optin}var Sr=(t,o,n,c)=>{let u=n,p=t._zod.def,f=p.shape;if(Object.getOwnPropertySymbols(f).length&&F(t,o,u,c,"Symbol keys cannot be represented in JSON Schema"))return;u.type="object",u.properties={};for(let b in f)L(u.properties,b,C(f[b],o,{...c,path:[...c.path,"properties",b]}));let _=new Set(Object.keys(f)),g=new Set([..._].filter((b)=>{let v=p.shape[b];if(o.io==="input")return De(v)===void 0;else return v._zod.optout===void 0}));if(g.size>0)u.required=Array.from(g);if(p.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!p.catchall){if(o.io==="output")u.additionalProperties=!1}else if(p.catchall)u.additionalProperties=C(p.catchall,o,{...c,path:[...c.path,"additionalProperties"]})},Or=(t,o,n,c)=>{let u=t._zod.def,p=u.inclusive===!1,f=u.options.map((m,_)=>C(m,o,{...c,path:[...c.path,p?"oneOf":"anyOf",_]}));if(p)n.oneOf=f;else n.anyOf=f},Ir=(t,o,n,c)=>{let u=t._zod.def,p=C(u.left,o,{...c,path:[...c.path,"allOf",0]}),f=C(u.right,o,{...c,path:[...c.path,"allOf",1]}),m=(g)=>("allOf"in g)&&Object.keys(g).length===1,_=[...m(p)?p.allOf:[p],...m(f)?f.allOf:[f]];n.allOf=_,o.intersections.push(_)},Er=(t,o,n,c)=>{let u=n,p=t._zod.def;u.type="array";let f=o.target==="draft-2020-12"?"prefixItems":"items",m=o.target==="draft-2020-12"?"items":o.target==="openapi-3.0"?"items":"additionalItems",_=p.items.map((S,O)=>C(S,o,{...c,path:[...c.path,f,O]})),g=p.rest?C(p.rest,o,{...c,path:[...c.path,m,...o.target==="openapi-3.0"?[p.items.length]:[]]}):null,b=p.items.length;while(b>0){let S=p.items[b-1];if(!(o.io==="input"?De(S)!==void 0:S._zod.optout==="optional"))break;b--}let v=p.items.length,w=!p.rest;if(o.target==="draft-2020-12"){if(u.prefixItems=_,w)u.items=!1;else if(g)u.items=g;if(b>0)u.minItems=b;if(w)u.maxItems=v}else if(o.target==="openapi-3.0"){if(u.items={anyOf:_},g)u.items.anyOf.push(g);if(b>0)u.minItems=b;if(w)u.maxItems=v}else{if(u.items=_,w)u.additionalItems=!1;else if(g)u.additionalItems=g;if(b>0)u.minItems=b;if(w)u.maxItems=v}let{minimum:k,maximum:Z}=t._zod.bag;if(typeof k==="number")u.minItems=k;if(typeof Z==="number")u.maxItems=Z};function pr(t,o,n){if(o.$ref){if(n.has(o))return o;n.add(o);let Z=t.get(o)?.def;if(!Z)return o;let S=pr(t,Z,n);return S===Z?o:S}for(let Z of["anyOf","oneOf"]){let S=o[Z];if(!Array.isArray(S))continue;let O=S.map((J)=>pr(t,J,n));if(O.some((J,q)=>J!==S[q]))o={...o,[Z]:O}}let c=Array.isArray(o.type)?o.type:[o.type],u=!c.includes("string")&&c.some((Z)=>Z==="number"||Z==="integer"),p=o.enum??(o.const!==void 0?[o.const]:void 0);if(!u&&!p?.some((Z)=>typeof Z==="number"))return o;let{minimum:f,maximum:m,exclusiveMinimum:_,exclusiveMaximum:g,multipleOf:b,format:v,id:w,...k}=o;if(k.enum)k.enum=k.enum.map((Z)=>typeof Z==="number"?String(Z):Z);else if(typeof k.const==="number")k.const=String(k.const);if(!u)return k;if(k.type="string",!p)k.pattern=(c.includes("number")?Ie:We).source;return k}var fr=new WeakMap;function du(t){let o=new Map;for(let c of t.seen.values())if(c.def&&!o.has(c.schema))o.set(c.schema,c);let n=new Map;for(let c of fr.get(t)??[]){let u=t.seen.get(c),p=(u?.def??u?.schema)?.propertyNames;if(!p||p===!0||n.has(p))continue;let f=pr(o,p,new Set);if(f!==p)n.set(p,f)}if(!n.size)return;for(let c of t.seen.values())for(let u of[c.schema,c.def]){let p=u&&n.get(u.propertyNames);if(p)u.propertyNames=p}}var Tr=(t,o,n,c)=>{let u=n,p=t._zod.def;u.type="object";let f=p.keyType,_=f._zod.bag?.patterns;if(p.mode==="loose"&&_&&_.size>0){let v=C(p.valueType,o,{...c,path:[...c.path,"patternProperties","*"]});u.patternProperties={};for(let w of _)L(u.patternProperties,w.source,v)}else{if(o.target==="draft-07"||o.target==="draft-2020-12"){u.propertyNames=C(p.keyType,o,{...c,path:[...c.path,"propertyNames"]});let v=fr.get(o);if(!v)v=[],fr.set(o,v),o.deferred.push(()=>du(o));v.push(t)}u.additionalProperties=C(p.valueType,o,{...c,path:[...c.path,"additionalProperties"]})}let g=f._zod.values,b=o.io==="input"&&De(p.valueType)!==void 0;if(g&&!p.partial&&!b){let v=[...g].filter((w)=>typeof w==="string"||typeof w==="number");if(v.length>0)u.required=v.map(String)}},Ar=(t,o,n,c)=>{let u=t._zod.def,p=C(u.innerType,o,c),f=o.seen.get(t);if(o.target==="openapi-3.0")f.ref=u.innerType,n.nullable=!0;else n.anyOf=[p,{type:"null"}]},Nr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Cr=Symbol();function qs(t,o,n,c,u){let p=!1,f=JSON.stringify(t,(m,_)=>{if(typeof _!=="bigint")return _;return p=!0,null});if(!p)return JSON.parse(f);return F(o,n,c,u,"BigInt defaults cannot be represented in JSON Schema"),Cr}var Rr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f=qs(u.defaultValue,t,o,n,c);if(f!==Cr)n.default=f},Dr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);if(p.ref=u.innerType,o.io!=="input")return;let f=qs(u.defaultValue,t,o,n,c);if(f!==Cr)n._prefault=f},Lr=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType;let f;try{f=u.catchValue(void 0)}catch{F(t,o,n,c,"Dynamic catch values are not supported in JSON Schema");return}n.default=f},Fr=(t,o,n,c)=>{let u=t._zod.def,p=u.in._zod.traits.has("$ZodTransform"),f=o.io==="input"?p?u.out:u.in:u.out;C(f,o,c);let m=o.seen.get(t);m.ref=f},Ur=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType,n.readOnly=!0},Ys=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},it=(t,o,n,c)=>{let u=t._zod.def;C(u.innerType,o,c);let p=o.seen.get(t);p.ref=u.innerType},Mr=(t,o,n,c)=>{let u=t._zod.innerType;C(u,o,c);let p=o.seen.get(t);p.ref=u},Ls={string:dr,number:mr,boolean:hr,bigint:_r,symbol:Fs,null:gr,undefined:Us,void:xr,never:yr,any:br,unknown:zr,date:vr,enum:$r,literal:wr,nan:Ms,template_literal:Js,file:Bs,success:Vs,custom:kr,function:Ks,transform:Zr,map:Ws,set:Gs,array:Pr,object:Sr,union:Or,intersection:Ir,tuple:Er,record:Tr,nullable:Ar,nonoptional:Nr,default:Rr,prefault:Dr,catch:Lr,pipe:Fr,readonly:Ur,promise:Ys,optional:it,lazy:Mr};function ai(t,o){if("_idmap"in t){let c=t,u=Ce({...o,processors:Ls}),p={};for(let _ of c._idmap.entries()){let[g,b]=_;C(b,u)}let f={},m={registry:c,uri:o?.uri,defs:p};u.external=m;for(let _ of c._idmap.entries()){let[g,b]=_;je(u,b),L(f,g,Re(u,b))}if(Object.keys(p).length>0){let _=u.target==="draft-2020-12"?"$defs":"definitions";f.__shared={[_]:p}}return{schemas:f}}let n=Ce({...o,processors:Ls});return C(t,n),je(n,t),Re(n,t)}var Xs=new WeakSet([Object.prototype,Error.prototype]);function st(t,o,n){Object.defineProperty(t,o,{configurable:!0,enumerable:!1,get(){let c=n(this);return Object.defineProperty(this,o,{value:c,configurable:!0,writable:!0}),c},set(c){Object.defineProperty(this,o,{value:c,configurable:!0,writable:!0})}})}var zu=(t,o)=>{ii.init(t,o),t.name="ZodError";let n=Object.getPrototypeOf(t);if(Xs.has(n))return;Xs.add(n),st(n,"format",(c)=>(u)=>wt(c,u)),st(n,"flatten",(c)=>(u)=>$t(c,u)),st(n,"addIssue",(c)=>(u)=>{c.issues.push(u),c.message=JSON.stringify(c.issues,we,2)}),st(n,"addIssues",(c)=>(u)=>{c.issues.push(...u),c.message=JSON.stringify(c.issues,we,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})};var G=z("ZodError",zu,void 0,{Parent:Error});var Hs=Ve(G),Qs=Ke(G),Pu=Pe(G),Nu=Oe(G),ec=vo(G),tc=$o(G),rc=wo(G),oc=ko(G),nc=Zo(G),ic=Po(G),sc=So(G),cc=Oo(G);function $u(){if(!B.localeError)W(Kt())}function Le(){if(!B.memoizer)W({memoizer:Vt()})}var N=z("ZodType",(t,o)=>($u(),E.init(t,o),t.def=o,t.type=o.type,t),{check(...t){let o=this.def;return this.clone(ae(o,{checks:[...o.checks??[],...t.map((n)=>typeof n==="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,o){return Y(this,t,o)},brand(){return this},register(t,o){return t.add(this,o),this},refine(t,o){return this.check(fa(t,o))},superRefine(t,o){return this.check(da(t,o))},overwrite(t){return this.check(fe(t))},optional(){return Se(this)},exactOptional(){return Qu(this)},nullable(){return s(this)},nullish(){return Se(s(this))},nonoptional(t){return ia(this,t)},array(){return i(this)},or(t){return T([this,t])},and(t){return Ds(this,t)},transform(t){return ac(this,yc(t))},default(t){return ra(this,t)},prefault(t){return na(this,t)},catch(t){return ca(this,t)},pipe(t){return ac(this,t)},readonly(){return la(this)},describe(t){let o=this.clone();return pe.add(o,{description:t}),o},meta(...t){if(t.length===0)return pe.get(this);let o=this.clone();return pe.add(o,t[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...o){return o.length===0?t(this):t(this,...o)},get "~standard"(){return gt(this,"~standard",{...jt(this),jsonSchema:{input:Ne(this,"input"),output:Ne(this,"output")}})},set "~standard"(t){de(this,"~standard",t)},parse:function t(o,n){return Hs(this,o,n,{callee:t})},parseAsync:async function t(o,n){return await Qs(this,o,n,{callee:t})},safeParse(t,o){return Pu(this,t,o)},async safeParseAsync(t,o){return Nu(this,t,o)},get spa(){return this?.safeParseAsync},set spa(t){de(this,"spa",t)},encode:function t(o,n){return ec(this,o,n,{callee:t})},decode:function t(o,n){return tc(this,o,n,{callee:t})},encodeAsync:async function t(o,n){return await rc(this,o,n,{callee:t})},decodeAsync:async function t(o,n){return await oc(this,o,n,{callee:t})},safeEncode(t,o){return nc(this,t,o)},safeDecode(t,o){return ic(this,t,o)},async safeEncodeAsync(t,o){return sc(this,t,o)},async safeDecodeAsync(t,o){return cc(this,t,o)},toJSONSchema(t){return Rs(this,{})(t)},get description(){return pe.get(this)?.description},get _def(){return this._zod.def}}),lc=z("_ZodString",(t,o)=>{He.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>dr(t,c,u,p);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null},{regex(...t){return this.check(Qt(...t))},includes(...t){return this.check(rr(...t))},startsWith(...t){return this.check(or(...t))},endsWith(...t){return this.check(nr(...t))},min(...t){return this.check(ze(...t))},max(...t){return this.check(ot(...t))},length(...t){return this.check(nt(...t))},nonempty(...t){return this.check(ze(1,...t))},lowercase(t){return this.check(er(t))},uppercase(t){return this.check(tr(t))},trim(){return this.check(sr())},normalize(...t){return this.check(ir(...t))},toLowerCase(){return this.check(cr())},toUpperCase(){return this.check(ur())},slugify(){return this.check(ar())}}),Jr=z("ZodString",(t,o)=>{He.init(t,o),lc.init(t,o)},{email(t){return this.check(Wt(dc,t))},url(t){return this.check(Gt(mc,t))},jwt(t){return this.check(ms(Fu,t))},emoji(t){return this.check(ts(ku,t))},guid(t){return this.check(Yi(wu,t))},uuid(t){return this.check(Xi(ct,t))},uuidv4(t){return this.check(Hi(ct,t))},uuidv6(t){return this.check(Qi(ct,t))},uuidv7(t){return this.check(es(ct,t))},nanoid(t){return this.check(rs(Zu,t))},cuid(t){return this.check(os(Su,t))},cuid2(t){return this.check(ns(Ou,t))},ulid(t){return this.check(is(Iu,t))},base64(t){return this.check(ps(ju,t))},base64url(t){return this.check(fs(Ru,t))},xid(t){return this.check(ss(Eu,t))},ksuid(t){return this.check(us(Tu,t))},ipv4(t){return this.check(qt(hc,t))},ipv6(t){return this.check(Yt(_c,t))},cidrv4(t){return this.check(as(Au,t))},cidrv6(t){return this.check(ls(Cu,t))},e164(t){return this.check(ds(Lu,t))},datetime(t){return this.check(tt(Br,t))},date(t){return this.check(rt(Vr,t))},time(t){return this.check(Xt(pc,t))},duration(t){return this.check(Ht(fc,t))}});function e(t){return Gi(Jr,t)}var D=z("ZodStringFormat",(t,o)=>{j.init(t,o),lc.init(t,o)}),Br=z("ZodISODateTime",(t,o)=>{Kn.init(t,o),D.init(t,o)}),Vr=z("ZodISODate",(t,o)=>{Wn.init(t,o),D.init(t,o)}),pc=z("ZodISOTime",(t,o)=>{Gn.init(t,o),D.init(t,o)}),fc=z("ZodISODuration",(t,o)=>{qn.init(t,o),D.init(t,o)}),dc=z("ZodEmail",(t,o)=>{Cn.init(t,o),D.init(t,o)});function Ao(t){return Wt(dc,t)}var wu=z("ZodGUID",(t,o)=>{An.init(t,o),D.init(t,o)});var ct=z("ZodUUID",(t,o)=>{Nn.init(t,o),D.init(t,o)});var mc=z("ZodURL",(t,o)=>{Dn.init(t,o),D.init(t,o)});function li(t){return Gt(mc,t)}var ku=z("ZodEmoji",(t,o)=>{Ln.init(t,o),D.init(t,o)});var Zu=z("ZodNanoID",(t,o)=>{Fn.init(t,o),D.init(t,o)});var Su=z("ZodCUID",(t,o)=>{Un.init(t,o),D.init(t,o)});var Ou=z("ZodCUID2",(t,o)=>{Mn.init(t,o),D.init(t,o)});var Iu=z("ZodULID",(t,o)=>{Jn.init(t,o),D.init(t,o)});var Eu=z("ZodXID",(t,o)=>{Bn.init(t,o),D.init(t,o)});var Tu=z("ZodKSUID",(t,o)=>{Vn.init(t,o),D.init(t,o)});var hc=z("ZodIPv4",(t,o)=>{Yn.init(t,o),D.init(t,o)});function Sc(t){return qt(hc,t)}var _c=z("ZodIPv6",(t,o)=>{Hn.init(t,o),D.init(t,o)});function wf(t){return Yt(_c,t)}var Au=z("ZodCIDRv4",(t,o)=>{Qn.init(t,o),D.init(t,o)});var Cu=z("ZodCIDRv6",(t,o)=>{ei.init(t,o),D.init(t,o)});var ju=z("ZodBase64",(t,o)=>{ri.init(t,o),D.init(t,o)});var Ru=z("ZodBase64URL",(t,o)=>{oi.init(t,o),D.init(t,o)});var Lu=z("ZodE164",(t,o)=>{ni.init(t,o),D.init(t,o)});var Fu=z("ZodJWT",(t,o)=>{si.init(t,o),D.init(t,o)});var at=z("ZodNumber",(t,o)=>{Lt.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>mr(t,c,u,p);let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),t.isFinite=!0,t.format=n.format??null},{gt(t,o){return this.check(be(t,o))},gte(t,o){return this.check(ce(t,o))},min(t,o){return this.check(ce(t,o))},lt(t,o){return this.check(ye(t,o))},lte(t,o){return this.check(ie(t,o))},max(t,o){return this.check(ie(t,o))},int(t){return this.check(h(t))},safe(t){return this.check(h(t))},positive(t){return this.check(be(0,t))},nonnegative(t){return this.check(ce(0,t))},negative(t){return this.check(ye(0,t))},nonpositive(t){return this.check(ie(0,t))},multipleOf(t,o){return this.check(Te(t,o))},step(t,o){return this.check(Te(t,o))},finite(){return this}});function a(t){return hs(at,t)}var Uu=z("ZodNumberFormat",(t,o)=>{ui.init(t,o),at.init(t,o)});function h(t){return gs(Uu,t)}var Kr=z("ZodBoolean",(t,o)=>{pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>hr(t,n,c,u)});function d(t){return xs(Kr,t)}var gc=z("ZodBigInt",(t,o)=>{fi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>_r(t,c,u,p);let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null},{gte(t,o){return this.check(ce(t,o))},min(t,o){return this.check(ce(t,o))},gt(t,o){return this.check(be(t,o))},lt(t,o){return this.check(ye(t,o))},lte(t,o){return this.check(ie(t,o))},max(t,o){return this.check(ie(t,o))},positive(t){return this.check(be(BigInt(0),t))},negative(t){return this.check(ye(BigInt(0),t))},nonpositive(t){return this.check(ie(BigInt(0),t))},nonnegative(t){return this.check(ce(BigInt(0),t))},multipleOf(t,o){return this.check(Te(t,o))}});var Mu=z("ZodNull",(t,o)=>{di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>gr(t,n,c,u)});function _o(t){return zs(Mu,t)}var Ju=z("ZodAny",(t,o)=>{mi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>br(t,n,c,u)});function x(){return vs(Ju)}var Bu=z("ZodUnknown",(t,o)=>{hi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>zr(t,n,c,u)});function U(){return $s(Bu)}var Vu=z("ZodNever",(t,o)=>{_i.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>yr(t,n,c,u)});function xf(t){return ws(Vu,t)}var Ku=z("ZodVoid",(t,o)=>{gi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>xr(t,n,c,u)});function Rt(t){return ks(Ku,t)}var Wr=z("ZodDate",(t,o)=>{xi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>vr(t,c,u,p),t.min=(c,u)=>t.check(ce(c,u)),t.max=(c,u)=>t.check(ie(c,u));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function te(t){return Zs(Wr,t)}var Wu=z("ZodArray",(t,o)=>{Le(),yi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Pr(t,n,c,u),t.element=o.element},{min(t,o){return this.check(ze(t,o))},nonempty(t){return this.check(ze(1,t))},max(t,o){return this.check(ot(t,o))},length(t,o){return this.check(nt(t,o))},unwrap(){return this.element}});function i(t,o){return Ss(Wu,t,o)}var va=z("ZodObject",(t,o)=>{Le(),vi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Sr(t,n,c,u),Dc(t,"shape",(n)=>n._zod.def.shape,!1)},{keyof(){return A(Object.keys(this._zod.def.shape))},catchall(t){return this.clone({...this._zod.def,catchall:t})},passthrough(){return this.clone({...this._zod.def,catchall:U()})},loose(){return this.clone({...this._zod.def,catchall:U()})},strict(){return this.clone({...this._zod.def,catchall:xf()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(t){return Oc(this,t)},safeExtend(t){return Ic(this,t)},merge(t){return Tc(this,t)},pick(t){return Zc(this,t)},omit(t){return Pc(this,t)},partial(...t){return ao(wa,this,t[0])},exactPartial(...t){return ao(bc,this,t[0],"exactPartial")},required(...t){return Ac(zc,this,t[0])}});function r(t,o){let n={type:"object",shape:t??{},...P(o)};return new va(n)}function se(t,o){return new va({type:"object",shape:t,catchall:U(),...P(o)})}var xc=z("ZodUnion",(t,o)=>{Ft.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Or(t,n,c,u),t.options=o.options});function T(t,o){return new xc({type:"union",options:t,...P(o)})}var Gu=z("ZodDiscriminatedUnion",(t,o)=>{xc.init(t,o),wi.init(t,o)});function re(t,o,n){return new Gu({type:"union",options:o,discriminator:t,...P(n)})}var qu=z("ZodIntersection",(t,o)=>{ki.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ir(t,n,c,u)});function Ds(t,o){return new qu({type:"intersection",left:t,right:o})}var Yu=z("ZodTuple",(t,o)=>{Le(),Zi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Er(t,n,c,u)},{rest(t){return this.clone({...this._zod.def,rest:t})},partial(){let t=this._zod.def;if(t.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...t,items:t.items.map((o)=>new wa({type:"optional",innerType:o}))})}});function $i(t,o,n){let c=o instanceof E,u=c?n:o;return new Yu({type:"tuple",items:t,rest:c?o:null,...P(u)})}var uc=z("ZodRecord",(t,o)=>{Le(),Pi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Tr(t,n,c,u),t.keyType=o.keyType,t.valueType=o.valueType});function y(t,o,n){if(!o||!o._zod)return new uc({type:"record",keyType:e(),valueType:t,...P(o)});return new uc({type:"record",keyType:t,valueType:o,...P(n)})}var ut=z("ZodEnum",(t,o)=>{Si.init(t,o),N.init(t,o),t._zod.processJSONSchema=(c,u,p)=>$r(t,c,u,p),t.enum=o.entries,t.options=Object.values(o.entries);let n=new Set(Object.keys(o.entries));t.extract=(c,u)=>{let p={};for(let f of c)if(n.has(f))p[f]=o.entries[f];else throw Error(`Key ${f} not found in enum`);return new ut({...o,checks:[],...P(u),entries:p})},t.exclude=(c,u)=>{let p={...o.entries};for(let f of c)if(n.has(f))delete p[f];else throw Error(`Key ${f} not found in enum`);return new ut({...o,checks:[],...P(u),entries:p})}});function A(t,o){let n=Array.isArray(t)?Object.fromEntries(t.map((c)=>[c,c])):t;return new ut({type:"enum",entries:n,...P(o)})}function Dt(t,o){return new ut({type:"enum",entries:t,...P(o)})}var Xu=z("ZodLiteral",(t,o)=>{Oi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>wr(t,n,c,u),t.values=new Set(o.values),Object.defineProperty(t,"value",{get(){if(o.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return o.values[0]}})});function l(t,o){return new Xu({type:"literal",values:Array.isArray(t)?t:[t],...P(o)})}var Hu=z("ZodTransform",(t,o)=>{Le(),Ii.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Zr(t,n,c,u),t._zod.parse=(n,c)=>{if(c.direction==="backward")throw new Ze(t.constructor.name);n.addIssue=(p)=>{if(typeof p==="string")n.issues.push(_e(p,n.value,o));else{let f=p;if(f.fatal)f.continue=!1;if(f.code??(f.code="custom"),!("input"in f))f.input=n.value;f.inst??(f.inst=t),n.issues.push(_e(f))}};let u=o.transform(n.value,n);if(u instanceof Promise)return u.then((p)=>(n.value=p,n));return n.value=u,n}});function yc(t){return new Hu({type:"transform",transform:t})}var wa=z("ZodOptional",(t,o)=>{Ut.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Se(t){return new wa({type:"optional",innerType:t})}var bc=z("ZodExactOptional",(t,o)=>{Ei.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>it(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function Qu(t){return new bc({type:"optional",innerType:t})}var ea=z("ZodNullable",(t,o)=>{Ti.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ar(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function s(t){return new ea({type:"nullable",innerType:t})}var ta=z("ZodDefault",(t,o)=>{Ai.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Rr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function ra(t,o){return new ta({type:"default",innerType:t,get defaultValue(){return typeof o==="function"?o():mt(o)}})}var oa=z("ZodPrefault",(t,o)=>{Ni.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Dr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function na(t,o){return new oa({type:"prefault",innerType:t,get defaultValue(){return typeof o==="function"?o():mt(o)}})}var zc=z("ZodNonOptional",(t,o)=>{Ci.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Nr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function ia(t,o){return new zc({type:"nonoptional",innerType:t,...P(o)})}var sa=z("ZodCatch",(t,o)=>{ji.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Lr(t,n,c,u),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function ca(t,o){return new sa({type:"catch",innerType:t,catchValue:typeof o==="function"?o:mo(o)})}var vc=z("ZodPipe",(t,o)=>{Mt.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Fr(t,n,c,u),t.in=o.in,t.out=o.out});function ac(t,o){return new vc({type:"pipe",in:t,out:o})}var ua=z("ZodPreprocess",(t,o)=>{vc.init(t,o),Ri.init(t,o)}),aa=z("ZodReadonly",(t,o)=>{Di.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Ur(t,n,c,u),t.unwrap=()=>t._zod.def.innerType});function la(t){return new aa({type:"readonly",innerType:t})}var pa=z("ZodLazy",(t,o)=>{Li.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>Mr(t,n,c,u),t.unwrap=()=>t._zod.def.getter()});function Ct(t){return new pa({type:"lazy",getter:t})}var Gr=z("ZodCustom",(t,o)=>{Fi.init(t,o),N.init(t,o),t._zod.processJSONSchema=(n,c,u)=>kr(t,n,c,u)});function St(t,o){return Os(Gr,t??(()=>!0),o)}function fa(t,o={}){return Is(Gr,t,o)}function da(t,o){return Es(t,o)}function Du(t,o={}){let n=new Gr({type:"custom",check:"custom",fn:(c)=>c instanceof t,abort:!0,...P(o)});return n._zod.bag.Class=t,n._zod.check=(c)=>{if(!(c.value instanceof t))c.issues.push({code:"invalid_type",expected:t.name,input:c.value,inst:n,path:[...n._zod.def.path??[]]})},n}function ci(t){let o=Ct(()=>T([e(t),a(),d(),_o(),i(o),y(e(),o)]));return o}function xa(t,o){return new ua({type:"pipe",in:yc(t),out:o})}function ee(t){return tt(Br,t)}function o0(t){return rt(Vr,t)}function Rm(t){return qi(Jr,t)}function Pm(t){return _s(at,t)}function Ec(t){return ys(Kr,t)}function _a(t){return bs(gc,t)}function ga(t){return Ps(Wr,t)}export{jr,ii,vf,ai,Pu,Nu,e,Ao,li,Sc,wf,a,h,d,_o,x,U,xf,Rt,te,i,va,r,se,T,re,Ds,$i,y,A,Dt,l,wa,Se,s,Ct,St,Du,ci,xa,ee,o0,Rm,Pm,Ec,cs};
|