page-agent 0.0.16 → 0.0.17
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/dist/umd/page-agent.js +1 -1
- package/package.json +4 -4
package/dist/umd/page-agent.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
`)}h.write("payload.value = newResult;"),h.write("return payload;");const G=h.compile();return(Z,I)=>G(g,Z,I)},"generateFastpass");let i;const a=isObject,c=!globalConfig.jitless,l=c&&allowsEval.value,d=n.catchall;let f;e._zod.parse=(g,h)=>{f??(f=o.value);const $=g.value;return a($)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=t(n.shape)),g=i(g,h),d?handleCatchall([],$,g,h,f,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:$,inst:e}),g)}});function handleUnionResults(e,n,r,o){for(const i of e)if(i.issues.length===0)return n.value=i.value,n;const t=e.filter(i=>!aborted(i));return t.length===1?(n.value=t[0].value,t[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(i=>i.issues.map(a=>finalizeIssue(a,o,config())))}),n)}s(handleUnionResults,"handleUnionResults");const $ZodUnion=$constructor("$ZodUnion",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"optin",()=>n.options.some(t=>t._zod.optin==="optional")?"optional":void 0),defineLazy(e._zod,"optout",()=>n.options.some(t=>t._zod.optout==="optional")?"optional":void 0),defineLazy(e._zod,"values",()=>{if(n.options.every(t=>t._zod.values))return new Set(n.options.flatMap(t=>Array.from(t._zod.values)))}),defineLazy(e._zod,"pattern",()=>{if(n.options.every(t=>t._zod.pattern)){const t=n.options.map(i=>i._zod.pattern);return new RegExp(`^(${t.map(i=>cleanRegex(i.source)).join("|")})$`)}});const r=n.options.length===1,o=n.options[0]._zod.run;e._zod.parse=(t,i)=>{if(r)return o(t,i);let a=!1;const c=[];for(const u of n.options){const l=u._zod.run({value:t.value,issues:[]},i);if(l instanceof Promise)c.push(l),a=!0;else{if(l.issues.length===0)return l;c.push(l)}}return a?Promise.all(c).then(u=>handleUnionResults(u,t,e,i)):handleUnionResults(c,t,e,i)}});function handleExclusiveUnionResults(e,n,r,o){const t=e.filter(i=>i.issues.length===0);return t.length===1?(n.value=t[0].value,n):(t.length===0?n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(i=>i.issues.map(a=>finalizeIssue(a,o,config())))}):n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:[],inclusive:!1}),n)}s(handleExclusiveUnionResults,"handleExclusiveUnionResults");const $ZodXor=$constructor("$ZodXor",(e,n)=>{$ZodUnion.init(e,n),n.inclusive=!1;const r=n.options.length===1,o=n.options[0]._zod.run;e._zod.parse=(t,i)=>{if(r)return o(t,i);let a=!1;const c=[];for(const u of n.options){const l=u._zod.run({value:t.value,issues:[]},i);l instanceof Promise?(c.push(l),a=!0):c.push(l)}return a?Promise.all(c).then(u=>handleExclusiveUnionResults(u,t,e,i)):handleExclusiveUnionResults(c,t,e,i)}}),$ZodDiscriminatedUnion=$constructor("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,$ZodUnion.init(e,n);const r=e._zod.parse;defineLazy(e._zod,"propValues",()=>{const t={};for(const i of n.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);for(const[c,u]of Object.entries(a)){t[c]||(t[c]=new Set);for(const l of u)t[c].add(l)}}return t});const o=cached(()=>{const t=n.options,i=new Map;for(const a of t){const c=a._zod.propValues?.[n.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(a)}"`);for(const u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,a)}}return i});e._zod.parse=(t,i)=>{const a=t.value;if(!isObject(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),t;const c=o.value.get(a?.[n.discriminator]);return c?c._zod.run(t,i):n.unionFallback?r(t,i):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:a,path:[n.discriminator],inst:e}),t)}}),$ZodIntersection=$constructor("$ZodIntersection",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{const t=r.value,i=n.left._zod.run({value:t,issues:[]},o),a=n.right._zod.run({value:t,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([u,l])=>handleIntersectionResults(r,u,l)):handleIntersectionResults(r,i,a)}});function mergeValues(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(isPlainObject(e)&&isPlainObject(n)){const r=Object.keys(n),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),t={...e,...n};for(const i of o){const a=mergeValues(e[i],n[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};t[i]=a.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const t=e[o],i=n[o],a=mergeValues(t,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(mergeValues,"mergeValues");function handleIntersectionResults(e,n,r){if(n.issues.length&&e.issues.push(...n.issues),r.issues.length&&e.issues.push(...r.issues),aborted(e))return e;const o=mergeValues(n.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}s(handleIntersectionResults,"handleIntersectionResults");const $ZodTuple=$constructor("$ZodTuple",(e,n)=>{$ZodType.init(e,n);const r=n.items;e._zod.parse=(o,t)=>{const i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const a=[],c=[...r].reverse().findIndex(d=>d._zod.optin!=="optional"),u=c===-1?0:r.length-c;if(!n.rest){const d=i.length>r.length,f=i.length<u-1;if(d||f)return o.issues.push({...d?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:i,inst:e,origin:"array"}),o}let l=-1;for(const d of r){if(l++,l>=i.length&&l>=u)continue;const f=d._zod.run({value:i[l],issues:[]},t);f instanceof Promise?a.push(f.then(g=>handleTupleResult(g,o,l))):handleTupleResult(f,o,l)}if(n.rest){const d=i.slice(r.length);for(const f of d){l++;const g=n.rest._zod.run({value:f,issues:[]},t);g instanceof Promise?a.push(g.then(h=>handleTupleResult(h,o,l))):handleTupleResult(g,o,l)}}return a.length?Promise.all(a).then(()=>o):o}});function handleTupleResult(e,n,r){e.issues.length&&n.issues.push(...prefixIssues(r,e.issues)),n.value[r]=e.value}s(handleTupleResult,"handleTupleResult");const $ZodRecord=$constructor("$ZodRecord",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!isPlainObject(t))return r.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),r;const i=[],a=n.keyType._zod.values;if(a){r.value={};const c=new Set;for(const l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);const d=n.valueType._zod.run({value:t[l],issues:[]},o);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&r.issues.push(...prefixIssues(l,f.issues)),r.value[l]=f.value})):(d.issues.length&&r.issues.push(...prefixIssues(l,d.issues)),r.value[l]=d.value)}let u;for(const l in t)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:u})}else{r.value={};for(const c of Reflect.ownKeys(t)){if(c==="__proto__")continue;const u=n.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.mode==="loose"?r.value[c]=t[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(d=>finalizeIssue(d,o,config())),input:c,path:[c],inst:e});continue}const l=n.valueType._zod.run({value:t[c],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&r.issues.push(...prefixIssues(c,d.issues)),r.value[u.value]=d.value})):(l.issues.length&&r.issues.push(...prefixIssues(c,l.issues)),r.value[u.value]=l.value)}}return i.length?Promise.all(i).then(()=>r):r}}),$ZodMap=$constructor("$ZodMap",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!(t instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),r;const i=[];r.value=new Map;for(const[a,c]of t){const u=n.keyType._zod.run({value:a,issues:[]},o),l=n.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,f])=>{handleMapResult(d,f,r,a,t,e,o)})):handleMapResult(u,l,r,a,t,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function handleMapResult(e,n,r,o,t,i,a){e.issues.length&&(propertyKeyTypes.has(typeof o)?r.issues.push(...prefixIssues(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:t,inst:i,issues:e.issues.map(c=>finalizeIssue(c,a,config()))})),n.issues.length&&(propertyKeyTypes.has(typeof o)?r.issues.push(...prefixIssues(o,n.issues)):r.issues.push({origin:"map",code:"invalid_element",input:t,inst:i,key:o,issues:n.issues.map(c=>finalizeIssue(c,a,config()))})),r.value.set(e.value,n.value)}s(handleMapResult,"handleMapResult");const $ZodSet=$constructor("$ZodSet",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;if(!(t instanceof Set))return r.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),r;const i=[];r.value=new Set;for(const a of t){const c=n.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>handleSetResult(u,r))):handleSetResult(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function handleSetResult(e,n){e.issues.length&&n.issues.push(...e.issues),n.value.add(e.value)}s(handleSetResult,"handleSetResult");const $ZodEnum=$constructor("$ZodEnum",(e,n)=>{$ZodType.init(e,n);const r=getEnumValues(n.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(t=>propertyKeyTypes.has(typeof t)).map(t=>typeof t=="string"?escapeRegex(t):t.toString()).join("|")})$`),e._zod.parse=(t,i)=>{const a=t.value;return o.has(a)||t.issues.push({code:"invalid_value",values:r,input:a,inst:e}),t}}),$ZodLiteral=$constructor("$ZodLiteral",(e,n)=>{if($ZodType.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(n.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.values.map(o=>typeof o=="string"?escapeRegex(o):o?escapeRegex(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,t)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n.values,input:i,inst:e}),o}}),$ZodFile=$constructor("$ZodFile",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{const t=r.value;return t instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),r}}),$ZodTransform=$constructor("$ZodTransform",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $ZodEncodeError(e.constructor.name);const t=n.transform(r.value,r);if(o.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(r.value=a,r));if(t instanceof Promise)throw new $ZodAsyncError;return r.value=t,r}});function handleOptionalResult(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}s(handleOptionalResult,"handleOptionalResult");const $ZodOptional=$constructor("$ZodOptional",(e,n)=>{$ZodType.init(e,n),e._zod.optin="optional",e._zod.optout="optional",defineLazy(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),defineLazy(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${cleanRegex(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(n.innerType._zod.optin==="optional"){const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>handleOptionalResult(i,r.value)):handleOptionalResult(t,r.value)}return r.value===void 0?r:n.innerType._zod.run(r,o)}}),$ZodNullable=$constructor("$ZodNullable",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"optin",()=>n.innerType._zod.optin),defineLazy(e._zod,"optout",()=>n.innerType._zod.optout),defineLazy(e._zod,"pattern",()=>{const r=n.innerType._zod.pattern;return r?new RegExp(`^(${cleanRegex(r.source)}|null)$`):void 0}),defineLazy(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:n.innerType._zod.run(r,o)}),$ZodDefault=$constructor("$ZodDefault",(e,n)=>{$ZodType.init(e,n),e._zod.optin="optional",defineLazy(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);if(r.value===void 0)return r.value=n.defaultValue,r;const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>handleDefaultResult(i,n)):handleDefaultResult(t,n)}});function handleDefaultResult(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}s(handleDefaultResult,"handleDefaultResult");const $ZodPrefault=$constructor("$ZodPrefault",(e,n)=>{$ZodType.init(e,n),e._zod.optin="optional",defineLazy(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,o))}),$ZodNonOptional=$constructor("$ZodNonOptional",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"values",()=>{const r=n.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>handleNonOptionalResult(i,e)):handleNonOptionalResult(t,e)}});function handleNonOptionalResult(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}s(handleNonOptionalResult,"handleNonOptionalResult");const $ZodSuccess=$constructor("$ZodSuccess",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $ZodEncodeError("ZodSuccess");const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>(r.value=i.issues.length===0,r)):(r.value=t.issues.length===0,r)}}),$ZodCatch=$constructor("$ZodCatch",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"optin",()=>n.innerType._zod.optin),defineLazy(e._zod,"optout",()=>n.innerType._zod.optout),defineLazy(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(i=>(r.value=i.value,i.issues.length&&(r.value=n.catchValue({...r,error:{issues:i.issues.map(a=>finalizeIssue(a,o,config()))},input:r.value}),r.issues=[]),r)):(r.value=t.value,t.issues.length&&(r.value=n.catchValue({...r,error:{issues:t.issues.map(i=>finalizeIssue(i,o,config()))},input:r.value}),r.issues=[]),r)}}),$ZodNaN=$constructor("$ZodNaN",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),$ZodPipe=$constructor("$ZodPipe",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"values",()=>n.in._zod.values),defineLazy(e._zod,"optin",()=>n.in._zod.optin),defineLazy(e._zod,"optout",()=>n.out._zod.optout),defineLazy(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const i=n.out._zod.run(r,o);return i instanceof Promise?i.then(a=>handlePipeResult(a,n.in,o)):handlePipeResult(i,n.in,o)}const t=n.in._zod.run(r,o);return t instanceof Promise?t.then(i=>handlePipeResult(i,n.out,o)):handlePipeResult(t,n.out,o)}});function handlePipeResult(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},r)}s(handlePipeResult,"handlePipeResult");const $ZodCodec=$constructor("$ZodCodec",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"values",()=>n.in._zod.values),defineLazy(e._zod,"optin",()=>n.in._zod.optin),defineLazy(e._zod,"optout",()=>n.out._zod.optout),defineLazy(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){const i=n.in._zod.run(r,o);return i instanceof Promise?i.then(a=>handleCodecAResult(a,n,o)):handleCodecAResult(i,n,o)}else{const i=n.out._zod.run(r,o);return i instanceof Promise?i.then(a=>handleCodecAResult(a,n,o)):handleCodecAResult(i,n,o)}}});function handleCodecAResult(e,n,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const t=n.transform(e.value,e);return t instanceof Promise?t.then(i=>handleCodecTxResult(e,i,n.out,r)):handleCodecTxResult(e,t,n.out,r)}else{const t=n.reverseTransform(e.value,e);return t instanceof Promise?t.then(i=>handleCodecTxResult(e,i,n.in,r)):handleCodecTxResult(e,t,n.in,r)}}s(handleCodecAResult,"handleCodecAResult");function handleCodecTxResult(e,n,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:n,issues:e.issues},o)}s(handleCodecTxResult,"handleCodecTxResult");const $ZodReadonly=$constructor("$ZodReadonly",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"propValues",()=>n.innerType._zod.propValues),defineLazy(e._zod,"values",()=>n.innerType._zod.values),defineLazy(e._zod,"optin",()=>n.innerType?._zod?.optin),defineLazy(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return n.innerType._zod.run(r,o);const t=n.innerType._zod.run(r,o);return t instanceof Promise?t.then(handleReadonlyResult):handleReadonlyResult(t)}});function handleReadonlyResult(e){return e.value=Object.freeze(e.value),e}s(handleReadonlyResult,"handleReadonlyResult");const $ZodTemplateLiteral=$constructor("$ZodTemplateLiteral",(e,n)=>{$ZodType.init(e,n);const r=[];for(const o of n.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);const t=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${o._zod.traits}`);const i=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(i,a))}else if(o===null||primitiveTypes.has(typeof o))r.push(escapeRegex(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,t)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:n.format??"template_literal",pattern:e._zod.pattern.source}),o)}),$ZodFunction=$constructor("$ZodFunction",(e,n)=>($ZodType.init(e,n),e._def=n,e._zod.def=n,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){const t=e._def.input?parse$1(e._def.input,o):o,i=Reflect.apply(r,this,t);return e._def.output?parse$1(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){const t=e._def.input?await parseAsync$1(e._def.input,o):o,i=await Reflect.apply(r,this,t);return e._def.output?await parseAsync$1(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new $ZodTuple({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),$ZodPromise=$constructor("$ZodPromise",(e,n)=>{$ZodType.init(e,n),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(t=>n.innerType._zod.run({value:t,issues:[]},o))}),$ZodLazy=$constructor("$ZodLazy",(e,n)=>{$ZodType.init(e,n),defineLazy(e._zod,"innerType",()=>n.getter()),defineLazy(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),defineLazy(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),defineLazy(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),defineLazy(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),$ZodCustom=$constructor("$ZodCustom",(e,n)=>{$ZodCheck.init(e,n),$ZodType.init(e,n),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,t=n.fn(o);if(t instanceof Promise)return t.then(i=>handleRefineResult(i,r,o,e));handleRefineResult(t,r,o,e)}});function handleRefineResult(e,n,r,o){if(!e){const t={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(t.params=o._zod.def.params),n.issues.push(issue(t))}}s(handleRefineResult,"handleRefineResult");const error$J=s(()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${t.expected}، ولكن تم إدخال ${r(t.input)}`;case"invalid_value":return t.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(t.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?` أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${i} ${t.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${i} ${t.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${t.prefix}"`:i.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`:i.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`:i.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`:`${o[i.format]??t.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${t.divisor}`;case"unrecognized_keys":return`معرف${t.keys.length>1?"ات":""} غريب${t.keys.length>1?"ة":""}: ${joinValues(t.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${t.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${t.origin}`;default:return"مدخل غير مقبول"}}},"error$J");function ar(){return{localeError:error$J()}}s(ar,"ar");const error$I=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${t.expected}, daxil olan ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Yanlış dəyər: gözlənilən ${stringifyPrimitive(t.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${i}${t.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Çox kiçik: gözlənilən ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`:i.format==="ends_with"?`Yanlış mətn: "${i.suffix}" ilə bitməlidir`:i.format==="includes"?`Yanlış mətn: "${i.includes}" daxil olmalıdır`:i.format==="regex"?`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${o[i.format]??t.format}`}case"not_multiple_of":return`Yanlış ədəd: ${t.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${t.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}},"error$I");function az(){return{localeError:error$I()}}s(az,"az");function getBelarusianPlural(e,n,r,o){const t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19?o:i===1?n:i>=2&&i<=4?r:o}s(getBelarusianPlural,"getBelarusianPlural");const error$H=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"лік";case"object":{if(Array.isArray(t))return"масіў";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${t.expected}, атрымана ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Няправільны ўвод: чакалася ${stringifyPrimitive(t.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);if(a){const c=Number(t.maximum),u=getBelarusianPlural(c,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна ${a.verb} ${i}${t.maximum.toString()} ${u}`}return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна быць ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);if(a){const c=Number(t.minimum),u=getBelarusianPlural(c,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${t.origin} павінна ${a.verb} ${i}${t.minimum.toString()} ${u}`}return`Занадта малы: чакалася, што ${t.origin} павінна быць ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${i.prefix}"`:i.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${i.suffix}"`:i.format==="includes"?`Няправільны радок: павінен змяшчаць "${i.includes}"`:i.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`:`Няправільны ${o[i.format]??t.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${t.keys.length>1?"ключы":"ключ"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${t.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${t.origin}`;default:return"Няправільны ўвод"}}},"error$H");function be(){return{localeError:error$H()}}s(be,"be");const parsedType$6=s(e=>{const n=typeof e;switch(n){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 n},"parsedType$6"),error$G=s(()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function n(o){return e[o]??null}s(n,"getSizing");const 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 o=>{switch(o.code){case"invalid_type":return`Невалиден вход: очакван ${o.expected}, получен ${parsedType$6(o.input)}`;case"invalid_value":return o.values.length===1?`Невалиден вход: очакван ${stringifyPrimitive(o.values[0])}`:`Невалидна опция: очаквано едно от ${joinValues(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Твърде голямо: очаква се ${o.origin??"стойност"} да съдържа ${t}${o.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${o.origin??"стойност"} да бъде ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Твърде малко: очаква се ${o.origin} да съдържа ${t}${o.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${o.origin} да бъде ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;if(t.format==="starts_with")return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format==="ends_with")return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format==="includes")return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format==="regex")return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return t.format==="emoji"&&(i="Невалидно"),t.format==="datetime"&&(i="Невалидно"),t.format==="date"&&(i="Невалидна"),t.format==="time"&&(i="Невалидно"),t.format==="duration"&&(i="Невалидна"),`${i} ${r[t.format]??o.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${o.divisor}`;case"unrecognized_keys":return`Неразпознат${o.keys.length>1?"и":""} ключ${o.keys.length>1?"ове":""}: ${joinValues(o.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${o.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${o.origin}`;default:return"Невалиден вход"}}},"error$G");function bg(){return{localeError:error$G()}}s(bg,"bg");const error$F=s(()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Tipus invàlid: s'esperava ${t.expected}, s'ha rebut ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Valor invàlid: s'esperava ${stringifyPrimitive(t.values[0])}`:`Opció invàlida: s'esperava una de ${joinValues(t.values," o ")}`;case"too_big":{const i=t.inclusive?"com a màxim":"menys de",a=n(t.origin);return a?`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${i} ${t.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?"com a mínim":"més de",a=n(t.origin);return a?`Massa petit: s'esperava que ${t.origin} contingués ${i} ${t.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Format invàlid: ha de començar amb "${i.prefix}"`:i.format==="ends_with"?`Format invàlid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format invàlid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${i.pattern}`:`Format invàlid per a ${o[i.format]??t.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${t.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${t.origin}`;default:return"Entrada invàlida"}}},"error$F");function ca(){return{localeError:error$F()}}s(ca,"ca");const error$E=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"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(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Neplatný vstup: očekáváno ${t.expected}, obdrženo ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Neplatný vstup: očekáváno ${stringifyPrimitive(t.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Hodnota je příliš velká: ${t.origin??"hodnota"} musí mít ${i}${t.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${t.origin??"hodnota"} musí být ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Hodnota je příliš malá: ${t.origin??"hodnota"} musí mít ${i}${t.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${t.origin??"hodnota"} musí být ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Neplatný řetězec: musí začínat na "${i.prefix}"`:i.format==="ends_with"?`Neplatný řetězec: musí končit na "${i.suffix}"`:i.format==="includes"?`Neplatný řetězec: musí obsahovat "${i.includes}"`:i.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`:`Neplatný formát ${o[i.format]??t.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}},"error$E");function cs(){return{localeError:error$E()}}s(cs,"cs");const error$D=s(()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},n={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(a){return e[a]??null}s(r,"getSizing");function o(a){return n[a]??a}s(o,"getTypeName");const t=s(a=>{const c=typeof a;switch(c){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return c},"parsedType"),i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${o(a.expected)}, fik ${o(t(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig værdi: forventede ${stringifyPrimitive(a.values[0])}`:`Ugyldigt valg: forventede en af følgende ${joinValues(a.values,"|")}`;case"too_big":{const c=a.inclusive?"<=":"<",u=r(a.origin),l=o(a.origin);return u?`For stor: forventede ${l??"value"} ${u.verb} ${c} ${a.maximum.toString()} ${u.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${c} ${a.maximum.toString()}`}case"too_small":{const c=a.inclusive?">=":">",u=r(a.origin),l=o(a.origin);return u?`For lille: forventede ${l} ${u.verb} ${c} ${a.minimum.toString()} ${u.unit}`:`For lille: forventede ${l} havde ${c} ${a.minimum.toString()}`}case"invalid_format":{const c=a;return c.format==="starts_with"?`Ugyldig streng: skal starte med "${c.prefix}"`:c.format==="ends_with"?`Ugyldig streng: skal ende med "${c.suffix}"`:c.format==="includes"?`Ugyldig streng: skal indeholde "${c.includes}"`:c.format==="regex"?`Ugyldig streng: skal matche mønsteret ${c.pattern}`:`Ugyldig ${i[c.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${joinValues(a.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${a.origin}`;default:return"Ugyldigt input"}}},"error$D");function da(){return{localeError:error$D()}}s(da,"da");const error$C=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${t.expected}, erhalten ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ungültige Eingabe: erwartet ${stringifyPrimitive(t.values[0])}`:`Ungültige Option: erwartet eine von ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Zu groß: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ist`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ist`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ungültiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ungültiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ungültiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`:`Ungültig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}},"error$C");function de(){return{localeError:error$C()}}s(de,"de");const parsedType$5=s(e=>{const n=typeof e;switch(n){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 n},"parsedType$5"),error$B=s(()=>{const 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 n(o){return e[o]??null}s(n,"getSizing");const 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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${parsedType$5(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${stringifyPrimitive(o.values[0])}`:`Invalid option: expected one of ${joinValues(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${t}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Too small: expected ${o.origin} to have ${t}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;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 ${r[t.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${joinValues(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}},"error$B");function en(){return{localeError:error$B()}}s(en,"en");const parsedType$4=s(e=>{const n=typeof e;switch(n){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 n},"parsedType$4"),error$A=s(()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function n(o){return e[o]??null}s(n,"getSizing");const r={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 o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${o.expected}, riceviĝis ${parsedType$4(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendiĝis ${stringifyPrimitive(o.values[0])}`:`Nevalida opcio: atendiĝis unu el ${joinValues(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${t}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Tro malgranda: atendiĝis ke ${o.origin} havu ${t}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${o.origin} estu ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;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 ${r[t.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} ŝlosilo${o.keys.length>1?"j":""}: ${joinValues(o.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}},"error$A");function eo(){return{localeError:error$A()}}s(eo,"eo");const error$z=s(()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},n={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(a){return e[a]??null}s(r,"getSizing");function o(a){return n[a]??a}s(o,"getTypeName");const t=s(a=>{const c=typeof a;switch(c){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return c},"parsedType"),i={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 a=>{switch(a.code){case"invalid_type":return`Entrada inválida: se esperaba ${o(a.expected)}, recibido ${o(t(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inválida: se esperaba ${stringifyPrimitive(a.values[0])}`:`Opción inválida: se esperaba una de ${joinValues(a.values,"|")}`;case"too_big":{const c=a.inclusive?"<=":"<",u=r(a.origin),l=o(a.origin);return u?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${c}${a.maximum.toString()} ${u.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${c}${a.maximum.toString()}`}case"too_small":{const c=a.inclusive?">=":">",u=r(a.origin),l=o(a.origin);return u?`Demasiado pequeño: se esperaba que ${l} tuviera ${c}${a.minimum.toString()} ${u.unit}`:`Demasiado pequeño: se esperaba que ${l} fuera ${c}${a.minimum.toString()}`}case"invalid_format":{const c=a;return c.format==="starts_with"?`Cadena inválida: debe comenzar con "${c.prefix}"`:c.format==="ends_with"?`Cadena inválida: debe terminar en "${c.suffix}"`:c.format==="includes"?`Cadena inválida: debe incluir "${c.includes}"`:c.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${c.pattern}`:`Inválido ${i[c.format]??a.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${joinValues(a.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o(a.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o(a.origin)}`;default:return"Entrada inválida"}}},"error$z");function es(){return{localeError:error$z()}}s(es,"es");const error$y=s(()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"عدد";case"object":{if(Array.isArray(t))return"آرایه";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${t.expected} میبود، ${r(t.input)} دریافت شد`;case"invalid_value":return t.values.length===1?`ورودی نامعتبر: میبایست ${stringifyPrimitive(t.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${joinValues(t.values,"|")} میبود`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`خیلی بزرگ: ${t.origin??"مقدار"} باید ${i}${t.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${t.origin??"مقدار"} باید ${i}${t.maximum.toString()} باشد`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`خیلی کوچک: ${t.origin} باید ${i}${t.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${t.origin} باید ${i}${t.minimum.toString()} باشد`}case"invalid_format":{const i=t;return i.format==="starts_with"?`رشته نامعتبر: باید با "${i.prefix}" شروع شود`:i.format==="ends_with"?`رشته نامعتبر: باید با "${i.suffix}" تمام شود`:i.format==="includes"?`رشته نامعتبر: باید شامل "${i.includes}" باشد`:i.format==="regex"?`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`:`${o[i.format]??t.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${t.divisor} باشد`;case"unrecognized_keys":return`کلید${t.keys.length>1?"های":""} ناشناس: ${joinValues(t.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${t.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${t.origin}`;default:return"ورودی نامعتبر"}}},"error$y");function fa(){return{localeError:error$y()}}s(fa,"fa");const error$x=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${t.expected}, oli ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Virheellinen syöte: täytyy olla ${stringifyPrimitive(t.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${i}${t.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${i}${t.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen syöte: täytyy sisältää "${i.includes}"`:i.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${joinValues(t.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"}}},"error$x");function fi(){return{localeError:error$x()}}s(fi,"fi");const error$w=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Entrée invalide : ${t.expected} attendu, ${r(t.input)} reçu`;case"invalid_value":return t.values.length===1?`Entrée invalide : ${stringifyPrimitive(t.values[0])} attendu`:`Option invalide : une valeur parmi ${joinValues(t.values,"|")} attendue`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Trop grand : ${t.origin??"valeur"} doit ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${t.origin??"valeur"} doit être ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Trop petit : ${t.origin} doit ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Trop petit : ${t.origin} doit être ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${joinValues(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}},"error$w");function fr(){return{localeError:error$w()}}s(fr,"fr");const error$v=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Entrée invalide : attendu ${t.expected}, reçu ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Entrée invalide : attendu ${stringifyPrimitive(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"≤":"<",a=n(t.origin);return a?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${i}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?"≥":">",a=n(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${i}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${joinValues(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}},"error$v");function frCA(){return{localeError:error$v()}}s(frCA,"frCA");const error$u=s(()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},n={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=s(l=>l?e[l]:void 0,"typeEntry"),o=s(l=>{const d=r(l);return d?d.label:l??e.unknown.label},"typeLabel"),t=s(l=>`ה${o(l)}`,"withDefinite"),i=s(l=>(r(l)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות","verbFor"),a=s(l=>l?n[l]??null:null,"getSizing"),c=s(l=>{const d=typeof l;switch(d){case"number":return Number.isNaN(l)?"NaN":"number";case"object":return Array.isArray(l)?"array":l===null?"null":Object.getPrototypeOf(l)!==Object.prototype&&l.constructor?l.constructor.name:"object";default:return d}},"parsedType"),u={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return l=>{switch(l.code){case"invalid_type":{const d=l.expected,f=o(d),g=c(l.input),h=e[g]?.label??g;return`קלט לא תקין: צריך להיות ${f}, התקבל ${h}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${stringifyPrimitive(l.values[0])}`;const d=l.values.map(h=>stringifyPrimitive(h));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;const f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const d=a(l.origin),f=t(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${f} צריכה להכיל ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){const $=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${f} צריך להיות ${$}`}if(l.origin==="array"||l.origin==="set"){const $=l.origin==="set"?"צריכה":"צריך",E=l.inclusive?`${l.maximum} ${d?.unit??""} או פחות`:`פחות מ-${l.maximum} ${d?.unit??""}`;return`גדול מדי: ${f} ${$} להכיל ${E}`.trim()}const g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} מדי: ${f} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"גדול"} מדי: ${f} ${h} ${g}${l.maximum.toString()}`}case"too_small":{const d=a(l.origin),f=t(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${f} צריכה להכיל ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){const $=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${f} צריך להיות ${$}`}if(l.origin==="array"||l.origin==="set"){const $=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){const P=(l.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${$} להכיל ${P}`}const E=l.inclusive?`${l.minimum} ${d?.unit??""} או יותר`:`יותר מ-${l.minimum} ${d?.unit??""}`;return`קטן מדי: ${f} ${$} להכיל ${E}`.trim()}const g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} מדי: ${f} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"קטן"} מדי: ${f} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{const d=l;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;const f=u[d.format],g=f?.label??d.format,$=(f?.gender??"m")==="f"?"תקינה":"תקין";return`${g} לא ${$}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${joinValues(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${t(l.origin??"array")}`;default:return"קלט לא תקין"}}},"error$u");function he(){return{localeError:error$u()}}s(he,"he");const error$t=s(()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"szám";case"object":{if(Array.isArray(t))return"tömb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${t.expected}, a kapott érték ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Érvénytelen bemenet: a várt érték ${stringifyPrimitive(t.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${i}${t.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${i}${t.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`:i.format==="ends_with"?`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`:i.format==="includes"?`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`:i.format==="regex"?`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`:`Érvénytelen ${o[i.format]??t.format}`}case"not_multiple_of":return`Érvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${t.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${t.origin}`;default:return"Érvénytelen bemenet"}}},"error$t");function hu(){return{localeError:error$t()}}s(hu,"hu");const error$s=s(()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Input tidak valid: diharapkan ${t.expected}, diterima ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${stringifyPrimitive(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${i}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Terlalu kecil: diharapkan ${t.origin} memiliki ${i}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}},"error$s");function id(){return{localeError:error$s()}}s(id,"id");const parsedType$3=s(e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},"parsedType$3"),error$r=s(()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function n(o){return e[o]??null}s(n,"getSizing");const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${parsedType$3(o.input)} þar sem á að vera ${o.expected}`;case"invalid_value":return o.values.length===1?`Rangt gildi: gert ráð fyrir ${stringifyPrimitive(o.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${joinValues(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} hafi ${t}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} sé ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Of lítið: gert er ráð fyrir að ${o.origin} hafi ${t}${o.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${o.origin} sé ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format==="ends_with"?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format==="includes"?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${r[t.format]??o.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`Óþekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${joinValues(o.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${o.origin}`;default:return"Rangt gildi"}}},"error$r");function is(){return{localeError:error$r()}}s(is,"is");const error$q=s(()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Input non valido: atteso ${t.expected}, ricevuto ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Input non valido: atteso ${stringifyPrimitive(t.values[0])}`:`Opzione non valida: atteso uno tra ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Troppo grande: ${t.origin??"valore"} deve avere ${i}${t.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Troppo piccolo: ${t.origin} deve avere ${i}${t.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${t.origin} deve essere ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}},"error$q");function it(){return{localeError:error$q()}}s(it,"it");const error$p=s(()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"数値";case"object":{if(Array.isArray(t))return"配列";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`無効な入力: ${t.expected}が期待されましたが、${r(t.input)}が入力されました`;case"invalid_value":return t.values.length===1?`無効な入力: ${stringifyPrimitive(t.values[0])}が期待されました`:`無効な選択: ${joinValues(t.values,"、")}のいずれかである必要があります`;case"too_big":{const i=t.inclusive?"以下である":"より小さい",a=n(t.origin);return a?`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${a.unit??"要素"}${i}必要があります`:`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${i}必要があります`}case"too_small":{const i=t.inclusive?"以上である":"より大きい",a=n(t.origin);return a?`小さすぎる値: ${t.origin}は${t.minimum.toString()}${a.unit}${i}必要があります`:`小さすぎる値: ${t.origin}は${t.minimum.toString()}${i}必要があります`}case"invalid_format":{const i=t;return i.format==="starts_with"?`無効な文字列: "${i.prefix}"で始まる必要があります`:i.format==="ends_with"?`無効な文字列: "${i.suffix}"で終わる必要があります`:i.format==="includes"?`無効な文字列: "${i.includes}"を含む必要があります`:i.format==="regex"?`無効な文字列: パターン${i.pattern}に一致する必要があります`:`無効な${o[i.format]??t.format}`}case"not_multiple_of":return`無効な数値: ${t.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${t.keys.length>1?"群":""}: ${joinValues(t.keys,"、")}`;case"invalid_key":return`${t.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${t.origin}内の無効な値`;default:return"無効な入力"}}},"error$p");function ja(){return{localeError:error$p()}}s(ja,"ja");const parsedType$2=s(e=>{const n=typeof e;switch(n){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{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[n]??n},"parsedType$2"),error$o=s(()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function n(o){return e[o]??null}s(n,"getSizing");const 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-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return o=>{switch(o.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${o.expected}, მიღებული ${parsedType$2(o.input)}`;case"invalid_value":return o.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${stringifyPrimitive(o.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${joinValues(o.values,"|")}-დან`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${o.origin??"მნიშვნელობა"} ${i.verb} ${t}${o.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${o.origin??"მნიშვნელობა"} იყოს ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${o.origin} ${i.verb} ${t}${o.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${o.origin} იყოს ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;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]??o.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${o.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${o.keys.length>1?"ები":"ი"}: ${joinValues(o.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${o.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${o.origin}-ში`;default:return"არასწორი შეყვანა"}}},"error$o");function ka(){return{localeError:error$o()}}s(ka,"ka");const error$n=s(()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(t))return"អារេ (Array)";if(t===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t.expected} ប៉ុន្តែទទួលបាន ${r(t.input)}`;case"invalid_value":return t.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(t.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${i} ${t.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`តូចពេក៖ ត្រូវការ ${t.origin} ${i} ${t.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${t.origin} ${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`:i.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`:i.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`:i.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`:`មិនត្រឹមត្រូវ៖ ${o[i.format]??t.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${t.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${joinValues(t.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}},"error$n");function km(){return{localeError:error$n()}}s(km,"km");function kh(){return km()}s(kh,"kh");const error$m=s(()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${t.expected}, 받은 타입은 ${r(t.input)}입니다`;case"invalid_value":return t.values.length===1?`잘못된 입력: 값은 ${stringifyPrimitive(t.values[0])} 이어야 합니다`:`잘못된 옵션: ${joinValues(t.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const i=t.inclusive?"이하":"미만",a=i==="미만"?"이어야 합니다":"여야 합니다",c=n(t.origin),u=c?.unit??"요소";return c?`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()}${u} ${i}${a}`:`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()} ${i}${a}`}case"too_small":{const i=t.inclusive?"이상":"초과",a=i==="이상"?"이어야 합니다":"여야 합니다",c=n(t.origin),u=c?.unit??"요소";return c?`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()}${u} ${i}${a}`:`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()} ${i}${a}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`:i.format==="ends_with"?`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`:i.format==="includes"?`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`:i.format==="regex"?`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`:`잘못된 ${o[i.format]??t.format}`}case"not_multiple_of":return`잘못된 숫자: ${t.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${joinValues(t.keys,", ")}`;case"invalid_key":return`잘못된 키: ${t.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${t.origin}`;default:return"잘못된 입력"}}},"error$m");function ko(){return{localeError:error$m()}}s(ko,"ko");const parsedType$1=s(e=>parsedTypeFromType(typeof e,e),"parsedType$1"),parsedTypeFromType=s((e,n=void 0)=>{switch(e){case"number":return Number.isNaN(n)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return n===void 0?"nežinomas objektas":n===null?"nulinė reikšmė":Array.isArray(n)?"masyvas":Object.getPrototypeOf(n)!==Object.prototype&&n.constructor?n.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},"parsedTypeFromType"),capitalizeFirstCharacter=s(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function getUnitTypeFromNumber(e){const n=Math.abs(e),r=n%10,o=n%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}s(getUnitTypeFromNumber,"getUnitTypeFromNumber");const error$l=s(()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function n(o,t,i,a){const c=e[o]??null;return c===null?c:{unit:c.unit[t],verb:c.verb[a][i?"inclusive":"notInclusive"]}}s(n,"getSizing");const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return o=>{switch(o.code){case"invalid_type":return`Gautas tipas ${parsedType$1(o.input)}, o tikėtasi - ${parsedTypeFromType(o.expected)}`;case"invalid_value":return o.values.length===1?`Privalo būti ${stringifyPrimitive(o.values[0])}`:`Privalo būti vienas iš ${joinValues(o.values,"|")} pasirinkimų`;case"too_big":{const t=parsedTypeFromType(o.origin),i=n(o.origin,getUnitTypeFromNumber(Number(o.maximum)),o.inclusive??!1,"smaller");if(i?.verb)return`${capitalizeFirstCharacter(t??o.origin??"reikšmė")} ${i.verb} ${o.maximum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${capitalizeFirstCharacter(t??o.origin??"reikšmė")} turi būti ${a} ${o.maximum.toString()} ${i?.unit}`}case"too_small":{const t=parsedTypeFromType(o.origin),i=n(o.origin,getUnitTypeFromNumber(Number(o.minimum)),o.inclusive??!1,"bigger");if(i?.verb)return`${capitalizeFirstCharacter(t??o.origin??"reikšmė")} ${i.verb} ${o.minimum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${capitalizeFirstCharacter(t??o.origin??"reikšmė")} turi būti ${a} ${o.minimum.toString()} ${i?.unit}`}case"invalid_format":{const t=o;return t.format==="starts_with"?`Eilutė privalo prasidėti "${t.prefix}"`:t.format==="ends_with"?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format==="includes"?`Eilutė privalo įtraukti "${t.includes}"`:t.format==="regex"?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${r[t.format]??o.format}`}case"not_multiple_of":return`Skaičius privalo būti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${joinValues(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const t=parsedTypeFromType(o.origin);return`${capitalizeFirstCharacter(t??o.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}},"error$l");function lt(){return{localeError:error$l()}}s(lt,"lt");const error$k=s(()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"број";case"object":{if(Array.isArray(t))return"низа";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Грешен внес: се очекува ${t.expected}, примено ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Invalid input: expected ${stringifyPrimitive(t.values[0])}`:`Грешана опција: се очекува една ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Премногу голем: се очекува ${t.origin??"вредноста"} да има ${i}${t.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${t.origin??"вредноста"} да биде ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Премногу мал: се очекува ${t.origin} да има ${i}${t.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${t.origin} да биде ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Неважечка низа: мора да започнува со "${i.prefix}"`:i.format==="ends_with"?`Неважечка низа: мора да завршува со "${i.suffix}"`:i.format==="includes"?`Неважечка низа: мора да вклучува "${i.includes}"`:i.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${i.pattern}`:`Invalid ${o[i.format]??t.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${t.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${t.origin}`;default:return"Грешен внес"}}},"error$k");function mk(){return{localeError:error$k()}}s(mk,"mk");const error$j=s(()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Input tidak sah: dijangka ${t.expected}, diterima ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${stringifyPrimitive(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}},"error$j");function ms(){return{localeError:error$j()}}s(ms,"ms");const error$i=s(()=>{const e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Ongeldige invoer: verwacht ${t.expected}, ontving ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${stringifyPrimitive(t.values[0])}`:`Ongeldige optie: verwacht één van ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Te groot: verwacht dat ${t.origin??"waarde"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"elementen"}`:`Te groot: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} is`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Te klein: verwacht dat ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Te klein: verwacht dat ${t.origin} ${i}${t.minimum.toString()} is`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}},"error$i");function nl(){return{localeError:error$i()}}s(nl,"nl");const error$h=s(()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Ugyldig input: forventet ${t.expected}, fikk ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${stringifyPrimitive(t.values[0])}`:`Ugyldig valg: forventet en av ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`For stor(t): forventet ${t.origin??"value"} til å ha ${i}${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til å ha ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`For lite(n): forventet ${t.origin} til å ha ${i}${t.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${t.origin} til å ha ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ugyldig streng: må starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: må ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: må inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: må matche mønsteret ${i.pattern}`:`Ugyldig ${o[i.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}},"error$h");function no(){return{localeError:error$h()}}s(no,"no");const error$g=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Fâsit giren: umulan ${t.expected}, alınan ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Fâsit giren: umulan ${stringifyPrimitive(t.values[0])}`:`Fâsit tercih: mûteberler ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Fazla büyük: ${t.origin??"value"}, ${i}${t.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${t.origin??"value"}, ${i}${t.maximum.toString()} olmalıydı.`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Fazla küçük: ${t.origin}, ${i}${t.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${t.origin}, ${i}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Fâsit metin: "${i.prefix}" ile başlamalı.`:i.format==="ends_with"?`Fâsit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`Fâsit metin: "${i.includes}" ihtivâ etmeli.`:i.format==="regex"?`Fâsit metin: ${i.pattern} nakşına uymalı.`:`Fâsit ${o[i.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}},"error$g");function ota(){return{localeError:error$g()}}s(ota,"ota");const error$f=s(()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"عدد";case"object":{if(Array.isArray(t))return"ارې";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`ناسم ورودي: باید ${t.expected} وای, مګر ${r(t.input)} ترلاسه شو`;case"invalid_value":return t.values.length===1?`ناسم ورودي: باید ${stringifyPrimitive(t.values[0])} وای`:`ناسم انتخاب: باید یو له ${joinValues(t.values,"|")} څخه وای`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`ډیر لوی: ${t.origin??"ارزښت"} باید ${i}${t.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${t.origin??"ارزښت"} باید ${i}${t.maximum.toString()} وي`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`ډیر کوچنی: ${t.origin} باید ${i}${t.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${t.origin} باید ${i}${t.minimum.toString()} وي`}case"invalid_format":{const i=t;return i.format==="starts_with"?`ناسم متن: باید د "${i.prefix}" سره پیل شي`:i.format==="ends_with"?`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`:i.format==="includes"?`ناسم متن: باید "${i.includes}" ولري`:i.format==="regex"?`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`:`${o[i.format]??t.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${t.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${t.keys.length>1?"کلیډونه":"کلیډ"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${t.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${t.origin} کې`;default:return"ناسمه ورودي"}}},"error$f");function ps(){return{localeError:error$f()}}s(ps,"ps");const error$e=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${t.expected}, otrzymano ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(t.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Za duża wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${i}${t.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Za mała wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${i}${t.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`:i.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`:i.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`:i.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`:`Nieprawidłow(y/a/e) ${o[i.format]??t.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${t.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${t.origin}`;default:return"Nieprawidłowe dane wejściowe"}}},"error$e");function pl(){return{localeError:error$e()}}s(pl,"pl");const error$d=s(()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"número";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Tipo inválido: esperado ${t.expected}, recebido ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Entrada inválida: esperado ${stringifyPrimitive(t.values[0])}`:`Opção inválida: esperada uma das ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${i}${t.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Muito pequeno: esperado que ${t.origin} tivesse ${i}${t.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Texto inválido: deve começar com "${i.prefix}"`:i.format==="ends_with"?`Texto inválido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inválido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inválido: deve corresponder ao padrão ${i.pattern}`:`${o[i.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}},"error$d");function pt(){return{localeError:error$d()}}s(pt,"pt");function getRussianPlural(e,n,r,o){const t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19?o:i===1?n:i>=2&&i<=4?r:o}s(getRussianPlural,"getRussianPlural");const error$c=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"число";case"object":{if(Array.isArray(t))return"массив";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Неверный ввод: ожидалось ${t.expected}, получено ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Неверный ввод: ожидалось ${stringifyPrimitive(t.values[0])}`:`Неверный вариант: ожидалось одно из ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);if(a){const c=Number(t.maximum),u=getRussianPlural(c,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет иметь ${i}${t.maximum.toString()} ${u}`}return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);if(a){const c=Number(t.minimum),u=getRussianPlural(c,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${t.origin} будет иметь ${i}${t.minimum.toString()} ${u}`}return`Слишком маленькое значение: ожидалось, что ${t.origin} будет ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Неверная строка: должна начинаться с "${i.prefix}"`:i.format==="ends_with"?`Неверная строка: должна заканчиваться на "${i.suffix}"`:i.format==="includes"?`Неверная строка: должна содержать "${i.includes}"`:i.format==="regex"?`Неверная строка: должна соответствовать шаблону ${i.pattern}`:`Неверный ${o[i.format]??t.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспознанн${t.keys.length>1?"ые":"ый"} ключ${t.keys.length>1?"и":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${t.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${t.origin}`;default:return"Неверные входные данные"}}},"error$c");function ru(){return{localeError:error$c()}}s(ru,"ru");const error$b=s(()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"število";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${t.expected}, prejeto ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Neveljaven vnos: pričakovano ${stringifyPrimitive(t.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} imelo ${i}${t.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Premajhno: pričakovano, da bo ${t.origin} imelo ${i}${t.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Neveljaven niz: mora se začeti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se končati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??t.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i ključi":" ključ"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}},"error$b");function sl(){return{localeError:error$b()}}s(sl,"sl");const error$a=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${t.expected}, fick ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ogiltig inmatning: förväntat ${stringifyPrimitive(t.values[0])}`:`Ogiltigt val: förväntade en av ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`För stor(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${t.origin??"värdet"} att ha ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`För lite(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ogiltig sträng: måste börja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig sträng: måste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig sträng: måste innehålla "${i.includes}"`:i.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}},"error$a");function sv(){return{localeError:error$a()}}s(sv,"sv");const error$9=s(()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(t))return"அணி";if(t===null)return"வெறுமை";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t.expected}, பெறப்பட்டது ${r(t.input)}`;case"invalid_value":return t.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(t.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(t.values,"|")} இல் ஒன்று`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${i}${t.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${i}${t.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${i}${t.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${i}${t.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const i=t;return i.format==="starts_with"?`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`:i.format==="ends_with"?`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`:i.format==="includes"?`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`:i.format==="regex"?`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${o[i.format]??t.format}`}case"not_multiple_of":return`தவறான எண்: ${t.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${t.keys.length>1?"கள்":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`${t.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${t.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}},"error$9");function ta(){return{localeError:error$9()}}s(ta,"ta");const error$8=s(()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(t))return"อาร์เรย์ (Array)";if(t===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t.expected} แต่ได้รับ ${r(t.input)}`;case"invalid_value":return t.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(t.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"ไม่เกิน":"น้อยกว่า",a=n(t.origin);return a?`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${i} ${t.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${i} ${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?"อย่างน้อย":"มากกว่า",a=n(t.origin);return a?`น้อยกว่ากำหนด: ${t.origin} ควรมี${i} ${t.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${t.origin} ควรมี${i} ${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`:i.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`:i.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`:i.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`:`รูปแบบไม่ถูกต้อง: ${o[i.format]??t.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${t.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${joinValues(t.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${t.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${t.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}},"error$8");function th(){return{localeError:error$8()}}s(th,"th");const parsedType=s(e=>{const n=typeof e;switch(n){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 n},"parsedType"),error$7=s(()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function n(o){return e[o]??null}s(n,"getSizing");const r={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 o=>{switch(o.code){case"invalid_type":return`Geçersiz değer: beklenen ${o.expected}, alınan ${parsedType(o.input)}`;case"invalid_value":return o.values.length===1?`Geçersiz değer: beklenen ${stringifyPrimitive(o.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${joinValues(o.values,"|")}`;case"too_big":{const t=o.inclusive?"<=":"<",i=n(o.origin);return i?`Çok büyük: beklenen ${o.origin??"değer"} ${t}${o.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${o.origin??"değer"} ${t}${o.maximum.toString()}`}case"too_small":{const t=o.inclusive?">=":">",i=n(o.origin);return i?`Çok küçük: beklenen ${o.origin} ${t}${o.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${o.origin} ${t}${o.minimum.toString()}`}case"invalid_format":{const t=o;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 ${r[t.format]??o.format}`}case"not_multiple_of":return`Geçersiz sayı: ${o.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${o.keys.length>1?"lar":""}: ${joinValues(o.keys,", ")}`;case"invalid_key":return`${o.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${o.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}},"error$7");function tr(){return{localeError:error$7()}}s(tr,"tr");const error$6=s(()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"число";case"object":{if(Array.isArray(t))return"масив";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${t.expected}, отримано ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Неправильні вхідні дані: очікується ${stringifyPrimitive(t.values[0])}`:`Неправильна опція: очікується одне з ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Занадто велике: очікується, що ${t.origin??"значення"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${t.origin??"значення"} буде ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Занадто мале: очікується, що ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${t.origin} буде ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Неправильний рядок: повинен починатися з "${i.prefix}"`:i.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`:i.format==="includes"?`Неправильний рядок: повинен містити "${i.includes}"`:i.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`:`Неправильний ${o[i.format]??t.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${t.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${t.keys.length>1?"і":""}: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${t.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${t.origin}`;default:return"Неправильні вхідні дані"}}},"error$6");function uk(){return{localeError:error$6()}}s(uk,"uk");function ua(){return uk()}s(ua,"ua");const error$5=s(()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"نمبر";case"object":{if(Array.isArray(t))return"آرے";if(t===null)return"نل";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`غلط ان پٹ: ${t.expected} متوقع تھا، ${r(t.input)} موصول ہوا`;case"invalid_value":return t.values.length===1?`غلط ان پٹ: ${stringifyPrimitive(t.values[0])} متوقع تھا`:`غلط آپشن: ${joinValues(t.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`بہت بڑا: ${t.origin??"ویلیو"} کے ${i}${t.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${t.origin??"ویلیو"} کا ${i}${t.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`بہت چھوٹا: ${t.origin} کے ${i}${t.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${t.origin} کا ${i}${t.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const i=t;return i.format==="starts_with"?`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`:i.format==="ends_with"?`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`:i.format==="includes"?`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`:i.format==="regex"?`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`:`غلط ${o[i.format]??t.format}`}case"not_multiple_of":return`غلط نمبر: ${t.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${t.keys.length>1?"ز":""}: ${joinValues(t.keys,"، ")}`;case"invalid_key":return`${t.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${t.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}},"error$5");function ur(){return{localeError:error$5()}}s(ur,"ur");const error$4=s(()=>{const 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 n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"số";case"object":{if(Array.isArray(t))return"mảng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${t.expected}, nhận được ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(t.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Quá lớn: mong đợi ${t.origin??"giá trị"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${t.origin??"giá trị"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Quá nhỏ: mong đợi ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`:i.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`:i.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`:i.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`:`${o[i.format]??t.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 ${t.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${t.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 ${t.origin}`;default:return"Đầu vào không hợp lệ"}}},"error$4");function vi(){return{localeError:error$4()}}s(vi,"vi");const error$3=s(()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(t))return"数组";if(t===null)return"空值(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`无效输入:期望 ${t.expected},实际接收 ${r(t.input)}`;case"invalid_value":return t.values.length===1?`无效输入:期望 ${stringifyPrimitive(t.values[0])}`:`无效选项:期望以下之一 ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`数值过大:期望 ${t.origin??"值"} ${i}${t.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${t.origin??"值"} ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`数值过小:期望 ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`:`数值过小:期望 ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`无效字符串:必须以 "${i.prefix}" 开头`:i.format==="ends_with"?`无效字符串:必须以 "${i.suffix}" 结尾`:i.format==="includes"?`无效字符串:必须包含 "${i.includes}"`:i.format==="regex"?`无效字符串:必须满足正则表达式 ${i.pattern}`:`无效${o[i.format]??t.format}`}case"not_multiple_of":return`无效数字:必须是 ${t.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${joinValues(t.keys,", ")}`;case"invalid_key":return`${t.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${t.origin} 中包含无效值(value)`;default:return"无效输入"}}},"error$3");function zhCN$1(){return{localeError:error$3()}}s(zhCN$1,"zhCN$1");const error$2=s(()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={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 t=>{switch(t.code){case"invalid_type":return`無效的輸入值:預期為 ${t.expected},但收到 ${r(t.input)}`;case"invalid_value":return t.values.length===1?`無效的輸入值:預期為 ${stringifyPrimitive(t.values[0])}`:`無效的選項:預期為以下其中之一 ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`數值過大:預期 ${t.origin??"值"} 應為 ${i}${t.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${t.origin??"值"} 應為 ${i}${t.maximum.toString()}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`數值過小:預期 ${t.origin} 應為 ${i}${t.minimum.toString()} ${a.unit}`:`數值過小:預期 ${t.origin} 應為 ${i}${t.minimum.toString()}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`無效的字串:必須以 "${i.prefix}" 開頭`:i.format==="ends_with"?`無效的字串:必須以 "${i.suffix}" 結尾`:i.format==="includes"?`無效的字串:必須包含 "${i.includes}"`:i.format==="regex"?`無效的字串:必須符合格式 ${i.pattern}`:`無效的 ${o[i.format]??t.format}`}case"not_multiple_of":return`無效的數字:必須為 ${t.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${t.keys.length>1?"們":""}:${joinValues(t.keys,"、")}`;case"invalid_key":return`${t.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${t.origin} 中有無效的值`;default:return"無效的輸入值"}}},"error$2");function zhTW(){return{localeError:error$2()}}s(zhTW,"zhTW");const error$1=s(()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function n(t){return e[t]??null}s(n,"getSizing");const r=s(t=>{const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(t))return"akopọ";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return i},"parsedType"),o={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return t=>{switch(t.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${t.expected}, àmọ̀ a rí ${r(t.input)}`;case"invalid_value":return t.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${stringifyPrimitive(t.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${joinValues(t.values,"|")}`;case"too_big":{const i=t.inclusive?"<=":"<",a=n(t.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${t.origin??"iye"} ${a.verb} ${i}${t.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${i}${t.maximum}`}case"too_small":{const i=t.inclusive?">=":">",a=n(t.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${t.origin} ${a.verb} ${i}${t.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${i}${t.minimum}`}case"invalid_format":{const i=t;return i.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${i.prefix}"`:i.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${i.suffix}"`:i.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${i.includes}"`:i.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`:`Aṣìṣe: ${o[i.format]??t.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${t.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${joinValues(t.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${t.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${t.origin}`;default:return"Ìbáwọlé aṣìṣe"}}},"error$1");function yo(){return{localeError:error$1()}}s(yo,"yo");const index$1=Object.freeze(Object.defineProperty({__proto__:null,ar,az,be,bg,ca,cs,da,de,en,eo,es,fa,fi,fr,frCA,he,hu,id,is,it,ja,ka,kh,km,ko,lt,mk,ms,nl,no,ota,pl,ps,pt,ru,sl,sv,ta,th,tr,ua,uk,ur,vi,yo,zhCN:zhCN$1,zhTW},Symbol.toStringTag,{value:"Module"}));var _a;const $output=Symbol("ZodOutput"),$input=Symbol("ZodInput"),dt=class dt{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...r){const o=r[0];if(this._map.set(n,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,n)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){const r=n._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const t={...o,...this._map.get(n)};return Object.keys(t).length?t:void 0}return this._map.get(n)}has(n){return this._map.has(n)}};s(dt,"$ZodRegistry");let $ZodRegistry=dt;function registry(){return new $ZodRegistry}s(registry,"registry"),(_a=globalThis).__zod_globalRegistry??(_a.__zod_globalRegistry=registry());const globalRegistry=globalThis.__zod_globalRegistry;function _string(e,n){return new e({type:"string",...normalizeParams(n)})}s(_string,"_string");function _coercedString(e,n){return new e({type:"string",coerce:!0,...normalizeParams(n)})}s(_coercedString,"_coercedString");function _email(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...normalizeParams(n)})}s(_email,"_email");function _guid(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_guid,"_guid");function _uuid(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_uuid,"_uuid");function _uuidv4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(n)})}s(_uuidv4,"_uuidv4");function _uuidv6(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(n)})}s(_uuidv6,"_uuidv6");function _uuidv7(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(n)})}s(_uuidv7,"_uuidv7");function _url(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(n)})}s(_url,"_url");function _emoji(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...normalizeParams(n)})}s(_emoji,"_emoji");function _nanoid(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_nanoid,"_nanoid");function _cuid(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_cuid,"_cuid");function _cuid2(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(n)})}s(_cuid2,"_cuid2");function _ulid(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_ulid,"_ulid");function _xid(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_xid,"_xid");function _ksuid(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(n)})}s(_ksuid,"_ksuid");function _ipv4(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(n)})}s(_ipv4,"_ipv4");function _ipv6(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(n)})}s(_ipv6,"_ipv6");function _mac(e,n){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...normalizeParams(n)})}s(_mac,"_mac");function _cidrv4(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(n)})}s(_cidrv4,"_cidrv4");function _cidrv6(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(n)})}s(_cidrv6,"_cidrv6");function _base64(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(n)})}s(_base64,"_base64");function _base64url(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(n)})}s(_base64url,"_base64url");function _e164(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(n)})}s(_e164,"_e164");function _jwt(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(n)})}s(_jwt,"_jwt");const TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _isoDateTime(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(n)})}s(_isoDateTime,"_isoDateTime");function _isoDate(e,n){return new e({type:"string",format:"date",check:"string_format",...normalizeParams(n)})}s(_isoDate,"_isoDate");function _isoTime(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(n)})}s(_isoTime,"_isoTime");function _isoDuration(e,n){return new e({type:"string",format:"duration",check:"string_format",...normalizeParams(n)})}s(_isoDuration,"_isoDuration");function _number(e,n){return new e({type:"number",checks:[],...normalizeParams(n)})}s(_number,"_number");function _coercedNumber(e,n){return new e({type:"number",coerce:!0,checks:[],...normalizeParams(n)})}s(_coercedNumber,"_coercedNumber");function _int(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(n)})}s(_int,"_int");function _float32(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...normalizeParams(n)})}s(_float32,"_float32");function _float64(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...normalizeParams(n)})}s(_float64,"_float64");function _int32(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...normalizeParams(n)})}s(_int32,"_int32");function _uint32(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...normalizeParams(n)})}s(_uint32,"_uint32");function _boolean(e,n){return new e({type:"boolean",...normalizeParams(n)})}s(_boolean,"_boolean");function _coercedBoolean(e,n){return new e({type:"boolean",coerce:!0,...normalizeParams(n)})}s(_coercedBoolean,"_coercedBoolean");function _bigint(e,n){return new e({type:"bigint",...normalizeParams(n)})}s(_bigint,"_bigint");function _coercedBigint(e,n){return new e({type:"bigint",coerce:!0,...normalizeParams(n)})}s(_coercedBigint,"_coercedBigint");function _int64(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...normalizeParams(n)})}s(_int64,"_int64");function _uint64(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...normalizeParams(n)})}s(_uint64,"_uint64");function _symbol(e,n){return new e({type:"symbol",...normalizeParams(n)})}s(_symbol,"_symbol");function _undefined$1(e,n){return new e({type:"undefined",...normalizeParams(n)})}s(_undefined$1,"_undefined$1");function _null$1(e,n){return new e({type:"null",...normalizeParams(n)})}s(_null$1,"_null$1");function _any(e){return new e({type:"any"})}s(_any,"_any");function _unknown(e){return new e({type:"unknown"})}s(_unknown,"_unknown");function _never(e,n){return new e({type:"never",...normalizeParams(n)})}s(_never,"_never");function _void$1(e,n){return new e({type:"void",...normalizeParams(n)})}s(_void$1,"_void$1");function _date(e,n){return new e({type:"date",...normalizeParams(n)})}s(_date,"_date");function _coercedDate(e,n){return new e({type:"date",coerce:!0,...normalizeParams(n)})}s(_coercedDate,"_coercedDate");function _nan(e,n){return new e({type:"nan",...normalizeParams(n)})}s(_nan,"_nan");function _lt(e,n){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(n),value:e,inclusive:!1})}s(_lt,"_lt");function _lte(e,n){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(n),value:e,inclusive:!0})}s(_lte,"_lte");function _gt(e,n){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(n),value:e,inclusive:!1})}s(_gt,"_gt");function _gte(e,n){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(n),value:e,inclusive:!0})}s(_gte,"_gte");function _positive(e){return _gt(0,e)}s(_positive,"_positive");function _negative(e){return _lt(0,e)}s(_negative,"_negative");function _nonpositive(e){return _lte(0,e)}s(_nonpositive,"_nonpositive");function _nonnegative(e){return _gte(0,e)}s(_nonnegative,"_nonnegative");function _multipleOf(e,n){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(n),value:e})}s(_multipleOf,"_multipleOf");function _maxSize(e,n){return new $ZodCheckMaxSize({check:"max_size",...normalizeParams(n),maximum:e})}s(_maxSize,"_maxSize");function _minSize(e,n){return new $ZodCheckMinSize({check:"min_size",...normalizeParams(n),minimum:e})}s(_minSize,"_minSize");function _size(e,n){return new $ZodCheckSizeEquals({check:"size_equals",...normalizeParams(n),size:e})}s(_size,"_size");function _maxLength(e,n){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(n),maximum:e})}s(_maxLength,"_maxLength");function _minLength(e,n){return new $ZodCheckMinLength({check:"min_length",...normalizeParams(n),minimum:e})}s(_minLength,"_minLength");function _length(e,n){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(n),length:e})}s(_length,"_length");function _regex(e,n){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(n),pattern:e})}s(_regex,"_regex");function _lowercase(e){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(e)})}s(_lowercase,"_lowercase");function _uppercase(e){return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(e)})}s(_uppercase,"_uppercase");function _includes(e,n){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(n),includes:e})}s(_includes,"_includes");function _startsWith(e,n){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(n),prefix:e})}s(_startsWith,"_startsWith");function _endsWith(e,n){return new $ZodCheckEndsWith({check:"string_format",format:"ends_with",...normalizeParams(n),suffix:e})}s(_endsWith,"_endsWith");function _property(e,n,r){return new $ZodCheckProperty({check:"property",property:e,schema:n,...normalizeParams(r)})}s(_property,"_property");function _mime(e,n){return new $ZodCheckMimeType({check:"mime_type",mime:e,...normalizeParams(n)})}s(_mime,"_mime");function _overwrite(e){return new $ZodCheckOverwrite({check:"overwrite",tx:e})}s(_overwrite,"_overwrite");function _normalize(e){return _overwrite(n=>n.normalize(e))}s(_normalize,"_normalize");function _trim(){return _overwrite(e=>e.trim())}s(_trim,"_trim");function _toLowerCase(){return _overwrite(e=>e.toLowerCase())}s(_toLowerCase,"_toLowerCase");function _toUpperCase(){return _overwrite(e=>e.toUpperCase())}s(_toUpperCase,"_toUpperCase");function _slugify(){return _overwrite(e=>slugify(e))}s(_slugify,"_slugify");function _array(e,n,r){return new e({type:"array",element:n,...normalizeParams(r)})}s(_array,"_array");function _union(e,n,r){return new e({type:"union",options:n,...normalizeParams(r)})}s(_union,"_union");function _xor(e,n,r){return new e({type:"union",options:n,inclusive:!1,...normalizeParams(r)})}s(_xor,"_xor");function _discriminatedUnion(e,n,r,o){return new e({type:"union",options:r,discriminator:n,...normalizeParams(o)})}s(_discriminatedUnion,"_discriminatedUnion");function _intersection(e,n,r){return new e({type:"intersection",left:n,right:r})}s(_intersection,"_intersection");function _tuple(e,n,r,o){const t=r instanceof $ZodType,i=t?o:r,a=t?r:null;return new e({type:"tuple",items:n,rest:a,...normalizeParams(i)})}s(_tuple,"_tuple");function _record(e,n,r,o){return new e({type:"record",keyType:n,valueType:r,...normalizeParams(o)})}s(_record,"_record");function _map(e,n,r,o){return new e({type:"map",keyType:n,valueType:r,...normalizeParams(o)})}s(_map,"_map");function _set(e,n,r){return new e({type:"set",valueType:n,...normalizeParams(r)})}s(_set,"_set");function _enum$1(e,n,r){const o=Array.isArray(n)?Object.fromEntries(n.map(t=>[t,t])):n;return new e({type:"enum",entries:o,...normalizeParams(r)})}s(_enum$1,"_enum$1");function _nativeEnum(e,n,r){return new e({type:"enum",entries:n,...normalizeParams(r)})}s(_nativeEnum,"_nativeEnum");function _literal(e,n,r){return new e({type:"literal",values:Array.isArray(n)?n:[n],...normalizeParams(r)})}s(_literal,"_literal");function _file(e,n){return new e({type:"file",...normalizeParams(n)})}s(_file,"_file");function _transform(e,n){return new e({type:"transform",transform:n})}s(_transform,"_transform");function _optional(e,n){return new e({type:"optional",innerType:n})}s(_optional,"_optional");function _nullable(e,n){return new e({type:"nullable",innerType:n})}s(_nullable,"_nullable");function _default$1(e,n,r){return new e({type:"default",innerType:n,get defaultValue(){return typeof r=="function"?r():shallowClone(r)}})}s(_default$1,"_default$1");function _nonoptional(e,n,r){return new e({type:"nonoptional",innerType:n,...normalizeParams(r)})}s(_nonoptional,"_nonoptional");function _success(e,n){return new e({type:"success",innerType:n})}s(_success,"_success");function _catch$1(e,n,r){return new e({type:"catch",innerType:n,catchValue:typeof r=="function"?r:()=>r})}s(_catch$1,"_catch$1");function _pipe(e,n,r){return new e({type:"pipe",in:n,out:r})}s(_pipe,"_pipe");function _readonly(e,n){return new e({type:"readonly",innerType:n})}s(_readonly,"_readonly");function _templateLiteral(e,n,r){return new e({type:"template_literal",parts:n,...normalizeParams(r)})}s(_templateLiteral,"_templateLiteral");function _lazy(e,n){return new e({type:"lazy",getter:n})}s(_lazy,"_lazy");function _promise(e,n){return new e({type:"promise",innerType:n})}s(_promise,"_promise");function _custom(e,n,r){const o=normalizeParams(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:n,...o})}s(_custom,"_custom");function _refine(e,n,r){return new e({type:"custom",check:"custom",fn:n,...normalizeParams(r)})}s(_refine,"_refine");function _superRefine(e){const n=_check(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(issue(o,r.value,n._zod.def));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=r.value),t.inst??(t.inst=n),t.continue??(t.continue=!n._zod.def.abort),r.issues.push(issue(t))}},e(r.value,r)));return n}s(_superRefine,"_superRefine");function _check(e,n){const r=new $ZodCheck({check:"custom",...normalizeParams(n)});return r._zod.check=e,r}s(_check,"_check");function describe$1(e){const n=new $ZodCheck({check:"describe"});return n._zod.onattach=[r=>{const o=globalRegistry.get(r)??{};globalRegistry.add(r,{...o,description:e})}],n._zod.check=()=>{},n}s(describe$1,"describe$1");function meta$1(e){const n=new $ZodCheck({check:"meta"});return n._zod.onattach=[r=>{const o=globalRegistry.get(r)??{};globalRegistry.add(r,{...o,...e})}],n._zod.check=()=>{},n}s(meta$1,"meta$1");function _stringbool(e,n){const r=normalizeParams(n);let o=r.truthy??["true","1","yes","on","y","enabled"],t=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),t=t.map(h=>typeof h=="string"?h.toLowerCase():h));const i=new Set(o),a=new Set(t),c=e.Codec??$ZodCodec,u=e.Boolean??$ZodBoolean,l=e.String??$ZodString,d=new l({type:"string",error:r.error}),f=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:d,out:f,transform:s(((h,$)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?!0:a.has(E)?!1:($.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:$.value,inst:g,continue:!1}),{})}),"transform"),reverseTransform:s(((h,$)=>h===!0?o[0]||"true":t[0]||"false"),"reverseTransform"),error:r.error});return g}s(_stringbool,"_stringbool");function _stringFormat(e,n,r,o={}){const t=normalizeParams(o),i={...normalizeParams(o),check:"string_format",type:"string",format:n,fn:typeof r=="function"?r:c=>r.test(c),...t};return r instanceof RegExp&&(i.pattern=r),new e(i)}s(_stringFormat,"_stringFormat");function initializeContext(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??globalRegistry,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}s(initializeContext,"initializeContext");function process(e,n,r={path:[],schemaPath:[]}){var o;const t=e._zod.def,i=n.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};n.seen.set(e,a);const c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path},f=e._zod.parent;if(f)a.ref=f,process(f,n,d),n.seen.get(f).isParent=!0;else if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,a.schema,d);else{const g=a.schema,h=n.processors[t.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);h(e,n,g,d)}}const u=n.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),n.io==="input"&&isTransforming(e)&&(delete a.schema.examples,delete a.schema.default),n.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,n.seen.get(e).schema}s(process,"process");function extractDefs(e,n){const r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=s(i=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(i[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};const g=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=g,{defId:g,ref:`${f("__shared")}#/${a}/${g}`}}if(i[1]===r)return{ref:"#"};const u=`#/${a}/`,l=i[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},"makeURI"),t=s(i=>{if(i[1].schema.$ref)return;const a=i[1],{ref:c,defId:u}=o(i);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const d in l)delete l[d];l.$ref=c},"extractToDef");if(e.cycles==="throw")for(const i of e.seen.entries()){const a=i[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
27
27
|
|
|
28
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(n===i[0]){t(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(n!==i[0]&&u){t(i);continue}}if(e.metadataRegistry.get(i[0])?.id){t(i);continue}if(a.cycle){t(i);continue}if(a.count>1&&e.reused==="ref"){t(i);continue}}}s(extractDefs,"extractDefs");function finalize(e,n){const r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=s(a=>{const c=e.seen.get(a),u=c.def??c.schema,l={...u};if(c.ref===null)return;const d=c.ref;if(c.ref=null,d){o(d);const f=e.seen.get(d).schema;f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(f)):(Object.assign(u,f),Object.assign(u,l))}c.isParent||e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})},"flattenRef");for(const a of[...e.seen.entries()].reverse())o(a[0]);const t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(n)?.id;if(!a)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(a)}Object.assign(t,r.def??r.schema);const i=e.external?.defs??{};for(const a of e.seen.entries()){const c=a[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?t.$defs=i:t.definitions=i);try{const a=JSON.parse(JSON.stringify(t));return Object.defineProperty(a,"~standard",{value:{...n["~standard"],jsonSchema:{input:createStandardJSONSchemaMethod(n,"input"),output:createStandardJSONSchemaMethod(n,"output")}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}s(finalize,"finalize");function isTransforming(e,n){const r=n??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return isTransforming(o.element,r);if(o.type==="set")return isTransforming(o.valueType,r);if(o.type==="lazy")return isTransforming(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return isTransforming(o.innerType,r);if(o.type==="intersection")return isTransforming(o.left,r)||isTransforming(o.right,r);if(o.type==="record"||o.type==="map")return isTransforming(o.keyType,r)||isTransforming(o.valueType,r);if(o.type==="pipe")return isTransforming(o.in,r)||isTransforming(o.out,r);if(o.type==="object"){for(const t in o.shape)if(isTransforming(o.shape[t],r))return!0;return!1}if(o.type==="union"){for(const t of o.options)if(isTransforming(t,r))return!0;return!1}if(o.type==="tuple"){for(const t of o.items)if(isTransforming(t,r))return!0;return!!(o.rest&&isTransforming(o.rest,r))}return!1}s(isTransforming,"isTransforming");const createToJSONSchemaMethod=s((e,n={})=>r=>{const o=initializeContext({...r,processors:n});return process(e,o),extractDefs(o,e),finalize(o,e)},"createToJSONSchemaMethod"),createStandardJSONSchemaMethod=s((e,n)=>r=>{const{libraryOptions:o,target:t}=r??{},i=initializeContext({...o??{},target:t,io:n,processors:{}});return process(e,i),extractDefs(i,e),finalize(i,e)},"createStandardJSONSchemaMethod"),formatMap={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},stringProcessor=s((e,n,r,o)=>{const t=r;t.type="string";const{minimum:i,maximum:a,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(t.minLength=i),typeof a=="number"&&(t.maxLength=a),c&&(t.format=formatMap[c]??c,t.format===""&&delete t.format),l&&(t.contentEncoding=l),u&&u.size>0){const d=[...u];d.length===1?t.pattern=d[0].source:d.length>1&&(t.allOf=[...d.map(f=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},"stringProcessor"),numberProcessor=s((e,n,r,o)=>{const t=r,{minimum:i,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?t.type="integer":t.type="number",typeof d=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(t.minimum=d,t.exclusiveMinimum=!0):t.exclusiveMinimum=d),typeof i=="number"&&(t.minimum=i,typeof d=="number"&&n.target!=="draft-04"&&(d>=i?delete t.minimum:delete t.exclusiveMinimum)),typeof l=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(t.maximum=l,t.exclusiveMaximum=!0):t.exclusiveMaximum=l),typeof a=="number"&&(t.maximum=a,typeof l=="number"&&n.target!=="draft-04"&&(l<=a?delete t.maximum:delete t.exclusiveMaximum)),typeof u=="number"&&(t.multipleOf=u)},"numberProcessor"),booleanProcessor=s((e,n,r,o)=>{r.type="boolean"},"booleanProcessor"),bigintProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),symbolProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),nullProcessor=s((e,n,r,o)=>{n.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),undefinedProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),voidProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),neverProcessor=s((e,n,r,o)=>{r.not={}},"neverProcessor"),anyProcessor=s((e,n,r,o)=>{},"anyProcessor"),unknownProcessor=s((e,n,r,o)=>{},"unknownProcessor"),dateProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),enumProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=getEnumValues(t.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},"enumProcessor"),literalProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=[];for(const a of t.values)if(a===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];r.type=a===null?"null":typeof a,n.target==="draft-04"||n.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},"literalProcessor"),nanProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),templateLiteralProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=i.source},"templateLiteralProcessor"),fileProcessor=s((e,n,r,o)=>{const t=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(i.minLength=a),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(t,i)):t.anyOf=u.map(l=>({...i,contentMediaType:l})):Object.assign(t,i)},"fileProcessor"),successProcessor=s((e,n,r,o)=>{r.type="boolean"},"successProcessor"),customProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),functionProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),transformProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),mapProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),setProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),arrayProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(t.minItems=a),typeof c=="number"&&(t.maxItems=c),t.type="array",t.items=process(i.element,n,{...o,path:[...o.path,"items"]})},"arrayProcessor"),objectProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def;t.type="object",t.properties={};const a=i.shape;for(const l in a)t.properties[l]=process(a[l],n,{...o,path:[...o.path,"properties",l]});const c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{const d=i.shape[l]._zod;return n.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(t.required=Array.from(u)),i.catchall?._zod.def.type==="never"?t.additionalProperties=!1:i.catchall?i.catchall&&(t.additionalProperties=process(i.catchall,n,{...o,path:[...o.path,"additionalProperties"]})):n.io==="output"&&(t.additionalProperties=!1)},"objectProcessor"),unionProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=t.inclusive===!1,a=t.options.map((c,u)=>process(c,n,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=a:r.anyOf=a},"unionProcessor"),intersectionProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=process(t.left,n,{...o,path:[...o.path,"allOf",0]}),a=process(t.right,n,{...o,path:[...o.path,"allOf",1]}),c=s(l=>"allOf"in l&&Object.keys(l).length===1,"isSimpleIntersection"),u=[...c(i)?i.allOf:[i],...c(a)?a.allOf:[a]];r.allOf=u},"intersectionProcessor"),tupleProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def;t.type="array";const a=n.target==="draft-2020-12"?"prefixItems":"items",c=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>process(g,n,{...o,path:[...o.path,a,h]})),l=i.rest?process(i.rest,n,{...o,path:[...o.path,c,...n.target==="openapi-3.0"?[i.items.length]:[]]}):null;n.target==="draft-2020-12"?(t.prefixItems=u,l&&(t.items=l)):n.target==="openapi-3.0"?(t.items={anyOf:u},l&&t.items.anyOf.push(l),t.minItems=u.length,l||(t.maxItems=u.length)):(t.items=u,l&&(t.additionalItems=l));const{minimum:d,maximum:f}=e._zod.bag;typeof d=="number"&&(t.minItems=d),typeof f=="number"&&(t.maxItems=f)},"tupleProcessor"),recordProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def;t.type="object",(n.target==="draft-07"||n.target==="draft-2020-12")&&(t.propertyNames=process(i.keyType,n,{...o,path:[...o.path,"propertyNames"]})),t.additionalProperties=process(i.valueType,n,{...o,path:[...o.path,"additionalProperties"]})},"recordProcessor"),nullableProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=process(t.innerType,n,o),a=n.seen.get(e);n.target==="openapi-3.0"?(a.ref=t.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},"nullableProcessor"),nonoptionalProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType},"nonoptionalProcessor"),defaultProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType,r.default=JSON.parse(JSON.stringify(t.defaultValue))},"defaultProcessor"),prefaultProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType,n.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},"prefaultProcessor"),catchProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),pipeProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=n.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;process(i,n,o);const a=n.seen.get(e);a.ref=i},"pipeProcessor"),readonlyProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType,r.readOnly=!0},"readonlyProcessor"),promiseProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType},"promiseProcessor"),optionalProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType},"optionalProcessor"),lazyProcessor=s((e,n,r,o)=>{const t=e._zod.innerType;process(t,n,o);const i=n.seen.get(e);i.ref=t},"lazyProcessor"),allProcessors={string:stringProcessor,number:numberProcessor,boolean:booleanProcessor,bigint:bigintProcessor,symbol:symbolProcessor,null:nullProcessor,undefined:undefinedProcessor,void:voidProcessor,never:neverProcessor,any:anyProcessor,unknown:unknownProcessor,date:dateProcessor,enum:enumProcessor,literal:literalProcessor,nan:nanProcessor,template_literal:templateLiteralProcessor,file:fileProcessor,success:successProcessor,custom:customProcessor,function:functionProcessor,transform:transformProcessor,map:mapProcessor,set:setProcessor,array:arrayProcessor,object:objectProcessor,union:unionProcessor,intersection:intersectionProcessor,tuple:tupleProcessor,record:recordProcessor,nullable:nullableProcessor,nonoptional:nonoptionalProcessor,default:defaultProcessor,prefault:prefaultProcessor,catch:catchProcessor,pipe:pipeProcessor,readonly:readonlyProcessor,promise:promiseProcessor,optional:optionalProcessor,lazy:lazyProcessor};function toJSONSchema(e,n){if("_idmap"in e){const o=e,t=initializeContext({...n,processors:allProcessors}),i={};for(const u of o._idmap.entries()){const[l,d]=u;process(d,t)}const a={},c={registry:o,uri:n?.uri,defs:i};t.external=c;for(const u of o._idmap.entries()){const[l,d]=u;extractDefs(t,d),a[l]=finalize(t,d)}if(Object.keys(i).length>0){const u=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:i}}return{schemas:a}}const r=initializeContext({...n,processors:allProcessors});return process(e,r),extractDefs(r,e),finalize(r,e)}s(toJSONSchema,"toJSONSchema");const mt=class mt{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(n){this.ctx.counter=n}get seen(){return this.ctx.seen}constructor(n){let r=n?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=initializeContext({processors:allProcessors,target:r,...n?.metadata&&{metadata:n.metadata},...n?.unrepresentable&&{unrepresentable:n.unrepresentable},...n?.override&&{override:n.override},...n?.io&&{io:n.io}})}process(n,r={path:[],schemaPath:[]}){return process(n,this.ctx,r)}emit(n,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),extractDefs(this.ctx,n);const o=finalize(this.ctx,n),{"~standard":t,...i}=o;return i}};s(mt,"JSONSchemaGenerator");let JSONSchemaGenerator=mt;const jsonSchema=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),index=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny,$ZodArray,$ZodAsyncError,$ZodBase64,$ZodBase64URL,$ZodBigInt,$ZodBigIntFormat,$ZodBoolean,$ZodCIDRv4,$ZodCIDRv6,$ZodCUID,$ZodCUID2,$ZodCatch,$ZodCheck,$ZodCheckBigIntFormat,$ZodCheckEndsWith,$ZodCheckGreaterThan,$ZodCheckIncludes,$ZodCheckLengthEquals,$ZodCheckLessThan,$ZodCheckLowerCase,$ZodCheckMaxLength,$ZodCheckMaxSize,$ZodCheckMimeType,$ZodCheckMinLength,$ZodCheckMinSize,$ZodCheckMultipleOf,$ZodCheckNumberFormat,$ZodCheckOverwrite,$ZodCheckProperty,$ZodCheckRegex,$ZodCheckSizeEquals,$ZodCheckStartsWith,$ZodCheckStringFormat,$ZodCheckUpperCase,$ZodCodec,$ZodCustom,$ZodCustomStringFormat,$ZodDate,$ZodDefault,$ZodDiscriminatedUnion,$ZodE164,$ZodEmail,$ZodEmoji,$ZodEncodeError,$ZodEnum,$ZodError,$ZodFile,$ZodFunction,$ZodGUID,$ZodIPv4,$ZodIPv6,$ZodISODate,$ZodISODateTime,$ZodISODuration,$ZodISOTime,$ZodIntersection,$ZodJWT,$ZodKSUID,$ZodLazy,$ZodLiteral,$ZodMAC,$ZodMap,$ZodNaN,$ZodNanoID,$ZodNever,$ZodNonOptional,$ZodNull,$ZodNullable,$ZodNumber,$ZodNumberFormat,$ZodObject,$ZodObjectJIT,$ZodOptional,$ZodPipe,$ZodPrefault,$ZodPromise,$ZodReadonly,$ZodRealError,$ZodRecord,$ZodRegistry,$ZodSet,$ZodString,$ZodStringFormat,$ZodSuccess,$ZodSymbol,$ZodTemplateLiteral,$ZodTransform,$ZodTuple,$ZodType,$ZodULID,$ZodURL,$ZodUUID,$ZodUndefined,$ZodUnion,$ZodUnknown,$ZodVoid,$ZodXID,$ZodXor,$brand,$constructor,$input,$output,Doc,JSONSchema:jsonSchema,JSONSchemaGenerator,NEVER,TimePrecision,_any,_array,_base64,_base64url,_bigint,_boolean,_catch:_catch$1,_check,_cidrv4,_cidrv6,_coercedBigint,_coercedBoolean,_coercedDate,_coercedNumber,_coercedString,_cuid,_cuid2,_custom,_date,_decode,_decodeAsync,_default:_default$1,_discriminatedUnion,_e164,_email,_emoji,_encode,_encodeAsync,_endsWith,_enum:_enum$1,_file,_float32,_float64,_gt,_gte,_guid,_includes,_int,_int32,_int64,_intersection,_ipv4,_ipv6,_isoDate,_isoDateTime,_isoDuration,_isoTime,_jwt,_ksuid,_lazy,_length,_literal,_lowercase,_lt,_lte,_mac,_map,_max:_lte,_maxLength,_maxSize,_mime,_min:_gte,_minLength,_minSize,_multipleOf,_nan,_nanoid,_nativeEnum,_negative,_never,_nonnegative,_nonoptional,_nonpositive,_normalize,_null:_null$1,_nullable,_number,_optional,_overwrite,_parse,_parseAsync,_pipe,_positive,_promise,_property,_readonly,_record,_refine,_regex,_safeDecode,_safeDecodeAsync,_safeEncode,_safeEncodeAsync,_safeParse,_safeParseAsync,_set,_size,_slugify,_startsWith,_string,_stringFormat,_stringbool,_success,_superRefine,_symbol,_templateLiteral,_toLowerCase,_toUpperCase,_transform,_trim,_tuple,_uint32,_uint64,_ulid,_undefined:_undefined$1,_union,_unknown,_uppercase,_url,_uuid,_uuidv4,_uuidv6,_uuidv7,_void:_void$1,_xid,_xor,clone,config,createStandardJSONSchemaMethod,createToJSONSchemaMethod,decode:decode$1,decodeAsync:decodeAsync$1,describe:describe$1,encode:encode$1,encodeAsync:encodeAsync$1,extractDefs,finalize,flattenError,formatError,globalConfig,globalRegistry,initializeContext,isValidBase64,isValidBase64URL,isValidJWT,locales:index$1,meta:meta$1,parse:parse$1,parseAsync:parseAsync$1,prettifyError,process,regexes,registry,safeDecode:safeDecode$1,safeDecodeAsync:safeDecodeAsync$1,safeEncode:safeEncode$1,safeEncodeAsync:safeEncodeAsync$1,safeParse:safeParse$1,safeParseAsync:safeParseAsync$1,toDotPath,toJSONSchema,treeifyError,util,version},Symbol.toStringTag,{value:"Module"})),_checks=Object.freeze(Object.defineProperty({__proto__:null,endsWith:_endsWith,gt:_gt,gte:_gte,includes:_includes,length:_length,lowercase:_lowercase,lt:_lt,lte:_lte,maxLength:_maxLength,maxSize:_maxSize,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,negative:_negative,nonnegative:_nonnegative,nonpositive:_nonpositive,normalize:_normalize,overwrite:_overwrite,positive:_positive,property:_property,regex:_regex,size:_size,slugify:_slugify,startsWith:_startsWith,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,trim:_trim,uppercase:_uppercase},Symbol.toStringTag,{value:"Module"})),ZodISODateTime=$constructor("ZodISODateTime",(e,n)=>{$ZodISODateTime.init(e,n),ZodStringFormat.init(e,n)});function datetime(e){return _isoDateTime(ZodISODateTime,e)}s(datetime,"datetime");const ZodISODate=$constructor("ZodISODate",(e,n)=>{$ZodISODate.init(e,n),ZodStringFormat.init(e,n)});function date$2(e){return _isoDate(ZodISODate,e)}s(date$2,"date$2");const ZodISOTime=$constructor("ZodISOTime",(e,n)=>{$ZodISOTime.init(e,n),ZodStringFormat.init(e,n)});function time(e){return _isoTime(ZodISOTime,e)}s(time,"time");const ZodISODuration=$constructor("ZodISODuration",(e,n)=>{$ZodISODuration.init(e,n),ZodStringFormat.init(e,n)});function duration(e){return _isoDuration(ZodISODuration,e)}s(duration,"duration");const _iso=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate,ZodISODateTime,ZodISODuration,ZodISOTime,date:date$2,datetime,duration,time},Symbol.toStringTag,{value:"Module"})),initializer=s((e,n)=>{$ZodError.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:s(r=>formatError(e,r),"value")},flatten:{value:s(r=>flattenError(e,r),"value")},addIssue:{value:s(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jsonStringifyReplacer,2)},"value")},addIssues:{value:s(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jsonStringifyReplacer,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),ZodError=$constructor("ZodError",initializer),ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor("ZodType",(e,n)=>($ZodType.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:createStandardJSONSchemaMethod(e,"input"),output:createStandardJSONSchemaMethod(e,"output")}}),e.toJSONSchema=createToJSONSchemaMethod(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone(mergeDefs(n,{checks:[...n.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>clone(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>parse(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>safeParse(e,r,o),e.parseAsync=async(r,o)=>parseAsync(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>safeParseAsync(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>encode(e,r,o),e.decode=(r,o)=>decode(e,r,o),e.encodeAsync=async(r,o)=>encodeAsync(e,r,o),e.decodeAsync=async(r,o)=>decodeAsync(e,r,o),e.safeEncode=(r,o)=>safeEncode(e,r,o),e.safeDecode=(r,o)=>safeDecode(e,r,o),e.safeEncodeAsync=async(r,o)=>safeEncodeAsync(e,r,o),e.safeDecodeAsync=async(r,o)=>safeDecodeAsync(e,r,o),e.refine=(r,o)=>e.check(refine(r,o)),e.superRefine=r=>e.check(superRefine(r)),e.overwrite=r=>e.check(_overwrite(r)),e.optional=()=>optional(e),e.nullable=()=>nullable(e),e.nullish=()=>optional(nullable(e)),e.nonoptional=r=>nonoptional(e,r),e.array=()=>array(e),e.or=r=>union([e,r]),e.and=r=>intersection(e,r),e.transform=r=>pipe(e,transform(r)),e.default=r=>_default(e,r),e.prefault=r=>prefault(e,r),e.catch=r=>_catch(e,r),e.pipe=r=>pipe(e,r),e.readonly=()=>readonly(e),e.describe=r=>{const o=e.clone();return globalRegistry.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return globalRegistry.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return globalRegistry.get(e);const o=e.clone();return globalRegistry.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),_ZodString=$constructor("_ZodString",(e,n)=>{$ZodString.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>stringProcessor(e,o,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(_regex(...o)),e.includes=(...o)=>e.check(_includes(...o)),e.startsWith=(...o)=>e.check(_startsWith(...o)),e.endsWith=(...o)=>e.check(_endsWith(...o)),e.min=(...o)=>e.check(_minLength(...o)),e.max=(...o)=>e.check(_maxLength(...o)),e.length=(...o)=>e.check(_length(...o)),e.nonempty=(...o)=>e.check(_minLength(1,...o)),e.lowercase=o=>e.check(_lowercase(o)),e.uppercase=o=>e.check(_uppercase(o)),e.trim=()=>e.check(_trim()),e.normalize=(...o)=>e.check(_normalize(...o)),e.toLowerCase=()=>e.check(_toLowerCase()),e.toUpperCase=()=>e.check(_toUpperCase()),e.slugify=()=>e.check(_slugify())}),ZodString=$constructor("ZodString",(e,n)=>{$ZodString.init(e,n),_ZodString.init(e,n),e.email=r=>e.check(_email(ZodEmail,r)),e.url=r=>e.check(_url(ZodURL,r)),e.jwt=r=>e.check(_jwt(ZodJWT,r)),e.emoji=r=>e.check(_emoji(ZodEmoji,r)),e.guid=r=>e.check(_guid(ZodGUID,r)),e.uuid=r=>e.check(_uuid(ZodUUID,r)),e.uuidv4=r=>e.check(_uuidv4(ZodUUID,r)),e.uuidv6=r=>e.check(_uuidv6(ZodUUID,r)),e.uuidv7=r=>e.check(_uuidv7(ZodUUID,r)),e.nanoid=r=>e.check(_nanoid(ZodNanoID,r)),e.guid=r=>e.check(_guid(ZodGUID,r)),e.cuid=r=>e.check(_cuid(ZodCUID,r)),e.cuid2=r=>e.check(_cuid2(ZodCUID2,r)),e.ulid=r=>e.check(_ulid(ZodULID,r)),e.base64=r=>e.check(_base64(ZodBase64,r)),e.base64url=r=>e.check(_base64url(ZodBase64URL,r)),e.xid=r=>e.check(_xid(ZodXID,r)),e.ksuid=r=>e.check(_ksuid(ZodKSUID,r)),e.ipv4=r=>e.check(_ipv4(ZodIPv4,r)),e.ipv6=r=>e.check(_ipv6(ZodIPv6,r)),e.cidrv4=r=>e.check(_cidrv4(ZodCIDRv4,r)),e.cidrv6=r=>e.check(_cidrv6(ZodCIDRv6,r)),e.e164=r=>e.check(_e164(ZodE164,r)),e.datetime=r=>e.check(datetime(r)),e.date=r=>e.check(date$2(r)),e.time=r=>e.check(time(r)),e.duration=r=>e.check(duration(r))});function string$1(e){return _string(ZodString,e)}s(string$1,"string$1");const ZodStringFormat=$constructor("ZodStringFormat",(e,n)=>{$ZodStringFormat.init(e,n),_ZodString.init(e,n)}),ZodEmail=$constructor("ZodEmail",(e,n)=>{$ZodEmail.init(e,n),ZodStringFormat.init(e,n)});function email(e){return _email(ZodEmail,e)}s(email,"email");const ZodGUID=$constructor("ZodGUID",(e,n)=>{$ZodGUID.init(e,n),ZodStringFormat.init(e,n)});function guid(e){return _guid(ZodGUID,e)}s(guid,"guid");const ZodUUID=$constructor("ZodUUID",(e,n)=>{$ZodUUID.init(e,n),ZodStringFormat.init(e,n)});function uuid(e){return _uuid(ZodUUID,e)}s(uuid,"uuid");function uuidv4(e){return _uuidv4(ZodUUID,e)}s(uuidv4,"uuidv4");function uuidv6(e){return _uuidv6(ZodUUID,e)}s(uuidv6,"uuidv6");function uuidv7(e){return _uuidv7(ZodUUID,e)}s(uuidv7,"uuidv7");const ZodURL=$constructor("ZodURL",(e,n)=>{$ZodURL.init(e,n),ZodStringFormat.init(e,n)});function url(e){return _url(ZodURL,e)}s(url,"url");function httpUrl(e){return _url(ZodURL,{protocol:/^https?$/,hostname:domain,...normalizeParams(e)})}s(httpUrl,"httpUrl");const ZodEmoji=$constructor("ZodEmoji",(e,n)=>{$ZodEmoji.init(e,n),ZodStringFormat.init(e,n)});function emoji(e){return _emoji(ZodEmoji,e)}s(emoji,"emoji");const ZodNanoID=$constructor("ZodNanoID",(e,n)=>{$ZodNanoID.init(e,n),ZodStringFormat.init(e,n)});function nanoid(e){return _nanoid(ZodNanoID,e)}s(nanoid,"nanoid");const ZodCUID=$constructor("ZodCUID",(e,n)=>{$ZodCUID.init(e,n),ZodStringFormat.init(e,n)});function cuid(e){return _cuid(ZodCUID,e)}s(cuid,"cuid");const ZodCUID2=$constructor("ZodCUID2",(e,n)=>{$ZodCUID2.init(e,n),ZodStringFormat.init(e,n)});function cuid2(e){return _cuid2(ZodCUID2,e)}s(cuid2,"cuid2");const ZodULID=$constructor("ZodULID",(e,n)=>{$ZodULID.init(e,n),ZodStringFormat.init(e,n)});function ulid(e){return _ulid(ZodULID,e)}s(ulid,"ulid");const ZodXID=$constructor("ZodXID",(e,n)=>{$ZodXID.init(e,n),ZodStringFormat.init(e,n)});function xid(e){return _xid(ZodXID,e)}s(xid,"xid");const ZodKSUID=$constructor("ZodKSUID",(e,n)=>{$ZodKSUID.init(e,n),ZodStringFormat.init(e,n)});function ksuid(e){return _ksuid(ZodKSUID,e)}s(ksuid,"ksuid");const ZodIPv4=$constructor("ZodIPv4",(e,n)=>{$ZodIPv4.init(e,n),ZodStringFormat.init(e,n)});function ipv4(e){return _ipv4(ZodIPv4,e)}s(ipv4,"ipv4");const ZodMAC=$constructor("ZodMAC",(e,n)=>{$ZodMAC.init(e,n),ZodStringFormat.init(e,n)});function mac(e){return _mac(ZodMAC,e)}s(mac,"mac");const ZodIPv6=$constructor("ZodIPv6",(e,n)=>{$ZodIPv6.init(e,n),ZodStringFormat.init(e,n)});function ipv6(e){return _ipv6(ZodIPv6,e)}s(ipv6,"ipv6");const ZodCIDRv4=$constructor("ZodCIDRv4",(e,n)=>{$ZodCIDRv4.init(e,n),ZodStringFormat.init(e,n)});function cidrv4(e){return _cidrv4(ZodCIDRv4,e)}s(cidrv4,"cidrv4");const ZodCIDRv6=$constructor("ZodCIDRv6",(e,n)=>{$ZodCIDRv6.init(e,n),ZodStringFormat.init(e,n)});function cidrv6(e){return _cidrv6(ZodCIDRv6,e)}s(cidrv6,"cidrv6");const ZodBase64=$constructor("ZodBase64",(e,n)=>{$ZodBase64.init(e,n),ZodStringFormat.init(e,n)});function base64(e){return _base64(ZodBase64,e)}s(base64,"base64");const ZodBase64URL=$constructor("ZodBase64URL",(e,n)=>{$ZodBase64URL.init(e,n),ZodStringFormat.init(e,n)});function base64url(e){return _base64url(ZodBase64URL,e)}s(base64url,"base64url");const ZodE164=$constructor("ZodE164",(e,n)=>{$ZodE164.init(e,n),ZodStringFormat.init(e,n)});function e164(e){return _e164(ZodE164,e)}s(e164,"e164");const ZodJWT=$constructor("ZodJWT",(e,n)=>{$ZodJWT.init(e,n),ZodStringFormat.init(e,n)});function jwt(e){return _jwt(ZodJWT,e)}s(jwt,"jwt");const ZodCustomStringFormat=$constructor("ZodCustomStringFormat",(e,n)=>{$ZodCustomStringFormat.init(e,n),ZodStringFormat.init(e,n)});function stringFormat(e,n,r={}){return _stringFormat(ZodCustomStringFormat,e,n,r)}s(stringFormat,"stringFormat");function hostname(e){return _stringFormat(ZodCustomStringFormat,"hostname",hostname$1,e)}s(hostname,"hostname");function hex(e){return _stringFormat(ZodCustomStringFormat,"hex",hex$1,e)}s(hex,"hex");function hash(e,n){const r=n?.enc??"hex",o=`${e}_${r}`,t=regexes[o];if(!t)throw new Error(`Unrecognized hash format: ${o}`);return _stringFormat(ZodCustomStringFormat,o,t,n)}s(hash,"hash");const ZodNumber=$constructor("ZodNumber",(e,n)=>{$ZodNumber.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>numberProcessor(e,o,t),e.gt=(o,t)=>e.check(_gt(o,t)),e.gte=(o,t)=>e.check(_gte(o,t)),e.min=(o,t)=>e.check(_gte(o,t)),e.lt=(o,t)=>e.check(_lt(o,t)),e.lte=(o,t)=>e.check(_lte(o,t)),e.max=(o,t)=>e.check(_lte(o,t)),e.int=o=>e.check(int(o)),e.safe=o=>e.check(int(o)),e.positive=o=>e.check(_gt(0,o)),e.nonnegative=o=>e.check(_gte(0,o)),e.negative=o=>e.check(_lt(0,o)),e.nonpositive=o=>e.check(_lte(0,o)),e.multipleOf=(o,t)=>e.check(_multipleOf(o,t)),e.step=(o,t)=>e.check(_multipleOf(o,t)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function number$1(e){return _number(ZodNumber,e)}s(number$1,"number$1");const ZodNumberFormat=$constructor("ZodNumberFormat",(e,n)=>{$ZodNumberFormat.init(e,n),ZodNumber.init(e,n)});function int(e){return _int(ZodNumberFormat,e)}s(int,"int");function float32(e){return _float32(ZodNumberFormat,e)}s(float32,"float32");function float64(e){return _float64(ZodNumberFormat,e)}s(float64,"float64");function int32(e){return _int32(ZodNumberFormat,e)}s(int32,"int32");function uint32(e){return _uint32(ZodNumberFormat,e)}s(uint32,"uint32");const ZodBoolean=$constructor("ZodBoolean",(e,n)=>{$ZodBoolean.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>booleanProcessor(e,r,o)});function boolean$1(e){return _boolean(ZodBoolean,e)}s(boolean$1,"boolean$1");const ZodBigInt=$constructor("ZodBigInt",(e,n)=>{$ZodBigInt.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>bigintProcessor(e,o),e.gte=(o,t)=>e.check(_gte(o,t)),e.min=(o,t)=>e.check(_gte(o,t)),e.gt=(o,t)=>e.check(_gt(o,t)),e.gte=(o,t)=>e.check(_gte(o,t)),e.min=(o,t)=>e.check(_gte(o,t)),e.lt=(o,t)=>e.check(_lt(o,t)),e.lte=(o,t)=>e.check(_lte(o,t)),e.max=(o,t)=>e.check(_lte(o,t)),e.positive=o=>e.check(_gt(BigInt(0),o)),e.negative=o=>e.check(_lt(BigInt(0),o)),e.nonpositive=o=>e.check(_lte(BigInt(0),o)),e.nonnegative=o=>e.check(_gte(BigInt(0),o)),e.multipleOf=(o,t)=>e.check(_multipleOf(o,t));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function bigint$1(e){return _bigint(ZodBigInt,e)}s(bigint$1,"bigint$1");const ZodBigIntFormat=$constructor("ZodBigIntFormat",(e,n)=>{$ZodBigIntFormat.init(e,n),ZodBigInt.init(e,n)});function int64(e){return _int64(ZodBigIntFormat,e)}s(int64,"int64");function uint64(e){return _uint64(ZodBigIntFormat,e)}s(uint64,"uint64");const ZodSymbol=$constructor("ZodSymbol",(e,n)=>{$ZodSymbol.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>symbolProcessor(e,r)});function symbol(e){return _symbol(ZodSymbol,e)}s(symbol,"symbol");const ZodUndefined=$constructor("ZodUndefined",(e,n)=>{$ZodUndefined.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>undefinedProcessor(e,r)});function _undefined(e){return _undefined$1(ZodUndefined,e)}s(_undefined,"_undefined");const ZodNull=$constructor("ZodNull",(e,n)=>{$ZodNull.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nullProcessor(e,r,o)});function _null(e){return _null$1(ZodNull,e)}s(_null,"_null");const ZodAny=$constructor("ZodAny",(e,n)=>{$ZodAny.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>anyProcessor()});function any(){return _any(ZodAny)}s(any,"any");const ZodUnknown=$constructor("ZodUnknown",(e,n)=>{$ZodUnknown.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>unknownProcessor()});function unknown(){return _unknown(ZodUnknown)}s(unknown,"unknown");const ZodNever=$constructor("ZodNever",(e,n)=>{$ZodNever.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>neverProcessor(e,r,o)});function never(e){return _never(ZodNever,e)}s(never,"never");const ZodVoid=$constructor("ZodVoid",(e,n)=>{$ZodVoid.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>voidProcessor(e,r)});function _void(e){return _void$1(ZodVoid,e)}s(_void,"_void");const ZodDate=$constructor("ZodDate",(e,n)=>{$ZodDate.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>dateProcessor(e,o),e.min=(o,t)=>e.check(_gte(o,t)),e.max=(o,t)=>e.check(_lte(o,t));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function date$1(e){return _date(ZodDate,e)}s(date$1,"date$1");const ZodArray=$constructor("ZodArray",(e,n)=>{$ZodArray.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>arrayProcessor(e,r,o,t),e.element=n.element,e.min=(r,o)=>e.check(_minLength(r,o)),e.nonempty=r=>e.check(_minLength(1,r)),e.max=(r,o)=>e.check(_maxLength(r,o)),e.length=(r,o)=>e.check(_length(r,o)),e.unwrap=()=>e.element});function array(e,n){return _array(ZodArray,e,n)}s(array,"array");function keyof(e){const n=e._zod.def.shape;return _enum(Object.keys(n))}s(keyof,"keyof");const ZodObject=$constructor("ZodObject",(e,n)=>{$ZodObjectJIT.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>objectProcessor(e,r,o,t),defineLazy(e,"shape",()=>n.shape),e.keyof=()=>_enum(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:unknown()}),e.loose=()=>e.clone({...e._zod.def,catchall:unknown()}),e.strict=()=>e.clone({...e._zod.def,catchall:never()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>extend(e,r),e.safeExtend=r=>safeExtend(e,r),e.merge=r=>merge(e,r),e.pick=r=>pick(e,r),e.omit=r=>omit(e,r),e.partial=(...r)=>partial(ZodOptional,e,r[0]),e.required=(...r)=>required(ZodNonOptional,e,r[0])});function object(e,n){const r={type:"object",shape:e??{},...normalizeParams(n)};return new ZodObject(r)}s(object,"object");function strictObject(e,n){return new ZodObject({type:"object",shape:e,catchall:never(),...normalizeParams(n)})}s(strictObject,"strictObject");function looseObject(e,n){return new ZodObject({type:"object",shape:e,catchall:unknown(),...normalizeParams(n)})}s(looseObject,"looseObject");const ZodUnion=$constructor("ZodUnion",(e,n)=>{$ZodUnion.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>unionProcessor(e,r,o,t),e.options=n.options});function union(e,n){return new ZodUnion({type:"union",options:e,...normalizeParams(n)})}s(union,"union");const ZodXor=$constructor("ZodXor",(e,n)=>{ZodUnion.init(e,n),$ZodXor.init(e,n),e._zod.processJSONSchema=(r,o,t)=>unionProcessor(e,r,o,t),e.options=n.options});function xor(e,n){return new ZodXor({type:"union",options:e,inclusive:!1,...normalizeParams(n)})}s(xor,"xor");const ZodDiscriminatedUnion=$constructor("ZodDiscriminatedUnion",(e,n)=>{ZodUnion.init(e,n),$ZodDiscriminatedUnion.init(e,n)});function discriminatedUnion(e,n,r){return new ZodDiscriminatedUnion({type:"union",options:n,discriminator:e,...normalizeParams(r)})}s(discriminatedUnion,"discriminatedUnion");const ZodIntersection=$constructor("ZodIntersection",(e,n)=>{$ZodIntersection.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>intersectionProcessor(e,r,o,t)});function intersection(e,n){return new ZodIntersection({type:"intersection",left:e,right:n})}s(intersection,"intersection");const ZodTuple=$constructor("ZodTuple",(e,n)=>{$ZodTuple.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>tupleProcessor(e,r,o,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function tuple(e,n,r){const o=n instanceof $ZodType,t=o?r:n,i=o?n:null;return new ZodTuple({type:"tuple",items:e,rest:i,...normalizeParams(t)})}s(tuple,"tuple");const ZodRecord=$constructor("ZodRecord",(e,n)=>{$ZodRecord.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>recordProcessor(e,r,o,t),e.keyType=n.keyType,e.valueType=n.valueType});function record(e,n,r){return new ZodRecord({type:"record",keyType:e,valueType:n,...normalizeParams(r)})}s(record,"record");function partialRecord(e,n,r){const o=clone(e);return o._zod.values=void 0,new ZodRecord({type:"record",keyType:o,valueType:n,...normalizeParams(r)})}s(partialRecord,"partialRecord");function looseRecord(e,n,r){return new ZodRecord({type:"record",keyType:e,valueType:n,mode:"loose",...normalizeParams(r)})}s(looseRecord,"looseRecord");const ZodMap=$constructor("ZodMap",(e,n)=>{$ZodMap.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>mapProcessor(e,r),e.keyType=n.keyType,e.valueType=n.valueType});function map(e,n,r){return new ZodMap({type:"map",keyType:e,valueType:n,...normalizeParams(r)})}s(map,"map");const ZodSet=$constructor("ZodSet",(e,n)=>{$ZodSet.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>setProcessor(e,r),e.min=(...r)=>e.check(_minSize(...r)),e.nonempty=r=>e.check(_minSize(1,r)),e.max=(...r)=>e.check(_maxSize(...r)),e.size=(...r)=>e.check(_size(...r))});function set(e,n){return new ZodSet({type:"set",valueType:e,...normalizeParams(n)})}s(set,"set");const ZodEnum=$constructor("ZodEnum",(e,n)=>{$ZodEnum.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>enumProcessor(e,o,t),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(o,t)=>{const i={};for(const a of o)if(r.has(a))i[a]=n.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ZodEnum({...n,checks:[],...normalizeParams(t),entries:i})},e.exclude=(o,t)=>{const i={...n.entries};for(const a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ZodEnum({...n,checks:[],...normalizeParams(t),entries:i})}});function _enum(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ZodEnum({type:"enum",entries:r,...normalizeParams(n)})}s(_enum,"_enum");function nativeEnum(e,n){return new ZodEnum({type:"enum",entries:e,...normalizeParams(n)})}s(nativeEnum,"nativeEnum");const ZodLiteral=$constructor("ZodLiteral",(e,n)=>{$ZodLiteral.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>literalProcessor(e,r,o),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function literal(e,n){return new ZodLiteral({type:"literal",values:Array.isArray(e)?e:[e],...normalizeParams(n)})}s(literal,"literal");const ZodFile=$constructor("ZodFile",(e,n)=>{$ZodFile.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>fileProcessor(e,r,o),e.min=(r,o)=>e.check(_minSize(r,o)),e.max=(r,o)=>e.check(_maxSize(r,o)),e.mime=(r,o)=>e.check(_mime(Array.isArray(r)?r:[r],o))});function file(e){return _file(ZodFile,e)}s(file,"file");const ZodTransform=$constructor("ZodTransform",(e,n)=>{$ZodTransform.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>transformProcessor(e,r),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $ZodEncodeError(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(issue(i,r.value,n));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(issue(a))}};const t=n.transform(r.value,r);return t instanceof Promise?t.then(i=>(r.value=i,r)):(r.value=t,r)}});function transform(e){return new ZodTransform({type:"transform",transform:e})}s(transform,"transform");const ZodOptional=$constructor("ZodOptional",(e,n)=>{$ZodOptional.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>optionalProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function optional(e){return new ZodOptional({type:"optional",innerType:e})}s(optional,"optional");const ZodNullable=$constructor("ZodNullable",(e,n)=>{$ZodNullable.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nullableProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function nullable(e){return new ZodNullable({type:"nullable",innerType:e})}s(nullable,"nullable");function nullish(e){return optional(nullable(e))}s(nullish,"nullish");const ZodDefault=$constructor("ZodDefault",(e,n)=>{$ZodDefault.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>defaultProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _default(e,n){return new ZodDefault({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():shallowClone(n)}})}s(_default,"_default");const ZodPrefault=$constructor("ZodPrefault",(e,n)=>{$ZodPrefault.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>prefaultProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function prefault(e,n){return new ZodPrefault({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():shallowClone(n)}})}s(prefault,"prefault");const ZodNonOptional=$constructor("ZodNonOptional",(e,n)=>{$ZodNonOptional.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nonoptionalProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function nonoptional(e,n){return new ZodNonOptional({type:"nonoptional",innerType:e,...normalizeParams(n)})}s(nonoptional,"nonoptional");const ZodSuccess=$constructor("ZodSuccess",(e,n)=>{$ZodSuccess.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>successProcessor(e,r,o),e.unwrap=()=>e._zod.def.innerType});function success(e){return new ZodSuccess({type:"success",innerType:e})}s(success,"success");const ZodCatch=$constructor("ZodCatch",(e,n)=>{$ZodCatch.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>catchProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _catch(e,n){return new ZodCatch({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}s(_catch,"_catch");const ZodNaN=$constructor("ZodNaN",(e,n)=>{$ZodNaN.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nanProcessor(e,r)});function nan(e){return _nan(ZodNaN,e)}s(nan,"nan");const ZodPipe=$constructor("ZodPipe",(e,n)=>{$ZodPipe.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>pipeProcessor(e,r,o,t),e.in=n.in,e.out=n.out});function pipe(e,n){return new ZodPipe({type:"pipe",in:e,out:n})}s(pipe,"pipe");const ZodCodec=$constructor("ZodCodec",(e,n)=>{ZodPipe.init(e,n),$ZodCodec.init(e,n)});function codec(e,n,r){return new ZodCodec({type:"pipe",in:e,out:n,transform:r.decode,reverseTransform:r.encode})}s(codec,"codec");const ZodReadonly=$constructor("ZodReadonly",(e,n)=>{$ZodReadonly.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>readonlyProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function readonly(e){return new ZodReadonly({type:"readonly",innerType:e})}s(readonly,"readonly");const ZodTemplateLiteral=$constructor("ZodTemplateLiteral",(e,n)=>{$ZodTemplateLiteral.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>templateLiteralProcessor(e,r,o)});function templateLiteral(e,n){return new ZodTemplateLiteral({type:"template_literal",parts:e,...normalizeParams(n)})}s(templateLiteral,"templateLiteral");const ZodLazy=$constructor("ZodLazy",(e,n)=>{$ZodLazy.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>lazyProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.getter()});function lazy(e){return new ZodLazy({type:"lazy",getter:e})}s(lazy,"lazy");const ZodPromise=$constructor("ZodPromise",(e,n)=>{$ZodPromise.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>promiseProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function promise(e){return new ZodPromise({type:"promise",innerType:e})}s(promise,"promise");const ZodFunction=$constructor("ZodFunction",(e,n)=>{$ZodFunction.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>functionProcessor(e,r)});function _function(e){return new ZodFunction({type:"function",input:Array.isArray(e?.input)?tuple(e?.input):e?.input??array(unknown()),output:e?.output??unknown()})}s(_function,"_function");const ZodCustom=$constructor("ZodCustom",(e,n)=>{$ZodCustom.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>customProcessor(e,r)});function check(e){const n=new $ZodCheck({check:"custom"});return n._zod.check=e,n}s(check,"check");function custom(e,n){return _custom(ZodCustom,e??(()=>!0),n)}s(custom,"custom");function refine(e,n={}){return _refine(ZodCustom,e,n)}s(refine,"refine");function superRefine(e){return _superRefine(e)}s(superRefine,"superRefine");const describe=describe$1,meta=meta$1;function _instanceof(e,n={error:`Input not instance of ${e.name}`}){const r=new ZodCustom({type:"custom",check:"custom",fn:s(o=>o instanceof e,"fn"),abort:!0,...normalizeParams(n)});return r._zod.bag.Class=e,r}s(_instanceof,"_instanceof");const stringbool=s((...e)=>_stringbool({Codec:ZodCodec,Boolean:ZodBoolean,String:ZodString},...e),"stringbool");function json(e){const n=lazy(()=>union([string$1(e),number$1(),boolean$1(),_null(),array(n),record(string$1(),n)]));return n}s(json,"json");function preprocess(e,n){return pipe(transform(e),n)}s(preprocess,"preprocess");const _schemas=Object.freeze(Object.defineProperty({__proto__:null,ZodAny,ZodArray,ZodBase64,ZodBase64URL,ZodBigInt,ZodBigIntFormat,ZodBoolean,ZodCIDRv4,ZodCIDRv6,ZodCUID,ZodCUID2,ZodCatch,ZodCodec,ZodCustom,ZodCustomStringFormat,ZodDate,ZodDefault,ZodDiscriminatedUnion,ZodE164,ZodEmail,ZodEmoji,ZodEnum,ZodFile,ZodFunction,ZodGUID,ZodIPv4,ZodIPv6,ZodIntersection,ZodJWT,ZodKSUID,ZodLazy,ZodLiteral,ZodMAC,ZodMap,ZodNaN,ZodNanoID,ZodNever,ZodNonOptional,ZodNull,ZodNullable,ZodNumber,ZodNumberFormat,ZodObject,ZodOptional,ZodPipe,ZodPrefault,ZodPromise,ZodReadonly,ZodRecord,ZodSet,ZodString,ZodStringFormat,ZodSuccess,ZodSymbol,ZodTemplateLiteral,ZodTransform,ZodTuple,ZodType,ZodULID,ZodURL,ZodUUID,ZodUndefined,ZodUnion,ZodUnknown,ZodVoid,ZodXID,ZodXor,_ZodString,_default,_function,any,array,base64,base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check,cidrv4,cidrv6,codec,cuid,cuid2,custom,date:date$1,describe,discriminatedUnion,e164,email,emoji,enum:_enum,file,float32,float64,function:_function,guid,hash,hex,hostname,httpUrl,instanceof:_instanceof,int,int32,int64,intersection,ipv4,ipv6,json,jwt,keyof,ksuid,lazy,literal,looseObject,looseRecord,mac,map,meta,nan,nanoid,nativeEnum,never,nonoptional,null:_null,nullable,nullish,number:number$1,object,optional,partialRecord,pipe,prefault,preprocess,promise,readonly,record,refine,set,strictObject,string:string$1,stringFormat,stringbool,success,superRefine,symbol,templateLiteral,transform,tuple,uint32,uint64,ulid,undefined:_undefined,union,unknown,url,uuid,uuidv4,uuidv6,uuidv7,void:_void,xid,xor},Symbol.toStringTag,{value:"Module"})),ZodIssueCode={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 setErrorMap(e){config({customError:e})}s(setErrorMap,"setErrorMap");function getErrorMap(){return config().customError}s(getErrorMap,"getErrorMap");var ZodFirstPartyTypeKind;ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={});const z$1={..._schemas,..._checks,iso:_iso};function detectVersion(e,n){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":n??"draft-2020-12"}s(detectVersion,"detectVersion");function resolveRef(e,n){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return n.rootSchema;const o=n.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){const t=r[1];if(!t||!n.defs[t])throw new Error(`Reference not found: ${e}`);return n.defs[t]}throw new Error(`Reference not found: ${e}`)}s(resolveRef,"resolveRef");function convertBaseSchema(e,n){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return z$1.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const t=e.$ref;if(n.refs.has(t))return n.refs.get(t);if(n.processing.has(t))return z$1.lazy(()=>{if(!n.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return n.refs.get(t)});n.processing.add(t);const i=resolveRef(t,n),a=convertSchema(i,n);return n.refs.set(t,a),n.processing.delete(t),a}if(e.enum!==void 0){const t=e.enum;if(n.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return z$1.null();if(t.length===0)return z$1.never();if(t.length===1)return z$1.literal(t[0]);if(t.every(a=>typeof a=="string"))return z$1.enum(t);const i=t.map(a=>z$1.literal(a));return i.length<2?i[0]:z$1.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return z$1.literal(e.const);const r=e.type;if(Array.isArray(r)){const t=r.map(i=>{const a={...e,type:i};return convertBaseSchema(a,n)});return t.length===0?z$1.never():t.length===1?t[0]:z$1.union(t)}if(!r)return z$1.any();let o;switch(r){case"string":{let t=z$1.string();if(e.format){const i=e.format;i==="email"?t=t.check(z$1.email()):i==="uri"||i==="uri-reference"?t=t.check(z$1.url()):i==="uuid"||i==="guid"?t=t.check(z$1.uuid()):i==="date-time"?t=t.check(z$1.iso.datetime()):i==="date"?t=t.check(z$1.iso.date()):i==="time"?t=t.check(z$1.iso.time()):i==="duration"?t=t.check(z$1.iso.duration()):i==="ipv4"?t=t.check(z$1.ipv4()):i==="ipv6"?t=t.check(z$1.ipv6()):i==="mac"?t=t.check(z$1.mac()):i==="cidr"?t=t.check(z$1.cidrv4()):i==="cidr-v6"?t=t.check(z$1.cidrv6()):i==="base64"?t=t.check(z$1.base64()):i==="base64url"?t=t.check(z$1.base64url()):i==="e164"?t=t.check(z$1.e164()):i==="jwt"?t=t.check(z$1.jwt()):i==="emoji"?t=t.check(z$1.emoji()):i==="nanoid"?t=t.check(z$1.nanoid()):i==="cuid"?t=t.check(z$1.cuid()):i==="cuid2"?t=t.check(z$1.cuid2()):i==="ulid"?t=t.check(z$1.ulid()):i==="xid"?t=t.check(z$1.xid()):i==="ksuid"&&(t=t.check(z$1.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),o=t;break}case"number":case"integer":{let t=r==="integer"?z$1.number().int():z$1.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),o=t;break}case"boolean":{o=z$1.boolean();break}case"null":{o=z$1.null();break}case"object":{const t={},i=e.properties||{},a=new Set(e.required||[]);for(const[u,l]of Object.entries(i)){const d=convertSchema(l,n);t[u]=a.has(u)?d:d.optional()}if(e.propertyNames){const u=convertSchema(e.propertyNames,n),l=e.additionalProperties&&typeof e.additionalProperties=="object"?convertSchema(e.additionalProperties,n):z$1.any();if(Object.keys(t).length===0){o=z$1.record(u,l);break}const d=z$1.object(t).passthrough(),f=z$1.looseRecord(u,l);o=z$1.intersection(d,f);break}if(e.patternProperties){const u=e.patternProperties,l=Object.keys(u),d=[];for(const g of l){const h=convertSchema(u[g],n),$=z$1.string().regex(new RegExp(g));d.push(z$1.looseRecord($,h))}const f=[];if(Object.keys(t).length>0&&f.push(z$1.object(t).passthrough()),f.push(...d),f.length===0)o=z$1.object({}).passthrough();else if(f.length===1)o=f[0];else{let g=z$1.intersection(f[0],f[1]);for(let h=2;h<f.length;h++)g=z$1.intersection(g,f[h]);o=g}break}const c=z$1.object(t);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(convertSchema(e.additionalProperties,n)):o=c.passthrough();break}case"array":{const t=e.prefixItems,i=e.items;if(t&&Array.isArray(t)){const a=t.map(u=>convertSchema(u,n)),c=i&&typeof i=="object"&&!Array.isArray(i)?convertSchema(i,n):void 0;c?o=z$1.tuple(a).rest(c):o=z$1.tuple(a),typeof e.minItems=="number"&&(o=o.check(z$1.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(z$1.maxLength(e.maxItems)))}else if(Array.isArray(i)){const a=i.map(u=>convertSchema(u,n)),c=e.additionalItems&&typeof e.additionalItems=="object"?convertSchema(e.additionalItems,n):void 0;c?o=z$1.tuple(a).rest(c):o=z$1.tuple(a),typeof e.minItems=="number"&&(o=o.check(z$1.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(z$1.maxLength(e.maxItems)))}else if(i!==void 0){const a=convertSchema(i,n);let c=z$1.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=z$1.array(z$1.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}s(convertBaseSchema,"convertBaseSchema");function convertSchema(e,n){if(typeof e=="boolean")return e?z$1.any():z$1.never();let r=convertBaseSchema(e,n);const o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const t=e.anyOf.map(a=>convertSchema(a,n)),i=z$1.union(t);r=o?z$1.intersection(r,i):i}if(e.oneOf&&Array.isArray(e.oneOf)){const t=e.oneOf.map(a=>convertSchema(a,n)),i=z$1.xor(t);r=o?z$1.intersection(r,i):i}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:z$1.any();else{let t=o?r:convertSchema(e.allOf[0],n);const i=o?0:1;for(let a=i;a<e.allOf.length;a++)t=z$1.intersection(t,convertSchema(e.allOf[a],n));r=t}return e.nullable===!0&&n.version==="openapi-3.0"&&(r=z$1.nullable(r)),e.readOnly===!0&&(r=z$1.readonly(r)),r}s(convertSchema,"convertSchema");function fromJSONSchema(e,n){if(typeof e=="boolean")return e?z$1.any():z$1.never();const r=detectVersion(e,n?.defaultTarget),o=e.$defs||e.definitions||{};return convertSchema(e,{version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e})}s(fromJSONSchema,"fromJSONSchema");function string(e){return _coercedString(ZodString,e)}s(string,"string");function number(e){return _coercedNumber(ZodNumber,e)}s(number,"number");function boolean(e){return _coercedBoolean(ZodBoolean,e)}s(boolean,"boolean");function bigint(e){return _coercedBigint(ZodBigInt,e)}s(bigint,"bigint");function date(e){return _coercedDate(ZodDate,e)}s(date,"date");const coerce=Object.freeze(Object.defineProperty({__proto__:null,bigint,boolean,date,number,string},Symbol.toStringTag,{value:"Module"}));config(en());const z=Object.freeze(Object.defineProperty({__proto__:null,$brand,$input,$output,NEVER,TimePrecision,ZodAny,ZodArray,ZodBase64,ZodBase64URL,ZodBigInt,ZodBigIntFormat,ZodBoolean,ZodCIDRv4,ZodCIDRv6,ZodCUID,ZodCUID2,ZodCatch,ZodCodec,ZodCustom,ZodCustomStringFormat,ZodDate,ZodDefault,ZodDiscriminatedUnion,ZodE164,ZodEmail,ZodEmoji,ZodEnum,ZodError,ZodFile,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},ZodFunction,ZodGUID,ZodIPv4,ZodIPv6,ZodISODate,ZodISODateTime,ZodISODuration,ZodISOTime,ZodIntersection,ZodIssueCode,ZodJWT,ZodKSUID,ZodLazy,ZodLiteral,ZodMAC,ZodMap,ZodNaN,ZodNanoID,ZodNever,ZodNonOptional,ZodNull,ZodNullable,ZodNumber,ZodNumberFormat,ZodObject,ZodOptional,ZodPipe,ZodPrefault,ZodPromise,ZodReadonly,ZodRealError,ZodRecord,ZodSet,ZodString,ZodStringFormat,ZodSuccess,ZodSymbol,ZodTemplateLiteral,ZodTransform,ZodTuple,ZodType,ZodULID,ZodURL,ZodUUID,ZodUndefined,ZodUnion,ZodUnknown,ZodVoid,ZodXID,ZodXor,_ZodString,_default,_function,any,array,base64,base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core:index,cuid,cuid2,custom,date:date$1,decode,decodeAsync,describe,discriminatedUnion,e164,email,emoji,encode,encodeAsync,endsWith:_endsWith,enum:_enum,file,flattenError,float32,float64,formatError,fromJSONSchema,function:_function,getErrorMap,globalRegistry,gt:_gt,gte:_gte,guid,hash,hex,hostname,httpUrl,includes:_includes,instanceof:_instanceof,int,int32,int64,intersection,ipv4,ipv6,iso:_iso,json,jwt,keyof,ksuid,lazy,length:_length,literal,locales:index$1,looseObject,looseRecord,lowercase:_lowercase,lt:_lt,lte:_lte,mac,map,maxLength:_maxLength,maxSize:_maxSize,meta,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,nan,nanoid,nativeEnum,negative:_negative,never,nonnegative:_nonnegative,nonoptional,nonpositive:_nonpositive,normalize:_normalize,null:_null,nullable,nullish,number:number$1,object,optional,overwrite:_overwrite,parse,parseAsync,partialRecord,pipe,positive:_positive,prefault,preprocess,prettifyError,promise,property:_property,readonly,record,refine,regex:_regex,regexes,registry,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,size:_size,slugify:_slugify,startsWith:_startsWith,strictObject,string:string$1,stringFormat,stringbool,success,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,transform,treeifyError,trim:_trim,tuple,uint32,uint64,ulid,undefined:_undefined,union,unknown,uppercase:_uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,void:_void,xid,xor},Symbol.toStringTag,{value:"Module"}));function debug(e){console.debug(chalk.gray("[LLM]"),e)}s(debug,"debug");function zodToOpenAITool(e,n){return{type:"function",function:{name:e,description:n.description,parameters:toJSONSchema(n.inputSchema,{target:"openapi-3.0"})}}}s(zodToOpenAITool,"zodToOpenAITool");function lenientParseMacroToolCall(e,n){const r=e.choices?.[0];if(!r)throw new InvokeError(InvokeErrorType.UNKNOWN,"No choices in response",e);switch(r.finish_reason){case"tool_calls":case"function_call":case"stop":break;case"length":throw new InvokeError(InvokeErrorType.CONTEXT_LENGTH,"Response truncated: max tokens reached");case"content_filter":throw new InvokeError(InvokeErrorType.CONTENT_FILTER,"Content filtered by safety system");default:throw new InvokeError(InvokeErrorType.UNKNOWN,`Unexpected finish_reason: ${r.finish_reason}`)}if(!n.shape.action)throw new Error('inputSchema must have an "action" field');let t=null;const i=r.message?.tool_calls?.[0]?.function;if(t=i?.arguments??null,t&&i.name!=="AgentOutput"){console.log(chalk.yellow("lenientParseMacroToolCall: #1 fixing incorrect tool call"));let u;try{u=JSON.parse(t)}catch(l){throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,"Failed to parse tool arguments as JSON",l)}t=JSON.stringify({action:{[i.name]:u}})}if(t||(t=r.message?.content.trim()||null),!t)throw new InvokeError(InvokeErrorType.NO_TOOL_CALL,"No tool call or content found in response",e);let a;try{a=JSON.parse(t)}catch(u){throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,"Failed to parse tool arguments as JSON",u)}if(a.action||a.evaluation_previous_goal||a.next_goal)a.action||(console.log(chalk.yellow("lenientParseMacroToolCall: #2 fixing incorrect tool call")),a.action={wait:{seconds:1}});else if(a.type&&a.function){if(a.function.name!=="AgentOutput")throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,`Expected function name "AgentOutput", got "${a.function.name}"`,null);console.log(chalk.yellow("lenientParseMacroToolCall: #3 fixing incorrect tool call")),a=a.function.arguments}else if(a.name&&a.arguments){if(a.name!=="AgentOutput")throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,`Expected function name "AgentOutput", got "${a.name}"`,null);console.log(chalk.yellow("lenientParseMacroToolCall: #4 fixing incorrect tool call")),a=a.arguments}else console.log(chalk.yellow("lenientParseMacroToolCall: #5 fixing incorrect tool call")),a={action:a};if(typeof a=="string"){console.log(chalk.yellow("lenientParseMacroToolCall: #6 fixing incorrect tool call"));try{a=JSON.parse(a)}catch(u){throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,"Failed to parse nested tool arguments as JSON",u)}}const c=n.safeParse(a);if(c.success)return c.data;{const u=a.action??{},l=Object.keys(u)[0]||"unknown",d=JSON.stringify(u[l]||"unknown");throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,`Tool arguments validation failed: action "${l}" with args ${d}`,c.error)}}s(lenientParseMacroToolCall,"lenientParseMacroToolCall");function modelPatch(e){const n=e.model||"";if(!n)return e;const r=normalizeModelName(n);return r.startsWith("claude")&&(debug("Applying Claude patch: change tool_choice and disable thinking"),e.tool_choice={type:"tool",name:"AgentOutput"},e.thinking={type:"disabled"}),r.startsWith("grok")&&(debug("Applying Grok patch: removing tool_choice"),delete e.tool_choice,debug("Applying Grok patch: disable reasoning and thinking"),e.thinking={type:"disabled",effort:"minimal"},e.reasoning={enabled:!1,effort:"low"}),r.startsWith("gpt")&&(debug("Applying GPT patch: set verbosity to low"),e.verbosity="low",r.startsWith("gpt-52")?(debug("Applying GPT-52 patch: disable reasoning"),e.reasoning_effort="none"):r.startsWith("gpt-51")?(debug("Applying GPT-51 patch: disable reasoning"),e.reasoning_effort="none"):r.startsWith("gpt-5")&&(debug("Applying GPT-5 patch: set reasoning effort to low"),e.reasoning_effort="low")),r.startsWith("gemini")&&(debug("Applying Gemini patch: set reasoning effort to minimal"),e.reasoning_effort="minimal"),e}s(modelPatch,"modelPatch");function normalizeModelName(e){let n=e.toLowerCase();return n.includes("/")&&(n=n.split("/")[1]),n=n.replace(/_/g,""),n=n.replace(/\./g,""),n}s(normalizeModelName,"normalizeModelName");const ft=class ft{config;fetch;constructor(n){this.config=n,this.fetch=n.customFetch}async invoke(n,r,o){const t=Object.entries(r).map(([d,f])=>zodToOpenAITool(d,f));let i;try{i=await this.fetch(`${this.config.baseURL}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`},body:JSON.stringify(modelPatch({model:this.config.model,temperature:this.config.temperature,max_tokens:this.config.maxTokens,messages:n,tools:t,tool_choice:{type:"function",function:{name:"AgentOutput"}},parallel_tool_calls:!1})),signal:o})}catch(d){throw new InvokeError(InvokeErrorType.NETWORK_ERROR,"Network request failed",d)}if(!i.ok){const d=await i.json().catch(),f=d.error?.message||i.statusText;throw i.status===401||i.status===403?new InvokeError(InvokeErrorType.AUTH_ERROR,`Authentication failed: ${f}`,d):i.status===429?new InvokeError(InvokeErrorType.RATE_LIMIT,`Rate limit exceeded: ${f}`,d):i.status>=500?new InvokeError(InvokeErrorType.SERVER_ERROR,`Server error: ${f}`,d):new InvokeError(InvokeErrorType.UNKNOWN,`HTTP ${i.status}: ${f}`,d)}const a=await i.json(),c=r.AgentOutput,u=lenientParseMacroToolCall(a,c.inputSchema);let l;try{l=await c.execute(u)}catch(d){throw new InvokeError(InvokeErrorType.TOOL_EXECUTION_ERROR,`Tool execution failed: ${d.message}`,d)}return{toolCall:{name:"AgentOutput",args:u},toolResult:l,usage:{promptTokens:a.usage?.prompt_tokens??0,completionTokens:a.usage?.completion_tokens??0,totalTokens:a.usage?.total_tokens??0,cachedTokens:a.usage?.prompt_tokens_details?.cached_tokens,reasoningTokens:a.usage?.completion_tokens_details?.reasoning_tokens},rawResponse:a}}};s(ft,"OpenAIClient");let OpenAIClient=ft;const DEFAULT_MODEL_NAME="PAGE-AGENT-FREE-TESTING-RANDOM",DEFAULT_API_KEY="PAGE-AGENT-FREE-TESTING-RANDOM",DEFAULT_BASE_URL="https://hwcxiuzfylggtcktqgij.supabase.co/functions/v1/llm-testing-proxy",LLM_MAX_RETRIES=2,DEFAULT_TEMPERATURE=.7,DEFAULT_MAX_TOKENS=16e3;function parseLLMConfig(e){return{baseURL:e.baseURL??DEFAULT_BASE_URL,apiKey:e.apiKey??DEFAULT_API_KEY,model:e.model??DEFAULT_MODEL_NAME,temperature:e.temperature??DEFAULT_TEMPERATURE,maxTokens:e.maxTokens??DEFAULT_MAX_TOKENS,maxRetries:e.maxRetries??LLM_MAX_RETRIES,customFetch:e.customFetch??globalThis.fetch}}s(parseLLMConfig,"parseLLMConfig");const gt=class gt extends EventTarget{config;client;constructor(n){super(),this.config=parseLLMConfig(n),this.client=new OpenAIClient(this.config)}async invoke(n,r,o){return await withRetry(async()=>await this.client.invoke(n,r,o),{maxRetries:this.config.maxRetries,onRetry:s(t=>{this.dispatchEvent(new CustomEvent("retry",{detail:{current:t,max:this.config.maxRetries}}))},"onRetry"),onError:s(t=>{this.dispatchEvent(new CustomEvent("error",{detail:{error:t}}))},"onError")})}};s(gt,"LLM");let LLM=gt;async function withRetry(e,n){let r=0,o=null;for(;r<=n.maxRetries;){r>0&&(n.onRetry(r),await new Promise(t=>setTimeout(t,100)));try{return await e()}catch(t){if(console.error(t),n.onError(t),t?.name==="AbortError"||t instanceof InvokeError&&!t.retryable)throw t;o=t,r++,await new Promise(i=>setTimeout(i,100))}}throw o}s(withRetry,"withRetry");async function waitFor$1(e){await new Promise(n=>setTimeout(n,e*1e3))}s(waitFor$1,"waitFor$1");async function movePointerToElement(e){const n=e.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2;window.dispatchEvent(new CustomEvent("PageAgent::MovePointerTo",{detail:{x:r,y:o}})),await waitFor$1(.3)}s(movePointerToElement,"movePointerToElement");function getElementByIndex(e,n){const r=e.get(n);if(!r)throw new Error(`No interactive element found at index ${n}`);const o=r.ref;if(!o)throw new Error(`Element at index ${n} does not have a reference`);if(!(o instanceof HTMLElement))throw new Error(`Element at index ${n} is not an HTMLElement`);return o}s(getElementByIndex,"getElementByIndex");let lastClickedElement=null;function blurLastClickedElement(){lastClickedElement&&(lastClickedElement.blur(),lastClickedElement.dispatchEvent(new MouseEvent("mouseout",{bubbles:!0,cancelable:!0})),lastClickedElement=null)}s(blurLastClickedElement,"blurLastClickedElement");async function clickElement(e){blurLastClickedElement(),lastClickedElement=e,await scrollIntoViewIfNeeded(e),await movePointerToElement(e),window.dispatchEvent(new CustomEvent("PageAgent::ClickPointer")),await waitFor$1(.1),e.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new MouseEvent("mouseover",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0})),e.focus(),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),await waitFor$1(.1)}s(clickElement,"clickElement");const nativeInputValueSetter=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set,nativeTextAreaValueSetter=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value").set;async function inputTextElement(e,n){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error("Element is not an input or textarea");await clickElement(e),e instanceof HTMLTextAreaElement?nativeTextAreaValueSetter.call(e,n):nativeInputValueSetter.call(e,n);const r=new Event("input",{bubbles:!0});e.dispatchEvent(r),await waitFor$1(.1),blurLastClickedElement()}s(inputTextElement,"inputTextElement");async function selectOptionElement(e,n){if(!(e instanceof HTMLSelectElement))throw new Error("Element is not a select element");const o=Array.from(e.options).find(t=>t.textContent?.trim()===n.trim());if(!o)throw new Error(`Option with text "${n}" not found in select element`);e.value=o.value,e.dispatchEvent(new Event("change",{bubbles:!0})),await waitFor$1(.1)}s(selectOptionElement,"selectOptionElement");async function scrollIntoViewIfNeeded(e){const n=e;n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})}s(scrollIntoViewIfNeeded,"scrollIntoViewIfNeeded");async function scrollVertically(e,n,r){if(r){const c=r;console.log("[SCROLL DEBUG] Starting direct container scroll for element:",c.tagName);let u=c,l=!1,d=null,f=0,g=0;const h=n;for(;u&&g<10;){const $=window.getComputedStyle(u),E=/(auto|scroll|overlay)/.test($.overflowY),P=u.scrollHeight>u.clientHeight;if(console.log("[SCROLL DEBUG] Checking element:",u.tagName,"hasScrollableY:",E,"canScrollVertically:",P,"scrollHeight:",u.scrollHeight,"clientHeight:",u.clientHeight),E&&P){const U=u.scrollTop,G=u.scrollHeight-u.clientHeight;let Z=h/3;Z>0?Z=Math.min(Z,G-U):Z=Math.max(Z,-U),u.scrollTop=U+Z;const I=u.scrollTop,N=I-U;if(console.log("[SCROLL DEBUG] Scroll attempt:",u.tagName,"before:",U,"after:",I,"delta:",N),Math.abs(N)>.5){l=!0,d=u,f=N,console.log("[SCROLL DEBUG] Successfully scrolled container:",u.tagName,"delta:",N);break}}if(u===document.body||u===document.documentElement)break;u=u.parentElement,g++}return l?`Scrolled container (${d?.tagName}) by ${f}px`:`No scrollable container found for element (${c.tagName})`}const o=n,t=s(c=>c.clientHeight>=window.innerHeight*.5,"bigEnough"),i=s(c=>c&&/(auto|scroll|overlay)/.test(getComputedStyle(c).overflowY)&&c.scrollHeight>c.clientHeight&&t(c),"canScroll");let a=document.activeElement;for(;a&&!i(a)&&a!==document.body;)a=a.parentElement;return a=i(a)?a:Array.from(document.querySelectorAll("*")).find(i)||document.scrollingElement||document.documentElement,a===document.scrollingElement||a===document.documentElement||a===document.body?(window.scrollBy(0,o),`✅ Scrolled page by ${o}px.`):(a.scrollBy({top:o,behavior:"smooth"}),await waitFor$1(.1),`✅ Scrolled container (${a.tagName}) by ${o}px.`)}s(scrollVertically,"scrollVertically");async function scrollHorizontally(e,n,r){if(r){const c=r;console.log("[SCROLL DEBUG] Starting direct container scroll for element:",c.tagName);let u=c,l=!1,d=null,f=0,g=0;const h=e?n:-n;for(;u&&g<10;){const $=window.getComputedStyle(u),E=/(auto|scroll|overlay)/.test($.overflowX),P=u.scrollWidth>u.clientWidth;if(console.log("[SCROLL DEBUG] Checking element:",u.tagName,"hasScrollableX:",E,"canScrollHorizontally:",P,"scrollWidth:",u.scrollWidth,"clientWidth:",u.clientWidth),E&&P){const U=u.scrollLeft,G=u.scrollWidth-u.clientWidth;let Z=h/3;Z>0?Z=Math.min(Z,G-U):Z=Math.max(Z,-U),u.scrollLeft=U+Z;const I=u.scrollLeft,N=I-U;if(console.log("[SCROLL DEBUG] Scroll attempt:",u.tagName,"before:",U,"after:",I,"delta:",N),Math.abs(N)>.5){l=!0,d=u,f=N,console.log("[SCROLL DEBUG] Successfully scrolled container:",u.tagName,"delta:",N);break}}if(u===document.body||u===document.documentElement)break;u=u.parentElement,g++}return l?`Scrolled container (${d?.tagName}) horizontally by ${f}px`:`No horizontally scrollable container found for element (${c.tagName})`}const o=e?n:-n,t=s(c=>c.clientWidth>=window.innerWidth*.5,"bigEnough"),i=s(c=>c&&/(auto|scroll|overlay)/.test(getComputedStyle(c).overflowX)&&c.scrollWidth>c.clientWidth&&t(c),"canScroll");let a=document.activeElement;for(;a&&!i(a)&&a!==document.body;)a=a.parentElement;return a=i(a)?a:Array.from(document.querySelectorAll("*")).find(i)||document.scrollingElement||document.documentElement,a===document.scrollingElement||a===document.documentElement||a===document.body?(window.scrollBy(o,0),`✅ Scrolled page horizontally by ${o}px`):(a.scrollBy({left:o,behavior:"smooth"}),await waitFor$1(.1),`✅ Scrolled container (${a.tagName}) horizontally by ${o}px`)}s(scrollHorizontally,"scrollHorizontally");const VIEWPORT_EXPANSION=-1,domTree=s((e={doHighlightElements:!0,focusHighlightIndex:-1,viewportExpansion:0,debugMode:!1,interactiveBlacklist:[],interactiveWhitelist:[],highlightOpacity:.1,highlightLabelOpacity:.5})=>{const{interactiveBlacklist:n,interactiveWhitelist:r,highlightOpacity:o,highlightLabelOpacity:t}=e,{doHighlightElements:i,focusHighlightIndex:a,viewportExpansion:c,debugMode:u}=e;let l=0;const d=new WeakMap;function f(m,v){!m||m.nodeType!==Node.ELEMENT_NODE||d.set(m,{...d.get(m),...v})}s(f,"addExtraData");const g={boundingRects:new WeakMap,clientRects:new WeakMap,computedStyles:new WeakMap,clearCache:s(()=>{g.boundingRects=new WeakMap,g.clientRects=new WeakMap,g.computedStyles=new WeakMap},"clearCache")};function h(m){if(!m)return null;if(g.boundingRects.has(m))return g.boundingRects.get(m);const v=m.getBoundingClientRect();return v&&g.boundingRects.set(m,v),v}s(h,"getCachedBoundingRect");function $(m){if(!m)return null;if(g.computedStyles.has(m))return g.computedStyles.get(m);const v=window.getComputedStyle(m);return v&&g.computedStyles.set(m,v),v}s($,"getCachedComputedStyle");function E(m){if(!m)return null;if(g.clientRects.has(m))return g.clientRects.get(m);const v=m.getClientRects();return v&&g.clientRects.set(m,v),v}s(E,"getCachedClientRects");const P={},U={current:0},G="playwright-highlight-container";function Z(m,v,T=null){if(!m)return v;const y=[];let b=null,C=20,w=16,j=null;try{let k=document.getElementById(G);k||(k=document.createElement("div"),k.id=G,k.style.position="fixed",k.style.pointerEvents="none",k.style.top="0",k.style.left="0",k.style.width="100%",k.style.height="100%",k.style.zIndex="2147483640",k.style.backgroundColor="transparent",document.body.appendChild(k));const L=m.getClientRects();if(!L||L.length===0)return v;const X=["#FF0000","#00FF00","#0000FF","#FFA500","#800080","#008080","#FF69B4","#4B0082","#FF4500","#2E8B57","#DC143C","#4682B4"],J=v%X.length;let Pe=X[J];const ne=Pe+Math.floor(o*255).toString(16).padStart(2,"0");Pe=Pe+Math.floor(t*255).toString(16).padStart(2,"0");let oe={x:0,y:0};if(T){const V=T.getBoundingClientRect();oe.x=V.left,oe.y=V.top}const ge=document.createDocumentFragment();for(const V of L){if(V.width===0||V.height===0)continue;const W=document.createElement("div");W.style.position="fixed",W.style.border=`2px solid ${Pe}`,W.style.backgroundColor=ne,W.style.pointerEvents="none",W.style.boxSizing="border-box";const F=V.top+oe.y,Ie=V.left+oe.x;W.style.top=`${F}px`,W.style.left=`${Ie}px`,W.style.width=`${V.width}px`,W.style.height=`${V.height}px`,ge.appendChild(W),y.push({element:W,initialRect:V})}const ve=L[0];b=document.createElement("div"),b.className="playwright-highlight-label",b.style.position="fixed",b.style.background=Pe,b.style.color="white",b.style.padding="1px 4px",b.style.borderRadius="4px",b.style.fontSize=`${Math.min(12,Math.max(8,ve.height/2))}px`,b.textContent=v.toString(),C=b.offsetWidth>0?b.offsetWidth:C,w=b.offsetHeight>0?b.offsetHeight:w;const Be=ve.top+oe.y,Qe=ve.left+oe.x;let ot=Be+2,Je=Qe+ve.width-C-2;(ve.width<C+4||ve.height<w+4)&&(ot=Be-w-2,Je=Qe+ve.width-C,Je<oe.x&&(Je=Qe)),ot=Math.max(0,Math.min(ot,window.innerHeight-w)),Je=Math.max(0,Math.min(Je,window.innerWidth-C)),b.style.top=`${ot}px`,b.style.left=`${Je}px`,ge.appendChild(b);const at=s((V,W)=>{let F=0;return(...Ie)=>{const re=performance.now();if(!(re-F<W))return F=re,V(...Ie)}},"throttleFunction")(s(()=>{const V=m.getClientRects();let W={x:0,y:0};if(T){const F=T.getBoundingClientRect();W.x=F.left,W.y=F.top}if(y.forEach((F,Ie)=>{if(Ie<V.length){const re=V[Ie],Ke=re.top+W.y,Ne=re.left+W.x;F.element.style.top=`${Ke}px`,F.element.style.left=`${Ne}px`,F.element.style.width=`${re.width}px`,F.element.style.height=`${re.height}px`,F.element.style.display=re.width===0||re.height===0?"none":"block"}else F.element.style.display="none"}),V.length<y.length)for(let F=V.length;F<y.length;F++)y[F].element.style.display="none";if(b&&V.length>0){const F=V[0],Ie=F.top+W.y,re=F.left+W.x;let Ke=Ie+2,Ne=re+F.width-C-2;(F.width<C+4||F.height<w+4)&&(Ke=Ie-w-2,Ne=re+F.width-C,Ne<W.x&&(Ne=re)),Ke=Math.max(0,Math.min(Ke,window.innerHeight-w)),Ne=Math.max(0,Math.min(Ne,window.innerWidth-C)),b.style.top=`${Ke}px`,b.style.left=`${Ne}px`,b.style.display="block"}else b&&(b.style.display="none")},"updatePositions"),16);return window.addEventListener("scroll",at,!0),window.addEventListener("resize",at),j=s(()=>{window.removeEventListener("scroll",at,!0),window.removeEventListener("resize",at),y.forEach(V=>V.element.remove()),b&&b.remove()},"cleanupFn"),k.appendChild(ge),v+1}finally{j&&(window._highlightCleanupFunctions=window._highlightCleanupFunctions||[]).push(j)}}s(Z,"highlightElement");function I(m){if(!m||m.nodeType!==Node.ELEMENT_NODE)return null;const v=$(m);if(!v)return null;const T=v.display;if(T==="inline"||T==="inline-block")return null;const y=v.overflowX,b=v.overflowY,C=y==="auto"||y==="scroll",w=b==="auto"||b==="scroll";if(!C&&!w)return null;const j=m.scrollWidth-m.clientWidth,k=m.scrollHeight-m.clientHeight,L=4;if(j<L&&k<L||!w&&j<L||!C&&k<L)return null;const X=m.scrollTop,J=m.scrollLeft,Pe=m.scrollWidth-m.clientWidth-m.scrollLeft,ne=m.scrollHeight-m.clientHeight-m.scrollTop,oe={top:X,right:Pe,bottom:ne,left:J};return f(m,{scrollable:!0,scrollData:oe}),oe}s(I,"isScrollableElement");function N(m){try{if(c===-1){const w=m.parentElement;if(!w)return!1;try{return w.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0})}catch{const k=window.getComputedStyle(w);return k.display!=="none"&&k.visibility!=="hidden"&&k.opacity!=="0"}}const v=document.createRange();v.selectNodeContents(m);const T=v.getClientRects();if(!T||T.length===0)return!1;let y=!1,b=!1;for(const w of T)if(w.width>0&&w.height>0&&(y=!0,!(w.bottom<-c||w.top>window.innerHeight+c||w.right<-c||w.left>window.innerWidth+c))){b=!0;break}if(!y||!b)return!1;const C=m.parentElement;if(!C)return!1;try{return C.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0})}catch{const j=window.getComputedStyle(C);return j.display!=="none"&&j.visibility!=="hidden"&&j.opacity!=="0"}}catch(v){return console.warn("Error checking text node visibility:",v),!1}}s(N,"isTextNodeVisible");function Me(m){if(!m||!m.tagName)return!1;const v=new Set(["body","div","main","article","section","nav","header","footer"]),T=m.tagName.toLowerCase();return v.has(T)?!0:!new Set(["svg","script","style","link","meta","noscript","template"]).has(T)}s(Me,"isElementAccepted");function B(m){const v=$(m);return m.offsetWidth>0&&m.offsetHeight>0&&v?.visibility!=="hidden"&&v?.display!=="none"}s(B,"isElementVisible");function H(m){if(!m||m.nodeType!==Node.ELEMENT_NODE||n.includes(m))return!1;if(r.includes(m))return!0;const v=m.tagName.toLowerCase(),T=$(m),y=new Set(["pointer","move","text","grab","grabbing","cell","copy","alias","all-scroll","col-resize","context-menu","crosshair","e-resize","ew-resize","help","n-resize","ne-resize","nesw-resize","ns-resize","nw-resize","nwse-resize","row-resize","s-resize","se-resize","sw-resize","vertical-text","w-resize","zoom-in","zoom-out"]),b=new Set(["not-allowed","no-drop","wait","progress","initial","inherit"]);function C(ne){return ne.tagName.toLowerCase()==="html"?!1:!!(T?.cursor&&y.has(T.cursor))}if(s(C,"doesElementHaveInteractivePointer"),C(m))return!0;const j=new Set(["a","button","input","select","textarea","details","summary","label","option","optgroup","fieldset","legend"]),k=new Set(["disabled","readonly"]);if(j.has(v)){if(T?.cursor&&b.has(T.cursor))return!1;for(const ne of k)if(m.hasAttribute(ne)||m.getAttribute(ne)==="true"||m.getAttribute(ne)==="")return!1;return!(m.disabled||m.readOnly||m.inert)}const L=m.getAttribute("role"),X=m.getAttribute("aria-role");if(m.getAttribute("contenteditable")==="true"||m.isContentEditable||m.classList&&(m.classList.contains("button")||m.classList.contains("dropdown-toggle")||m.getAttribute("data-index")||m.getAttribute("data-toggle")==="dropdown"||m.getAttribute("aria-haspopup")==="true"))return!0;const J=new Set(["button","menu","menubar","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);if(j.has(v)||L&&J.has(L)||X&&J.has(X))return!0;try{if(typeof getEventListeners=="function"){const ge=getEventListeners(m),ve=["click","mousedown","mouseup","dblclick"];for(const Be of ve)if(ge[Be]&&ge[Be].length>0)return!0}const ne=m?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof ne=="function"){const ge=ne(m),ve=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const Be of ve)for(const Qe of ge)if(Qe.type===Be)return!0}const oe=["onclick","onmousedown","onmouseup","ondblclick"];for(const ge of oe)if(m.hasAttribute(ge)||typeof m[ge]=="function")return!0}catch{}return!!I(m)}s(H,"isInteractiveElement");function ue(m){if(c===-1)return!0;const v=E(m);if(!v||v.length===0)return!1;let T=!1;for(const k of v)if(k.width>0&&k.height>0&&!(k.bottom<-c||k.top>window.innerHeight+c||k.right<-c||k.left>window.innerWidth+c)){T=!0;break}if(!T)return!1;if(m.ownerDocument!==window.document)return!0;let b=Array.from(v).find(k=>k.width>0&&k.height>0);if(!b)return!1;const C=m.getRootNode();if(C instanceof ShadowRoot){const k=b.left+b.width/2,L=b.top+b.height/2;try{const X=C.elementFromPoint(k,L);if(!X)return!1;let J=X;for(;J&&J!==C;){if(J===m)return!0;J=J.parentElement}return!1}catch{return!0}}const w=5;return[{x:b.left+b.width/2,y:b.top+b.height/2},{x:b.left+w,y:b.top+w},{x:b.right-w,y:b.bottom-w}].some(({x:k,y:L})=>{try{const X=document.elementFromPoint(k,L);if(!X)return!1;let J=X;for(;J&&J!==document.documentElement;){if(J===m)return!0;J=J.parentElement}return!1}catch{return!0}})}s(ue,"isTopElement");function q(m,v){if(v===-1)return!0;const T=m.getClientRects();if(!T||T.length===0){const y=h(m);return!y||y.width===0||y.height===0?!1:!(y.bottom<-v||y.top>window.innerHeight+v||y.right<-v||y.left>window.innerWidth+v)}for(const y of T)if(!(y.width===0||y.height===0)&&!(y.bottom<-v||y.top>window.innerHeight+v||y.right<-v||y.left>window.innerWidth+v))return!0;return!1}s(q,"isInExpandedViewport");function le(m){if(!m||m.nodeType!==Node.ELEMENT_NODE)return!1;const v=m.tagName.toLowerCase();return new Set(["a","button","input","select","textarea","details","summary","label"]).has(v)?!0:m.hasAttribute("onclick")||m.hasAttribute("role")||m.hasAttribute("tabindex")||m.hasAttribute("aria-")||m.hasAttribute("data-action")||m.getAttribute("contenteditable")==="true"}s(le,"isInteractiveCandidate");const me=new Set(["a","button","input","select","textarea","summary","details","label","option"]),qe=new Set(["button","link","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);function fe(m){if(!m||m.nodeType!==Node.ELEMENT_NODE||!B(m))return!1;const v=m.hasAttribute("role")||m.hasAttribute("tabindex")||m.hasAttribute("onclick")||typeof m.onclick=="function",T=/\b(btn|clickable|menu|item|entry|link)\b/i.test(m.className||""),y=!!m.closest('button,a,[role="button"],.menu,.dropdown,.list,.toolbar'),b=[...m.children].some(B),C=m.parentElement&&m.parentElement.isSameNode(document.body);return(H(m)||v||T)&&b&&y&&!C}s(fe,"isHeuristicallyInteractive");function Xe(m){if(!m||m.nodeType!==Node.ELEMENT_NODE)return!1;const v=m.tagName.toLowerCase(),T=m.getAttribute("role");if(v==="iframe"||me.has(v)||T&&qe.has(T)||m.isContentEditable||m.getAttribute("contenteditable")==="true"||m.hasAttribute("data-testid")||m.hasAttribute("data-cy")||m.hasAttribute("data-test")||m.hasAttribute("onclick")||typeof m.onclick=="function")return!0;try{const y=m?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof y=="function"){const C=y(m),w=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const j of w)for(const k of C)if(k.type===j)return!0}if(["onmousedown","onmouseup","onkeydown","onkeyup","onsubmit","onchange","oninput","onfocus","onblur"].some(C=>m.hasAttribute(C)))return!0}catch{}return!!fe(m)}s(Xe,"isElementDistinctInteraction");function Ye(m,v,T,y){if(!m.isInteractive)return!1;let b=!1;return y?Xe(v)?b=!0:b=!1:b=!0,b&&(m.isInViewport=q(v,c),(m.isInViewport||c===-1)&&(m.highlightIndex=l++,i))?(a>=0?a===m.highlightIndex&&Z(v,m.highlightIndex,T):Z(v,m.highlightIndex,T),!0):!1}s(Ye,"handleHighlighting");function ye(m,v=null,T=!1){if(!m||m.id===G||m.nodeType!==Node.ELEMENT_NODE&&m.nodeType!==Node.TEXT_NODE||!m||m.id===G)return null;if(m.dataset?.browserUseIgnore==="true")return!0;if(m===document.body){const w={tagName:"body",attributes:{},xpath:"/body",children:[]};for(const k of m.childNodes){const L=ye(k,v,!1);L&&w.children.push(L)}const j=`${U.current++}`;return P[j]=w,j}if(m.nodeType!==Node.ELEMENT_NODE&&m.nodeType!==Node.TEXT_NODE)return null;if(m.nodeType===Node.TEXT_NODE){const w=m.textContent?.trim();if(!w)return null;const j=m.parentElement;if(!j||j.tagName.toLowerCase()==="script")return null;const k=`${U.current++}`;return P[k]={type:"TEXT_NODE",text:w,isVisible:N(m)},k}if(m.nodeType===Node.ELEMENT_NODE&&!Me(m))return null;if(c!==-1&&!m.shadowRoot){const w=h(m),j=$(m),k=j&&(j.position==="fixed"||j.position==="sticky"),L=m.offsetWidth>0||m.offsetHeight>0;if(!w||!k&&!L&&(w.bottom<-c||w.top>window.innerHeight+c||w.right<-c||w.left>window.innerWidth+c))return null}const y={tagName:m.tagName.toLowerCase(),attributes:{},children:[]};if(le(m)||m.tagName.toLowerCase()==="iframe"||m.tagName.toLowerCase()==="body"){const w=m.getAttributeNames?.()||[];for(const j of w){const k=m.getAttribute(j);y.attributes[j]=k}m.tagName.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(y.attributes.checked=m.checked?"true":"false")}let b=!1;if(m.nodeType===Node.ELEMENT_NODE&&(y.isVisible=B(m),y.isVisible)){y.isTopElement=ue(m);const w=m.getAttribute("role"),j=w==="menu"||w==="menubar"||w==="listbox";(y.isTopElement||j)&&(y.isInteractive=H(m),b=Ye(y,m,v,T),y.ref=m)}if(m.tagName){const w=m.tagName.toLowerCase();if(w==="iframe")try{const j=m.contentDocument||m.contentWindow?.document;if(j)for(const k of j.childNodes){const L=ye(k,m,!1);L&&y.children.push(L)}}catch(j){console.warn("Unable to access iframe:",j)}else if(m.isContentEditable||m.getAttribute("contenteditable")==="true"||m.id==="tinymce"||m.classList.contains("mce-content-body")||w==="body"&&m.getAttribute("data-id")?.startsWith("mce_"))for(const j of m.childNodes){const k=ye(j,v,b);k&&y.children.push(k)}else{if(m.shadowRoot){y.shadowRoot=!0;for(const j of m.shadowRoot.childNodes){const k=ye(j,v,b);k&&y.children.push(k)}}for(const j of m.childNodes){const L=ye(j,v,b||T);L&&y.children.push(L)}}}if(y.tagName==="a"&&y.children.length===0&&!y.attributes.href){const w=h(m);if(!(w&&w.width>0&&w.height>0||m.offsetWidth>0||m.offsetHeight>0))return null}y.extra=d.get(m)||null;const C=`${U.current++}`;return P[C]=y,C}s(ye,"buildDomTree");const pe=ye(document.body);return g.clearCache(),{rootId:pe,map:P}},"domTree"),newElementsCache=new WeakMap;function getFlatTree(e){const n=[];for(const i of e.interactiveBlacklist||[])typeof i=="function"?n.push(i()):n.push(i);const r=[];for(const i of e.interactiveWhitelist||[])typeof i=="function"?r.push(i()):r.push(i);const o=domTree({doHighlightElements:!0,debugMode:!0,focusHighlightIndex:-1,viewportExpansion:VIEWPORT_EXPANSION,interactiveBlacklist:n,interactiveWhitelist:r,highlightOpacity:e.highlightOpacity??0,highlightLabelOpacity:e.highlightLabelOpacity??.1}),t=window.location.href;for(const i in o.map){const a=o.map[i];if(a.isInteractive&&a.ref){const c=a.ref;newElementsCache.has(c)||(newElementsCache.set(c,t),a.isNew=!0)}}return o}s(getFlatTree,"getFlatTree");function flatTreeToString(e,n){const r=["title","type","checked","name","role","value","placeholder","data-date-format","alt","aria-label","aria-expanded","data-state","aria-checked","id","for","target","aria-haspopup","aria-controls","aria-owns"],o=[...n||[],...r],t=s((f,g)=>f.length>g?f.substring(0,g)+"...":f,"capTextLength"),i=s(f=>{const g=e.map[f];if(!g)return null;if(g.type==="TEXT_NODE"){const h=g;return{type:"text",text:h.text,isVisible:h.isVisible,parent:null,children:[]}}else{const h=g,$=[];if(h.children)for(const E of h.children){const P=i(E);P&&(P.parent=null,$.push(P))}return{type:"element",tagName:h.tagName,attributes:h.attributes??{},isVisible:h.isVisible??!1,isInteractive:h.isInteractive??!1,isTopElement:h.isTopElement??!1,isNew:h.isNew??!1,highlightIndex:h.highlightIndex,parent:null,children:$,extra:h.extra??{}}}},"buildTreeNode"),a=s((f,g=null)=>{f.parent=g;for(const h of f.children)a(h,f)},"setParentReferences"),c=i(e.rootId);if(!c)return"";a(c);const u=s(f=>{let g=f.parent;for(;g;){if(g.type==="element"&&g.highlightIndex!==void 0)return!0;g=g.parent}return!1},"hasParentWithHighlightIndex"),l=s((f,g,h)=>{let $=g;const E=" ".repeat(g);if(f.type==="element"){if(f.highlightIndex!==void 0){$+=1;const P=getAllTextTillNextClickableElement(f);let U="";if(o.length>0&&f.attributes){const I={};for(const B of o){const H=f.attributes[B];H&&H.trim()!==""&&(I[B]=H.trim())}const N=o.filter(B=>B in I);if(N.length>1){const B=new Set,H={};for(const ue of N){const q=I[ue];q.length>5&&(q in H?B.add(ue):H[q]=ue)}for(const ue of B)delete I[ue]}I.role===f.tagName&&delete I.role;const Me=["aria-label","placeholder","title"];for(const B of Me)I[B]&&I[B].toLowerCase().trim()===P.toLowerCase().trim()&&delete I[B];Object.keys(I).length>0&&(U=Object.entries(I).map(([B,H])=>`${B}=${t(H,20)}`).join(" "))}const G=f.isNew?`*[${f.highlightIndex}]`:`[${f.highlightIndex}]`;let Z=`${E}${G}<${f.tagName??""}`;if(U&&(Z+=` ${U}`),f.extra&&f.extra.scrollable){let I="";f.extra.scrollData?.left&&(I+=`left=${f.extra.scrollData.left}, `),f.extra.scrollData?.top&&(I+=`top=${f.extra.scrollData.top}, `),f.extra.scrollData?.right&&(I+=`right=${f.extra.scrollData.right}, `),f.extra.scrollData?.bottom&&(I+=`bottom=${f.extra.scrollData.bottom}`),Z+=` data-scrollable="${I}"`}if(P){const I=P.trim();U||(Z+=" "),Z+=`>${I}`}else U||(Z+=" ");Z+=" />",h.push(Z)}for(const P of f.children)l(P,$,h)}else if(f.type==="text"){if(u(f))return;f.parent&&f.parent.type==="element"&&f.parent.isVisible&&f.parent.isTopElement&&h.push(`${E}${f.text??""}`)}},"processNode"),d=[];return l(c,0,d),d.join(`
|
|
28
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const a=i[1];if(n===i[0]){t(i);continue}if(e.external){const u=e.external.registry.get(i[0])?.id;if(n!==i[0]&&u){t(i);continue}}if(e.metadataRegistry.get(i[0])?.id){t(i);continue}if(a.cycle){t(i);continue}if(a.count>1&&e.reused==="ref"){t(i);continue}}}s(extractDefs,"extractDefs");function finalize(e,n){const r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=s(a=>{const c=e.seen.get(a),u=c.def??c.schema,l={...u};if(c.ref===null)return;const d=c.ref;if(c.ref=null,d){o(d);const f=e.seen.get(d).schema;f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(f)):(Object.assign(u,f),Object.assign(u,l))}c.isParent||e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})},"flattenRef");for(const a of[...e.seen.entries()].reverse())o(a[0]);const t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(n)?.id;if(!a)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(a)}Object.assign(t,r.def??r.schema);const i=e.external?.defs??{};for(const a of e.seen.entries()){const c=a[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?t.$defs=i:t.definitions=i);try{const a=JSON.parse(JSON.stringify(t));return Object.defineProperty(a,"~standard",{value:{...n["~standard"],jsonSchema:{input:createStandardJSONSchemaMethod(n,"input"),output:createStandardJSONSchemaMethod(n,"output")}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}s(finalize,"finalize");function isTransforming(e,n){const r=n??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return isTransforming(o.element,r);if(o.type==="set")return isTransforming(o.valueType,r);if(o.type==="lazy")return isTransforming(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return isTransforming(o.innerType,r);if(o.type==="intersection")return isTransforming(o.left,r)||isTransforming(o.right,r);if(o.type==="record"||o.type==="map")return isTransforming(o.keyType,r)||isTransforming(o.valueType,r);if(o.type==="pipe")return isTransforming(o.in,r)||isTransforming(o.out,r);if(o.type==="object"){for(const t in o.shape)if(isTransforming(o.shape[t],r))return!0;return!1}if(o.type==="union"){for(const t of o.options)if(isTransforming(t,r))return!0;return!1}if(o.type==="tuple"){for(const t of o.items)if(isTransforming(t,r))return!0;return!!(o.rest&&isTransforming(o.rest,r))}return!1}s(isTransforming,"isTransforming");const createToJSONSchemaMethod=s((e,n={})=>r=>{const o=initializeContext({...r,processors:n});return process(e,o),extractDefs(o,e),finalize(o,e)},"createToJSONSchemaMethod"),createStandardJSONSchemaMethod=s((e,n)=>r=>{const{libraryOptions:o,target:t}=r??{},i=initializeContext({...o??{},target:t,io:n,processors:{}});return process(e,i),extractDefs(i,e),finalize(i,e)},"createStandardJSONSchemaMethod"),formatMap={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},stringProcessor=s((e,n,r,o)=>{const t=r;t.type="string";const{minimum:i,maximum:a,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(t.minLength=i),typeof a=="number"&&(t.maxLength=a),c&&(t.format=formatMap[c]??c,t.format===""&&delete t.format),l&&(t.contentEncoding=l),u&&u.size>0){const d=[...u];d.length===1?t.pattern=d[0].source:d.length>1&&(t.allOf=[...d.map(f=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},"stringProcessor"),numberProcessor=s((e,n,r,o)=>{const t=r,{minimum:i,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?t.type="integer":t.type="number",typeof d=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(t.minimum=d,t.exclusiveMinimum=!0):t.exclusiveMinimum=d),typeof i=="number"&&(t.minimum=i,typeof d=="number"&&n.target!=="draft-04"&&(d>=i?delete t.minimum:delete t.exclusiveMinimum)),typeof l=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(t.maximum=l,t.exclusiveMaximum=!0):t.exclusiveMaximum=l),typeof a=="number"&&(t.maximum=a,typeof l=="number"&&n.target!=="draft-04"&&(l<=a?delete t.maximum:delete t.exclusiveMaximum)),typeof u=="number"&&(t.multipleOf=u)},"numberProcessor"),booleanProcessor=s((e,n,r,o)=>{r.type="boolean"},"booleanProcessor"),bigintProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),symbolProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),nullProcessor=s((e,n,r,o)=>{n.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),undefinedProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),voidProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),neverProcessor=s((e,n,r,o)=>{r.not={}},"neverProcessor"),anyProcessor=s((e,n,r,o)=>{},"anyProcessor"),unknownProcessor=s((e,n,r,o)=>{},"unknownProcessor"),dateProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),enumProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=getEnumValues(t.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},"enumProcessor"),literalProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=[];for(const a of t.values)if(a===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];r.type=a===null?"null":typeof a,n.target==="draft-04"||n.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},"literalProcessor"),nanProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),templateLiteralProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=i.source},"templateLiteralProcessor"),fileProcessor=s((e,n,r,o)=>{const t=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(i.minLength=a),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(t,i)):t.anyOf=u.map(l=>({...i,contentMediaType:l})):Object.assign(t,i)},"fileProcessor"),successProcessor=s((e,n,r,o)=>{r.type="boolean"},"successProcessor"),customProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),functionProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),transformProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),mapProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),setProcessor=s((e,n,r,o)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),arrayProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(t.minItems=a),typeof c=="number"&&(t.maxItems=c),t.type="array",t.items=process(i.element,n,{...o,path:[...o.path,"items"]})},"arrayProcessor"),objectProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def;t.type="object",t.properties={};const a=i.shape;for(const l in a)t.properties[l]=process(a[l],n,{...o,path:[...o.path,"properties",l]});const c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{const d=i.shape[l]._zod;return n.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(t.required=Array.from(u)),i.catchall?._zod.def.type==="never"?t.additionalProperties=!1:i.catchall?i.catchall&&(t.additionalProperties=process(i.catchall,n,{...o,path:[...o.path,"additionalProperties"]})):n.io==="output"&&(t.additionalProperties=!1)},"objectProcessor"),unionProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=t.inclusive===!1,a=t.options.map((c,u)=>process(c,n,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=a:r.anyOf=a},"unionProcessor"),intersectionProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=process(t.left,n,{...o,path:[...o.path,"allOf",0]}),a=process(t.right,n,{...o,path:[...o.path,"allOf",1]}),c=s(l=>"allOf"in l&&Object.keys(l).length===1,"isSimpleIntersection"),u=[...c(i)?i.allOf:[i],...c(a)?a.allOf:[a]];r.allOf=u},"intersectionProcessor"),tupleProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def;t.type="array";const a=n.target==="draft-2020-12"?"prefixItems":"items",c=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>process(g,n,{...o,path:[...o.path,a,h]})),l=i.rest?process(i.rest,n,{...o,path:[...o.path,c,...n.target==="openapi-3.0"?[i.items.length]:[]]}):null;n.target==="draft-2020-12"?(t.prefixItems=u,l&&(t.items=l)):n.target==="openapi-3.0"?(t.items={anyOf:u},l&&t.items.anyOf.push(l),t.minItems=u.length,l||(t.maxItems=u.length)):(t.items=u,l&&(t.additionalItems=l));const{minimum:d,maximum:f}=e._zod.bag;typeof d=="number"&&(t.minItems=d),typeof f=="number"&&(t.maxItems=f)},"tupleProcessor"),recordProcessor=s((e,n,r,o)=>{const t=r,i=e._zod.def;t.type="object",(n.target==="draft-07"||n.target==="draft-2020-12")&&(t.propertyNames=process(i.keyType,n,{...o,path:[...o.path,"propertyNames"]})),t.additionalProperties=process(i.valueType,n,{...o,path:[...o.path,"additionalProperties"]})},"recordProcessor"),nullableProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=process(t.innerType,n,o),a=n.seen.get(e);n.target==="openapi-3.0"?(a.ref=t.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},"nullableProcessor"),nonoptionalProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType},"nonoptionalProcessor"),defaultProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType,r.default=JSON.parse(JSON.stringify(t.defaultValue))},"defaultProcessor"),prefaultProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType,n.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},"prefaultProcessor"),catchProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),pipeProcessor=s((e,n,r,o)=>{const t=e._zod.def,i=n.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;process(i,n,o);const a=n.seen.get(e);a.ref=i},"pipeProcessor"),readonlyProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType,r.readOnly=!0},"readonlyProcessor"),promiseProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType},"promiseProcessor"),optionalProcessor=s((e,n,r,o)=>{const t=e._zod.def;process(t.innerType,n,o);const i=n.seen.get(e);i.ref=t.innerType},"optionalProcessor"),lazyProcessor=s((e,n,r,o)=>{const t=e._zod.innerType;process(t,n,o);const i=n.seen.get(e);i.ref=t},"lazyProcessor"),allProcessors={string:stringProcessor,number:numberProcessor,boolean:booleanProcessor,bigint:bigintProcessor,symbol:symbolProcessor,null:nullProcessor,undefined:undefinedProcessor,void:voidProcessor,never:neverProcessor,any:anyProcessor,unknown:unknownProcessor,date:dateProcessor,enum:enumProcessor,literal:literalProcessor,nan:nanProcessor,template_literal:templateLiteralProcessor,file:fileProcessor,success:successProcessor,custom:customProcessor,function:functionProcessor,transform:transformProcessor,map:mapProcessor,set:setProcessor,array:arrayProcessor,object:objectProcessor,union:unionProcessor,intersection:intersectionProcessor,tuple:tupleProcessor,record:recordProcessor,nullable:nullableProcessor,nonoptional:nonoptionalProcessor,default:defaultProcessor,prefault:prefaultProcessor,catch:catchProcessor,pipe:pipeProcessor,readonly:readonlyProcessor,promise:promiseProcessor,optional:optionalProcessor,lazy:lazyProcessor};function toJSONSchema(e,n){if("_idmap"in e){const o=e,t=initializeContext({...n,processors:allProcessors}),i={};for(const u of o._idmap.entries()){const[l,d]=u;process(d,t)}const a={},c={registry:o,uri:n?.uri,defs:i};t.external=c;for(const u of o._idmap.entries()){const[l,d]=u;extractDefs(t,d),a[l]=finalize(t,d)}if(Object.keys(i).length>0){const u=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:i}}return{schemas:a}}const r=initializeContext({...n,processors:allProcessors});return process(e,r),extractDefs(r,e),finalize(r,e)}s(toJSONSchema,"toJSONSchema");const mt=class mt{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(n){this.ctx.counter=n}get seen(){return this.ctx.seen}constructor(n){let r=n?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=initializeContext({processors:allProcessors,target:r,...n?.metadata&&{metadata:n.metadata},...n?.unrepresentable&&{unrepresentable:n.unrepresentable},...n?.override&&{override:n.override},...n?.io&&{io:n.io}})}process(n,r={path:[],schemaPath:[]}){return process(n,this.ctx,r)}emit(n,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),extractDefs(this.ctx,n);const o=finalize(this.ctx,n),{"~standard":t,...i}=o;return i}};s(mt,"JSONSchemaGenerator");let JSONSchemaGenerator=mt;const jsonSchema=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),index=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny,$ZodArray,$ZodAsyncError,$ZodBase64,$ZodBase64URL,$ZodBigInt,$ZodBigIntFormat,$ZodBoolean,$ZodCIDRv4,$ZodCIDRv6,$ZodCUID,$ZodCUID2,$ZodCatch,$ZodCheck,$ZodCheckBigIntFormat,$ZodCheckEndsWith,$ZodCheckGreaterThan,$ZodCheckIncludes,$ZodCheckLengthEquals,$ZodCheckLessThan,$ZodCheckLowerCase,$ZodCheckMaxLength,$ZodCheckMaxSize,$ZodCheckMimeType,$ZodCheckMinLength,$ZodCheckMinSize,$ZodCheckMultipleOf,$ZodCheckNumberFormat,$ZodCheckOverwrite,$ZodCheckProperty,$ZodCheckRegex,$ZodCheckSizeEquals,$ZodCheckStartsWith,$ZodCheckStringFormat,$ZodCheckUpperCase,$ZodCodec,$ZodCustom,$ZodCustomStringFormat,$ZodDate,$ZodDefault,$ZodDiscriminatedUnion,$ZodE164,$ZodEmail,$ZodEmoji,$ZodEncodeError,$ZodEnum,$ZodError,$ZodFile,$ZodFunction,$ZodGUID,$ZodIPv4,$ZodIPv6,$ZodISODate,$ZodISODateTime,$ZodISODuration,$ZodISOTime,$ZodIntersection,$ZodJWT,$ZodKSUID,$ZodLazy,$ZodLiteral,$ZodMAC,$ZodMap,$ZodNaN,$ZodNanoID,$ZodNever,$ZodNonOptional,$ZodNull,$ZodNullable,$ZodNumber,$ZodNumberFormat,$ZodObject,$ZodObjectJIT,$ZodOptional,$ZodPipe,$ZodPrefault,$ZodPromise,$ZodReadonly,$ZodRealError,$ZodRecord,$ZodRegistry,$ZodSet,$ZodString,$ZodStringFormat,$ZodSuccess,$ZodSymbol,$ZodTemplateLiteral,$ZodTransform,$ZodTuple,$ZodType,$ZodULID,$ZodURL,$ZodUUID,$ZodUndefined,$ZodUnion,$ZodUnknown,$ZodVoid,$ZodXID,$ZodXor,$brand,$constructor,$input,$output,Doc,JSONSchema:jsonSchema,JSONSchemaGenerator,NEVER,TimePrecision,_any,_array,_base64,_base64url,_bigint,_boolean,_catch:_catch$1,_check,_cidrv4,_cidrv6,_coercedBigint,_coercedBoolean,_coercedDate,_coercedNumber,_coercedString,_cuid,_cuid2,_custom,_date,_decode,_decodeAsync,_default:_default$1,_discriminatedUnion,_e164,_email,_emoji,_encode,_encodeAsync,_endsWith,_enum:_enum$1,_file,_float32,_float64,_gt,_gte,_guid,_includes,_int,_int32,_int64,_intersection,_ipv4,_ipv6,_isoDate,_isoDateTime,_isoDuration,_isoTime,_jwt,_ksuid,_lazy,_length,_literal,_lowercase,_lt,_lte,_mac,_map,_max:_lte,_maxLength,_maxSize,_mime,_min:_gte,_minLength,_minSize,_multipleOf,_nan,_nanoid,_nativeEnum,_negative,_never,_nonnegative,_nonoptional,_nonpositive,_normalize,_null:_null$1,_nullable,_number,_optional,_overwrite,_parse,_parseAsync,_pipe,_positive,_promise,_property,_readonly,_record,_refine,_regex,_safeDecode,_safeDecodeAsync,_safeEncode,_safeEncodeAsync,_safeParse,_safeParseAsync,_set,_size,_slugify,_startsWith,_string,_stringFormat,_stringbool,_success,_superRefine,_symbol,_templateLiteral,_toLowerCase,_toUpperCase,_transform,_trim,_tuple,_uint32,_uint64,_ulid,_undefined:_undefined$1,_union,_unknown,_uppercase,_url,_uuid,_uuidv4,_uuidv6,_uuidv7,_void:_void$1,_xid,_xor,clone,config,createStandardJSONSchemaMethod,createToJSONSchemaMethod,decode:decode$1,decodeAsync:decodeAsync$1,describe:describe$1,encode:encode$1,encodeAsync:encodeAsync$1,extractDefs,finalize,flattenError,formatError,globalConfig,globalRegistry,initializeContext,isValidBase64,isValidBase64URL,isValidJWT,locales:index$1,meta:meta$1,parse:parse$1,parseAsync:parseAsync$1,prettifyError,process,regexes,registry,safeDecode:safeDecode$1,safeDecodeAsync:safeDecodeAsync$1,safeEncode:safeEncode$1,safeEncodeAsync:safeEncodeAsync$1,safeParse:safeParse$1,safeParseAsync:safeParseAsync$1,toDotPath,toJSONSchema,treeifyError,util,version},Symbol.toStringTag,{value:"Module"})),_checks=Object.freeze(Object.defineProperty({__proto__:null,endsWith:_endsWith,gt:_gt,gte:_gte,includes:_includes,length:_length,lowercase:_lowercase,lt:_lt,lte:_lte,maxLength:_maxLength,maxSize:_maxSize,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,negative:_negative,nonnegative:_nonnegative,nonpositive:_nonpositive,normalize:_normalize,overwrite:_overwrite,positive:_positive,property:_property,regex:_regex,size:_size,slugify:_slugify,startsWith:_startsWith,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,trim:_trim,uppercase:_uppercase},Symbol.toStringTag,{value:"Module"})),ZodISODateTime=$constructor("ZodISODateTime",(e,n)=>{$ZodISODateTime.init(e,n),ZodStringFormat.init(e,n)});function datetime(e){return _isoDateTime(ZodISODateTime,e)}s(datetime,"datetime");const ZodISODate=$constructor("ZodISODate",(e,n)=>{$ZodISODate.init(e,n),ZodStringFormat.init(e,n)});function date$2(e){return _isoDate(ZodISODate,e)}s(date$2,"date$2");const ZodISOTime=$constructor("ZodISOTime",(e,n)=>{$ZodISOTime.init(e,n),ZodStringFormat.init(e,n)});function time(e){return _isoTime(ZodISOTime,e)}s(time,"time");const ZodISODuration=$constructor("ZodISODuration",(e,n)=>{$ZodISODuration.init(e,n),ZodStringFormat.init(e,n)});function duration(e){return _isoDuration(ZodISODuration,e)}s(duration,"duration");const _iso=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate,ZodISODateTime,ZodISODuration,ZodISOTime,date:date$2,datetime,duration,time},Symbol.toStringTag,{value:"Module"})),initializer=s((e,n)=>{$ZodError.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:s(r=>formatError(e,r),"value")},flatten:{value:s(r=>flattenError(e,r),"value")},addIssue:{value:s(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jsonStringifyReplacer,2)},"value")},addIssues:{value:s(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jsonStringifyReplacer,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),ZodError=$constructor("ZodError",initializer),ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor("ZodType",(e,n)=>($ZodType.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:createStandardJSONSchemaMethod(e,"input"),output:createStandardJSONSchemaMethod(e,"output")}}),e.toJSONSchema=createToJSONSchemaMethod(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...r)=>e.clone(mergeDefs(n,{checks:[...n.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>clone(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>parse(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>safeParse(e,r,o),e.parseAsync=async(r,o)=>parseAsync(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>safeParseAsync(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>encode(e,r,o),e.decode=(r,o)=>decode(e,r,o),e.encodeAsync=async(r,o)=>encodeAsync(e,r,o),e.decodeAsync=async(r,o)=>decodeAsync(e,r,o),e.safeEncode=(r,o)=>safeEncode(e,r,o),e.safeDecode=(r,o)=>safeDecode(e,r,o),e.safeEncodeAsync=async(r,o)=>safeEncodeAsync(e,r,o),e.safeDecodeAsync=async(r,o)=>safeDecodeAsync(e,r,o),e.refine=(r,o)=>e.check(refine(r,o)),e.superRefine=r=>e.check(superRefine(r)),e.overwrite=r=>e.check(_overwrite(r)),e.optional=()=>optional(e),e.nullable=()=>nullable(e),e.nullish=()=>optional(nullable(e)),e.nonoptional=r=>nonoptional(e,r),e.array=()=>array(e),e.or=r=>union([e,r]),e.and=r=>intersection(e,r),e.transform=r=>pipe(e,transform(r)),e.default=r=>_default(e,r),e.prefault=r=>prefault(e,r),e.catch=r=>_catch(e,r),e.pipe=r=>pipe(e,r),e.readonly=()=>readonly(e),e.describe=r=>{const o=e.clone();return globalRegistry.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return globalRegistry.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return globalRegistry.get(e);const o=e.clone();return globalRegistry.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),_ZodString=$constructor("_ZodString",(e,n)=>{$ZodString.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>stringProcessor(e,o,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(_regex(...o)),e.includes=(...o)=>e.check(_includes(...o)),e.startsWith=(...o)=>e.check(_startsWith(...o)),e.endsWith=(...o)=>e.check(_endsWith(...o)),e.min=(...o)=>e.check(_minLength(...o)),e.max=(...o)=>e.check(_maxLength(...o)),e.length=(...o)=>e.check(_length(...o)),e.nonempty=(...o)=>e.check(_minLength(1,...o)),e.lowercase=o=>e.check(_lowercase(o)),e.uppercase=o=>e.check(_uppercase(o)),e.trim=()=>e.check(_trim()),e.normalize=(...o)=>e.check(_normalize(...o)),e.toLowerCase=()=>e.check(_toLowerCase()),e.toUpperCase=()=>e.check(_toUpperCase()),e.slugify=()=>e.check(_slugify())}),ZodString=$constructor("ZodString",(e,n)=>{$ZodString.init(e,n),_ZodString.init(e,n),e.email=r=>e.check(_email(ZodEmail,r)),e.url=r=>e.check(_url(ZodURL,r)),e.jwt=r=>e.check(_jwt(ZodJWT,r)),e.emoji=r=>e.check(_emoji(ZodEmoji,r)),e.guid=r=>e.check(_guid(ZodGUID,r)),e.uuid=r=>e.check(_uuid(ZodUUID,r)),e.uuidv4=r=>e.check(_uuidv4(ZodUUID,r)),e.uuidv6=r=>e.check(_uuidv6(ZodUUID,r)),e.uuidv7=r=>e.check(_uuidv7(ZodUUID,r)),e.nanoid=r=>e.check(_nanoid(ZodNanoID,r)),e.guid=r=>e.check(_guid(ZodGUID,r)),e.cuid=r=>e.check(_cuid(ZodCUID,r)),e.cuid2=r=>e.check(_cuid2(ZodCUID2,r)),e.ulid=r=>e.check(_ulid(ZodULID,r)),e.base64=r=>e.check(_base64(ZodBase64,r)),e.base64url=r=>e.check(_base64url(ZodBase64URL,r)),e.xid=r=>e.check(_xid(ZodXID,r)),e.ksuid=r=>e.check(_ksuid(ZodKSUID,r)),e.ipv4=r=>e.check(_ipv4(ZodIPv4,r)),e.ipv6=r=>e.check(_ipv6(ZodIPv6,r)),e.cidrv4=r=>e.check(_cidrv4(ZodCIDRv4,r)),e.cidrv6=r=>e.check(_cidrv6(ZodCIDRv6,r)),e.e164=r=>e.check(_e164(ZodE164,r)),e.datetime=r=>e.check(datetime(r)),e.date=r=>e.check(date$2(r)),e.time=r=>e.check(time(r)),e.duration=r=>e.check(duration(r))});function string$1(e){return _string(ZodString,e)}s(string$1,"string$1");const ZodStringFormat=$constructor("ZodStringFormat",(e,n)=>{$ZodStringFormat.init(e,n),_ZodString.init(e,n)}),ZodEmail=$constructor("ZodEmail",(e,n)=>{$ZodEmail.init(e,n),ZodStringFormat.init(e,n)});function email(e){return _email(ZodEmail,e)}s(email,"email");const ZodGUID=$constructor("ZodGUID",(e,n)=>{$ZodGUID.init(e,n),ZodStringFormat.init(e,n)});function guid(e){return _guid(ZodGUID,e)}s(guid,"guid");const ZodUUID=$constructor("ZodUUID",(e,n)=>{$ZodUUID.init(e,n),ZodStringFormat.init(e,n)});function uuid(e){return _uuid(ZodUUID,e)}s(uuid,"uuid");function uuidv4(e){return _uuidv4(ZodUUID,e)}s(uuidv4,"uuidv4");function uuidv6(e){return _uuidv6(ZodUUID,e)}s(uuidv6,"uuidv6");function uuidv7(e){return _uuidv7(ZodUUID,e)}s(uuidv7,"uuidv7");const ZodURL=$constructor("ZodURL",(e,n)=>{$ZodURL.init(e,n),ZodStringFormat.init(e,n)});function url(e){return _url(ZodURL,e)}s(url,"url");function httpUrl(e){return _url(ZodURL,{protocol:/^https?$/,hostname:domain,...normalizeParams(e)})}s(httpUrl,"httpUrl");const ZodEmoji=$constructor("ZodEmoji",(e,n)=>{$ZodEmoji.init(e,n),ZodStringFormat.init(e,n)});function emoji(e){return _emoji(ZodEmoji,e)}s(emoji,"emoji");const ZodNanoID=$constructor("ZodNanoID",(e,n)=>{$ZodNanoID.init(e,n),ZodStringFormat.init(e,n)});function nanoid(e){return _nanoid(ZodNanoID,e)}s(nanoid,"nanoid");const ZodCUID=$constructor("ZodCUID",(e,n)=>{$ZodCUID.init(e,n),ZodStringFormat.init(e,n)});function cuid(e){return _cuid(ZodCUID,e)}s(cuid,"cuid");const ZodCUID2=$constructor("ZodCUID2",(e,n)=>{$ZodCUID2.init(e,n),ZodStringFormat.init(e,n)});function cuid2(e){return _cuid2(ZodCUID2,e)}s(cuid2,"cuid2");const ZodULID=$constructor("ZodULID",(e,n)=>{$ZodULID.init(e,n),ZodStringFormat.init(e,n)});function ulid(e){return _ulid(ZodULID,e)}s(ulid,"ulid");const ZodXID=$constructor("ZodXID",(e,n)=>{$ZodXID.init(e,n),ZodStringFormat.init(e,n)});function xid(e){return _xid(ZodXID,e)}s(xid,"xid");const ZodKSUID=$constructor("ZodKSUID",(e,n)=>{$ZodKSUID.init(e,n),ZodStringFormat.init(e,n)});function ksuid(e){return _ksuid(ZodKSUID,e)}s(ksuid,"ksuid");const ZodIPv4=$constructor("ZodIPv4",(e,n)=>{$ZodIPv4.init(e,n),ZodStringFormat.init(e,n)});function ipv4(e){return _ipv4(ZodIPv4,e)}s(ipv4,"ipv4");const ZodMAC=$constructor("ZodMAC",(e,n)=>{$ZodMAC.init(e,n),ZodStringFormat.init(e,n)});function mac(e){return _mac(ZodMAC,e)}s(mac,"mac");const ZodIPv6=$constructor("ZodIPv6",(e,n)=>{$ZodIPv6.init(e,n),ZodStringFormat.init(e,n)});function ipv6(e){return _ipv6(ZodIPv6,e)}s(ipv6,"ipv6");const ZodCIDRv4=$constructor("ZodCIDRv4",(e,n)=>{$ZodCIDRv4.init(e,n),ZodStringFormat.init(e,n)});function cidrv4(e){return _cidrv4(ZodCIDRv4,e)}s(cidrv4,"cidrv4");const ZodCIDRv6=$constructor("ZodCIDRv6",(e,n)=>{$ZodCIDRv6.init(e,n),ZodStringFormat.init(e,n)});function cidrv6(e){return _cidrv6(ZodCIDRv6,e)}s(cidrv6,"cidrv6");const ZodBase64=$constructor("ZodBase64",(e,n)=>{$ZodBase64.init(e,n),ZodStringFormat.init(e,n)});function base64(e){return _base64(ZodBase64,e)}s(base64,"base64");const ZodBase64URL=$constructor("ZodBase64URL",(e,n)=>{$ZodBase64URL.init(e,n),ZodStringFormat.init(e,n)});function base64url(e){return _base64url(ZodBase64URL,e)}s(base64url,"base64url");const ZodE164=$constructor("ZodE164",(e,n)=>{$ZodE164.init(e,n),ZodStringFormat.init(e,n)});function e164(e){return _e164(ZodE164,e)}s(e164,"e164");const ZodJWT=$constructor("ZodJWT",(e,n)=>{$ZodJWT.init(e,n),ZodStringFormat.init(e,n)});function jwt(e){return _jwt(ZodJWT,e)}s(jwt,"jwt");const ZodCustomStringFormat=$constructor("ZodCustomStringFormat",(e,n)=>{$ZodCustomStringFormat.init(e,n),ZodStringFormat.init(e,n)});function stringFormat(e,n,r={}){return _stringFormat(ZodCustomStringFormat,e,n,r)}s(stringFormat,"stringFormat");function hostname(e){return _stringFormat(ZodCustomStringFormat,"hostname",hostname$1,e)}s(hostname,"hostname");function hex(e){return _stringFormat(ZodCustomStringFormat,"hex",hex$1,e)}s(hex,"hex");function hash(e,n){const r=n?.enc??"hex",o=`${e}_${r}`,t=regexes[o];if(!t)throw new Error(`Unrecognized hash format: ${o}`);return _stringFormat(ZodCustomStringFormat,o,t,n)}s(hash,"hash");const ZodNumber=$constructor("ZodNumber",(e,n)=>{$ZodNumber.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>numberProcessor(e,o,t),e.gt=(o,t)=>e.check(_gt(o,t)),e.gte=(o,t)=>e.check(_gte(o,t)),e.min=(o,t)=>e.check(_gte(o,t)),e.lt=(o,t)=>e.check(_lt(o,t)),e.lte=(o,t)=>e.check(_lte(o,t)),e.max=(o,t)=>e.check(_lte(o,t)),e.int=o=>e.check(int(o)),e.safe=o=>e.check(int(o)),e.positive=o=>e.check(_gt(0,o)),e.nonnegative=o=>e.check(_gte(0,o)),e.negative=o=>e.check(_lt(0,o)),e.nonpositive=o=>e.check(_lte(0,o)),e.multipleOf=(o,t)=>e.check(_multipleOf(o,t)),e.step=(o,t)=>e.check(_multipleOf(o,t)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function number$1(e){return _number(ZodNumber,e)}s(number$1,"number$1");const ZodNumberFormat=$constructor("ZodNumberFormat",(e,n)=>{$ZodNumberFormat.init(e,n),ZodNumber.init(e,n)});function int(e){return _int(ZodNumberFormat,e)}s(int,"int");function float32(e){return _float32(ZodNumberFormat,e)}s(float32,"float32");function float64(e){return _float64(ZodNumberFormat,e)}s(float64,"float64");function int32(e){return _int32(ZodNumberFormat,e)}s(int32,"int32");function uint32(e){return _uint32(ZodNumberFormat,e)}s(uint32,"uint32");const ZodBoolean=$constructor("ZodBoolean",(e,n)=>{$ZodBoolean.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>booleanProcessor(e,r,o)});function boolean$1(e){return _boolean(ZodBoolean,e)}s(boolean$1,"boolean$1");const ZodBigInt=$constructor("ZodBigInt",(e,n)=>{$ZodBigInt.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>bigintProcessor(e,o),e.gte=(o,t)=>e.check(_gte(o,t)),e.min=(o,t)=>e.check(_gte(o,t)),e.gt=(o,t)=>e.check(_gt(o,t)),e.gte=(o,t)=>e.check(_gte(o,t)),e.min=(o,t)=>e.check(_gte(o,t)),e.lt=(o,t)=>e.check(_lt(o,t)),e.lte=(o,t)=>e.check(_lte(o,t)),e.max=(o,t)=>e.check(_lte(o,t)),e.positive=o=>e.check(_gt(BigInt(0),o)),e.negative=o=>e.check(_lt(BigInt(0),o)),e.nonpositive=o=>e.check(_lte(BigInt(0),o)),e.nonnegative=o=>e.check(_gte(BigInt(0),o)),e.multipleOf=(o,t)=>e.check(_multipleOf(o,t));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function bigint$1(e){return _bigint(ZodBigInt,e)}s(bigint$1,"bigint$1");const ZodBigIntFormat=$constructor("ZodBigIntFormat",(e,n)=>{$ZodBigIntFormat.init(e,n),ZodBigInt.init(e,n)});function int64(e){return _int64(ZodBigIntFormat,e)}s(int64,"int64");function uint64(e){return _uint64(ZodBigIntFormat,e)}s(uint64,"uint64");const ZodSymbol=$constructor("ZodSymbol",(e,n)=>{$ZodSymbol.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>symbolProcessor(e,r)});function symbol(e){return _symbol(ZodSymbol,e)}s(symbol,"symbol");const ZodUndefined=$constructor("ZodUndefined",(e,n)=>{$ZodUndefined.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>undefinedProcessor(e,r)});function _undefined(e){return _undefined$1(ZodUndefined,e)}s(_undefined,"_undefined");const ZodNull=$constructor("ZodNull",(e,n)=>{$ZodNull.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nullProcessor(e,r,o)});function _null(e){return _null$1(ZodNull,e)}s(_null,"_null");const ZodAny=$constructor("ZodAny",(e,n)=>{$ZodAny.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>anyProcessor()});function any(){return _any(ZodAny)}s(any,"any");const ZodUnknown=$constructor("ZodUnknown",(e,n)=>{$ZodUnknown.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>unknownProcessor()});function unknown(){return _unknown(ZodUnknown)}s(unknown,"unknown");const ZodNever=$constructor("ZodNever",(e,n)=>{$ZodNever.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>neverProcessor(e,r,o)});function never(e){return _never(ZodNever,e)}s(never,"never");const ZodVoid=$constructor("ZodVoid",(e,n)=>{$ZodVoid.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>voidProcessor(e,r)});function _void(e){return _void$1(ZodVoid,e)}s(_void,"_void");const ZodDate=$constructor("ZodDate",(e,n)=>{$ZodDate.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>dateProcessor(e,o),e.min=(o,t)=>e.check(_gte(o,t)),e.max=(o,t)=>e.check(_lte(o,t));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function date$1(e){return _date(ZodDate,e)}s(date$1,"date$1");const ZodArray=$constructor("ZodArray",(e,n)=>{$ZodArray.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>arrayProcessor(e,r,o,t),e.element=n.element,e.min=(r,o)=>e.check(_minLength(r,o)),e.nonempty=r=>e.check(_minLength(1,r)),e.max=(r,o)=>e.check(_maxLength(r,o)),e.length=(r,o)=>e.check(_length(r,o)),e.unwrap=()=>e.element});function array(e,n){return _array(ZodArray,e,n)}s(array,"array");function keyof(e){const n=e._zod.def.shape;return _enum(Object.keys(n))}s(keyof,"keyof");const ZodObject=$constructor("ZodObject",(e,n)=>{$ZodObjectJIT.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>objectProcessor(e,r,o,t),defineLazy(e,"shape",()=>n.shape),e.keyof=()=>_enum(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:unknown()}),e.loose=()=>e.clone({...e._zod.def,catchall:unknown()}),e.strict=()=>e.clone({...e._zod.def,catchall:never()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>extend(e,r),e.safeExtend=r=>safeExtend(e,r),e.merge=r=>merge(e,r),e.pick=r=>pick(e,r),e.omit=r=>omit(e,r),e.partial=(...r)=>partial(ZodOptional,e,r[0]),e.required=(...r)=>required(ZodNonOptional,e,r[0])});function object(e,n){const r={type:"object",shape:e??{},...normalizeParams(n)};return new ZodObject(r)}s(object,"object");function strictObject(e,n){return new ZodObject({type:"object",shape:e,catchall:never(),...normalizeParams(n)})}s(strictObject,"strictObject");function looseObject(e,n){return new ZodObject({type:"object",shape:e,catchall:unknown(),...normalizeParams(n)})}s(looseObject,"looseObject");const ZodUnion=$constructor("ZodUnion",(e,n)=>{$ZodUnion.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>unionProcessor(e,r,o,t),e.options=n.options});function union(e,n){return new ZodUnion({type:"union",options:e,...normalizeParams(n)})}s(union,"union");const ZodXor=$constructor("ZodXor",(e,n)=>{ZodUnion.init(e,n),$ZodXor.init(e,n),e._zod.processJSONSchema=(r,o,t)=>unionProcessor(e,r,o,t),e.options=n.options});function xor(e,n){return new ZodXor({type:"union",options:e,inclusive:!1,...normalizeParams(n)})}s(xor,"xor");const ZodDiscriminatedUnion=$constructor("ZodDiscriminatedUnion",(e,n)=>{ZodUnion.init(e,n),$ZodDiscriminatedUnion.init(e,n)});function discriminatedUnion(e,n,r){return new ZodDiscriminatedUnion({type:"union",options:n,discriminator:e,...normalizeParams(r)})}s(discriminatedUnion,"discriminatedUnion");const ZodIntersection=$constructor("ZodIntersection",(e,n)=>{$ZodIntersection.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>intersectionProcessor(e,r,o,t)});function intersection(e,n){return new ZodIntersection({type:"intersection",left:e,right:n})}s(intersection,"intersection");const ZodTuple=$constructor("ZodTuple",(e,n)=>{$ZodTuple.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>tupleProcessor(e,r,o,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function tuple(e,n,r){const o=n instanceof $ZodType,t=o?r:n,i=o?n:null;return new ZodTuple({type:"tuple",items:e,rest:i,...normalizeParams(t)})}s(tuple,"tuple");const ZodRecord=$constructor("ZodRecord",(e,n)=>{$ZodRecord.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>recordProcessor(e,r,o,t),e.keyType=n.keyType,e.valueType=n.valueType});function record(e,n,r){return new ZodRecord({type:"record",keyType:e,valueType:n,...normalizeParams(r)})}s(record,"record");function partialRecord(e,n,r){const o=clone(e);return o._zod.values=void 0,new ZodRecord({type:"record",keyType:o,valueType:n,...normalizeParams(r)})}s(partialRecord,"partialRecord");function looseRecord(e,n,r){return new ZodRecord({type:"record",keyType:e,valueType:n,mode:"loose",...normalizeParams(r)})}s(looseRecord,"looseRecord");const ZodMap=$constructor("ZodMap",(e,n)=>{$ZodMap.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>mapProcessor(e,r),e.keyType=n.keyType,e.valueType=n.valueType});function map(e,n,r){return new ZodMap({type:"map",keyType:e,valueType:n,...normalizeParams(r)})}s(map,"map");const ZodSet=$constructor("ZodSet",(e,n)=>{$ZodSet.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>setProcessor(e,r),e.min=(...r)=>e.check(_minSize(...r)),e.nonempty=r=>e.check(_minSize(1,r)),e.max=(...r)=>e.check(_maxSize(...r)),e.size=(...r)=>e.check(_size(...r))});function set(e,n){return new ZodSet({type:"set",valueType:e,...normalizeParams(n)})}s(set,"set");const ZodEnum=$constructor("ZodEnum",(e,n)=>{$ZodEnum.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(o,t,i)=>enumProcessor(e,o,t),e.enum=n.entries,e.options=Object.values(n.entries);const r=new Set(Object.keys(n.entries));e.extract=(o,t)=>{const i={};for(const a of o)if(r.has(a))i[a]=n.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ZodEnum({...n,checks:[],...normalizeParams(t),entries:i})},e.exclude=(o,t)=>{const i={...n.entries};for(const a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ZodEnum({...n,checks:[],...normalizeParams(t),entries:i})}});function _enum(e,n){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ZodEnum({type:"enum",entries:r,...normalizeParams(n)})}s(_enum,"_enum");function nativeEnum(e,n){return new ZodEnum({type:"enum",entries:e,...normalizeParams(n)})}s(nativeEnum,"nativeEnum");const ZodLiteral=$constructor("ZodLiteral",(e,n)=>{$ZodLiteral.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>literalProcessor(e,r,o),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function literal(e,n){return new ZodLiteral({type:"literal",values:Array.isArray(e)?e:[e],...normalizeParams(n)})}s(literal,"literal");const ZodFile=$constructor("ZodFile",(e,n)=>{$ZodFile.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>fileProcessor(e,r,o),e.min=(r,o)=>e.check(_minSize(r,o)),e.max=(r,o)=>e.check(_maxSize(r,o)),e.mime=(r,o)=>e.check(_mime(Array.isArray(r)?r:[r],o))});function file(e){return _file(ZodFile,e)}s(file,"file");const ZodTransform=$constructor("ZodTransform",(e,n)=>{$ZodTransform.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>transformProcessor(e,r),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $ZodEncodeError(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(issue(i,r.value,n));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(issue(a))}};const t=n.transform(r.value,r);return t instanceof Promise?t.then(i=>(r.value=i,r)):(r.value=t,r)}});function transform(e){return new ZodTransform({type:"transform",transform:e})}s(transform,"transform");const ZodOptional=$constructor("ZodOptional",(e,n)=>{$ZodOptional.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>optionalProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function optional(e){return new ZodOptional({type:"optional",innerType:e})}s(optional,"optional");const ZodNullable=$constructor("ZodNullable",(e,n)=>{$ZodNullable.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nullableProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function nullable(e){return new ZodNullable({type:"nullable",innerType:e})}s(nullable,"nullable");function nullish(e){return optional(nullable(e))}s(nullish,"nullish");const ZodDefault=$constructor("ZodDefault",(e,n)=>{$ZodDefault.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>defaultProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _default(e,n){return new ZodDefault({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():shallowClone(n)}})}s(_default,"_default");const ZodPrefault=$constructor("ZodPrefault",(e,n)=>{$ZodPrefault.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>prefaultProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function prefault(e,n){return new ZodPrefault({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():shallowClone(n)}})}s(prefault,"prefault");const ZodNonOptional=$constructor("ZodNonOptional",(e,n)=>{$ZodNonOptional.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nonoptionalProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function nonoptional(e,n){return new ZodNonOptional({type:"nonoptional",innerType:e,...normalizeParams(n)})}s(nonoptional,"nonoptional");const ZodSuccess=$constructor("ZodSuccess",(e,n)=>{$ZodSuccess.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>successProcessor(e,r,o),e.unwrap=()=>e._zod.def.innerType});function success(e){return new ZodSuccess({type:"success",innerType:e})}s(success,"success");const ZodCatch=$constructor("ZodCatch",(e,n)=>{$ZodCatch.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>catchProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _catch(e,n){return new ZodCatch({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}s(_catch,"_catch");const ZodNaN=$constructor("ZodNaN",(e,n)=>{$ZodNaN.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>nanProcessor(e,r)});function nan(e){return _nan(ZodNaN,e)}s(nan,"nan");const ZodPipe=$constructor("ZodPipe",(e,n)=>{$ZodPipe.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>pipeProcessor(e,r,o,t),e.in=n.in,e.out=n.out});function pipe(e,n){return new ZodPipe({type:"pipe",in:e,out:n})}s(pipe,"pipe");const ZodCodec=$constructor("ZodCodec",(e,n)=>{ZodPipe.init(e,n),$ZodCodec.init(e,n)});function codec(e,n,r){return new ZodCodec({type:"pipe",in:e,out:n,transform:r.decode,reverseTransform:r.encode})}s(codec,"codec");const ZodReadonly=$constructor("ZodReadonly",(e,n)=>{$ZodReadonly.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>readonlyProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function readonly(e){return new ZodReadonly({type:"readonly",innerType:e})}s(readonly,"readonly");const ZodTemplateLiteral=$constructor("ZodTemplateLiteral",(e,n)=>{$ZodTemplateLiteral.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>templateLiteralProcessor(e,r,o)});function templateLiteral(e,n){return new ZodTemplateLiteral({type:"template_literal",parts:e,...normalizeParams(n)})}s(templateLiteral,"templateLiteral");const ZodLazy=$constructor("ZodLazy",(e,n)=>{$ZodLazy.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>lazyProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.getter()});function lazy(e){return new ZodLazy({type:"lazy",getter:e})}s(lazy,"lazy");const ZodPromise=$constructor("ZodPromise",(e,n)=>{$ZodPromise.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>promiseProcessor(e,r,o,t),e.unwrap=()=>e._zod.def.innerType});function promise(e){return new ZodPromise({type:"promise",innerType:e})}s(promise,"promise");const ZodFunction=$constructor("ZodFunction",(e,n)=>{$ZodFunction.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>functionProcessor(e,r)});function _function(e){return new ZodFunction({type:"function",input:Array.isArray(e?.input)?tuple(e?.input):e?.input??array(unknown()),output:e?.output??unknown()})}s(_function,"_function");const ZodCustom=$constructor("ZodCustom",(e,n)=>{$ZodCustom.init(e,n),ZodType.init(e,n),e._zod.processJSONSchema=(r,o,t)=>customProcessor(e,r)});function check(e){const n=new $ZodCheck({check:"custom"});return n._zod.check=e,n}s(check,"check");function custom(e,n){return _custom(ZodCustom,e??(()=>!0),n)}s(custom,"custom");function refine(e,n={}){return _refine(ZodCustom,e,n)}s(refine,"refine");function superRefine(e){return _superRefine(e)}s(superRefine,"superRefine");const describe=describe$1,meta=meta$1;function _instanceof(e,n={error:`Input not instance of ${e.name}`}){const r=new ZodCustom({type:"custom",check:"custom",fn:s(o=>o instanceof e,"fn"),abort:!0,...normalizeParams(n)});return r._zod.bag.Class=e,r}s(_instanceof,"_instanceof");const stringbool=s((...e)=>_stringbool({Codec:ZodCodec,Boolean:ZodBoolean,String:ZodString},...e),"stringbool");function json(e){const n=lazy(()=>union([string$1(e),number$1(),boolean$1(),_null(),array(n),record(string$1(),n)]));return n}s(json,"json");function preprocess(e,n){return pipe(transform(e),n)}s(preprocess,"preprocess");const _schemas=Object.freeze(Object.defineProperty({__proto__:null,ZodAny,ZodArray,ZodBase64,ZodBase64URL,ZodBigInt,ZodBigIntFormat,ZodBoolean,ZodCIDRv4,ZodCIDRv6,ZodCUID,ZodCUID2,ZodCatch,ZodCodec,ZodCustom,ZodCustomStringFormat,ZodDate,ZodDefault,ZodDiscriminatedUnion,ZodE164,ZodEmail,ZodEmoji,ZodEnum,ZodFile,ZodFunction,ZodGUID,ZodIPv4,ZodIPv6,ZodIntersection,ZodJWT,ZodKSUID,ZodLazy,ZodLiteral,ZodMAC,ZodMap,ZodNaN,ZodNanoID,ZodNever,ZodNonOptional,ZodNull,ZodNullable,ZodNumber,ZodNumberFormat,ZodObject,ZodOptional,ZodPipe,ZodPrefault,ZodPromise,ZodReadonly,ZodRecord,ZodSet,ZodString,ZodStringFormat,ZodSuccess,ZodSymbol,ZodTemplateLiteral,ZodTransform,ZodTuple,ZodType,ZodULID,ZodURL,ZodUUID,ZodUndefined,ZodUnion,ZodUnknown,ZodVoid,ZodXID,ZodXor,_ZodString,_default,_function,any,array,base64,base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check,cidrv4,cidrv6,codec,cuid,cuid2,custom,date:date$1,describe,discriminatedUnion,e164,email,emoji,enum:_enum,file,float32,float64,function:_function,guid,hash,hex,hostname,httpUrl,instanceof:_instanceof,int,int32,int64,intersection,ipv4,ipv6,json,jwt,keyof,ksuid,lazy,literal,looseObject,looseRecord,mac,map,meta,nan,nanoid,nativeEnum,never,nonoptional,null:_null,nullable,nullish,number:number$1,object,optional,partialRecord,pipe,prefault,preprocess,promise,readonly,record,refine,set,strictObject,string:string$1,stringFormat,stringbool,success,superRefine,symbol,templateLiteral,transform,tuple,uint32,uint64,ulid,undefined:_undefined,union,unknown,url,uuid,uuidv4,uuidv6,uuidv7,void:_void,xid,xor},Symbol.toStringTag,{value:"Module"})),ZodIssueCode={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 setErrorMap(e){config({customError:e})}s(setErrorMap,"setErrorMap");function getErrorMap(){return config().customError}s(getErrorMap,"getErrorMap");var ZodFirstPartyTypeKind;ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={});const z$1={..._schemas,..._checks,iso:_iso};function detectVersion(e,n){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":n??"draft-2020-12"}s(detectVersion,"detectVersion");function resolveRef(e,n){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return n.rootSchema;const o=n.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){const t=r[1];if(!t||!n.defs[t])throw new Error(`Reference not found: ${e}`);return n.defs[t]}throw new Error(`Reference not found: ${e}`)}s(resolveRef,"resolveRef");function convertBaseSchema(e,n){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return z$1.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const t=e.$ref;if(n.refs.has(t))return n.refs.get(t);if(n.processing.has(t))return z$1.lazy(()=>{if(!n.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return n.refs.get(t)});n.processing.add(t);const i=resolveRef(t,n),a=convertSchema(i,n);return n.refs.set(t,a),n.processing.delete(t),a}if(e.enum!==void 0){const t=e.enum;if(n.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return z$1.null();if(t.length===0)return z$1.never();if(t.length===1)return z$1.literal(t[0]);if(t.every(a=>typeof a=="string"))return z$1.enum(t);const i=t.map(a=>z$1.literal(a));return i.length<2?i[0]:z$1.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return z$1.literal(e.const);const r=e.type;if(Array.isArray(r)){const t=r.map(i=>{const a={...e,type:i};return convertBaseSchema(a,n)});return t.length===0?z$1.never():t.length===1?t[0]:z$1.union(t)}if(!r)return z$1.any();let o;switch(r){case"string":{let t=z$1.string();if(e.format){const i=e.format;i==="email"?t=t.check(z$1.email()):i==="uri"||i==="uri-reference"?t=t.check(z$1.url()):i==="uuid"||i==="guid"?t=t.check(z$1.uuid()):i==="date-time"?t=t.check(z$1.iso.datetime()):i==="date"?t=t.check(z$1.iso.date()):i==="time"?t=t.check(z$1.iso.time()):i==="duration"?t=t.check(z$1.iso.duration()):i==="ipv4"?t=t.check(z$1.ipv4()):i==="ipv6"?t=t.check(z$1.ipv6()):i==="mac"?t=t.check(z$1.mac()):i==="cidr"?t=t.check(z$1.cidrv4()):i==="cidr-v6"?t=t.check(z$1.cidrv6()):i==="base64"?t=t.check(z$1.base64()):i==="base64url"?t=t.check(z$1.base64url()):i==="e164"?t=t.check(z$1.e164()):i==="jwt"?t=t.check(z$1.jwt()):i==="emoji"?t=t.check(z$1.emoji()):i==="nanoid"?t=t.check(z$1.nanoid()):i==="cuid"?t=t.check(z$1.cuid()):i==="cuid2"?t=t.check(z$1.cuid2()):i==="ulid"?t=t.check(z$1.ulid()):i==="xid"?t=t.check(z$1.xid()):i==="ksuid"&&(t=t.check(z$1.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),o=t;break}case"number":case"integer":{let t=r==="integer"?z$1.number().int():z$1.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),o=t;break}case"boolean":{o=z$1.boolean();break}case"null":{o=z$1.null();break}case"object":{const t={},i=e.properties||{},a=new Set(e.required||[]);for(const[u,l]of Object.entries(i)){const d=convertSchema(l,n);t[u]=a.has(u)?d:d.optional()}if(e.propertyNames){const u=convertSchema(e.propertyNames,n),l=e.additionalProperties&&typeof e.additionalProperties=="object"?convertSchema(e.additionalProperties,n):z$1.any();if(Object.keys(t).length===0){o=z$1.record(u,l);break}const d=z$1.object(t).passthrough(),f=z$1.looseRecord(u,l);o=z$1.intersection(d,f);break}if(e.patternProperties){const u=e.patternProperties,l=Object.keys(u),d=[];for(const g of l){const h=convertSchema(u[g],n),$=z$1.string().regex(new RegExp(g));d.push(z$1.looseRecord($,h))}const f=[];if(Object.keys(t).length>0&&f.push(z$1.object(t).passthrough()),f.push(...d),f.length===0)o=z$1.object({}).passthrough();else if(f.length===1)o=f[0];else{let g=z$1.intersection(f[0],f[1]);for(let h=2;h<f.length;h++)g=z$1.intersection(g,f[h]);o=g}break}const c=z$1.object(t);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(convertSchema(e.additionalProperties,n)):o=c.passthrough();break}case"array":{const t=e.prefixItems,i=e.items;if(t&&Array.isArray(t)){const a=t.map(u=>convertSchema(u,n)),c=i&&typeof i=="object"&&!Array.isArray(i)?convertSchema(i,n):void 0;c?o=z$1.tuple(a).rest(c):o=z$1.tuple(a),typeof e.minItems=="number"&&(o=o.check(z$1.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(z$1.maxLength(e.maxItems)))}else if(Array.isArray(i)){const a=i.map(u=>convertSchema(u,n)),c=e.additionalItems&&typeof e.additionalItems=="object"?convertSchema(e.additionalItems,n):void 0;c?o=z$1.tuple(a).rest(c):o=z$1.tuple(a),typeof e.minItems=="number"&&(o=o.check(z$1.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(z$1.maxLength(e.maxItems)))}else if(i!==void 0){const a=convertSchema(i,n);let c=z$1.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=z$1.array(z$1.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}s(convertBaseSchema,"convertBaseSchema");function convertSchema(e,n){if(typeof e=="boolean")return e?z$1.any():z$1.never();let r=convertBaseSchema(e,n);const o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const t=e.anyOf.map(a=>convertSchema(a,n)),i=z$1.union(t);r=o?z$1.intersection(r,i):i}if(e.oneOf&&Array.isArray(e.oneOf)){const t=e.oneOf.map(a=>convertSchema(a,n)),i=z$1.xor(t);r=o?z$1.intersection(r,i):i}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:z$1.any();else{let t=o?r:convertSchema(e.allOf[0],n);const i=o?0:1;for(let a=i;a<e.allOf.length;a++)t=z$1.intersection(t,convertSchema(e.allOf[a],n));r=t}return e.nullable===!0&&n.version==="openapi-3.0"&&(r=z$1.nullable(r)),e.readOnly===!0&&(r=z$1.readonly(r)),r}s(convertSchema,"convertSchema");function fromJSONSchema(e,n){if(typeof e=="boolean")return e?z$1.any():z$1.never();const r=detectVersion(e,n?.defaultTarget),o=e.$defs||e.definitions||{};return convertSchema(e,{version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e})}s(fromJSONSchema,"fromJSONSchema");function string(e){return _coercedString(ZodString,e)}s(string,"string");function number(e){return _coercedNumber(ZodNumber,e)}s(number,"number");function boolean(e){return _coercedBoolean(ZodBoolean,e)}s(boolean,"boolean");function bigint(e){return _coercedBigint(ZodBigInt,e)}s(bigint,"bigint");function date(e){return _coercedDate(ZodDate,e)}s(date,"date");const coerce=Object.freeze(Object.defineProperty({__proto__:null,bigint,boolean,date,number,string},Symbol.toStringTag,{value:"Module"}));config(en());const z=Object.freeze(Object.defineProperty({__proto__:null,$brand,$input,$output,NEVER,TimePrecision,ZodAny,ZodArray,ZodBase64,ZodBase64URL,ZodBigInt,ZodBigIntFormat,ZodBoolean,ZodCIDRv4,ZodCIDRv6,ZodCUID,ZodCUID2,ZodCatch,ZodCodec,ZodCustom,ZodCustomStringFormat,ZodDate,ZodDefault,ZodDiscriminatedUnion,ZodE164,ZodEmail,ZodEmoji,ZodEnum,ZodError,ZodFile,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},ZodFunction,ZodGUID,ZodIPv4,ZodIPv6,ZodISODate,ZodISODateTime,ZodISODuration,ZodISOTime,ZodIntersection,ZodIssueCode,ZodJWT,ZodKSUID,ZodLazy,ZodLiteral,ZodMAC,ZodMap,ZodNaN,ZodNanoID,ZodNever,ZodNonOptional,ZodNull,ZodNullable,ZodNumber,ZodNumberFormat,ZodObject,ZodOptional,ZodPipe,ZodPrefault,ZodPromise,ZodReadonly,ZodRealError,ZodRecord,ZodSet,ZodString,ZodStringFormat,ZodSuccess,ZodSymbol,ZodTemplateLiteral,ZodTransform,ZodTuple,ZodType,ZodULID,ZodURL,ZodUUID,ZodUndefined,ZodUnion,ZodUnknown,ZodVoid,ZodXID,ZodXor,_ZodString,_default,_function,any,array,base64,base64url,bigint:bigint$1,boolean:boolean$1,catch:_catch,check,cidrv4,cidrv6,clone,codec,coerce,config,core:index,cuid,cuid2,custom,date:date$1,decode,decodeAsync,describe,discriminatedUnion,e164,email,emoji,encode,encodeAsync,endsWith:_endsWith,enum:_enum,file,flattenError,float32,float64,formatError,fromJSONSchema,function:_function,getErrorMap,globalRegistry,gt:_gt,gte:_gte,guid,hash,hex,hostname,httpUrl,includes:_includes,instanceof:_instanceof,int,int32,int64,intersection,ipv4,ipv6,iso:_iso,json,jwt,keyof,ksuid,lazy,length:_length,literal,locales:index$1,looseObject,looseRecord,lowercase:_lowercase,lt:_lt,lte:_lte,mac,map,maxLength:_maxLength,maxSize:_maxSize,meta,mime:_mime,minLength:_minLength,minSize:_minSize,multipleOf:_multipleOf,nan,nanoid,nativeEnum,negative:_negative,never,nonnegative:_nonnegative,nonoptional,nonpositive:_nonpositive,normalize:_normalize,null:_null,nullable,nullish,number:number$1,object,optional,overwrite:_overwrite,parse,parseAsync,partialRecord,pipe,positive:_positive,prefault,preprocess,prettifyError,promise,property:_property,readonly,record,refine,regex:_regex,regexes,registry,safeDecode,safeDecodeAsync,safeEncode,safeEncodeAsync,safeParse,safeParseAsync,set,setErrorMap,size:_size,slugify:_slugify,startsWith:_startsWith,strictObject,string:string$1,stringFormat,stringbool,success,superRefine,symbol,templateLiteral,toJSONSchema,toLowerCase:_toLowerCase,toUpperCase:_toUpperCase,transform,treeifyError,trim:_trim,tuple,uint32,uint64,ulid,undefined:_undefined,union,unknown,uppercase:_uppercase,url,util,uuid,uuidv4,uuidv6,uuidv7,void:_void,xid,xor},Symbol.toStringTag,{value:"Module"}));function debug(e){console.debug(chalk.gray("[LLM]"),e)}s(debug,"debug");function zodToOpenAITool(e,n){return{type:"function",function:{name:e,description:n.description,parameters:toJSONSchema(n.inputSchema,{target:"openapi-3.0"})}}}s(zodToOpenAITool,"zodToOpenAITool");function lenientParseMacroToolCall(e,n){const r=e.choices?.[0];if(!r)throw new InvokeError(InvokeErrorType.UNKNOWN,"No choices in response",e);switch(r.finish_reason){case"tool_calls":case"function_call":case"stop":break;case"length":throw new InvokeError(InvokeErrorType.CONTEXT_LENGTH,"Response truncated: max tokens reached");case"content_filter":throw new InvokeError(InvokeErrorType.CONTENT_FILTER,"Content filtered by safety system");default:throw new InvokeError(InvokeErrorType.UNKNOWN,`Unexpected finish_reason: ${r.finish_reason}`)}if(!n.shape.action)throw new Error('inputSchema must have an "action" field');let t=null;const i=r.message?.tool_calls?.[0]?.function;if(t=i?.arguments??null,t&&i.name!=="AgentOutput"){console.log(chalk.yellow("lenientParseMacroToolCall: #1 fixing incorrect tool call"));let u;try{u=JSON.parse(t)}catch(l){throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,"Failed to parse tool arguments as JSON",l)}t=JSON.stringify({action:{[i.name]:u}})}if(t||(t=r.message?.content.trim()||null),!t)throw new InvokeError(InvokeErrorType.NO_TOOL_CALL,"No tool call or content found in response",e);let a;try{a=JSON.parse(t)}catch(u){throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,"Failed to parse tool arguments as JSON",u)}if(a.action||a.evaluation_previous_goal||a.next_goal)a.action||(console.log(chalk.yellow("lenientParseMacroToolCall: #2 fixing incorrect tool call")),a.action={wait:{seconds:1}});else if(a.type&&a.function){if(a.function.name!=="AgentOutput")throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,`Expected function name "AgentOutput", got "${a.function.name}"`,null);console.log(chalk.yellow("lenientParseMacroToolCall: #3 fixing incorrect tool call")),a=a.function.arguments}else if(a.name&&a.arguments){if(a.name!=="AgentOutput")throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,`Expected function name "AgentOutput", got "${a.name}"`,null);console.log(chalk.yellow("lenientParseMacroToolCall: #4 fixing incorrect tool call")),a=a.arguments}else console.log(chalk.yellow("lenientParseMacroToolCall: #5 fixing incorrect tool call")),a={action:a};if(typeof a=="string"){console.log(chalk.yellow("lenientParseMacroToolCall: #6 fixing incorrect tool call"));try{a=JSON.parse(a)}catch(u){throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,"Failed to parse nested tool arguments as JSON",u)}}const c=n.safeParse(a);if(c.success)return c.data;{const u=a.action??{},l=Object.keys(u)[0]||"unknown",d=JSON.stringify(u[l]||"unknown");throw new InvokeError(InvokeErrorType.INVALID_TOOL_ARGS,`Tool arguments validation failed: action "${l}" with args ${d}`,c.error)}}s(lenientParseMacroToolCall,"lenientParseMacroToolCall");function modelPatch(e){const n=e.model||"";if(!n)return e;const r=normalizeModelName(n);return r.startsWith("claude")&&(debug("Applying Claude patch: change tool_choice and disable thinking"),e.tool_choice={type:"tool",name:"AgentOutput"},e.thinking={type:"disabled"}),r.startsWith("grok")&&(debug("Applying Grok patch: removing tool_choice"),delete e.tool_choice,debug("Applying Grok patch: disable reasoning and thinking"),e.thinking={type:"disabled",effort:"minimal"},e.reasoning={enabled:!1,effort:"low"}),r.startsWith("gpt")&&(debug("Applying GPT patch: set verbosity to low"),e.verbosity="low",r.startsWith("gpt-52")?(debug("Applying GPT-52 patch: disable reasoning"),e.reasoning_effort="none"):r.startsWith("gpt-51")?(debug("Applying GPT-51 patch: disable reasoning"),e.reasoning_effort="none"):r.startsWith("gpt-5")&&(debug("Applying GPT-5 patch: set reasoning effort to low"),e.reasoning_effort="low")),r.startsWith("gemini")&&(debug("Applying Gemini patch: set reasoning effort to minimal"),e.reasoning_effort="minimal"),e}s(modelPatch,"modelPatch");function normalizeModelName(e){let n=e.toLowerCase();return n.includes("/")&&(n=n.split("/")[1]),n=n.replace(/_/g,""),n=n.replace(/\./g,""),n}s(normalizeModelName,"normalizeModelName");const ft=class ft{config;fetch;constructor(n){this.config=n,this.fetch=n.customFetch}async invoke(n,r,o){const t=Object.entries(r).map(([d,f])=>zodToOpenAITool(d,f));let i;try{i=await this.fetch(`${this.config.baseURL}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`},body:JSON.stringify(modelPatch({model:this.config.model,temperature:this.config.temperature,max_tokens:this.config.maxTokens,messages:n,tools:t,tool_choice:{type:"function",function:{name:"AgentOutput"}},parallel_tool_calls:!1})),signal:o})}catch(d){throw new InvokeError(InvokeErrorType.NETWORK_ERROR,"Network request failed",d)}if(!i.ok){const d=await i.json().catch(),f=d.error?.message||i.statusText;throw i.status===401||i.status===403?new InvokeError(InvokeErrorType.AUTH_ERROR,`Authentication failed: ${f}`,d):i.status===429?new InvokeError(InvokeErrorType.RATE_LIMIT,`Rate limit exceeded: ${f}`,d):i.status>=500?new InvokeError(InvokeErrorType.SERVER_ERROR,`Server error: ${f}`,d):new InvokeError(InvokeErrorType.UNKNOWN,`HTTP ${i.status}: ${f}`,d)}const a=await i.json(),c=r.AgentOutput,u=lenientParseMacroToolCall(a,c.inputSchema);let l;try{l=await c.execute(u)}catch(d){throw new InvokeError(InvokeErrorType.TOOL_EXECUTION_ERROR,`Tool execution failed: ${d.message}`,d)}return{toolCall:{name:"AgentOutput",args:u},toolResult:l,usage:{promptTokens:a.usage?.prompt_tokens??0,completionTokens:a.usage?.completion_tokens??0,totalTokens:a.usage?.total_tokens??0,cachedTokens:a.usage?.prompt_tokens_details?.cached_tokens,reasoningTokens:a.usage?.completion_tokens_details?.reasoning_tokens},rawResponse:a}}};s(ft,"OpenAIClient");let OpenAIClient=ft;const DEFAULT_MODEL_NAME="PAGE-AGENT-FREE-TESTING-RANDOM",DEFAULT_API_KEY="PAGE-AGENT-FREE-TESTING-RANDOM",DEFAULT_BASE_URL="https://hwcxiuzfylggtcktqgij.supabase.co/functions/v1/llm-testing-proxy",LLM_MAX_RETRIES=2,DEFAULT_TEMPERATURE=.7,DEFAULT_MAX_TOKENS=16e3;function parseLLMConfig(e){return{baseURL:e.baseURL??DEFAULT_BASE_URL,apiKey:e.apiKey??DEFAULT_API_KEY,model:e.model??DEFAULT_MODEL_NAME,temperature:e.temperature??DEFAULT_TEMPERATURE,maxTokens:e.maxTokens??DEFAULT_MAX_TOKENS,maxRetries:e.maxRetries??LLM_MAX_RETRIES,customFetch:(e.customFetch??fetch).bind(globalThis)}}s(parseLLMConfig,"parseLLMConfig");const gt=class gt extends EventTarget{config;client;constructor(n){super(),this.config=parseLLMConfig(n),this.client=new OpenAIClient(this.config)}async invoke(n,r,o){return await withRetry(async()=>await this.client.invoke(n,r,o),{maxRetries:this.config.maxRetries,onRetry:s(t=>{this.dispatchEvent(new CustomEvent("retry",{detail:{current:t,max:this.config.maxRetries}}))},"onRetry"),onError:s(t=>{this.dispatchEvent(new CustomEvent("error",{detail:{error:t}}))},"onError")})}};s(gt,"LLM");let LLM=gt;async function withRetry(e,n){let r=0,o=null;for(;r<=n.maxRetries;){r>0&&(n.onRetry(r),await new Promise(t=>setTimeout(t,100)));try{return await e()}catch(t){if(console.error(t),n.onError(t),t?.name==="AbortError"||t instanceof InvokeError&&!t.retryable)throw t;o=t,r++,await new Promise(i=>setTimeout(i,100))}}throw o}s(withRetry,"withRetry");async function waitFor$1(e){await new Promise(n=>setTimeout(n,e*1e3))}s(waitFor$1,"waitFor$1");async function movePointerToElement(e){const n=e.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2;window.dispatchEvent(new CustomEvent("PageAgent::MovePointerTo",{detail:{x:r,y:o}})),await waitFor$1(.3)}s(movePointerToElement,"movePointerToElement");function getElementByIndex(e,n){const r=e.get(n);if(!r)throw new Error(`No interactive element found at index ${n}`);const o=r.ref;if(!o)throw new Error(`Element at index ${n} does not have a reference`);if(!(o instanceof HTMLElement))throw new Error(`Element at index ${n} is not an HTMLElement`);return o}s(getElementByIndex,"getElementByIndex");let lastClickedElement=null;function blurLastClickedElement(){lastClickedElement&&(lastClickedElement.blur(),lastClickedElement.dispatchEvent(new MouseEvent("mouseout",{bubbles:!0,cancelable:!0})),lastClickedElement=null)}s(blurLastClickedElement,"blurLastClickedElement");async function clickElement(e){blurLastClickedElement(),lastClickedElement=e,await scrollIntoViewIfNeeded(e),await movePointerToElement(e),window.dispatchEvent(new CustomEvent("PageAgent::ClickPointer")),await waitFor$1(.1),e.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new MouseEvent("mouseover",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0})),e.focus(),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),await waitFor$1(.1)}s(clickElement,"clickElement");const nativeInputValueSetter=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set,nativeTextAreaValueSetter=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value").set;async function inputTextElement(e,n){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error("Element is not an input or textarea");await clickElement(e),e instanceof HTMLTextAreaElement?nativeTextAreaValueSetter.call(e,n):nativeInputValueSetter.call(e,n);const r=new Event("input",{bubbles:!0});e.dispatchEvent(r),await waitFor$1(.1),blurLastClickedElement()}s(inputTextElement,"inputTextElement");async function selectOptionElement(e,n){if(!(e instanceof HTMLSelectElement))throw new Error("Element is not a select element");const o=Array.from(e.options).find(t=>t.textContent?.trim()===n.trim());if(!o)throw new Error(`Option with text "${n}" not found in select element`);e.value=o.value,e.dispatchEvent(new Event("change",{bubbles:!0})),await waitFor$1(.1)}s(selectOptionElement,"selectOptionElement");async function scrollIntoViewIfNeeded(e){const n=e;n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})}s(scrollIntoViewIfNeeded,"scrollIntoViewIfNeeded");async function scrollVertically(e,n,r){if(r){const c=r;console.log("[SCROLL DEBUG] Starting direct container scroll for element:",c.tagName);let u=c,l=!1,d=null,f=0,g=0;const h=n;for(;u&&g<10;){const $=window.getComputedStyle(u),E=/(auto|scroll|overlay)/.test($.overflowY),P=u.scrollHeight>u.clientHeight;if(console.log("[SCROLL DEBUG] Checking element:",u.tagName,"hasScrollableY:",E,"canScrollVertically:",P,"scrollHeight:",u.scrollHeight,"clientHeight:",u.clientHeight),E&&P){const U=u.scrollTop,G=u.scrollHeight-u.clientHeight;let Z=h/3;Z>0?Z=Math.min(Z,G-U):Z=Math.max(Z,-U),u.scrollTop=U+Z;const I=u.scrollTop,N=I-U;if(console.log("[SCROLL DEBUG] Scroll attempt:",u.tagName,"before:",U,"after:",I,"delta:",N),Math.abs(N)>.5){l=!0,d=u,f=N,console.log("[SCROLL DEBUG] Successfully scrolled container:",u.tagName,"delta:",N);break}}if(u===document.body||u===document.documentElement)break;u=u.parentElement,g++}return l?`Scrolled container (${d?.tagName}) by ${f}px`:`No scrollable container found for element (${c.tagName})`}const o=n,t=s(c=>c.clientHeight>=window.innerHeight*.5,"bigEnough"),i=s(c=>c&&/(auto|scroll|overlay)/.test(getComputedStyle(c).overflowY)&&c.scrollHeight>c.clientHeight&&t(c),"canScroll");let a=document.activeElement;for(;a&&!i(a)&&a!==document.body;)a=a.parentElement;return a=i(a)?a:Array.from(document.querySelectorAll("*")).find(i)||document.scrollingElement||document.documentElement,a===document.scrollingElement||a===document.documentElement||a===document.body?(window.scrollBy(0,o),`✅ Scrolled page by ${o}px.`):(a.scrollBy({top:o,behavior:"smooth"}),await waitFor$1(.1),`✅ Scrolled container (${a.tagName}) by ${o}px.`)}s(scrollVertically,"scrollVertically");async function scrollHorizontally(e,n,r){if(r){const c=r;console.log("[SCROLL DEBUG] Starting direct container scroll for element:",c.tagName);let u=c,l=!1,d=null,f=0,g=0;const h=e?n:-n;for(;u&&g<10;){const $=window.getComputedStyle(u),E=/(auto|scroll|overlay)/.test($.overflowX),P=u.scrollWidth>u.clientWidth;if(console.log("[SCROLL DEBUG] Checking element:",u.tagName,"hasScrollableX:",E,"canScrollHorizontally:",P,"scrollWidth:",u.scrollWidth,"clientWidth:",u.clientWidth),E&&P){const U=u.scrollLeft,G=u.scrollWidth-u.clientWidth;let Z=h/3;Z>0?Z=Math.min(Z,G-U):Z=Math.max(Z,-U),u.scrollLeft=U+Z;const I=u.scrollLeft,N=I-U;if(console.log("[SCROLL DEBUG] Scroll attempt:",u.tagName,"before:",U,"after:",I,"delta:",N),Math.abs(N)>.5){l=!0,d=u,f=N,console.log("[SCROLL DEBUG] Successfully scrolled container:",u.tagName,"delta:",N);break}}if(u===document.body||u===document.documentElement)break;u=u.parentElement,g++}return l?`Scrolled container (${d?.tagName}) horizontally by ${f}px`:`No horizontally scrollable container found for element (${c.tagName})`}const o=e?n:-n,t=s(c=>c.clientWidth>=window.innerWidth*.5,"bigEnough"),i=s(c=>c&&/(auto|scroll|overlay)/.test(getComputedStyle(c).overflowX)&&c.scrollWidth>c.clientWidth&&t(c),"canScroll");let a=document.activeElement;for(;a&&!i(a)&&a!==document.body;)a=a.parentElement;return a=i(a)?a:Array.from(document.querySelectorAll("*")).find(i)||document.scrollingElement||document.documentElement,a===document.scrollingElement||a===document.documentElement||a===document.body?(window.scrollBy(o,0),`✅ Scrolled page horizontally by ${o}px`):(a.scrollBy({left:o,behavior:"smooth"}),await waitFor$1(.1),`✅ Scrolled container (${a.tagName}) horizontally by ${o}px`)}s(scrollHorizontally,"scrollHorizontally");const VIEWPORT_EXPANSION=-1,domTree=s((e={doHighlightElements:!0,focusHighlightIndex:-1,viewportExpansion:0,debugMode:!1,interactiveBlacklist:[],interactiveWhitelist:[],highlightOpacity:.1,highlightLabelOpacity:.5})=>{const{interactiveBlacklist:n,interactiveWhitelist:r,highlightOpacity:o,highlightLabelOpacity:t}=e,{doHighlightElements:i,focusHighlightIndex:a,viewportExpansion:c,debugMode:u}=e;let l=0;const d=new WeakMap;function f(m,v){!m||m.nodeType!==Node.ELEMENT_NODE||d.set(m,{...d.get(m),...v})}s(f,"addExtraData");const g={boundingRects:new WeakMap,clientRects:new WeakMap,computedStyles:new WeakMap,clearCache:s(()=>{g.boundingRects=new WeakMap,g.clientRects=new WeakMap,g.computedStyles=new WeakMap},"clearCache")};function h(m){if(!m)return null;if(g.boundingRects.has(m))return g.boundingRects.get(m);const v=m.getBoundingClientRect();return v&&g.boundingRects.set(m,v),v}s(h,"getCachedBoundingRect");function $(m){if(!m)return null;if(g.computedStyles.has(m))return g.computedStyles.get(m);const v=window.getComputedStyle(m);return v&&g.computedStyles.set(m,v),v}s($,"getCachedComputedStyle");function E(m){if(!m)return null;if(g.clientRects.has(m))return g.clientRects.get(m);const v=m.getClientRects();return v&&g.clientRects.set(m,v),v}s(E,"getCachedClientRects");const P={},U={current:0},G="playwright-highlight-container";function Z(m,v,T=null){if(!m)return v;const y=[];let b=null,C=20,w=16,j=null;try{let k=document.getElementById(G);k||(k=document.createElement("div"),k.id=G,k.style.position="fixed",k.style.pointerEvents="none",k.style.top="0",k.style.left="0",k.style.width="100%",k.style.height="100%",k.style.zIndex="2147483640",k.style.backgroundColor="transparent",document.body.appendChild(k));const L=m.getClientRects();if(!L||L.length===0)return v;const X=["#FF0000","#00FF00","#0000FF","#FFA500","#800080","#008080","#FF69B4","#4B0082","#FF4500","#2E8B57","#DC143C","#4682B4"],J=v%X.length;let Pe=X[J];const ne=Pe+Math.floor(o*255).toString(16).padStart(2,"0");Pe=Pe+Math.floor(t*255).toString(16).padStart(2,"0");let oe={x:0,y:0};if(T){const V=T.getBoundingClientRect();oe.x=V.left,oe.y=V.top}const ge=document.createDocumentFragment();for(const V of L){if(V.width===0||V.height===0)continue;const W=document.createElement("div");W.style.position="fixed",W.style.border=`2px solid ${Pe}`,W.style.backgroundColor=ne,W.style.pointerEvents="none",W.style.boxSizing="border-box";const F=V.top+oe.y,Ie=V.left+oe.x;W.style.top=`${F}px`,W.style.left=`${Ie}px`,W.style.width=`${V.width}px`,W.style.height=`${V.height}px`,ge.appendChild(W),y.push({element:W,initialRect:V})}const ve=L[0];b=document.createElement("div"),b.className="playwright-highlight-label",b.style.position="fixed",b.style.background=Pe,b.style.color="white",b.style.padding="1px 4px",b.style.borderRadius="4px",b.style.fontSize=`${Math.min(12,Math.max(8,ve.height/2))}px`,b.textContent=v.toString(),C=b.offsetWidth>0?b.offsetWidth:C,w=b.offsetHeight>0?b.offsetHeight:w;const Be=ve.top+oe.y,Qe=ve.left+oe.x;let ot=Be+2,Je=Qe+ve.width-C-2;(ve.width<C+4||ve.height<w+4)&&(ot=Be-w-2,Je=Qe+ve.width-C,Je<oe.x&&(Je=Qe)),ot=Math.max(0,Math.min(ot,window.innerHeight-w)),Je=Math.max(0,Math.min(Je,window.innerWidth-C)),b.style.top=`${ot}px`,b.style.left=`${Je}px`,ge.appendChild(b);const at=s((V,W)=>{let F=0;return(...Ie)=>{const re=performance.now();if(!(re-F<W))return F=re,V(...Ie)}},"throttleFunction")(s(()=>{const V=m.getClientRects();let W={x:0,y:0};if(T){const F=T.getBoundingClientRect();W.x=F.left,W.y=F.top}if(y.forEach((F,Ie)=>{if(Ie<V.length){const re=V[Ie],Ke=re.top+W.y,Ne=re.left+W.x;F.element.style.top=`${Ke}px`,F.element.style.left=`${Ne}px`,F.element.style.width=`${re.width}px`,F.element.style.height=`${re.height}px`,F.element.style.display=re.width===0||re.height===0?"none":"block"}else F.element.style.display="none"}),V.length<y.length)for(let F=V.length;F<y.length;F++)y[F].element.style.display="none";if(b&&V.length>0){const F=V[0],Ie=F.top+W.y,re=F.left+W.x;let Ke=Ie+2,Ne=re+F.width-C-2;(F.width<C+4||F.height<w+4)&&(Ke=Ie-w-2,Ne=re+F.width-C,Ne<W.x&&(Ne=re)),Ke=Math.max(0,Math.min(Ke,window.innerHeight-w)),Ne=Math.max(0,Math.min(Ne,window.innerWidth-C)),b.style.top=`${Ke}px`,b.style.left=`${Ne}px`,b.style.display="block"}else b&&(b.style.display="none")},"updatePositions"),16);return window.addEventListener("scroll",at,!0),window.addEventListener("resize",at),j=s(()=>{window.removeEventListener("scroll",at,!0),window.removeEventListener("resize",at),y.forEach(V=>V.element.remove()),b&&b.remove()},"cleanupFn"),k.appendChild(ge),v+1}finally{j&&(window._highlightCleanupFunctions=window._highlightCleanupFunctions||[]).push(j)}}s(Z,"highlightElement");function I(m){if(!m||m.nodeType!==Node.ELEMENT_NODE)return null;const v=$(m);if(!v)return null;const T=v.display;if(T==="inline"||T==="inline-block")return null;const y=v.overflowX,b=v.overflowY,C=y==="auto"||y==="scroll",w=b==="auto"||b==="scroll";if(!C&&!w)return null;const j=m.scrollWidth-m.clientWidth,k=m.scrollHeight-m.clientHeight,L=4;if(j<L&&k<L||!w&&j<L||!C&&k<L)return null;const X=m.scrollTop,J=m.scrollLeft,Pe=m.scrollWidth-m.clientWidth-m.scrollLeft,ne=m.scrollHeight-m.clientHeight-m.scrollTop,oe={top:X,right:Pe,bottom:ne,left:J};return f(m,{scrollable:!0,scrollData:oe}),oe}s(I,"isScrollableElement");function N(m){try{if(c===-1){const w=m.parentElement;if(!w)return!1;try{return w.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0})}catch{const k=window.getComputedStyle(w);return k.display!=="none"&&k.visibility!=="hidden"&&k.opacity!=="0"}}const v=document.createRange();v.selectNodeContents(m);const T=v.getClientRects();if(!T||T.length===0)return!1;let y=!1,b=!1;for(const w of T)if(w.width>0&&w.height>0&&(y=!0,!(w.bottom<-c||w.top>window.innerHeight+c||w.right<-c||w.left>window.innerWidth+c))){b=!0;break}if(!y||!b)return!1;const C=m.parentElement;if(!C)return!1;try{return C.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0})}catch{const j=window.getComputedStyle(C);return j.display!=="none"&&j.visibility!=="hidden"&&j.opacity!=="0"}}catch(v){return console.warn("Error checking text node visibility:",v),!1}}s(N,"isTextNodeVisible");function Me(m){if(!m||!m.tagName)return!1;const v=new Set(["body","div","main","article","section","nav","header","footer"]),T=m.tagName.toLowerCase();return v.has(T)?!0:!new Set(["svg","script","style","link","meta","noscript","template"]).has(T)}s(Me,"isElementAccepted");function B(m){const v=$(m);return m.offsetWidth>0&&m.offsetHeight>0&&v?.visibility!=="hidden"&&v?.display!=="none"}s(B,"isElementVisible");function H(m){if(!m||m.nodeType!==Node.ELEMENT_NODE||n.includes(m))return!1;if(r.includes(m))return!0;const v=m.tagName.toLowerCase(),T=$(m),y=new Set(["pointer","move","text","grab","grabbing","cell","copy","alias","all-scroll","col-resize","context-menu","crosshair","e-resize","ew-resize","help","n-resize","ne-resize","nesw-resize","ns-resize","nw-resize","nwse-resize","row-resize","s-resize","se-resize","sw-resize","vertical-text","w-resize","zoom-in","zoom-out"]),b=new Set(["not-allowed","no-drop","wait","progress","initial","inherit"]);function C(ne){return ne.tagName.toLowerCase()==="html"?!1:!!(T?.cursor&&y.has(T.cursor))}if(s(C,"doesElementHaveInteractivePointer"),C(m))return!0;const j=new Set(["a","button","input","select","textarea","details","summary","label","option","optgroup","fieldset","legend"]),k=new Set(["disabled","readonly"]);if(j.has(v)){if(T?.cursor&&b.has(T.cursor))return!1;for(const ne of k)if(m.hasAttribute(ne)||m.getAttribute(ne)==="true"||m.getAttribute(ne)==="")return!1;return!(m.disabled||m.readOnly||m.inert)}const L=m.getAttribute("role"),X=m.getAttribute("aria-role");if(m.getAttribute("contenteditable")==="true"||m.isContentEditable||m.classList&&(m.classList.contains("button")||m.classList.contains("dropdown-toggle")||m.getAttribute("data-index")||m.getAttribute("data-toggle")==="dropdown"||m.getAttribute("aria-haspopup")==="true"))return!0;const J=new Set(["button","menu","menubar","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);if(j.has(v)||L&&J.has(L)||X&&J.has(X))return!0;try{if(typeof getEventListeners=="function"){const ge=getEventListeners(m),ve=["click","mousedown","mouseup","dblclick"];for(const Be of ve)if(ge[Be]&&ge[Be].length>0)return!0}const ne=m?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof ne=="function"){const ge=ne(m),ve=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const Be of ve)for(const Qe of ge)if(Qe.type===Be)return!0}const oe=["onclick","onmousedown","onmouseup","ondblclick"];for(const ge of oe)if(m.hasAttribute(ge)||typeof m[ge]=="function")return!0}catch{}return!!I(m)}s(H,"isInteractiveElement");function ue(m){if(c===-1)return!0;const v=E(m);if(!v||v.length===0)return!1;let T=!1;for(const k of v)if(k.width>0&&k.height>0&&!(k.bottom<-c||k.top>window.innerHeight+c||k.right<-c||k.left>window.innerWidth+c)){T=!0;break}if(!T)return!1;if(m.ownerDocument!==window.document)return!0;let b=Array.from(v).find(k=>k.width>0&&k.height>0);if(!b)return!1;const C=m.getRootNode();if(C instanceof ShadowRoot){const k=b.left+b.width/2,L=b.top+b.height/2;try{const X=C.elementFromPoint(k,L);if(!X)return!1;let J=X;for(;J&&J!==C;){if(J===m)return!0;J=J.parentElement}return!1}catch{return!0}}const w=5;return[{x:b.left+b.width/2,y:b.top+b.height/2},{x:b.left+w,y:b.top+w},{x:b.right-w,y:b.bottom-w}].some(({x:k,y:L})=>{try{const X=document.elementFromPoint(k,L);if(!X)return!1;let J=X;for(;J&&J!==document.documentElement;){if(J===m)return!0;J=J.parentElement}return!1}catch{return!0}})}s(ue,"isTopElement");function q(m,v){if(v===-1)return!0;const T=m.getClientRects();if(!T||T.length===0){const y=h(m);return!y||y.width===0||y.height===0?!1:!(y.bottom<-v||y.top>window.innerHeight+v||y.right<-v||y.left>window.innerWidth+v)}for(const y of T)if(!(y.width===0||y.height===0)&&!(y.bottom<-v||y.top>window.innerHeight+v||y.right<-v||y.left>window.innerWidth+v))return!0;return!1}s(q,"isInExpandedViewport");function le(m){if(!m||m.nodeType!==Node.ELEMENT_NODE)return!1;const v=m.tagName.toLowerCase();return new Set(["a","button","input","select","textarea","details","summary","label"]).has(v)?!0:m.hasAttribute("onclick")||m.hasAttribute("role")||m.hasAttribute("tabindex")||m.hasAttribute("aria-")||m.hasAttribute("data-action")||m.getAttribute("contenteditable")==="true"}s(le,"isInteractiveCandidate");const me=new Set(["a","button","input","select","textarea","summary","details","label","option"]),qe=new Set(["button","link","menuitem","menuitemradio","menuitemcheckbox","radio","checkbox","tab","switch","slider","spinbutton","combobox","searchbox","textbox","listbox","option","scrollbar"]);function fe(m){if(!m||m.nodeType!==Node.ELEMENT_NODE||!B(m))return!1;const v=m.hasAttribute("role")||m.hasAttribute("tabindex")||m.hasAttribute("onclick")||typeof m.onclick=="function",T=/\b(btn|clickable|menu|item|entry|link)\b/i.test(m.className||""),y=!!m.closest('button,a,[role="button"],.menu,.dropdown,.list,.toolbar'),b=[...m.children].some(B),C=m.parentElement&&m.parentElement.isSameNode(document.body);return(H(m)||v||T)&&b&&y&&!C}s(fe,"isHeuristicallyInteractive");function Xe(m){if(!m||m.nodeType!==Node.ELEMENT_NODE)return!1;const v=m.tagName.toLowerCase(),T=m.getAttribute("role");if(v==="iframe"||me.has(v)||T&&qe.has(T)||m.isContentEditable||m.getAttribute("contenteditable")==="true"||m.hasAttribute("data-testid")||m.hasAttribute("data-cy")||m.hasAttribute("data-test")||m.hasAttribute("onclick")||typeof m.onclick=="function")return!0;try{const y=m?.ownerDocument?.defaultView?.getEventListenersForNode||window.getEventListenersForNode;if(typeof y=="function"){const C=y(m),w=["click","mousedown","mouseup","keydown","keyup","submit","change","input","focus","blur"];for(const j of w)for(const k of C)if(k.type===j)return!0}if(["onmousedown","onmouseup","onkeydown","onkeyup","onsubmit","onchange","oninput","onfocus","onblur"].some(C=>m.hasAttribute(C)))return!0}catch{}return!!fe(m)}s(Xe,"isElementDistinctInteraction");function Ye(m,v,T,y){if(!m.isInteractive)return!1;let b=!1;return y?Xe(v)?b=!0:b=!1:b=!0,b&&(m.isInViewport=q(v,c),(m.isInViewport||c===-1)&&(m.highlightIndex=l++,i))?(a>=0?a===m.highlightIndex&&Z(v,m.highlightIndex,T):Z(v,m.highlightIndex,T),!0):!1}s(Ye,"handleHighlighting");function ye(m,v=null,T=!1){if(!m||m.id===G||m.nodeType!==Node.ELEMENT_NODE&&m.nodeType!==Node.TEXT_NODE||!m||m.id===G)return null;if(m.dataset?.browserUseIgnore==="true")return!0;if(m===document.body){const w={tagName:"body",attributes:{},xpath:"/body",children:[]};for(const k of m.childNodes){const L=ye(k,v,!1);L&&w.children.push(L)}const j=`${U.current++}`;return P[j]=w,j}if(m.nodeType!==Node.ELEMENT_NODE&&m.nodeType!==Node.TEXT_NODE)return null;if(m.nodeType===Node.TEXT_NODE){const w=m.textContent?.trim();if(!w)return null;const j=m.parentElement;if(!j||j.tagName.toLowerCase()==="script")return null;const k=`${U.current++}`;return P[k]={type:"TEXT_NODE",text:w,isVisible:N(m)},k}if(m.nodeType===Node.ELEMENT_NODE&&!Me(m))return null;if(c!==-1&&!m.shadowRoot){const w=h(m),j=$(m),k=j&&(j.position==="fixed"||j.position==="sticky"),L=m.offsetWidth>0||m.offsetHeight>0;if(!w||!k&&!L&&(w.bottom<-c||w.top>window.innerHeight+c||w.right<-c||w.left>window.innerWidth+c))return null}const y={tagName:m.tagName.toLowerCase(),attributes:{},children:[]};if(le(m)||m.tagName.toLowerCase()==="iframe"||m.tagName.toLowerCase()==="body"){const w=m.getAttributeNames?.()||[];for(const j of w){const k=m.getAttribute(j);y.attributes[j]=k}m.tagName.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(y.attributes.checked=m.checked?"true":"false")}let b=!1;if(m.nodeType===Node.ELEMENT_NODE&&(y.isVisible=B(m),y.isVisible)){y.isTopElement=ue(m);const w=m.getAttribute("role"),j=w==="menu"||w==="menubar"||w==="listbox";(y.isTopElement||j)&&(y.isInteractive=H(m),b=Ye(y,m,v,T),y.ref=m)}if(m.tagName){const w=m.tagName.toLowerCase();if(w==="iframe")try{const j=m.contentDocument||m.contentWindow?.document;if(j)for(const k of j.childNodes){const L=ye(k,m,!1);L&&y.children.push(L)}}catch(j){console.warn("Unable to access iframe:",j)}else if(m.isContentEditable||m.getAttribute("contenteditable")==="true"||m.id==="tinymce"||m.classList.contains("mce-content-body")||w==="body"&&m.getAttribute("data-id")?.startsWith("mce_"))for(const j of m.childNodes){const k=ye(j,v,b);k&&y.children.push(k)}else{if(m.shadowRoot){y.shadowRoot=!0;for(const j of m.shadowRoot.childNodes){const k=ye(j,v,b);k&&y.children.push(k)}}for(const j of m.childNodes){const L=ye(j,v,b||T);L&&y.children.push(L)}}}if(y.tagName==="a"&&y.children.length===0&&!y.attributes.href){const w=h(m);if(!(w&&w.width>0&&w.height>0||m.offsetWidth>0||m.offsetHeight>0))return null}y.extra=d.get(m)||null;const C=`${U.current++}`;return P[C]=y,C}s(ye,"buildDomTree");const pe=ye(document.body);return g.clearCache(),{rootId:pe,map:P}},"domTree"),newElementsCache=new WeakMap;function getFlatTree(e){const n=[];for(const i of e.interactiveBlacklist||[])typeof i=="function"?n.push(i()):n.push(i);const r=[];for(const i of e.interactiveWhitelist||[])typeof i=="function"?r.push(i()):r.push(i);const o=domTree({doHighlightElements:!0,debugMode:!0,focusHighlightIndex:-1,viewportExpansion:VIEWPORT_EXPANSION,interactiveBlacklist:n,interactiveWhitelist:r,highlightOpacity:e.highlightOpacity??0,highlightLabelOpacity:e.highlightLabelOpacity??.1}),t=window.location.href;for(const i in o.map){const a=o.map[i];if(a.isInteractive&&a.ref){const c=a.ref;newElementsCache.has(c)||(newElementsCache.set(c,t),a.isNew=!0)}}return o}s(getFlatTree,"getFlatTree");function flatTreeToString(e,n){const r=["title","type","checked","name","role","value","placeholder","data-date-format","alt","aria-label","aria-expanded","data-state","aria-checked","id","for","target","aria-haspopup","aria-controls","aria-owns"],o=[...n||[],...r],t=s((f,g)=>f.length>g?f.substring(0,g)+"...":f,"capTextLength"),i=s(f=>{const g=e.map[f];if(!g)return null;if(g.type==="TEXT_NODE"){const h=g;return{type:"text",text:h.text,isVisible:h.isVisible,parent:null,children:[]}}else{const h=g,$=[];if(h.children)for(const E of h.children){const P=i(E);P&&(P.parent=null,$.push(P))}return{type:"element",tagName:h.tagName,attributes:h.attributes??{},isVisible:h.isVisible??!1,isInteractive:h.isInteractive??!1,isTopElement:h.isTopElement??!1,isNew:h.isNew??!1,highlightIndex:h.highlightIndex,parent:null,children:$,extra:h.extra??{}}}},"buildTreeNode"),a=s((f,g=null)=>{f.parent=g;for(const h of f.children)a(h,f)},"setParentReferences"),c=i(e.rootId);if(!c)return"";a(c);const u=s(f=>{let g=f.parent;for(;g;){if(g.type==="element"&&g.highlightIndex!==void 0)return!0;g=g.parent}return!1},"hasParentWithHighlightIndex"),l=s((f,g,h)=>{let $=g;const E=" ".repeat(g);if(f.type==="element"){if(f.highlightIndex!==void 0){$+=1;const P=getAllTextTillNextClickableElement(f);let U="";if(o.length>0&&f.attributes){const I={};for(const B of o){const H=f.attributes[B];H&&H.trim()!==""&&(I[B]=H.trim())}const N=o.filter(B=>B in I);if(N.length>1){const B=new Set,H={};for(const ue of N){const q=I[ue];q.length>5&&(q in H?B.add(ue):H[q]=ue)}for(const ue of B)delete I[ue]}I.role===f.tagName&&delete I.role;const Me=["aria-label","placeholder","title"];for(const B of Me)I[B]&&I[B].toLowerCase().trim()===P.toLowerCase().trim()&&delete I[B];Object.keys(I).length>0&&(U=Object.entries(I).map(([B,H])=>`${B}=${t(H,20)}`).join(" "))}const G=f.isNew?`*[${f.highlightIndex}]`:`[${f.highlightIndex}]`;let Z=`${E}${G}<${f.tagName??""}`;if(U&&(Z+=` ${U}`),f.extra&&f.extra.scrollable){let I="";f.extra.scrollData?.left&&(I+=`left=${f.extra.scrollData.left}, `),f.extra.scrollData?.top&&(I+=`top=${f.extra.scrollData.top}, `),f.extra.scrollData?.right&&(I+=`right=${f.extra.scrollData.right}, `),f.extra.scrollData?.bottom&&(I+=`bottom=${f.extra.scrollData.bottom}`),Z+=` data-scrollable="${I}"`}if(P){const I=P.trim();U||(Z+=" "),Z+=`>${I}`}else U||(Z+=" ");Z+=" />",h.push(Z)}for(const P of f.children)l(P,$,h)}else if(f.type==="text"){if(u(f))return;f.parent&&f.parent.type==="element"&&f.parent.isVisible&&f.parent.isTopElement&&h.push(`${E}${f.text??""}`)}},"processNode"),d=[];return l(c,0,d),d.join(`
|
|
29
29
|
`)}s(flatTreeToString,"flatTreeToString");const getAllTextTillNextClickableElement=s((e,n=-1)=>{const r=[],o=s((t,i)=>{if(!(n!==-1&&i>n)&&!(t.type==="element"&&t!==e&&t.highlightIndex!==void 0)){if(t.type==="text"&&t.text)r.push(t.text);else if(t.type==="element")for(const a of t.children)o(a,i+1)}},"collectText");return o(e,0),r.join(`
|
|
30
30
|
`).trim()},"getAllTextTillNextClickableElement");function getSelectorMap(e){const n=new Map,r=Object.keys(e.map);for(const o of r){const t=e.map[o];t.isInteractive&&typeof t.highlightIndex=="number"&&n.set(t.highlightIndex,t)}return n}s(getSelectorMap,"getSelectorMap");function getElementTextMap(e){const n=e.split(`
|
|
31
31
|
`).map(o=>o.trim()).filter(o=>o.length>0),r=new Map;for(const o of n){const i=/^\[(\d+)\]<[^>]+>([^<]*)/.exec(o);if(i){const a=parseInt(i[1],10);r.set(a,o)}}return r}s(getElementTextMap,"getElementTextMap");function cleanUpHighlights(){const e=window._highlightCleanupFunctions||[];for(const n of e)typeof n=="function"&&n();window._highlightCleanupFunctions=[]}s(cleanUpHighlights,"cleanUpHighlights"),window.addEventListener("popstate",()=>{cleanUpHighlights()}),window.addEventListener("hashchange",()=>{cleanUpHighlights()}),window.addEventListener("beforeunload",()=>{cleanUpHighlights()});const navigation=window.navigation;if(navigation&&typeof navigation.addEventListener=="function")navigation.addEventListener("navigate",()=>{cleanUpHighlights()});else{let e=window.location.href;setInterval(()=>{window.location.href!==e&&(e=window.location.href,cleanUpHighlights())},500)}function getPageInfo(){const e=window.innerWidth,n=window.innerHeight,r=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth||0),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight||0),t=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0,i=window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0,a=Math.max(0,o-(window.innerHeight+i)),c=Math.max(0,r-(window.innerWidth+t));return{viewport_width:e,viewport_height:n,page_width:r,page_height:o,scroll_x:t,scroll_y:i,pixels_above:i,pixels_below:a,pages_above:n>0?i/n:0,pages_below:n>0?a/n:0,total_pages:n>0?o/n:0,current_page_position:i/Math.max(1,o-n),pixels_left:t,pixels_right:c}}s(getPageInfo,"getPageInfo");function patchReact(e){const n=document.querySelectorAll('[data-reactroot], [data-reactid], [data-react-checksum], #root, #app, [id^="root-"], [id^="app-"], #adex-wrapper, #adex-root');for(const r of n)r.setAttribute("data-page-agent-not-interactive","true")}s(patchReact,"patchReact");const _PageController=class _PageController extends EventTarget{config;flatTree=null;selectorMap=new Map;elementTextMap=new Map;simplifiedHTML="<EMPTY>";lastTimeUpdate=0;constructor(e={}){super(),this.config=e,patchReact()}async getCurrentUrl(){return window.location.href}async getPageTitle(){return document.title}async getPageInfo(){return getPageInfo()}async getSimplifiedHTML(){return this.simplifiedHTML}async getElementText(e){return this.elementTextMap.get(e)}async getElementCount(){return this.selectorMap.size}async getLastUpdateTime(){return this.lastTimeUpdate}async getViewportExpansion(){return this.config.viewportExpansion??VIEWPORT_EXPANSION}async updateTree(){this.dispatchEvent(new Event("beforeUpdate")),this.lastTimeUpdate=Date.now(),cleanUpHighlights();const e=[...this.config.interactiveBlacklist||[],...document.querySelectorAll("[data-page-agent-not-interactive]").values()];return this.flatTree=getFlatTree({...this.config,interactiveBlacklist:e}),this.simplifiedHTML=flatTreeToString(this.flatTree,this.config.include_attributes),this.selectorMap.clear(),this.selectorMap=getSelectorMap(this.flatTree),this.elementTextMap.clear(),this.elementTextMap=getElementTextMap(this.simplifiedHTML),this.dispatchEvent(new Event("afterUpdate")),this.simplifiedHTML}async cleanUpHighlights(){cleanUpHighlights()}async clickElement(e){try{const n=getElementByIndex(this.selectorMap,e),r=this.elementTextMap.get(e);return await clickElement(n),n instanceof HTMLAnchorElement&&n.target==="_blank"?{success:!0,message:`✅ Clicked element (${r??e}). ⚠️ Link opens in a new tab. You are not capable of reading new tabs.`}:{success:!0,message:`✅ Clicked element (${r??e}).`}}catch(n){return{success:!1,message:`❌ Failed to click element: ${n}`}}}async inputText(e,n){try{const r=getElementByIndex(this.selectorMap,e),o=this.elementTextMap.get(e);return await inputTextElement(r,n),{success:!0,message:`✅ Input text (${n}) into element (${o??e}).`}}catch(r){return{success:!1,message:`❌ Failed to input text: ${r}`}}}async selectOption(e,n){try{const r=getElementByIndex(this.selectorMap,e),o=this.elementTextMap.get(e);return await selectOptionElement(r,n),{success:!0,message:`✅ Selected option (${n}) in element (${o??e}).`}}catch(r){return{success:!1,message:`❌ Failed to select option: ${r}`}}}async scroll(e){try{const{down:n,numPages:r,pixels:o,index:t}=e,i=o??r*(n?1:-1)*window.innerHeight,a=t!==void 0?getElementByIndex(this.selectorMap,t):null;return{success:!0,message:await scrollVertically(n,i,a)}}catch(n){return{success:!1,message:`❌ Failed to scroll: ${n}`}}}async scrollHorizontally(e){try{const{right:n,pixels:r,index:o}=e,t=r*(n?1:-1),i=o!==void 0?getElementByIndex(this.selectorMap,o):null;return{success:!0,message:await scrollHorizontally(n,t,i)}}catch(n){return{success:!1,message:`❌ Failed to scroll horizontally: ${n}`}}}async executeJavascript(script){try{const asyncFunction=eval(`(async () => { ${script} })`),result=await asyncFunction();return{success:!0,message:`✅ Executed JavaScript. Result: ${result}`}}catch(e){return{success:!1,message:`❌ Error executing JavaScript: ${e}`}}}dispose(){cleanUpHighlights(),this.flatTree=null,this.selectorMap.clear(),this.elementTextMap.clear(),this.simplifiedHTML="<EMPTY>"}};s(_PageController,"PageController");let PageController=_PageController;const ht=class ht{steps=[];currentStep=null;status="idle";stepCounter=0;addStep(n){const r={id:this.generateId(),stepNumber:++this.stepCounter,timestamp:new Date,...n};return this.steps.push(r),this.currentStep=r,this.updateStatus(r.type),r}updateCurrentStep(n){return this.currentStep?(Object.assign(this.currentStep,n),this.currentStep):null}getCurrentStep(){return this.currentStep}getAllSteps(){return[...this.steps]}getStatus(){return this.status}reset(){this.steps=[],this.currentStep=null,this.status="idle",this.stepCounter=0}updateStatus(n){switch(n){case"thinking":case"tool_executing":case"output":case"input":case"retry":this.status="running";break;case"completed":this.status="completed";break;case"error":this.status="error";break}}generateId(){return`step_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}};s(ht,"UIState");let UIState=ht;const enUS={ui:{panel:{ready:"Ready",thinking:"Thinking...",paused:"Paused",taskInput:"Enter new task, describe steps in detail, press Enter to submit",userAnswerPrompt:"Please answer the question above, press Enter to submit",taskTerminated:"Task terminated",taskCompleted:"Task completed",continueExecution:"Continue execution",userAnswer:"User answer: {{input}}",question:"Question: {{question}}",waitingPlaceholder:"Waiting for task to start...",pause:"Pause",continue:"Continue",stop:"Stop",expand:"Expand history",collapse:"Collapse history",step:"Step {{number}} · {{time}}{{duration}}"},tools:{clicking:"Clicking element [{{index}}]...",inputting:"Inputting text to element [{{index}}]...",selecting:'Selecting option "{{text}}"...',scrolling:"Scrolling page...",waiting:"Waiting {{seconds}} seconds...",done:"Task done",clicked:"🖱️ Clicked element [{{index}}]",inputted:'⌨️ Inputted text "{{text}}"',selected:'☑️ Selected option "{{text}}"',scrolled:"🛞 Page scrolled",waited:"⌛️ Wait completed",executing:"Executing {{toolName}}...",resultSuccess:"success",resultFailure:"failed",resultError:"error"},errors:{elementNotFound:"No interactive element found at index {{index}}",taskRequired:"Task description is required",executionFailed:"Task execution failed",notInputElement:"Element is not an input or textarea",notSelectElement:"Element is not a select element",optionNotFound:'Option "{{text}}" not found'}}},zhCN={ui:{panel:{ready:"准备就绪",thinking:"正在思考...",paused:"暂停中,稍后",taskInput:"输入新任务,详细描述步骤,回车提交",userAnswerPrompt:"请回答上面问题,回车提交",taskTerminated:"任务已终止",taskCompleted:"任务结束",continueExecution:"继续执行",userAnswer:"用户回答: {{input}}",question:"询问: {{question}}",waitingPlaceholder:"等待任务开始...",pause:"暂停",continue:"继续",stop:"终止",expand:"展开历史",collapse:"收起历史",step:"步骤 {{number}} · {{time}}{{duration}}"},tools:{clicking:"正在点击元素 [{{index}}]...",inputting:"正在输入文本到元素 [{{index}}]...",selecting:'正在选择选项 "{{text}}"...',scrolling:"正在滚动页面...",waiting:"等待 {{seconds}} 秒...",done:"结束任务",clicked:"🖱️ 已点击元素 [{{index}}]",inputted:'⌨️ 已输入文本 "{{text}}"',selected:'☑️ 已选择选项 "{{text}}"',scrolled:"🛞 页面滚动完成",waited:"⌛️ 等待完成",executing:"正在执行 {{toolName}}...",resultSuccess:"成功",resultFailure:"失败",resultError:"错误"},errors:{elementNotFound:"未找到索引为 {{index}} 的交互元素",taskRequired:"任务描述不能为空",executionFailed:"任务执行失败",notInputElement:"元素不是输入框或文本域",notSelectElement:"元素不是选择框",optionNotFound:'未找到选项 "{{text}}"'}}},locales={"en-US":enUS,"zh-CN":zhCN},vt=class vt{language;translations;constructor(n="en-US"){this.language=n in locales?n:"en-US",this.translations=locales[n]}t(n,r){const o=this.getNestedValue(this.translations,n);return o?r?this.interpolate(o,r):o:(console.warn(`Translation key "${n}" not found for language "${this.language}"`),n)}getNestedValue(n,r){return r.split(".").reduce((o,t)=>o?.[t],n)}interpolate(n,r){return n.replace(/\{\{(\w+)\}\}/g,(o,t)=>r[t]!=null?r[t].toString():o)}getLanguage(){return this.language}};s(vt,"I18n");let I18n=vt;function truncate(e,n){return e.length>n?e.substring(0,n)+"...":e}s(truncate,"truncate");const wrapper$1="_wrapper_1j0ct_1",background="_background_1j0ct_39",header="_header_1j0ct_99",pulse="_pulse_1j0ct_1",retryPulse="_retryPulse_1j0ct_1",statusTextFadeOut="_statusTextFadeOut_1j0ct_1",statusTextFadeIn="_statusTextFadeIn_1j0ct_1",statusSection="_statusSection_1j0ct_121",indicator="_indicator_1j0ct_128",thinking="_thinking_1j0ct_137",tool_executing="_tool_executing_1j0ct_142",retry="_retry_1j0ct_147",completed="_completed_1j0ct_153",input="_input_1j0ct_154",output="_output_1j0ct_155",error="_error_1j0ct_160",statusText="_statusText_1j0ct_166",fadeOut="_fadeOut_1j0ct_178",fadeIn="_fadeIn_1j0ct_182",controls="_controls_1j0ct_188",controlButton="_controlButton_1j0ct_193",pauseButton="_pauseButton_1j0ct_212",paused="_paused_1j0ct_214",stopButton="_stopButton_1j0ct_224",historySectionWrapper="_historySectionWrapper_1j0ct_258",shimmer="_shimmer_1j0ct_1",celebrate="_celebrate_1j0ct_1",expanded="_expanded_1j0ct_290",historySection="_historySection_1j0ct_258",historyItem="_historyItem_1j0ct_309",doneSuccess="_doneSuccess_1j0ct_368",historyContent="_historyContent_1j0ct_404",statusIcon="_statusIcon_1j0ct_405",doneError="_doneError_1j0ct_414",historyMeta="_historyMeta_1j0ct_465",inputSectionWrapper="_inputSectionWrapper_1j0ct_535",hidden="_hidden_1j0ct_558",inputSection="_inputSection_1j0ct_535",taskInput="_taskInput_1j0ct_569",styles$1={wrapper:wrapper$1,"mask-running":"_mask-running_1j0ct_1",background,header,pulse,retryPulse,statusTextFadeOut,statusTextFadeIn,statusSection,indicator,thinking,tool_executing,retry,completed,input,output,error,statusText,fadeOut,fadeIn,controls,controlButton,pauseButton,paused,stopButton,historySectionWrapper,shimmer,celebrate,expanded,historySection,historyItem,doneSuccess,historyContent,statusIcon,doneError,historyMeta,inputSectionWrapper,hidden,inputSection,taskInput},_t=class _t{constructor(n){A(this,_);A(this,ee);A(this,We);A(this,te);A(this,Ue);A(this,Ae);A(this,ie);A(this,He);A(this,De);A(this,$e);A(this,Ce,new UIState);A(this,xe,!1);A(this,_e);A(this,O);A(this,ze,null);A(this,we,!1);A(this,Re,null);A(this,ke,null);A(this,Ge,!1);x(this,_e,n),x(this,O,new I18n(n.language??"en-US")),x(this,ee,S(this,_,Rt).call(this)),x(this,We,p(this,ee).querySelector(`.${styles$1.indicator}`)),x(this,te,p(this,ee).querySelector(`.${styles$1.statusText}`)),x(this,Ue,p(this,ee).querySelector(`.${styles$1.historySection}`)),x(this,Ae,p(this,ee).querySelector(`.${styles$1.expandButton}`)),x(this,ie,p(this,ee).querySelector(`.${styles$1.pauseButton}`)),x(this,He,p(this,ee).querySelector(`.${styles$1.stopButton}`)),x(this,De,p(this,ee).querySelector(`.${styles$1.inputSectionWrapper}`)),x(this,$e,p(this,ee).querySelector(`.${styles$1.taskInput}`)),S(this,_,Lt).call(this),S(this,_,Ft).call(this),S(this,_,tt).call(this)}get wrapper(){return p(this,ee)}async askUser(n){return new Promise(r=>{x(this,we,!0),x(this,ze,r),S(this,_,et).call(this,{type:"output",displayText:p(this,O).t("ui.panel.question",{question:n})}),p(this,xe)||S(this,_,nt).call(this),S(this,_,tt).call(this,p(this,O).t("ui.panel.userAnswerPrompt"))})}show(){this.wrapper.style.display="block",this.wrapper.offsetHeight,this.wrapper.style.opacity="1",this.wrapper.style.transform="translateX(-50%) translateY(0)"}hide(){this.wrapper.style.opacity="0",this.wrapper.style.transform="translateX(-50%) translateY(20px)",this.wrapper.style.display="none"}reset(){p(this,Ce).reset(),p(this,te).textContent=p(this,O).t("ui.panel.ready"),S(this,_,rt).call(this,"thinking"),S(this,_,xt).call(this),S(this,_,st).call(this),p(this,_e).getPaused()&&p(this,_e).onPauseToggle(),S(this,_,kt).call(this),x(this,we,!1),x(this,ze,null),S(this,_,tt).call(this)}expand(){S(this,_,nt).call(this)}collapse(){S(this,_,st).call(this)}update(n){const r=S(this,_,Zt).call(this,n);S(this,_,et).call(this,r)}dispose(){x(this,we,!1),S(this,_,Mt).call(this),this.wrapper.remove()}};ee=new WeakMap,We=new WeakMap,te=new WeakMap,Ue=new WeakMap,Ae=new WeakMap,ie=new WeakMap,He=new WeakMap,De=new WeakMap,$e=new WeakMap,Ce=new WeakMap,xe=new WeakMap,_e=new WeakMap,O=new WeakMap,ze=new WeakMap,we=new WeakMap,Re=new WeakMap,ke=new WeakMap,Ge=new WeakMap,_=new WeakSet,Zt=s(function(n){switch(n.type){case"thinking":return{type:"thinking",displayText:n.text??p(this,O).t("ui.panel.thinking")};case"input":return{type:"input",displayText:n.task};case"question":return{type:"output",displayText:p(this,O).t("ui.panel.question",{question:n.question})};case"userAnswer":return{type:"input",displayText:p(this,O).t("ui.panel.userAnswer",{input:n.input})};case"retry":return{type:"retry",displayText:`retry-ing (${n.current} / ${n.max})`};case"error":return{type:"error",displayText:n.message};case"output":return{type:"output",displayText:n.text};case"completed":return{type:"completed",displayText:p(this,O).t("ui.panel.taskCompleted")};case"toolExecuting":return{type:"tool_executing",toolName:n.toolName,toolArgs:n.args,displayText:S(this,_,Ot).call(this,n.toolName,n.args)};case"toolCompleted":{const r=S(this,_,Pt).call(this,n.toolName,n.args);return r?{type:"tool_executing",toolName:n.toolName,toolArgs:n.args,toolResult:n.result,displayText:r,duration:n.duration}:{type:"tool_executing",displayText:""}}}},"#toStepData"),Ot=s(function(n,r){switch(n){case"click_element_by_index":return p(this,O).t("ui.tools.clicking",{index:r.index});case"input_text":return p(this,O).t("ui.tools.inputting",{index:r.index});case"select_dropdown_option":return p(this,O).t("ui.tools.selecting",{text:r.text});case"scroll":return p(this,O).t("ui.tools.scrolling");case"wait":return p(this,O).t("ui.tools.waiting",{seconds:r.seconds});case"done":return p(this,O).t("ui.tools.done");default:return p(this,O).t("ui.tools.executing",{toolName:n})}},"#getToolExecutingText"),Pt=s(function(n,r){switch(n){case"click_element_by_index":return p(this,O).t("ui.tools.clicked",{index:r.index});case"input_text":return p(this,O).t("ui.tools.inputted",{text:r.text});case"select_dropdown_option":return p(this,O).t("ui.tools.selected",{text:r.text});case"scroll":return p(this,O).t("ui.tools.scrolled");case"wait":return p(this,O).t("ui.tools.waited");case"done":return null;default:return null}},"#getToolCompletedText"),et=s(function(n){if(!n.displayText)return;const r=p(this,Ce).addStep(n),o=truncate(r.displayText,20);x(this,ke,o),S(this,_,rt).call(this,r.type),S(this,_,xt).call(this),(r.type==="completed"||r.type==="error")&&(p(this,xe)||S(this,_,nt).call(this)),S(this,_,Ct).call(this)?S(this,_,tt).call(this):S(this,_,St).call(this)},"#updateInternal"),Nt=s(function(){const n=p(this,_e).onPauseToggle();S(this,_,kt).call(this),n?(p(this,te).textContent=p(this,O).t("ui.panel.paused"),S(this,_,rt).call(this,"thinking")):(p(this,te).textContent=p(this,O).t("ui.panel.continueExecution"),S(this,_,rt).call(this,"tool_executing"))},"#togglePause"),kt=s(function(){p(this,_e).getPaused()?(p(this,ie).textContent="▶",p(this,ie).title=p(this,O).t("ui.panel.continue"),p(this,ie).classList.add(styles$1.paused)):(p(this,ie).textContent="⏸︎",p(this,ie).title=p(this,O).t("ui.panel.pause"),p(this,ie).classList.remove(styles$1.paused))},"#updatePauseButton"),Ut=s(function(){S(this,_,et).call(this,{type:"error",displayText:p(this,O).t("ui.panel.taskTerminated")}),p(this,_e).onStop()},"#stopAgent"),At=s(function(){const n=p(this,$e).value.trim();n&&(S(this,_,St).call(this),p(this,we)?S(this,_,Dt).call(this,n):p(this,_e).onExecuteTask(n))},"#submitTask"),Dt=s(function(n){S(this,_,et).call(this,{type:"input",displayText:p(this,O).t("ui.panel.userAnswer",{input:n})}),x(this,we,!1),p(this,ze)&&(p(this,ze).call(this,n),x(this,ze,null))},"#handleUserAnswer"),tt=s(function(n){p(this,$e).value="",p(this,$e).placeholder=n||p(this,O).t("ui.panel.taskInput"),p(this,De).classList.remove(styles$1.hidden),setTimeout(()=>{p(this,$e).focus()},100)},"#showInputArea"),St=s(function(){p(this,De).classList.add(styles$1.hidden)},"#hideInputArea"),Ct=s(function(){if(p(this,we))return!0;const n=p(this,Ce).getAllSteps();if(n.length===0)return!0;const r=n[n.length-1];return r.type==="completed"||r.type==="error"},"#shouldShowInputArea"),Rt=s(function(){const n=document.createElement("div");return n.id="page-agent-runtime_agent-panel",n.className=`${styles$1.wrapper} ${styles$1.collapsed}`,n.setAttribute("data-browser-use-ignore","true"),n.innerHTML=`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "page-agent",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/page-agent.js",
|
|
7
7
|
"module": "./dist/esm/page-agent.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"chalk": "^5.6.2",
|
|
48
48
|
"zod": "^4.2.1",
|
|
49
|
-
"@page-agent/llms": "0.0.
|
|
50
|
-
"@page-agent/page-controller": "0.0.
|
|
51
|
-
"@page-agent/ui": "0.0.
|
|
49
|
+
"@page-agent/llms": "0.0.17",
|
|
50
|
+
"@page-agent/page-controller": "0.0.17",
|
|
51
|
+
"@page-agent/ui": "0.0.17"
|
|
52
52
|
}
|
|
53
53
|
}
|