likec4 1.52.0 → 1.53.0
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/__app__/src/likec4.js +34 -48
- package/__app__/src/routes/index.js +7 -0
- package/__app__/src/routes/single.js +30 -18
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +2065 -2809
- package/config/schema.json +56 -0
- package/dist/THIRD-PARTY-LICENSES.md +10 -2
- package/dist/_chunks/filesystem.mjs +70 -68
- package/dist/_chunks/index.d.mts +10 -1
- package/dist/_chunks/index2.d.mts +76 -4
- package/dist/_chunks/libs/@hono/mcp.mjs +1 -1
- package/dist/_chunks/libs/@logtape/logtape.d.mts +1021 -0
- package/dist/_chunks/libs/@logtape/logtape.mjs +4 -6
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +1 -1
- package/dist/_chunks/libs/@nanostores/react.d.mts +5 -5
- package/dist/_chunks/libs/destr.mjs +1 -0
- package/dist/_chunks/libs/fast-equals.mjs +1 -1
- package/dist/_chunks/libs/langium.mjs +1 -1
- package/dist/_chunks/libs/remeda.mjs +2 -2
- package/dist/_chunks/libs/tinyrainbow.mjs +1 -1
- package/dist/_chunks/libs/unstorage.mjs +1 -0
- package/dist/_chunks/node.mjs +1 -0
- package/dist/_chunks/sequence.mjs +1 -1
- package/dist/_chunks/src.mjs +14 -12
- package/dist/_chunks/src2.mjs +46 -46
- package/dist/cli/index.mjs +164 -84
- package/dist/index.d.mts +16 -819
- package/dist/index.mjs +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal.mjs +1 -1
- package/package.json +34 -33
- package/react/index.d.mts +24 -20
- package/react/index.mjs +969 -1728
- package/vite-plugin-modules.d.ts +5 -0
- package/dist/_chunks/LikeC4.mjs +0 -1
- package/dist/_chunks/libs/boxen.d.mts +0 -1
|
@@ -26,7 +26,7 @@ import{r as e}from"../../rolldown-runtime.mjs";const t=Object.freeze({status:`ab
|
|
|
26
26
|
path: iss.path ? [${se(e)}, ...iss.path] : [${se(e)}]
|
|
27
27
|
})));`),t.write(`newResult[${se(e)}] = ${n}.value`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},i,o=le,s=!a.jitless,c=s&&ue.value,l=t.catchall,u;e._zod.parse=(a,d)=>{u??=n.value;let f=a.value;if(!o(f))return a.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),a;let p=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)i||=r(t.shape),a=i(a,d);else{a.value={};let e=u.shape;for(let t of u.keys){let n=e[t],r=n._zod.run({value:f[t],issues:[]},d),i=n._zod.optin===`optional`&&n._zod.optout===`optional`;r instanceof Promise?p.push(r.then(e=>i?nr(e,a,t,f):tr(e,a,t))):i?nr(r,a,t,f):tr(r,a,t)}}if(!l)return p.length?Promise.all(p).then(()=>a):a;let m=[],ee=u.keySet,te=l._zod,h=te.def.type;for(let e of Object.keys(f)){if(ee.has(e))continue;if(h===`never`){m.push(e);continue}let t=te.run({value:f[e],issues:[]},d);t instanceof Promise?p.push(t.then(t=>tr(t,a,e))):tr(t,a,e)}return m.length&&a.issues.push({code:`unrecognized_keys`,keys:m,input:f,inst:e}),p.length?Promise.all(p).then(()=>a):a}});function ir(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>S(e,r,o())))}),t}const ar=n(`$ZodUnion`,(e,t)=>{w.init(e,t),_(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),_(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),_(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),_(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>g(e.source)).join(`|`)})$`)}}),e._zod.parse=(n,r)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),i=!0;else{if(t.issues.length===0)return t;a.push(t)}}return i?Promise.all(a).then(t=>ir(t,n,e,r)):ir(a,n,e,r)}}),or=n(`$ZodDiscriminatedUnion`,(e,t)=>{ar.init(e,t);let n=e._zod.parse;_(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=te(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!le(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,input:o,path:[t.discriminator],inst:e}),i)}}),sr=n(`$ZodIntersection`,(e,t)=>{w.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>lr(e,t,n)):lr(e,i,a)}});function cr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(de(e)&&de(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=cr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=cr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function lr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),De(e))return e;let r=cr(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const ur=n(`$ZodTuple`,(e,t)=>{w.init(e,t);let n=t.items,r=n.length-[...n].reverse().findIndex(e=>e._zod.optin!==`optional`);e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=[];let s=[];if(!t.rest){let t=o.length>n.length,a=o.length<r-1;if(t||a)return i.issues.push({input:o,inst:e,origin:`array`,...t?{code:`too_big`,maximum:n.length}:{code:`too_small`,minimum:n.length}}),i}let c=-1;for(let e of n){if(c++,c>=o.length&&c>=r)continue;let t=e._zod.run({value:o[c],issues:[]},a);t instanceof Promise?s.push(t.then(e=>dr(e,i,c))):dr(t,i,c)}if(t.rest){let e=o.slice(n.length);for(let n of e){c++;let e=t.rest._zod.run({value:n,issues:[]},a);e instanceof Promise?s.push(e.then(e=>dr(e,i,c))):dr(e,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});function dr(e,t,n){e.issues.length&&t.issues.push(...x(n,e.issues)),t.value[n]=e.value}const fr=n(`$ZodRecord`,(e,t)=>{w.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!de(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...x(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...x(e,o.issues)),n.value[e]=o.value)}let s;for(let e in i)o.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:s})}else{n.value={};for(let s of Reflect.ownKeys(i)){if(s===`__proto__`)continue;let c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(c.issues.length){n.issues.push({origin:`record`,code:`invalid_key`,issues:c.issues.map(e=>S(e,r,o())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}let l=t.valueType._zod.run({value:i[s],issues:[]},r);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&n.issues.push(...x(s,e.issues)),n.value[c.value]=e.value})):(l.issues.length&&n.issues.push(...x(s,l.issues)),n.value[c.value]=l.value)}}return a.length?Promise.all(a).then(()=>n):n}}),pr=n(`$ZodMap`,(e,t)=>{w.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{mr(t,a,n,o,i,e,r)})):mr(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}});function mr(e,t,n,r,i,a,s){e.issues.length&&(me.has(typeof r)?n.issues.push(...x(r,e.issues)):n.issues.push({origin:`map`,code:`invalid_key`,input:i,inst:a,issues:e.issues.map(e=>S(e,s,o()))})),t.issues.length&&(me.has(typeof r)?n.issues.push(...x(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>S(e,s,o()))})),n.value.set(e.value,t.value)}const hr=n(`$ZodSet`,(e,t)=>{w.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>gr(e,n))):gr(i,n)}return a.length?Promise.all(a).then(()=>n):n}});function gr(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const _r=n(`$ZodEnum`,(e,t)=>{w.init(e,t);let n=p(t.entries);e._zod.values=new Set(n),e._zod.pattern=RegExp(`^(${n.filter(e=>me.has(typeof e)).map(e=>typeof e==`string`?ge(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,r)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:`invalid_value`,values:n,input:i,inst:e}),t}}),vr=n(`$ZodLiteral`,(e,t)=>{w.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?ge(e):e?e.toString():String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),yr=n(`$ZodFile`,(e,t)=>{w.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),br=n(`$ZodTransform`,(e,t)=>{w.init(e,t),e._zod.parse=(e,n)=>{let r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(t=>(e.value=t,e));if(r instanceof Promise)throw new i;return e.value=r,e}}),xr=n(`$ZodOptional`,(e,t)=>{w.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${g(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>t.innerType._zod.optin===`optional`?t.innerType._zod.run(e,n):e.value===void 0?e:t.innerType._zod.run(e,n)}),Sr=n(`$ZodNullable`,(e,t)=>{w.init(e,t),_(e._zod,`optin`,()=>t.innerType._zod.optin),_(e._zod,`optout`,()=>t.innerType._zod.optout),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${g(e.source)}|null)$`):void 0}),_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Cr=n(`$ZodDefault`,(e,t)=>{w.init(e,t),e._zod.optin=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>wr(e,t)):wr(r,t)}});function wr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Tr=n(`$ZodPrefault`,(e,t)=>{w.init(e,t),e._zod.optin=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Er=n(`$ZodNonOptional`,(e,t)=>{w.init(e,t),_(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Dr(t,e)):Dr(i,e)}});function Dr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const Or=n(`$ZodSuccess`,(e,t)=>{w.init(e,t),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),kr=n(`$ZodCatch`,(e,t)=>{w.init(e,t),e._zod.optin=`optional`,_(e._zod,`optout`,()=>t.innerType._zod.optout),_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>S(e,n,o()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>S(e,n,o()))},input:e.value}),e.issues=[]),e)}}),Ar=n(`$ZodNaN`,(e,t)=>{w.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),jr=n(`$ZodPipe`,(e,t)=>{w.init(e,t),_(e._zod,`values`,()=>t.in._zod.values),_(e._zod,`optin`,()=>t.in._zod.optin),_(e._zod,`optout`,()=>t.out._zod.optout),e._zod.parse=(e,n)=>{let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Mr(e,t,n)):Mr(r,t,n)}});function Mr(e,t,n){return De(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const Nr=n(`$ZodReadonly`,(e,t)=>{w.init(e,t),_(e._zod,`propValues`,()=>t.innerType._zod.propValues),_(e._zod,`values`,()=>t.innerType._zod.values),_(e._zod,`optin`,()=>t.innerType._zod.optin),_(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Pr):Pr(r)}});function Pr(e){return e.value=Object.freeze(e.value),e}const Fr=n(`$ZodTemplateLiteral`,(e,t)=>{w.init(e,t);let n=[];for(let e of t.parts)if(e instanceof w){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=t.startsWith(`^`)?1:0,i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||he.has(typeof e))n.push(ge(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(t,n)=>typeof t.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(t.value)||t.issues.push({input:t.value,inst:e,code:`invalid_format`,format:`template_literal`,pattern:e._zod.pattern.source}),t):(t.issues.push({input:t.value,inst:e,expected:`template_literal`,code:`invalid_type`}),t)}),Ir=n(`$ZodPromise`,(e,t)=>{w.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Lr=n(`$ZodLazy`,(e,t)=>{w.init(e,t),_(e._zod,`innerType`,()=>t.getter()),_(e._zod,`pattern`,()=>e._zod.innerType._zod.pattern),_(e._zod,`propValues`,()=>e._zod.innerType._zod.propValues),_(e._zod,`optin`,()=>e._zod.innerType._zod.optin),_(e._zod,`optout`,()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Rr=n(`$ZodCustom`,(e,t)=>{C.init(e,t),w.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>zr(t,n,r,e));zr(i,n,r,e)}});function zr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(je(e))}}const Br=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,jwt:`JWT`,template_literal:`مدخل`};return e=>{switch(e.code){case`invalid_type`:return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${b(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${r[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${m(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}};function Vr(){return{localeError:Br()}}const Hr=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${b(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}};function Ur(){return{localeError:Hr()}}function Wr(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}const Gr=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`лік`;case`object`:if(Array.isArray(e))return`масіў`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,jwt:`JWT`,template_literal:`увод`};return e=>{switch(e.code){case`invalid_type`:return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${b(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Wr(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Wr(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${r[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}};function Kr(){return{localeError:Gr()}}const qr=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`};return e=>{switch(e.code){case`invalid_type`:return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${b(e.values[0])}`:`Opció invàlida: s'esperava una de ${m(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${r[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}};function Jr(){return{localeError:qr()}}const Yr=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`číslo`;case`string`:return`řetězec`;case`boolean`:return`boolean`;case`bigint`:return`bigint`;case`function`:return`funkce`;case`symbol`:return`symbol`;case`undefined`:return`undefined`;case`object`:if(Array.isArray(e))return`pole`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,jwt:`JWT`,template_literal:`vstup`};return e=>{switch(e.code){case`invalid_type`:return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${b(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${r[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${m(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}};function Xr(){return{localeError:Yr()}}const Zr=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`Zahl`;case`object`:if(Array.isArray(e))return`Array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,jwt:`JWT`,template_literal:`Eingabe`};return e=>{switch(e.code){case`invalid_type`:return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${b(e.values[0])}`:`Ungültige Option: erwartet eine von ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}};function Qr(){return{localeError:Zr()}}const $r=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},ei=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`}};function t(t){return e[t]??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`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${e.expected}, received ${$r(e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${b(e.values[0])}`:`Invalid option: expected one of ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ti(){return{localeError:ei()}}const ni=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombro`;case`object`:if(Array.isArray(e))return`tabelo`;if(e===null)return`senvalora`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},ri=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,jwt:`JWT`,template_literal:`enigo`};return e=>{switch(e.code){case`invalid_type`:return`Nevalida enigo: atendiĝis ${e.expected}, riceviĝis ${ni(e.input)}`;case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${b(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}};function ii(){return{localeError:ri()}}const ai=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`número`;case`object`:if(Array.isArray(e))return`arreglo`;if(e===null)return`nulo`;if(Object.getPrototypeOf(e)!==Object.prototype)return e.constructor.name}return t},r={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`};return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: se esperaba ${e.expected}, recibido ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${b(e.values[0])}`:`Opción inválida: se esperaba una de ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: se esperaba que ${e.origin??`valor`} tuviera ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: se esperaba que ${e.origin??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeño: se esperaba que ${e.origin} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${e.origin} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${r[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${e.origin}`;default:return`Entrada inválida`}}};function oi(){return{localeError:ai()}}const si=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`عدد`;case`object`:if(Array.isArray(e))return`آرایه`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`};return e=>{switch(e.code){case`invalid_type`:return`ورودی نامعتبر: میبایست ${e.expected} میبود، ${n(e.input)} دریافت شد`;case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${b(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${m(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${r[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${m(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}};function ci(){return{localeError:si()}}const li=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,jwt:`JWT`,template_literal:`templaattimerkkijono`};return e=>{switch(e.code){case`invalid_type`:return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${b(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${r[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}};function ui(){return{localeError:li()}}const di=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombre`;case`object`:if(Array.isArray(e))return`tableau`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`entrée`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`};return e=>{switch(e.code){case`invalid_type`:return`Entrée invalide : ${e.expected} attendu, ${n(e.input)} reçu`;case`invalid_value`:return e.values.length===1?`Entrée invalide : ${b(e.values[0])} attendu`:`Option invalide : une valeur parmi ${m(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Trop grand : ${e.origin??`valeur`} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`élément(s)`}`:`Trop grand : ${e.origin??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${r[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${m(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}};function fi(){return{localeError:di()}}const pi=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`};return e=>{switch(e.code){case`invalid_type`:return`Entrée invalide : attendu ${e.expected}, reçu ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${b(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${r[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${m(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}};function mi(){return{localeError:pi()}}const hi=()=>{let e={string:{unit:`אותיות`,verb:`לכלול`},file:{unit:`בייטים`,verb:`לכלול`},array:{unit:`פריטים`,verb:`לכלול`},set:{unit:`פריטים`,verb:`לכלול`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`קלט`,email:`כתובת אימייל`,url:`כתובת רשת`,emoji:`אימוג'י`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`תאריך וזמן ISO`,date:`תאריך ISO`,time:`זמן ISO`,duration:`משך זמן ISO`,ipv4:`כתובת IPv4`,ipv6:`כתובת IPv6`,cidrv4:`טווח IPv4`,cidrv6:`טווח IPv6`,base64:`מחרוזת בבסיס 64`,base64url:`מחרוזת בבסיס 64 לכתובות רשת`,json_string:`מחרוזת JSON`,e164:`מספר E.164`,jwt:`JWT`,template_literal:`קלט`};return e=>{switch(e.code){case`invalid_type`:return`קלט לא תקין: צריך ${e.expected}, התקבל ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`קלט לא תקין: צריך ${b(e.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`גדול מדי: ${e.origin??`value`} צריך להיות ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`גדול מדי: ${e.origin??`value`} צריך להיות ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()} ${r.unit}`:`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`מחרוזת לא תקינה: חייבת להתחיל ב"${t.prefix}"`:t.format===`ends_with`?`מחרוזת לא תקינה: חייבת להסתיים ב "${t.suffix}"`:t.format===`includes`?`מחרוזת לא תקינה: חייבת לכלול "${t.includes}"`:t.format===`regex`?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${t.pattern}`:`${r[t.format]??e.format} לא תקין`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case`unrecognized_keys`:return`מפתח${e.keys.length>1?`ות`:``} לא מזוה${e.keys.length>1?`ים`:`ה`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`מפתח לא תקין ב${e.origin}`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${e.origin}`;default:return`קלט לא תקין`}}};function gi(){return{localeError:hi()}}const _i=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`szám`;case`object`:if(Array.isArray(e))return`tömb`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,jwt:`JWT`,template_literal:`bemenet`};return e=>{switch(e.code){case`invalid_type`:return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${b(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}};function vi(){return{localeError:_i()}}const yi=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`Input tidak valid: diharapkan ${e.expected}, diterima ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${b(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${r[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}};function bi(){return{localeError:yi()}}const xi=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`numero`;case`object`:if(Array.isArray(e))return`vettore`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`Input non valido: atteso ${e.expected}, ricevuto ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${b(e.values[0])}`:`Opzione non valida: atteso uno tra ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${r[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}};function Si(){return{localeError:xi()}}const Ci=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`数値`;case`object`:if(Array.isArray(e))return`配列`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,jwt:`JWT`,template_literal:`入力値`};return e=>{switch(e.code){case`invalid_type`:return`無効な入力: ${e.expected}が期待されましたが、${n(e.input)}が入力されました`;case`invalid_value`:return e.values.length===1?`無効な入力: ${b(e.values[0])}が期待されました`:`無効な選択: ${m(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${r[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${m(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}};function wi(){return{localeError:Ci()}}const Ti=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`មិនមែនជាលេខ (NaN)`:`លេខ`;case`object`:if(Array.isArray(e))return`អារេ (Array)`;if(e===null)return`គ្មានតម្លៃ (null)`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`};return e=>{switch(e.code){case`invalid_type`:return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${b(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${m(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}};function Ei(){return{localeError:Ti()}}const Di=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,jwt:`JWT`,template_literal:`입력`};return e=>{switch(e.code){case`invalid_type`:return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${n(e.input)}입니다`;case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${b(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${m(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${m(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}};function Oi(){return{localeError:Di()}}const ki=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`број`;case`object`:if(Array.isArray(e))return`низа`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,jwt:`JWT`,template_literal:`внес`};return e=>{switch(e.code){case`invalid_type`:return`Грешен внес: се очекува ${e.expected}, примено ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${b(e.values[0])}`:`Грешана опција: се очекува една ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${r[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}};function Ai(){return{localeError:ki()}}const ji=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`nombor`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`Input tidak sah: dijangka ${e.expected}, diterima ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${b(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${r[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${m(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}};function Mi(){return{localeError:ji()}}const Ni=()=>{let e={string:{unit:`tekens`},file:{unit:`bytes`},array:{unit:`elementen`},set:{unit:`elementen`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`getal`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`invoer`};return e=>{switch(e.code){case`invalid_type`:return`Ongeldige invoer: verwacht ${e.expected}, ontving ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${b(e.values[0])}`:`Ongeldige optie: verwacht één van ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Te lang: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} bevat`:`Te lang: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} bevat`:`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}};function Pi(){return{localeError:Ni()}}const Fi=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`tall`;case`object`:if(Array.isArray(e))return`liste`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`Ugyldig input: forventet ${e.expected}, fikk ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${b(e.values[0])}`:`Ugyldig valg: forventet en av ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}};function Ii(){return{localeError:Fi()}}const Li=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`numara`;case`object`:if(Array.isArray(e))return`saf`;if(e===null)return`gayb`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`giren`};return e=>{switch(e.code){case`invalid_type`:return`Fâsit giren: umulan ${e.expected}, alınan ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${b(e.values[0])}`:`Fâsit tercih: mûteberler ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${r[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}};function Ri(){return{localeError:Li()}}const zi=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`عدد`;case`object`:if(Array.isArray(e))return`ارې`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,jwt:`JWT`,template_literal:`ورودي`};return e=>{switch(e.code){case`invalid_type`:return`ناسم ورودي: باید ${e.expected} وای, مګر ${n(e.input)} ترلاسه شو`;case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${b(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${m(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${r[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}};function Bi(){return{localeError:zi()}}const Vi=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`liczba`;case`object`:if(Array.isArray(e))return`tablica`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,jwt:`JWT`,template_literal:`wejście`};return e=>{switch(e.code){case`invalid_type`:return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${b(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${r[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}};function Hi(){return{localeError:Vi()}}const Ui=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`número`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`nulo`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`padrão`,email:`endereço de e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`duração ISO`,ipv4:`endereço IPv4`,ipv6:`endereço IPv6`,cidrv4:`faixa de IPv4`,cidrv6:`faixa de IPv6`,base64:`texto codificado em base64`,base64url:`URL codificada em base64`,json_string:`texto JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`};return e=>{switch(e.code){case`invalid_type`:return`Tipo inválido: esperado ${e.expected}, recebido ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${b(e.values[0])}`:`Opção inválida: esperada uma das ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${r[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}};function Wi(){return{localeError:Ui()}}function Gi(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}const Ki=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`число`;case`object`:if(Array.isArray(e))return`массив`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,jwt:`JWT`,template_literal:`ввод`};return e=>{switch(e.code){case`invalid_type`:return`Неверный ввод: ожидалось ${e.expected}, получено ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${b(e.values[0])}`:`Неверный вариант: ожидалось одно из ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Gi(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Gi(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${r[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}};function qi(){return{localeError:Ki()}}const Ji=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`število`;case`object`:if(Array.isArray(e))return`tabela`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,jwt:`JWT`,template_literal:`vnos`};return e=>{switch(e.code){case`invalid_type`:return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${b(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${r[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}};function Yi(){return{localeError:Ji()}}const Xi=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`antal`;case`object`:if(Array.isArray(e))return`lista`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-intervall`,ipv6:`IPv6-intervall`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`mall-literal`};return e=>{switch(e.code){case`invalid_type`:return`Ogiltig inmatning: förväntat ${e.expected}, fick ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${b(e.values[0])}`:`Ogiltigt val: förväntade en av ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${r[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}};function Zi(){return{localeError:Xi()}}const Qi=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`எண் அல்லாதது`:`எண்`;case`object`:if(Array.isArray(e))return`அணி`;if(e===null)return`வெறுமை`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,jwt:`JWT`,template_literal:`input`};return e=>{switch(e.code){case`invalid_type`:return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${b(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${m(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}};function $i(){return{localeError:Qi()}}const ea=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`ไม่ใช่ตัวเลข (NaN)`:`ตัวเลข`;case`object`:if(Array.isArray(e))return`อาร์เรย์ (Array)`;if(e===null)return`ไม่มีค่า (null)`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`};return e=>{switch(e.code){case`invalid_type`:return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${b(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${m(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}};function ta(){return{localeError:ea()}}const na=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},ra=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`Şablon dizesi`};return e=>{switch(e.code){case`invalid_type`:return`Geçersiz değer: beklenen ${e.expected}, alınan ${na(e.input)}`;case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${b(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}};function ia(){return{localeError:ra()}}const aa=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`число`;case`object`:if(Array.isArray(e))return`масив`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,jwt:`JWT`,template_literal:`вхідні дані`};return e=>{switch(e.code){case`invalid_type`:return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${b(e.values[0])}`:`Неправильна опція: очікується одне з ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${r[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${m(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}};function oa(){return{localeError:aa()}}const sa=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`نمبر`;case`object`:if(Array.isArray(e))return`آرے`;if(e===null)return`نل`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`};return e=>{switch(e.code){case`invalid_type`:return`غلط ان پٹ: ${e.expected} متوقع تھا، ${n(e.input)} موصول ہوا`;case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${b(e.values[0])} متوقع تھا`:`غلط آپشن: ${m(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${r[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${m(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}};function ca(){return{localeError:sa()}}const la=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`số`;case`object`:if(Array.isArray(e))return`mảng`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,jwt:`JWT`,template_literal:`đầu vào`};return e=>{switch(e.code){case`invalid_type`:return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${b(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${r[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${m(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}};function ua(){return{localeError:la()}}const da=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`非数字(NaN)`:`数字`;case`object`:if(Array.isArray(e))return`数组`;if(e===null)return`空值(null)`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,jwt:`JWT`,template_literal:`输入`};return e=>{switch(e.code){case`invalid_type`:return`无效输入:期望 ${e.expected},实际接收 ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`无效输入:期望 ${b(e.values[0])}`:`无效选项:期望以下之一 ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${r[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${m(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}};function fa(){return{localeError:da()}}const pa=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n=e=>{let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`NaN`:`number`;case`object`:if(Array.isArray(e))return`array`;if(e===null)return`null`;if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t},r={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,jwt:`JWT`,template_literal:`輸入`};return e=>{switch(e.code){case`invalid_type`:return`無效的輸入值:預期為 ${e.expected},但收到 ${n(e.input)}`;case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${b(e.values[0])}`:`無效的選項:預期為以下其中之一 ${m(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${r[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${m(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}};function ma(){return{localeError:pa()}}var ha=e({ar:()=>Vr,az:()=>Ur,be:()=>Kr,ca:()=>Jr,cs:()=>Xr,de:()=>Qr,en:()=>ti,eo:()=>ii,es:()=>oi,fa:()=>ci,fi:()=>ui,fr:()=>fi,frCA:()=>mi,he:()=>gi,hu:()=>vi,id:()=>bi,it:()=>Si,ja:()=>wi,kh:()=>Ei,ko:()=>Oi,mk:()=>Ai,ms:()=>Mi,nl:()=>Pi,no:()=>Ii,ota:()=>Ri,pl:()=>Hi,ps:()=>Bi,pt:()=>Wi,ru:()=>qi,sl:()=>Yi,sv:()=>Zi,ta:()=>$i,th:()=>ta,tr:()=>ia,ua:()=>oa,ur:()=>ca,vi:()=>ua,zhCN:()=>fa,zhTW:()=>ma});const ga=Symbol(`ZodOutput`),_a=Symbol(`ZodInput`);var va=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function ya(){return new va}const ba=ya();function xa(e,t){return new e({type:`string`,...y(t)})}function Sa(e,t){return new e({type:`string`,coerce:!0,...y(t)})}function Ca(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...y(t)})}function wa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...y(t)})}function Ta(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...y(t)})}function Ea(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...y(t)})}function Da(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...y(t)})}function Oa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...y(t)})}function ka(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...y(t)})}function Aa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...y(t)})}function ja(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...y(t)})}function Ma(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...y(t)})}function Na(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...y(t)})}function Pa(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...y(t)})}function Fa(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...y(t)})}function Ia(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...y(t)})}function La(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...y(t)})}function Ra(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...y(t)})}function za(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...y(t)})}function Ba(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...y(t)})}function Va(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...y(t)})}function Ha(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...y(t)})}function Ua(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...y(t)})}function Wa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...y(t)})}const Ga={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ka(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...y(t)})}function qa(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...y(t)})}function Ja(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...y(t)})}function Ya(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...y(t)})}function Xa(e,t){return new e({type:`number`,checks:[],...y(t)})}function Za(e,t){return new e({type:`number`,coerce:!0,checks:[],...y(t)})}function Qa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...y(t)})}function $a(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...y(t)})}function eo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...y(t)})}function to(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...y(t)})}function no(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...y(t)})}function ro(e,t){return new e({type:`boolean`,...y(t)})}function io(e,t){return new e({type:`boolean`,coerce:!0,...y(t)})}function ao(e,t){return new e({type:`bigint`,...y(t)})}function oo(e,t){return new e({type:`bigint`,coerce:!0,...y(t)})}function so(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...y(t)})}function co(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...y(t)})}function lo(e,t){return new e({type:`symbol`,...y(t)})}function uo(e,t){return new e({type:`undefined`,...y(t)})}function fo(e,t){return new e({type:`null`,...y(t)})}function po(e){return new e({type:`any`})}function mo(e){return new e({type:`unknown`})}function ho(e,t){return new e({type:`never`,...y(t)})}function go(e,t){return new e({type:`void`,...y(t)})}function _o(e,t){return new e({type:`date`,...y(t)})}function vo(e,t){return new e({type:`date`,coerce:!0,...y(t)})}function yo(e,t){return new e({type:`nan`,...y(t)})}function bo(e,t){return new Vt({check:`less_than`,...y(t),value:e,inclusive:!1})}function E(e,t){return new Vt({check:`less_than`,...y(t),value:e,inclusive:!0})}function xo(e,t){return new Ht({check:`greater_than`,...y(t),value:e,inclusive:!1})}function D(e,t){return new Ht({check:`greater_than`,...y(t),value:e,inclusive:!0})}function So(e){return xo(0,e)}function Co(e){return bo(0,e)}function wo(e){return E(0,e)}function To(e){return D(0,e)}function Eo(e,t){return new Ut({check:`multiple_of`,...y(t),value:e})}function Do(e,t){return new Kt({check:`max_size`,...y(t),maximum:e})}function Oo(e,t){return new qt({check:`min_size`,...y(t),minimum:e})}function ko(e,t){return new Jt({check:`size_equals`,...y(t),size:e})}function Ao(e,t){return new Yt({check:`max_length`,...y(t),maximum:e})}function jo(e,t){return new Xt({check:`min_length`,...y(t),minimum:e})}function Mo(e,t){return new Zt({check:`length_equals`,...y(t),length:e})}function No(e,t){return new $t({check:`string_format`,format:`regex`,...y(t),pattern:e})}function Po(e){return new en({check:`string_format`,format:`lowercase`,...y(e)})}function Fo(e){return new tn({check:`string_format`,format:`uppercase`,...y(e)})}function Io(e,t){return new nn({check:`string_format`,format:`includes`,...y(t),includes:e})}function Lo(e,t){return new rn({check:`string_format`,format:`starts_with`,...y(t),prefix:e})}function Ro(e,t){return new an({check:`string_format`,format:`ends_with`,...y(t),suffix:e})}function zo(e,t,n){return new sn({check:`property`,property:e,schema:t,...y(n)})}function Bo(e,t){return new cn({check:`mime_type`,mime:e,...y(t)})}function Vo(e){return new ln({check:`overwrite`,tx:e})}function Ho(e){return Vo(t=>t.normalize(e))}function Uo(){return Vo(e=>e.trim())}function Wo(){return Vo(e=>e.toLowerCase())}function Go(){return Vo(e=>e.toUpperCase())}function Ko(e,t,n){return new e({type:`array`,element:t,...y(n)})}function qo(e,t,n){return new e({type:`union`,options:t,...y(n)})}function Jo(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...y(r)})}function Yo(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Xo(e,t,n,r){let i=n instanceof w;return new e({type:`tuple`,items:t,rest:i?n:null,...y(i?r:n)})}function Zo(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...y(r)})}function Qo(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...y(r)})}function $o(e,t,n){return new e({type:`set`,valueType:t,...y(n)})}function es(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...y(n)})}function ts(e,t,n){return new e({type:`enum`,entries:t,...y(n)})}function ns(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...y(n)})}function rs(e,t){return new e({type:`file`,...y(t)})}function is(e,t){return new e({type:`transform`,transform:t})}function as(e,t){return new e({type:`optional`,innerType:t})}function os(e,t){return new e({type:`nullable`,innerType:t})}function ss(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():n}})}function cs(e,t,n){return new e({type:`nonoptional`,innerType:t,...y(n)})}function ls(e,t){return new e({type:`success`,innerType:t})}function us(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function ds(e,t,n){return new e({type:`pipe`,in:t,out:n})}function fs(e,t){return new e({type:`readonly`,innerType:t})}function ps(e,t,n){return new e({type:`template_literal`,parts:t,...y(n)})}function ms(e,t){return new e({type:`lazy`,getter:t})}function hs(e,t){return new e({type:`promise`,innerType:t})}function gs(e,t,n){let r=y(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function _s(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...y(n)})}function vs(e,t){let n=y(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Pipe??jr,c=e.Boolean??Hn,l=e.String??fn,u=new(e.Transform??br)({type:`transform`,transform:(e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:u}),{})},error:n.error});return new s({type:`pipe`,in:new s({type:`pipe`,in:new l({type:`string`,error:n.error}),out:u,error:n.error}),out:new c({type:`boolean`,error:n.error}),error:n.error})}function ys(e,t,n,r={}){let i=y(r),a={...y(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var bs=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!=`function`)throw Error(`implement() must be called with a function`);let t=((...n)=>{let r=this._def.input?Ue(this._def.input,n,void 0,{callee:t}):n;if(!Array.isArray(r))throw Error(`Invalid arguments schema: not an array or tuple schema.`);let i=e(...r);return this._def.output?Ue(this._def.output,i,void 0,{callee:t}):i});return t}implementAsync(e){if(typeof e!=`function`)throw Error(`implement() must be called with a function`);let t=(async(...n)=>{let r=this._def.input?await Ge(this._def.input,n,void 0,{callee:t}):n;if(!Array.isArray(r))throw Error(`Invalid arguments schema: not an array or tuple schema.`);let i=await e(...r);return this._def.output?Ge(this._def.output,i,void 0,{callee:t}):i});return t}input(...e){let t=this.constructor;return Array.isArray(e[0])?new t({type:`function`,input:new ur({type:`tuple`,items:e[0],rest:e[1]}),output:this._def.output}):new t({type:`function`,input:e[0],output:this._def.output})}output(e){let t=this.constructor;return new t({type:`function`,input:this._def.input,output:e})}};function xs(e){return new bs({type:`function`,input:Array.isArray(e?.input)?Xo(ur,e?.input):e?.input??Ko(er,mo(Yn)),output:e?.output??mo(Yn)})}var Ss=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??ba,this.target=e?.target??`draft-2020-12`,this.unrepresentable=e?.unrepresentable??`throw`,this.override=e?.override??(()=>{}),this.io=e?.io??`output`,this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var n;let r=e._zod.def,i={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},a=this.seen.get(e);if(a)return a.count++,t.schemaPath.includes(e)&&(a.cycle=t.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let n={...t,schemaPath:[...t.schemaPath,e],path:t.path},a=e._zod.parent;if(a)o.ref=a,this.process(a,n),this.seen.get(a).isParent=!0;else{let t=o.schema;switch(r.type){case`string`:{let n=t;n.type=`string`;let{minimum:r,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof r==`number`&&(n.minLength=r),typeof a==`number`&&(n.maxLength=a),s&&(n.format=i[s]??s,n.format===``&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?n.pattern=e[0].source:e.length>1&&(o.schema.allOf=[...e.map(e=>({...this.target===`draft-7`?{type:`string`}:{},pattern:e.source}))])}break}case`number`:{let n=t,{minimum:r,maximum:i,format:a,multipleOf:o,exclusiveMaximum:s,exclusiveMinimum:c}=e._zod.bag;typeof a==`string`&&a.includes(`int`)?n.type=`integer`:n.type=`number`,typeof c==`number`&&(n.exclusiveMinimum=c),typeof r==`number`&&(n.minimum=r,typeof c==`number`&&(c>=r?delete n.minimum:delete n.exclusiveMinimum)),typeof s==`number`&&(n.exclusiveMaximum=s),typeof i==`number`&&(n.maximum=i,typeof s==`number`&&(s<=i?delete n.maximum:delete n.exclusiveMaximum)),typeof o==`number`&&(n.multipleOf=o);break}case`boolean`:{let e=t;e.type=`boolean`;break}case`bigint`:if(this.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`);break;case`symbol`:if(this.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`);break;case`null`:t.type=`null`;break;case`any`:break;case`unknown`:break;case`undefined`:if(this.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`);break;case`void`:if(this.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`);break;case`never`:t.not={};break;case`date`:if(this.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`);break;case`array`:{let i=t,{minimum:a,maximum:o}=e._zod.bag;typeof a==`number`&&(i.minItems=a),typeof o==`number`&&(i.maxItems=o),i.type=`array`,i.items=this.process(r.element,{...n,path:[...n.path,`items`]});break}case`object`:{let e=t;e.type=`object`,e.properties={};let i=r.shape;for(let t in i)e.properties[t]=this.process(i[t],{...n,path:[...n.path,`properties`,t]});let a=new Set(Object.keys(i)),o=new Set([...a].filter(e=>{let t=r.shape[e]._zod;return this.io===`input`?t.optin===void 0:t.optout===void 0}));o.size>0&&(e.required=Array.from(o)),r.catchall?._zod.def.type===`never`?e.additionalProperties=!1:r.catchall?r.catchall&&(e.additionalProperties=this.process(r.catchall,{...n,path:[...n.path,`additionalProperties`]})):this.io===`output`&&(e.additionalProperties=!1);break}case`union`:{let e=t;e.anyOf=r.options.map((e,t)=>this.process(e,{...n,path:[...n.path,`anyOf`,t]}));break}case`intersection`:{let e=t,i=this.process(r.left,{...n,path:[...n.path,`allOf`,0]}),a=this.process(r.right,{...n,path:[...n.path,`allOf`,1]}),o=e=>`allOf`in e&&Object.keys(e).length===1;e.allOf=[...o(i)?i.allOf:[i],...o(a)?a.allOf:[a]];break}case`tuple`:{let i=t;i.type=`array`;let a=r.items.map((e,t)=>this.process(e,{...n,path:[...n.path,`prefixItems`,t]}));if(this.target===`draft-2020-12`?i.prefixItems=a:i.items=a,r.rest){let e=this.process(r.rest,{...n,path:[...n.path,`items`]});this.target===`draft-2020-12`?i.items=e:i.additionalItems=e}r.rest&&(i.items=this.process(r.rest,{...n,path:[...n.path,`items`]}));let{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s);break}case`record`:{let e=t;e.type=`object`,e.propertyNames=this.process(r.keyType,{...n,path:[...n.path,`propertyNames`]}),e.additionalProperties=this.process(r.valueType,{...n,path:[...n.path,`additionalProperties`]});break}case`map`:if(this.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`);break;case`set`:if(this.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`);break;case`enum`:{let e=t,n=p(r.entries);n.every(e=>typeof e==`number`)&&(e.type=`number`),n.every(e=>typeof e==`string`)&&(e.type=`string`),e.enum=n;break}case`literal`:{let e=t,n=[];for(let e of r.values)if(e===void 0){if(this.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(this.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);n.push(Number(e))}else n.push(e);if(n.length!==0)if(n.length===1){let t=n[0];e.type=t===null?`null`:typeof t,e.const=t}else n.every(e=>typeof e==`number`)&&(e.type=`number`),n.every(e=>typeof e==`string`)&&(e.type=`string`),n.every(e=>typeof e==`boolean`)&&(e.type=`string`),n.every(e=>e===null)&&(e.type=`null`),e.enum=n;break}case`file`:{let n=t,r={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:i,maximum:a,mime:o}=e._zod.bag;i!==void 0&&(r.minLength=i),a!==void 0&&(r.maxLength=a),o?o.length===1?(r.contentMediaType=o[0],Object.assign(n,r)):n.anyOf=o.map(e=>({...r,contentMediaType:e})):Object.assign(n,r);break}case`transform`:if(this.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`);break;case`nullable`:t.anyOf=[this.process(r.innerType,n),{type:`null`}];break;case`nonoptional`:this.process(r.innerType,n),o.ref=r.innerType;break;case`success`:{let e=t;e.type=`boolean`;break}case`default`:this.process(r.innerType,n),o.ref=r.innerType,t.default=JSON.parse(JSON.stringify(r.defaultValue));break;case`prefault`:this.process(r.innerType,n),o.ref=r.innerType,this.io===`input`&&(t._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break;case`catch`:{this.process(r.innerType,n),o.ref=r.innerType;let e;try{e=r.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}t.default=e;break}case`nan`:if(this.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`);break;case`template_literal`:{let n=t,r=e._zod.pattern;if(!r)throw Error(`Pattern not found in template literal`);n.type=`string`,n.pattern=r.source;break}case`pipe`:{let e=this.io===`input`?r.in._zod.def.type===`transform`?r.out:r.in:r.out;this.process(e,n),o.ref=e;break}case`readonly`:this.process(r.innerType,n),o.ref=r.innerType,t.readOnly=!0;break;case`promise`:this.process(r.innerType,n),o.ref=r.innerType;break;case`optional`:this.process(r.innerType,n),o.ref=r.innerType;break;case`lazy`:{let t=e._zod.innerType;this.process(t,n),o.ref=t;break}case`custom`:if(this.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`);break;default:}}}let c=this.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),this.io===`input`&&O(e)&&(delete o.schema.examples,delete o.schema.default),this.io===`input`&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(e).schema}emit(e,t){let n={cycles:t?.cycles??`ref`,reused:t?.reused??`inline`,external:t?.external??void 0},r=this.seen.get(e);if(!r)throw Error(`Unprocessed schema. This is a bug in Zod.`);let i=e=>{let t=this.target===`draft-2020-12`?`$defs`:`definitions`;if(n.external){let r=n.external.registry.get(e[0])?.id,i=n.external.uri??(e=>e);if(r)return{ref:i(r)};let a=e[1].defId??e[1].schema.id??`schema${this.counter++}`;return e[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${t}/${a}`}}if(e[1]===r)return{ref:`#`};let i=`#/${t}/`,a=e[1].schema.id??`__schema${this.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(n.cycles===`throw`)for(let e of this.seen.entries()){let t=e[1];if(t.cycle)throw Error(`Cycle detected: #/${t.cycle?.join(`/`)}/<root>
|
|
28
28
|
|
|
29
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let t of this.seen.entries()){let r=t[1];if(e===t[0]){a(t);continue}if(n.external){let r=n.external.registry.get(t[0])?.id;if(e!==t[0]&&r){a(t);continue}}if(this.metadataRegistry.get(t[0])?.id){a(t);continue}if(r.cycle){a(t);continue}if(r.count>1&&n.reused===`ref`){a(t);continue}}let o=(e,t)=>{let n=this.seen.get(e),r=n.def??n.schema,i={...r};if(n.ref===null)return;let a=n.ref;if(n.ref=null,a){o(a,t);let e=this.seen.get(a).schema;e.$ref&&t.target===`draft-7`?(r.allOf=r.allOf??[],r.allOf.push(e)):(Object.assign(r,e),Object.assign(r,i))}n.isParent||this.override({zodSchema:e,jsonSchema:r,path:n.path??[]})};for(let e of[...this.seen.entries()].reverse())o(e[0],{target:this.target});let s={};if(this.target===`draft-2020-12`?s.$schema=`https://json-schema.org/draft/2020-12/schema`:this.target===`draft-7`?s.$schema=`http://json-schema.org/draft-07/schema#`:console.warn(`Invalid target: ${this.target}`),n.external?.uri){let t=n.external.registry.get(e)?.id;if(!t)throw Error("Schema is missing an `id` property");s.$id=n.external.uri(t)}Object.assign(s,r.def);let c=n.external?.defs??{};for(let e of this.seen.entries()){let t=e[1];t.def&&t.defId&&(c[t.defId]=t.def)}n.external||Object.keys(c).length>0&&(this.target===`draft-2020-12`?s.$defs=c:s.definitions=c);try{return JSON.parse(JSON.stringify(s))}catch{throw Error(`Error converting schema to JSON.`)}}};function Cs(e,t){if(e instanceof va){let n=new Ss(t),r={};for(let t of e._idmap.entries()){let[e,r]=t;n.process(r)}let i={},a={registry:e,uri:t?.uri,defs:r};for(let r of e._idmap.entries()){let[e,o]=r;i[e]=n.emit(o,{...t,external:a})}return Object.keys(r).length>0&&(i.__shared={[n.target===`draft-2020-12`?`$defs`:`definitions`]:r}),{schemas:i}}let n=new Ss(t);return n.process(e),n.emit(e,t)}function O(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.type){case`string`:case`number`:case`bigint`:case`boolean`:case`date`:case`symbol`:case`undefined`:case`null`:case`any`:case`unknown`:case`never`:case`void`:case`literal`:case`enum`:case`nan`:case`file`:case`template_literal`:return!1;case`array`:return O(r.element,n);case`object`:for(let e in r.shape)if(O(r.shape[e],n))return!0;return!1;case`union`:for(let e of r.options)if(O(e,n))return!0;return!1;case`intersection`:return O(r.left,n)||O(r.right,n);case`tuple`:for(let e of r.items)if(O(e,n))return!0;return!!(r.rest&&O(r.rest,n));case`record`:return O(r.keyType,n)||O(r.valueType,n);case`map`:return O(r.keyType,n)||O(r.valueType,n);case`set`:return O(r.valueType,n);case`promise`:case`optional`:case`nonoptional`:case`nullable`:case`readonly`:return O(r.innerType,n);case`lazy`:return O(r.getter(),n);case`default`:return O(r.innerType,n);case`prefault`:return O(r.innerType,n);case`custom`:return!1;case`transform`:return!0;case`pipe`:return O(r.in,n)||O(r.out,n);case`success`:return!1;case`catch`:return!1;default:}throw Error(`Unknown schema type: ${r.type}`)}var ws=e({}),Ts=e({$ZodAny:()=>Jn,$ZodArray:()=>er,$ZodAsyncError:()=>i,$ZodBase64:()=>Nn,$ZodBase64URL:()=>Fn,$ZodBigInt:()=>Un,$ZodBigIntFormat:()=>Wn,$ZodBoolean:()=>Hn,$ZodCIDRv4:()=>An,$ZodCIDRv6:()=>jn,$ZodCUID:()=>yn,$ZodCUID2:()=>bn,$ZodCatch:()=>kr,$ZodCheck:()=>C,$ZodCheckBigIntFormat:()=>Gt,$ZodCheckEndsWith:()=>an,$ZodCheckGreaterThan:()=>Ht,$ZodCheckIncludes:()=>nn,$ZodCheckLengthEquals:()=>Zt,$ZodCheckLessThan:()=>Vt,$ZodCheckLowerCase:()=>en,$ZodCheckMaxLength:()=>Yt,$ZodCheckMaxSize:()=>Kt,$ZodCheckMimeType:()=>cn,$ZodCheckMinLength:()=>Xt,$ZodCheckMinSize:()=>qt,$ZodCheckMultipleOf:()=>Ut,$ZodCheckNumberFormat:()=>Wt,$ZodCheckOverwrite:()=>ln,$ZodCheckProperty:()=>sn,$ZodCheckRegex:()=>$t,$ZodCheckSizeEquals:()=>Jt,$ZodCheckStartsWith:()=>rn,$ZodCheckStringFormat:()=>Qt,$ZodCheckUpperCase:()=>tn,$ZodCustom:()=>Rr,$ZodCustomStringFormat:()=>zn,$ZodDate:()=>Qn,$ZodDefault:()=>Cr,$ZodDiscriminatedUnion:()=>or,$ZodE164:()=>In,$ZodEmail:()=>hn,$ZodEmoji:()=>_n,$ZodEnum:()=>_r,$ZodError:()=>Fe,$ZodFile:()=>yr,$ZodFunction:()=>bs,$ZodGUID:()=>pn,$ZodIPv4:()=>On,$ZodIPv6:()=>kn,$ZodISODate:()=>Tn,$ZodISODateTime:()=>wn,$ZodISODuration:()=>Dn,$ZodISOTime:()=>En,$ZodIntersection:()=>sr,$ZodJWT:()=>Rn,$ZodKSUID:()=>Cn,$ZodLazy:()=>Lr,$ZodLiteral:()=>vr,$ZodMap:()=>pr,$ZodNaN:()=>Ar,$ZodNanoID:()=>vn,$ZodNever:()=>Xn,$ZodNonOptional:()=>Er,$ZodNull:()=>qn,$ZodNullable:()=>Sr,$ZodNumber:()=>Bn,$ZodNumberFormat:()=>Vn,$ZodObject:()=>rr,$ZodOptional:()=>xr,$ZodPipe:()=>jr,$ZodPrefault:()=>Tr,$ZodPromise:()=>Ir,$ZodReadonly:()=>Nr,$ZodRealError:()=>Ie,$ZodRecord:()=>fr,$ZodRegistry:()=>va,$ZodSet:()=>hr,$ZodString:()=>fn,$ZodStringFormat:()=>T,$ZodSuccess:()=>Or,$ZodSymbol:()=>Gn,$ZodTemplateLiteral:()=>Fr,$ZodTransform:()=>br,$ZodTuple:()=>ur,$ZodType:()=>w,$ZodULID:()=>xn,$ZodURL:()=>gn,$ZodUUID:()=>mn,$ZodUndefined:()=>Kn,$ZodUnion:()=>ar,$ZodUnknown:()=>Yn,$ZodVoid:()=>Zn,$ZodXID:()=>Sn,$brand:()=>r,$constructor:()=>n,$input:()=>_a,$output:()=>ga,Doc:()=>un,JSONSchema:()=>ws,JSONSchemaGenerator:()=>Ss,NEVER:()=>t,TimePrecision:()=>Ga,_any:()=>po,_array:()=>Ko,_base64:()=>Va,_base64url:()=>Ha,_bigint:()=>ao,_boolean:()=>ro,_catch:()=>us,_cidrv4:()=>za,_cidrv6:()=>Ba,_coercedBigint:()=>oo,_coercedBoolean:()=>io,_coercedDate:()=>vo,_coercedNumber:()=>Za,_coercedString:()=>Sa,_cuid:()=>Ma,_cuid2:()=>Na,_custom:()=>gs,_date:()=>_o,_default:()=>ss,_discriminatedUnion:()=>Jo,_e164:()=>Ua,_email:()=>Ca,_emoji:()=>Aa,_endsWith:()=>Ro,_enum:()=>es,_file:()=>rs,_float32:()=>$a,_float64:()=>eo,_gt:()=>xo,_gte:()=>D,_guid:()=>wa,_includes:()=>Io,_int:()=>Qa,_int32:()=>to,_int64:()=>so,_intersection:()=>Yo,_ipv4:()=>La,_ipv6:()=>Ra,_isoDate:()=>qa,_isoDateTime:()=>Ka,_isoDuration:()=>Ya,_isoTime:()=>Ja,_jwt:()=>Wa,_ksuid:()=>Ia,_lazy:()=>ms,_length:()=>Mo,_literal:()=>ns,_lowercase:()=>Po,_lt:()=>bo,_lte:()=>E,_map:()=>Qo,_max:()=>E,_maxLength:()=>Ao,_maxSize:()=>Do,_mime:()=>Bo,_min:()=>D,_minLength:()=>jo,_minSize:()=>Oo,_multipleOf:()=>Eo,_nan:()=>yo,_nanoid:()=>ja,_nativeEnum:()=>ts,_negative:()=>Co,_never:()=>ho,_nonnegative:()=>To,_nonoptional:()=>cs,_nonpositive:()=>wo,_normalize:()=>Ho,_null:()=>fo,_nullable:()=>os,_number:()=>Xa,_optional:()=>as,_overwrite:()=>Vo,_parse:()=>He,_parseAsync:()=>We,_pipe:()=>ds,_positive:()=>So,_promise:()=>hs,_property:()=>zo,_readonly:()=>fs,_record:()=>Zo,_refine:()=>_s,_regex:()=>No,_safeParse:()=>Ke,_safeParseAsync:()=>Je,_set:()=>$o,_size:()=>ko,_startsWith:()=>Lo,_string:()=>xa,_stringFormat:()=>ys,_stringbool:()=>vs,_success:()=>ls,_symbol:()=>lo,_templateLiteral:()=>ps,_toLowerCase:()=>Wo,_toUpperCase:()=>Go,_transform:()=>is,_trim:()=>Uo,_tuple:()=>Xo,_uint32:()=>no,_uint64:()=>co,_ulid:()=>Pa,_undefined:()=>uo,_union:()=>qo,_unknown:()=>mo,_uppercase:()=>Fo,_url:()=>ka,_uuid:()=>Ta,_uuidv4:()=>Ea,_uuidv6:()=>Da,_uuidv7:()=>Oa,_void:()=>go,_xid:()=>Fa,clone:()=>v,config:()=>o,flattenError:()=>Le,formatError:()=>Re,function:()=>xs,globalConfig:()=>a,globalRegistry:()=>ba,isValidBase64:()=>Mn,isValidBase64URL:()=>Pn,isValidJWT:()=>Ln,locales:()=>ha,parse:()=>Ue,parseAsync:()=>Ge,prettifyError:()=>Ve,regexes:()=>Xe,registry:()=>ya,safeParse:()=>qe,safeParseAsync:()=>Ye,toDotPath:()=>Be,toJSONSchema:()=>Cs,treeifyError:()=>ze,util:()=>s,version:()=>dn}),Es=e({ZodISODate:()=>ks,ZodISODateTime:()=>Ds,ZodISODuration:()=>Ns,ZodISOTime:()=>js,date:()=>As,datetime:()=>Os,duration:()=>Ps,time:()=>Ms});const Ds=n(`ZodISODateTime`,(e,t)=>{wn.init(e,t),j.init(e,t)});function Os(e){return Ka(Ds,e)}const ks=n(`ZodISODate`,(e,t)=>{Tn.init(e,t),j.init(e,t)});function As(e){return qa(ks,e)}const js=n(`ZodISOTime`,(e,t)=>{En.init(e,t),j.init(e,t)});function Ms(e){return Ja(js,e)}const Ns=n(`ZodISODuration`,(e,t)=>{Dn.init(e,t),j.init(e,t)});function Ps(e){return Ya(Ns,e)}const Fs=(e,t)=>{Fe.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Re(e,t)},flatten:{value:t=>Le(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},Is=n(`ZodError`,Fs),Ls=n(`ZodError`,Fs,{Parent:Error}),Rs=He(Ls),zs=We(Ls),Bs=Ke(Ls),Vs=Je(Ls),k=n(`ZodType`,(e,t)=>(w.init(e,t),e.def=t,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>v(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Rs(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Bs(e,t,n),e.parseAsync=async(t,n)=>zs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Vs(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(ou(t,n)),e.superRefine=t=>e.check(su(t)),e.overwrite=t=>e.check(Vo(t)),e.optional=()=>H(e),e.nullable=()=>Nl(e),e.nullish=()=>H(Nl(e)),e.nonoptional=t=>Bl(e,t),e.array=()=>F(e),e.or=t=>R([e,t]),e.and=t=>hl(e,t),e.transform=t=>Jl(e,Al(t)),e.default=t=>Il(e,t),e.prefault=t=>Rl(e,t),e.catch=t=>Wl(e,t),e.pipe=t=>Jl(e,t),e.readonly=()=>Xl(e),e.describe=t=>{let n=e.clone();return ba.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return ba.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return ba.get(e);let n=e.clone();return ba.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Hs=n(`_ZodString`,(e,t)=>{fn.init(e,t),k.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(No(...t)),e.includes=(...t)=>e.check(Io(...t)),e.startsWith=(...t)=>e.check(Lo(...t)),e.endsWith=(...t)=>e.check(Ro(...t)),e.min=(...t)=>e.check(jo(...t)),e.max=(...t)=>e.check(Ao(...t)),e.length=(...t)=>e.check(Mo(...t)),e.nonempty=(...t)=>e.check(jo(1,...t)),e.lowercase=t=>e.check(Po(t)),e.uppercase=t=>e.check(Fo(t)),e.trim=()=>e.check(Uo()),e.normalize=(...t)=>e.check(Ho(...t)),e.toLowerCase=()=>e.check(Wo()),e.toUpperCase=()=>e.check(Go())}),Us=n(`ZodString`,(e,t)=>{fn.init(e,t),Hs.init(e,t),e.email=t=>e.check(Ca(Ws,t)),e.url=t=>e.check(ka($s,t)),e.jwt=t=>e.check(Wa(kc,t)),e.emoji=t=>e.check(Aa(tc,t)),e.guid=t=>e.check(wa(Ks,t)),e.uuid=t=>e.check(Ta(Js,t)),e.uuidv4=t=>e.check(Ea(Js,t)),e.uuidv6=t=>e.check(Da(Js,t)),e.uuidv7=t=>e.check(Oa(Js,t)),e.nanoid=t=>e.check(ja(rc,t)),e.guid=t=>e.check(wa(Ks,t)),e.cuid=t=>e.check(Ma(ac,t)),e.cuid2=t=>e.check(Na(sc,t)),e.ulid=t=>e.check(Pa(lc,t)),e.base64=t=>e.check(Va(Cc,t)),e.base64url=t=>e.check(Ha(Tc,t)),e.xid=t=>e.check(Fa(dc,t)),e.ksuid=t=>e.check(Ia(pc,t)),e.ipv4=t=>e.check(La(hc,t)),e.ipv6=t=>e.check(Ra(_c,t)),e.cidrv4=t=>e.check(za(yc,t)),e.cidrv6=t=>e.check(Ba(xc,t)),e.e164=t=>e.check(Ua(Dc,t)),e.datetime=t=>e.check(Os(t)),e.date=t=>e.check(As(t)),e.time=t=>e.check(Ms(t)),e.duration=t=>e.check(Ps(t))});function A(e){return xa(Us,e)}const j=n(`ZodStringFormat`,(e,t)=>{T.init(e,t),Hs.init(e,t)}),Ws=n(`ZodEmail`,(e,t)=>{hn.init(e,t),j.init(e,t)});function Gs(e){return Ca(Ws,e)}const Ks=n(`ZodGUID`,(e,t)=>{pn.init(e,t),j.init(e,t)});function qs(e){return wa(Ks,e)}const Js=n(`ZodUUID`,(e,t)=>{mn.init(e,t),j.init(e,t)});function Ys(e){return Ta(Js,e)}function Xs(e){return Ea(Js,e)}function Zs(e){return Da(Js,e)}function Qs(e){return Oa(Js,e)}const $s=n(`ZodURL`,(e,t)=>{gn.init(e,t),j.init(e,t)});function ec(e){return ka($s,e)}const tc=n(`ZodEmoji`,(e,t)=>{_n.init(e,t),j.init(e,t)});function nc(e){return Aa(tc,e)}const rc=n(`ZodNanoID`,(e,t)=>{vn.init(e,t),j.init(e,t)});function ic(e){return ja(rc,e)}const ac=n(`ZodCUID`,(e,t)=>{yn.init(e,t),j.init(e,t)});function oc(e){return Ma(ac,e)}const sc=n(`ZodCUID2`,(e,t)=>{bn.init(e,t),j.init(e,t)});function cc(e){return Na(sc,e)}const lc=n(`ZodULID`,(e,t)=>{xn.init(e,t),j.init(e,t)});function uc(e){return Pa(lc,e)}const dc=n(`ZodXID`,(e,t)=>{Sn.init(e,t),j.init(e,t)});function fc(e){return Fa(dc,e)}const pc=n(`ZodKSUID`,(e,t)=>{Cn.init(e,t),j.init(e,t)});function mc(e){return Ia(pc,e)}const hc=n(`ZodIPv4`,(e,t)=>{On.init(e,t),j.init(e,t)});function gc(e){return La(hc,e)}const _c=n(`ZodIPv6`,(e,t)=>{kn.init(e,t),j.init(e,t)});function vc(e){return Ra(_c,e)}const yc=n(`ZodCIDRv4`,(e,t)=>{An.init(e,t),j.init(e,t)});function bc(e){return za(yc,e)}const xc=n(`ZodCIDRv6`,(e,t)=>{jn.init(e,t),j.init(e,t)});function Sc(e){return Ba(xc,e)}const Cc=n(`ZodBase64`,(e,t)=>{Nn.init(e,t),j.init(e,t)});function wc(e){return Va(Cc,e)}const Tc=n(`ZodBase64URL`,(e,t)=>{Fn.init(e,t),j.init(e,t)});function Ec(e){return Ha(Tc,e)}const Dc=n(`ZodE164`,(e,t)=>{In.init(e,t),j.init(e,t)});function Oc(e){return Ua(Dc,e)}const kc=n(`ZodJWT`,(e,t)=>{Rn.init(e,t),j.init(e,t)});function Ac(e){return Wa(kc,e)}const jc=n(`ZodCustomStringFormat`,(e,t)=>{zn.init(e,t),j.init(e,t)});function Mc(e,t,n={}){return ys(jc,e,t,n)}const Nc=n(`ZodNumber`,(e,t)=>{Bn.init(e,t),k.init(e,t),e.gt=(t,n)=>e.check(xo(t,n)),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.lt=(t,n)=>e.check(bo(t,n)),e.lte=(t,n)=>e.check(E(t,n)),e.max=(t,n)=>e.check(E(t,n)),e.int=t=>e.check(Fc(t)),e.safe=t=>e.check(Fc(t)),e.positive=t=>e.check(xo(0,t)),e.nonnegative=t=>e.check(D(0,t)),e.negative=t=>e.check(bo(0,t)),e.nonpositive=t=>e.check(E(0,t)),e.multipleOf=(t,n)=>e.check(Eo(t,n)),e.step=(t,n)=>e.check(Eo(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function M(e){return Xa(Nc,e)}const Pc=n(`ZodNumberFormat`,(e,t)=>{Vn.init(e,t),Nc.init(e,t)});function Fc(e){return Qa(Pc,e)}function Ic(e){return $a(Pc,e)}function Lc(e){return eo(Pc,e)}function Rc(e){return to(Pc,e)}function zc(e){return no(Pc,e)}const Bc=n(`ZodBoolean`,(e,t)=>{Hn.init(e,t),k.init(e,t)});function N(e){return ro(Bc,e)}const Vc=n(`ZodBigInt`,(e,t)=>{Un.init(e,t),k.init(e,t),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.gt=(t,n)=>e.check(xo(t,n)),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.lt=(t,n)=>e.check(bo(t,n)),e.lte=(t,n)=>e.check(E(t,n)),e.max=(t,n)=>e.check(E(t,n)),e.positive=t=>e.check(xo(BigInt(0),t)),e.negative=t=>e.check(bo(BigInt(0),t)),e.nonpositive=t=>e.check(E(BigInt(0),t)),e.nonnegative=t=>e.check(D(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(Eo(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Hc(e){return ao(Vc,e)}const Uc=n(`ZodBigIntFormat`,(e,t)=>{Wn.init(e,t),Vc.init(e,t)});function Wc(e){return so(Uc,e)}function Gc(e){return co(Uc,e)}const Kc=n(`ZodSymbol`,(e,t)=>{Gn.init(e,t),k.init(e,t)});function qc(e){return lo(Kc,e)}const Jc=n(`ZodUndefined`,(e,t)=>{Kn.init(e,t),k.init(e,t)});function Yc(e){return uo(Jc,e)}const Xc=n(`ZodNull`,(e,t)=>{qn.init(e,t),k.init(e,t)});function Zc(e){return fo(Xc,e)}const Qc=n(`ZodAny`,(e,t)=>{Jn.init(e,t),k.init(e,t)});function $c(){return po(Qc)}const el=n(`ZodUnknown`,(e,t)=>{Yn.init(e,t),k.init(e,t)});function P(){return mo(el)}const tl=n(`ZodNever`,(e,t)=>{Xn.init(e,t),k.init(e,t)});function nl(e){return ho(tl,e)}const rl=n(`ZodVoid`,(e,t)=>{Zn.init(e,t),k.init(e,t)});function il(e){return go(rl,e)}const al=n(`ZodDate`,(e,t)=>{Qn.init(e,t),k.init(e,t),e.min=(t,n)=>e.check(D(t,n)),e.max=(t,n)=>e.check(E(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function ol(e){return _o(al,e)}const sl=n(`ZodArray`,(e,t)=>{er.init(e,t),k.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(jo(t,n)),e.nonempty=t=>e.check(jo(1,t)),e.max=(t,n)=>e.check(Ao(t,n)),e.length=(t,n)=>e.check(Mo(t,n)),e.unwrap=()=>e.element});function F(e,t){return Ko(sl,e,t)}function cl(e){let t=e._zod.def.shape;return V(Object.keys(t))}const ll=n(`ZodObject`,(e,t)=>{rr.init(e,t),k.init(e,t),_(e,`shape`,()=>t.shape),e.keyof=()=>B(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:P()}),e.loose=()=>e.clone({...e._zod.def,catchall:P()}),e.strict=()=>e.clone({...e._zod.def,catchall:nl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ce(e,t),e.merge=t=>we(e,t),e.pick=t=>xe(e,t),e.omit=t=>Se(e,t),e.partial=(...t)=>Te(jl,e,t[0]),e.required=(...t)=>Ee(zl,e,t[0])});function I(e,t){return new ll({type:`object`,get shape(){return re(this,`shape`,{...e}),this.shape},...y(t)})}function ul(e,t){return new ll({type:`object`,get shape(){return re(this,`shape`,{...e}),this.shape},catchall:nl(),...y(t)})}function L(e,t){return new ll({type:`object`,get shape(){return re(this,`shape`,{...e}),this.shape},catchall:P(),...y(t)})}const dl=n(`ZodUnion`,(e,t)=>{ar.init(e,t),k.init(e,t),e.options=t.options});function R(e,t){return new dl({type:`union`,options:e,...y(t)})}const fl=n(`ZodDiscriminatedUnion`,(e,t)=>{dl.init(e,t),or.init(e,t)});function pl(e,t,n){return new fl({type:`union`,options:t,discriminator:e,...y(n)})}const ml=n(`ZodIntersection`,(e,t)=>{sr.init(e,t),k.init(e,t)});function hl(e,t){return new ml({type:`intersection`,left:e,right:t})}const gl=n(`ZodTuple`,(e,t)=>{ur.init(e,t),k.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function _l(e,t,n){let r=t instanceof w;return new gl({type:`tuple`,items:e,rest:r?t:null,...y(r?n:t)})}const vl=n(`ZodRecord`,(e,t)=>{fr.init(e,t),k.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function z(e,t,n){return new vl({type:`record`,keyType:e,valueType:t,...y(n)})}function yl(e,t,n){return new vl({type:`record`,keyType:R([e,nl()]),valueType:t,...y(n)})}const bl=n(`ZodMap`,(e,t)=>{pr.init(e,t),k.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function xl(e,t,n){return new bl({type:`map`,keyType:e,valueType:t,...y(n)})}const Sl=n(`ZodSet`,(e,t)=>{hr.init(e,t),k.init(e,t),e.min=(...t)=>e.check(Oo(...t)),e.nonempty=t=>e.check(Oo(1,t)),e.max=(...t)=>e.check(Do(...t)),e.size=(...t)=>e.check(ko(...t))});function Cl(e,t){return new Sl({type:`set`,valueType:e,...y(t)})}const wl=n(`ZodEnum`,(e,t)=>{_r.init(e,t),k.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new wl({...t,checks:[],...y(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new wl({...t,checks:[],...y(r),entries:i})}});function B(e,t){return new wl({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...y(t)})}function Tl(e,t){return new wl({type:`enum`,entries:e,...y(t)})}const El=n(`ZodLiteral`,(e,t)=>{vr.init(e,t),k.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function V(e,t){return new El({type:`literal`,values:Array.isArray(e)?e:[e],...y(t)})}const Dl=n(`ZodFile`,(e,t)=>{yr.init(e,t),k.init(e,t),e.min=(t,n)=>e.check(Oo(t,n)),e.max=(t,n)=>e.check(Do(t,n)),e.mime=(t,n)=>e.check(Bo(Array.isArray(t)?t:[t],n))});function Ol(e){return rs(Dl,e)}const kl=n(`ZodTransform`,(e,t)=>{br.init(e,t),k.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(je(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(je(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Al(e){return new kl({type:`transform`,transform:e})}const jl=n(`ZodOptional`,(e,t)=>{xr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function H(e){return new jl({type:`optional`,innerType:e})}const Ml=n(`ZodNullable`,(e,t)=>{Sr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Nl(e){return new Ml({type:`nullable`,innerType:e})}function Pl(e){return H(Nl(e))}const Fl=n(`ZodDefault`,(e,t)=>{Cr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Il(e,t){return new Fl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}const Ll=n(`ZodPrefault`,(e,t)=>{Tr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Rl(e,t){return new Ll({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}const zl=n(`ZodNonOptional`,(e,t)=>{Er.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Bl(e,t){return new zl({type:`nonoptional`,innerType:e,...y(t)})}const Vl=n(`ZodSuccess`,(e,t)=>{Or.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Hl(e){return new Vl({type:`success`,innerType:e})}const Ul=n(`ZodCatch`,(e,t)=>{kr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Wl(e,t){return new Ul({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const Gl=n(`ZodNaN`,(e,t)=>{Ar.init(e,t),k.init(e,t)});function Kl(e){return yo(Gl,e)}const ql=n(`ZodPipe`,(e,t)=>{jr.init(e,t),k.init(e,t),e.in=t.in,e.out=t.out});function Jl(e,t){return new ql({type:`pipe`,in:e,out:t})}const Yl=n(`ZodReadonly`,(e,t)=>{Nr.init(e,t),k.init(e,t)});function Xl(e){return new Yl({type:`readonly`,innerType:e})}const Zl=n(`ZodTemplateLiteral`,(e,t)=>{Fr.init(e,t),k.init(e,t)});function Ql(e,t){return new Zl({type:`template_literal`,parts:e,...y(t)})}const $l=n(`ZodLazy`,(e,t)=>{Lr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.getter()});function eu(e){return new $l({type:`lazy`,getter:e})}const tu=n(`ZodPromise`,(e,t)=>{Ir.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nu(e){return new tu({type:`promise`,innerType:e})}const ru=n(`ZodCustom`,(e,t)=>{Rr.init(e,t),k.init(e,t)});function iu(e){let t=new C({check:`custom`});return t._zod.check=e,t}function au(e,t){return gs(ru,e??(()=>!0),t)}function ou(e,t={}){return _s(ru,e,t)}function su(e){let t=iu(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(je(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(je(r))}},e(n.value,n)));return t}function cu(e,t={error:`Input not instance of ${e.name}`}){let n=new ru({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...y(t)});return n._zod.bag.Class=e,n}const lu=(...e)=>vs({Pipe:ql,Boolean:Bc,String:Us,Transform:kl},...e);function uu(e){let t=eu(()=>R([A(e),M(),N(),Zc(),F(t),z(A(),t)]));return t}function du(e,t){return Jl(Al(e),t)}const fu={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`};function pu(e){o({customError:e})}function mu(){return o().customError}var hu=e({bigint:()=>yu,boolean:()=>vu,date:()=>bu,number:()=>_u,string:()=>gu});function gu(e){return Sa(Us,e)}function _u(e){return Za(Nc,e)}function vu(e){return io(Bc,e)}function yu(e){return oo(Vc,e)}function bu(e){return vo(al,e)}var xu=e({$brand:()=>r,$input:()=>_a,$output:()=>ga,NEVER:()=>t,TimePrecision:()=>Ga,ZodAny:()=>Qc,ZodArray:()=>sl,ZodBase64:()=>Cc,ZodBase64URL:()=>Tc,ZodBigInt:()=>Vc,ZodBigIntFormat:()=>Uc,ZodBoolean:()=>Bc,ZodCIDRv4:()=>yc,ZodCIDRv6:()=>xc,ZodCUID:()=>ac,ZodCUID2:()=>sc,ZodCatch:()=>Ul,ZodCustom:()=>ru,ZodCustomStringFormat:()=>jc,ZodDate:()=>al,ZodDefault:()=>Fl,ZodDiscriminatedUnion:()=>fl,ZodE164:()=>Dc,ZodEmail:()=>Ws,ZodEmoji:()=>tc,ZodEnum:()=>wl,ZodError:()=>Is,ZodFile:()=>Dl,ZodGUID:()=>Ks,ZodIPv4:()=>hc,ZodIPv6:()=>_c,ZodISODate:()=>ks,ZodISODateTime:()=>Ds,ZodISODuration:()=>Ns,ZodISOTime:()=>js,ZodIntersection:()=>ml,ZodIssueCode:()=>fu,ZodJWT:()=>kc,ZodKSUID:()=>pc,ZodLazy:()=>$l,ZodLiteral:()=>El,ZodMap:()=>bl,ZodNaN:()=>Gl,ZodNanoID:()=>rc,ZodNever:()=>tl,ZodNonOptional:()=>zl,ZodNull:()=>Xc,ZodNullable:()=>Ml,ZodNumber:()=>Nc,ZodNumberFormat:()=>Pc,ZodObject:()=>ll,ZodOptional:()=>jl,ZodPipe:()=>ql,ZodPrefault:()=>Ll,ZodPromise:()=>tu,ZodReadonly:()=>Yl,ZodRealError:()=>Ls,ZodRecord:()=>vl,ZodSet:()=>Sl,ZodString:()=>Us,ZodStringFormat:()=>j,ZodSuccess:()=>Vl,ZodSymbol:()=>Kc,ZodTemplateLiteral:()=>Zl,ZodTransform:()=>kl,ZodTuple:()=>gl,ZodType:()=>k,ZodULID:()=>lc,ZodURL:()=>$s,ZodUUID:()=>Js,ZodUndefined:()=>Jc,ZodUnion:()=>dl,ZodUnknown:()=>el,ZodVoid:()=>rl,ZodXID:()=>dc,_ZodString:()=>Hs,_default:()=>Il,any:()=>$c,array:()=>F,base64:()=>wc,base64url:()=>Ec,bigint:()=>Hc,boolean:()=>N,catch:()=>Wl,check:()=>iu,cidrv4:()=>bc,cidrv6:()=>Sc,clone:()=>v,coerce:()=>hu,config:()=>o,core:()=>Ts,cuid:()=>oc,cuid2:()=>cc,custom:()=>au,date:()=>ol,discriminatedUnion:()=>pl,e164:()=>Oc,email:()=>Gs,emoji:()=>nc,endsWith:()=>Ro,enum:()=>B,file:()=>Ol,flattenError:()=>Le,float32:()=>Ic,float64:()=>Lc,formatError:()=>Re,function:()=>xs,getErrorMap:()=>mu,globalRegistry:()=>ba,gt:()=>xo,gte:()=>D,guid:()=>qs,includes:()=>Io,instanceof:()=>cu,int:()=>Fc,int32:()=>Rc,int64:()=>Wc,intersection:()=>hl,ipv4:()=>gc,ipv6:()=>vc,iso:()=>Es,json:()=>uu,jwt:()=>Ac,keyof:()=>cl,ksuid:()=>mc,lazy:()=>eu,length:()=>Mo,literal:()=>V,locales:()=>ha,looseObject:()=>L,lowercase:()=>Po,lt:()=>bo,lte:()=>E,map:()=>xl,maxLength:()=>Ao,maxSize:()=>Do,mime:()=>Bo,minLength:()=>jo,minSize:()=>Oo,multipleOf:()=>Eo,nan:()=>Kl,nanoid:()=>ic,nativeEnum:()=>Tl,negative:()=>Co,never:()=>nl,nonnegative:()=>To,nonoptional:()=>Bl,nonpositive:()=>wo,normalize:()=>Ho,null:()=>Zc,nullable:()=>Nl,nullish:()=>Pl,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>Vo,parse:()=>Rs,parseAsync:()=>zs,partialRecord:()=>yl,pipe:()=>Jl,positive:()=>So,prefault:()=>Rl,preprocess:()=>du,prettifyError:()=>Ve,promise:()=>nu,property:()=>zo,readonly:()=>Xl,record:()=>z,refine:()=>ou,regex:()=>No,regexes:()=>Xe,registry:()=>ya,safeParse:()=>Bs,safeParseAsync:()=>Vs,set:()=>Cl,setErrorMap:()=>pu,size:()=>ko,startsWith:()=>Lo,strictObject:()=>ul,string:()=>A,stringFormat:()=>Mc,stringbool:()=>lu,success:()=>Hl,superRefine:()=>su,symbol:()=>qc,templateLiteral:()=>Ql,toJSONSchema:()=>Cs,toLowerCase:()=>Wo,toUpperCase:()=>Go,transform:()=>Al,treeifyError:()=>ze,trim:()=>Uo,tuple:()=>_l,uint32:()=>zc,uint64:()=>Gc,ulid:()=>uc,undefined:()=>Yc,union:()=>R,unknown:()=>P,uppercase:()=>Fo,url:()=>ec,uuid:()=>Ys,uuidv4:()=>Xs,uuidv6:()=>Zs,uuidv7:()=>Qs,void:()=>il,xid:()=>fc});o(ti());var Su=xu;const Cu=`2025-11-25`,wu=[Cu,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Tu=`io.modelcontextprotocol/related-task`,U=au(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Eu=R([A(),M().int()]),Du=A();L({ttl:R([M(),Zc()]).optional(),pollInterval:M().optional()});const Ou=I({ttl:M().optional()}),ku=I({taskId:A()}),Au=L({progressToken:Eu.optional(),[Tu]:ku.optional()}),W=I({_meta:Au.optional()}),ju=W.extend({task:Ou.optional()}),Mu=e=>ju.safeParse(e).success,G=I({method:A(),params:W.loose().optional()}),K=I({_meta:Au.optional()}),q=I({method:A(),params:K.loose().optional()}),J=L({_meta:Au.optional()}),Nu=R([A(),M().int()]),Pu=I({jsonrpc:V(`2.0`),id:Nu,...G.shape}).strict(),Fu=e=>Pu.safeParse(e).success,Iu=I({jsonrpc:V(`2.0`),...q.shape}).strict(),Lu=e=>Iu.safeParse(e).success,Ru=I({jsonrpc:V(`2.0`),id:Nu,result:J}).strict(),zu=e=>Ru.safeParse(e).success;var Y;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Y||={});const Bu=I({jsonrpc:V(`2.0`),id:Nu.optional(),error:I({code:M().int(),message:A(),data:P().optional()})}).strict(),Vu=e=>Bu.safeParse(e).success,Hu=R([Pu,Iu,Ru,Bu]);R([Ru,Bu]);const Uu=J.strict(),Wu=K.extend({requestId:Nu.optional(),reason:A().optional()}),Gu=q.extend({method:V(`notifications/cancelled`),params:Wu}),Ku=I({icons:F(I({src:A(),mimeType:A().optional(),sizes:F(A()).optional(),theme:B([`light`,`dark`]).optional()})).optional()}),qu=I({name:A(),title:A().optional()}),Ju=qu.extend({...qu.shape,...Ku.shape,version:A(),websiteUrl:A().optional(),description:A().optional()}),Yu=du(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,hl(I({form:hl(I({applyDefaults:N().optional()}),z(A(),P())).optional(),url:U.optional()}),z(A(),P()).optional())),Xu=L({list:U.optional(),cancel:U.optional(),requests:L({sampling:L({createMessage:U.optional()}).optional(),elicitation:L({create:U.optional()}).optional()}).optional()}),Zu=L({list:U.optional(),cancel:U.optional(),requests:L({tools:L({call:U.optional()}).optional()}).optional()}),Qu=I({experimental:z(A(),U).optional(),sampling:I({context:U.optional(),tools:U.optional()}).optional(),elicitation:Yu.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:Xu.optional()}),$u=W.extend({protocolVersion:A(),capabilities:Qu,clientInfo:Ju}),ed=G.extend({method:V(`initialize`),params:$u}),td=e=>ed.safeParse(e).success,nd=I({experimental:z(A(),U).optional(),logging:U.optional(),completions:U.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:Zu.optional()}),rd=J.extend({protocolVersion:A(),capabilities:nd,serverInfo:Ju,instructions:A().optional()}),id=q.extend({method:V(`notifications/initialized`),params:K.optional()}),ad=G.extend({method:V(`ping`),params:W.optional()}),od=I({progress:M(),total:H(M()),message:H(A())}),sd=I({...K.shape,...od.shape,progressToken:Eu}),cd=q.extend({method:V(`notifications/progress`),params:sd}),ld=W.extend({cursor:Du.optional()}),ud=G.extend({params:ld.optional()}),dd=J.extend({nextCursor:Du.optional()}),fd=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),pd=I({taskId:A(),status:fd,ttl:R([M(),Zc()]),createdAt:A(),lastUpdatedAt:A(),pollInterval:H(M()),statusMessage:H(A())}),md=J.extend({task:pd}),hd=K.merge(pd),gd=q.extend({method:V(`notifications/tasks/status`),params:hd}),_d=G.extend({method:V(`tasks/get`),params:W.extend({taskId:A()})}),vd=J.merge(pd),yd=G.extend({method:V(`tasks/result`),params:W.extend({taskId:A()})});J.loose();const bd=ud.extend({method:V(`tasks/list`)}),xd=dd.extend({tasks:F(pd)}),Sd=G.extend({method:V(`tasks/cancel`),params:W.extend({taskId:A()})}),Cd=J.merge(pd),wd=I({uri:A(),mimeType:H(A()),_meta:z(A(),P()).optional()}),Td=wd.extend({text:A()}),Ed=A().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Dd=wd.extend({blob:Ed}),Od=B([`user`,`assistant`]),kd=I({audience:F(Od).optional(),priority:M().min(0).max(1).optional(),lastModified:Os({offset:!0}).optional()}),Ad=I({...qu.shape,...Ku.shape,uri:A(),description:H(A()),mimeType:H(A()),annotations:kd.optional(),_meta:H(L({}))}),jd=I({...qu.shape,...Ku.shape,uriTemplate:A(),description:H(A()),mimeType:H(A()),annotations:kd.optional(),_meta:H(L({}))}),Md=ud.extend({method:V(`resources/list`)}),Nd=dd.extend({resources:F(Ad)}),Pd=ud.extend({method:V(`resources/templates/list`)}),Fd=dd.extend({resourceTemplates:F(jd)}),Id=W.extend({uri:A()}),Ld=Id,Rd=G.extend({method:V(`resources/read`),params:Ld}),zd=J.extend({contents:F(R([Td,Dd]))}),Bd=q.extend({method:V(`notifications/resources/list_changed`),params:K.optional()}),Vd=Id,Hd=G.extend({method:V(`resources/subscribe`),params:Vd}),Ud=Id,Wd=G.extend({method:V(`resources/unsubscribe`),params:Ud}),Gd=K.extend({uri:A()}),Kd=q.extend({method:V(`notifications/resources/updated`),params:Gd}),qd=I({name:A(),description:H(A()),required:H(N())}),Jd=I({...qu.shape,...Ku.shape,description:H(A()),arguments:H(F(qd)),_meta:H(L({}))}),Yd=ud.extend({method:V(`prompts/list`)}),Xd=dd.extend({prompts:F(Jd)}),Zd=W.extend({name:A(),arguments:z(A(),A()).optional()}),Qd=G.extend({method:V(`prompts/get`),params:Zd}),$d=I({type:V(`text`),text:A(),annotations:kd.optional(),_meta:z(A(),P()).optional()}),ef=I({type:V(`image`),data:Ed,mimeType:A(),annotations:kd.optional(),_meta:z(A(),P()).optional()}),tf=I({type:V(`audio`),data:Ed,mimeType:A(),annotations:kd.optional(),_meta:z(A(),P()).optional()}),nf=I({type:V(`tool_use`),name:A(),id:A(),input:z(A(),P()),_meta:z(A(),P()).optional()}),rf=I({type:V(`resource`),resource:R([Td,Dd]),annotations:kd.optional(),_meta:z(A(),P()).optional()}),af=R([$d,ef,tf,Ad.extend({type:V(`resource_link`)}),rf]),of=I({role:Od,content:af}),sf=J.extend({description:A().optional(),messages:F(of)}),cf=q.extend({method:V(`notifications/prompts/list_changed`),params:K.optional()}),lf=I({title:A().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),uf=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),df=I({...qu.shape,...Ku.shape,description:A().optional(),inputSchema:I({type:V(`object`),properties:z(A(),U).optional(),required:F(A()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(A(),U).optional(),required:F(A()).optional()}).catchall(P()).optional(),annotations:lf.optional(),execution:uf.optional(),_meta:z(A(),P()).optional()}),ff=ud.extend({method:V(`tools/list`)}),pf=dd.extend({tools:F(df)}),mf=J.extend({content:F(af).default([]),structuredContent:z(A(),P()).optional(),isError:N().optional()});mf.or(J.extend({toolResult:P()}));const hf=ju.extend({name:A(),arguments:z(A(),P()).optional()}),gf=G.extend({method:V(`tools/call`),params:hf}),_f=q.extend({method:V(`notifications/tools/list_changed`),params:K.optional()});I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)});const vf=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),yf=W.extend({level:vf}),bf=G.extend({method:V(`logging/setLevel`),params:yf}),xf=K.extend({level:vf,logger:A().optional(),data:P()}),Sf=q.extend({method:V(`notifications/message`),params:xf}),Cf=I({hints:F(I({name:A().optional()})).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),wf=I({mode:B([`auto`,`required`,`none`]).optional()}),Tf=I({type:V(`tool_result`),toolUseId:A().describe(`The unique identifier for the corresponding tool call.`),content:F(af).default([]),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(A(),P()).optional()}),Ef=pl(`type`,[$d,ef,tf]),Df=pl(`type`,[$d,ef,tf,nf,Tf]),Of=I({role:Od,content:R([Df,F(Df)]),_meta:z(A(),P()).optional()}),kf=ju.extend({messages:F(Of),modelPreferences:Cf.optional(),systemPrompt:A().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(A()).optional(),metadata:U.optional(),tools:F(df).optional(),toolChoice:wf.optional()}),Af=G.extend({method:V(`sampling/createMessage`),params:kf}),jf=J.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(A())),role:Od,content:Ef}),Mf=J.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(A())),role:Od,content:R([Df,F(Df)])}),Nf=I({type:V(`boolean`),title:A().optional(),description:A().optional(),default:N().optional()}),Pf=I({type:V(`string`),title:A().optional(),description:A().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:A().optional()}),Ff=I({type:B([`number`,`integer`]),title:A().optional(),description:A().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),If=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),default:A().optional()}),Lf=I({type:V(`string`),title:A().optional(),description:A().optional(),oneOf:F(I({const:A(),title:A()})),default:A().optional()}),Rf=R([R([I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),enumNames:F(A()).optional(),default:A().optional()}),R([If,Lf]),R([I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(A())}),default:F(A()).optional()}),I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:A(),title:A()}))}),default:F(A()).optional()})])]),Nf,Pf,Ff]),zf=R([ju.extend({mode:V(`form`).optional(),message:A(),requestedSchema:I({type:V(`object`),properties:z(A(),Rf),required:F(A()).optional()})}),ju.extend({mode:V(`url`),message:A(),elicitationId:A(),url:A().url()})]),Bf=G.extend({method:V(`elicitation/create`),params:zf}),Vf=K.extend({elicitationId:A()}),Hf=q.extend({method:V(`notifications/elicitation/complete`),params:Vf}),Uf=J.extend({action:B([`accept`,`decline`,`cancel`]),content:du(e=>e===null?void 0:e,z(A(),R([A(),M(),N(),F(A())])).optional())}),Wf=I({type:V(`ref/resource`),uri:A()}),Gf=I({type:V(`ref/prompt`),name:A()}),Kf=W.extend({ref:R([Gf,Wf]),argument:I({name:A(),value:A()}),context:I({arguments:z(A(),A()).optional()}).optional()}),qf=G.extend({method:V(`completion/complete`),params:Kf});function Jf(e){if(e.params.ref.type!==`ref/prompt`)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Yf(e){if(e.params.ref.type!==`ref/resource`)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const Xf=J.extend({completion:L({values:F(A()).max(100),total:H(M().int()),hasMore:H(N())})}),Zf=I({uri:A().startsWith(`file://`),name:A().optional(),_meta:z(A(),P()).optional()}),Qf=G.extend({method:V(`roots/list`),params:W.optional()}),$f=J.extend({roots:F(Zf)}),ep=q.extend({method:V(`notifications/roots/list_changed`),params:K.optional()});R([ad,ed,qf,bf,Qd,Yd,Md,Pd,Rd,Hd,Wd,gf,ff,_d,yd,bd,Sd]),R([Gu,cd,id,ep,gd]),R([Uu,jf,Mf,Uf,$f,vd,xd,md]),R([ad,Af,Bf,Qf,_d,yd,bd,Sd]),R([Gu,cd,Sf,Kd,Bd,_f,cf,gd,Hf]),R([Uu,rd,Xf,sf,Xd,Nd,Fd,zd,mf,pf,vd,xd,md]);var tp=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Y.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new np(e.elicitations,n)}return new e(t,n,r)}},np=class extends tp{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},X=class extends Error{constructor(e,t){super(e),this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},rp=class extends X{};rp.errorCode=`invalid_request`;var ip=class extends X{};ip.errorCode=`invalid_client`;var ap=class extends X{};ap.errorCode=`invalid_grant`;var op=class extends X{};op.errorCode=`unauthorized_client`;var sp=class extends X{};sp.errorCode=`unsupported_grant_type`;var cp=class extends X{};cp.errorCode=`invalid_scope`;var lp=class extends X{};lp.errorCode=`access_denied`;var up=class extends X{};up.errorCode=`server_error`;var dp=class extends X{};dp.errorCode=`temporarily_unavailable`;var fp=class extends X{};fp.errorCode=`unsupported_response_type`;var pp=class extends X{};pp.errorCode=`unsupported_token_type`;var mp=class extends X{};mp.errorCode=`invalid_token`;var hp=class extends X{};hp.errorCode=`method_not_allowed`;var gp=class extends X{};gp.errorCode=`too_many_requests`;var _p=class extends X{};_p.errorCode=`invalid_client_metadata`;var vp=class extends X{};vp.errorCode=`insufficient_scope`;var yp=class extends X{};yp.errorCode=`invalid_target`,rp.errorCode,ip.errorCode,ap.errorCode,op.errorCode,sp.errorCode,cp.errorCode,lp.errorCode,up.errorCode,dp.errorCode,fp.errorCode,pp.errorCode,mp.errorCode,hp.errorCode,gp.errorCode,_p.errorCode,vp.errorCode,yp.errorCode;var bp=(e,t,n)=>(r,i)=>{let a=-1;return o(0);async function o(s){if(s<=a)throw Error(`next() called multiple times`);a=s;let c,l=!1,u;if(e[s]?(u=e[s][0][0],r.req.routeIndex=s):u=s===e.length&&i||void 0,u)try{c=await u(r,()=>o(s+1))}catch(e){if(e instanceof Error&&t)r.error=e,c=await t(e,r),l=!0;else throw e}else r.finalized===!1&&n&&(c=await n(r));return c&&(r.finalized===!1||l)&&(r.res=c),r}},Z=class extends Error{res;status;constructor(e=500,t){super(t?.message,{cause:t?.cause}),this.res=t?.res,this.status=e}getResponse(){return this.res?new Response(this.res.body,{status:this.status,headers:this.res.headers}):new Response(this.message,{status:this.status})}},xp=Symbol(),Sp=async(e,t=Object.create(null))=>{let{all:n=!1,dot:r=!1}=t,i=(e instanceof Gp?e.raw.headers:e.headers).get(`Content-Type`);return i?.startsWith(`multipart/form-data`)||i?.startsWith(`application/x-www-form-urlencoded`)?Cp(e,{all:n,dot:r}):{}};async function Cp(e,t){let n=await e.formData();return n?wp(n,t):{}}function wp(e,t){let n=Object.create(null);return e.forEach((e,r)=>{t.all||r.endsWith(`[]`)?Tp(n,r,e):n[r]=e}),t.dot&&Object.entries(n).forEach(([e,t])=>{e.includes(`.`)&&(Ep(n,e,t),delete n[e])}),n}var Tp=(e,t,n)=>{e[t]===void 0?t.endsWith(`[]`)?e[t]=[n]:e[t]=n:Array.isArray(e[t])?e[t].push(n):e[t]=[e[t],n]},Ep=(e,t,n)=>{let r=e,i=t.split(`.`);i.forEach((e,t)=>{t===i.length-1?r[e]=n:((!r[e]||typeof r[e]!=`object`||Array.isArray(r[e])||r[e]instanceof File)&&(r[e]=Object.create(null)),r=r[e])})},Dp=e=>{let t=e.split(`/`);return t[0]===``&&t.shift(),t},Op=e=>{let{groups:t,path:n}=kp(e);return Ap(Dp(n),t)},kp=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(e,n)=>{let r=`@${n}`;return t.push([r,e]),r}),{groups:t,path:e}},Ap=(e,t)=>{for(let n=t.length-1;n>=0;n--){let[r]=t[n];for(let i=e.length-1;i>=0;i--)if(e[i].includes(r)){e[i]=e[i].replace(r,t[n][1]);break}}return e},jp={},Mp=(e,t)=>{if(e===`*`)return`*`;let n=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(n){let r=`${e}#${t}`;return jp[r]||(n[2]?jp[r]=t&&t[0]!==`:`&&t[0]!==`*`?[r,n[1],RegExp(`^${n[2]}(?=/${t})`)]:[e,n[1],RegExp(`^${n[2]}$`)]:jp[r]=[e,n[1],!0]),jp[r]}return null},Np=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,e=>{try{return t(e)}catch{return e}})}},Pp=e=>Np(e,decodeURI),Fp=e=>{let t=e.url,n=t.indexOf(`/`,t.indexOf(`:`)+4),r=n;for(;r<t.length;r++){let e=t.charCodeAt(r);if(e===37){let e=t.indexOf(`?`,r),i=t.indexOf(`#`,r),a=e===-1?i===-1?void 0:i:i===-1?e:Math.min(e,i),o=t.slice(n,a);return Pp(o.includes(`%25`)?o.replace(/%25/g,`%2525`):o)}else if(e===63||e===35)break}return t.slice(n,r)},Ip=e=>{let t=Fp(e);return t.length>1&&t.at(-1)===`/`?t.slice(0,-1):t},Lp=(e,t,...n)=>(n.length&&(t=Lp(t,...n)),`${e?.[0]===`/`?``:`/`}${e}${t===`/`?``:`${e?.at(-1)===`/`?``:`/`}${t?.[0]===`/`?t.slice(1):t}`}`),Rp=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(`:`))return null;let t=e.split(`/`),n=[],r=``;return t.forEach(e=>{if(e!==``&&!/\:/.test(e))r+=`/`+e;else if(/\:/.test(e))if(/\?/.test(e)){n.length===0&&r===``?n.push(`/`):n.push(r);let t=e.replace(`?`,``);r+=`/`+t,n.push(r)}else r+=`/`+e}),n.filter((e,t,n)=>n.indexOf(e)===t)},zp=e=>/[%+]/.test(e)?(e.indexOf(`+`)!==-1&&(e=e.replace(/\+/g,` `)),e.indexOf(`%`)===-1?e:Np(e,Up)):e,Bp=(e,t,n)=>{let r;if(!n&&t&&!/[%+]/.test(t)){let n=e.indexOf(`?`,8);if(n===-1)return;for(e.startsWith(t,n+1)||(n=e.indexOf(`&${t}`,n+1));n!==-1;){let r=e.charCodeAt(n+t.length+1);if(r===61){let r=n+t.length+2,i=e.indexOf(`&`,r);return zp(e.slice(r,i===-1?void 0:i))}else if(r==38||isNaN(r))return``;n=e.indexOf(`&${t}`,n+1)}if(r=/[%+]/.test(e),!r)return}let i={};r??=/[%+]/.test(e);let a=e.indexOf(`?`,8);for(;a!==-1;){let t=e.indexOf(`&`,a+1),o=e.indexOf(`=`,a);o>t&&t!==-1&&(o=-1);let s=e.slice(a+1,o===-1?t===-1?void 0:t:o);if(r&&(s=zp(s)),a=t,s===``)continue;let c;o===-1?c=``:(c=e.slice(o+1,t===-1?void 0:t),r&&(c=zp(c))),n?(i[s]&&Array.isArray(i[s])||(i[s]=[]),i[s].push(c)):i[s]??=c}return t?i[t]:i},Vp=Bp,Hp=(e,t)=>Bp(e,t,!0),Up=decodeURIComponent,Wp=e=>Np(e,Up),Gp=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t=`/`,n=[[]]){this.raw=e,this.path=t,this.#t=n,this.#e={}}param(e){return e?this.#n(e):this.#r()}#n(e){let t=this.#t[0][this.routeIndex][1][e],n=this.#i(t);return n&&/\%/.test(n)?Wp(n):n}#r(){let e={},t=Object.keys(this.#t[0][this.routeIndex][1]);for(let n of t){let t=this.#i(this.#t[0][this.routeIndex][1][n]);t!==void 0&&(e[n]=/\%/.test(t)?Wp(t):t)}return e}#i(e){return this.#t[1]?this.#t[1][e]:e}query(e){return Vp(this.url,e)}queries(e){return Hp(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;let t={};return this.raw.headers.forEach((e,n)=>{t[n]=e}),t}async parseBody(e){return this.bodyCache.parsedBody??=await Sp(this,e)}#a=e=>{let{bodyCache:t,raw:n}=this,r=t[e];if(r)return r;let i=Object.keys(t)[0];return i?t[i].then(t=>(i===`json`&&(t=JSON.stringify(t)),new Response(t)[e]())):t[e]=n[e]()};json(){return this.#a(`text`).then(e=>JSON.parse(e))}text(){return this.#a(`text`)}arrayBuffer(){return this.#a(`arrayBuffer`)}blob(){return this.#a(`blob`)}formData(){return this.#a(`formData`)}addValidatedData(e,t){this.#e[e]=t}valid(e){return this.#e[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[xp](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}},Kp={Stringify:1,BeforeStream:2,Stream:3},qp=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},Jp=async(e,t,n,r,i)=>{typeof e==`object`&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let a=e.callbacks;if(!a?.length)return Promise.resolve(e);i?i[0]+=e:i=[e];let o=Promise.all(a.map(e=>e({phase:t,buffer:i,context:r}))).then(e=>Promise.all(e.filter(Boolean).map(e=>Jp(e,t,!1,r,i))).then(()=>i[0]));return n?qp(await o,a):o},Yp=`text/plain; charset=UTF-8`,Xp=(e,t)=>({"Content-Type":e,...t}),Zp=(e,t)=>new Response(e,t),Qp=class{#e;#t;env={};#n;finalized=!1;error;#r;#i;#a;#o;#s;#c;#l;#u;#d;constructor(e,t){this.#e=e,t&&(this.#i=t.executionCtx,this.env=t.env,this.#c=t.notFoundHandler,this.#d=t.path,this.#u=t.matchResult)}get req(){return this.#t??=new Gp(this.#e,this.#d,this.#u),this.#t}get event(){if(this.#i&&`respondWith`in this.#i)return this.#i;throw Error(`This context has no FetchEvent`)}get executionCtx(){if(this.#i)return this.#i;throw Error(`This context has no ExecutionContext`)}get res(){return this.#a||=Zp(null,{headers:this.#l??=new Headers})}set res(e){if(this.#a&&e){e=Zp(e.body,e);for(let[t,n]of this.#a.headers.entries())if(t!==`content-type`)if(t===`set-cookie`){let t=this.#a.headers.getSetCookie();e.headers.delete(`set-cookie`);for(let n of t)e.headers.append(`set-cookie`,n)}else e.headers.set(t,n)}this.#a=e,this.finalized=!0}render=(...e)=>(this.#s??=e=>this.html(e),this.#s(...e));setLayout=e=>this.#o=e;getLayout=()=>this.#o;setRenderer=e=>{this.#s=e};header=(e,t,n)=>{this.finalized&&(this.#a=Zp(this.#a.body,this.#a));let r=this.#a?this.#a.headers:this.#l??=new Headers;t===void 0?r.delete(e):n?.append?r.append(e,t):r.set(e,t)};status=e=>{this.#r=e};set=(e,t)=>{this.#n??=new Map,this.#n.set(e,t)};get=e=>this.#n?this.#n.get(e):void 0;get var(){return this.#n?Object.fromEntries(this.#n):{}}#f(e,t,n){let r=this.#a?new Headers(this.#a.headers):this.#l??new Headers;if(typeof t==`object`&&`headers`in t){let e=t.headers instanceof Headers?t.headers:new Headers(t.headers);for(let[t,n]of e)t.toLowerCase()===`set-cookie`?r.append(t,n):r.set(t,n)}if(n)for(let[e,t]of Object.entries(n))if(typeof t==`string`)r.set(e,t);else{r.delete(e);for(let n of t)r.append(e,n)}return Zp(e,{status:typeof t==`number`?t:t?.status??this.#r,headers:r})}newResponse=(...e)=>this.#f(...e);body=(e,t,n)=>this.#f(e,t,n);text=(e,t,n)=>!this.#l&&!this.#r&&!t&&!n&&!this.finalized?new Response(e):this.#f(e,t,Xp(Yp,n));json=(e,t,n)=>this.#f(JSON.stringify(e),t,Xp(`application/json`,n));html=(e,t,n)=>{let r=e=>this.#f(e,t,Xp(`text/html; charset=UTF-8`,n));return typeof e==`object`?Jp(e,Kp.Stringify,!1,{}).then(r):r(e)};redirect=(e,t)=>{let n=String(e);return this.header(`Location`,/[^\x00-\xFF]/.test(n)?encodeURI(n):n),this.newResponse(null,t??302)};notFound=()=>(this.#c??=()=>Zp(),this.#c(this))},Q=`ALL`,$p=`all`,em=[`get`,`post`,`put`,`delete`,`options`,`patch`],tm=`Can not add a route since the matcher is already built.`,nm=class extends Error{},rm=`__COMPOSED_HANDLER`,im=e=>e.text(`404 Not Found`,404),am=(e,t)=>{if(`getResponse`in e){let n=e.getResponse();return t.newResponse(n.body,n)}return console.error(e),t.text(`Internal Server Error`,500)},om=class e{get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath=`/`;#e=`/`;routes=[];constructor(e={}){[...em,$p].forEach(e=>{this[e]=(t,...n)=>(typeof t==`string`?this.#e=t:this.#r(e,this.#e,t),n.forEach(t=>{this.#r(e,this.#e,t)}),this)}),this.on=(e,t,...n)=>{for(let r of[t].flat()){this.#e=r;for(let t of[e].flat())n.map(e=>{this.#r(t.toUpperCase(),this.#e,e)})}return this},this.use=(e,...t)=>(typeof e==`string`?this.#e=e:(this.#e=`*`,t.unshift(e)),t.forEach(e=>{this.#r(Q,this.#e,e)}),this);let{strict:t,...n}=e;Object.assign(this,n),this.getPath=t??!0?e.getPath??Fp:Ip}#t(){let t=new e({router:this.router,getPath:this.getPath});return t.errorHandler=this.errorHandler,t.#n=this.#n,t.routes=this.routes,t}#n=im;errorHandler=am;route(e,t){let n=this.basePath(e);return t.routes.map(e=>{let r;t.errorHandler===am?r=e.handler:(r=async(n,r)=>(await bp([],t.errorHandler)(n,()=>e.handler(n,r))).res,r[rm]=e.handler),n.#r(e.method,e.path,r)}),this}basePath(e){let t=this.#t();return t._basePath=Lp(this._basePath,e),t}onError=e=>(this.errorHandler=e,this);notFound=e=>(this.#n=e,this);mount(e,t,n){let r,i;n&&(typeof n==`function`?i=n:(i=n.optionHandler,r=n.replaceRequest===!1?e=>e:n.replaceRequest));let a=i?e=>{let t=i(e);return Array.isArray(t)?t:[t]}:e=>{let t;try{t=e.executionCtx}catch{}return[e.env,t]};r||=(()=>{let t=Lp(this._basePath,e),n=t===`/`?0:t.length;return e=>{let t=new URL(e.url);return t.pathname=t.pathname.slice(n)||`/`,new Request(t,e)}})();let o=async(e,n)=>{let i=await t(r(e.req.raw),...a(e));if(i)return i;await n()};return this.#r(Q,Lp(e,`*`),o),this}#r(e,t,n){e=e.toUpperCase(),t=Lp(this._basePath,t);let r={basePath:this._basePath,path:t,method:e,handler:n};this.router.add(e,t,[n,r]),this.routes.push(r)}#i(e,t){if(e instanceof Error)return this.errorHandler(e,t);throw e}#a(e,t,n,r){if(r===`HEAD`)return(async()=>new Response(null,await this.#a(e,t,n,`GET`)))();let i=this.getPath(e,{env:n}),a=this.router.match(r,i),o=new Qp(e,{path:i,matchResult:a,env:n,executionCtx:t,notFoundHandler:this.#n});if(a[0].length===1){let e;try{e=a[0][0][0][0](o,async()=>{o.res=await this.#n(o)})}catch(e){return this.#i(e,o)}return e instanceof Promise?e.then(e=>e||(o.finalized?o.res:this.#n(o))).catch(e=>this.#i(e,o)):e??this.#n(o)}let s=bp(a[0],this.errorHandler,this.#n);return(async()=>{try{let e=await s(o);if(!e.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return e.res}catch(e){return this.#i(e,o)}})()}fetch=(e,...t)=>this.#a(e,t[1],t[0],e.method);request=(e,t,n,r)=>e instanceof Request?this.fetch(t?new Request(e,t):e,n,r):(e=e.toString(),this.fetch(new Request(/^https?:\/\//.test(e)?e:`http://localhost${Lp(`/`,e)}`,t),n,r));fire=()=>{addEventListener(`fetch`,e=>{e.respondWith(this.#a(e.request,e,void 0,e.request.method))})}},sm=[];function cm(e,t){let n=this.buildAllMatchers(),r=((e,t)=>{let r=n[e]||n[Q],i=r[2][t];if(i)return i;let a=t.match(r[0]);if(!a)return[[],sm];let o=a.indexOf(``,1);return[r[1][o],a]});return this.match=r,r(e,t)}var lm=`[^/]+`,um=`.*`,dm=`(?:|/.*)`,fm=Symbol(),pm=new Set(`.\\+*[^]$()`);function mm(e,t){return e.length===1?t.length===1?e<t?-1:1:-1:t.length===1||e===um||e===dm?1:t===um||t===dm?-1:e===lm?1:t===lm?-1:e.length===t.length?e<t?-1:1:t.length-e.length}var hm=class e{#e;#t;#n=Object.create(null);insert(t,n,r,i,a){if(t.length===0){if(this.#e!==void 0)throw fm;if(a)return;this.#e=n;return}let[o,...s]=t,c=o===`*`?s.length===0?[``,``,um]:[``,``,lm]:o===`/*`?[``,``,dm]:o.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),l;if(c){let t=c[1],n=c[2]||lm;if(t&&c[2]&&(n===`.*`||(n=n.replace(/^\((?!\?:)(?=[^)]+\)$)/,`(?:`),/\((?!\?:)/.test(n))))throw fm;if(l=this.#n[n],!l){if(Object.keys(this.#n).some(e=>e!==um&&e!==dm))throw fm;if(a)return;l=this.#n[n]=new e,t!==``&&(l.#t=i.varIndex++)}!a&&t!==``&&r.push([t,l.#t])}else if(l=this.#n[o],!l){if(Object.keys(this.#n).some(e=>e.length>1&&e!==um&&e!==dm))throw fm;if(a)return;l=this.#n[o]=new e}l.insert(s,n,r,i,a)}buildRegExpStr(){let e=Object.keys(this.#n).sort(mm).map(e=>{let t=this.#n[e];return(typeof t.#t==`number`?`(${e})@${t.#t}`:pm.has(e)?`\\${e}`:e)+t.buildRegExpStr()});return typeof this.#e==`number`&&e.unshift(`#${this.#e}`),e.length===0?``:e.length===1?e[0]:`(?:`+e.join(`|`)+`)`}},gm=class{#e={varIndex:0};#t=new hm;insert(e,t,n){let r=[],i=[];for(let t=0;;){let n=!1;if(e=e.replace(/\{[^}]+\}/g,e=>{let r=`@\\${t}`;return i[t]=[r,e],t++,n=!0,r}),!n)break}let a=e.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let e=i.length-1;e>=0;e--){let[t]=i[e];for(let n=a.length-1;n>=0;n--)if(a[n].indexOf(t)!==-1){a[n]=a[n].replace(t,i[e][1]);break}}return this.#t.insert(a,t,r,this.#e,n),r}buildRegExp(){let e=this.#t.buildRegExpStr();if(e===``)return[/^$/,[],[]];let t=0,n=[],r=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(e,i,a)=>i===void 0?(a===void 0||(r[Number(a)]=++t),``):(n[++t]=Number(i),`$()`)),[RegExp(`^${e}`),n,r]}},_m=[/^$/,[],Object.create(null)],vm=Object.create(null);function ym(e){return vm[e]??=RegExp(e===`*`?``:`^${e.replace(/\/\*$|([.\\+*[^\]$()])/g,(e,t)=>t?`\\${t}`:`(?:|/.*)`)}$`)}function bm(){vm=Object.create(null)}function xm(e){let t=new gm,n=[];if(e.length===0)return _m;let r=e.map(e=>[!/\*|\/:/.test(e[0]),...e]).sort(([e,t],[n,r])=>e?1:n?-1:t.length-r.length),i=Object.create(null);for(let e=0,a=-1,o=r.length;e<o;e++){let[o,s,c]=r[e];o?i[s]=[c.map(([e])=>[e,Object.create(null)]),sm]:a++;let l;try{l=t.insert(s,a,o)}catch(e){throw e===fm?new nm(s):e}o||(n[a]=c.map(([e,t])=>{let n=Object.create(null);for(--t;t>=0;t--){let[e,r]=l[t];n[e]=r}return[e,n]}))}let[a,o,s]=t.buildRegExp();for(let e=0,t=n.length;e<t;e++)for(let t=0,r=n[e].length;t<r;t++){let r=n[e][t]?.[1];if(!r)continue;let i=Object.keys(r);for(let e=0,t=i.length;e<t;e++)r[i[e]]=s[r[i[e]]]}let c=[];for(let e in o)c[e]=n[o[e]];return[a,c,i]}function Sm(e,t){if(e){for(let n of Object.keys(e).sort((e,t)=>t.length-e.length))if(ym(n).test(t))return[...e[n]]}}var Cm=class{name=`RegExpRouter`;#e;#t;constructor(){this.#e={[Q]:Object.create(null)},this.#t={[Q]:Object.create(null)}}add(e,t,n){let r=this.#e,i=this.#t;if(!r||!i)throw Error(tm);r[e]||[r,i].forEach(t=>{t[e]=Object.create(null),Object.keys(t[Q]).forEach(n=>{t[e][n]=[...t[Q][n]]})}),t===`/*`&&(t=`*`);let a=(t.match(/\/:/g)||[]).length;if(/\*$/.test(t)){let o=ym(t);e===Q?Object.keys(r).forEach(e=>{r[e][t]||=Sm(r[e],t)||Sm(r[Q],t)||[]}):r[e][t]||=Sm(r[e],t)||Sm(r[Q],t)||[],Object.keys(r).forEach(t=>{(e===Q||e===t)&&Object.keys(r[t]).forEach(e=>{o.test(e)&&r[t][e].push([n,a])})}),Object.keys(i).forEach(t=>{(e===Q||e===t)&&Object.keys(i[t]).forEach(e=>o.test(e)&&i[t][e].push([n,a]))});return}let o=Rp(t)||[t];for(let t=0,s=o.length;t<s;t++){let c=o[t];Object.keys(i).forEach(o=>{(e===Q||e===o)&&(i[o][c]||=[...Sm(r[o],c)||Sm(r[Q],c)||[]],i[o][c].push([n,a-s+t+1]))})}}match=cm;buildAllMatchers(){let e=Object.create(null);return Object.keys(this.#t).concat(Object.keys(this.#e)).forEach(t=>{e[t]||=this.#n(t)}),this.#e=this.#t=void 0,bm(),e}#n(e){let t=[],n=e===Q;return[this.#e,this.#t].forEach(r=>{let i=r[e]?Object.keys(r[e]).map(t=>[t,r[e][t]]):[];i.length===0?e!==Q&&t.push(...Object.keys(r[Q]).map(e=>[e,r[Q][e]])):(n||=!0,t.push(...i))}),n?xm(t):null}},wm=class{name=`SmartRouter`;#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,n){if(!this.#t)throw Error(tm);this.#t.push([e,t,n])}match(e,t){if(!this.#t)throw Error(`Fatal error`);let n=this.#e,r=this.#t,i=n.length,a=0,o;for(;a<i;a++){let i=n[a];try{for(let e=0,t=r.length;e<t;e++)i.add(...r[e]);o=i.match(e,t)}catch(e){if(e instanceof nm)continue;throw e}this.match=i.match.bind(i),this.#e=[i],this.#t=void 0;break}if(a===i)throw Error(`Fatal error`);return this.name=`SmartRouter + ${this.activeRouter.name}`,o}get activeRouter(){if(this.#t||this.#e.length!==1)throw Error(`No active router has been determined yet.`);return this.#e[0]}},Tm=Object.create(null),Em=e=>{for(let t in e)return!0;return!1},Dm=class e{#e;#t;#n;#r=0;#i=Tm;constructor(e,t,n){if(this.#t=n||Object.create(null),this.#e=[],e&&t){let n=Object.create(null);n[e]={handler:t,possibleKeys:[],score:0},this.#e=[n]}this.#n=[]}insert(t,n,r){this.#r=++this.#r;let i=this,a=Op(n),o=[];for(let t=0,n=a.length;t<n;t++){let n=a[t],r=a[t+1],s=Mp(n,r),c=Array.isArray(s)?s[0]:n;if(c in i.#t){i=i.#t[c],s&&o.push(s[1]);continue}i.#t[c]=new e,s&&(i.#n.push(s),o.push(s[1])),i=i.#t[c]}return i.#e.push({[t]:{handler:r,possibleKeys:o.filter((e,t,n)=>n.indexOf(e)===t),score:this.#r}}),i}#a(e,t,n,r,i){for(let a=0,o=t.#e.length;a<o;a++){let o=t.#e[a],s=o[n]||o[Q],c={};if(s!==void 0&&(s.params=Object.create(null),e.push(s),r!==Tm||i&&i!==Tm))for(let e=0,t=s.possibleKeys.length;e<t;e++){let t=s.possibleKeys[e],n=c[s.score];s.params[t]=i?.[t]&&!n?i[t]:r[t]??i?.[t],c[s.score]=!0}}}search(e,t){let n=[];this.#i=Tm;let r=[this],i=Dp(t),a=[],o=i.length,s=null;for(let c=0;c<o;c++){let l=i[c],u=c===o-1,d=[];for(let f=0,p=r.length;f<p;f++){let p=r[f],m=p.#t[l];m&&(m.#i=p.#i,u?(m.#t[`*`]&&this.#a(n,m.#t[`*`],e,p.#i),this.#a(n,m,e,p.#i)):d.push(m));for(let r=0,f=p.#n.length;r<f;r++){let f=p.#n[r],m=p.#i===Tm?{}:{...p.#i};if(f===`*`){let t=p.#t[`*`];t&&(this.#a(n,t,e,p.#i),t.#i=m,d.push(t));continue}let[ee,te,h]=f;if(!l&&!(h instanceof RegExp))continue;let g=p.#t[ee];if(h instanceof RegExp){if(s===null){s=Array(o);let e=t[0]===`/`?1:0;for(let t=0;t<o;t++)s[t]=e,e+=i[t].length+1}let r=t.substring(s[c]),l=h.exec(r);if(l){if(m[te]=l[0],this.#a(n,g,e,p.#i,m),Em(g.#t)){g.#i=m;let e=l[0].match(/\//)?.length??0;(a[e]||=[]).push(g)}continue}}(h===!0||h.test(l))&&(m[te]=l,u?(this.#a(n,g,e,m,p.#i),g.#t[`*`]&&this.#a(n,g.#t[`*`],e,m,p.#i)):(g.#i=m,d.push(g)))}}let f=a.shift();r=f?d.concat(f):d}return n.length>1&&n.sort((e,t)=>e.score-t.score),[n.map(({handler:e,params:t})=>[e,t])]}},Om=class{name=`TrieRouter`;#e;constructor(){this.#e=new Dm}add(e,t,n){let r=Rp(t);if(r){for(let t=0,i=r.length;t<i;t++)this.#e.insert(e,r[t],n);return}this.#e.insert(e,t,n)}match(e,t){return this.#e.search(e,t)}},km=class extends om{constructor(e={}){super(e),this.router=e.router??new wm({routers:[new Cm,new Om]})}},Am=e=>{let t={origin:`*`,allowMethods:[`GET`,`HEAD`,`PUT`,`POST`,`DELETE`,`PATCH`],allowHeaders:[],exposeHeaders:[],...e},n=(e=>typeof e==`string`?e===`*`?()=>e:t=>e===t?t:null:typeof e==`function`?e:t=>e.includes(t)?t:null)(t.origin),r=(e=>typeof e==`function`?e:Array.isArray(e)?()=>e:()=>[])(t.allowMethods);return async function e(i,a){function o(e,t){i.res.headers.set(e,t)}let s=await n(i.req.header(`origin`)||``,i);if(s&&o(`Access-Control-Allow-Origin`,s),t.credentials&&o(`Access-Control-Allow-Credentials`,`true`),t.exposeHeaders?.length&&o(`Access-Control-Expose-Headers`,t.exposeHeaders.join(`,`)),i.req.method===`OPTIONS`){t.origin!==`*`&&o(`Vary`,`Origin`),t.maxAge!=null&&o(`Access-Control-Max-Age`,t.maxAge.toString());let e=await r(i.req.header(`origin`)||``,i);e.length&&o(`Access-Control-Allow-Methods`,e.join(`,`));let n=t.allowHeaders;if(!n?.length){let e=i.req.header(`Access-Control-Request-Headers`);e&&(n=e.split(/\s*,\s*/))}return n?.length&&(o(`Access-Control-Allow-Headers`,n.join(`,`)),i.res.headers.append(`Vary`,`Access-Control-Request-Headers`)),i.res.headers.delete(`Content-Length`),i.res.headers.delete(`Content-Type`),new Response(null,{headers:i.res.headers,status:204,statusText:`No Content`})}await a(),t.origin!==`*`&&i.header(`Vary`,`Origin`,{append:!0})}};const $=ec().superRefine((e,n)=>{if(!URL.canParse(e))return n.addIssue({code:fu.custom,message:`URL must be parseable`,fatal:!0}),t}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`});L({resource:A().url(),authorization_servers:F($).optional(),jwks_uri:A().url().optional(),scopes_supported:F(A()).optional(),bearer_methods_supported:F(A()).optional(),resource_signing_alg_values_supported:F(A()).optional(),resource_name:A().optional(),resource_documentation:A().optional(),resource_policy_uri:A().url().optional(),resource_tos_uri:A().url().optional(),tls_client_certificate_bound_access_tokens:N().optional(),authorization_details_types_supported:F(A()).optional(),dpop_signing_alg_values_supported:F(A()).optional(),dpop_bound_access_tokens_required:N().optional()});const jm=L({issuer:A(),authorization_endpoint:$,token_endpoint:$,registration_endpoint:$.optional(),scopes_supported:F(A()).optional(),response_types_supported:F(A()),response_modes_supported:F(A()).optional(),grant_types_supported:F(A()).optional(),token_endpoint_auth_methods_supported:F(A()).optional(),token_endpoint_auth_signing_alg_values_supported:F(A()).optional(),service_documentation:$.optional(),revocation_endpoint:$.optional(),revocation_endpoint_auth_methods_supported:F(A()).optional(),revocation_endpoint_auth_signing_alg_values_supported:F(A()).optional(),introspection_endpoint:A().optional(),introspection_endpoint_auth_methods_supported:F(A()).optional(),introspection_endpoint_auth_signing_alg_values_supported:F(A()).optional(),code_challenge_methods_supported:F(A()).optional(),client_id_metadata_document_supported:N().optional()});I({...L({issuer:A(),authorization_endpoint:$,token_endpoint:$,userinfo_endpoint:$.optional(),jwks_uri:$,registration_endpoint:$.optional(),scopes_supported:F(A()).optional(),response_types_supported:F(A()),response_modes_supported:F(A()).optional(),grant_types_supported:F(A()).optional(),acr_values_supported:F(A()).optional(),subject_types_supported:F(A()),id_token_signing_alg_values_supported:F(A()),id_token_encryption_alg_values_supported:F(A()).optional(),id_token_encryption_enc_values_supported:F(A()).optional(),userinfo_signing_alg_values_supported:F(A()).optional(),userinfo_encryption_alg_values_supported:F(A()).optional(),userinfo_encryption_enc_values_supported:F(A()).optional(),request_object_signing_alg_values_supported:F(A()).optional(),request_object_encryption_alg_values_supported:F(A()).optional(),request_object_encryption_enc_values_supported:F(A()).optional(),token_endpoint_auth_methods_supported:F(A()).optional(),token_endpoint_auth_signing_alg_values_supported:F(A()).optional(),display_values_supported:F(A()).optional(),claim_types_supported:F(A()).optional(),claims_supported:F(A()).optional(),service_documentation:A().optional(),claims_locales_supported:F(A()).optional(),ui_locales_supported:F(A()).optional(),claims_parameter_supported:N().optional(),request_parameter_supported:N().optional(),request_uri_parameter_supported:N().optional(),require_request_uri_registration:N().optional(),op_policy_uri:$.optional(),op_tos_uri:$.optional(),client_id_metadata_document_supported:N().optional()}).shape,...jm.pick({code_challenge_methods_supported:!0}).shape}),I({access_token:A(),id_token:A().optional(),token_type:A(),expires_in:_u().optional(),scope:A().optional(),refresh_token:A().optional()}).strip(),I({error:A(),error_description:A().optional(),error_uri:A().optional()});const Mm=$.optional().or(V(``).transform(()=>void 0)),Nm=I({redirect_uris:F($),token_endpoint_auth_method:A().optional(),grant_types:F(A()).optional(),response_types:F(A()).optional(),client_name:A().optional(),client_uri:$.optional(),logo_uri:Mm,scope:A().optional(),contacts:F(A()).optional(),tos_uri:Mm,policy_uri:A().optional(),jwks_uri:$.optional(),jwks:$c().optional(),software_id:A().optional(),software_version:A().optional(),software_statement:A().optional()}).strip(),Pm=I({client_id:A(),client_secret:A().optional(),client_id_issued_at:M().optional(),client_secret_expires_at:M().optional()}).strip();Nm.merge(Pm),I({error:A(),error_description:A().optional()}).strip(),I({token:A(),token_type_hint:A().optional()}).strip(),globalThis.crypto?.webcrypto??globalThis.crypto??import(`node:crypto`).then(e=>e.webcrypto),I({client_id:A(),redirect_uri:A().optional().refine(e=>e===void 0||URL.canParse(e),{message:`redirect_uri must be a valid URL`})}),I({response_type:V(`code`),code_challenge:A(),code_challenge_method:V(`S256`),scope:A().optional(),state:A().optional(),resource:ec().optional()}),I({grant_type:A()}),I({code:A(),code_verifier:A(),redirect_uri:A().optional(),resource:ec().optional()}),I({refresh_token:A(),scope:A().optional(),resource:ec().optional()}),I({client_id:A(),client_secret:A().optional()});var Fm=class{writer;encoder;writable;abortSubscribers=[];responseReadable;aborted=!1;closed=!1;constructor(e,t){this.writable=e,this.writer=e.getWriter(),this.encoder=new TextEncoder;let n=t.getReader();this.abortSubscribers.push(async()=>{await n.cancel()}),this.responseReadable=new ReadableStream({async pull(e){let{done:t,value:r}=await n.read();t?e.close():e.enqueue(r)},cancel:()=>{this.abort()}})}async write(e){try{typeof e==`string`&&(e=this.encoder.encode(e)),await this.writer.write(e)}catch{}return this}async writeln(e){return await this.write(e+`
|
|
29
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let t of this.seen.entries()){let r=t[1];if(e===t[0]){a(t);continue}if(n.external){let r=n.external.registry.get(t[0])?.id;if(e!==t[0]&&r){a(t);continue}}if(this.metadataRegistry.get(t[0])?.id){a(t);continue}if(r.cycle){a(t);continue}if(r.count>1&&n.reused===`ref`){a(t);continue}}let o=(e,t)=>{let n=this.seen.get(e),r=n.def??n.schema,i={...r};if(n.ref===null)return;let a=n.ref;if(n.ref=null,a){o(a,t);let e=this.seen.get(a).schema;e.$ref&&t.target===`draft-7`?(r.allOf=r.allOf??[],r.allOf.push(e)):(Object.assign(r,e),Object.assign(r,i))}n.isParent||this.override({zodSchema:e,jsonSchema:r,path:n.path??[]})};for(let e of[...this.seen.entries()].reverse())o(e[0],{target:this.target});let s={};if(this.target===`draft-2020-12`?s.$schema=`https://json-schema.org/draft/2020-12/schema`:this.target===`draft-7`?s.$schema=`http://json-schema.org/draft-07/schema#`:console.warn(`Invalid target: ${this.target}`),n.external?.uri){let t=n.external.registry.get(e)?.id;if(!t)throw Error("Schema is missing an `id` property");s.$id=n.external.uri(t)}Object.assign(s,r.def);let c=n.external?.defs??{};for(let e of this.seen.entries()){let t=e[1];t.def&&t.defId&&(c[t.defId]=t.def)}n.external||Object.keys(c).length>0&&(this.target===`draft-2020-12`?s.$defs=c:s.definitions=c);try{return JSON.parse(JSON.stringify(s))}catch{throw Error(`Error converting schema to JSON.`)}}};function Cs(e,t){if(e instanceof va){let n=new Ss(t),r={};for(let t of e._idmap.entries()){let[e,r]=t;n.process(r)}let i={},a={registry:e,uri:t?.uri,defs:r};for(let r of e._idmap.entries()){let[e,o]=r;i[e]=n.emit(o,{...t,external:a})}return Object.keys(r).length>0&&(i.__shared={[n.target===`draft-2020-12`?`$defs`:`definitions`]:r}),{schemas:i}}let n=new Ss(t);return n.process(e),n.emit(e,t)}function O(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.type){case`string`:case`number`:case`bigint`:case`boolean`:case`date`:case`symbol`:case`undefined`:case`null`:case`any`:case`unknown`:case`never`:case`void`:case`literal`:case`enum`:case`nan`:case`file`:case`template_literal`:return!1;case`array`:return O(r.element,n);case`object`:for(let e in r.shape)if(O(r.shape[e],n))return!0;return!1;case`union`:for(let e of r.options)if(O(e,n))return!0;return!1;case`intersection`:return O(r.left,n)||O(r.right,n);case`tuple`:for(let e of r.items)if(O(e,n))return!0;return!!(r.rest&&O(r.rest,n));case`record`:return O(r.keyType,n)||O(r.valueType,n);case`map`:return O(r.keyType,n)||O(r.valueType,n);case`set`:return O(r.valueType,n);case`promise`:case`optional`:case`nonoptional`:case`nullable`:case`readonly`:return O(r.innerType,n);case`lazy`:return O(r.getter(),n);case`default`:return O(r.innerType,n);case`prefault`:return O(r.innerType,n);case`custom`:return!1;case`transform`:return!0;case`pipe`:return O(r.in,n)||O(r.out,n);case`success`:return!1;case`catch`:return!1;default:}throw Error(`Unknown schema type: ${r.type}`)}var ws=e({}),Ts=e({$ZodAny:()=>Jn,$ZodArray:()=>er,$ZodAsyncError:()=>i,$ZodBase64:()=>Nn,$ZodBase64URL:()=>Fn,$ZodBigInt:()=>Un,$ZodBigIntFormat:()=>Wn,$ZodBoolean:()=>Hn,$ZodCIDRv4:()=>An,$ZodCIDRv6:()=>jn,$ZodCUID:()=>yn,$ZodCUID2:()=>bn,$ZodCatch:()=>kr,$ZodCheck:()=>C,$ZodCheckBigIntFormat:()=>Gt,$ZodCheckEndsWith:()=>an,$ZodCheckGreaterThan:()=>Ht,$ZodCheckIncludes:()=>nn,$ZodCheckLengthEquals:()=>Zt,$ZodCheckLessThan:()=>Vt,$ZodCheckLowerCase:()=>en,$ZodCheckMaxLength:()=>Yt,$ZodCheckMaxSize:()=>Kt,$ZodCheckMimeType:()=>cn,$ZodCheckMinLength:()=>Xt,$ZodCheckMinSize:()=>qt,$ZodCheckMultipleOf:()=>Ut,$ZodCheckNumberFormat:()=>Wt,$ZodCheckOverwrite:()=>ln,$ZodCheckProperty:()=>sn,$ZodCheckRegex:()=>$t,$ZodCheckSizeEquals:()=>Jt,$ZodCheckStartsWith:()=>rn,$ZodCheckStringFormat:()=>Qt,$ZodCheckUpperCase:()=>tn,$ZodCustom:()=>Rr,$ZodCustomStringFormat:()=>zn,$ZodDate:()=>Qn,$ZodDefault:()=>Cr,$ZodDiscriminatedUnion:()=>or,$ZodE164:()=>In,$ZodEmail:()=>hn,$ZodEmoji:()=>_n,$ZodEnum:()=>_r,$ZodError:()=>Fe,$ZodFile:()=>yr,$ZodFunction:()=>bs,$ZodGUID:()=>pn,$ZodIPv4:()=>On,$ZodIPv6:()=>kn,$ZodISODate:()=>Tn,$ZodISODateTime:()=>wn,$ZodISODuration:()=>Dn,$ZodISOTime:()=>En,$ZodIntersection:()=>sr,$ZodJWT:()=>Rn,$ZodKSUID:()=>Cn,$ZodLazy:()=>Lr,$ZodLiteral:()=>vr,$ZodMap:()=>pr,$ZodNaN:()=>Ar,$ZodNanoID:()=>vn,$ZodNever:()=>Xn,$ZodNonOptional:()=>Er,$ZodNull:()=>qn,$ZodNullable:()=>Sr,$ZodNumber:()=>Bn,$ZodNumberFormat:()=>Vn,$ZodObject:()=>rr,$ZodOptional:()=>xr,$ZodPipe:()=>jr,$ZodPrefault:()=>Tr,$ZodPromise:()=>Ir,$ZodReadonly:()=>Nr,$ZodRealError:()=>Ie,$ZodRecord:()=>fr,$ZodRegistry:()=>va,$ZodSet:()=>hr,$ZodString:()=>fn,$ZodStringFormat:()=>T,$ZodSuccess:()=>Or,$ZodSymbol:()=>Gn,$ZodTemplateLiteral:()=>Fr,$ZodTransform:()=>br,$ZodTuple:()=>ur,$ZodType:()=>w,$ZodULID:()=>xn,$ZodURL:()=>gn,$ZodUUID:()=>mn,$ZodUndefined:()=>Kn,$ZodUnion:()=>ar,$ZodUnknown:()=>Yn,$ZodVoid:()=>Zn,$ZodXID:()=>Sn,$brand:()=>r,$constructor:()=>n,$input:()=>_a,$output:()=>ga,Doc:()=>un,JSONSchema:()=>ws,JSONSchemaGenerator:()=>Ss,NEVER:()=>t,TimePrecision:()=>Ga,_any:()=>po,_array:()=>Ko,_base64:()=>Va,_base64url:()=>Ha,_bigint:()=>ao,_boolean:()=>ro,_catch:()=>us,_cidrv4:()=>za,_cidrv6:()=>Ba,_coercedBigint:()=>oo,_coercedBoolean:()=>io,_coercedDate:()=>vo,_coercedNumber:()=>Za,_coercedString:()=>Sa,_cuid:()=>Ma,_cuid2:()=>Na,_custom:()=>gs,_date:()=>_o,_default:()=>ss,_discriminatedUnion:()=>Jo,_e164:()=>Ua,_email:()=>Ca,_emoji:()=>Aa,_endsWith:()=>Ro,_enum:()=>es,_file:()=>rs,_float32:()=>$a,_float64:()=>eo,_gt:()=>xo,_gte:()=>D,_guid:()=>wa,_includes:()=>Io,_int:()=>Qa,_int32:()=>to,_int64:()=>so,_intersection:()=>Yo,_ipv4:()=>La,_ipv6:()=>Ra,_isoDate:()=>qa,_isoDateTime:()=>Ka,_isoDuration:()=>Ya,_isoTime:()=>Ja,_jwt:()=>Wa,_ksuid:()=>Ia,_lazy:()=>ms,_length:()=>Mo,_literal:()=>ns,_lowercase:()=>Po,_lt:()=>bo,_lte:()=>E,_map:()=>Qo,_max:()=>E,_maxLength:()=>Ao,_maxSize:()=>Do,_mime:()=>Bo,_min:()=>D,_minLength:()=>jo,_minSize:()=>Oo,_multipleOf:()=>Eo,_nan:()=>yo,_nanoid:()=>ja,_nativeEnum:()=>ts,_negative:()=>Co,_never:()=>ho,_nonnegative:()=>To,_nonoptional:()=>cs,_nonpositive:()=>wo,_normalize:()=>Ho,_null:()=>fo,_nullable:()=>os,_number:()=>Xa,_optional:()=>as,_overwrite:()=>Vo,_parse:()=>He,_parseAsync:()=>We,_pipe:()=>ds,_positive:()=>So,_promise:()=>hs,_property:()=>zo,_readonly:()=>fs,_record:()=>Zo,_refine:()=>_s,_regex:()=>No,_safeParse:()=>Ke,_safeParseAsync:()=>Je,_set:()=>$o,_size:()=>ko,_startsWith:()=>Lo,_string:()=>xa,_stringFormat:()=>ys,_stringbool:()=>vs,_success:()=>ls,_symbol:()=>lo,_templateLiteral:()=>ps,_toLowerCase:()=>Wo,_toUpperCase:()=>Go,_transform:()=>is,_trim:()=>Uo,_tuple:()=>Xo,_uint32:()=>no,_uint64:()=>co,_ulid:()=>Pa,_undefined:()=>uo,_union:()=>qo,_unknown:()=>mo,_uppercase:()=>Fo,_url:()=>ka,_uuid:()=>Ta,_uuidv4:()=>Ea,_uuidv6:()=>Da,_uuidv7:()=>Oa,_void:()=>go,_xid:()=>Fa,clone:()=>v,config:()=>o,flattenError:()=>Le,formatError:()=>Re,function:()=>xs,globalConfig:()=>a,globalRegistry:()=>ba,isValidBase64:()=>Mn,isValidBase64URL:()=>Pn,isValidJWT:()=>Ln,locales:()=>ha,parse:()=>Ue,parseAsync:()=>Ge,prettifyError:()=>Ve,regexes:()=>Xe,registry:()=>ya,safeParse:()=>qe,safeParseAsync:()=>Ye,toDotPath:()=>Be,toJSONSchema:()=>Cs,treeifyError:()=>ze,util:()=>s,version:()=>dn}),Es=e({ZodISODate:()=>ks,ZodISODateTime:()=>Ds,ZodISODuration:()=>Ns,ZodISOTime:()=>js,date:()=>As,datetime:()=>Os,duration:()=>Ps,time:()=>Ms});const Ds=n(`ZodISODateTime`,(e,t)=>{wn.init(e,t),j.init(e,t)});function Os(e){return Ka(Ds,e)}const ks=n(`ZodISODate`,(e,t)=>{Tn.init(e,t),j.init(e,t)});function As(e){return qa(ks,e)}const js=n(`ZodISOTime`,(e,t)=>{En.init(e,t),j.init(e,t)});function Ms(e){return Ja(js,e)}const Ns=n(`ZodISODuration`,(e,t)=>{Dn.init(e,t),j.init(e,t)});function Ps(e){return Ya(Ns,e)}const Fs=(e,t)=>{Fe.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Re(e,t)},flatten:{value:t=>Le(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},Is=n(`ZodError`,Fs),Ls=n(`ZodError`,Fs,{Parent:Error}),Rs=He(Ls),zs=We(Ls),Bs=Ke(Ls),Vs=Je(Ls),k=n(`ZodType`,(e,t)=>(w.init(e,t),e.def=t,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>v(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Rs(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Bs(e,t,n),e.parseAsync=async(t,n)=>zs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Vs(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(ou(t,n)),e.superRefine=t=>e.check(su(t)),e.overwrite=t=>e.check(Vo(t)),e.optional=()=>H(e),e.nullable=()=>Nl(e),e.nullish=()=>H(Nl(e)),e.nonoptional=t=>Bl(e,t),e.array=()=>F(e),e.or=t=>R([e,t]),e.and=t=>hl(e,t),e.transform=t=>Jl(e,Al(t)),e.default=t=>Il(e,t),e.prefault=t=>Rl(e,t),e.catch=t=>Wl(e,t),e.pipe=t=>Jl(e,t),e.readonly=()=>Xl(e),e.describe=t=>{let n=e.clone();return ba.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return ba.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return ba.get(e);let n=e.clone();return ba.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Hs=n(`_ZodString`,(e,t)=>{fn.init(e,t),k.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(No(...t)),e.includes=(...t)=>e.check(Io(...t)),e.startsWith=(...t)=>e.check(Lo(...t)),e.endsWith=(...t)=>e.check(Ro(...t)),e.min=(...t)=>e.check(jo(...t)),e.max=(...t)=>e.check(Ao(...t)),e.length=(...t)=>e.check(Mo(...t)),e.nonempty=(...t)=>e.check(jo(1,...t)),e.lowercase=t=>e.check(Po(t)),e.uppercase=t=>e.check(Fo(t)),e.trim=()=>e.check(Uo()),e.normalize=(...t)=>e.check(Ho(...t)),e.toLowerCase=()=>e.check(Wo()),e.toUpperCase=()=>e.check(Go())}),Us=n(`ZodString`,(e,t)=>{fn.init(e,t),Hs.init(e,t),e.email=t=>e.check(Ca(Ws,t)),e.url=t=>e.check(ka($s,t)),e.jwt=t=>e.check(Wa(kc,t)),e.emoji=t=>e.check(Aa(tc,t)),e.guid=t=>e.check(wa(Ks,t)),e.uuid=t=>e.check(Ta(Js,t)),e.uuidv4=t=>e.check(Ea(Js,t)),e.uuidv6=t=>e.check(Da(Js,t)),e.uuidv7=t=>e.check(Oa(Js,t)),e.nanoid=t=>e.check(ja(rc,t)),e.guid=t=>e.check(wa(Ks,t)),e.cuid=t=>e.check(Ma(ac,t)),e.cuid2=t=>e.check(Na(sc,t)),e.ulid=t=>e.check(Pa(lc,t)),e.base64=t=>e.check(Va(Cc,t)),e.base64url=t=>e.check(Ha(Tc,t)),e.xid=t=>e.check(Fa(dc,t)),e.ksuid=t=>e.check(Ia(pc,t)),e.ipv4=t=>e.check(La(hc,t)),e.ipv6=t=>e.check(Ra(_c,t)),e.cidrv4=t=>e.check(za(yc,t)),e.cidrv6=t=>e.check(Ba(xc,t)),e.e164=t=>e.check(Ua(Dc,t)),e.datetime=t=>e.check(Os(t)),e.date=t=>e.check(As(t)),e.time=t=>e.check(Ms(t)),e.duration=t=>e.check(Ps(t))});function A(e){return xa(Us,e)}const j=n(`ZodStringFormat`,(e,t)=>{T.init(e,t),Hs.init(e,t)}),Ws=n(`ZodEmail`,(e,t)=>{hn.init(e,t),j.init(e,t)});function Gs(e){return Ca(Ws,e)}const Ks=n(`ZodGUID`,(e,t)=>{pn.init(e,t),j.init(e,t)});function qs(e){return wa(Ks,e)}const Js=n(`ZodUUID`,(e,t)=>{mn.init(e,t),j.init(e,t)});function Ys(e){return Ta(Js,e)}function Xs(e){return Ea(Js,e)}function Zs(e){return Da(Js,e)}function Qs(e){return Oa(Js,e)}const $s=n(`ZodURL`,(e,t)=>{gn.init(e,t),j.init(e,t)});function ec(e){return ka($s,e)}const tc=n(`ZodEmoji`,(e,t)=>{_n.init(e,t),j.init(e,t)});function nc(e){return Aa(tc,e)}const rc=n(`ZodNanoID`,(e,t)=>{vn.init(e,t),j.init(e,t)});function ic(e){return ja(rc,e)}const ac=n(`ZodCUID`,(e,t)=>{yn.init(e,t),j.init(e,t)});function oc(e){return Ma(ac,e)}const sc=n(`ZodCUID2`,(e,t)=>{bn.init(e,t),j.init(e,t)});function cc(e){return Na(sc,e)}const lc=n(`ZodULID`,(e,t)=>{xn.init(e,t),j.init(e,t)});function uc(e){return Pa(lc,e)}const dc=n(`ZodXID`,(e,t)=>{Sn.init(e,t),j.init(e,t)});function fc(e){return Fa(dc,e)}const pc=n(`ZodKSUID`,(e,t)=>{Cn.init(e,t),j.init(e,t)});function mc(e){return Ia(pc,e)}const hc=n(`ZodIPv4`,(e,t)=>{On.init(e,t),j.init(e,t)});function gc(e){return La(hc,e)}const _c=n(`ZodIPv6`,(e,t)=>{kn.init(e,t),j.init(e,t)});function vc(e){return Ra(_c,e)}const yc=n(`ZodCIDRv4`,(e,t)=>{An.init(e,t),j.init(e,t)});function bc(e){return za(yc,e)}const xc=n(`ZodCIDRv6`,(e,t)=>{jn.init(e,t),j.init(e,t)});function Sc(e){return Ba(xc,e)}const Cc=n(`ZodBase64`,(e,t)=>{Nn.init(e,t),j.init(e,t)});function wc(e){return Va(Cc,e)}const Tc=n(`ZodBase64URL`,(e,t)=>{Fn.init(e,t),j.init(e,t)});function Ec(e){return Ha(Tc,e)}const Dc=n(`ZodE164`,(e,t)=>{In.init(e,t),j.init(e,t)});function Oc(e){return Ua(Dc,e)}const kc=n(`ZodJWT`,(e,t)=>{Rn.init(e,t),j.init(e,t)});function Ac(e){return Wa(kc,e)}const jc=n(`ZodCustomStringFormat`,(e,t)=>{zn.init(e,t),j.init(e,t)});function Mc(e,t,n={}){return ys(jc,e,t,n)}const Nc=n(`ZodNumber`,(e,t)=>{Bn.init(e,t),k.init(e,t),e.gt=(t,n)=>e.check(xo(t,n)),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.lt=(t,n)=>e.check(bo(t,n)),e.lte=(t,n)=>e.check(E(t,n)),e.max=(t,n)=>e.check(E(t,n)),e.int=t=>e.check(Fc(t)),e.safe=t=>e.check(Fc(t)),e.positive=t=>e.check(xo(0,t)),e.nonnegative=t=>e.check(D(0,t)),e.negative=t=>e.check(bo(0,t)),e.nonpositive=t=>e.check(E(0,t)),e.multipleOf=(t,n)=>e.check(Eo(t,n)),e.step=(t,n)=>e.check(Eo(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function M(e){return Xa(Nc,e)}const Pc=n(`ZodNumberFormat`,(e,t)=>{Vn.init(e,t),Nc.init(e,t)});function Fc(e){return Qa(Pc,e)}function Ic(e){return $a(Pc,e)}function Lc(e){return eo(Pc,e)}function Rc(e){return to(Pc,e)}function zc(e){return no(Pc,e)}const Bc=n(`ZodBoolean`,(e,t)=>{Hn.init(e,t),k.init(e,t)});function N(e){return ro(Bc,e)}const Vc=n(`ZodBigInt`,(e,t)=>{Un.init(e,t),k.init(e,t),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.gt=(t,n)=>e.check(xo(t,n)),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.lt=(t,n)=>e.check(bo(t,n)),e.lte=(t,n)=>e.check(E(t,n)),e.max=(t,n)=>e.check(E(t,n)),e.positive=t=>e.check(xo(BigInt(0),t)),e.negative=t=>e.check(bo(BigInt(0),t)),e.nonpositive=t=>e.check(E(BigInt(0),t)),e.nonnegative=t=>e.check(D(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(Eo(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Hc(e){return ao(Vc,e)}const Uc=n(`ZodBigIntFormat`,(e,t)=>{Wn.init(e,t),Vc.init(e,t)});function Wc(e){return so(Uc,e)}function Gc(e){return co(Uc,e)}const Kc=n(`ZodSymbol`,(e,t)=>{Gn.init(e,t),k.init(e,t)});function qc(e){return lo(Kc,e)}const Jc=n(`ZodUndefined`,(e,t)=>{Kn.init(e,t),k.init(e,t)});function Yc(e){return uo(Jc,e)}const Xc=n(`ZodNull`,(e,t)=>{qn.init(e,t),k.init(e,t)});function Zc(e){return fo(Xc,e)}const Qc=n(`ZodAny`,(e,t)=>{Jn.init(e,t),k.init(e,t)});function $c(){return po(Qc)}const el=n(`ZodUnknown`,(e,t)=>{Yn.init(e,t),k.init(e,t)});function P(){return mo(el)}const tl=n(`ZodNever`,(e,t)=>{Xn.init(e,t),k.init(e,t)});function nl(e){return ho(tl,e)}const rl=n(`ZodVoid`,(e,t)=>{Zn.init(e,t),k.init(e,t)});function il(e){return go(rl,e)}const al=n(`ZodDate`,(e,t)=>{Qn.init(e,t),k.init(e,t),e.min=(t,n)=>e.check(D(t,n)),e.max=(t,n)=>e.check(E(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function ol(e){return _o(al,e)}const sl=n(`ZodArray`,(e,t)=>{er.init(e,t),k.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(jo(t,n)),e.nonempty=t=>e.check(jo(1,t)),e.max=(t,n)=>e.check(Ao(t,n)),e.length=(t,n)=>e.check(Mo(t,n)),e.unwrap=()=>e.element});function F(e,t){return Ko(sl,e,t)}function cl(e){let t=e._zod.def.shape;return V(Object.keys(t))}const ll=n(`ZodObject`,(e,t)=>{rr.init(e,t),k.init(e,t),_(e,`shape`,()=>t.shape),e.keyof=()=>B(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:P()}),e.loose=()=>e.clone({...e._zod.def,catchall:P()}),e.strict=()=>e.clone({...e._zod.def,catchall:nl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ce(e,t),e.merge=t=>we(e,t),e.pick=t=>xe(e,t),e.omit=t=>Se(e,t),e.partial=(...t)=>Te(jl,e,t[0]),e.required=(...t)=>Ee(zl,e,t[0])});function I(e,t){return new ll({type:`object`,get shape(){return re(this,`shape`,{...e}),this.shape},...y(t)})}function ul(e,t){return new ll({type:`object`,get shape(){return re(this,`shape`,{...e}),this.shape},catchall:nl(),...y(t)})}function L(e,t){return new ll({type:`object`,get shape(){return re(this,`shape`,{...e}),this.shape},catchall:P(),...y(t)})}const dl=n(`ZodUnion`,(e,t)=>{ar.init(e,t),k.init(e,t),e.options=t.options});function R(e,t){return new dl({type:`union`,options:e,...y(t)})}const fl=n(`ZodDiscriminatedUnion`,(e,t)=>{dl.init(e,t),or.init(e,t)});function pl(e,t,n){return new fl({type:`union`,options:t,discriminator:e,...y(n)})}const ml=n(`ZodIntersection`,(e,t)=>{sr.init(e,t),k.init(e,t)});function hl(e,t){return new ml({type:`intersection`,left:e,right:t})}const gl=n(`ZodTuple`,(e,t)=>{ur.init(e,t),k.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function _l(e,t,n){let r=t instanceof w;return new gl({type:`tuple`,items:e,rest:r?t:null,...y(r?n:t)})}const vl=n(`ZodRecord`,(e,t)=>{fr.init(e,t),k.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function z(e,t,n){return new vl({type:`record`,keyType:e,valueType:t,...y(n)})}function yl(e,t,n){return new vl({type:`record`,keyType:R([e,nl()]),valueType:t,...y(n)})}const bl=n(`ZodMap`,(e,t)=>{pr.init(e,t),k.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function xl(e,t,n){return new bl({type:`map`,keyType:e,valueType:t,...y(n)})}const Sl=n(`ZodSet`,(e,t)=>{hr.init(e,t),k.init(e,t),e.min=(...t)=>e.check(Oo(...t)),e.nonempty=t=>e.check(Oo(1,t)),e.max=(...t)=>e.check(Do(...t)),e.size=(...t)=>e.check(ko(...t))});function Cl(e,t){return new Sl({type:`set`,valueType:e,...y(t)})}const wl=n(`ZodEnum`,(e,t)=>{_r.init(e,t),k.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new wl({...t,checks:[],...y(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new wl({...t,checks:[],...y(r),entries:i})}});function B(e,t){return new wl({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...y(t)})}function Tl(e,t){return new wl({type:`enum`,entries:e,...y(t)})}const El=n(`ZodLiteral`,(e,t)=>{vr.init(e,t),k.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function V(e,t){return new El({type:`literal`,values:Array.isArray(e)?e:[e],...y(t)})}const Dl=n(`ZodFile`,(e,t)=>{yr.init(e,t),k.init(e,t),e.min=(t,n)=>e.check(Oo(t,n)),e.max=(t,n)=>e.check(Do(t,n)),e.mime=(t,n)=>e.check(Bo(Array.isArray(t)?t:[t],n))});function Ol(e){return rs(Dl,e)}const kl=n(`ZodTransform`,(e,t)=>{br.init(e,t),k.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(je(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(je(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Al(e){return new kl({type:`transform`,transform:e})}const jl=n(`ZodOptional`,(e,t)=>{xr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function H(e){return new jl({type:`optional`,innerType:e})}const Ml=n(`ZodNullable`,(e,t)=>{Sr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Nl(e){return new Ml({type:`nullable`,innerType:e})}function Pl(e){return H(Nl(e))}const Fl=n(`ZodDefault`,(e,t)=>{Cr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Il(e,t){return new Fl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}const Ll=n(`ZodPrefault`,(e,t)=>{Tr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Rl(e,t){return new Ll({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}const zl=n(`ZodNonOptional`,(e,t)=>{Er.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Bl(e,t){return new zl({type:`nonoptional`,innerType:e,...y(t)})}const Vl=n(`ZodSuccess`,(e,t)=>{Or.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Hl(e){return new Vl({type:`success`,innerType:e})}const Ul=n(`ZodCatch`,(e,t)=>{kr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Wl(e,t){return new Ul({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const Gl=n(`ZodNaN`,(e,t)=>{Ar.init(e,t),k.init(e,t)});function Kl(e){return yo(Gl,e)}const ql=n(`ZodPipe`,(e,t)=>{jr.init(e,t),k.init(e,t),e.in=t.in,e.out=t.out});function Jl(e,t){return new ql({type:`pipe`,in:e,out:t})}const Yl=n(`ZodReadonly`,(e,t)=>{Nr.init(e,t),k.init(e,t)});function Xl(e){return new Yl({type:`readonly`,innerType:e})}const Zl=n(`ZodTemplateLiteral`,(e,t)=>{Fr.init(e,t),k.init(e,t)});function Ql(e,t){return new Zl({type:`template_literal`,parts:e,...y(t)})}const $l=n(`ZodLazy`,(e,t)=>{Lr.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.getter()});function eu(e){return new $l({type:`lazy`,getter:e})}const tu=n(`ZodPromise`,(e,t)=>{Ir.init(e,t),k.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nu(e){return new tu({type:`promise`,innerType:e})}const ru=n(`ZodCustom`,(e,t)=>{Rr.init(e,t),k.init(e,t)});function iu(e){let t=new C({check:`custom`});return t._zod.check=e,t}function au(e,t){return gs(ru,e??(()=>!0),t)}function ou(e,t={}){return _s(ru,e,t)}function su(e){let t=iu(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(je(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(je(r))}},e(n.value,n)));return t}function cu(e,t={error:`Input not instance of ${e.name}`}){let n=new ru({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...y(t)});return n._zod.bag.Class=e,n}const lu=(...e)=>vs({Pipe:ql,Boolean:Bc,String:Us,Transform:kl},...e);function uu(e){let t=eu(()=>R([A(e),M(),N(),Zc(),F(t),z(A(),t)]));return t}function du(e,t){return Jl(Al(e),t)}const fu={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`};function pu(e){o({customError:e})}function mu(){return o().customError}var hu=e({bigint:()=>yu,boolean:()=>vu,date:()=>bu,number:()=>_u,string:()=>gu});function gu(e){return Sa(Us,e)}function _u(e){return Za(Nc,e)}function vu(e){return io(Bc,e)}function yu(e){return oo(Vc,e)}function bu(e){return vo(al,e)}var xu=e({$brand:()=>r,$input:()=>_a,$output:()=>ga,NEVER:()=>t,TimePrecision:()=>Ga,ZodAny:()=>Qc,ZodArray:()=>sl,ZodBase64:()=>Cc,ZodBase64URL:()=>Tc,ZodBigInt:()=>Vc,ZodBigIntFormat:()=>Uc,ZodBoolean:()=>Bc,ZodCIDRv4:()=>yc,ZodCIDRv6:()=>xc,ZodCUID:()=>ac,ZodCUID2:()=>sc,ZodCatch:()=>Ul,ZodCustom:()=>ru,ZodCustomStringFormat:()=>jc,ZodDate:()=>al,ZodDefault:()=>Fl,ZodDiscriminatedUnion:()=>fl,ZodE164:()=>Dc,ZodEmail:()=>Ws,ZodEmoji:()=>tc,ZodEnum:()=>wl,ZodError:()=>Is,ZodFile:()=>Dl,ZodGUID:()=>Ks,ZodIPv4:()=>hc,ZodIPv6:()=>_c,ZodISODate:()=>ks,ZodISODateTime:()=>Ds,ZodISODuration:()=>Ns,ZodISOTime:()=>js,ZodIntersection:()=>ml,ZodIssueCode:()=>fu,ZodJWT:()=>kc,ZodKSUID:()=>pc,ZodLazy:()=>$l,ZodLiteral:()=>El,ZodMap:()=>bl,ZodNaN:()=>Gl,ZodNanoID:()=>rc,ZodNever:()=>tl,ZodNonOptional:()=>zl,ZodNull:()=>Xc,ZodNullable:()=>Ml,ZodNumber:()=>Nc,ZodNumberFormat:()=>Pc,ZodObject:()=>ll,ZodOptional:()=>jl,ZodPipe:()=>ql,ZodPrefault:()=>Ll,ZodPromise:()=>tu,ZodReadonly:()=>Yl,ZodRealError:()=>Ls,ZodRecord:()=>vl,ZodSet:()=>Sl,ZodString:()=>Us,ZodStringFormat:()=>j,ZodSuccess:()=>Vl,ZodSymbol:()=>Kc,ZodTemplateLiteral:()=>Zl,ZodTransform:()=>kl,ZodTuple:()=>gl,ZodType:()=>k,ZodULID:()=>lc,ZodURL:()=>$s,ZodUUID:()=>Js,ZodUndefined:()=>Jc,ZodUnion:()=>dl,ZodUnknown:()=>el,ZodVoid:()=>rl,ZodXID:()=>dc,_ZodString:()=>Hs,_default:()=>Il,any:()=>$c,array:()=>F,base64:()=>wc,base64url:()=>Ec,bigint:()=>Hc,boolean:()=>N,catch:()=>Wl,check:()=>iu,cidrv4:()=>bc,cidrv6:()=>Sc,clone:()=>v,coerce:()=>hu,config:()=>o,core:()=>Ts,cuid:()=>oc,cuid2:()=>cc,custom:()=>au,date:()=>ol,discriminatedUnion:()=>pl,e164:()=>Oc,email:()=>Gs,emoji:()=>nc,endsWith:()=>Ro,enum:()=>B,file:()=>Ol,flattenError:()=>Le,float32:()=>Ic,float64:()=>Lc,formatError:()=>Re,function:()=>xs,getErrorMap:()=>mu,globalRegistry:()=>ba,gt:()=>xo,gte:()=>D,guid:()=>qs,includes:()=>Io,instanceof:()=>cu,int:()=>Fc,int32:()=>Rc,int64:()=>Wc,intersection:()=>hl,ipv4:()=>gc,ipv6:()=>vc,iso:()=>Es,json:()=>uu,jwt:()=>Ac,keyof:()=>cl,ksuid:()=>mc,lazy:()=>eu,length:()=>Mo,literal:()=>V,locales:()=>ha,looseObject:()=>L,lowercase:()=>Po,lt:()=>bo,lte:()=>E,map:()=>xl,maxLength:()=>Ao,maxSize:()=>Do,mime:()=>Bo,minLength:()=>jo,minSize:()=>Oo,multipleOf:()=>Eo,nan:()=>Kl,nanoid:()=>ic,nativeEnum:()=>Tl,negative:()=>Co,never:()=>nl,nonnegative:()=>To,nonoptional:()=>Bl,nonpositive:()=>wo,normalize:()=>Ho,null:()=>Zc,nullable:()=>Nl,nullish:()=>Pl,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>Vo,parse:()=>Rs,parseAsync:()=>zs,partialRecord:()=>yl,pipe:()=>Jl,positive:()=>So,prefault:()=>Rl,preprocess:()=>du,prettifyError:()=>Ve,promise:()=>nu,property:()=>zo,readonly:()=>Xl,record:()=>z,refine:()=>ou,regex:()=>No,regexes:()=>Xe,registry:()=>ya,safeParse:()=>Bs,safeParseAsync:()=>Vs,set:()=>Cl,setErrorMap:()=>pu,size:()=>ko,startsWith:()=>Lo,strictObject:()=>ul,string:()=>A,stringFormat:()=>Mc,stringbool:()=>lu,success:()=>Hl,superRefine:()=>su,symbol:()=>qc,templateLiteral:()=>Ql,toJSONSchema:()=>Cs,toLowerCase:()=>Wo,toUpperCase:()=>Go,transform:()=>Al,treeifyError:()=>ze,trim:()=>Uo,tuple:()=>_l,uint32:()=>zc,uint64:()=>Gc,ulid:()=>uc,undefined:()=>Yc,union:()=>R,unknown:()=>P,uppercase:()=>Fo,url:()=>ec,uuid:()=>Ys,uuidv4:()=>Xs,uuidv6:()=>Zs,uuidv7:()=>Qs,void:()=>il,xid:()=>fc});o(ti());var Su=xu;const Cu=`2025-11-25`,wu=[Cu,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Tu=`io.modelcontextprotocol/related-task`,U=au(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Eu=R([A(),M().int()]),Du=A();L({ttl:R([M(),Zc()]).optional(),pollInterval:M().optional()});const Ou=I({ttl:M().optional()}),ku=I({taskId:A()}),Au=L({progressToken:Eu.optional(),[Tu]:ku.optional()}),W=I({_meta:Au.optional()}),ju=W.extend({task:Ou.optional()}),Mu=e=>ju.safeParse(e).success,G=I({method:A(),params:W.loose().optional()}),K=I({_meta:Au.optional()}),q=I({method:A(),params:K.loose().optional()}),J=L({_meta:Au.optional()}),Nu=R([A(),M().int()]),Pu=I({jsonrpc:V(`2.0`),id:Nu,...G.shape}).strict(),Fu=e=>Pu.safeParse(e).success,Iu=I({jsonrpc:V(`2.0`),...q.shape}).strict(),Lu=e=>Iu.safeParse(e).success,Ru=I({jsonrpc:V(`2.0`),id:Nu,result:J}).strict(),zu=e=>Ru.safeParse(e).success;var Y;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Y||={});const Bu=I({jsonrpc:V(`2.0`),id:Nu.optional(),error:I({code:M().int(),message:A(),data:P().optional()})}).strict(),Vu=e=>Bu.safeParse(e).success,Hu=R([Pu,Iu,Ru,Bu]);R([Ru,Bu]);const Uu=J.strict(),Wu=K.extend({requestId:Nu.optional(),reason:A().optional()}),Gu=q.extend({method:V(`notifications/cancelled`),params:Wu}),Ku=I({icons:F(I({src:A(),mimeType:A().optional(),sizes:F(A()).optional(),theme:B([`light`,`dark`]).optional()})).optional()}),qu=I({name:A(),title:A().optional()}),Ju=qu.extend({...qu.shape,...Ku.shape,version:A(),websiteUrl:A().optional(),description:A().optional()}),Yu=du(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,hl(I({form:hl(I({applyDefaults:N().optional()}),z(A(),P())).optional(),url:U.optional()}),z(A(),P()).optional())),Xu=L({list:U.optional(),cancel:U.optional(),requests:L({sampling:L({createMessage:U.optional()}).optional(),elicitation:L({create:U.optional()}).optional()}).optional()}),Zu=L({list:U.optional(),cancel:U.optional(),requests:L({tools:L({call:U.optional()}).optional()}).optional()}),Qu=I({experimental:z(A(),U).optional(),sampling:I({context:U.optional(),tools:U.optional()}).optional(),elicitation:Yu.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:Xu.optional()}),$u=W.extend({protocolVersion:A(),capabilities:Qu,clientInfo:Ju}),ed=G.extend({method:V(`initialize`),params:$u}),td=e=>ed.safeParse(e).success,nd=I({experimental:z(A(),U).optional(),logging:U.optional(),completions:U.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:Zu.optional()}),rd=J.extend({protocolVersion:A(),capabilities:nd,serverInfo:Ju,instructions:A().optional()}),id=q.extend({method:V(`notifications/initialized`),params:K.optional()}),ad=G.extend({method:V(`ping`),params:W.optional()}),od=I({progress:M(),total:H(M()),message:H(A())}),sd=I({...K.shape,...od.shape,progressToken:Eu}),cd=q.extend({method:V(`notifications/progress`),params:sd}),ld=W.extend({cursor:Du.optional()}),ud=G.extend({params:ld.optional()}),dd=J.extend({nextCursor:Du.optional()}),fd=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),pd=I({taskId:A(),status:fd,ttl:R([M(),Zc()]),createdAt:A(),lastUpdatedAt:A(),pollInterval:H(M()),statusMessage:H(A())}),md=J.extend({task:pd}),hd=K.merge(pd),gd=q.extend({method:V(`notifications/tasks/status`),params:hd}),_d=G.extend({method:V(`tasks/get`),params:W.extend({taskId:A()})}),vd=J.merge(pd),yd=G.extend({method:V(`tasks/result`),params:W.extend({taskId:A()})});J.loose();const bd=ud.extend({method:V(`tasks/list`)}),xd=dd.extend({tasks:F(pd)}),Sd=G.extend({method:V(`tasks/cancel`),params:W.extend({taskId:A()})}),Cd=J.merge(pd),wd=I({uri:A(),mimeType:H(A()),_meta:z(A(),P()).optional()}),Td=wd.extend({text:A()}),Ed=A().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Dd=wd.extend({blob:Ed}),Od=B([`user`,`assistant`]),kd=I({audience:F(Od).optional(),priority:M().min(0).max(1).optional(),lastModified:Os({offset:!0}).optional()}),Ad=I({...qu.shape,...Ku.shape,uri:A(),description:H(A()),mimeType:H(A()),annotations:kd.optional(),_meta:H(L({}))}),jd=I({...qu.shape,...Ku.shape,uriTemplate:A(),description:H(A()),mimeType:H(A()),annotations:kd.optional(),_meta:H(L({}))}),Md=ud.extend({method:V(`resources/list`)}),Nd=dd.extend({resources:F(Ad)}),Pd=ud.extend({method:V(`resources/templates/list`)}),Fd=dd.extend({resourceTemplates:F(jd)}),Id=W.extend({uri:A()}),Ld=Id,Rd=G.extend({method:V(`resources/read`),params:Ld}),zd=J.extend({contents:F(R([Td,Dd]))}),Bd=q.extend({method:V(`notifications/resources/list_changed`),params:K.optional()}),Vd=Id,Hd=G.extend({method:V(`resources/subscribe`),params:Vd}),Ud=Id,Wd=G.extend({method:V(`resources/unsubscribe`),params:Ud}),Gd=K.extend({uri:A()}),Kd=q.extend({method:V(`notifications/resources/updated`),params:Gd}),qd=I({name:A(),description:H(A()),required:H(N())}),Jd=I({...qu.shape,...Ku.shape,description:H(A()),arguments:H(F(qd)),_meta:H(L({}))}),Yd=ud.extend({method:V(`prompts/list`)}),Xd=dd.extend({prompts:F(Jd)}),Zd=W.extend({name:A(),arguments:z(A(),A()).optional()}),Qd=G.extend({method:V(`prompts/get`),params:Zd}),$d=I({type:V(`text`),text:A(),annotations:kd.optional(),_meta:z(A(),P()).optional()}),ef=I({type:V(`image`),data:Ed,mimeType:A(),annotations:kd.optional(),_meta:z(A(),P()).optional()}),tf=I({type:V(`audio`),data:Ed,mimeType:A(),annotations:kd.optional(),_meta:z(A(),P()).optional()}),nf=I({type:V(`tool_use`),name:A(),id:A(),input:z(A(),P()),_meta:z(A(),P()).optional()}),rf=I({type:V(`resource`),resource:R([Td,Dd]),annotations:kd.optional(),_meta:z(A(),P()).optional()}),af=R([$d,ef,tf,Ad.extend({type:V(`resource_link`)}),rf]),of=I({role:Od,content:af}),sf=J.extend({description:A().optional(),messages:F(of)}),cf=q.extend({method:V(`notifications/prompts/list_changed`),params:K.optional()}),lf=I({title:A().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),uf=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),df=I({...qu.shape,...Ku.shape,description:A().optional(),inputSchema:I({type:V(`object`),properties:z(A(),U).optional(),required:F(A()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(A(),U).optional(),required:F(A()).optional()}).catchall(P()).optional(),annotations:lf.optional(),execution:uf.optional(),_meta:z(A(),P()).optional()}),ff=ud.extend({method:V(`tools/list`)}),pf=dd.extend({tools:F(df)}),mf=J.extend({content:F(af).default([]),structuredContent:z(A(),P()).optional(),isError:N().optional()});mf.or(J.extend({toolResult:P()}));const hf=ju.extend({name:A(),arguments:z(A(),P()).optional()}),gf=G.extend({method:V(`tools/call`),params:hf}),_f=q.extend({method:V(`notifications/tools/list_changed`),params:K.optional()});I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)});const vf=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),yf=W.extend({level:vf}),bf=G.extend({method:V(`logging/setLevel`),params:yf}),xf=K.extend({level:vf,logger:A().optional(),data:P()}),Sf=q.extend({method:V(`notifications/message`),params:xf}),Cf=I({hints:F(I({name:A().optional()})).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),wf=I({mode:B([`auto`,`required`,`none`]).optional()}),Tf=I({type:V(`tool_result`),toolUseId:A().describe(`The unique identifier for the corresponding tool call.`),content:F(af).default([]),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(A(),P()).optional()}),Ef=pl(`type`,[$d,ef,tf]),Df=pl(`type`,[$d,ef,tf,nf,Tf]),Of=I({role:Od,content:R([Df,F(Df)]),_meta:z(A(),P()).optional()}),kf=ju.extend({messages:F(Of),modelPreferences:Cf.optional(),systemPrompt:A().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(A()).optional(),metadata:U.optional(),tools:F(df).optional(),toolChoice:wf.optional()}),Af=G.extend({method:V(`sampling/createMessage`),params:kf}),jf=J.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(A())),role:Od,content:Ef}),Mf=J.extend({model:A(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(A())),role:Od,content:R([Df,F(Df)])}),Nf=I({type:V(`boolean`),title:A().optional(),description:A().optional(),default:N().optional()}),Pf=I({type:V(`string`),title:A().optional(),description:A().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:A().optional()}),Ff=I({type:B([`number`,`integer`]),title:A().optional(),description:A().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),If=I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),default:A().optional()}),Lf=I({type:V(`string`),title:A().optional(),description:A().optional(),oneOf:F(I({const:A(),title:A()})),default:A().optional()}),Rf=R([R([I({type:V(`string`),title:A().optional(),description:A().optional(),enum:F(A()),enumNames:F(A()).optional(),default:A().optional()}),R([If,Lf]),R([I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(A())}),default:F(A()).optional()}),I({type:V(`array`),title:A().optional(),description:A().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:A(),title:A()}))}),default:F(A()).optional()})])]),Nf,Pf,Ff]),zf=R([ju.extend({mode:V(`form`).optional(),message:A(),requestedSchema:I({type:V(`object`),properties:z(A(),Rf),required:F(A()).optional()})}),ju.extend({mode:V(`url`),message:A(),elicitationId:A(),url:A().url()})]),Bf=G.extend({method:V(`elicitation/create`),params:zf}),Vf=K.extend({elicitationId:A()}),Hf=q.extend({method:V(`notifications/elicitation/complete`),params:Vf}),Uf=J.extend({action:B([`accept`,`decline`,`cancel`]),content:du(e=>e===null?void 0:e,z(A(),R([A(),M(),N(),F(A())])).optional())}),Wf=I({type:V(`ref/resource`),uri:A()}),Gf=I({type:V(`ref/prompt`),name:A()}),Kf=W.extend({ref:R([Gf,Wf]),argument:I({name:A(),value:A()}),context:I({arguments:z(A(),A()).optional()}).optional()}),qf=G.extend({method:V(`completion/complete`),params:Kf});function Jf(e){if(e.params.ref.type!==`ref/prompt`)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Yf(e){if(e.params.ref.type!==`ref/resource`)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const Xf=J.extend({completion:L({values:F(A()).max(100),total:H(M().int()),hasMore:H(N())})}),Zf=I({uri:A().startsWith(`file://`),name:A().optional(),_meta:z(A(),P()).optional()}),Qf=G.extend({method:V(`roots/list`),params:W.optional()}),$f=J.extend({roots:F(Zf)}),ep=q.extend({method:V(`notifications/roots/list_changed`),params:K.optional()});R([ad,ed,qf,bf,Qd,Yd,Md,Pd,Rd,Hd,Wd,gf,ff,_d,yd,bd,Sd]),R([Gu,cd,id,ep,gd]),R([Uu,jf,Mf,Uf,$f,vd,xd,md]),R([ad,Af,Bf,Qf,_d,yd,bd,Sd]),R([Gu,cd,Sf,Kd,Bd,_f,cf,gd,Hf]),R([Uu,rd,Xf,sf,Xd,Nd,Fd,zd,mf,pf,vd,xd,md]);var tp=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Y.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new np(e.elicitations,n)}return new e(t,n,r)}},np=class extends tp{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},X=class extends Error{constructor(e,t){super(e),this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},rp=class extends X{};rp.errorCode=`invalid_request`;var ip=class extends X{};ip.errorCode=`invalid_client`;var ap=class extends X{};ap.errorCode=`invalid_grant`;var op=class extends X{};op.errorCode=`unauthorized_client`;var sp=class extends X{};sp.errorCode=`unsupported_grant_type`;var cp=class extends X{};cp.errorCode=`invalid_scope`;var lp=class extends X{};lp.errorCode=`access_denied`;var up=class extends X{};up.errorCode=`server_error`;var dp=class extends X{};dp.errorCode=`temporarily_unavailable`;var fp=class extends X{};fp.errorCode=`unsupported_response_type`;var pp=class extends X{};pp.errorCode=`unsupported_token_type`;var mp=class extends X{};mp.errorCode=`invalid_token`;var hp=class extends X{};hp.errorCode=`method_not_allowed`;var gp=class extends X{};gp.errorCode=`too_many_requests`;var _p=class extends X{};_p.errorCode=`invalid_client_metadata`;var vp=class extends X{};vp.errorCode=`insufficient_scope`;var yp=class extends X{};yp.errorCode=`invalid_target`,rp.errorCode,ip.errorCode,ap.errorCode,op.errorCode,sp.errorCode,cp.errorCode,lp.errorCode,up.errorCode,dp.errorCode,fp.errorCode,pp.errorCode,mp.errorCode,hp.errorCode,gp.errorCode,_p.errorCode,vp.errorCode,yp.errorCode;var bp=(e,t,n)=>(r,i)=>{let a=-1;return o(0);async function o(s){if(s<=a)throw Error(`next() called multiple times`);a=s;let c,l=!1,u;if(e[s]?(u=e[s][0][0],r.req.routeIndex=s):u=s===e.length&&i||void 0,u)try{c=await u(r,()=>o(s+1))}catch(e){if(e instanceof Error&&t)r.error=e,c=await t(e,r),l=!0;else throw e}else r.finalized===!1&&n&&(c=await n(r));return c&&(r.finalized===!1||l)&&(r.res=c),r}},Z=class extends Error{res;status;constructor(e=500,t){super(t?.message,{cause:t?.cause}),this.res=t?.res,this.status=e}getResponse(){return this.res?new Response(this.res.body,{status:this.status,headers:this.res.headers}):new Response(this.message,{status:this.status})}},xp=Symbol(),Sp=async(e,t=Object.create(null))=>{let{all:n=!1,dot:r=!1}=t,i=(e instanceof Gp?e.raw.headers:e.headers).get(`Content-Type`);return i?.startsWith(`multipart/form-data`)||i?.startsWith(`application/x-www-form-urlencoded`)?Cp(e,{all:n,dot:r}):{}};async function Cp(e,t){let n=await e.formData();return n?wp(n,t):{}}function wp(e,t){let n=Object.create(null);return e.forEach((e,r)=>{t.all||r.endsWith(`[]`)?Tp(n,r,e):n[r]=e}),t.dot&&Object.entries(n).forEach(([e,t])=>{e.includes(`.`)&&(Ep(n,e,t),delete n[e])}),n}var Tp=(e,t,n)=>{e[t]===void 0?t.endsWith(`[]`)?e[t]=[n]:e[t]=n:Array.isArray(e[t])?e[t].push(n):e[t]=[e[t],n]},Ep=(e,t,n)=>{if(/(?:^|\.)__proto__\./.test(t))return;let r=e,i=t.split(`.`);i.forEach((e,t)=>{t===i.length-1?r[e]=n:((!r[e]||typeof r[e]!=`object`||Array.isArray(r[e])||r[e]instanceof File)&&(r[e]=Object.create(null)),r=r[e])})},Dp=e=>{let t=e.split(`/`);return t[0]===``&&t.shift(),t},Op=e=>{let{groups:t,path:n}=kp(e);return Ap(Dp(n),t)},kp=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(e,n)=>{let r=`@${n}`;return t.push([r,e]),r}),{groups:t,path:e}},Ap=(e,t)=>{for(let n=t.length-1;n>=0;n--){let[r]=t[n];for(let i=e.length-1;i>=0;i--)if(e[i].includes(r)){e[i]=e[i].replace(r,t[n][1]);break}}return e},jp={},Mp=(e,t)=>{if(e===`*`)return`*`;let n=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(n){let r=`${e}#${t}`;return jp[r]||(n[2]?jp[r]=t&&t[0]!==`:`&&t[0]!==`*`?[r,n[1],RegExp(`^${n[2]}(?=/${t})`)]:[e,n[1],RegExp(`^${n[2]}$`)]:jp[r]=[e,n[1],!0]),jp[r]}return null},Np=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,e=>{try{return t(e)}catch{return e}})}},Pp=e=>Np(e,decodeURI),Fp=e=>{let t=e.url,n=t.indexOf(`/`,t.indexOf(`:`)+4),r=n;for(;r<t.length;r++){let e=t.charCodeAt(r);if(e===37){let e=t.indexOf(`?`,r),i=t.indexOf(`#`,r),a=e===-1?i===-1?void 0:i:i===-1?e:Math.min(e,i),o=t.slice(n,a);return Pp(o.includes(`%25`)?o.replace(/%25/g,`%2525`):o)}else if(e===63||e===35)break}return t.slice(n,r)},Ip=e=>{let t=Fp(e);return t.length>1&&t.at(-1)===`/`?t.slice(0,-1):t},Lp=(e,t,...n)=>(n.length&&(t=Lp(t,...n)),`${e?.[0]===`/`?``:`/`}${e}${t===`/`?``:`${e?.at(-1)===`/`?``:`/`}${t?.[0]===`/`?t.slice(1):t}`}`),Rp=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(`:`))return null;let t=e.split(`/`),n=[],r=``;return t.forEach(e=>{if(e!==``&&!/\:/.test(e))r+=`/`+e;else if(/\:/.test(e))if(/\?/.test(e)){n.length===0&&r===``?n.push(`/`):n.push(r);let t=e.replace(`?`,``);r+=`/`+t,n.push(r)}else r+=`/`+e}),n.filter((e,t,n)=>n.indexOf(e)===t)},zp=e=>/[%+]/.test(e)?(e.indexOf(`+`)!==-1&&(e=e.replace(/\+/g,` `)),e.indexOf(`%`)===-1?e:Np(e,Up)):e,Bp=(e,t,n)=>{let r;if(!n&&t&&!/[%+]/.test(t)){let n=e.indexOf(`?`,8);if(n===-1)return;for(e.startsWith(t,n+1)||(n=e.indexOf(`&${t}`,n+1));n!==-1;){let r=e.charCodeAt(n+t.length+1);if(r===61){let r=n+t.length+2,i=e.indexOf(`&`,r);return zp(e.slice(r,i===-1?void 0:i))}else if(r==38||isNaN(r))return``;n=e.indexOf(`&${t}`,n+1)}if(r=/[%+]/.test(e),!r)return}let i={};r??=/[%+]/.test(e);let a=e.indexOf(`?`,8);for(;a!==-1;){let t=e.indexOf(`&`,a+1),o=e.indexOf(`=`,a);o>t&&t!==-1&&(o=-1);let s=e.slice(a+1,o===-1?t===-1?void 0:t:o);if(r&&(s=zp(s)),a=t,s===``)continue;let c;o===-1?c=``:(c=e.slice(o+1,t===-1?void 0:t),r&&(c=zp(c))),n?(i[s]&&Array.isArray(i[s])||(i[s]=[]),i[s].push(c)):i[s]??=c}return t?i[t]:i},Vp=Bp,Hp=(e,t)=>Bp(e,t,!0),Up=decodeURIComponent,Wp=e=>Np(e,Up),Gp=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t=`/`,n=[[]]){this.raw=e,this.path=t,this.#t=n,this.#e={}}param(e){return e?this.#n(e):this.#r()}#n(e){let t=this.#t[0][this.routeIndex][1][e],n=this.#i(t);return n&&/\%/.test(n)?Wp(n):n}#r(){let e={},t=Object.keys(this.#t[0][this.routeIndex][1]);for(let n of t){let t=this.#i(this.#t[0][this.routeIndex][1][n]);t!==void 0&&(e[n]=/\%/.test(t)?Wp(t):t)}return e}#i(e){return this.#t[1]?this.#t[1][e]:e}query(e){return Vp(this.url,e)}queries(e){return Hp(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;let t={};return this.raw.headers.forEach((e,n)=>{t[n]=e}),t}async parseBody(e){return this.bodyCache.parsedBody??=await Sp(this,e)}#a=e=>{let{bodyCache:t,raw:n}=this,r=t[e];if(r)return r;let i=Object.keys(t)[0];return i?t[i].then(t=>(i===`json`&&(t=JSON.stringify(t)),new Response(t)[e]())):t[e]=n[e]()};json(){return this.#a(`text`).then(e=>JSON.parse(e))}text(){return this.#a(`text`)}arrayBuffer(){return this.#a(`arrayBuffer`)}blob(){return this.#a(`blob`)}formData(){return this.#a(`formData`)}addValidatedData(e,t){this.#e[e]=t}valid(e){return this.#e[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[xp](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}},Kp={Stringify:1,BeforeStream:2,Stream:3},qp=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},Jp=async(e,t,n,r,i)=>{typeof e==`object`&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let a=e.callbacks;if(!a?.length)return Promise.resolve(e);i?i[0]+=e:i=[e];let o=Promise.all(a.map(e=>e({phase:t,buffer:i,context:r}))).then(e=>Promise.all(e.filter(Boolean).map(e=>Jp(e,t,!1,r,i))).then(()=>i[0]));return n?qp(await o,a):o},Yp=`text/plain; charset=UTF-8`,Xp=(e,t)=>({"Content-Type":e,...t}),Zp=(e,t)=>new Response(e,t),Qp=class{#e;#t;env={};#n;finalized=!1;error;#r;#i;#a;#o;#s;#c;#l;#u;#d;constructor(e,t){this.#e=e,t&&(this.#i=t.executionCtx,this.env=t.env,this.#c=t.notFoundHandler,this.#d=t.path,this.#u=t.matchResult)}get req(){return this.#t??=new Gp(this.#e,this.#d,this.#u),this.#t}get event(){if(this.#i&&`respondWith`in this.#i)return this.#i;throw Error(`This context has no FetchEvent`)}get executionCtx(){if(this.#i)return this.#i;throw Error(`This context has no ExecutionContext`)}get res(){return this.#a||=Zp(null,{headers:this.#l??=new Headers})}set res(e){if(this.#a&&e){e=Zp(e.body,e);for(let[t,n]of this.#a.headers.entries())if(t!==`content-type`)if(t===`set-cookie`){let t=this.#a.headers.getSetCookie();e.headers.delete(`set-cookie`);for(let n of t)e.headers.append(`set-cookie`,n)}else e.headers.set(t,n)}this.#a=e,this.finalized=!0}render=(...e)=>(this.#s??=e=>this.html(e),this.#s(...e));setLayout=e=>this.#o=e;getLayout=()=>this.#o;setRenderer=e=>{this.#s=e};header=(e,t,n)=>{this.finalized&&(this.#a=Zp(this.#a.body,this.#a));let r=this.#a?this.#a.headers:this.#l??=new Headers;t===void 0?r.delete(e):n?.append?r.append(e,t):r.set(e,t)};status=e=>{this.#r=e};set=(e,t)=>{this.#n??=new Map,this.#n.set(e,t)};get=e=>this.#n?this.#n.get(e):void 0;get var(){return this.#n?Object.fromEntries(this.#n):{}}#f(e,t,n){let r=this.#a?new Headers(this.#a.headers):this.#l??new Headers;if(typeof t==`object`&&`headers`in t){let e=t.headers instanceof Headers?t.headers:new Headers(t.headers);for(let[t,n]of e)t.toLowerCase()===`set-cookie`?r.append(t,n):r.set(t,n)}if(n)for(let[e,t]of Object.entries(n))if(typeof t==`string`)r.set(e,t);else{r.delete(e);for(let n of t)r.append(e,n)}return Zp(e,{status:typeof t==`number`?t:t?.status??this.#r,headers:r})}newResponse=(...e)=>this.#f(...e);body=(e,t,n)=>this.#f(e,t,n);text=(e,t,n)=>!this.#l&&!this.#r&&!t&&!n&&!this.finalized?new Response(e):this.#f(e,t,Xp(Yp,n));json=(e,t,n)=>this.#f(JSON.stringify(e),t,Xp(`application/json`,n));html=(e,t,n)=>{let r=e=>this.#f(e,t,Xp(`text/html; charset=UTF-8`,n));return typeof e==`object`?Jp(e,Kp.Stringify,!1,{}).then(r):r(e)};redirect=(e,t)=>{let n=String(e);return this.header(`Location`,/[^\x00-\xFF]/.test(n)?encodeURI(n):n),this.newResponse(null,t??302)};notFound=()=>(this.#c??=()=>Zp(),this.#c(this))},Q=`ALL`,$p=`all`,em=[`get`,`post`,`put`,`delete`,`options`,`patch`],tm=`Can not add a route since the matcher is already built.`,nm=class extends Error{},rm=`__COMPOSED_HANDLER`,im=e=>e.text(`404 Not Found`,404),am=(e,t)=>{if(`getResponse`in e){let n=e.getResponse();return t.newResponse(n.body,n)}return console.error(e),t.text(`Internal Server Error`,500)},om=class e{get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath=`/`;#e=`/`;routes=[];constructor(e={}){[...em,$p].forEach(e=>{this[e]=(t,...n)=>(typeof t==`string`?this.#e=t:this.#r(e,this.#e,t),n.forEach(t=>{this.#r(e,this.#e,t)}),this)}),this.on=(e,t,...n)=>{for(let r of[t].flat()){this.#e=r;for(let t of[e].flat())n.map(e=>{this.#r(t.toUpperCase(),this.#e,e)})}return this},this.use=(e,...t)=>(typeof e==`string`?this.#e=e:(this.#e=`*`,t.unshift(e)),t.forEach(e=>{this.#r(Q,this.#e,e)}),this);let{strict:t,...n}=e;Object.assign(this,n),this.getPath=t??!0?e.getPath??Fp:Ip}#t(){let t=new e({router:this.router,getPath:this.getPath});return t.errorHandler=this.errorHandler,t.#n=this.#n,t.routes=this.routes,t}#n=im;errorHandler=am;route(e,t){let n=this.basePath(e);return t.routes.map(e=>{let r;t.errorHandler===am?r=e.handler:(r=async(n,r)=>(await bp([],t.errorHandler)(n,()=>e.handler(n,r))).res,r[rm]=e.handler),n.#r(e.method,e.path,r)}),this}basePath(e){let t=this.#t();return t._basePath=Lp(this._basePath,e),t}onError=e=>(this.errorHandler=e,this);notFound=e=>(this.#n=e,this);mount(e,t,n){let r,i;n&&(typeof n==`function`?i=n:(i=n.optionHandler,r=n.replaceRequest===!1?e=>e:n.replaceRequest));let a=i?e=>{let t=i(e);return Array.isArray(t)?t:[t]}:e=>{let t;try{t=e.executionCtx}catch{}return[e.env,t]};r||=(()=>{let t=Lp(this._basePath,e),n=t===`/`?0:t.length;return e=>{let t=new URL(e.url);return t.pathname=t.pathname.slice(n)||`/`,new Request(t,e)}})();let o=async(e,n)=>{let i=await t(r(e.req.raw),...a(e));if(i)return i;await n()};return this.#r(Q,Lp(e,`*`),o),this}#r(e,t,n){e=e.toUpperCase(),t=Lp(this._basePath,t);let r={basePath:this._basePath,path:t,method:e,handler:n};this.router.add(e,t,[n,r]),this.routes.push(r)}#i(e,t){if(e instanceof Error)return this.errorHandler(e,t);throw e}#a(e,t,n,r){if(r===`HEAD`)return(async()=>new Response(null,await this.#a(e,t,n,`GET`)))();let i=this.getPath(e,{env:n}),a=this.router.match(r,i),o=new Qp(e,{path:i,matchResult:a,env:n,executionCtx:t,notFoundHandler:this.#n});if(a[0].length===1){let e;try{e=a[0][0][0][0](o,async()=>{o.res=await this.#n(o)})}catch(e){return this.#i(e,o)}return e instanceof Promise?e.then(e=>e||(o.finalized?o.res:this.#n(o))).catch(e=>this.#i(e,o)):e??this.#n(o)}let s=bp(a[0],this.errorHandler,this.#n);return(async()=>{try{let e=await s(o);if(!e.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return e.res}catch(e){return this.#i(e,o)}})()}fetch=(e,...t)=>this.#a(e,t[1],t[0],e.method);request=(e,t,n,r)=>e instanceof Request?this.fetch(t?new Request(e,t):e,n,r):(e=e.toString(),this.fetch(new Request(/^https?:\/\//.test(e)?e:`http://localhost${Lp(`/`,e)}`,t),n,r));fire=()=>{addEventListener(`fetch`,e=>{e.respondWith(this.#a(e.request,e,void 0,e.request.method))})}},sm=[];function cm(e,t){let n=this.buildAllMatchers(),r=((e,t)=>{let r=n[e]||n[Q],i=r[2][t];if(i)return i;let a=t.match(r[0]);if(!a)return[[],sm];let o=a.indexOf(``,1);return[r[1][o],a]});return this.match=r,r(e,t)}var lm=`[^/]+`,um=`.*`,dm=`(?:|/.*)`,fm=Symbol(),pm=new Set(`.\\+*[^]$()`);function mm(e,t){return e.length===1?t.length===1?e<t?-1:1:-1:t.length===1||e===um||e===dm?1:t===um||t===dm?-1:e===lm?1:t===lm?-1:e.length===t.length?e<t?-1:1:t.length-e.length}var hm=class e{#e;#t;#n=Object.create(null);insert(t,n,r,i,a){if(t.length===0){if(this.#e!==void 0)throw fm;if(a)return;this.#e=n;return}let[o,...s]=t,c=o===`*`?s.length===0?[``,``,um]:[``,``,lm]:o===`/*`?[``,``,dm]:o.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),l;if(c){let t=c[1],n=c[2]||lm;if(t&&c[2]&&(n===`.*`||(n=n.replace(/^\((?!\?:)(?=[^)]+\)$)/,`(?:`),/\((?!\?:)/.test(n))))throw fm;if(l=this.#n[n],!l){if(Object.keys(this.#n).some(e=>e!==um&&e!==dm))throw fm;if(a)return;l=this.#n[n]=new e,t!==``&&(l.#t=i.varIndex++)}!a&&t!==``&&r.push([t,l.#t])}else if(l=this.#n[o],!l){if(Object.keys(this.#n).some(e=>e.length>1&&e!==um&&e!==dm))throw fm;if(a)return;l=this.#n[o]=new e}l.insert(s,n,r,i,a)}buildRegExpStr(){let e=Object.keys(this.#n).sort(mm).map(e=>{let t=this.#n[e];return(typeof t.#t==`number`?`(${e})@${t.#t}`:pm.has(e)?`\\${e}`:e)+t.buildRegExpStr()});return typeof this.#e==`number`&&e.unshift(`#${this.#e}`),e.length===0?``:e.length===1?e[0]:`(?:`+e.join(`|`)+`)`}},gm=class{#e={varIndex:0};#t=new hm;insert(e,t,n){let r=[],i=[];for(let t=0;;){let n=!1;if(e=e.replace(/\{[^}]+\}/g,e=>{let r=`@\\${t}`;return i[t]=[r,e],t++,n=!0,r}),!n)break}let a=e.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let e=i.length-1;e>=0;e--){let[t]=i[e];for(let n=a.length-1;n>=0;n--)if(a[n].indexOf(t)!==-1){a[n]=a[n].replace(t,i[e][1]);break}}return this.#t.insert(a,t,r,this.#e,n),r}buildRegExp(){let e=this.#t.buildRegExpStr();if(e===``)return[/^$/,[],[]];let t=0,n=[],r=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(e,i,a)=>i===void 0?(a===void 0||(r[Number(a)]=++t),``):(n[++t]=Number(i),`$()`)),[RegExp(`^${e}`),n,r]}},_m=[/^$/,[],Object.create(null)],vm=Object.create(null);function ym(e){return vm[e]??=RegExp(e===`*`?``:`^${e.replace(/\/\*$|([.\\+*[^\]$()])/g,(e,t)=>t?`\\${t}`:`(?:|/.*)`)}$`)}function bm(){vm=Object.create(null)}function xm(e){let t=new gm,n=[];if(e.length===0)return _m;let r=e.map(e=>[!/\*|\/:/.test(e[0]),...e]).sort(([e,t],[n,r])=>e?1:n?-1:t.length-r.length),i=Object.create(null);for(let e=0,a=-1,o=r.length;e<o;e++){let[o,s,c]=r[e];o?i[s]=[c.map(([e])=>[e,Object.create(null)]),sm]:a++;let l;try{l=t.insert(s,a,o)}catch(e){throw e===fm?new nm(s):e}o||(n[a]=c.map(([e,t])=>{let n=Object.create(null);for(--t;t>=0;t--){let[e,r]=l[t];n[e]=r}return[e,n]}))}let[a,o,s]=t.buildRegExp();for(let e=0,t=n.length;e<t;e++)for(let t=0,r=n[e].length;t<r;t++){let r=n[e][t]?.[1];if(!r)continue;let i=Object.keys(r);for(let e=0,t=i.length;e<t;e++)r[i[e]]=s[r[i[e]]]}let c=[];for(let e in o)c[e]=n[o[e]];return[a,c,i]}function Sm(e,t){if(e){for(let n of Object.keys(e).sort((e,t)=>t.length-e.length))if(ym(n).test(t))return[...e[n]]}}var Cm=class{name=`RegExpRouter`;#e;#t;constructor(){this.#e={[Q]:Object.create(null)},this.#t={[Q]:Object.create(null)}}add(e,t,n){let r=this.#e,i=this.#t;if(!r||!i)throw Error(tm);r[e]||[r,i].forEach(t=>{t[e]=Object.create(null),Object.keys(t[Q]).forEach(n=>{t[e][n]=[...t[Q][n]]})}),t===`/*`&&(t=`*`);let a=(t.match(/\/:/g)||[]).length;if(/\*$/.test(t)){let o=ym(t);e===Q?Object.keys(r).forEach(e=>{r[e][t]||=Sm(r[e],t)||Sm(r[Q],t)||[]}):r[e][t]||=Sm(r[e],t)||Sm(r[Q],t)||[],Object.keys(r).forEach(t=>{(e===Q||e===t)&&Object.keys(r[t]).forEach(e=>{o.test(e)&&r[t][e].push([n,a])})}),Object.keys(i).forEach(t=>{(e===Q||e===t)&&Object.keys(i[t]).forEach(e=>o.test(e)&&i[t][e].push([n,a]))});return}let o=Rp(t)||[t];for(let t=0,s=o.length;t<s;t++){let c=o[t];Object.keys(i).forEach(o=>{(e===Q||e===o)&&(i[o][c]||=[...Sm(r[o],c)||Sm(r[Q],c)||[]],i[o][c].push([n,a-s+t+1]))})}}match=cm;buildAllMatchers(){let e=Object.create(null);return Object.keys(this.#t).concat(Object.keys(this.#e)).forEach(t=>{e[t]||=this.#n(t)}),this.#e=this.#t=void 0,bm(),e}#n(e){let t=[],n=e===Q;return[this.#e,this.#t].forEach(r=>{let i=r[e]?Object.keys(r[e]).map(t=>[t,r[e][t]]):[];i.length===0?e!==Q&&t.push(...Object.keys(r[Q]).map(e=>[e,r[Q][e]])):(n||=!0,t.push(...i))}),n?xm(t):null}},wm=class{name=`SmartRouter`;#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,n){if(!this.#t)throw Error(tm);this.#t.push([e,t,n])}match(e,t){if(!this.#t)throw Error(`Fatal error`);let n=this.#e,r=this.#t,i=n.length,a=0,o;for(;a<i;a++){let i=n[a];try{for(let e=0,t=r.length;e<t;e++)i.add(...r[e]);o=i.match(e,t)}catch(e){if(e instanceof nm)continue;throw e}this.match=i.match.bind(i),this.#e=[i],this.#t=void 0;break}if(a===i)throw Error(`Fatal error`);return this.name=`SmartRouter + ${this.activeRouter.name}`,o}get activeRouter(){if(this.#t||this.#e.length!==1)throw Error(`No active router has been determined yet.`);return this.#e[0]}},Tm=Object.create(null),Em=e=>{for(let t in e)return!0;return!1},Dm=class e{#e;#t;#n;#r=0;#i=Tm;constructor(e,t,n){if(this.#t=n||Object.create(null),this.#e=[],e&&t){let n=Object.create(null);n[e]={handler:t,possibleKeys:[],score:0},this.#e=[n]}this.#n=[]}insert(t,n,r){this.#r=++this.#r;let i=this,a=Op(n),o=[];for(let t=0,n=a.length;t<n;t++){let n=a[t],r=a[t+1],s=Mp(n,r),c=Array.isArray(s)?s[0]:n;if(c in i.#t){i=i.#t[c],s&&o.push(s[1]);continue}i.#t[c]=new e,s&&(i.#n.push(s),o.push(s[1])),i=i.#t[c]}return i.#e.push({[t]:{handler:r,possibleKeys:o.filter((e,t,n)=>n.indexOf(e)===t),score:this.#r}}),i}#a(e,t,n,r,i){for(let a=0,o=t.#e.length;a<o;a++){let o=t.#e[a],s=o[n]||o[Q],c={};if(s!==void 0&&(s.params=Object.create(null),e.push(s),r!==Tm||i&&i!==Tm))for(let e=0,t=s.possibleKeys.length;e<t;e++){let t=s.possibleKeys[e],n=c[s.score];s.params[t]=i?.[t]&&!n?i[t]:r[t]??i?.[t],c[s.score]=!0}}}search(e,t){let n=[];this.#i=Tm;let r=[this],i=Dp(t),a=[],o=i.length,s=null;for(let c=0;c<o;c++){let l=i[c],u=c===o-1,d=[];for(let f=0,p=r.length;f<p;f++){let p=r[f],m=p.#t[l];m&&(m.#i=p.#i,u?(m.#t[`*`]&&this.#a(n,m.#t[`*`],e,p.#i),this.#a(n,m,e,p.#i)):d.push(m));for(let r=0,f=p.#n.length;r<f;r++){let f=p.#n[r],m=p.#i===Tm?{}:{...p.#i};if(f===`*`){let t=p.#t[`*`];t&&(this.#a(n,t,e,p.#i),t.#i=m,d.push(t));continue}let[ee,te,h]=f;if(!l&&!(h instanceof RegExp))continue;let g=p.#t[ee];if(h instanceof RegExp){if(s===null){s=Array(o);let e=t[0]===`/`?1:0;for(let t=0;t<o;t++)s[t]=e,e+=i[t].length+1}let r=t.substring(s[c]),l=h.exec(r);if(l){if(m[te]=l[0],this.#a(n,g,e,p.#i,m),Em(g.#t)){g.#i=m;let e=l[0].match(/\//)?.length??0;(a[e]||=[]).push(g)}continue}}(h===!0||h.test(l))&&(m[te]=l,u?(this.#a(n,g,e,m,p.#i),g.#t[`*`]&&this.#a(n,g.#t[`*`],e,m,p.#i)):(g.#i=m,d.push(g)))}}let f=a.shift();r=f?d.concat(f):d}return n.length>1&&n.sort((e,t)=>e.score-t.score),[n.map(({handler:e,params:t})=>[e,t])]}},Om=class{name=`TrieRouter`;#e;constructor(){this.#e=new Dm}add(e,t,n){let r=Rp(t);if(r){for(let t=0,i=r.length;t<i;t++)this.#e.insert(e,r[t],n);return}this.#e.insert(e,t,n)}match(e,t){return this.#e.search(e,t)}},km=class extends om{constructor(e={}){super(e),this.router=e.router??new wm({routers:[new Cm,new Om]})}},Am=e=>{let t={origin:`*`,allowMethods:[`GET`,`HEAD`,`PUT`,`POST`,`DELETE`,`PATCH`],allowHeaders:[],exposeHeaders:[],...e},n=(e=>typeof e==`string`?e===`*`?()=>e:t=>e===t?t:null:typeof e==`function`?e:t=>e.includes(t)?t:null)(t.origin),r=(e=>typeof e==`function`?e:Array.isArray(e)?()=>e:()=>[])(t.allowMethods);return async function e(i,a){function o(e,t){i.res.headers.set(e,t)}let s=await n(i.req.header(`origin`)||``,i);if(s&&o(`Access-Control-Allow-Origin`,s),t.credentials&&o(`Access-Control-Allow-Credentials`,`true`),t.exposeHeaders?.length&&o(`Access-Control-Expose-Headers`,t.exposeHeaders.join(`,`)),i.req.method===`OPTIONS`){t.origin!==`*`&&o(`Vary`,`Origin`),t.maxAge!=null&&o(`Access-Control-Max-Age`,t.maxAge.toString());let e=await r(i.req.header(`origin`)||``,i);e.length&&o(`Access-Control-Allow-Methods`,e.join(`,`));let n=t.allowHeaders;if(!n?.length){let e=i.req.header(`Access-Control-Request-Headers`);e&&(n=e.split(/\s*,\s*/))}return n?.length&&(o(`Access-Control-Allow-Headers`,n.join(`,`)),i.res.headers.append(`Vary`,`Access-Control-Request-Headers`)),i.res.headers.delete(`Content-Length`),i.res.headers.delete(`Content-Type`),new Response(null,{headers:i.res.headers,status:204,statusText:`No Content`})}await a(),t.origin!==`*`&&i.header(`Vary`,`Origin`,{append:!0})}};const $=ec().superRefine((e,n)=>{if(!URL.canParse(e))return n.addIssue({code:fu.custom,message:`URL must be parseable`,fatal:!0}),t}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`});L({resource:A().url(),authorization_servers:F($).optional(),jwks_uri:A().url().optional(),scopes_supported:F(A()).optional(),bearer_methods_supported:F(A()).optional(),resource_signing_alg_values_supported:F(A()).optional(),resource_name:A().optional(),resource_documentation:A().optional(),resource_policy_uri:A().url().optional(),resource_tos_uri:A().url().optional(),tls_client_certificate_bound_access_tokens:N().optional(),authorization_details_types_supported:F(A()).optional(),dpop_signing_alg_values_supported:F(A()).optional(),dpop_bound_access_tokens_required:N().optional()});const jm=L({issuer:A(),authorization_endpoint:$,token_endpoint:$,registration_endpoint:$.optional(),scopes_supported:F(A()).optional(),response_types_supported:F(A()),response_modes_supported:F(A()).optional(),grant_types_supported:F(A()).optional(),token_endpoint_auth_methods_supported:F(A()).optional(),token_endpoint_auth_signing_alg_values_supported:F(A()).optional(),service_documentation:$.optional(),revocation_endpoint:$.optional(),revocation_endpoint_auth_methods_supported:F(A()).optional(),revocation_endpoint_auth_signing_alg_values_supported:F(A()).optional(),introspection_endpoint:A().optional(),introspection_endpoint_auth_methods_supported:F(A()).optional(),introspection_endpoint_auth_signing_alg_values_supported:F(A()).optional(),code_challenge_methods_supported:F(A()).optional(),client_id_metadata_document_supported:N().optional()});I({...L({issuer:A(),authorization_endpoint:$,token_endpoint:$,userinfo_endpoint:$.optional(),jwks_uri:$,registration_endpoint:$.optional(),scopes_supported:F(A()).optional(),response_types_supported:F(A()),response_modes_supported:F(A()).optional(),grant_types_supported:F(A()).optional(),acr_values_supported:F(A()).optional(),subject_types_supported:F(A()),id_token_signing_alg_values_supported:F(A()),id_token_encryption_alg_values_supported:F(A()).optional(),id_token_encryption_enc_values_supported:F(A()).optional(),userinfo_signing_alg_values_supported:F(A()).optional(),userinfo_encryption_alg_values_supported:F(A()).optional(),userinfo_encryption_enc_values_supported:F(A()).optional(),request_object_signing_alg_values_supported:F(A()).optional(),request_object_encryption_alg_values_supported:F(A()).optional(),request_object_encryption_enc_values_supported:F(A()).optional(),token_endpoint_auth_methods_supported:F(A()).optional(),token_endpoint_auth_signing_alg_values_supported:F(A()).optional(),display_values_supported:F(A()).optional(),claim_types_supported:F(A()).optional(),claims_supported:F(A()).optional(),service_documentation:A().optional(),claims_locales_supported:F(A()).optional(),ui_locales_supported:F(A()).optional(),claims_parameter_supported:N().optional(),request_parameter_supported:N().optional(),request_uri_parameter_supported:N().optional(),require_request_uri_registration:N().optional(),op_policy_uri:$.optional(),op_tos_uri:$.optional(),client_id_metadata_document_supported:N().optional()}).shape,...jm.pick({code_challenge_methods_supported:!0}).shape}),I({access_token:A(),id_token:A().optional(),token_type:A(),expires_in:_u().optional(),scope:A().optional(),refresh_token:A().optional()}).strip(),I({error:A(),error_description:A().optional(),error_uri:A().optional()});const Mm=$.optional().or(V(``).transform(()=>void 0)),Nm=I({redirect_uris:F($),token_endpoint_auth_method:A().optional(),grant_types:F(A()).optional(),response_types:F(A()).optional(),client_name:A().optional(),client_uri:$.optional(),logo_uri:Mm,scope:A().optional(),contacts:F(A()).optional(),tos_uri:Mm,policy_uri:A().optional(),jwks_uri:$.optional(),jwks:$c().optional(),software_id:A().optional(),software_version:A().optional(),software_statement:A().optional()}).strip(),Pm=I({client_id:A(),client_secret:A().optional(),client_id_issued_at:M().optional(),client_secret_expires_at:M().optional()}).strip();Nm.merge(Pm),I({error:A(),error_description:A().optional()}).strip(),I({token:A(),token_type_hint:A().optional()}).strip(),globalThis.crypto?.webcrypto??globalThis.crypto??import(`node:crypto`).then(e=>e.webcrypto),I({client_id:A(),redirect_uri:A().optional().refine(e=>e===void 0||URL.canParse(e),{message:`redirect_uri must be a valid URL`})}),I({response_type:V(`code`),code_challenge:A(),code_challenge_method:V(`S256`),scope:A().optional(),state:A().optional(),resource:ec().optional()}),I({grant_type:A()}),I({code:A(),code_verifier:A(),redirect_uri:A().optional(),resource:ec().optional()}),I({refresh_token:A(),scope:A().optional(),resource:ec().optional()}),I({client_id:A(),client_secret:A().optional()});var Fm=class{writer;encoder;writable;abortSubscribers=[];responseReadable;aborted=!1;closed=!1;constructor(e,t){this.writable=e,this.writer=e.getWriter(),this.encoder=new TextEncoder;let n=t.getReader();this.abortSubscribers.push(async()=>{await n.cancel()}),this.responseReadable=new ReadableStream({async pull(e){let{done:t,value:r}=await n.read();t?e.close():e.enqueue(r)},cancel:()=>{this.abort()}})}async write(e){try{typeof e==`string`&&(e=this.encoder.encode(e)),await this.writer.write(e)}catch{}return this}async writeln(e){return await this.write(e+`
|
|
30
30
|
`),this}sleep(e){return new Promise(t=>setTimeout(t,e))}async close(){try{await this.writer.close()}catch{}this.closed=!0}async pipe(e){this.writer.releaseLock(),await e.pipeTo(this.writable,{preventClose:!0}),this.writer=this.writable.getWriter()}onAbort(e){this.abortSubscribers.push(e)}abort(){this.aborted||(this.aborted=!0,this.abortSubscribers.forEach(e=>e()))}},Im=class extends Fm{constructor(e,t){super(e,t)}async writeSSE(e){let t=(await Jp(e.data,Kp.Stringify,!1,{})).split(/\r\n|\r|\n/).map(e=>`data: ${e}`).join(`
|
|
31
31
|
`);for(let t of[`event`,`id`,`retry`])if(e[t]&&/[\r\n]/.test(e[t]))throw Error(`${t} must not contain "\\r" or "\\n"`);let n=[e.event&&`event: ${e.event}`,t,e.id&&`id: ${e.id}`,e.retry&&`retry: ${e.retry}`].filter(Boolean).join(`
|
|
32
32
|
`)+`
|