@noodleseed/assistant 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,540 @@
1
+ "use strict";(()=>{var nS=Object.defineProperty;var Ar=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var z=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ft=(t,e)=>{for(var n in e)nS(t,n,{get:e[n],enumerable:!0})};function f(t,e,n){function a(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,c);let u=i.prototype,d=Object.keys(u);for(let m=0;m<d.length;m++){let h=d[m];h in s||(s[h]=u[h].bind(s))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:t});function i(s){var c;let u=n?.Parent?new o:this;a(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(i,"init",{value:a}),Object.defineProperty(i,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(i,"name",{value:t}),i}function Ie(t){return t&&Object.assign(zr,t),zr}var eg,Zl,ql,_t,ar,zr,Rr=z(()=>{"use strict";Zl=Object.freeze({status:"aborted"});ql=Symbol("zod_brand"),_t=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ar=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(eg=globalThis).__zod_globalConfig??(eg.__zod_globalConfig={});zr=globalThis.__zod_globalConfig});var k={};Ft(k,{BIGINT_FORMAT_RANGES:()=>Ql,Class:()=>Vl,NUMBER_FORMAT_RANGES:()=>Yl,aborted:()=>lr,allowsEval:()=>Bl,assert:()=>lS,assertEqual:()=>aS,assertIs:()=>iS,assertNever:()=>sS,assertNotEqual:()=>oS,assignProp:()=>ir,base64ToUint8Array:()=>rg,base64urlToUint8Array:()=>TS,cached:()=>rn,captureStackTrace:()=>Ko,cleanEnum:()=>SS,cleanRegex:()=>pa,clone:()=>We,cloneDef:()=>uS,createTransparentProxy:()=>gS,defineLazy:()=>Q,esc:()=>Go,escapeRegex:()=>ft,explicitlyAborted:()=>Xl,extend:()=>bS,finalizeIssue:()=>Ge,floatSafeRemainder:()=>Hl,getElementAtPath:()=>dS,getEnumValues:()=>da,getLengthableOrigin:()=>ha,getParsedType:()=>hS,getSizableOrigin:()=>fa,hexToUint8Array:()=>IS,isObject:()=>Cr,isPlainObject:()=>sr,issue:()=>nn,joinValues:()=>y,jsonStringifyReplacer:()=>tn,merge:()=>_S,mergeDefs:()=>Vt,normalizeParams:()=>I,nullish:()=>or,numKeys:()=>fS,objectClone:()=>cS,omit:()=>yS,optionalKeys:()=>Kl,parsedType:()=>w,partial:()=>wS,pick:()=>vS,prefixIssues:()=>rt,primitiveTypes:()=>Gl,promiseAllObject:()=>pS,propertyKeyTypes:()=>ma,randomString:()=>mS,required:()=>kS,safeExtend:()=>xS,shallowClone:()=>Wl,slugify:()=>Jl,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>ng,uint8ArrayToBase64url:()=>$S,uint8ArrayToHex:()=>ES,unwrapMessage:()=>ua});function aS(t){return t}function oS(t){return t}function iS(t){}function sS(t){throw new Error("Unexpected value in exhaustive check")}function lS(t){}function da(t){let e=Object.values(t).filter(a=>typeof a=="number");return Object.entries(t).filter(([a,r])=>e.indexOf(+a)===-1).map(([a,r])=>r)}function y(t,e="|"){return t.map(n=>_(n)).join(e)}function tn(t,e){return typeof e=="bigint"?e.toString():e}function rn(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function or(t){return t==null}function pa(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Hl(t,e){let n=t/e,a=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-a)<r?0:n-a}function Q(t,e,n){let a;Object.defineProperty(t,e,{get(){if(a!==tg)return a===void 0&&(a=tg,a=n()),a},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}function cS(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function ir(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vt(...t){let e={};for(let n of t){let a=Object.getOwnPropertyDescriptors(n);Object.assign(e,a)}return Object.defineProperties({},e)}function uS(t){return Vt(t._zod.def)}function dS(t,e){return e?e.reduce((n,a)=>n?.[a],t):t}function pS(t){let e=Object.keys(t),n=e.map(a=>t[a]);return Promise.all(n).then(a=>{let r={};for(let o=0;o<e.length;o++)r[e[o]]=a[o];return r})}function mS(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let a=0;a<t;a++)n+=e[Math.floor(Math.random()*e.length)];return n}function Go(t){return JSON.stringify(t)}function Jl(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Cr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function sr(t){if(Cr(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(Cr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Wl(t){return sr(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function fS(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function ft(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function We(t,e,n){let a=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(a._zod.parent=t),a}function I(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function gS(t){let e;return new Proxy({},{get(n,a,r){return e??(e=t()),Reflect.get(e,a,r)},set(n,a,r,o){return e??(e=t()),Reflect.set(e,a,r,o)},has(n,a){return e??(e=t()),Reflect.has(e,a)},deleteProperty(n,a){return e??(e=t()),Reflect.deleteProperty(e,a)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,a){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,a)},defineProperty(n,a,r){return e??(e=t()),Reflect.defineProperty(e,a,r)}})}function _(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Kl(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function vS(t,e){let n=t._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Vt(t._zod.def,{get shape(){let i={};for(let s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(i[s]=n.shape[s])}return ir(this,"shape",i),i},checks:[]});return We(t,o)}function yS(t,e){let n=t._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Vt(t._zod.def,{get shape(){let i={...t._zod.def.shape};for(let s in e){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete i[s]}return ir(this,"shape",i),i},checks:[]});return We(t,o)}function bS(t,e){if(!sr(e))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let o=t._zod.def.shape;for(let i in e)if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Vt(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return ir(this,"shape",o),o}});return We(t,r)}function xS(t,e){if(!sr(e))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Vt(t._zod.def,{get shape(){let a={...t._zod.def.shape,...e};return ir(this,"shape",a),a}});return We(t,n)}function _S(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Vt(t._zod.def,{get shape(){let a={...t._zod.def.shape,...e._zod.def.shape};return ir(this,"shape",a),a},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return We(t,n)}function wS(t,e,n){let r=e._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let i=Vt(e._zod.def,{get shape(){let s=e._zod.def.shape,c={...s};if(n)for(let u in n){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=t?new t({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=t?new t({type:"optional",innerType:s[u]}):s[u];return ir(this,"shape",c),c},checks:[]});return We(e,i)}function kS(t,e,n){let a=Vt(e._zod.def,{get shape(){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=new t({type:"nonoptional",innerType:r[i]}))}else for(let i in r)o[i]=new t({type:"nonoptional",innerType:r[i]});return ir(this,"shape",o),o}});return We(e,a)}function lr(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function Xl(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function rt(t,e){return e.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(t),n})}function ua(t){return typeof t=="string"?t:t?.message}function Ge(t,e,n){let a=t.message?t.message:ua(t.inst?._zod.def?.error?.(t))??ua(e?.error?.(t))??ua(n.customError?.(t))??ua(n.localeError?.(t))??"Invalid input",{inst:r,continue:o,input:i,...s}=t;return s.path??(s.path=[]),s.message=a,e?.reportInput&&(s.input=i),s}function fa(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ha(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function w(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function nn(...t){let[e,n,a]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:a}:{...e}}function SS(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function rg(t){let e=atob(t),n=new Uint8Array(e.length);for(let a=0;a<e.length;a++)n[a]=e.charCodeAt(a);return n}function ng(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function TS(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return rg(e+n)}function $S(t){return ng(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function IS(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let a=0;a<e.length;a+=2)n[a/2]=Number.parseInt(e.slice(a,a+2),16);return n}function ES(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var tg,Ko,Bl,hS,ma,Gl,Yl,Ql,Vl,j=z(()=>{"use strict";Rr();tg=Symbol("evaluating");Ko="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};Bl=rn(()=>{if(zr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});hS=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},ma=new Set(["string","number","symbol"]),Gl=new Set(["string","number","bigint","boolean","symbol","undefined"]);Yl={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ql={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Vl=class{constructor(...e){}}});function va(t,e=n=>n.message){let n={},a=[];for(let r of t.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):a.push(e(r));return{formErrors:a,fieldErrors:n}}function ya(t,e=n=>n.message){let n={_errors:[]},a=(r,o=[])=>{for(let i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>a({issues:s},[...o,...i.path]));else if(i.code==="invalid_key")a({issues:i.issues},[...o,...i.path]);else if(i.code==="invalid_element")a({issues:i.issues},[...o,...i.path]);else{let s=[...o,...i.path];if(s.length===0)n._errors.push(e(i));else{let c=n,u=0;for(;u<s.length;){let d=s[u];u===s.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(e(i))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return a(t),n}function ec(t,e=n=>n.message){let n={errors:[]},a=(r,o=[])=>{var i,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>a({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")a({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")a({issues:c.issues},[...o,...c.path]);else{let u=[...o,...c.path];if(u.length===0){n.errors.push(e(c));continue}let d=n,m=0;for(;m<u.length;){let h=u[m],b=m===u.length-1;typeof h=="string"?(d.properties??(d.properties={}),(i=d.properties)[h]??(i[h]={errors:[]}),d=d.properties[h]):(d.items??(d.items=[]),(s=d.items)[h]??(s[h]={errors:[]}),d=d.items[h]),b&&d.errors.push(e(c)),m++}}};return a(t),n}function og(t){let e=[],n=t.map(a=>typeof a=="object"?a.key:a);for(let a of n)typeof a=="number"?e.push(`[${a}]`):typeof a=="symbol"?e.push(`[${JSON.stringify(String(a))}]`):/[^\w$]/.test(a)?e.push(`[${JSON.stringify(a)}]`):(e.length&&e.push("."),e.push(a));return e.join("")}function tc(t){let e=[],n=[...t.issues].sort((a,r)=>(a.path??[]).length-(r.path??[]).length);for(let a of n)e.push(`\u2716 ${a.message}`),a.path?.length&&e.push(` \u2192 at ${og(a.path)}`);return e.join(`
2
+ `)}var ag,ga,nt,rc=z(()=>{"use strict";Rr();j();ag=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,tn,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ga=f("$ZodError",ag),nt=f("$ZodError",ag,{Parent:Error})});var an,ba,on,xa,sn,ln,cn,_a,Yo,ig,Qo,sg,Xo,lg,ei,cg,ti,ug,ri,dg,ni,pg,ai,mg,nc=z(()=>{"use strict";Rr();rc();j();an=t=>(e,n,a,r)=>{let o=a?{...a,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new _t;if(i.issues.length){let s=new(r?.Err??t)(i.issues.map(c=>Ge(c,o,Ie())));throw Ko(s,r?.callee),s}return i.value},ba=an(nt),on=t=>async(e,n,a,r)=>{let o=a?{...a,async:!0}:{async:!0},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise&&(i=await i),i.issues.length){let s=new(r?.Err??t)(i.issues.map(c=>Ge(c,o,Ie())));throw Ko(s,r?.callee),s}return i.value},xa=on(nt),sn=t=>(e,n,a)=>{let r=a?{...a,async:!1}:{async:!1},o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new _t;return o.issues.length?{success:!1,error:new(t??ga)(o.issues.map(i=>Ge(i,r,Ie())))}:{success:!0,data:o.value}},ln=sn(nt),cn=t=>async(e,n,a)=>{let r=a?{...a,async:!0}:{async:!0},o=e._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(i=>Ge(i,r,Ie())))}:{success:!0,data:o.value}},_a=cn(nt),Yo=t=>(e,n,a)=>{let r=a?{...a,direction:"backward"}:{direction:"backward"};return an(t)(e,n,r)},ig=Yo(nt),Qo=t=>(e,n,a)=>an(t)(e,n,a),sg=Qo(nt),Xo=t=>async(e,n,a)=>{let r=a?{...a,direction:"backward"}:{direction:"backward"};return on(t)(e,n,r)},lg=Xo(nt),ei=t=>async(e,n,a)=>on(t)(e,n,a),cg=ei(nt),ti=t=>(e,n,a)=>{let r=a?{...a,direction:"backward"}:{direction:"backward"};return sn(t)(e,n,r)},ug=ti(nt),ri=t=>(e,n,a)=>sn(t)(e,n,a),dg=ri(nt),ni=t=>async(e,n,a)=>{let r=a?{...a,direction:"backward"}:{direction:"backward"};return cn(t)(e,n,r)},pg=ni(nt),ai=t=>async(e,n,a)=>cn(t)(e,n,a),mg=ai(nt)});var st={};Ft(st,{base64:()=>bc,base64url:()=>oi,bigint:()=>$c,boolean:()=>Ec,browserEmail:()=>jS,cidrv4:()=>vc,cidrv6:()=>yc,cuid:()=>ac,cuid2:()=>oc,date:()=>wc,datetime:()=>Sc,domain:()=>LS,duration:()=>uc,e164:()=>_c,email:()=>pc,emoji:()=>mc,extendedDuration:()=>zS,guid:()=>dc,hex:()=>ZS,hostname:()=>US,html5Email:()=>MS,httpProtocol:()=>xc,idnEmail:()=>NS,integer:()=>Ic,ipv4:()=>fc,ipv6:()=>hc,ksuid:()=>lc,lowercase:()=>Rc,mac:()=>gc,md5_base64:()=>FS,md5_base64url:()=>VS,md5_hex:()=>qS,nanoid:()=>cc,null:()=>Ac,number:()=>ii,rfc5322Email:()=>OS,sha1_base64:()=>JS,sha1_base64url:()=>BS,sha1_hex:()=>HS,sha256_base64:()=>GS,sha256_base64url:()=>KS,sha256_hex:()=>WS,sha384_base64:()=>QS,sha384_base64url:()=>XS,sha384_hex:()=>YS,sha512_base64:()=>tT,sha512_base64url:()=>rT,sha512_hex:()=>eT,string:()=>Tc,time:()=>kc,ulid:()=>ic,undefined:()=>zc,unicodeEmail:()=>fg,uppercase:()=>Cc,uuid:()=>Pr,uuid4:()=>RS,uuid6:()=>CS,uuid7:()=>PS,xid:()=>sc});function mc(){return new RegExp(DS,"u")}function gg(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function kc(t){return new RegExp(`^${gg(t)}$`)}function Sc(t){let e=gg({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let a=`${e}(?:${n.join("|")})`;return new RegExp(`^${hg}T(?:${a})$`)}function wa(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function ka(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var ac,oc,ic,sc,lc,cc,uc,zS,dc,Pr,RS,CS,PS,pc,MS,OS,fg,NS,jS,DS,fc,hc,gc,vc,yc,bc,oi,US,LS,xc,_c,hg,wc,Tc,$c,Ic,ii,Ec,Ac,zc,Rc,Cc,ZS,qS,FS,VS,HS,JS,BS,WS,GS,KS,YS,QS,XS,eT,tT,rT,si=z(()=>{"use strict";j();ac=/^[cC][0-9a-z]{6,}$/,oc=/^[0-9a-z]+$/,ic=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sc=/^[0-9a-vA-V]{20}$/,lc=/^[A-Za-z0-9]{27}$/,cc=/^[a-zA-Z0-9_-]{21}$/,uc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zS=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,dc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pr=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,RS=Pr(4),CS=Pr(6),PS=Pr(7),pc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MS=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,OS=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,fg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,NS=fg,jS=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,DS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";fc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,gc=t=>{let e=ft(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},vc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,yc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,oi=/^[A-Za-z0-9_-]*$/,US=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,LS=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xc=/^https?$/,_c=/^\+[1-9]\d{6,14}$/,hg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",wc=new RegExp(`^${hg}$`);Tc=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},$c=/^-?\d+n?$/,Ic=/^-?\d+$/,ii=/^-?\d+(?:\.\d+)?$/,Ec=/^(?:true|false)$/i,Ac=/^null$/i,zc=/^undefined$/i,Rc=/^[^A-Z]*$/,Cc=/^[^a-z]*$/,ZS=/^[0-9a-fA-F]*$/;qS=/^[0-9a-fA-F]{32}$/,FS=wa(22,"=="),VS=ka(22),HS=/^[0-9a-fA-F]{40}$/,JS=wa(27,"="),BS=ka(27),WS=/^[0-9a-fA-F]{64}$/,GS=wa(43,"="),KS=ka(43),YS=/^[0-9a-fA-F]{96}$/,QS=wa(64,""),XS=ka(64),eT=/^[0-9a-fA-F]{128}$/,tT=wa(86,"=="),rT=ka(86)});function vg(t,e,n){t.issues.length&&e.issues.push(...rt(n,t.issues))}var ye,yg,li,ci,Pc,Mc,Oc,Nc,jc,Dc,Uc,Lc,Zc,un,qc,Fc,Vc,Hc,Jc,Bc,Wc,Gc,Kc,ui=z(()=>{"use strict";Rr();si();j();ye=f("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),yg={number:"number",bigint:"bigint",object:"date"},li=f("$ZodCheckLessThan",(t,e)=>{ye.init(t,e);let n=yg[typeof e.value];t._zod.onattach.push(a=>{let r=a._zod.bag,o=(e.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),t._zod.check=a=>{(e.inclusive?a.value<=e.value:a.value<e.value)||a.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:a.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ci=f("$ZodCheckGreaterThan",(t,e)=>{ye.init(t,e);let n=yg[typeof e.value];t._zod.onattach.push(a=>{let r=a._zod.bag,o=(e.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),t._zod.check=a=>{(e.inclusive?a.value>=e.value:a.value>e.value)||a.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:a.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Pc=f("$ZodCheckMultipleOf",(t,e)=>{ye.init(t,e),t._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Hl(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Mc=f("$ZodCheckNumberFormat",(t,e)=>{ye.init(t,e),e.format=e.format||"float64";let n=e.format?.includes("int"),a=n?"int":"number",[r,o]=Yl[e.format];t._zod.onattach.push(i=>{let s=i._zod.bag;s.format=e.format,s.minimum=r,s.maximum=o,n&&(s.pattern=Ic)}),t._zod.check=i=>{let s=i.value;if(n){if(!Number.isInteger(s)){i.issues.push({expected:a,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?i.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:a,inclusive:!0,continue:!e.abort}):i.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:a,inclusive:!0,continue:!e.abort});return}}s<r&&i.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),s>o&&i.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),Oc=f("$ZodCheckBigIntFormat",(t,e)=>{ye.init(t,e);let[n,a]=Ql[e.format];t._zod.onattach.push(r=>{let o=r._zod.bag;o.format=e.format,o.minimum=n,o.maximum=a}),t._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),o>a&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:a,inclusive:!0,inst:t,continue:!e.abort})}}),Nc=f("$ZodCheckMaxSize",(t,e)=>{var n;ye.init(t,e),(n=t._zod.def).when??(n.when=a=>{let r=a.value;return!or(r)&&r.size!==void 0}),t._zod.onattach.push(a=>{let r=a._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(a._zod.bag.maximum=e.maximum)}),t._zod.check=a=>{let r=a.value;r.size<=e.maximum||a.issues.push({origin:fa(r),code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),jc=f("$ZodCheckMinSize",(t,e)=>{var n;ye.init(t,e),(n=t._zod.def).when??(n.when=a=>{let r=a.value;return!or(r)&&r.size!==void 0}),t._zod.onattach.push(a=>{let r=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(a._zod.bag.minimum=e.minimum)}),t._zod.check=a=>{let r=a.value;r.size>=e.minimum||a.issues.push({origin:fa(r),code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Dc=f("$ZodCheckSizeEquals",(t,e)=>{var n;ye.init(t,e),(n=t._zod.def).when??(n.when=a=>{let r=a.value;return!or(r)&&r.size!==void 0}),t._zod.onattach.push(a=>{let r=a._zod.bag;r.minimum=e.size,r.maximum=e.size,r.size=e.size}),t._zod.check=a=>{let r=a.value,o=r.size;if(o===e.size)return;let i=o>e.size;a.issues.push({origin:fa(r),...i?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:a.value,inst:t,continue:!e.abort})}}),Uc=f("$ZodCheckMaxLength",(t,e)=>{var n;ye.init(t,e),(n=t._zod.def).when??(n.when=a=>{let r=a.value;return!or(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{let r=a._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(a._zod.bag.maximum=e.maximum)}),t._zod.check=a=>{let r=a.value;if(r.length<=e.maximum)return;let i=ha(r);a.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Lc=f("$ZodCheckMinLength",(t,e)=>{var n;ye.init(t,e),(n=t._zod.def).when??(n.when=a=>{let r=a.value;return!or(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{let r=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(a._zod.bag.minimum=e.minimum)}),t._zod.check=a=>{let r=a.value;if(r.length>=e.minimum)return;let i=ha(r);a.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),Zc=f("$ZodCheckLengthEquals",(t,e)=>{var n;ye.init(t,e),(n=t._zod.def).when??(n.when=a=>{let r=a.value;return!or(r)&&r.length!==void 0}),t._zod.onattach.push(a=>{let r=a._zod.bag;r.minimum=e.length,r.maximum=e.length,r.length=e.length}),t._zod.check=a=>{let r=a.value,o=r.length;if(o===e.length)return;let i=ha(r),s=o>e.length;a.issues.push({origin:i,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:a.value,inst:t,continue:!e.abort})}}),un=f("$ZodCheckStringFormat",(t,e)=>{var n,a;ye.init(t,e),t._zod.onattach.push(r=>{let o=r._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(a=t._zod).check??(a.check=()=>{})}),qc=f("$ZodCheckRegex",(t,e)=>{un.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Fc=f("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Rc),un.init(t,e)}),Vc=f("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Cc),un.init(t,e)}),Hc=f("$ZodCheckIncludes",(t,e)=>{ye.init(t,e);let n=ft(e.includes),a=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=a,t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),Jc=f("$ZodCheckStartsWith",(t,e)=>{ye.init(t,e);let n=new RegExp(`^${ft(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(a=>{let r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=a=>{a.value.startsWith(e.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:a.value,inst:t,continue:!e.abort})}}),Bc=f("$ZodCheckEndsWith",(t,e)=>{ye.init(t,e);let n=new RegExp(`.*${ft(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(a=>{let r=a._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=a=>{a.value.endsWith(e.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:a.value,inst:t,continue:!e.abort})}});Wc=f("$ZodCheckProperty",(t,e)=>{ye.init(t,e),t._zod.check=n=>{let a=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(a instanceof Promise)return a.then(r=>vg(r,n,e.property));vg(a,n,e.property)}}),Gc=f("$ZodCheckMimeType",(t,e)=>{ye.init(t,e);let n=new Set(e.mime);t._zod.onattach.push(a=>{a._zod.bag.mime=e.mime}),t._zod.check=a=>{n.has(a.value.type)||a.issues.push({code:"invalid_value",values:e.mime,input:a.value.type,inst:t,continue:!e.abort})}}),Kc=f("$ZodCheckOverwrite",(t,e)=>{ye.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}})});var Sa,Yc=z(()=>{"use strict";Sa=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let a=e.split(`
3
+ `).filter(i=>i),r=Math.min(...a.map(i=>i.length-i.trimStart().length)),o=a.map(i=>i.slice(r)).map(i=>" ".repeat(this.indent*2)+i);for(let i of o)this.content.push(i)}compile(){let e=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...n,r.join(`
4
+ `))}}});var Qc,Xc=z(()=>{"use strict";Qc={major:4,minor:4,patch:3}});function _u(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Mg(t){if(!oi.test(t))return!1;let e=t.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return _u(n)}function Og(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[a]=n;if(!a)return!1;let r=JSON.parse(atob(a));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch{return!1}}function xg(t,e,n){t.issues.length&&e.issues.push(...rt(n,t.issues)),e.value[n]=t.value}function fi(t,e,n,a,r,o){let i=n in a;if(t.issues.length){if(r&&o&&!i)return;e.issues.push(...rt(n,t.issues))}if(!i&&!r){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?i&&(e.value[n]=void 0):e.value[n]=t.value}function Ng(t){let e=Object.keys(t.shape);for(let a of e)if(!t.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);let n=Kl(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function jg(t,e,n,a,r,o){let i=[],s=r.keySet,c=r.catchall._zod,u=c.def.type,d=c.optin==="optional",m=c.optout==="optional";for(let h in e){if(h==="__proto__"||s.has(h))continue;if(u==="never"){i.push(h);continue}let b=c.run({value:e[h],issues:[]},a);b instanceof Promise?t.push(b.then(S=>fi(S,n,h,e,d,m))):fi(b,n,h,e,d,m)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:e,inst:o}),t.length?Promise.all(t).then(()=>n):n}function _g(t,e,n,a){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let r=t.filter(o=>!lr(o));return r.length===1?(e.value=r[0].value,r[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(i=>Ge(i,a,Ie())))}),e)}function wg(t,e,n,a){let r=t.filter(o=>o.issues.length===0);return r.length===1?(e.value=r[0].value,e):(r.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(i=>Ge(i,a,Ie())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1}),e)}function eu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(sr(t)&&sr(e)){let n=Object.keys(e),a=Object.keys(t).filter(o=>n.indexOf(o)!==-1),r={...t,...e};for(let o of a){let i=eu(t[o],e[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};r[o]=i.data}return{valid:!0,data:r}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let a=0;a<t.length;a++){let r=t[a],o=e[a],i=eu(r,o);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kg(t,e,n){let a=new Map,r;for(let s of e.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)a.has(c)||a.set(c,{}),a.get(c).l=!0}else t.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)a.has(c)||a.set(c,{}),a.get(c).r=!0;else t.issues.push(s);let o=[...a].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&t.issues.push({...r,keys:o}),lr(t))return t;let i=eu(e.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return t.value=i.data,t}function Sg(t,e){for(let n=t.length-1;n>=0;n--)if(t[n]._zod[e]!=="optional")return n+1;return 0}function Tg(t,e,n){t.issues.length&&e.issues.push(...rt(n,t.issues)),e.value[n]=t.value}function $g(t,e,n,a,r){for(let o=0;o<n.length;o++){let i=t[o],s=o<a.length;if(i.issues.length){if(!s&&o>=r){e.value.length=o;break}e.issues.push(...rt(o,i.issues))}e.value[o]=i.value}for(let o=e.value.length-1;o>=a.length&&(n[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}function Ig(t,e,n,a,r,o,i){t.issues.length&&(ma.has(typeof a)?n.issues.push(...rt(a,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:t.issues.map(s=>Ge(s,i,Ie()))})),e.issues.length&&(ma.has(typeof a)?n.issues.push(...rt(a,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:a,issues:e.issues.map(s=>Ge(s,i,Ie()))})),n.value.set(t.value,e.value)}function Eg(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function Ag(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}function zg(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function Rg(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function di(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},n)}function pi(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let r=e.transform(t.value,t);return r instanceof Promise?r.then(o=>mi(t,o,e.out,n)):mi(t,r,e.out,n)}else{let r=e.reverseTransform(t.value,t);return r instanceof Promise?r.then(o=>mi(t,o,e.in,n)):mi(t,r,e.in,n)}}function mi(t,e,n,a){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},a)}function Cg(t){return t.value=Object.freeze(t.value),t}function Pg(t,e,n,a){if(!t){let r={code:"custom",input:n,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(r.params=a._zod.def.params),e.issues.push(nn(r))}}var W,Mr,fe,tu,ru,nu,au,ou,iu,su,lu,cu,uu,du,pu,mu,fu,hu,gu,vu,yu,bu,xu,wu,ku,Su,Tu,$u,hi,Iu,Ta,gi,Eu,Au,zu,Ru,Cu,Pu,Mu,Ou,Nu,ju,Dg,Du,$a,Uu,Lu,Zu,vi,qu,Fu,Vu,Hu,Ju,Bu,Wu,yi,Gu,Ku,Yu,Qu,Xu,ed,td,rd,bi,Ia,nd,ad,od,id,sd,ld,cd,ud=z(()=>{"use strict";ui();Rr();Yc();nc();si();j();Xc();j();W=f("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Qc;let a=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&a.unshift(t);for(let r of a)for(let o of r._zod.onattach)o(t);if(a.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let r=(i,s,c)=>{let u=lr(i),d;for(let m of s){if(m._zod.def.when){if(Xl(i)||!m._zod.def.when(i))continue}else if(u)continue;let h=i.issues.length,b=m._zod.check(i);if(b instanceof Promise&&c?.async===!1)throw new _t;if(d||b instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await b,i.issues.length!==h&&(u||(u=lr(i,h)))});else{if(i.issues.length===h)continue;u||(u=lr(i,h))}}return d?d.then(()=>i):i},o=(i,s,c)=>{if(lr(i))return i.aborted=!0,i;let u=r(s,a,c);if(u instanceof Promise){if(c.async===!1)throw new _t;return u.then(d=>t._zod.parse(d,c))}return t._zod.parse(u,c)};t._zod.run=(i,s)=>{if(s.skipChecks)return t._zod.parse(i,s);if(s.direction==="backward"){let u=t._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,i,s)):o(u,i,s)}let c=t._zod.parse(i,s);if(c instanceof Promise){if(s.async===!1)throw new _t;return c.then(u=>r(u,a,s))}return r(c,a,s)}}Q(t,"~standard",()=>({validate:r=>{try{let o=ln(t,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return _a(t,r).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Mr=f("$ZodString",(t,e)=>{W.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Tc(t._zod.bag),t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),fe=f("$ZodStringFormat",(t,e)=>{un.init(t,e),Mr.init(t,e)}),tu=f("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=dc),fe.init(t,e)}),ru=f("$ZodUUID",(t,e)=>{if(e.version){let a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(a===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Pr(a))}else e.pattern??(e.pattern=Pr());fe.init(t,e)}),nu=f("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=pc),fe.init(t,e)}),au=f("$ZodURL",(t,e)=>{fe.init(t,e),t._zod.check=n=>{try{let a=n.value.trim();if(!e.normalize&&e.protocol?.source===xc.source&&!/^https?:\/\//i.test(a)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!e.abort});return}let r=new URL(a);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=r.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),ou=f("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=mc()),fe.init(t,e)}),iu=f("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=cc),fe.init(t,e)}),su=f("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=ac),fe.init(t,e)}),lu=f("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=oc),fe.init(t,e)}),cu=f("$ZodULID",(t,e)=>{e.pattern??(e.pattern=ic),fe.init(t,e)}),uu=f("$ZodXID",(t,e)=>{e.pattern??(e.pattern=sc),fe.init(t,e)}),du=f("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=lc),fe.init(t,e)}),pu=f("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Sc(e)),fe.init(t,e)}),mu=f("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=wc),fe.init(t,e)}),fu=f("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=kc(e)),fe.init(t,e)}),hu=f("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=uc),fe.init(t,e)}),gu=f("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=fc),fe.init(t,e),t._zod.bag.format="ipv4"}),vu=f("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=hc),fe.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),yu=f("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=gc(e.delimiter)),fe.init(t,e),t._zod.bag.format="mac"}),bu=f("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=vc),fe.init(t,e)}),xu=f("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=yc),fe.init(t,e),t._zod.check=n=>{let a=n.value.split("/");try{if(a.length!==2)throw new Error;let[r,o]=a;if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});wu=f("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=bc),fe.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{_u(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});ku=f("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=oi),fe.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{Mg(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),Su=f("$ZodE164",(t,e)=>{e.pattern??(e.pattern=_c),fe.init(t,e)});Tu=f("$ZodJWT",(t,e)=>{fe.init(t,e),t._zod.check=n=>{Og(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),$u=f("$ZodCustomStringFormat",(t,e)=>{fe.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),hi=f("$ZodNumber",(t,e)=>{W.init(t,e),t._zod.pattern=t._zod.bag.pattern??ii,t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:t,...o?{received:o}:{}}),n}}),Iu=f("$ZodNumberFormat",(t,e)=>{Mc.init(t,e),hi.init(t,e)}),Ta=f("$ZodBoolean",(t,e)=>{W.init(t,e),t._zod.pattern=Ec,t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:t}),n}}),gi=f("$ZodBigInt",(t,e)=>{W.init(t,e),t._zod.pattern=$c,t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),Eu=f("$ZodBigIntFormat",(t,e)=>{Oc.init(t,e),gi.init(t,e)}),Au=f("$ZodSymbol",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:t}),n}}),zu=f("$ZodUndefined",(t,e)=>{W.init(t,e),t._zod.pattern=zc,t._zod.values=new Set([void 0]),t._zod.parse=(n,a)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:t}),n}}),Ru=f("$ZodNull",(t,e)=>{W.init(t,e),t._zod.pattern=Ac,t._zod.values=new Set([null]),t._zod.parse=(n,a)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:t}),n}}),Cu=f("$ZodAny",(t,e)=>{W.init(t,e),t._zod.parse=n=>n}),Pu=f("$ZodUnknown",(t,e)=>{W.init(t,e),t._zod.parse=n=>n}),Mu=f("$ZodNever",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),Ou=f("$ZodVoid",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:t}),n}}),Nu=f("$ZodDate",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:t}),n}});ju=f("$ZodArray",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:t}),n;n.value=Array(r.length);let o=[];for(let i=0;i<r.length;i++){let s=r[i],c=e.element._zod.run({value:s,issues:[]},a);c instanceof Promise?o.push(c.then(u=>xg(u,n,i))):xg(c,n,i)}return o.length?Promise.all(o).then(()=>n):n}});Dg=f("$ZodObject",(t,e)=>{if(W.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...s};return Object.defineProperty(e,"shape",{value:c}),c}})}let a=rn(()=>Ng(e));Q(t._zod,"propValues",()=>{let s=e.shape,c={};for(let u in s){let d=s[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let m of d.values)c[u].add(m)}}return c});let r=Cr,o=e.catchall,i;t._zod.parse=(s,c)=>{i??(i=a.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),s;s.value={};let d=[],m=i.shape;for(let h of i.keys){let b=m[h],S=b._zod.optin==="optional",U=b._zod.optout==="optional",N=b._zod.run({value:u[h],issues:[]},c);N instanceof Promise?d.push(N.then(de=>fi(de,s,h,u,S,U))):fi(N,s,h,u,S,U)}return o?jg(d,u,s,c,a.value,t):d.length?Promise.all(d).then(()=>s):s}}),Du=f("$ZodObjectJIT",(t,e)=>{Dg.init(t,e);let n=t._zod.parse,a=rn(()=>Ng(e)),r=h=>{let b=new Sa(["shape","payload","ctx"]),S=a.value,U=g=>{let P=Go(g);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};b.write("const input = payload.value;");let N=Object.create(null),de=0;for(let g of S.keys)N[g]=`key_${de++}`;b.write("const newResult = {};");for(let g of S.keys){let P=N[g],H=Go(g),V=h[g],B=V?._zod?.optin==="optional",xe=V?._zod?.optout==="optional";b.write(`const ${P} = ${U(g)};`),B&&xe?b.write(`
5
+ if (${P}.issues.length) {
6
+ if (${H} in input) {
7
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
8
+ ...iss,
9
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
10
+ })));
11
+ }
12
+ }
13
+
14
+ if (${P}.value === undefined) {
15
+ if (${H} in input) {
16
+ newResult[${H}] = undefined;
17
+ }
18
+ } else {
19
+ newResult[${H}] = ${P}.value;
20
+ }
21
+
22
+ `):B?b.write(`
23
+ if (${P}.issues.length) {
24
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
25
+ ...iss,
26
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
27
+ })));
28
+ }
29
+
30
+ if (${P}.value === undefined) {
31
+ if (${H} in input) {
32
+ newResult[${H}] = undefined;
33
+ }
34
+ } else {
35
+ newResult[${H}] = ${P}.value;
36
+ }
37
+
38
+ `):b.write(`
39
+ const ${P}_present = ${H} in input;
40
+ if (${P}.issues.length) {
41
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
42
+ ...iss,
43
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
44
+ })));
45
+ }
46
+ if (!${P}_present && !${P}.issues.length) {
47
+ payload.issues.push({
48
+ code: "invalid_type",
49
+ expected: "nonoptional",
50
+ input: undefined,
51
+ path: [${H}]
52
+ });
53
+ }
54
+
55
+ if (${P}_present) {
56
+ if (${P}.value === undefined) {
57
+ newResult[${H}] = undefined;
58
+ } else {
59
+ newResult[${H}] = ${P}.value;
60
+ }
61
+ }
62
+
63
+ `)}b.write("payload.value = newResult;"),b.write("return payload;");let F=b.compile();return(g,P)=>F(h,g,P)},o,i=Cr,s=!zr.jitless,u=s&&Bl.value,d=e.catchall,m;t._zod.parse=(h,b)=>{m??(m=a.value);let S=h.value;return i(S)?s&&u&&b?.async===!1&&b.jitless!==!0?(o||(o=r(e.shape)),h=o(h,b),d?jg([],S,h,b,m,t):h):n(h,b):(h.issues.push({expected:"object",code:"invalid_type",input:S,inst:t}),h)}});$a=f("$ZodUnion",(t,e)=>{W.init(t,e),Q(t._zod,"optin",()=>e.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Q(t._zod,"optout",()=>e.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Q(t._zod,"values",()=>{if(e.options.every(a=>a._zod.values))return new Set(e.options.flatMap(a=>Array.from(a._zod.values)))}),Q(t._zod,"pattern",()=>{if(e.options.every(a=>a._zod.pattern)){let a=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${a.map(r=>pa(r.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(a,r)=>{if(n)return n(a,r);let o=!1,i=[];for(let s of e.options){let c=s._zod.run({value:a.value,issues:[]},r);if(c instanceof Promise)i.push(c),o=!0;else{if(c.issues.length===0)return c;i.push(c)}}return o?Promise.all(i).then(s=>_g(s,a,t,r)):_g(i,a,t,r)}});Uu=f("$ZodXor",(t,e)=>{$a.init(t,e),e.inclusive=!1;let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(a,r)=>{if(n)return n(a,r);let o=!1,i=[];for(let s of e.options){let c=s._zod.run({value:a.value,issues:[]},r);c instanceof Promise?(i.push(c),o=!0):i.push(c)}return o?Promise.all(i).then(s=>wg(s,a,t,r)):wg(i,a,t,r)}}),Lu=f("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,$a.init(t,e);let n=t._zod.parse;Q(t._zod,"propValues",()=>{let r={};for(let o of e.options){let i=o._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,c]of Object.entries(i)){r[s]||(r[s]=new Set);for(let u of c)r[s].add(u)}}return r});let a=rn(()=>{let r=e.options,o=new Map;for(let i of r){let s=i._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,i)}}return o});t._zod.parse=(r,o)=>{let i=r.value;if(!Cr(i))return r.issues.push({code:"invalid_type",expected:"object",input:i,inst:t}),r;let s=a.value.get(i?.[e.discriminator]);return s?s._zod.run(r,o):e.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(a.value.keys()),input:i,path:[e.discriminator],inst:t}),r)}}),Zu=f("$ZodIntersection",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value,o=e.left._zod.run({value:r,issues:[]},a),i=e.right._zod.run({value:r,issues:[]},a);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([c,u])=>kg(n,c,u)):kg(n,o,i)}});vi=f("$ZodTuple",(t,e)=>{W.init(t,e);let n=e.items;t._zod.parse=(a,r)=>{let o=a.value;if(!Array.isArray(o))return a.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),a;a.value=[];let i=[],s=Sg(n,"optin"),c=Sg(n,"optout");if(!e.rest){if(o.length<s)return a.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:t,origin:"array"}),a;o.length>n.length&&a.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:t,origin:"array"})}let u=new Array(n.length);for(let d=0;d<n.length;d++){let m=n[d]._zod.run({value:o[d],issues:[]},r);m instanceof Promise?i.push(m.then(h=>{u[d]=h})):u[d]=m}if(e.rest){let d=n.length-1,m=o.slice(n.length);for(let h of m){d++;let b=e.rest._zod.run({value:h,issues:[]},r);b instanceof Promise?i.push(b.then(S=>Tg(S,a,d))):Tg(b,a,d)}}return i.length?Promise.all(i).then(()=>$g(u,a,n,o,c)):$g(u,a,n,o,c)}});qu=f("$ZodRecord",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;if(!sr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:t}),n;let o=[],i=e.keyType._zod.values;if(i){n.value={};let s=new Set;for(let u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let d=e.keyType._zod.run({value:u,issues:[]},a);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(b=>Ge(b,a,Ie())),input:u,path:[u],inst:t});continue}let m=d.value,h=e.valueType._zod.run({value:r[u],issues:[]},a);h instanceof Promise?o.push(h.then(b=>{b.issues.length&&n.issues.push(...rt(u,b.issues)),n.value[m]=b.value})):(h.issues.length&&n.issues.push(...rt(u,h.issues)),n.value[m]=h.value)}let c;for(let u in r)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:t,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let c=e.keyType._zod.run({value:s,issues:[]},a);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ii.test(s)&&c.issues.length){let m=e.keyType._zod.run({value:Number(s),issues:[]},a);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(c=m)}if(c.issues.length){e.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(m=>Ge(m,a,Ie())),input:s,path:[s],inst:t});continue}let d=e.valueType._zod.run({value:r[s],issues:[]},a);d instanceof Promise?o.push(d.then(m=>{m.issues.length&&n.issues.push(...rt(s,m.issues)),n.value[c.value]=m.value})):(d.issues.length&&n.issues.push(...rt(s,d.issues)),n.value[c.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Fu=f("$ZodMap",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:t}),n;let o=[];n.value=new Map;for(let[i,s]of r){let c=e.keyType._zod.run({value:i,issues:[]},a),u=e.valueType._zod.run({value:s,issues:[]},a);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([d,m])=>{Ig(d,m,n,i,r,t,a)})):Ig(c,u,n,i,r,t,a)}return o.length?Promise.all(o).then(()=>n):n}});Vu=f("$ZodSet",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:t,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let i of r){let s=e.valueType._zod.run({value:i,issues:[]},a);s instanceof Promise?o.push(s.then(c=>Eg(c,n))):Eg(s,n)}return o.length?Promise.all(o).then(()=>n):n}});Hu=f("$ZodEnum",(t,e)=>{W.init(t,e);let n=da(e.entries),a=new Set(n);t._zod.values=a,t._zod.pattern=new RegExp(`^(${n.filter(r=>ma.has(typeof r)).map(r=>typeof r=="string"?ft(r):r.toString()).join("|")})$`),t._zod.parse=(r,o)=>{let i=r.value;return a.has(i)||r.issues.push({code:"invalid_value",values:n,input:i,inst:t}),r}}),Ju=f("$ZodLiteral",(t,e)=>{if(W.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(e.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${e.values.map(a=>typeof a=="string"?ft(a):a?ft(a.toString()):String(a)).join("|")})$`),t._zod.parse=(a,r)=>{let o=a.value;return n.has(o)||a.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),a}}),Bu=f("$ZodFile",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:t}),n}}),Wu=f("$ZodTransform",(t,e)=>{W.init(t,e),t._zod.optin="optional",t._zod.parse=(n,a)=>{if(a.direction==="backward")throw new ar(t.constructor.name);let r=e.transform(n.value,n);if(a.async)return(r instanceof Promise?r:Promise.resolve(r)).then(i=>(n.value=i,n.fallback=!0,n));if(r instanceof Promise)throw new _t;return n.value=r,n.fallback=!0,n}});yi=f("$ZodOptional",(t,e)=>{W.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Q(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Q(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${pa(n.source)})?$`):void 0}),t._zod.parse=(n,a)=>{if(e.innerType._zod.optin==="optional"){let r=n.value,o=e.innerType._zod.run(n,a);return o instanceof Promise?o.then(i=>Ag(i,r)):Ag(o,r)}return n.value===void 0?n:e.innerType._zod.run(n,a)}}),Gu=f("$ZodExactOptional",(t,e)=>{yi.init(t,e),Q(t._zod,"values",()=>e.innerType._zod.values),Q(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,a)=>e.innerType._zod.run(n,a)}),Ku=f("$ZodNullable",(t,e)=>{W.init(t,e),Q(t._zod,"optin",()=>e.innerType._zod.optin),Q(t._zod,"optout",()=>e.innerType._zod.optout),Q(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${pa(n.source)}|null)$`):void 0}),Q(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,a)=>n.value===null?n:e.innerType._zod.run(n,a)}),Yu=f("$ZodDefault",(t,e)=>{W.init(t,e),t._zod.optin="optional",Q(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,a)=>{if(a.direction==="backward")return e.innerType._zod.run(n,a);if(n.value===void 0)return n.value=e.defaultValue,n;let r=e.innerType._zod.run(n,a);return r instanceof Promise?r.then(o=>zg(o,e)):zg(r,e)}});Qu=f("$ZodPrefault",(t,e)=>{W.init(t,e),t._zod.optin="optional",Q(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,a)=>(a.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,a))}),Xu=f("$ZodNonOptional",(t,e)=>{W.init(t,e),Q(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(a=>a!==void 0)):void 0}),t._zod.parse=(n,a)=>{let r=e.innerType._zod.run(n,a);return r instanceof Promise?r.then(o=>Rg(o,t)):Rg(r,t)}});ed=f("$ZodSuccess",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>{if(a.direction==="backward")throw new ar("ZodSuccess");let r=e.innerType._zod.run(n,a);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),td=f("$ZodCatch",(t,e)=>{W.init(t,e),t._zod.optin="optional",Q(t._zod,"optout",()=>e.innerType._zod.optout),Q(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,a)=>{if(a.direction==="backward")return e.innerType._zod.run(n,a);let r=e.innerType._zod.run(n,a);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(i=>Ge(i,a,Ie()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=e.catchValue({...n,error:{issues:r.issues.map(o=>Ge(o,a,Ie()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),rd=f("$ZodNaN",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),bi=f("$ZodPipe",(t,e)=>{W.init(t,e),Q(t._zod,"values",()=>e.in._zod.values),Q(t._zod,"optin",()=>e.in._zod.optin),Q(t._zod,"optout",()=>e.out._zod.optout),Q(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,a)=>{if(a.direction==="backward"){let o=e.out._zod.run(n,a);return o instanceof Promise?o.then(i=>di(i,e.in,a)):di(o,e.in,a)}let r=e.in._zod.run(n,a);return r instanceof Promise?r.then(o=>di(o,e.out,a)):di(r,e.out,a)}});Ia=f("$ZodCodec",(t,e)=>{W.init(t,e),Q(t._zod,"values",()=>e.in._zod.values),Q(t._zod,"optin",()=>e.in._zod.optin),Q(t._zod,"optout",()=>e.out._zod.optout),Q(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,a)=>{if((a.direction||"forward")==="forward"){let o=e.in._zod.run(n,a);return o instanceof Promise?o.then(i=>pi(i,e,a)):pi(o,e,a)}else{let o=e.out._zod.run(n,a);return o instanceof Promise?o.then(i=>pi(i,e,a)):pi(o,e,a)}}});nd=f("$ZodPreprocess",(t,e)=>{bi.init(t,e)}),ad=f("$ZodReadonly",(t,e)=>{W.init(t,e),Q(t._zod,"propValues",()=>e.innerType._zod.propValues),Q(t._zod,"values",()=>e.innerType._zod.values),Q(t._zod,"optin",()=>e.innerType?._zod?.optin),Q(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(n,a)=>{if(a.direction==="backward")return e.innerType._zod.run(n,a);let r=e.innerType._zod.run(n,a);return r instanceof Promise?r.then(Cg):Cg(r)}});od=f("$ZodTemplateLiteral",(t,e)=>{W.init(t,e);let n=[];for(let a of e.parts)if(typeof a=="object"&&a!==null){if(!a._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...a._zod.traits].shift()}`);let r=a._zod.pattern instanceof RegExp?a._zod.pattern.source:a._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${a._zod.traits}`);let o=r.startsWith("^")?1:0,i=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,i))}else if(a===null||Gl.has(typeof a))n.push(ft(`${a}`));else throw new Error(`Invalid template literal part: ${a}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(a,r)=>typeof a.value!="string"?(a.issues.push({input:a.value,inst:t,expected:"string",code:"invalid_type"}),a):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(a.value)||a.issues.push({input:a.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),a)}),id=f("$ZodFunction",(t,e)=>(W.init(t,e),t._def=e,t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...a){let r=t._def.input?ba(t._def.input,a):a,o=Reflect.apply(n,this,r);return t._def.output?ba(t._def.output,o):o}},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...a){let r=t._def.input?await xa(t._def.input,a):a,o=await Reflect.apply(n,this,r);return t._def.output?await xa(t._def.output,o):o}},t._zod.parse=(n,a)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let a=t.constructor;return Array.isArray(n[0])?new a({type:"function",input:new vi({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new a({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let a=t.constructor;return new a({type:"function",input:t._def.input,output:n})},t)),sd=f("$ZodPromise",(t,e)=>{W.init(t,e),t._zod.parse=(n,a)=>Promise.resolve(n.value).then(r=>e.innerType._zod.run({value:r,issues:[]},a))}),ld=f("$ZodLazy",(t,e)=>{W.init(t,e),Q(t._zod,"innerType",()=>{let n=e;return n._cachedInner||(n._cachedInner=e.getter()),n._cachedInner}),Q(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Q(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Q(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Q(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(n,a)=>t._zod.innerType._zod.run(n,a)}),cd=f("$ZodCustom",(t,e)=>{ye.init(t,e),W.init(t,e),t._zod.parse=(n,a)=>n,t._zod.check=n=>{let a=n.value,r=e.fn(a);if(r instanceof Promise)return r.then(o=>Pg(o,n,a,t));Pg(r,n,a,t)}})});function Ug(){return{localeError:aT()}}var aT,Lg=z(()=>{"use strict";j();aT=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${_(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${i.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${y(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function Zg(){return{localeError:oT()}}var oT,qg=z(()=>{"use strict";j();oT=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${i.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${i.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function Fg(t,e,n,a){let r=Math.abs(t),o=r%10,i=r%100;return i>=11&&i<=19?a:o===1?e:o>=2&&o<=4?n:a}function Vg(){return{localeError:iT()}}var iT,Hg=z(()=>{"use strict";j();iT=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},a={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${_(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);if(i){let s=Number(r.maximum),c=Fg(s,i.unit.one,i.unit.few,i.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${i.verb} ${o}${r.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);if(i){let s=Number(r.minimum),c=Fg(s,i.unit.one,i.unit.few,i.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${i.verb} ${o}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function Jg(){return{localeError:sT()}}var sT,Bg=z(()=>{"use strict";j();sT=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${_(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function Wg(){return{localeError:lT()}}var lT,Gg=z(()=>{"use strict";j();lT=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${_(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",i=e(r.origin);return i?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",i=e(r.origin);return i?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}}});function Kg(){return{localeError:cT()}}var cT,Yg=z(()=>{"use strict";j();cT=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(r){return t[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},a={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${i.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${i.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${y(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}}});function Qg(){return{localeError:uT()}}var uT,Xg=z(()=>{"use strict";j();uT=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(r){return t[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},a={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin),s=a[r.origin]??r.origin;return i?`For stor: forventede ${s??"value"} ${i.verb} ${o} ${r.maximum.toString()} ${i.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin),s=a[r.origin]??r.origin;return i?`For lille: forventede ${s} ${i.verb} ${o} ${r.minimum.toString()} ${i.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}}});function ev(){return{localeError:dT()}}var dT,tv=z(()=>{"use strict";j();dT=()=>{let t={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 e(r){return t[r]??null}let n={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"},a={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function rv(){return{localeError:pT()}}var pT,nv=z(()=>{"use strict";j();pT=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(r){return t[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${_(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${i.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${i.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function xi(){return{localeError:mT()}}var mT,dd=z(()=>{"use strict";j();mT=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${_(r.values[0])}`:`Invalid option: expected one of ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${i.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(i=>`'${i}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function av(){return{localeError:fT()}}var fT,ov=z(()=>{"use strict";j();fT=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(r){return t[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},a={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}}});function iv(){return{localeError:hT()}}var hT,sv=z(()=>{"use strict";j();hT=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(r){return t[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin),s=a[r.origin]??r.origin;return i?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${i.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin),s=a[r.origin]??r.origin;return i?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${i.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${a[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${a[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}}});function lv(){return{localeError:gT()}}var gT,cv=z(()=>{"use strict";j();gT=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},a={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${_(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${y(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${i.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${y(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function uv(){return{localeError:vT()}}var vT,dv=z(()=>{"use strict";j();vT=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(r){return t[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Liian suuri: ${i.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Liian pieni: ${i.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function pv(){return{localeError:yT()}}var yT,mv=z(()=>{"use strict";j();yT=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},a={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${_(r.values[0])} attendu`:`Option invalide : une valeur parmi ${y(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Trop grand : ${a[r.origin]??"valeur"} doit ${i.verb} ${o}${r.maximum.toString()} ${i.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${a[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Trop petit : ${a[r.origin]??"valeur"} doit ${i.verb} ${o}${r.minimum.toString()} ${i.unit}`:`Trop petit : ${a[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${y(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function fv(){return{localeError:bT()}}var bT,hv=z(()=>{"use strict";j();bT=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${_(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",i=e(r.origin);return i?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",i=e(r.origin);return i?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${y(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function gv(){return{localeError:xT()}}var xT,vv=z(()=>{"use strict";j();xT=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?t[u]:void 0,a=u=>{let d=n(u);return d?d.label:u??t.unknown.label},r=u=>`\u05D4${a(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",i=u=>u?e[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let d=u.expected,m=c[d??""]??a(d),h=w(u.input),b=c[h]??t[h]?.label??h;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${b}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${b}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${_(u.values[0])}`;let d=u.values.map(b=>_(b));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let m=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let d=i(u.origin),m=r(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let S=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(u.origin==="array"||u.origin==="set"){let S=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",U=u.inclusive?`${u.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${U}`.trim()}let h=u.inclusive?"<=":"<",b=o(u.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${b} ${h}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${b} ${h}${u.maximum.toString()}`}case"too_small":{let d=i(u.origin),m=r(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let S=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(u.origin==="array"||u.origin==="set"){let S=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let N=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${N}`}let U=u.inclusive?`${u.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${U}`.trim()}let h=u.inclusive?">=":">",b=o(u.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${b} ${h}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${b} ${h}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let m=s[d.format],h=m?.label??d.format,S=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${h} \u05DC\u05D0 ${S}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${y(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function yv(){return{localeError:_T()}}var _T,bv=z(()=>{"use strict";j();_T=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(r){return t[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},a={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin),s=a[r.origin]??r.origin;return i?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${i.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin),s=a[r.origin]??r.origin;return i?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${i.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${y(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${a[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${a[r.origin]??r.origin}`;default:return"Neispravan unos"}}}});function xv(){return{localeError:wT()}}var wT,_v=z(()=>{"use strict";j();wT=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(r){return t[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},a={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${i.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${i.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function wv(t,e,n){return Math.abs(t)===1?e:n}function dn(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(e.includes(n)?"\u0576":"\u0568")}function kv(){return{localeError:kT()}}var kT,Sv=z(()=>{"use strict";j();kT=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(r){return t[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},a={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${_(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);if(i){let s=Number(r.maximum),c=wv(s,i.unit.one,i.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);if(i){let s=Number(r.minimum),c=wv(s,i.unit.one,i.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${dn(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${y(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${dn(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${dn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Tv(){return{localeError:ST()}}var ST,$v=z(()=>{"use strict";j();ST=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(r){return t[r]??null}let n={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"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${_(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}}});function Iv(){return{localeError:TT()}}var TT,Ev=z(()=>{"use strict";j();TT=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(r){return t[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},a={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${y(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}}});function Av(){return{localeError:$T()}}var $T,zv=z(()=>{"use strict";j();$T=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(r){return t[r]??null}let n={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"},a={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${_(r.values[0])}`:`Opzione non valida: atteso uno tra ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${y(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}}});function Rv(){return{localeError:IT()}}var IT,Cv=z(()=>{"use strict";j();IT=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(r){return t[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},a={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${y(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",i=e(r.origin);return i?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",i=e(r.origin);return i?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${y(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function Pv(){return{localeError:ET()}}var ET,Mv=z(()=>{"use strict";j();ET=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(r){return t[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},a={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${_(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${y(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${o}${r.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${i.verb} ${o}${r.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function _i(){return{localeError:AT()}}var AT,pd=z(()=>{"use strict";j();AT=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(r){return t[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},a={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${_(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${i.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${i.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${y(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function Ov(){return _i()}var Nv=z(()=>{"use strict";pd()});function jv(){return{localeError:zT()}}var zT,Dv=z(()=>{"use strict";j();zT=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${y(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",i=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${o}${i}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${i}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",i=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${o}${i}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${i}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${y(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function Uv(t){let e=Math.abs(t),n=e%10,a=e%100;return a>=11&&a<=19||n===0?"many":n===1?"one":"few"}function Lv(){return{localeError:RT()}}var Ea,RT,Zv=z(()=>{"use strict";j();Ea=t=>t.charAt(0).toUpperCase()+t.slice(1);RT=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(r,o,i,s){let c=t[r]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][i?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},a={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${_(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=a[r.origin]??r.origin,i=e(r.origin,Uv(Number(r.maximum)),r.inclusive??!1,"smaller");if(i?.verb)return`${Ea(o??r.origin??"reik\u0161m\u0117")} ${i.verb} ${r.maximum.toString()} ${i.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ea(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${i?.unit}`}case"too_small":{let o=a[r.origin]??r.origin,i=e(r.origin,Uv(Number(r.minimum)),r.inclusive??!1,"bigger");if(i?.verb)return`${Ea(o??r.origin??"reik\u0161m\u0117")} ${i.verb} ${r.minimum.toString()} ${i.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ea(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${i?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${y(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=a[r.origin]??r.origin;return`${Ea(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function qv(){return{localeError:CT()}}var CT,Fv=z(()=>{"use strict";j();CT=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(r){return t[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},a={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${_(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${i.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function Vv(){return{localeError:PT()}}var PT,Hv=z(()=>{"use strict";j();PT=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(r){return t[r]??null}let n={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"},a={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${_(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Terlalu besar: dijangka ${r.origin??"nilai"} ${i.verb} ${o}${r.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Terlalu kecil: dijangka ${r.origin} ${i.verb} ${o}${r.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}}});function Jv(){return{localeError:MT()}}var MT,Bv=z(()=>{"use strict";j();MT=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(r){return t[r]??null}let n={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"},a={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${_(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return i?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return i?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}}});function Wv(){return{localeError:OT()}}var OT,Gv=z(()=>{"use strict";j();OT=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(r){return t[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${_(r.values[0])}`:`Ugyldig valg: forventet en av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}}});function Kv(){return{localeError:NT()}}var NT,Yv=z(()=>{"use strict";j();NT=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(r){return t[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},a={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${_(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${i.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${i.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Qv(){return{localeError:jT()}}var jT,Xv=z(()=>{"use strict";j();jT=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(r){return t[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},a={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${_(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${y(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${i.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${y(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function ey(){return{localeError:DT()}}var DT,ty=z(()=>{"use strict";j();DT=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(r){return t[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},a={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${i.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${i.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function ry(){return{localeError:UT()}}var UT,ny=z(()=>{"use strict";j();UT=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(r){return t[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${_(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${y(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}}});function ay(){return{localeError:LT()}}var LT,oy=z(()=>{"use strict";j();LT=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(r){return t[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},a={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${i.verb} ${o}${r.maximum.toString()} ${i.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Prea mic: a\u0219teptat ca ${r.origin} ${i.verb} ${o}${r.minimum.toString()} ${i.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${y(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}}});function iy(t,e,n,a){let r=Math.abs(t),o=r%10,i=r%100;return i>=11&&i<=19?a:o===1?e:o>=2&&o<=4?n:a}function sy(){return{localeError:ZT()}}var ZT,ly=z(()=>{"use strict";j();ZT=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${_(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);if(i){let s=Number(r.maximum),c=iy(s,i.unit.one,i.unit.few,i.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);if(i){let s=Number(r.minimum),c=iy(s,i.unit.one,i.unit.few,i.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function cy(){return{localeError:qT()}}var qT,uy=z(()=>{"use strict";j();qT=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(r){return t[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},a={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${i.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${y(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}}});function dy(){return{localeError:FT()}}var FT,py=z(()=>{"use strict";j();FT=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(r){return t[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},a={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${i.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${i.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${y(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function my(){return{localeError:VT()}}var VT,fy=z(()=>{"use strict";j();VT=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(r){return t[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${_(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${i.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${i.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function hy(){return{localeError:HT()}}var HT,gy=z(()=>{"use strict";j();HT=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(r){return t[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},a={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${_(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",i=e(r.origin);return i?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${i.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",i=e(r.origin);return i?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${i.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${y(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function vy(){return{localeError:JT()}}var JT,yy=z(()=>{"use strict";j();JT=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(r){return t[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function wi(){return{localeError:BT()}}var BT,md=z(()=>{"use strict";j();BT=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(r){return t[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${i.verb} ${o}${r.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${i.verb} ${o}${r.minimum.toString()} ${i.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${y(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function by(){return wi()}var xy=z(()=>{"use strict";md()});function _y(){return{localeError:WT()}}var WT,wy=z(()=>{"use strict";j();WT=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(r){return t[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},a={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${y(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${i.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${i.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${y(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function ky(){return{localeError:GT()}}var GT,Sy=z(()=>{"use strict";j();GT=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(r){return t[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},a={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function Ty(){return{localeError:KT()}}var KT,$y=z(()=>{"use strict";j();KT=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(r){return t[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},a={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i.verb} ${o}${r.maximum.toString()} ${i.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i.verb} ${o}${r.minimum.toString()} ${i.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${y(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function Iy(){return{localeError:YT()}}var YT,Ey=z(()=>{"use strict";j();YT=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(r){return t[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},a={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${i.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${i.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${y(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function Ay(){return{localeError:QT()}}var QT,zy=z(()=>{"use strict";j();QT=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(r){return t[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},a={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${i.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${i.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${y(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function Ry(){return{localeError:XT()}}var XT,Cy=z(()=>{"use strict";j();XT=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(r){return t[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},a={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=a[r.expected]??r.expected,i=w(r.input),s=a[i]??i;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${_(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${i.verb} ${o}${r.maximum} ${i.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${i.verb} ${o}${r.minimum} ${i.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${y(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Aa={};Ft(Aa,{ar:()=>Ug,az:()=>Zg,be:()=>Vg,bg:()=>Jg,ca:()=>Wg,cs:()=>Kg,da:()=>Qg,de:()=>ev,el:()=>rv,en:()=>xi,eo:()=>av,es:()=>iv,fa:()=>lv,fi:()=>uv,fr:()=>pv,frCA:()=>fv,he:()=>gv,hr:()=>yv,hu:()=>xv,hy:()=>kv,id:()=>Tv,is:()=>Iv,it:()=>Av,ja:()=>Rv,ka:()=>Pv,kh:()=>Ov,km:()=>_i,ko:()=>jv,lt:()=>Lv,mk:()=>qv,ms:()=>Vv,nl:()=>Jv,no:()=>Wv,ota:()=>Kv,pl:()=>ey,ps:()=>Qv,pt:()=>ry,ro:()=>ay,ru:()=>sy,sl:()=>cy,sv:()=>dy,ta:()=>my,th:()=>hy,tr:()=>vy,ua:()=>by,uk:()=>wi,ur:()=>_y,uz:()=>ky,vi:()=>Ty,yo:()=>Ry,zhCN:()=>Iy,zhTW:()=>Ay});var fd=z(()=>{"use strict";Lg();qg();Hg();Bg();Gg();Yg();Xg();tv();nv();dd();ov();sv();cv();dv();mv();hv();vv();bv();_v();Sv();$v();Ev();zv();Cv();Mv();Nv();pd();Dv();Zv();Fv();Hv();Bv();Gv();Yv();Xv();ty();ny();oy();ly();uy();py();fy();gy();yy();xy();md();wy();Sy();$y();Ey();zy();Cy()});function Si(){return new ki}var Py,hd,gd,ki,Oe,za=z(()=>{"use strict";hd=Symbol("ZodOutput"),gd=Symbol("ZodInput"),ki=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let a=n[0];return this._map.set(e,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let a={...this.get(n)??{}};delete a.id;let r={...a,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(Py=globalThis).__zod_globalRegistry??(Py.__zod_globalRegistry=Si());Oe=globalThis.__zod_globalRegistry});function vd(t,e){return new t({type:"string",...I(e)})}function yd(t,e){return new t({type:"string",coerce:!0,...I(e)})}function Ti(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...I(e)})}function Ra(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...I(e)})}function $i(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...I(e)})}function Ii(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(e)})}function Ei(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(e)})}function Ai(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(e)})}function Ca(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...I(e)})}function zi(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...I(e)})}function Ri(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(e)})}function Ci(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...I(e)})}function Pi(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(e)})}function Mi(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...I(e)})}function Oi(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...I(e)})}function Ni(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(e)})}function ji(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(e)})}function Di(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(e)})}function bd(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...I(e)})}function Ui(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(e)})}function Li(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(e)})}function Zi(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...I(e)})}function qi(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...I(e)})}function Fi(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...I(e)})}function Vi(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...I(e)})}function _d(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(e)})}function wd(t,e){return new t({type:"string",format:"date",check:"string_format",...I(e)})}function kd(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...I(e)})}function Sd(t,e){return new t({type:"string",format:"duration",check:"string_format",...I(e)})}function Td(t,e){return new t({type:"number",checks:[],...I(e)})}function $d(t,e){return new t({type:"number",coerce:!0,checks:[],...I(e)})}function Id(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...I(e)})}function Ed(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...I(e)})}function Ad(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...I(e)})}function zd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...I(e)})}function Rd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...I(e)})}function Cd(t,e){return new t({type:"boolean",...I(e)})}function Pd(t,e){return new t({type:"boolean",coerce:!0,...I(e)})}function Md(t,e){return new t({type:"bigint",...I(e)})}function Od(t,e){return new t({type:"bigint",coerce:!0,...I(e)})}function Nd(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...I(e)})}function jd(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...I(e)})}function Dd(t,e){return new t({type:"symbol",...I(e)})}function Ud(t,e){return new t({type:"undefined",...I(e)})}function Ld(t,e){return new t({type:"null",...I(e)})}function Zd(t){return new t({type:"any"})}function qd(t){return new t({type:"unknown"})}function Fd(t,e){return new t({type:"never",...I(e)})}function Vd(t,e){return new t({type:"void",...I(e)})}function Hd(t,e){return new t({type:"date",...I(e)})}function Jd(t,e){return new t({type:"date",coerce:!0,...I(e)})}function Bd(t,e){return new t({type:"nan",...I(e)})}function Ct(t,e){return new li({check:"less_than",...I(e),value:t,inclusive:!1})}function lt(t,e){return new li({check:"less_than",...I(e),value:t,inclusive:!0})}function Pt(t,e){return new ci({check:"greater_than",...I(e),value:t,inclusive:!1})}function Ke(t,e){return new ci({check:"greater_than",...I(e),value:t,inclusive:!0})}function Hi(t){return Pt(0,t)}function Ji(t){return Ct(0,t)}function Bi(t){return lt(0,t)}function Wi(t){return Ke(0,t)}function cr(t,e){return new Pc({check:"multiple_of",...I(e),value:t})}function ur(t,e){return new Nc({check:"max_size",...I(e),maximum:t})}function Mt(t,e){return new jc({check:"min_size",...I(e),minimum:t})}function Or(t,e){return new Dc({check:"size_equals",...I(e),size:t})}function Nr(t,e){return new Uc({check:"max_length",...I(e),maximum:t})}function Ht(t,e){return new Lc({check:"min_length",...I(e),minimum:t})}function jr(t,e){return new Zc({check:"length_equals",...I(e),length:t})}function pn(t,e){return new qc({check:"string_format",format:"regex",...I(e),pattern:t})}function mn(t){return new Fc({check:"string_format",format:"lowercase",...I(t)})}function fn(t){return new Vc({check:"string_format",format:"uppercase",...I(t)})}function hn(t,e){return new Hc({check:"string_format",format:"includes",...I(e),includes:t})}function gn(t,e){return new Jc({check:"string_format",format:"starts_with",...I(e),prefix:t})}function vn(t,e){return new Bc({check:"string_format",format:"ends_with",...I(e),suffix:t})}function Gi(t,e,n){return new Wc({check:"property",property:t,schema:e,...I(n)})}function yn(t,e){return new Gc({check:"mime_type",mime:t,...I(e)})}function wt(t){return new Kc({check:"overwrite",tx:t})}function bn(t){return wt(e=>e.normalize(t))}function xn(){return wt(t=>t.trim())}function _n(){return wt(t=>t.toLowerCase())}function wn(){return wt(t=>t.toUpperCase())}function kn(){return wt(t=>Jl(t))}function Wd(t,e,n){return new t({type:"array",element:e,...I(n)})}function t$(t,e,n){return new t({type:"union",options:e,...I(n)})}function r$(t,e,n){return new t({type:"union",options:e,inclusive:!1,...I(n)})}function n$(t,e,n,a){return new t({type:"union",options:n,discriminator:e,...I(a)})}function a$(t,e,n){return new t({type:"intersection",left:e,right:n})}function o$(t,e,n,a){let r=n instanceof W,o=r?a:n,i=r?n:null;return new t({type:"tuple",items:e,rest:i,...I(o)})}function i$(t,e,n,a){return new t({type:"record",keyType:e,valueType:n,...I(a)})}function s$(t,e,n,a){return new t({type:"map",keyType:e,valueType:n,...I(a)})}function l$(t,e,n){return new t({type:"set",valueType:e,...I(n)})}function c$(t,e,n){let a=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new t({type:"enum",entries:a,...I(n)})}function u$(t,e,n){return new t({type:"enum",entries:e,...I(n)})}function d$(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...I(n)})}function Gd(t,e){return new t({type:"file",...I(e)})}function p$(t,e){return new t({type:"transform",transform:e})}function m$(t,e){return new t({type:"optional",innerType:e})}function f$(t,e){return new t({type:"nullable",innerType:e})}function h$(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Wl(n)}})}function g$(t,e,n){return new t({type:"nonoptional",innerType:e,...I(n)})}function v$(t,e){return new t({type:"success",innerType:e})}function y$(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}function b$(t,e,n){return new t({type:"pipe",in:e,out:n})}function x$(t,e){return new t({type:"readonly",innerType:e})}function _$(t,e,n){return new t({type:"template_literal",parts:e,...I(n)})}function w$(t,e){return new t({type:"lazy",getter:e})}function k$(t,e){return new t({type:"promise",innerType:e})}function Kd(t,e,n){let a=I(n);return a.abort??(a.abort=!0),new t({type:"custom",check:"custom",fn:e,...a})}function Yd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...I(n)})}function Qd(t,e){let n=My(a=>(a.addIssue=r=>{if(typeof r=="string")a.issues.push(nn(r,a.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=a.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),a.issues.push(nn(o))}},t(a.value,a)),e);return n}function My(t,e){let n=new ye({check:"custom",...I(e)});return n._zod.check=t,n}function Xd(t){let e=new ye({check:"describe"});return e._zod.onattach=[n=>{let a=Oe.get(n)??{};Oe.add(n,{...a,description:t})}],e._zod.check=()=>{},e}function ep(t){let e=new ye({check:"meta"});return e._zod.onattach=[n=>{let a=Oe.get(n)??{};Oe.add(n,{...a,...t})}],e._zod.check=()=>{},e}function tp(t,e){let n=I(e),a=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(a=a.map(b=>typeof b=="string"?b.toLowerCase():b),r=r.map(b=>typeof b=="string"?b.toLowerCase():b));let o=new Set(a),i=new Set(r),s=t.Codec??Ia,c=t.Boolean??Ta,u=t.String??Mr,d=new u({type:"string",error:n.error}),m=new c({type:"boolean",error:n.error}),h=new s({type:"pipe",in:d,out:m,transform:((b,S)=>{let U=b;return n.case!=="sensitive"&&(U=U.toLowerCase()),o.has(U)?!0:i.has(U)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...i],input:S.value,inst:h,continue:!1}),{})}),reverseTransform:((b,S)=>b===!0?a[0]||"true":r[0]||"false"),error:n.error});return h}function Sn(t,e,n,a={}){let r=I(a),o={...I(a),check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new t(o)}var xd,Oy=z(()=>{"use strict";ui();za();ud();j();xd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function dr(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Oe,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function ce(t,e,n={path:[],schemaPath:[]}){var a;let r=t._zod.def,o=e.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;let i={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,i);let s=t._zod.toJSONSchema?.();if(s)i.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,i.schema,d);else{let h=i.schema,b=e.processors[r.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);b(t,e,h,d)}let m=t._zod.parent;m&&(i.ref||(i.ref=m),ce(m,e,d),e.seen.get(m).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(i.schema,c),e.io==="input"&&Ye(t)&&(delete i.schema.examples,delete i.schema.default),e.io==="input"&&"_prefault"in i.schema&&((a=i.schema).default??(a.default=i.schema._prefault)),delete i.schema._prefault,e.seen.get(t).schema}function pr(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=new Map;for(let i of t.seen.entries()){let s=t.metadataRegistry.get(i[0])?.id;if(s){let c=a.get(s);if(c&&c!==i[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(s,i[0])}}let r=i=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let m=t.external.registry.get(i[0])?.id,h=t.external.uri??(S=>S);if(m)return{ref:h(m)};let b=i[1].defId??i[1].schema.id??`schema${t.counter++}`;return i[1].defId=b,{defId:b,ref:`${h("__shared")}#/${s}/${b}`}}if(i[1]===n)return{ref:"#"};let u=`#/${s}/`,d=i[1].schema.id??`__schema${t.counter++}`;return{defId:d,ref:u+d}},o=i=>{if(i[1].schema.$ref)return;let s=i[1],{ref:c,defId:u}=r(i);s.def={...s.schema},u&&(s.defId=u);let d=s.schema;for(let m in d)delete d[m];d.$ref=c};if(t.cycles==="throw")for(let i of t.seen.entries()){let s=i[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
64
+
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of t.seen.entries()){let s=i[1];if(e===i[0]){o(i);continue}if(t.external){let u=t.external.registry.get(i[0])?.id;if(e!==i[0]&&u){o(i);continue}}if(t.metadataRegistry.get(i[0])?.id){o(i);continue}if(s.cycle){o(i);continue}if(s.count>1&&t.reused==="ref"){o(i);continue}}}function mr(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=s=>{let c=t.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,d={...u},m=c.ref;if(c.ref=null,m){a(m);let b=t.seen.get(m),S=b.schema;if(S.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(S)):Object.assign(u,S),Object.assign(u,d),s._zod.parent===m)for(let N in u)N==="$ref"||N==="allOf"||N in d||delete u[N];if(S.$ref&&b.def)for(let N in u)N==="$ref"||N==="allOf"||N in b.def&&JSON.stringify(u[N])===JSON.stringify(b.def[N])&&delete u[N]}let h=s._zod.parent;if(h&&h!==m){a(h);let b=t.seen.get(h);if(b?.schema.$ref&&(u.$ref=b.schema.$ref,b.def))for(let S in u)S==="$ref"||S==="allOf"||S in b.def&&JSON.stringify(u[S])===JSON.stringify(b.def[S])&&delete u[S]}t.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(let s of[...t.seen.entries()].reverse())a(s[0]);let r={};if(t.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=t.external.uri(s)}Object.assign(r,n.def??n.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&r.id===o&&delete r.id;let i=t.external?.defs??{};for(let s of t.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,i[c.defId]=c.def)}t.external||Object.keys(i).length>0&&(t.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:Tn(e,"input",t.processors),output:Tn(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Ye(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let a=t._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Ye(a.element,n);if(a.type==="set")return Ye(a.valueType,n);if(a.type==="lazy")return Ye(a.getter(),n);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return Ye(a.innerType,n);if(a.type==="intersection")return Ye(a.left,n)||Ye(a.right,n);if(a.type==="record"||a.type==="map")return Ye(a.keyType,n)||Ye(a.valueType,n);if(a.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:Ye(a.in,n)||Ye(a.out,n);if(a.type==="object"){for(let r in a.shape)if(Ye(a.shape[r],n))return!0;return!1}if(a.type==="union"){for(let r of a.options)if(Ye(r,n))return!0;return!1}if(a.type==="tuple"){for(let r of a.items)if(Ye(r,n))return!0;return!!(a.rest&&Ye(a.rest,n))}return!1}var rp,Tn,Pa=z(()=>{"use strict";za();rp=(t,e={})=>n=>{let a=dr({...n,processors:e});return ce(t,a),pr(a,t),mr(a,t)},Tn=(t,e,n={})=>a=>{let{libraryOptions:r,target:o}=a??{},i=dr({...r??{},target:o,io:e,processors:n});return ce(t,i),pr(i,t),mr(i,t)}});function $n(t,e){if("_idmap"in t){let a=t,r=dr({...e,processors:Ki}),o={};for(let c of a._idmap.entries()){let[u,d]=c;ce(d,r)}let i={},s={registry:a,uri:e?.uri,defs:o};r.external=s;for(let c of a._idmap.entries()){let[u,d]=c;pr(r,d),i[u]=mr(r,d)}if(Object.keys(o).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[c]:o}}return{schemas:i}}let n=dr({...e,processors:Ki});return ce(t,n),pr(n,t),mr(n,t)}var S$,np,ap,op,ip,sp,lp,cp,up,dp,pp,mp,fp,hp,gp,vp,yp,bp,xp,_p,wp,kp,Sp,Tp,$p,Ip,Yi,Ep,Ap,zp,Rp,Cp,Pp,Mp,Op,Np,jp,Dp,Qi,Up,Ki,Ma=z(()=>{"use strict";Pa();j();S$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},np=(t,e,n,a)=>{let r=n;r.type="string";let{minimum:o,maximum:i,format:s,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof i=="number"&&(r.maxLength=i),s&&(r.format=S$[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(m=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},ap=(t,e,n,a)=>{let r=n,{minimum:o,maximum:i,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=t._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let m=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),h=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),b=e.target==="draft-04"||e.target==="openapi-3.0";m?b?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof o=="number"&&(r.minimum=o),h?b?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:typeof i=="number"&&(r.maximum=i),typeof c=="number"&&(r.multipleOf=c)},op=(t,e,n,a)=>{n.type="boolean"},ip=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},sp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},lp=(t,e,n,a)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},cp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},up=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},dp=(t,e,n,a)=>{n.not={}},pp=(t,e,n,a)=>{},mp=(t,e,n,a)=>{},fp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},hp=(t,e,n,a)=>{let r=t._zod.def,o=da(r.entries);o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),n.enum=o},gp=(t,e,n,a)=>{let r=t._zod.def,o=[];for(let i of r.values)if(i===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(i))}else o.push(i);if(o.length!==0)if(o.length===1){let i=o[0];n.type=i===null?"null":typeof i,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[i]:n.const=i}else o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),o.every(i=>typeof i=="boolean")&&(n.type="boolean"),o.every(i=>i===null)&&(n.type="null"),n.enum=o},vp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},yp=(t,e,n,a)=>{let r=n,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},bp=(t,e,n,a)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:s,mime:c}=t._zod.bag;i!==void 0&&(o.minLength=i),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,o)},xp=(t,e,n,a)=>{n.type="boolean"},_p=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},kp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Sp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Tp=(t,e,n,a)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},$p=(t,e,n,a)=>{let r=n,o=t._zod.def,{minimum:i,maximum:s}=t._zod.bag;typeof i=="number"&&(r.minItems=i),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=ce(o.element,e,{...a,path:[...a.path,"items"]})},Ip=(t,e,n,a)=>{let r=n,o=t._zod.def;r.type="object",r.properties={};let i=o.shape;for(let u in i)r.properties[u]=ce(i[u],e,{...a,path:[...a.path,"properties",u]});let s=new Set(Object.keys(i)),c=new Set([...s].filter(u=>{let d=o.shape[u]._zod;return e.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(r.required=Array.from(c)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=ce(o.catchall,e,{...a,path:[...a.path,"additionalProperties"]})):e.io==="output"&&(r.additionalProperties=!1)},Yi=(t,e,n,a)=>{let r=t._zod.def,o=r.inclusive===!1,i=r.options.map((s,c)=>ce(s,e,{...a,path:[...a.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=i:n.anyOf=i},Ep=(t,e,n,a)=>{let r=t._zod.def,o=ce(r.left,e,{...a,path:[...a.path,"allOf",0]}),i=ce(r.right,e,{...a,path:[...a.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(o)?o.allOf:[o],...s(i)?i.allOf:[i]];n.allOf=c},Ap=(t,e,n,a)=>{let r=n,o=t._zod.def;r.type="array";let i=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((h,b)=>ce(h,e,{...a,path:[...a.path,i,b]})),u=o.rest?ce(o.rest,e,{...a,path:[...a.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(r.prefixItems=c,u&&(r.items=u)):e.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));let{minimum:d,maximum:m}=t._zod.bag;typeof d=="number"&&(r.minItems=d),typeof m=="number"&&(r.maxItems=m)},zp=(t,e,n,a)=>{let r=n,o=t._zod.def;r.type="object";let i=o.keyType,c=i._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let d=ce(o.valueType,e,{...a,path:[...a.path,"patternProperties","*"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=d}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(r.propertyNames=ce(o.keyType,e,{...a,path:[...a.path,"propertyNames"]})),r.additionalProperties=ce(o.valueType,e,{...a,path:[...a.path,"additionalProperties"]});let u=i._zod.values;if(u){let d=[...u].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(r.required=d)}},Rp=(t,e,n,a)=>{let r=t._zod.def,o=ce(r.innerType,e,a),i=e.seen.get(t);e.target==="openapi-3.0"?(i.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Cp=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType},Pp=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Mp=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Op=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType;let i;try{i=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},Np=(t,e,n,a)=>{let r=t._zod.def,o=r.in._zod.traits.has("$ZodTransform"),i=e.io==="input"?o?r.out:r.in:r.out;ce(i,e,a);let s=e.seen.get(t);s.ref=i},jp=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType,n.readOnly=!0},Dp=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType},Qi=(t,e,n,a)=>{let r=t._zod.def;ce(r.innerType,e,a);let o=e.seen.get(t);o.ref=r.innerType},Up=(t,e,n,a)=>{let r=t._zod.innerType;ce(r,e,a);let o=e.seen.get(t);o.ref=r},Ki={string:np,number:ap,boolean:op,bigint:ip,symbol:sp,null:lp,undefined:cp,void:up,never:dp,any:pp,unknown:mp,date:fp,enum:hp,literal:gp,nan:vp,template_literal:yp,file:bp,success:xp,custom:_p,function:wp,transform:kp,map:Sp,set:Tp,array:$p,object:Ip,union:Yi,intersection:Ep,tuple:Ap,record:zp,nullable:Rp,nonoptional:Cp,default:Pp,prefault:Mp,catch:Op,pipe:Np,readonly:jp,promise:Dp,optional:Qi,lazy:Up}});var Xi,Ny=z(()=>{"use strict";Ma();Pa();Xi=class{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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=dr({processors:Ki,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return ce(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),pr(this.ctx,e);let a=mr(this.ctx,e),{"~standard":r,...o}=a;return o}}});var jy={};var Dy=z(()=>{"use strict"});var Jt={};Ft(Jt,{$ZodAny:()=>Cu,$ZodArray:()=>ju,$ZodAsyncError:()=>_t,$ZodBase64:()=>wu,$ZodBase64URL:()=>ku,$ZodBigInt:()=>gi,$ZodBigIntFormat:()=>Eu,$ZodBoolean:()=>Ta,$ZodCIDRv4:()=>bu,$ZodCIDRv6:()=>xu,$ZodCUID:()=>su,$ZodCUID2:()=>lu,$ZodCatch:()=>td,$ZodCheck:()=>ye,$ZodCheckBigIntFormat:()=>Oc,$ZodCheckEndsWith:()=>Bc,$ZodCheckGreaterThan:()=>ci,$ZodCheckIncludes:()=>Hc,$ZodCheckLengthEquals:()=>Zc,$ZodCheckLessThan:()=>li,$ZodCheckLowerCase:()=>Fc,$ZodCheckMaxLength:()=>Uc,$ZodCheckMaxSize:()=>Nc,$ZodCheckMimeType:()=>Gc,$ZodCheckMinLength:()=>Lc,$ZodCheckMinSize:()=>jc,$ZodCheckMultipleOf:()=>Pc,$ZodCheckNumberFormat:()=>Mc,$ZodCheckOverwrite:()=>Kc,$ZodCheckProperty:()=>Wc,$ZodCheckRegex:()=>qc,$ZodCheckSizeEquals:()=>Dc,$ZodCheckStartsWith:()=>Jc,$ZodCheckStringFormat:()=>un,$ZodCheckUpperCase:()=>Vc,$ZodCodec:()=>Ia,$ZodCustom:()=>cd,$ZodCustomStringFormat:()=>$u,$ZodDate:()=>Nu,$ZodDefault:()=>Yu,$ZodDiscriminatedUnion:()=>Lu,$ZodE164:()=>Su,$ZodEmail:()=>nu,$ZodEmoji:()=>ou,$ZodEncodeError:()=>ar,$ZodEnum:()=>Hu,$ZodError:()=>ga,$ZodExactOptional:()=>Gu,$ZodFile:()=>Bu,$ZodFunction:()=>id,$ZodGUID:()=>tu,$ZodIPv4:()=>gu,$ZodIPv6:()=>vu,$ZodISODate:()=>mu,$ZodISODateTime:()=>pu,$ZodISODuration:()=>hu,$ZodISOTime:()=>fu,$ZodIntersection:()=>Zu,$ZodJWT:()=>Tu,$ZodKSUID:()=>du,$ZodLazy:()=>ld,$ZodLiteral:()=>Ju,$ZodMAC:()=>yu,$ZodMap:()=>Fu,$ZodNaN:()=>rd,$ZodNanoID:()=>iu,$ZodNever:()=>Mu,$ZodNonOptional:()=>Xu,$ZodNull:()=>Ru,$ZodNullable:()=>Ku,$ZodNumber:()=>hi,$ZodNumberFormat:()=>Iu,$ZodObject:()=>Dg,$ZodObjectJIT:()=>Du,$ZodOptional:()=>yi,$ZodPipe:()=>bi,$ZodPrefault:()=>Qu,$ZodPreprocess:()=>nd,$ZodPromise:()=>sd,$ZodReadonly:()=>ad,$ZodRealError:()=>nt,$ZodRecord:()=>qu,$ZodRegistry:()=>ki,$ZodSet:()=>Vu,$ZodString:()=>Mr,$ZodStringFormat:()=>fe,$ZodSuccess:()=>ed,$ZodSymbol:()=>Au,$ZodTemplateLiteral:()=>od,$ZodTransform:()=>Wu,$ZodTuple:()=>vi,$ZodType:()=>W,$ZodULID:()=>cu,$ZodURL:()=>au,$ZodUUID:()=>ru,$ZodUndefined:()=>zu,$ZodUnion:()=>$a,$ZodUnknown:()=>Pu,$ZodVoid:()=>Ou,$ZodXID:()=>uu,$ZodXor:()=>Uu,$brand:()=>ql,$constructor:()=>f,$input:()=>gd,$output:()=>hd,Doc:()=>Sa,JSONSchema:()=>jy,JSONSchemaGenerator:()=>Xi,NEVER:()=>Zl,TimePrecision:()=>xd,_any:()=>Zd,_array:()=>Wd,_base64:()=>Zi,_base64url:()=>qi,_bigint:()=>Md,_boolean:()=>Cd,_catch:()=>y$,_check:()=>My,_cidrv4:()=>Ui,_cidrv6:()=>Li,_coercedBigint:()=>Od,_coercedBoolean:()=>Pd,_coercedDate:()=>Jd,_coercedNumber:()=>$d,_coercedString:()=>yd,_cuid:()=>Ci,_cuid2:()=>Pi,_custom:()=>Kd,_date:()=>Hd,_decode:()=>Qo,_decodeAsync:()=>ei,_default:()=>h$,_discriminatedUnion:()=>n$,_e164:()=>Fi,_email:()=>Ti,_emoji:()=>zi,_encode:()=>Yo,_encodeAsync:()=>Xo,_endsWith:()=>vn,_enum:()=>c$,_file:()=>Gd,_float32:()=>Ed,_float64:()=>Ad,_gt:()=>Pt,_gte:()=>Ke,_guid:()=>Ra,_includes:()=>hn,_int:()=>Id,_int32:()=>zd,_int64:()=>Nd,_intersection:()=>a$,_ipv4:()=>ji,_ipv6:()=>Di,_isoDate:()=>wd,_isoDateTime:()=>_d,_isoDuration:()=>Sd,_isoTime:()=>kd,_jwt:()=>Vi,_ksuid:()=>Ni,_lazy:()=>w$,_length:()=>jr,_literal:()=>d$,_lowercase:()=>mn,_lt:()=>Ct,_lte:()=>lt,_mac:()=>bd,_map:()=>s$,_max:()=>lt,_maxLength:()=>Nr,_maxSize:()=>ur,_mime:()=>yn,_min:()=>Ke,_minLength:()=>Ht,_minSize:()=>Mt,_multipleOf:()=>cr,_nan:()=>Bd,_nanoid:()=>Ri,_nativeEnum:()=>u$,_negative:()=>Ji,_never:()=>Fd,_nonnegative:()=>Wi,_nonoptional:()=>g$,_nonpositive:()=>Bi,_normalize:()=>bn,_null:()=>Ld,_nullable:()=>f$,_number:()=>Td,_optional:()=>m$,_overwrite:()=>wt,_parse:()=>an,_parseAsync:()=>on,_pipe:()=>b$,_positive:()=>Hi,_promise:()=>k$,_property:()=>Gi,_readonly:()=>x$,_record:()=>i$,_refine:()=>Yd,_regex:()=>pn,_safeDecode:()=>ri,_safeDecodeAsync:()=>ai,_safeEncode:()=>ti,_safeEncodeAsync:()=>ni,_safeParse:()=>sn,_safeParseAsync:()=>cn,_set:()=>l$,_size:()=>Or,_slugify:()=>kn,_startsWith:()=>gn,_string:()=>vd,_stringFormat:()=>Sn,_stringbool:()=>tp,_success:()=>v$,_superRefine:()=>Qd,_symbol:()=>Dd,_templateLiteral:()=>_$,_toLowerCase:()=>_n,_toUpperCase:()=>wn,_transform:()=>p$,_trim:()=>xn,_tuple:()=>o$,_uint32:()=>Rd,_uint64:()=>jd,_ulid:()=>Mi,_undefined:()=>Ud,_union:()=>t$,_unknown:()=>qd,_uppercase:()=>fn,_url:()=>Ca,_uuid:()=>$i,_uuidv4:()=>Ii,_uuidv6:()=>Ei,_uuidv7:()=>Ai,_void:()=>Vd,_xid:()=>Oi,_xor:()=>r$,clone:()=>We,config:()=>Ie,createStandardJSONSchemaMethod:()=>Tn,createToJSONSchemaMethod:()=>rp,decode:()=>sg,decodeAsync:()=>cg,describe:()=>Xd,encode:()=>ig,encodeAsync:()=>lg,extractDefs:()=>pr,finalize:()=>mr,flattenError:()=>va,formatError:()=>ya,globalConfig:()=>zr,globalRegistry:()=>Oe,initializeContext:()=>dr,isValidBase64:()=>_u,isValidBase64URL:()=>Mg,isValidJWT:()=>Og,locales:()=>Aa,meta:()=>ep,parse:()=>ba,parseAsync:()=>xa,prettifyError:()=>tc,process:()=>ce,regexes:()=>st,registry:()=>Si,safeDecode:()=>dg,safeDecodeAsync:()=>mg,safeEncode:()=>ug,safeEncodeAsync:()=>pg,safeParse:()=>ln,safeParseAsync:()=>_a,toDotPath:()=>og,toJSONSchema:()=>$n,treeifyError:()=>ec,util:()=>k,version:()=>Qc});var at=z(()=>{"use strict";Rr();nc();rc();ud();ui();Xc();j();si();fd();za();Yc();Oy();Pa();Ma();Ny();Dy()});var es={};Ft(es,{endsWith:()=>vn,gt:()=>Pt,gte:()=>Ke,includes:()=>hn,length:()=>jr,lowercase:()=>mn,lt:()=>Ct,lte:()=>lt,maxLength:()=>Nr,maxSize:()=>ur,mime:()=>yn,minLength:()=>Ht,minSize:()=>Mt,multipleOf:()=>cr,negative:()=>Ji,nonnegative:()=>Wi,nonpositive:()=>Bi,normalize:()=>bn,overwrite:()=>wt,positive:()=>Hi,property:()=>Gi,regex:()=>pn,size:()=>Or,slugify:()=>kn,startsWith:()=>gn,toLowerCase:()=>_n,toUpperCase:()=>wn,trim:()=>xn,uppercase:()=>fn});var ts=z(()=>{"use strict";at()});var fr={};Ft(fr,{ZodISODate:()=>ns,ZodISODateTime:()=>rs,ZodISODuration:()=>os,ZodISOTime:()=>as,date:()=>Zp,datetime:()=>Lp,duration:()=>Fp,time:()=>qp});function Lp(t){return _d(rs,t)}function Zp(t){return wd(ns,t)}function qp(t){return kd(as,t)}function Fp(t){return Sd(os,t)}var rs,ns,as,os,Oa=z(()=>{"use strict";at();ja();rs=f("ZodISODateTime",(t,e)=>{pu.init(t,e),he.init(t,e)});ns=f("ZodISODate",(t,e)=>{mu.init(t,e),he.init(t,e)});as=f("ZodISOTime",(t,e)=>{fu.init(t,e),he.init(t,e)});os=f("ZodISODuration",(t,e)=>{hu.init(t,e),he.init(t,e)})});var Uy,$$,ot,Vp=z(()=>{"use strict";at();at();j();Uy=(t,e)=>{ga.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>ya(t,n)},flatten:{value:n=>va(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,tn,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,tn,2)}},isEmpty:{get(){return t.issues.length===0}}})},$$=f("ZodError",Uy),ot=f("ZodError",Uy,{Parent:Error})});var Hp,Jp,Bp,Da,Wp,Gp,Kp,Yp,Qp,Xp,em,tm,rm=z(()=>{"use strict";at();Vp();Hp=an(ot),Jp=on(ot),Bp=sn(ot),Da=cn(ot),Wp=Yo(ot),Gp=Qo(ot),Kp=Xo(ot),Yp=ei(ot),Qp=ti(ot),Xp=ri(ot),em=ni(ot),tm=ai(ot)});var Na={};Ft(Na,{ZodAny:()=>sm,ZodArray:()=>dm,ZodBase64:()=>_s,ZodBase64URL:()=>ws,ZodBigInt:()=>Pn,ZodBigIntFormat:()=>Ts,ZodBoolean:()=>Cn,ZodCIDRv4:()=>bs,ZodCIDRv6:()=>xs,ZodCUID:()=>ps,ZodCUID2:()=>ms,ZodCatch:()=>Rm,ZodCodec:()=>Ga,ZodCustom:()=>Ka,ZodCustomStringFormat:()=>zn,ZodDate:()=>Va,ZodDefault:()=>Tm,ZodDiscriminatedUnion:()=>mm,ZodE164:()=>ks,ZodEmail:()=>cs,ZodEmoji:()=>us,ZodEnum:()=>En,ZodExactOptional:()=>wm,ZodFile:()=>xm,ZodFunction:()=>Zm,ZodGUID:()=>Ua,ZodIPv4:()=>vs,ZodIPv6:()=>ys,ZodIntersection:()=>fm,ZodJWT:()=>Ss,ZodKSUID:()=>gs,ZodLazy:()=>Dm,ZodLiteral:()=>bm,ZodMAC:()=>nm,ZodMap:()=>vm,ZodNaN:()=>Pm,ZodNanoID:()=>ds,ZodNever:()=>cm,ZodNonOptional:()=>As,ZodNull:()=>im,ZodNullable:()=>Sm,ZodNumber:()=>Rn,ZodNumberFormat:()=>Dr,ZodObject:()=>Ha,ZodOptional:()=>Es,ZodPipe:()=>Wa,ZodPrefault:()=>Im,ZodPreprocess:()=>Mm,ZodPromise:()=>Lm,ZodReadonly:()=>Om,ZodRecord:()=>In,ZodSet:()=>ym,ZodString:()=>An,ZodStringFormat:()=>he,ZodSuccess:()=>zm,ZodSymbol:()=>am,ZodTemplateLiteral:()=>jm,ZodTransform:()=>_m,ZodTuple:()=>hm,ZodType:()=>G,ZodULID:()=>fs,ZodURL:()=>qa,ZodUUID:()=>Ot,ZodUndefined:()=>om,ZodUnion:()=>Ja,ZodUnknown:()=>lm,ZodVoid:()=>um,ZodXID:()=>hs,ZodXor:()=>pm,_ZodString:()=>ls,_default:()=>$m,_function:()=>Fb,any:()=>Sb,array:()=>X,base64:()=>sb,base64url:()=>lb,bigint:()=>bb,boolean:()=>Ae,catch:()=>Cm,check:()=>Vb,cidrv4:()=>ob,cidrv6:()=>ib,codec:()=>Ub,cuid:()=>Yy,cuid2:()=>Qy,custom:()=>zs,date:()=>$b,describe:()=>Hb,discriminatedUnion:()=>Ba,e164:()=>cb,email:()=>Zy,emoji:()=>Gy,enum:()=>je,exactOptional:()=>km,file:()=>Ob,float32:()=>hb,float64:()=>gb,function:()=>Fb,guid:()=>qy,hash:()=>fb,hex:()=>mb,hostname:()=>pb,httpUrl:()=>Wy,instanceof:()=>Bb,int:()=>is,int32:()=>vb,int64:()=>xb,intersection:()=>Mn,invertCodec:()=>Lb,ipv4:()=>rb,ipv6:()=>ab,json:()=>Gb,jwt:()=>ub,keyof:()=>Ib,ksuid:()=>tb,lazy:()=>Um,literal:()=>Z,looseObject:()=>Ne,looseRecord:()=>Rb,mac:()=>nb,map:()=>Cb,meta:()=>Jb,nan:()=>Db,nanoid:()=>Ky,nativeEnum:()=>Mb,never:()=>$s,nonoptional:()=>Am,null:()=>Fa,nullable:()=>La,nullish:()=>Nb,number:()=>ie,object:()=>M,optional:()=>be,partialRecord:()=>zb,pipe:()=>ss,prefault:()=>Em,preprocess:()=>Ya,promise:()=>qb,readonly:()=>Nm,record:()=>pe,refine:()=>qm,set:()=>Pb,strictObject:()=>Eb,string:()=>x,stringFormat:()=>db,stringbool:()=>Wb,success:()=>jb,superRefine:()=>Fm,symbol:()=>wb,templateLiteral:()=>Zb,transform:()=>Is,tuple:()=>gm,uint32:()=>yb,uint64:()=>_b,ulid:()=>Xy,undefined:()=>kb,union:()=>ve,unknown:()=>ge,url:()=>By,uuid:()=>Fy,uuidv4:()=>Vy,uuidv6:()=>Hy,uuidv7:()=>Jy,void:()=>Tb,xid:()=>eb,xor:()=>Ab});function Za(t,e,n){let a=Object.getPrototypeOf(t),r=Ly.get(a);if(r||(r=new Set,Ly.set(a,r)),!r.has(e)){r.add(e);for(let o in n){let i=n[o];Object.defineProperty(a,o,{configurable:!0,enumerable:!1,get(){let s=i.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function x(t){return vd(An,t)}function Zy(t){return Ti(cs,t)}function qy(t){return Ra(Ua,t)}function Fy(t){return $i(Ot,t)}function Vy(t){return Ii(Ot,t)}function Hy(t){return Ei(Ot,t)}function Jy(t){return Ai(Ot,t)}function By(t){return Ca(qa,t)}function Wy(t){return Ca(qa,{protocol:st.httpProtocol,hostname:st.domain,...k.normalizeParams(t)})}function Gy(t){return zi(us,t)}function Ky(t){return Ri(ds,t)}function Yy(t){return Ci(ps,t)}function Qy(t){return Pi(ms,t)}function Xy(t){return Mi(fs,t)}function eb(t){return Oi(hs,t)}function tb(t){return Ni(gs,t)}function rb(t){return ji(vs,t)}function nb(t){return bd(nm,t)}function ab(t){return Di(ys,t)}function ob(t){return Ui(bs,t)}function ib(t){return Li(xs,t)}function sb(t){return Zi(_s,t)}function lb(t){return qi(ws,t)}function cb(t){return Fi(ks,t)}function ub(t){return Vi(Ss,t)}function db(t,e,n={}){return Sn(zn,t,e,n)}function pb(t){return Sn(zn,"hostname",st.hostname,t)}function mb(t){return Sn(zn,"hex",st.hex,t)}function fb(t,e){let n=e?.enc??"hex",a=`${t}_${n}`,r=st[a];if(!r)throw new Error(`Unrecognized hash format: ${a}`);return Sn(zn,a,r,e)}function ie(t){return Td(Rn,t)}function is(t){return Id(Dr,t)}function hb(t){return Ed(Dr,t)}function gb(t){return Ad(Dr,t)}function vb(t){return zd(Dr,t)}function yb(t){return Rd(Dr,t)}function Ae(t){return Cd(Cn,t)}function bb(t){return Md(Pn,t)}function xb(t){return Nd(Ts,t)}function _b(t){return jd(Ts,t)}function wb(t){return Dd(am,t)}function kb(t){return Ud(om,t)}function Fa(t){return Ld(im,t)}function Sb(){return Zd(sm)}function ge(){return qd(lm)}function $s(t){return Fd(cm,t)}function Tb(t){return Vd(um,t)}function $b(t){return Hd(Va,t)}function X(t,e){return Wd(dm,t,e)}function Ib(t){let e=t._zod.def.shape;return je(Object.keys(e))}function M(t,e){let n={type:"object",shape:t??{},...k.normalizeParams(e)};return new Ha(n)}function Eb(t,e){return new Ha({type:"object",shape:t,catchall:$s(),...k.normalizeParams(e)})}function Ne(t,e){return new Ha({type:"object",shape:t,catchall:ge(),...k.normalizeParams(e)})}function ve(t,e){return new Ja({type:"union",options:t,...k.normalizeParams(e)})}function Ab(t,e){return new pm({type:"union",options:t,inclusive:!1,...k.normalizeParams(e)})}function Ba(t,e,n){return new mm({type:"union",options:e,discriminator:t,...k.normalizeParams(n)})}function Mn(t,e){return new fm({type:"intersection",left:t,right:e})}function gm(t,e,n){let a=e instanceof W,r=a?n:e,o=a?e:null;return new hm({type:"tuple",items:t,rest:o,...k.normalizeParams(r)})}function pe(t,e,n){return!e||!e._zod?new In({type:"record",keyType:x(),valueType:t,...k.normalizeParams(e)}):new In({type:"record",keyType:t,valueType:e,...k.normalizeParams(n)})}function zb(t,e,n){let a=We(t);return a._zod.values=void 0,new In({type:"record",keyType:a,valueType:e,...k.normalizeParams(n)})}function Rb(t,e,n){return new In({type:"record",keyType:t,valueType:e,mode:"loose",...k.normalizeParams(n)})}function Cb(t,e,n){return new vm({type:"map",keyType:t,valueType:e,...k.normalizeParams(n)})}function Pb(t,e){return new ym({type:"set",valueType:t,...k.normalizeParams(e)})}function je(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(a=>[a,a])):t;return new En({type:"enum",entries:n,...k.normalizeParams(e)})}function Mb(t,e){return new En({type:"enum",entries:t,...k.normalizeParams(e)})}function Z(t,e){return new bm({type:"literal",values:Array.isArray(t)?t:[t],...k.normalizeParams(e)})}function Ob(t){return Gd(xm,t)}function Is(t){return new _m({type:"transform",transform:t})}function be(t){return new Es({type:"optional",innerType:t})}function km(t){return new wm({type:"optional",innerType:t})}function La(t){return new Sm({type:"nullable",innerType:t})}function Nb(t){return be(La(t))}function $m(t,e){return new Tm({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():k.shallowClone(e)}})}function Em(t,e){return new Im({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():k.shallowClone(e)}})}function Am(t,e){return new As({type:"nonoptional",innerType:t,...k.normalizeParams(e)})}function jb(t){return new zm({type:"success",innerType:t})}function Cm(t,e){return new Rm({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function Db(t){return Bd(Pm,t)}function ss(t,e){return new Wa({type:"pipe",in:t,out:e})}function Ub(t,e,n){return new Ga({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}function Lb(t){let e=t._zod.def;return new Ga({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}function Nm(t){return new Om({type:"readonly",innerType:t})}function Zb(t,e){return new jm({type:"template_literal",parts:t,...k.normalizeParams(e)})}function Um(t){return new Dm({type:"lazy",getter:t})}function qb(t){return new Lm({type:"promise",innerType:t})}function Fb(t){return new Zm({type:"function",input:Array.isArray(t?.input)?gm(t?.input):t?.input??X(ge()),output:t?.output??ge()})}function Vb(t){let e=new ye({check:"custom"});return e._zod.check=t,e}function zs(t,e){return Kd(Ka,t??(()=>!0),e)}function qm(t,e={}){return Yd(Ka,t,e)}function Fm(t,e){return Qd(t,e)}function Bb(t,e={}){let n=new Ka({type:"custom",check:"custom",fn:a=>a instanceof t,abort:!0,...k.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=a=>{a.value instanceof t||a.issues.push({code:"invalid_type",expected:t.name,input:a.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Gb(t){let e=Um(()=>ve([x(t),ie(),Ae(),Fa(),X(e),pe(x(),e)]));return e}function Ya(t,e){return new Mm({type:"pipe",in:Is(t),out:e})}var Ly,G,ls,An,he,cs,Ua,Ot,qa,us,ds,ps,ms,fs,hs,gs,vs,nm,ys,bs,xs,_s,ws,ks,Ss,zn,Rn,Dr,Cn,Pn,Ts,am,om,im,sm,lm,cm,um,Va,dm,Ha,Ja,pm,mm,fm,hm,In,vm,ym,En,bm,xm,_m,Es,wm,Sm,Tm,Im,As,zm,Rm,Pm,Wa,Ga,Mm,Om,jm,Dm,Lm,Zm,Ka,Hb,Jb,Wb,ja=z(()=>{"use strict";at();at();Ma();Pa();ts();Oa();rm();Ly=new WeakMap;G=f("ZodType",(t,e)=>(W.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Tn(t,"input"),output:Tn(t,"output")}}),t.toJSONSchema=rp(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(n,a)=>Hp(t,n,a,{callee:t.parse}),t.safeParse=(n,a)=>Bp(t,n,a),t.parseAsync=async(n,a)=>Jp(t,n,a,{callee:t.parseAsync}),t.safeParseAsync=async(n,a)=>Da(t,n,a),t.spa=t.safeParseAsync,t.encode=(n,a)=>Wp(t,n,a),t.decode=(n,a)=>Gp(t,n,a),t.encodeAsync=async(n,a)=>Kp(t,n,a),t.decodeAsync=async(n,a)=>Yp(t,n,a),t.safeEncode=(n,a)=>Qp(t,n,a),t.safeDecode=(n,a)=>Xp(t,n,a),t.safeEncodeAsync=async(n,a)=>em(t,n,a),t.safeDecodeAsync=async(n,a)=>tm(t,n,a),Za(t,"ZodType",{check(...n){let a=this.def;return this.clone(k.mergeDefs(a,{checks:[...a.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,a){return We(this,n,a)},brand(){return this},register(n,a){return n.add(this,a),this},refine(n,a){return this.check(qm(n,a))},superRefine(n,a){return this.check(Fm(n,a))},overwrite(n){return this.check(wt(n))},optional(){return be(this)},exactOptional(){return km(this)},nullable(){return La(this)},nullish(){return be(La(this))},nonoptional(n){return Am(this,n)},array(){return X(this)},or(n){return ve([this,n])},and(n){return Mn(this,n)},transform(n){return ss(this,Is(n))},default(n){return $m(this,n)},prefault(n){return Em(this,n)},catch(n){return Cm(this,n)},pipe(n){return ss(this,n)},readonly(){return Nm(this)},describe(n){let a=this.clone();return Oe.add(a,{description:n}),a},meta(...n){if(n.length===0)return Oe.get(this);let a=this.clone();return Oe.add(a,n[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(t,"description",{get(){return Oe.get(t)?.description},configurable:!0}),t)),ls=f("_ZodString",(t,e)=>{Mr.init(t,e),G.init(t,e),t._zod.processJSONSchema=(a,r,o)=>np(t,a,r,o);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,Za(t,"_ZodString",{regex(...a){return this.check(pn(...a))},includes(...a){return this.check(hn(...a))},startsWith(...a){return this.check(gn(...a))},endsWith(...a){return this.check(vn(...a))},min(...a){return this.check(Ht(...a))},max(...a){return this.check(Nr(...a))},length(...a){return this.check(jr(...a))},nonempty(...a){return this.check(Ht(1,...a))},lowercase(a){return this.check(mn(a))},uppercase(a){return this.check(fn(a))},trim(){return this.check(xn())},normalize(...a){return this.check(bn(...a))},toLowerCase(){return this.check(_n())},toUpperCase(){return this.check(wn())},slugify(){return this.check(kn())}})}),An=f("ZodString",(t,e)=>{Mr.init(t,e),ls.init(t,e),t.email=n=>t.check(Ti(cs,n)),t.url=n=>t.check(Ca(qa,n)),t.jwt=n=>t.check(Vi(Ss,n)),t.emoji=n=>t.check(zi(us,n)),t.guid=n=>t.check(Ra(Ua,n)),t.uuid=n=>t.check($i(Ot,n)),t.uuidv4=n=>t.check(Ii(Ot,n)),t.uuidv6=n=>t.check(Ei(Ot,n)),t.uuidv7=n=>t.check(Ai(Ot,n)),t.nanoid=n=>t.check(Ri(ds,n)),t.guid=n=>t.check(Ra(Ua,n)),t.cuid=n=>t.check(Ci(ps,n)),t.cuid2=n=>t.check(Pi(ms,n)),t.ulid=n=>t.check(Mi(fs,n)),t.base64=n=>t.check(Zi(_s,n)),t.base64url=n=>t.check(qi(ws,n)),t.xid=n=>t.check(Oi(hs,n)),t.ksuid=n=>t.check(Ni(gs,n)),t.ipv4=n=>t.check(ji(vs,n)),t.ipv6=n=>t.check(Di(ys,n)),t.cidrv4=n=>t.check(Ui(bs,n)),t.cidrv6=n=>t.check(Li(xs,n)),t.e164=n=>t.check(Fi(ks,n)),t.datetime=n=>t.check(Lp(n)),t.date=n=>t.check(Zp(n)),t.time=n=>t.check(qp(n)),t.duration=n=>t.check(Fp(n))});he=f("ZodStringFormat",(t,e)=>{fe.init(t,e),ls.init(t,e)}),cs=f("ZodEmail",(t,e)=>{nu.init(t,e),he.init(t,e)});Ua=f("ZodGUID",(t,e)=>{tu.init(t,e),he.init(t,e)});Ot=f("ZodUUID",(t,e)=>{ru.init(t,e),he.init(t,e)});qa=f("ZodURL",(t,e)=>{au.init(t,e),he.init(t,e)});us=f("ZodEmoji",(t,e)=>{ou.init(t,e),he.init(t,e)});ds=f("ZodNanoID",(t,e)=>{iu.init(t,e),he.init(t,e)});ps=f("ZodCUID",(t,e)=>{su.init(t,e),he.init(t,e)});ms=f("ZodCUID2",(t,e)=>{lu.init(t,e),he.init(t,e)});fs=f("ZodULID",(t,e)=>{cu.init(t,e),he.init(t,e)});hs=f("ZodXID",(t,e)=>{uu.init(t,e),he.init(t,e)});gs=f("ZodKSUID",(t,e)=>{du.init(t,e),he.init(t,e)});vs=f("ZodIPv4",(t,e)=>{gu.init(t,e),he.init(t,e)});nm=f("ZodMAC",(t,e)=>{yu.init(t,e),he.init(t,e)});ys=f("ZodIPv6",(t,e)=>{vu.init(t,e),he.init(t,e)});bs=f("ZodCIDRv4",(t,e)=>{bu.init(t,e),he.init(t,e)});xs=f("ZodCIDRv6",(t,e)=>{xu.init(t,e),he.init(t,e)});_s=f("ZodBase64",(t,e)=>{wu.init(t,e),he.init(t,e)});ws=f("ZodBase64URL",(t,e)=>{ku.init(t,e),he.init(t,e)});ks=f("ZodE164",(t,e)=>{Su.init(t,e),he.init(t,e)});Ss=f("ZodJWT",(t,e)=>{Tu.init(t,e),he.init(t,e)});zn=f("ZodCustomStringFormat",(t,e)=>{$u.init(t,e),he.init(t,e)});Rn=f("ZodNumber",(t,e)=>{hi.init(t,e),G.init(t,e),t._zod.processJSONSchema=(a,r,o)=>ap(t,a,r,o),Za(t,"ZodNumber",{gt(a,r){return this.check(Pt(a,r))},gte(a,r){return this.check(Ke(a,r))},min(a,r){return this.check(Ke(a,r))},lt(a,r){return this.check(Ct(a,r))},lte(a,r){return this.check(lt(a,r))},max(a,r){return this.check(lt(a,r))},int(a){return this.check(is(a))},safe(a){return this.check(is(a))},positive(a){return this.check(Pt(0,a))},nonnegative(a){return this.check(Ke(0,a))},negative(a){return this.check(Ct(0,a))},nonpositive(a){return this.check(lt(0,a))},multipleOf(a,r){return this.check(cr(a,r))},step(a,r){return this.check(cr(a,r))},finite(){return this}});let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});Dr=f("ZodNumberFormat",(t,e)=>{Iu.init(t,e),Rn.init(t,e)});Cn=f("ZodBoolean",(t,e)=>{Ta.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>op(t,n,a,r)});Pn=f("ZodBigInt",(t,e)=>{gi.init(t,e),G.init(t,e),t._zod.processJSONSchema=(a,r,o)=>ip(t,a,r,o),t.gte=(a,r)=>t.check(Ke(a,r)),t.min=(a,r)=>t.check(Ke(a,r)),t.gt=(a,r)=>t.check(Pt(a,r)),t.gte=(a,r)=>t.check(Ke(a,r)),t.min=(a,r)=>t.check(Ke(a,r)),t.lt=(a,r)=>t.check(Ct(a,r)),t.lte=(a,r)=>t.check(lt(a,r)),t.max=(a,r)=>t.check(lt(a,r)),t.positive=a=>t.check(Pt(BigInt(0),a)),t.negative=a=>t.check(Ct(BigInt(0),a)),t.nonpositive=a=>t.check(lt(BigInt(0),a)),t.nonnegative=a=>t.check(Ke(BigInt(0),a)),t.multipleOf=(a,r)=>t.check(cr(a,r));let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null});Ts=f("ZodBigIntFormat",(t,e)=>{Eu.init(t,e),Pn.init(t,e)});am=f("ZodSymbol",(t,e)=>{Au.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>sp(t,n,a,r)});om=f("ZodUndefined",(t,e)=>{zu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>cp(t,n,a,r)});im=f("ZodNull",(t,e)=>{Ru.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>lp(t,n,a,r)});sm=f("ZodAny",(t,e)=>{Cu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>pp(t,n,a,r)});lm=f("ZodUnknown",(t,e)=>{Pu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>mp(t,n,a,r)});cm=f("ZodNever",(t,e)=>{Mu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>dp(t,n,a,r)});um=f("ZodVoid",(t,e)=>{Ou.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>up(t,n,a,r)});Va=f("ZodDate",(t,e)=>{Nu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(a,r,o)=>fp(t,a,r,o),t.min=(a,r)=>t.check(Ke(a,r)),t.max=(a,r)=>t.check(lt(a,r));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});dm=f("ZodArray",(t,e)=>{ju.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>$p(t,n,a,r),t.element=e.element,Za(t,"ZodArray",{min(n,a){return this.check(Ht(n,a))},nonempty(n){return this.check(Ht(1,n))},max(n,a){return this.check(Nr(n,a))},length(n,a){return this.check(jr(n,a))},unwrap(){return this.element}})});Ha=f("ZodObject",(t,e)=>{Du.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Ip(t,n,a,r),k.defineLazy(t,"shape",()=>e.shape),Za(t,"ZodObject",{keyof(){return je(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ge()})},loose(){return this.clone({...this._zod.def,catchall:ge()})},strict(){return this.clone({...this._zod.def,catchall:$s()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return k.extend(this,n)},safeExtend(n){return k.safeExtend(this,n)},merge(n){return k.merge(this,n)},pick(n){return k.pick(this,n)},omit(n){return k.omit(this,n)},partial(...n){return k.partial(Es,this,n[0])},required(...n){return k.required(As,this,n[0])}})});Ja=f("ZodUnion",(t,e)=>{$a.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Yi(t,n,a,r),t.options=e.options});pm=f("ZodXor",(t,e)=>{Ja.init(t,e),Uu.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Yi(t,n,a,r),t.options=e.options});mm=f("ZodDiscriminatedUnion",(t,e)=>{Ja.init(t,e),Lu.init(t,e)});fm=f("ZodIntersection",(t,e)=>{Zu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Ep(t,n,a,r)});hm=f("ZodTuple",(t,e)=>{vi.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Ap(t,n,a,r),t.rest=n=>t.clone({...t._zod.def,rest:n})});In=f("ZodRecord",(t,e)=>{qu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>zp(t,n,a,r),t.keyType=e.keyType,t.valueType=e.valueType});vm=f("ZodMap",(t,e)=>{Fu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Sp(t,n,a,r),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(Mt(...n)),t.nonempty=n=>t.check(Mt(1,n)),t.max=(...n)=>t.check(ur(...n)),t.size=(...n)=>t.check(Or(...n))});ym=f("ZodSet",(t,e)=>{Vu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Tp(t,n,a,r),t.min=(...n)=>t.check(Mt(...n)),t.nonempty=n=>t.check(Mt(1,n)),t.max=(...n)=>t.check(ur(...n)),t.size=(...n)=>t.check(Or(...n))});En=f("ZodEnum",(t,e)=>{Hu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(a,r,o)=>hp(t,a,r,o),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(a,r)=>{let o={};for(let i of a)if(n.has(i))o[i]=e.entries[i];else throw new Error(`Key ${i} not found in enum`);return new En({...e,checks:[],...k.normalizeParams(r),entries:o})},t.exclude=(a,r)=>{let o={...e.entries};for(let i of a)if(n.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new En({...e,checks:[],...k.normalizeParams(r),entries:o})}});bm=f("ZodLiteral",(t,e)=>{Ju.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>gp(t,n,a,r),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});xm=f("ZodFile",(t,e)=>{Bu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>bp(t,n,a,r),t.min=(n,a)=>t.check(Mt(n,a)),t.max=(n,a)=>t.check(ur(n,a)),t.mime=(n,a)=>t.check(yn(Array.isArray(n)?n:[n],a))});_m=f("ZodTransform",(t,e)=>{Wu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>kp(t,n,a,r),t._zod.parse=(n,a)=>{if(a.direction==="backward")throw new ar(t.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(k.issue(o,n.value,e));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),n.issues.push(k.issue(i))}};let r=e.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});Es=f("ZodOptional",(t,e)=>{yi.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Qi(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});wm=f("ZodExactOptional",(t,e)=>{Gu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Qi(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});Sm=f("ZodNullable",(t,e)=>{Ku.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Rp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});Tm=f("ZodDefault",(t,e)=>{Yu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Pp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});Im=f("ZodPrefault",(t,e)=>{Qu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Mp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});As=f("ZodNonOptional",(t,e)=>{Xu.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Cp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});zm=f("ZodSuccess",(t,e)=>{ed.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>xp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});Rm=f("ZodCatch",(t,e)=>{td.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Op(t,n,a,r),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});Pm=f("ZodNaN",(t,e)=>{rd.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>vp(t,n,a,r)});Wa=f("ZodPipe",(t,e)=>{bi.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Np(t,n,a,r),t.in=e.in,t.out=e.out});Ga=f("ZodCodec",(t,e)=>{Wa.init(t,e),Ia.init(t,e)});Mm=f("ZodPreprocess",(t,e)=>{Wa.init(t,e),nd.init(t,e)}),Om=f("ZodReadonly",(t,e)=>{ad.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>jp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});jm=f("ZodTemplateLiteral",(t,e)=>{od.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>yp(t,n,a,r)});Dm=f("ZodLazy",(t,e)=>{ld.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Up(t,n,a,r),t.unwrap=()=>t._zod.def.getter()});Lm=f("ZodPromise",(t,e)=>{sd.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>Dp(t,n,a,r),t.unwrap=()=>t._zod.def.innerType});Zm=f("ZodFunction",(t,e)=>{id.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>wp(t,n,a,r)});Ka=f("ZodCustom",(t,e)=>{cd.init(t,e),G.init(t,e),t._zod.processJSONSchema=(n,a,r)=>_p(t,n,a,r)});Hb=Xd,Jb=ep;Wb=(...t)=>tp({Codec:Ga,Boolean:Cn,String:An},...t)});function A$(t){Ie({customError:t})}function z$(){return Ie().customError}var E$,Vm,Kb=z(()=>{"use strict";at();E$={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"};Vm||(Vm={})});function C$(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function P$(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let a=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===a){let r=n[1];if(!r||!e.defs[r])throw new Error(`Reference not found: ${t}`);return e.defs[r]}throw new Error(`Reference not found: ${t}`)}function Yb(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return R.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let r=t.$ref;if(e.refs.has(r))return e.refs.get(r);if(e.processing.has(r))return R.lazy(()=>{if(!e.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return e.refs.get(r)});e.processing.add(r);let o=P$(r,e),i=Ve(o,e);return e.refs.set(r,i),e.processing.delete(r),i}if(t.enum!==void 0){let r=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&r.length===1&&r[0]===null)return R.null();if(r.length===0)return R.never();if(r.length===1)return R.literal(r[0]);if(r.every(i=>typeof i=="string"))return R.enum(r);let o=r.map(i=>R.literal(i));return o.length<2?o[0]:R.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return R.literal(t.const);let n=t.type;if(Array.isArray(n)){let r=n.map(o=>{let i={...t,type:o};return Yb(i,e)});return r.length===0?R.never():r.length===1?r[0]:R.union(r)}if(!n)return R.any();let a;switch(n){case"string":{let r=R.string();if(t.format){let o=t.format;o==="email"?r=r.check(R.email()):o==="uri"||o==="uri-reference"?r=r.check(R.url()):o==="uuid"||o==="guid"?r=r.check(R.uuid()):o==="date-time"?r=r.check(R.iso.datetime()):o==="date"?r=r.check(R.iso.date()):o==="time"?r=r.check(R.iso.time()):o==="duration"?r=r.check(R.iso.duration()):o==="ipv4"?r=r.check(R.ipv4()):o==="ipv6"?r=r.check(R.ipv6()):o==="mac"?r=r.check(R.mac()):o==="cidr"?r=r.check(R.cidrv4()):o==="cidr-v6"?r=r.check(R.cidrv6()):o==="base64"?r=r.check(R.base64()):o==="base64url"?r=r.check(R.base64url()):o==="e164"?r=r.check(R.e164()):o==="jwt"?r=r.check(R.jwt()):o==="emoji"?r=r.check(R.emoji()):o==="nanoid"?r=r.check(R.nanoid()):o==="cuid"?r=r.check(R.cuid()):o==="cuid2"?r=r.check(R.cuid2()):o==="ulid"?r=r.check(R.ulid()):o==="xid"?r=r.check(R.xid()):o==="ksuid"&&(r=r.check(R.ksuid()))}typeof t.minLength=="number"&&(r=r.min(t.minLength)),typeof t.maxLength=="number"&&(r=r.max(t.maxLength)),t.pattern&&(r=r.regex(new RegExp(t.pattern))),a=r;break}case"number":case"integer":{let r=n==="integer"?R.number().int():R.number();typeof t.minimum=="number"&&(r=r.min(t.minimum)),typeof t.maximum=="number"&&(r=r.max(t.maximum)),typeof t.exclusiveMinimum=="number"?r=r.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(r=r.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?r=r.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(r=r.lt(t.maximum)),typeof t.multipleOf=="number"&&(r=r.multipleOf(t.multipleOf)),a=r;break}case"boolean":{a=R.boolean();break}case"null":{a=R.null();break}case"object":{let r={},o=t.properties||{},i=new Set(t.required||[]);for(let[c,u]of Object.entries(o)){let d=Ve(u,e);r[c]=i.has(c)?d:d.optional()}if(t.propertyNames){let c=Ve(t.propertyNames,e),u=t.additionalProperties&&typeof t.additionalProperties=="object"?Ve(t.additionalProperties,e):R.any();if(Object.keys(r).length===0){a=R.record(c,u);break}let d=R.object(r).passthrough(),m=R.looseRecord(c,u);a=R.intersection(d,m);break}if(t.patternProperties){let c=t.patternProperties,u=Object.keys(c),d=[];for(let h of u){let b=Ve(c[h],e),S=R.string().regex(new RegExp(h));d.push(R.looseRecord(S,b))}let m=[];if(Object.keys(r).length>0&&m.push(R.object(r).passthrough()),m.push(...d),m.length===0)a=R.object({}).passthrough();else if(m.length===1)a=m[0];else{let h=R.intersection(m[0],m[1]);for(let b=2;b<m.length;b++)h=R.intersection(h,m[b]);a=h}break}let s=R.object(r);t.additionalProperties===!1?a=s.strict():typeof t.additionalProperties=="object"?a=s.catchall(Ve(t.additionalProperties,e)):a=s.passthrough();break}case"array":{let r=t.prefixItems,o=t.items;if(r&&Array.isArray(r)){let i=r.map(c=>Ve(c,e)),s=o&&typeof o=="object"&&!Array.isArray(o)?Ve(o,e):void 0;s?a=R.tuple(i).rest(s):a=R.tuple(i),typeof t.minItems=="number"&&(a=a.check(R.minLength(t.minItems))),typeof t.maxItems=="number"&&(a=a.check(R.maxLength(t.maxItems)))}else if(Array.isArray(o)){let i=o.map(c=>Ve(c,e)),s=t.additionalItems&&typeof t.additionalItems=="object"?Ve(t.additionalItems,e):void 0;s?a=R.tuple(i).rest(s):a=R.tuple(i),typeof t.minItems=="number"&&(a=a.check(R.minLength(t.minItems))),typeof t.maxItems=="number"&&(a=a.check(R.maxLength(t.maxItems)))}else if(o!==void 0){let i=Ve(o,e),s=R.array(i);typeof t.minItems=="number"&&(s=s.min(t.minItems)),typeof t.maxItems=="number"&&(s=s.max(t.maxItems)),a=s}else a=R.array(R.any());break}default:throw new Error(`Unsupported type: ${n}`)}return a}function Ve(t,e){if(typeof t=="boolean")return t?R.any():R.never();let n=Yb(t,e),a=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let s=t.anyOf.map(u=>Ve(u,e)),c=R.union(s);n=a?R.intersection(n,c):c}if(t.oneOf&&Array.isArray(t.oneOf)){let s=t.oneOf.map(u=>Ve(u,e)),c=R.xor(s);n=a?R.intersection(n,c):c}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=a?n:R.any();else{let s=a?n:Ve(t.allOf[0],e),c=a?0:1;for(let u=c;u<t.allOf.length;u++)s=R.intersection(s,Ve(t.allOf[u],e));n=s}t.nullable===!0&&e.version==="openapi-3.0"&&(n=R.nullable(n)),t.readOnly===!0&&(n=R.readonly(n)),t.default!==void 0&&(n=n.default(t.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in t&&(r[s]=t[s]);let i=["contentEncoding","contentMediaType","contentSchema"];for(let s of i)s in t&&(r[s]=t[s]);for(let s of Object.keys(t))R$.has(s)||(r[s]=t[s]);return Object.keys(r).length>0&&e.registry.add(n,r),t.description&&(n=n.describe(t.description)),n}function Qb(t,e){if(typeof t=="boolean")return t?R.any():R.never();let n;try{n=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let a=C$(n,e?.defaultTarget),r=n.$defs||n.definitions||{},o={version:a,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??Oe};return Ve(n,o)}var R,R$,Xb=z(()=>{"use strict";za();ts();Oa();ja();R={...Na,...es,iso:fr},R$=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var Hm={};Ft(Hm,{bigint:()=>j$,boolean:()=>N$,date:()=>D$,number:()=>O$,string:()=>M$});function M$(t){return yd(An,t)}function O$(t){return $d(Rn,t)}function N$(t){return Pd(Cn,t)}function j$(t){return Od(Pn,t)}function D$(t){return Jd(Va,t)}var ex=z(()=>{"use strict";at();ja()});var l={};Ft(l,{$brand:()=>ql,$input:()=>gd,$output:()=>hd,NEVER:()=>Zl,TimePrecision:()=>xd,ZodAny:()=>sm,ZodArray:()=>dm,ZodBase64:()=>_s,ZodBase64URL:()=>ws,ZodBigInt:()=>Pn,ZodBigIntFormat:()=>Ts,ZodBoolean:()=>Cn,ZodCIDRv4:()=>bs,ZodCIDRv6:()=>xs,ZodCUID:()=>ps,ZodCUID2:()=>ms,ZodCatch:()=>Rm,ZodCodec:()=>Ga,ZodCustom:()=>Ka,ZodCustomStringFormat:()=>zn,ZodDate:()=>Va,ZodDefault:()=>Tm,ZodDiscriminatedUnion:()=>mm,ZodE164:()=>ks,ZodEmail:()=>cs,ZodEmoji:()=>us,ZodEnum:()=>En,ZodError:()=>$$,ZodExactOptional:()=>wm,ZodFile:()=>xm,ZodFirstPartyTypeKind:()=>Vm,ZodFunction:()=>Zm,ZodGUID:()=>Ua,ZodIPv4:()=>vs,ZodIPv6:()=>ys,ZodISODate:()=>ns,ZodISODateTime:()=>rs,ZodISODuration:()=>os,ZodISOTime:()=>as,ZodIntersection:()=>fm,ZodIssueCode:()=>E$,ZodJWT:()=>Ss,ZodKSUID:()=>gs,ZodLazy:()=>Dm,ZodLiteral:()=>bm,ZodMAC:()=>nm,ZodMap:()=>vm,ZodNaN:()=>Pm,ZodNanoID:()=>ds,ZodNever:()=>cm,ZodNonOptional:()=>As,ZodNull:()=>im,ZodNullable:()=>Sm,ZodNumber:()=>Rn,ZodNumberFormat:()=>Dr,ZodObject:()=>Ha,ZodOptional:()=>Es,ZodPipe:()=>Wa,ZodPrefault:()=>Im,ZodPreprocess:()=>Mm,ZodPromise:()=>Lm,ZodReadonly:()=>Om,ZodRealError:()=>ot,ZodRecord:()=>In,ZodSet:()=>ym,ZodString:()=>An,ZodStringFormat:()=>he,ZodSuccess:()=>zm,ZodSymbol:()=>am,ZodTemplateLiteral:()=>jm,ZodTransform:()=>_m,ZodTuple:()=>hm,ZodType:()=>G,ZodULID:()=>fs,ZodURL:()=>qa,ZodUUID:()=>Ot,ZodUndefined:()=>om,ZodUnion:()=>Ja,ZodUnknown:()=>lm,ZodVoid:()=>um,ZodXID:()=>hs,ZodXor:()=>pm,_ZodString:()=>ls,_default:()=>$m,_function:()=>Fb,any:()=>Sb,array:()=>X,base64:()=>sb,base64url:()=>lb,bigint:()=>bb,boolean:()=>Ae,catch:()=>Cm,check:()=>Vb,cidrv4:()=>ob,cidrv6:()=>ib,clone:()=>We,codec:()=>Ub,coerce:()=>Hm,config:()=>Ie,core:()=>Jt,cuid:()=>Yy,cuid2:()=>Qy,custom:()=>zs,date:()=>$b,decode:()=>Gp,decodeAsync:()=>Yp,describe:()=>Hb,discriminatedUnion:()=>Ba,e164:()=>cb,email:()=>Zy,emoji:()=>Gy,encode:()=>Wp,encodeAsync:()=>Kp,endsWith:()=>vn,enum:()=>je,exactOptional:()=>km,file:()=>Ob,flattenError:()=>va,float32:()=>hb,float64:()=>gb,formatError:()=>ya,fromJSONSchema:()=>Qb,function:()=>Fb,getErrorMap:()=>z$,globalRegistry:()=>Oe,gt:()=>Pt,gte:()=>Ke,guid:()=>qy,hash:()=>fb,hex:()=>mb,hostname:()=>pb,httpUrl:()=>Wy,includes:()=>hn,instanceof:()=>Bb,int:()=>is,int32:()=>vb,int64:()=>xb,intersection:()=>Mn,invertCodec:()=>Lb,ipv4:()=>rb,ipv6:()=>ab,iso:()=>fr,json:()=>Gb,jwt:()=>ub,keyof:()=>Ib,ksuid:()=>tb,lazy:()=>Um,length:()=>jr,literal:()=>Z,locales:()=>Aa,looseObject:()=>Ne,looseRecord:()=>Rb,lowercase:()=>mn,lt:()=>Ct,lte:()=>lt,mac:()=>nb,map:()=>Cb,maxLength:()=>Nr,maxSize:()=>ur,meta:()=>Jb,mime:()=>yn,minLength:()=>Ht,minSize:()=>Mt,multipleOf:()=>cr,nan:()=>Db,nanoid:()=>Ky,nativeEnum:()=>Mb,negative:()=>Ji,never:()=>$s,nonnegative:()=>Wi,nonoptional:()=>Am,nonpositive:()=>Bi,normalize:()=>bn,null:()=>Fa,nullable:()=>La,nullish:()=>Nb,number:()=>ie,object:()=>M,optional:()=>be,overwrite:()=>wt,parse:()=>Hp,parseAsync:()=>Jp,partialRecord:()=>zb,pipe:()=>ss,positive:()=>Hi,prefault:()=>Em,preprocess:()=>Ya,prettifyError:()=>tc,promise:()=>qb,property:()=>Gi,readonly:()=>Nm,record:()=>pe,refine:()=>qm,regex:()=>pn,regexes:()=>st,registry:()=>Si,safeDecode:()=>Xp,safeDecodeAsync:()=>tm,safeEncode:()=>Qp,safeEncodeAsync:()=>em,safeParse:()=>Bp,safeParseAsync:()=>Da,set:()=>Pb,setErrorMap:()=>A$,size:()=>Or,slugify:()=>kn,startsWith:()=>gn,strictObject:()=>Eb,string:()=>x,stringFormat:()=>db,stringbool:()=>Wb,success:()=>jb,superRefine:()=>Fm,symbol:()=>wb,templateLiteral:()=>Zb,toJSONSchema:()=>$n,toLowerCase:()=>_n,toUpperCase:()=>wn,transform:()=>Is,treeifyError:()=>ec,trim:()=>xn,tuple:()=>gm,uint32:()=>yb,uint64:()=>_b,ulid:()=>Xy,undefined:()=>kb,union:()=>ve,unknown:()=>ge,uppercase:()=>fn,url:()=>By,util:()=>k,uuid:()=>Fy,uuidv4:()=>Vy,uuidv6:()=>Hy,uuidv7:()=>Jy,void:()=>Tb,xid:()=>eb,xor:()=>Ab});var Jm=z(()=>{"use strict";at();ja();ts();Vp();rm();Kb();at();dd();at();Ma();Xb();fd();Oa();Oa();ex();Ie(xi())});var tx=z(()=>{"use strict";Jm();Jm()});var kt=z(()=>{"use strict";tx()});kt();var hr="io.modelcontextprotocol/related-task",Cs="2.0",Ce=zs(t=>t!==null&&(typeof t=="object"||typeof t=="function")),nx=ve([x(),ie().int()]),ax=x(),kN=Ne({ttl:ie().optional(),pollInterval:ie().optional()}),U$=M({ttl:ie().optional()}),L$=M({taskId:x()}),Wm=Ne({progressToken:nx.optional(),[hr]:L$.optional()}),ct=M({_meta:Wm.optional()}),Qa=ct.extend({task:U$.optional()}),ox=t=>Qa.safeParse(t).success,De=M({method:x(),params:ct.loose().optional()}),ht=M({_meta:Wm.optional()}),gt=M({method:x(),params:ht.loose().optional()}),Ue=Ne({_meta:Wm.optional()}),Nn=ve([x(),ie().int()]),ix=M({jsonrpc:Z(Cs),id:Nn,...De.shape}).strict(),Gm=t=>ix.safeParse(t).success,sx=M({jsonrpc:Z(Cs),...gt.shape}).strict(),lx=t=>sx.safeParse(t).success,Km=M({jsonrpc:Z(Cs),id:Nn,result:Ue}).strict(),Xa=t=>Km.safeParse(t).success;var ue;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ue||(ue={}));var Ym=M({jsonrpc:Z(Cs),id:Nn.optional(),error:M({code:ie().int(),message:x(),data:ge().optional()})}).strict();var cx=t=>Ym.safeParse(t).success;var ux=ve([ix,sx,Km,Ym]),SN=ve([Km,Ym]),Qm=Ue.strict(),Z$=ht.extend({requestId:Nn.optional(),reason:x().optional()}),Ps=gt.extend({method:Z("notifications/cancelled"),params:Z$}),q$=M({src:x(),mimeType:x().optional(),sizes:X(x()).optional(),theme:je(["light","dark"]).optional()}),eo=M({icons:X(q$).optional()}),On=M({name:x(),title:x().optional()}),to=On.extend({...On.shape,...eo.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),F$=Mn(M({applyDefaults:Ae().optional()}),pe(x(),ge())),V$=Ya(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Mn(M({form:F$.optional(),url:Ce.optional()}),pe(x(),ge()).optional())),H$=Ne({list:Ce.optional(),cancel:Ce.optional(),requests:Ne({sampling:Ne({createMessage:Ce.optional()}).optional(),elicitation:Ne({create:Ce.optional()}).optional()}).optional()}),J$=Ne({list:Ce.optional(),cancel:Ce.optional(),requests:Ne({tools:Ne({call:Ce.optional()}).optional()}).optional()}),B$=M({experimental:pe(x(),Ce).optional(),sampling:M({context:Ce.optional(),tools:Ce.optional()}).optional(),elicitation:V$.optional(),roots:M({listChanged:Ae().optional()}).optional(),tasks:H$.optional(),extensions:pe(x(),Ce).optional()}),W$=ct.extend({protocolVersion:x(),capabilities:B$,clientInfo:to}),G$=De.extend({method:Z("initialize"),params:W$});var K$=M({experimental:pe(x(),Ce).optional(),logging:Ce.optional(),completions:Ce.optional(),prompts:M({listChanged:Ae().optional()}).optional(),resources:M({subscribe:Ae().optional(),listChanged:Ae().optional()}).optional(),tools:M({listChanged:Ae().optional()}).optional(),tasks:J$.optional(),extensions:pe(x(),Ce).optional()}),Y$=Ue.extend({protocolVersion:x(),capabilities:K$,serverInfo:to,instructions:x().optional()}),Q$=gt.extend({method:Z("notifications/initialized"),params:ht.optional()});var Ur=De.extend({method:Z("ping"),params:ct.optional()}),X$=M({progress:ie(),total:be(ie()),message:be(x())}),eI=M({...ht.shape,...X$.shape,progressToken:nx}),Ms=gt.extend({method:Z("notifications/progress"),params:eI}),tI=ct.extend({cursor:ax.optional()}),ro=De.extend({params:tI.optional()}),no=Ue.extend({nextCursor:ax.optional()}),rI=je(["working","input_required","completed","failed","cancelled"]),ao=M({taskId:x(),status:rI,ttl:ve([ie(),Fa()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:be(ie()),statusMessage:be(x())}),Os=Ue.extend({task:ao}),nI=ht.merge(ao),oo=gt.extend({method:Z("notifications/tasks/status"),params:nI}),Ns=De.extend({method:Z("tasks/get"),params:ct.extend({taskId:x()})}),js=Ue.merge(ao),Ds=De.extend({method:Z("tasks/result"),params:ct.extend({taskId:x()})}),TN=Ue.loose(),Us=ro.extend({method:Z("tasks/list")}),Ls=no.extend({tasks:X(ao)}),Zs=De.extend({method:Z("tasks/cancel"),params:ct.extend({taskId:x()})}),dx=Ue.merge(ao),px=M({uri:x(),mimeType:be(x()),_meta:pe(x(),ge()).optional()}),mx=px.extend({text:x()}),Xm=x().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),fx=px.extend({blob:Xm}),io=je(["user","assistant"]),jn=M({audience:X(io).optional(),priority:ie().min(0).max(1).optional(),lastModified:fr.datetime({offset:!0}).optional()}),hx=M({...On.shape,...eo.shape,uri:x(),description:be(x()),mimeType:be(x()),size:be(ie()),annotations:jn.optional(),_meta:be(Ne({}))}),aI=M({...On.shape,...eo.shape,uriTemplate:x(),description:be(x()),mimeType:be(x()),annotations:jn.optional(),_meta:be(Ne({}))}),ef=ro.extend({method:Z("resources/list")}),qs=no.extend({resources:X(hx)}),tf=ro.extend({method:Z("resources/templates/list")}),rf=no.extend({resourceTemplates:X(aI)}),nf=ct.extend({uri:x()}),oI=nf,af=De.extend({method:Z("resources/read"),params:oI}),Fs=Ue.extend({contents:X(ve([mx,fx]))}),of=gt.extend({method:Z("notifications/resources/list_changed"),params:ht.optional()}),iI=nf,sI=De.extend({method:Z("resources/subscribe"),params:iI}),lI=nf,cI=De.extend({method:Z("resources/unsubscribe"),params:lI}),uI=ht.extend({uri:x()}),dI=gt.extend({method:Z("notifications/resources/updated"),params:uI}),pI=M({name:x(),description:be(x()),required:be(Ae())}),mI=M({...On.shape,...eo.shape,description:be(x()),arguments:be(X(pI)),_meta:be(Ne({}))}),sf=ro.extend({method:Z("prompts/list")}),lf=no.extend({prompts:X(mI)}),fI=ct.extend({name:x(),arguments:pe(x(),x()).optional()}),hI=De.extend({method:Z("prompts/get"),params:fI}),cf=M({type:Z("text"),text:x(),annotations:jn.optional(),_meta:pe(x(),ge()).optional()}),uf=M({type:Z("image"),data:Xm,mimeType:x(),annotations:jn.optional(),_meta:pe(x(),ge()).optional()}),df=M({type:Z("audio"),data:Xm,mimeType:x(),annotations:jn.optional(),_meta:pe(x(),ge()).optional()}),gI=M({type:Z("tool_use"),name:x(),id:x(),input:pe(x(),ge()),_meta:pe(x(),ge()).optional()}),pf=M({type:Z("resource"),resource:ve([mx,fx]),annotations:jn.optional(),_meta:pe(x(),ge()).optional()}),mf=hx.extend({type:Z("resource_link")}),Dn=ve([cf,uf,df,mf,pf]),vI=M({role:io,content:Dn}),yI=Ue.extend({description:x().optional(),messages:X(vI)}),ff=gt.extend({method:Z("notifications/prompts/list_changed"),params:ht.optional()}),bI=M({title:x().optional(),readOnlyHint:Ae().optional(),destructiveHint:Ae().optional(),idempotentHint:Ae().optional(),openWorldHint:Ae().optional()}),xI=M({taskSupport:je(["required","optional","forbidden"]).optional()}),Vs=M({...On.shape,...eo.shape,description:x().optional(),inputSchema:M({type:Z("object"),properties:pe(x(),Ce).optional(),required:X(x()).optional()}).catchall(ge()),outputSchema:M({type:Z("object"),properties:pe(x(),Ce).optional(),required:X(x()).optional()}).catchall(ge()).optional(),annotations:bI.optional(),execution:xI.optional(),_meta:pe(x(),ge()).optional()}),gx=ro.extend({method:Z("tools/list")}),hf=no.extend({tools:X(Vs)}),gr=Ue.extend({content:X(Dn).default([]),structuredContent:pe(x(),ge()).optional(),isError:Ae().optional()}),$N=gr.or(Ue.extend({toolResult:ge()})),_I=Qa.extend({name:x(),arguments:pe(x(),ge()).optional()}),Hs=De.extend({method:Z("tools/call"),params:_I}),gf=gt.extend({method:Z("notifications/tools/list_changed"),params:ht.optional()}),IN=M({autoRefresh:Ae().default(!0),debounceMs:ie().int().nonnegative().default(300)}),vx=je(["debug","info","notice","warning","error","critical","alert","emergency"]),wI=ct.extend({level:vx}),kI=De.extend({method:Z("logging/setLevel"),params:wI}),SI=ht.extend({level:vx,logger:x().optional(),data:ge()}),vf=gt.extend({method:Z("notifications/message"),params:SI}),TI=M({name:x().optional()}),$I=M({hints:X(TI).optional(),costPriority:ie().min(0).max(1).optional(),speedPriority:ie().min(0).max(1).optional(),intelligencePriority:ie().min(0).max(1).optional()}),II=M({mode:je(["auto","required","none"]).optional()}),EI=M({type:Z("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:X(Dn).default([]),structuredContent:M({}).loose().optional(),isError:Ae().optional(),_meta:pe(x(),ge()).optional()}),AI=Ba("type",[cf,uf,df]),Rs=Ba("type",[cf,uf,df,gI,EI]),zI=M({role:io,content:ve([Rs,X(Rs)]),_meta:pe(x(),ge()).optional()}),RI=Qa.extend({messages:X(zI),modelPreferences:$I.optional(),systemPrompt:x().optional(),includeContext:je(["none","thisServer","allServers"]).optional(),temperature:ie().optional(),maxTokens:ie().int(),stopSequences:X(x()).optional(),metadata:Ce.optional(),tools:X(Vs).optional(),toolChoice:II.optional()}),yf=De.extend({method:Z("sampling/createMessage"),params:RI}),yx=Ue.extend({model:x(),stopReason:be(je(["endTurn","stopSequence","maxTokens"]).or(x())),role:io,content:AI}),bx=Ue.extend({model:x(),stopReason:be(je(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:io,content:ve([Rs,X(Rs)])}),CI=M({type:Z("boolean"),title:x().optional(),description:x().optional(),default:Ae().optional()}),PI=M({type:Z("string"),title:x().optional(),description:x().optional(),minLength:ie().optional(),maxLength:ie().optional(),format:je(["email","uri","date","date-time"]).optional(),default:x().optional()}),MI=M({type:je(["number","integer"]),title:x().optional(),description:x().optional(),minimum:ie().optional(),maximum:ie().optional(),default:ie().optional()}),OI=M({type:Z("string"),title:x().optional(),description:x().optional(),enum:X(x()),default:x().optional()}),NI=M({type:Z("string"),title:x().optional(),description:x().optional(),oneOf:X(M({const:x(),title:x()})),default:x().optional()}),jI=M({type:Z("string"),title:x().optional(),description:x().optional(),enum:X(x()),enumNames:X(x()).optional(),default:x().optional()}),DI=ve([OI,NI]),UI=M({type:Z("array"),title:x().optional(),description:x().optional(),minItems:ie().optional(),maxItems:ie().optional(),items:M({type:Z("string"),enum:X(x())}),default:X(x()).optional()}),LI=M({type:Z("array"),title:x().optional(),description:x().optional(),minItems:ie().optional(),maxItems:ie().optional(),items:M({anyOf:X(M({const:x(),title:x()}))}),default:X(x()).optional()}),ZI=ve([UI,LI]),qI=ve([jI,DI,ZI]),FI=ve([qI,CI,PI,MI]),VI=Qa.extend({mode:Z("form").optional(),message:x(),requestedSchema:M({type:Z("object"),properties:pe(x(),FI),required:X(x()).optional()})}),HI=Qa.extend({mode:Z("url"),message:x(),elicitationId:x(),url:x().url()}),JI=ve([VI,HI]),BI=De.extend({method:Z("elicitation/create"),params:JI}),WI=ht.extend({elicitationId:x()}),GI=gt.extend({method:Z("notifications/elicitation/complete"),params:WI}),KI=Ue.extend({action:je(["accept","decline","cancel"]),content:Ya(t=>t===null?void 0:t,pe(x(),ve([x(),ie(),Ae(),X(x())])).optional())}),YI=M({type:Z("ref/resource"),uri:x()});var QI=M({type:Z("ref/prompt"),name:x()}),XI=ct.extend({ref:ve([QI,YI]),argument:M({name:x(),value:x()}),context:M({arguments:pe(x(),x()).optional()}).optional()}),e0=De.extend({method:Z("completion/complete"),params:XI});var t0=Ue.extend({completion:Ne({values:X(x()).max(100),total:be(ie().int()),hasMore:be(Ae())})}),r0=M({uri:x().startsWith("file://"),name:x().optional(),_meta:pe(x(),ge()).optional()}),n0=De.extend({method:Z("roots/list"),params:ct.optional()}),a0=Ue.extend({roots:X(r0)}),o0=gt.extend({method:Z("notifications/roots/list_changed"),params:ht.optional()}),EN=ve([Ur,G$,e0,kI,hI,sf,ef,tf,af,sI,cI,Hs,gx,Ns,Ds,Us,Zs]),AN=ve([Ps,Ms,Q$,o0,oo]),zN=ve([Qm,yx,bx,KI,a0,js,Ls,Os]),RN=ve([Ur,yf,BI,n0,Ns,Ds,Us,Zs]),CN=ve([Ps,Ms,vf,dI,of,gf,ff,oo,GI]),PN=ve([Qm,Y$,t0,yI,lf,qs,rf,Fs,gr,hf,js,Ls,Os]),ne=class t extends Error{constructor(e,n,a){super(`MCP error ${e}: ${n}`),this.code=e,this.data=a,this.name="McpError"}static fromError(e,n,a){if(e===ue.UrlElicitationRequired&&a){let r=a;if(r.elicitations)return new Bm(r.elicitations,n)}return new t(e,n,a)}},Bm=class extends ne{constructor(e,n=`URL elicitation${e.length>1?"s":""} required`){super(ue.UrlElicitationRequired,n,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};var te;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function n(r){throw new Error}t.assertNever=n,t.arrayToEnum=r=>{let o={};for(let i of r)o[i]=i;return o},t.getValidEnumValues=r=>{let o=t.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),i={};for(let s of o)i[s]=r[s];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let o=[];for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(i);return o},t.find=(r,o)=>{for(let i of r)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function a(r,o=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=a,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(te||(te={}));var xx;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(xx||(xx={}));var O=te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Bt=t=>{switch(typeof t){case"undefined":return O.undefined;case"string":return O.string;case"number":return Number.isNaN(t)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(t)?O.array:t===null?O.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?O.promise:typeof Map<"u"&&t instanceof Map?O.map:typeof Set<"u"&&t instanceof Set?O.set:typeof Date<"u"&&t instanceof Date?O.date:O.object;default:return O.unknown}};var T=te.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var ut=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(o){return o.message},a={_errors:[]},r=o=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)a._errors.push(n(i));else{let s=a,c=0;for(;c<i.path.length;){let u=i.path[c];c===i.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(i))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}};return r(this),a}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,te.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n=Object.create(null),a=[];for(let r of this.issues)if(r.path.length>0){let o=r.path[0];n[o]=n[o]||[],n[o].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}};ut.create=t=>new ut(t);var i0=(t,e)=>{let n;switch(t.code){case T.invalid_type:t.received===O.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case T.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,te.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:n=`Unrecognized key(s) in object: ${te.joinValues(t.keys,", ")}`;break;case T.invalid_union:n="Invalid input";break;case T.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${te.joinValues(t.options)}`;break;case T.invalid_enum_value:n=`Invalid enum value. Expected ${te.joinValues(t.options)}, received '${t.received}'`;break;case T.invalid_arguments:n="Invalid function arguments";break;case T.invalid_return_type:n="Invalid function return type";break;case T.invalid_date:n="Invalid date";break;case T.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:te.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case T.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case T.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case T.custom:n="Invalid input";break;case T.invalid_intersection_types:n="Intersection results could not be merged";break;case T.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case T.not_finite:n="Number must be finite";break;default:n=e.defaultError,te.assertNever(t)}return{message:n}},vr=i0;var s0=vr;function so(){return s0}var Js=t=>{let{data:e,path:n,errorMaps:a,issueData:r}=t,o=[...n,...r.path||[]],i={...r,path:o};if(r.message!==void 0)return{...r,path:o,message:r.message};let s="",c=a.filter(u=>!!u).slice().reverse();for(let u of c)s=u(i,{data:e,defaultError:s}).message;return{...r,path:o,message:s}};function C(t,e){let n=so(),a=Js({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===vr?void 0:vr].filter(r=>!!r)});t.common.issues.push(a)}var He=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let a=[];for(let r of n){if(r.status==="aborted")return J;r.status==="dirty"&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,n){let a=[];for(let r of n){let o=await r.key,i=await r.value;a.push({key:o,value:i})}return t.mergeObjectSync(e,a)}static mergeObjectSync(e,n){let a={};for(let r of n){let{key:o,value:i}=r;if(o.status==="aborted"||i.status==="aborted")return J;o.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(a[o.value]=i.value)}return{status:e.value,value:a}}},J=Object.freeze({status:"aborted"}),Un=t=>({status:"dirty",value:t}),Qe=t=>({status:"valid",value:t}),bf=t=>t.status==="aborted",xf=t=>t.status==="dirty",Lr=t=>t.status==="valid",lo=t=>typeof Promise<"u"&&t instanceof Promise;var D;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(D||(D={}));var vt=class{constructor(e,n,a,r){this._cachedPath=[],this.parent=e,this.data=n,this._path=a,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},_x=(t,e)=>{if(Lr(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new ut(t.common.issues);return this._error=n,this._error}}};function K(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:a,description:r}=t;if(e&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(i,s)=>{let{message:c}=t;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??a??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}var ee=class{get description(){return this._def.description}_getType(e){return Bt(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Bt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new He,ctx:{common:e.parent.common,data:e.data,parsedType:Bt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(lo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let a=this.safeParse(e,n);if(a.success)return a.data;throw a.error}safeParse(e,n){let a={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bt(e)},r=this._parseSync({data:e,path:a.path,parent:a});return _x(a,r)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bt(e)};if(!this["~standard"].async)try{let a=this._parseSync({data:e,path:[],parent:n});return Lr(a)?{value:a.value}:{issues:n.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>Lr(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,n){let a=await this.safeParseAsync(e,n);if(a.success)return a.data;throw a.error}async safeParseAsync(e,n){let a={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Bt(e)},r=this._parse({data:e,path:a.path,parent:a}),o=await(lo(r)?r:Promise.resolve(r));return _x(a,o)}refine(e,n){let a=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,o)=>{let i=e(r),s=()=>o.addIssue({code:T.custom,...a(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(e,n){return this._refinement((a,r)=>e(a)?!0:(r.addIssue(typeof n=="function"?n(a,r):n),!1))}_refinement(e){return new Tt({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return St.create(this,this._def)}nullable(){return Kt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return br.create(this)}promise(){return Zr.create(this,this._def)}or(e){return Vn.create([this,e],this._def)}and(e){return Hn.create(this,e,this._def)}transform(e){return new Tt({...K(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new Kn({...K(this._def),innerType:this,defaultValue:n,typeName:$.ZodDefault})}brand(){return new Bs({typeName:$.ZodBranded,type:this,...K(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Yn({...K(this._def),innerType:this,catchValue:n,typeName:$.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Ws.create(this,e)}readonly(){return Qn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},l0=/^c[^\s-]{8,}$/i,c0=/^[0-9a-z]+$/,u0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,d0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,p0=/^[a-z0-9_-]{21}$/i,m0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,f0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,h0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,g0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",_f,v0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,y0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,b0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,x0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,w0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",k0=new RegExp(`^${wx}$`);function kx(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function S0(t){return new RegExp(`^${kx(t)}$`)}function T0(t){let e=`${wx}T${kx(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function $0(t,e){return!!((e==="v4"||!e)&&v0.test(t)||(e==="v6"||!e)&&b0.test(t))}function I0(t,e){if(!m0.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(a));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||e&&r.alg!==e)}catch{return!1}}function E0(t,e){return!!((e==="v4"||!e)&&y0.test(t)||(e==="v6"||!e)&&x0.test(t))}var Zn=class t extends ee{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==O.string){let o=this._getOrReturnCtx(e);return C(o,{code:T.invalid_type,expected:O.string,received:o.parsedType}),J}let a=new He,r;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(r=this._getOrReturnCtx(e,r),C(r,{code:T.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")e.data.length>o.value&&(r=this._getOrReturnCtx(e,r),C(r,{code:T.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){let i=e.data.length>o.value,s=e.data.length<o.value;(i||s)&&(r=this._getOrReturnCtx(e,r),i?C(r,{code:T.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&C(r,{code:T.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")h0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"email",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")_f||(_f=new RegExp(g0,"u")),_f.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"emoji",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")d0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"uuid",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")p0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"nanoid",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")l0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"cuid",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")c0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"cuid2",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")u0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"ulid",code:T.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{r=this._getOrReturnCtx(e,r),C(r,{validation:"url",code:T.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"regex",code:T.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(r=this._getOrReturnCtx(e,r),C(r,{code:T.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(r=this._getOrReturnCtx(e,r),C(r,{code:T.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(r=this._getOrReturnCtx(e,r),C(r,{code:T.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?T0(o).test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{code:T.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?k0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{code:T.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?S0(o).test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{code:T.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?f0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"duration",code:T.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?$0(e.data,o.version)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"ip",code:T.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?I0(e.data,o.alg)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"jwt",code:T.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?E0(e.data,o.version)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"cidr",code:T.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?_0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"base64",code:T.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?w0.test(e.data)||(r=this._getOrReturnCtx(e,r),C(r,{validation:"base64url",code:T.invalid_string,message:o.message}),a.dirty()):te.assertNever(o);return{status:a.value,value:e.data}}_regex(e,n,a){return this.refinement(r=>e.test(r),{validation:n,code:T.invalid_string,...D.errToObj(a)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...D.errToObj(e)})}url(e){return this._addCheck({kind:"url",...D.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...D.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...D.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...D.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...D.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...D.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...D.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...D.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...D.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...D.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...D.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...D.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...D.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...D.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...D.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...D.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...D.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...D.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...D.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...D.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...D.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...D.errToObj(n)})}nonempty(e){return this.min(1,D.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Zn.create=t=>new Zn({checks:[],typeName:$.ZodString,coerce:t?.coerce??!1,...K(t)});function A0(t,e){let n=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,r=n>a?n:a,o=Number.parseInt(t.toFixed(r).replace(".","")),i=Number.parseInt(e.toFixed(r).replace(".",""));return o%i/10**r}var co=class t extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==O.number){let o=this._getOrReturnCtx(e);return C(o,{code:T.invalid_type,expected:O.number,received:o.parsedType}),J}let a,r=new He;for(let o of this._def.checks)o.kind==="int"?te.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),C(a,{code:T.invalid_type,expected:"integer",received:"float",message:o.message}),r.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),C(a,{code:T.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),C(a,{code:T.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),r.dirty()):o.kind==="multipleOf"?A0(e.data,o.value)!==0&&(a=this._getOrReturnCtx(e,a),C(a,{code:T.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),C(a,{code:T.not_finite,message:o.message}),r.dirty()):te.assertNever(o);return{status:r.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,D.toString(n))}gt(e,n){return this.setLimit("min",e,!1,D.toString(n))}lte(e,n){return this.setLimit("max",e,!0,D.toString(n))}lt(e,n){return this.setLimit("max",e,!1,D.toString(n))}setLimit(e,n,a,r){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:D.toString(r)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:D.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:D.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:D.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:D.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:D.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:D.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&te.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(n)&&Number.isFinite(e)}};co.create=t=>new co({checks:[],typeName:$.ZodNumber,coerce:t?.coerce||!1,...K(t)});var uo=class t extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==O.bigint)return this._getInvalidInput(e);let a,r=new He;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),C(a,{code:T.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),C(a,{code:T.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),r.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),C(a,{code:T.not_multiple_of,multipleOf:o.value,message:o.message}),r.dirty()):te.assertNever(o);return{status:r.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return C(n,{code:T.invalid_type,expected:O.bigint,received:n.parsedType}),J}gte(e,n){return this.setLimit("min",e,!0,D.toString(n))}gt(e,n){return this.setLimit("min",e,!1,D.toString(n))}lte(e,n){return this.setLimit("max",e,!0,D.toString(n))}lt(e,n){return this.setLimit("max",e,!1,D.toString(n))}setLimit(e,n,a,r){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:a,message:D.toString(r)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:D.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:D.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};uo.create=t=>new uo({checks:[],typeName:$.ZodBigInt,coerce:t?.coerce??!1,...K(t)});var po=class extends ee{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==O.boolean){let a=this._getOrReturnCtx(e);return C(a,{code:T.invalid_type,expected:O.boolean,received:a.parsedType}),J}return Qe(e.data)}};po.create=t=>new po({typeName:$.ZodBoolean,coerce:t?.coerce||!1,...K(t)});var mo=class t extends ee{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==O.date){let o=this._getOrReturnCtx(e);return C(o,{code:T.invalid_type,expected:O.date,received:o.parsedType}),J}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return C(o,{code:T.invalid_date}),J}let a=new He,r;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(r=this._getOrReturnCtx(e,r),C(r,{code:T.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(r=this._getOrReturnCtx(e,r),C(r,{code:T.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):te.assertNever(o);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:D.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:D.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};mo.create=t=>new mo({checks:[],coerce:t?.coerce||!1,typeName:$.ZodDate,...K(t)});var fo=class extends ee{_parse(e){if(this._getType(e)!==O.symbol){let a=this._getOrReturnCtx(e);return C(a,{code:T.invalid_type,expected:O.symbol,received:a.parsedType}),J}return Qe(e.data)}};fo.create=t=>new fo({typeName:$.ZodSymbol,...K(t)});var qn=class extends ee{_parse(e){if(this._getType(e)!==O.undefined){let a=this._getOrReturnCtx(e);return C(a,{code:T.invalid_type,expected:O.undefined,received:a.parsedType}),J}return Qe(e.data)}};qn.create=t=>new qn({typeName:$.ZodUndefined,...K(t)});var Fn=class extends ee{_parse(e){if(this._getType(e)!==O.null){let a=this._getOrReturnCtx(e);return C(a,{code:T.invalid_type,expected:O.null,received:a.parsedType}),J}return Qe(e.data)}};Fn.create=t=>new Fn({typeName:$.ZodNull,...K(t)});var ho=class extends ee{constructor(){super(...arguments),this._any=!0}_parse(e){return Qe(e.data)}};ho.create=t=>new ho({typeName:$.ZodAny,...K(t)});var yr=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Qe(e.data)}};yr.create=t=>new yr({typeName:$.ZodUnknown,...K(t)});var Nt=class extends ee{_parse(e){let n=this._getOrReturnCtx(e);return C(n,{code:T.invalid_type,expected:O.never,received:n.parsedType}),J}};Nt.create=t=>new Nt({typeName:$.ZodNever,...K(t)});var go=class extends ee{_parse(e){if(this._getType(e)!==O.undefined){let a=this._getOrReturnCtx(e);return C(a,{code:T.invalid_type,expected:O.void,received:a.parsedType}),J}return Qe(e.data)}};go.create=t=>new go({typeName:$.ZodVoid,...K(t)});var br=class t extends ee{_parse(e){let{ctx:n,status:a}=this._processInputParams(e),r=this._def;if(n.parsedType!==O.array)return C(n,{code:T.invalid_type,expected:O.array,received:n.parsedType}),J;if(r.exactLength!==null){let i=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(i||s)&&(C(n,{code:i?T.too_big:T.too_small,minimum:s?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(C(n,{code:T.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(C(n,{code:T.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((i,s)=>r.type._parseAsync(new vt(n,i,n.path,s)))).then(i=>He.mergeArray(a,i));let o=[...n.data].map((i,s)=>r.type._parseSync(new vt(n,i,n.path,s)));return He.mergeArray(a,o)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:D.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:D.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:D.toString(n)}})}nonempty(e){return this.min(1,e)}};br.create=(t,e)=>new br({type:t,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...K(e)});function Ln(t){if(t instanceof dt){let e={};for(let n in t.shape){let a=t.shape[n];e[n]=St.create(Ln(a))}return new dt({...t._def,shape:()=>e})}else return t instanceof br?new br({...t._def,type:Ln(t.element)}):t instanceof St?St.create(Ln(t.unwrap())):t instanceof Kt?Kt.create(Ln(t.unwrap())):t instanceof Gt?Gt.create(t.items.map(e=>Ln(e))):t}var dt=class t extends ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=te.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==O.object){let u=this._getOrReturnCtx(e);return C(u,{code:T.invalid_type,expected:O.object,received:u.parsedType}),J}let{status:a,ctx:r}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Nt&&this._def.unknownKeys==="strip"))for(let u in r.data)i.includes(u)||s.push(u);let c=[];for(let u of i){let d=o[u],m=r.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new vt(r,m,r.path,u)),alwaysSet:u in r.data})}if(this._def.catchall instanceof Nt){let u=this._def.unknownKeys;if(u==="passthrough")for(let d of s)c.push({key:{status:"valid",value:d},value:{status:"valid",value:r.data[d]}});else if(u==="strict")s.length>0&&(C(r,{code:T.unrecognized_keys,keys:s}),a.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let d of s){let m=r.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new vt(r,m,r.path,d)),alwaysSet:d in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let u=[];for(let d of c){let m=await d.key,h=await d.value;u.push({key:m,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>He.mergeObjectSync(a,u)):He.mergeObjectSync(a,c)}get shape(){return this._def.shape()}strict(e){return D.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,a)=>{let r=this._def.errorMap?.(n,a).message??a.defaultError;return n.code==="unrecognized_keys"?{message:D.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:$.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let a of te.objectKeys(e))e[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let a of te.objectKeys(this.shape))e[a]||(n[a]=this.shape[a]);return new t({...this._def,shape:()=>n})}deepPartial(){return Ln(this)}partial(e){let n={};for(let a of te.objectKeys(this.shape)){let r=this.shape[a];e&&!e[a]?n[a]=r:n[a]=r.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let a of te.objectKeys(this.shape))if(e&&!e[a])n[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof St;)o=o._def.innerType;n[a]=o}return new t({...this._def,shape:()=>n})}keyof(){return Sx(te.objectKeys(this.shape))}};dt.create=(t,e)=>new dt({shape:()=>t,unknownKeys:"strip",catchall:Nt.create(),typeName:$.ZodObject,...K(e)});dt.strictCreate=(t,e)=>new dt({shape:()=>t,unknownKeys:"strict",catchall:Nt.create(),typeName:$.ZodObject,...K(e)});dt.lazycreate=(t,e)=>new dt({shape:t,unknownKeys:"strip",catchall:Nt.create(),typeName:$.ZodObject,...K(e)});var Vn=class extends ee{_parse(e){let{ctx:n}=this._processInputParams(e),a=this._def.options;function r(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;let i=o.map(s=>new ut(s.ctx.common.issues));return C(n,{code:T.invalid_union,unionErrors:i}),J}if(n.common.async)return Promise.all(a.map(async o=>{let i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(r);{let o,i=[];for(let c of a){let u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;let s=i.map(c=>new ut(c));return C(n,{code:T.invalid_union,unionErrors:s}),J}}get options(){return this._def.options}};Vn.create=(t,e)=>new Vn({options:t,typeName:$.ZodUnion,...K(e)});var Wt=t=>t instanceof Jn?Wt(t.schema):t instanceof Tt?Wt(t.innerType()):t instanceof Bn?[t.value]:t instanceof Wn?t.options:t instanceof Gn?te.objectValues(t.enum):t instanceof Kn?Wt(t._def.innerType):t instanceof qn?[void 0]:t instanceof Fn?[null]:t instanceof St?[void 0,...Wt(t.unwrap())]:t instanceof Kt?[null,...Wt(t.unwrap())]:t instanceof Bs||t instanceof Qn?Wt(t.unwrap()):t instanceof Yn?Wt(t._def.innerType):[],wf=class t extends ee{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==O.object)return C(n,{code:T.invalid_type,expected:O.object,received:n.parsedType}),J;let a=this.discriminator,r=n.data[a],o=this.optionsMap.get(r);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(C(n,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,a){let r=new Map;for(let o of n){let i=Wt(o.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of i){if(r.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);r.set(s,o)}}return new t({typeName:$.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:r,...K(a)})}};function kf(t,e){let n=Bt(t),a=Bt(e);if(t===e)return{valid:!0,data:t};if(n===O.object&&a===O.object){let r=te.objectKeys(e),o=te.objectKeys(t).filter(s=>r.indexOf(s)!==-1),i={...t,...e};for(let s of o){let c=kf(t[s],e[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(n===O.array&&a===O.array){if(t.length!==e.length)return{valid:!1};let r=[];for(let o=0;o<t.length;o++){let i=t[o],s=e[o],c=kf(i,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===O.date&&a===O.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Hn=class extends ee{_parse(e){let{status:n,ctx:a}=this._processInputParams(e),r=(o,i)=>{if(bf(o)||bf(i))return J;let s=kf(o.value,i.value);return s.valid?((xf(o)||xf(i))&&n.dirty(),{status:n.value,value:s.data}):(C(a,{code:T.invalid_intersection_types}),J)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,i])=>r(o,i)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}};Hn.create=(t,e,n)=>new Hn({left:t,right:e,typeName:$.ZodIntersection,...K(n)});var Gt=class t extends ee{_parse(e){let{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==O.array)return C(a,{code:T.invalid_type,expected:O.array,received:a.parsedType}),J;if(a.data.length<this._def.items.length)return C(a,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&a.data.length>this._def.items.length&&(C(a,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let o=[...a.data].map((i,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new vt(a,i,a.path,s)):null}).filter(i=>!!i);return a.common.async?Promise.all(o).then(i=>He.mergeArray(n,i)):He.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Gt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt({items:t,typeName:$.ZodTuple,rest:null,...K(e)})};var Sf=class t extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==O.object)return C(a,{code:T.invalid_type,expected:O.object,received:a.parsedType}),J;let r=[],o=this._def.keyType,i=this._def.valueType;for(let s in a.data)r.push({key:o._parse(new vt(a,s,a.path,s)),value:i._parse(new vt(a,a.data[s],a.path,s)),alwaysSet:s in a.data});return a.common.async?He.mergeObjectAsync(n,r):He.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(e,n,a){return n instanceof ee?new t({keyType:e,valueType:n,typeName:$.ZodRecord,...K(a)}):new t({keyType:Zn.create(),valueType:e,typeName:$.ZodRecord,...K(n)})}},vo=class extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==O.map)return C(a,{code:T.invalid_type,expected:O.map,received:a.parsedType}),J;let r=this._def.keyType,o=this._def.valueType,i=[...a.data.entries()].map(([s,c],u)=>({key:r._parse(new vt(a,s,a.path,[u,"key"])),value:o._parse(new vt(a,c,a.path,[u,"value"]))}));if(a.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of i){let u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return J;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(u.value,d.value)}return{status:n.value,value:s}})}else{let s=new Map;for(let c of i){let u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return J;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(u.value,d.value)}return{status:n.value,value:s}}}};vo.create=(t,e,n)=>new vo({valueType:e,keyType:t,typeName:$.ZodMap,...K(n)});var yo=class t extends ee{_parse(e){let{status:n,ctx:a}=this._processInputParams(e);if(a.parsedType!==O.set)return C(a,{code:T.invalid_type,expected:O.set,received:a.parsedType}),J;let r=this._def;r.minSize!==null&&a.data.size<r.minSize.value&&(C(a,{code:T.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&a.data.size>r.maxSize.value&&(C(a,{code:T.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let o=this._def.valueType;function i(c){let u=new Set;for(let d of c){if(d.status==="aborted")return J;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}let s=[...a.data.values()].map((c,u)=>o._parse(new vt(a,c,a.path,u)));return a.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(e,n){return new t({...this._def,minSize:{value:e,message:D.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:D.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};yo.create=(t,e)=>new yo({valueType:t,minSize:null,maxSize:null,typeName:$.ZodSet,...K(e)});var Tf=class t extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==O.function)return C(n,{code:T.invalid_type,expected:O.function,received:n.parsedType}),J;function a(s,c){return Js({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,so(),vr].filter(u=>!!u),issueData:{code:T.invalid_arguments,argumentsError:c}})}function r(s,c){return Js({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,so(),vr].filter(u=>!!u),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Zr){let s=this;return Qe(async function(...c){let u=new ut([]),d=await s._def.args.parseAsync(c,o).catch(b=>{throw u.addIssue(a(c,b)),u}),m=await Reflect.apply(i,this,d);return await s._def.returns._def.type.parseAsync(m,o).catch(b=>{throw u.addIssue(r(m,b)),u})})}else{let s=this;return Qe(function(...c){let u=s._def.args.safeParse(c,o);if(!u.success)throw new ut([a(c,u.error)]);let d=Reflect.apply(i,this,u.data),m=s._def.returns.safeParse(d,o);if(!m.success)throw new ut([r(d,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Gt.create(e).rest(yr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,a){return new t({args:e||Gt.create([]).rest(yr.create()),returns:n||yr.create(),typeName:$.ZodFunction,...K(a)})}},Jn=class extends ee{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Jn.create=(t,e)=>new Jn({getter:t,typeName:$.ZodLazy,...K(e)});var Bn=class extends ee{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return C(n,{received:n.data,code:T.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:e.data}}get value(){return this._def.value}};Bn.create=(t,e)=>new Bn({value:t,typeName:$.ZodLiteral,...K(e)});function Sx(t,e){return new Wn({values:t,typeName:$.ZodEnum,...K(e)})}var Wn=class t extends ee{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),a=this._def.values;return C(n,{expected:te.joinValues(a),received:n.parsedType,code:T.invalid_type}),J}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),a=this._def.values;return C(n,{received:n.data,code:T.invalid_enum_value,options:a}),J}return Qe(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(a=>!e.includes(a)),{...this._def,...n})}};Wn.create=Sx;var Gn=class extends ee{_parse(e){let n=te.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==O.string&&a.parsedType!==O.number){let r=te.objectValues(n);return C(a,{expected:te.joinValues(r),received:a.parsedType,code:T.invalid_type}),J}if(this._cache||(this._cache=new Set(te.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let r=te.objectValues(n);return C(a,{received:a.data,code:T.invalid_enum_value,options:r}),J}return Qe(e.data)}get enum(){return this._def.values}};Gn.create=(t,e)=>new Gn({values:t,typeName:$.ZodNativeEnum,...K(e)});var Zr=class extends ee{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==O.promise&&n.common.async===!1)return C(n,{code:T.invalid_type,expected:O.promise,received:n.parsedType}),J;let a=n.parsedType===O.promise?n.data:Promise.resolve(n.data);return Qe(a.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Zr.create=(t,e)=>new Zr({type:t,typeName:$.ZodPromise,...K(e)});var Tt=class extends ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:a}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:i=>{C(a,i),i.fatal?n.abort():n.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),r.type==="preprocess"){let i=r.transform(a.data,o);if(a.common.async)return Promise.resolve(i).then(async s=>{if(n.value==="aborted")return J;let c=await this._def.schema._parseAsync({data:s,path:a.path,parent:a});return c.status==="aborted"?J:c.status==="dirty"?Un(c.value):n.value==="dirty"?Un(c.value):c});{if(n.value==="aborted")return J;let s=this._def.schema._parseSync({data:i,path:a.path,parent:a});return s.status==="aborted"?J:s.status==="dirty"?Un(s.value):n.value==="dirty"?Un(s.value):s}}if(r.type==="refinement"){let i=s=>{let c=r.refinement(s,o);if(a.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(a.common.async===!1){let s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?J:(s.status==="dirty"&&n.dirty(),i(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>s.status==="aborted"?J:(s.status==="dirty"&&n.dirty(),i(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(a.common.async===!1){let i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Lr(i))return J;let s=r.transform(i.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>Lr(i)?Promise.resolve(r.transform(i.value,o)).then(s=>({status:n.value,value:s})):J);te.assertNever(r)}};Tt.create=(t,e,n)=>new Tt({schema:t,typeName:$.ZodEffects,effect:e,...K(n)});Tt.createWithPreprocess=(t,e,n)=>new Tt({schema:e,effect:{type:"preprocess",transform:t},typeName:$.ZodEffects,...K(n)});var St=class extends ee{_parse(e){return this._getType(e)===O.undefined?Qe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};St.create=(t,e)=>new St({innerType:t,typeName:$.ZodOptional,...K(e)});var Kt=class extends ee{_parse(e){return this._getType(e)===O.null?Qe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Kt.create=(t,e)=>new Kt({innerType:t,typeName:$.ZodNullable,...K(e)});var Kn=class extends ee{_parse(e){let{ctx:n}=this._processInputParams(e),a=n.data;return n.parsedType===O.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Kn.create=(t,e)=>new Kn({innerType:t,typeName:$.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...K(e)});var Yn=class extends ee{_parse(e){let{ctx:n}=this._processInputParams(e),a={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return lo(r)?r.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ut(a.common.issues)},input:a.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new ut(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}};Yn.create=(t,e)=>new Yn({innerType:t,typeName:$.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...K(e)});var bo=class extends ee{_parse(e){if(this._getType(e)!==O.nan){let a=this._getOrReturnCtx(e);return C(a,{code:T.invalid_type,expected:O.nan,received:a.parsedType}),J}return{status:"valid",value:e.data}}};bo.create=t=>new bo({typeName:$.ZodNaN,...K(t)});var Bs=class extends ee{_parse(e){let{ctx:n}=this._processInputParams(e),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}},Ws=class t extends ee{_parse(e){let{status:n,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?J:o.status==="dirty"?(n.dirty(),Un(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{let r=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?J:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:a.path,parent:a})}}static create(e,n){return new t({in:e,out:n,typeName:$.ZodPipeline})}},Qn=class extends ee{_parse(e){let n=this._def.innerType._parse(e),a=r=>(Lr(r)&&(r.value=Object.freeze(r.value)),r);return lo(n)?n.then(r=>a(r)):a(n)}unwrap(){return this._def.innerType}};Qn.create=(t,e)=>new Qn({innerType:t,typeName:$.ZodReadonly,...K(e)});var QN={object:dt.lazycreate},$;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})($||($={}));var XN=Zn.create,e1=co.create,t1=bo.create,r1=uo.create,n1=po.create,a1=mo.create,o1=fo.create,i1=qn.create,s1=Fn.create,l1=ho.create,c1=yr.create,u1=Nt.create,d1=go.create,p1=br.create,m1=dt.create,f1=dt.strictCreate,h1=Vn.create,g1=wf.create,v1=Hn.create,y1=Gt.create,b1=Sf.create,x1=vo.create,_1=yo.create,w1=Tf.create,k1=Jn.create,S1=Bn.create,T1=Wn.create,$1=Gn.create,I1=Zr.create,E1=Tt.create,A1=St.create,z1=Kt.create,R1=Tt.createWithPreprocess,C1=Ws.create;at();function Gs(t){return!!t._zod}function Ks(t,e){return Gs(t)?ln(t,e):t.safeParse(e)}function Tx(t){if(!t)return;let e;if(Gs(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function $x(t){if(Gs(t)){let o=t._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let n=t._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let a=t.value;if(a!==void 0)return a}function xr(t){return t==="completed"||t==="failed"||t==="cancelled"}var gj=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function $f(t){let n=Tx(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let a=$x(n);if(typeof a!="string")throw new Error("Schema method literal must be a string");return a}function If(t,e){let n=Ks(t,e);if(!n.success)throw n.error;return n.data}var O0=6e4,Ys=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Ps,n=>{this._oncancel(n)}),this.setNotificationHandler(Ms,n=>{this._onprogress(n)}),this.setRequestHandler(Ur,n=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ns,async(n,a)=>{let r=await this._taskStore.getTask(n.params.taskId,a.sessionId);if(!r)throw new ne(ue.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(Ds,async(n,a)=>{let r=async()=>{let o=n.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,a.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,u=c.id,d=this._requestResolvers.get(u);if(d)if(this._requestResolvers.delete(u),s.type==="response")d(c);else{let m=c,h=new ne(m.error.code,m.error.message,m.error.data);d(h)}else{let m=s.type==="response"?"Response":"Error";this._onerror(new Error(`${m} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:a.requestId})}}let i=await this._taskStore.getTask(o,a.sessionId);if(!i)throw new ne(ue.InvalidParams,`Task not found: ${o}`);if(!xr(i.status))return await this._waitForTaskUpdate(o,a.signal),await r();if(xr(i.status)){let s=await this._taskStore.getTaskResult(o,a.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[hr]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(Us,async(n,a)=>{try{let{tasks:r,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,a.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new ne(ue.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(Zs,async(n,a)=>{try{let r=await this._taskStore.getTask(n.params.taskId,a.sessionId);if(!r)throw new ne(ue.InvalidParams,`Task not found: ${n.params.taskId}`);if(xr(r.status))throw new ne(ue.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",a.sessionId),this._clearTaskQueue(n.params.taskId);let o=await this._taskStore.getTask(n.params.taskId,a.sessionId);if(!o)throw new ne(ue.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof ne?r:new ne(ue.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,n,a,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:a,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let a=Date.now()-n.startTime;if(n.maxTotalTimeout&&a>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),ne.fromError(ue.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:a});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let a=this.transport?.onerror;this._transport.onerror=o=>{a?.(o),this._onerror(o)};let r=this._transport?.onmessage;this._transport.onmessage=(o,i)=>{r?.(o,i),Xa(o)||cx(o)?this._onresponse(o):Gm(o)?this._onrequest(o,i):lx(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let a of this._timeoutInfo.values())clearTimeout(a.timeoutId);this._timeoutInfo.clear();for(let a of this._requestHandlerAbortControllers.values())a.abort();this._requestHandlerAbortControllers.clear();let n=ne.fromError(ue.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let a of e.values())a(n)}_onerror(e){this.onerror?.(e)}_onnotification(e){let n=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,n){let a=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[hr]?.taskId;if(a===void 0){let d={jsonrpc:"2.0",id:e.id,error:{code:ue.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},r?.sessionId).catch(m=>this._onerror(new Error(`Failed to enqueue error response: ${m}`))):r?.send(d).catch(m=>this._onerror(new Error(`Failed to send an error response: ${m}`)));return}let i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);let s=ox(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,u={signal:i.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async d=>{if(i.signal.aborted)return;let m={relatedRequestId:e.id};o&&(m.relatedTask={taskId:o}),await this.notification(d,m)},sendRequest:async(d,m,h)=>{if(i.signal.aborted)throw new ne(ue.ConnectionClosed,"Request was cancelled");let b={...h,relatedRequestId:e.id};o&&!b.relatedTask&&(b.relatedTask={taskId:o});let S=b.relatedTask?.taskId??o;return S&&c&&await c.updateTaskStatus(S,"input_required"),await this.request(d,m,b)},authInfo:n?.authInfo,requestId:e.id,requestInfo:n?.requestInfo,taskId:o,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(e.method)}).then(()=>a(e,u)).then(async d=>{if(i.signal.aborted)return;let m={result:d,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:m,timestamp:Date.now()},r?.sessionId):await r?.send(m)},async d=>{if(i.signal.aborted)return;let m={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(d.code)?d.code:ue.InternalError,message:d.message??"Internal error",...d.data!==void 0&&{data:d.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:m,timestamp:Date.now()},r?.sessionId):await r?.send(m)}).catch(d=>this._onerror(new Error(`Failed to send response: ${d}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===i&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...a}=e.params,r=Number(n),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&i&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(c){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),i(c);return}o(a)}_onresponse(e){let n=Number(e.id),a=this._requestResolvers.get(n);if(a){if(this._requestResolvers.delete(n),Xa(e))a(e);else{let i=new ne(e.error.code,e.error.message,e.error.data);a(i)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let o=!1;if(Xa(e)&&e.result&&typeof e.result=="object"){let i=e.result;if(i.task&&typeof i.task=="object"){let s=i.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,n))}}if(o||this._progressHandlers.delete(n),Xa(e))r(e);else{let i=ne.fromError(e.error.code,e.error.message,e.error.data);r(i)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,n,a){let{task:r}=a??{};if(!r){try{yield{type:"result",result:await this.request(e,n,a)}}catch(i){yield{type:"error",error:i instanceof ne?i:new ne(ue.InternalError,String(i))}}return}let o;try{let i=await this.request(e,Os,a);if(i.task)o=i.task.taskId,yield{type:"taskCreated",task:i.task};else throw new ne(ue.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:o},a);if(yield{type:"taskStatus",task:s},xr(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,a)}:s.status==="failed"?yield{type:"error",error:new ne(ue.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new ne(ue.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},n,a)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),a?.signal?.throwIfAborted()}}catch(i){yield{type:"error",error:i instanceof ne?i:new ne(ue.InternalError,String(i))}}}request(e,n,a){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:i,task:s,relatedTask:c}=a??{};return new Promise((u,d)=>{let m=F=>{d(F)};if(!this._transport){m(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch(F){m(F);return}a?.signal?.throwIfAborted();let h=this._requestMessageId++,b={...e,jsonrpc:"2.0",id:h};a?.onprogress&&(this._progressHandlers.set(h,a.onprogress),b.params={...e.params,_meta:{...e.params?._meta||{},progressToken:h}}),s&&(b.params={...b.params,task:s}),c&&(b.params={...b.params,_meta:{...b.params?._meta||{},[hr]:c}});let S=F=>{this._responseHandlers.delete(h),this._progressHandlers.delete(h),this._cleanupTimeout(h),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(F)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:i}).catch(P=>this._onerror(new Error(`Failed to send cancellation: ${P}`)));let g=F instanceof ne?F:new ne(ue.RequestTimeout,String(F));d(g)};this._responseHandlers.set(h,F=>{if(!a?.signal?.aborted){if(F instanceof Error)return d(F);try{let g=Ks(n,F.result);g.success?u(g.data):d(g.error)}catch(g){d(g)}}}),a?.signal?.addEventListener("abort",()=>{S(a?.signal?.reason)});let U=a?.timeout??O0,N=()=>S(ne.fromError(ue.RequestTimeout,"Request timed out",{timeout:U}));this._setupTimeout(h,U,a?.maxTotalTimeout,N,a?.resetTimeoutOnProgress??!1);let de=c?.taskId;if(de){let F=g=>{let P=this._responseHandlers.get(h);P?P(g):this._onerror(new Error(`Response handler missing for side-channeled request ${h}`))};this._requestResolvers.set(h,F),this._enqueueTaskMessage(de,{type:"request",message:b,timestamp:Date.now()}).catch(g=>{this._cleanupTimeout(h),d(g)})}else this._transport.send(b,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:i}).catch(F=>{this._cleanupTimeout(h),d(F)})})}async getTask(e,n){return this.request({method:"tasks/get",params:e},js,n)}async getTaskResult(e,n,a){return this.request({method:"tasks/result",params:e},n,a)}async listTasks(e,n){return this.request({method:"tasks/list",params:e},Ls,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},dx,n)}async notification(e,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let a=n?.relatedTask?.taskId;if(a){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[hr]:n.relatedTask}}};await this._enqueueTaskMessage(a,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let s={...e,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[hr]:n.relatedTask}}}),this._transport?.send(s,n).catch(c=>this._onerror(c))});return}let i={...e,jsonrpc:"2.0"};n?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[hr]:n.relatedTask}}}),await this._transport.send(i,n)}setRequestHandler(e,n){let a=$f(e);this.assertRequestHandlerCapability(a),this._requestHandlers.set(a,(r,o)=>{let i=If(e,r);return Promise.resolve(n(i,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){let a=$f(e);this._notificationHandlers.set(a,r=>{let o=If(e,r);return Promise.resolve(n(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let n=this._taskProgressTokens.get(e);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,n,a){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,n,a,r)}async _clearTaskQueue(e,n){if(this._taskMessageQueue){let a=await this._taskMessageQueue.dequeueAll(e,n);for(let r of a)if(r.type==="request"&&Gm(r.message)){let o=r.message.id,i=this._requestResolvers.get(o);i?(i(new ne(ue.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,n){let a=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(e);r?.pollInterval&&(a=r.pollInterval)}catch{}return new Promise((r,o)=>{if(n.aborted){o(new ne(ue.InvalidRequest,"Request cancelled"));return}let i=setTimeout(r,a);n.addEventListener("abort",()=>{clearTimeout(i),o(new ne(ue.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,n){let a=this._taskStore;if(!a)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await a.createTask(r,e.id,{method:e.method,params:e.params},n)},getTask:async r=>{let o=await a.getTask(r,n);if(!o)throw new ne(ue.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,i)=>{await a.storeTaskResult(r,o,i,n);let s=await a.getTask(r,n);if(s){let c=oo.parse({method:"notifications/tasks/status",params:s});await this.notification(c),xr(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>a.getTaskResult(r,n),updateTaskStatus:async(r,o,i)=>{let s=await a.getTask(r,n);if(!s)throw new ne(ue.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(xr(s.status))throw new ne(ue.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await a.updateTaskStatus(r,o,i,n);let c=await a.getTask(r,n);if(c){let u=oo.parse({method:"notifications/tasks/status",params:c});await this.notification(u),xr(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>a.listTasks(r,n)}}};kt();var gU=(t=>typeof Ar<"u"?Ar:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof Ar<"u"?Ar:e)[n]}):t)(function(t){if(typeof Ar<"u")return Ar.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Ef=class extends Ys{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,n){}_ensureEventSlot(e){let n=this._eventSlots.get(e);if(!n){let a=this.eventSchemas[e];if(!a)throw Error(`Unknown event: ${String(e)}`);n={listeners:[]},this._eventSlots.set(e,n);let r=a.shape.method.value;this._registeredMethods.add(r);let o=n;super.setNotificationHandler(a,i=>{let s=i.params;this.onEventDispatch(e,s),o.onHandler?.(s);for(let c of[...o.listeners])c(s)})}return n}setEventHandler(e,n){let a=this._ensureEventSlot(e);a.onHandler&&n&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),a.onHandler=n}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,n){this._ensureEventSlot(e).listeners.push(n)}removeEventListener(e,n){let a=this._eventSlots.get(e);if(!a)return;let r=a.listeners.indexOf(n);r!==-1&&a.listeners.splice(r,1)}setRequestHandler=(e,n)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,n)};setNotificationHandler=(e,n)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,n)};warnIfRequestHandlerReplaced(e,n,a){n&&a&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,n)=>{let a=e.shape.method.value;this._registeredMethods.add(a),super.setRequestHandler(e,n)};_assertMethodNotRegistered(e,n){let a=e.shape.method.value;if(this._registeredMethods.has(a))throw Error(`Handler for "${a}" already registered (via ${n}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(a)}},Ax="2026-01-26";var N0="ui/notifications/tool-input-partial";var j0=l.union([l.literal("light"),l.literal("dark")]).describe("Color theme preference for the host environment."),_o=l.union([l.literal("inline"),l.literal("fullscreen"),l.literal("pip")]).describe("Display mode for UI presentation."),D0=l.union([l.literal("--color-background-primary"),l.literal("--color-background-secondary"),l.literal("--color-background-tertiary"),l.literal("--color-background-inverse"),l.literal("--color-background-ghost"),l.literal("--color-background-info"),l.literal("--color-background-danger"),l.literal("--color-background-success"),l.literal("--color-background-warning"),l.literal("--color-background-disabled"),l.literal("--color-text-primary"),l.literal("--color-text-secondary"),l.literal("--color-text-tertiary"),l.literal("--color-text-inverse"),l.literal("--color-text-ghost"),l.literal("--color-text-info"),l.literal("--color-text-danger"),l.literal("--color-text-success"),l.literal("--color-text-warning"),l.literal("--color-text-disabled"),l.literal("--color-border-primary"),l.literal("--color-border-secondary"),l.literal("--color-border-tertiary"),l.literal("--color-border-inverse"),l.literal("--color-border-ghost"),l.literal("--color-border-info"),l.literal("--color-border-danger"),l.literal("--color-border-success"),l.literal("--color-border-warning"),l.literal("--color-border-disabled"),l.literal("--color-ring-primary"),l.literal("--color-ring-secondary"),l.literal("--color-ring-inverse"),l.literal("--color-ring-info"),l.literal("--color-ring-danger"),l.literal("--color-ring-success"),l.literal("--color-ring-warning"),l.literal("--font-sans"),l.literal("--font-mono"),l.literal("--font-weight-normal"),l.literal("--font-weight-medium"),l.literal("--font-weight-semibold"),l.literal("--font-weight-bold"),l.literal("--font-text-xs-size"),l.literal("--font-text-sm-size"),l.literal("--font-text-md-size"),l.literal("--font-text-lg-size"),l.literal("--font-heading-xs-size"),l.literal("--font-heading-sm-size"),l.literal("--font-heading-md-size"),l.literal("--font-heading-lg-size"),l.literal("--font-heading-xl-size"),l.literal("--font-heading-2xl-size"),l.literal("--font-heading-3xl-size"),l.literal("--font-text-xs-line-height"),l.literal("--font-text-sm-line-height"),l.literal("--font-text-md-line-height"),l.literal("--font-text-lg-line-height"),l.literal("--font-heading-xs-line-height"),l.literal("--font-heading-sm-line-height"),l.literal("--font-heading-md-line-height"),l.literal("--font-heading-lg-line-height"),l.literal("--font-heading-xl-line-height"),l.literal("--font-heading-2xl-line-height"),l.literal("--font-heading-3xl-line-height"),l.literal("--border-radius-xs"),l.literal("--border-radius-sm"),l.literal("--border-radius-md"),l.literal("--border-radius-lg"),l.literal("--border-radius-xl"),l.literal("--border-radius-full"),l.literal("--border-width-regular"),l.literal("--shadow-hairline"),l.literal("--shadow-sm"),l.literal("--shadow-md"),l.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),U0=l.record(D0.describe(`Style variables for theming MCP apps.
66
+
67
+ Individual style keys are optional - hosts may provide any subset of these values.
68
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
69
+
70
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
71
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),l.union([l.string(),l.undefined()]).describe(`Style variables for theming MCP apps.
72
+
73
+ Individual style keys are optional - hosts may provide any subset of these values.
74
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
75
+
76
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
77
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
78
+
79
+ Individual style keys are optional - hosts may provide any subset of these values.
80
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
81
+
82
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
83
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),L0=l.object({method:l.literal("ui/open-link"),params:l.object({url:l.string().describe("URL to open in the host's browser")})}),_U=l.object({isError:l.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),wU=l.object({isError:l.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),kU=l.object({isError:l.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),Z0=l.object({method:l.literal("ui/notifications/sandbox-proxy-ready"),params:l.object({})}),Af=l.object({connectDomains:l.array(l.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
84
+
85
+ - Maps to CSP \`connect-src\` directive
86
+ - Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:l.array(l.string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:l.array(l.string()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:l.array(l.string()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted \u2192 only same origin allowed (`base-uri 'self'`)")}),zf=l.object({camera:l.object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:l.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:l.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:l.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),q0=l.object({method:l.literal("ui/notifications/size-changed"),params:l.object({width:l.number().optional().describe("New width in pixels."),height:l.number().optional().describe("New height in pixels.")})}),SU=l.object({method:l.literal("ui/notifications/tool-input"),params:l.object({arguments:l.record(l.string(),l.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),TU=l.object({method:l.literal("ui/notifications/tool-input-partial"),params:l.object({arguments:l.record(l.string(),l.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),$U=l.object({method:l.literal("ui/notifications/tool-cancelled"),params:l.object({reason:l.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),F0=l.object({fonts:l.string().optional()}),V0=l.object({variables:U0.optional().describe("CSS variables for theming the app."),css:F0.optional().describe("CSS blocks that apps can inject.")}),IU=l.object({method:l.literal("ui/resource-teardown"),params:l.object({})}),H0=l.record(l.string(),l.unknown()),Ix=l.object({text:l.object({}).optional().describe("Host supports text content blocks."),image:l.object({}).optional().describe("Host supports image content blocks."),audio:l.object({}).optional().describe("Host supports audio content blocks."),resource:l.object({}).optional().describe("Host supports resource content blocks."),resourceLink:l.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:l.object({}).optional().describe("Host supports structured content.")}),J0=l.object({method:l.literal("ui/notifications/request-teardown"),params:l.object({}).optional()}),B0=l.object({experimental:l.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:l.object({}).optional().describe("Host supports opening external URLs."),downloadFile:l.object({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:l.object({listChanged:l.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:l.object({listChanged:l.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:l.object({}).optional().describe("Host accepts log messages."),sandbox:l.object({permissions:zf.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Af.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Ix.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Ix.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:l.object({tools:l.object({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),W0=l.object({experimental:l.object({}).optional().describe("Experimental features (structure TBD)."),tools:l.object({listChanged:l.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:l.array(_o).optional().describe("Display modes the app supports.")}),G0=l.object({method:l.literal("ui/notifications/initialized"),params:l.object({}).optional()}),EU=l.object({csp:Af.optional().describe("Content Security Policy configuration for UI resources."),permissions:zf.optional().describe("Sandbox permissions requested by the UI resource."),domain:l.string().optional().describe(`Dedicated origin for view sandbox.
87
+
88
+ Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
89
+
90
+ **Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
91
+ - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
92
+ - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
93
+
94
+ If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:l.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.
95
+
96
+ Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
97
+
98
+ - \`true\`: request visible border + background
99
+ - \`false\`: request no visible border + background
100
+ - omitted: host decides border`)}),Ex=l.object({method:l.literal("ui/request-display-mode"),params:l.object({mode:_o.describe("The display mode being requested.")})}),AU=l.object({mode:_o.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),K0=l.union([l.literal("model"),l.literal("app")]).describe("Tool visibility scope - who can access the tool."),zU=l.object({resourceUri:l.string().optional(),visibility:l.array(K0).optional().describe(`Who can access this tool. Default: ["model", "app"]
101
+ - "model": Tool visible to and callable by the agent
102
+ - "app": Tool callable by the app from this server only`),csp:l.never().optional(),permissions:l.never().optional()}),RU=l.object({mimeTypes:l.array(l.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Y0=l.object({method:l.literal("ui/download-file"),params:l.object({contents:l.array(l.union([pf,mf])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Q0=l.object({method:l.literal("ui/message"),params:l.object({role:l.literal("user").describe('Message role, currently only "user" is supported.'),content:l.array(Dn).describe("Message content blocks (text, image, etc.).")})}),CU=l.object({method:l.literal("ui/notifications/sandbox-resource-ready"),params:l.object({html:l.string().describe("HTML content to load into the inner iframe."),sandbox:l.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Af.optional().describe("CSP configuration from resource metadata."),permissions:zf.optional().describe("Sandbox permissions from resource metadata.")})}),PU=l.object({method:l.literal("ui/notifications/tool-result"),params:gr.describe("Standard MCP tool execution result.")}),zx=l.object({toolInfo:l.object({id:Nn.optional().describe("JSON-RPC id of the tools/call request."),tool:Vs.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:j0.optional().describe("Current color theme preference."),styles:V0.optional().describe("Style configuration for theming the app."),displayMode:_o.optional().describe("How the UI is currently displayed."),availableDisplayModes:l.array(_o).optional().describe("Display modes the host supports."),containerDimensions:l.union([l.object({height:l.number().describe("Fixed container height in pixels.")}),l.object({maxHeight:l.union([l.number(),l.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(l.union([l.object({width:l.number().describe("Fixed container width in pixels.")}),l.object({maxWidth:l.union([l.number(),l.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
103
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:l.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:l.string().optional().describe("User's timezone in IANA format."),userAgent:l.string().optional().describe("Host application identifier."),platform:l.union([l.literal("web"),l.literal("desktop"),l.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:l.object({touch:l.boolean().optional().describe("Whether the device supports touch input."),hover:l.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:l.object({top:l.number().describe("Top safe area inset in pixels."),right:l.number().describe("Right safe area inset in pixels."),bottom:l.number().describe("Bottom safe area inset in pixels."),left:l.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),MU=l.object({method:l.literal("ui/notifications/host-context-changed"),params:zx.describe("Partial context update containing only changed fields.")}),X0=l.object({method:l.literal("ui/update-model-context"),params:l.object({content:l.array(Dn).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:l.record(l.string(),l.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),eE=l.object({method:l.literal("ui/initialize"),params:l.object({appInfo:to.describe("App identification (name and version)."),appCapabilities:W0.describe("Features and capabilities this app provides."),protocolVersion:l.string().describe("Protocol version this app supports.")})}),OU=l.object({protocolVersion:l.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:to.describe("Host application identification and version."),hostCapabilities:B0.describe("Features and capabilities provided by the host."),hostContext:zx.describe("Rich context about the host environment.")}).passthrough(),Qs=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,n){this.eventTarget=e,this.eventSource=n,this.messageListener=a=>{if(n&&a.source!==this.eventSource){console.debug("Ignoring message from unknown source",a);return}let r=ux.safeParse(a.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):a.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,a):(console.error("Failed to parse message",r.error.message,a),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,n){e.method!==N0&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion};var tE=[Ax],Xs=class extends Ef{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,n)=>{this._baseReplaceRequestHandler(e,(a,r)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${a.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),n(a,r)))};eventSchemas={sizechange:q0,sandboxready:Z0,initialized:G0,requestteardown:J0,loggingmessage:vf};constructor(e,n,a,r){super(r),this._client=e,this._hostInfo=n,this._capabilities=a,this.addEventListener("initialized",()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(eE,o=>this._oninitialize(o)),this.setRequestHandler(Ur,(o,i)=>(this.onping?.(o.params,i),{})),this.replaceRequestHandler(Ex,o=>({mode:this._hostContext.displayMode??"inline"}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(Q0,async(n,a)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(n.params,a)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(L0,async(n,a)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(n.params,a)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(Y0,async(n,a)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(n.params,a)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(Ex,async(n,a)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(n.params,a)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(X0,async(n,a)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(n.params,a)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Hs,async(n,a)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(n.params,a)})}set oncreatesamplingmessage(e){this.setRequestHandler(yf,async(n,a)=>e(n.params,a))}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(ef,async(n,a)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(n.params,a)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(tf,async(n,a)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(n.params,a)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(af,async(n,a)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(n.params,a)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(sf,async(n,a)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(n.params,a)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}getCapabilities(){return this._capabilities}async _oninitialize(e){let n=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values."),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:tE.includes(n)?n:Ax,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let n={},a=!1;for(let r of Object.keys(e)){let o=this._hostContext[r],i=e[r];rE(o,i)||(n[r]=i,a=!0)}a&&(this._hostContext=e,this.sendHostContextChange(n))}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,n){return this.request({method:"ui/resource-teardown",params:e},H0,n)}sendResourceTeardown=this.teardownResource;callTool(e,n){return this.request({method:"tools/call",params:e},gr,n)}listTools(e,n){return this.request({method:"tools/list",params:e},hf,n)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let n=this._client.getServerCapabilities();if(!n)throw Error("Client server capabilities not available");n.tools&&(this.oncalltool=async(a,r)=>this._client.request({method:"tools/call",params:a},gr,{signal:r.signal}),n.tools.listChanged&&this._client.setNotificationHandler(gf,a=>this.sendToolListChanged(a.params))),n.resources&&(this.onlistresources=async(a,r)=>this._client.request({method:"resources/list",params:a},qs,{signal:r.signal}),this.onlistresourcetemplates=async(a,r)=>this._client.request({method:"resources/templates/list",params:a},rf,{signal:r.signal}),this.onreadresource=async(a,r)=>this._client.request({method:"resources/read",params:a},Fs,{signal:r.signal}),n.resources.listChanged&&this._client.setNotificationHandler(of,a=>this.sendResourceListChanged(a.params))),n.prompts&&(this.onlistprompts=async(a,r)=>this._client.request({method:"prompts/list",params:a},lf,{signal:r.signal}),n.prompts.listChanged&&this._client.setNotificationHandler(ff,a=>this.sendPromptListChanged(a.params)))}return super.connect(e)}};function rE(t,e){return JSON.stringify(t)===JSON.stringify(e)}var nE=`<!doctype html><meta charset="utf-8"><style>html,body,iframe{border:0;margin:0;width:100%;height:100%;overflow:hidden}body{background:transparent}</style><script>
104
+ let inner;
105
+ const ready={jsonrpc:'2.0',method:'ui/notifications/sandbox-proxy-ready',params:{}};
106
+ // Re-announce until the host acknowledges with the resource: when this document is hosted
107
+ // cross-origin, the first announcement can arrive before the host's load handler is listening.
108
+ const announce=setInterval(()=>parent.postMessage(ready,'*'),120);
109
+ setTimeout(()=>clearInterval(announce),15000);
110
+ addEventListener('message',(event)=>{
111
+ if(event.source===parent){
112
+ const message=event.data;
113
+ if(message?.method==='ui/notifications/sandbox-resource-ready'){
114
+ clearInterval(announce);
115
+ if(inner)return;
116
+ inner=document.createElement('iframe');
117
+ inner.setAttribute('sandbox',message.params?.sandbox||'allow-scripts');
118
+ inner.setAttribute('referrerpolicy','no-referrer');
119
+ inner.srcdoc=String(message.params?.html||'');
120
+ document.body.replaceChildren(inner);
121
+ return;
122
+ }
123
+ inner?.contentWindow?.postMessage(message,'*');
124
+ } else if(inner && event.source===inner.contentWindow) {
125
+ parent.postMessage(event.data,'*');
126
+ }
127
+ });
128
+ parent.postMessage(ready,'*');
129
+ <\/script>`;function aE(t,e,n){try{let a=new URL(t,n);return a.protocol!=="https:"?void 0:e.some(o=>{try{return new URL(o).origin===a.origin}catch{return!1}})?a.href:void 0}catch{return}}function Rx(t){return{theme:t,displayMode:"inline",availableDisplayModes:["inline","fullscreen"],platform:"web"}}var oE=1e4,iE=1e3,Rf=new WeakMap;function sE(t){if(t)try{let e=new URL(t);return e.protocol==="https:"||e.protocol==="http:"?e.href:void 0}catch{return}}function Cx(t,e,n={}){if(!t.html)return;let a=document.createElement("section");if(a.className="noodle-app-card",t.title){let U=document.createElement("div");U.className="noodle-app-title",U.textContent=t.title,a.append(U)}let r=document.createElement("iframe");r.className="noodle-app-frame",r.title=t.title??t.tool,r.setAttribute("sandbox","allow-scripts"),r.setAttribute("referrerpolicy","no-referrer");let o=sE(n.sandboxUrl);o?r.src=o:r.srcdoc=nE,a.append(r);let i,s,c=!1,u=!1,d=Rx(e.theme),m,h=setTimeout(()=>{if(u||!r.isConnected)return;let U=document.createElement("div");U.className="noodle-app-fallback",U.textContent="This app view could not be displayed.",r.replaceWith(U),n.onRenderFailure?.({code:"view_render_timeout",retryable:!1})},oE);r.addEventListener("load",()=>{if(c)return;let U=r.contentWindow;if(!U)return;let N=new Xs(null,{name:"Noodle Seed Embedded Assistant",version:"1.0.0"},{openLinks:{},serverTools:{},serverResources:{},updateModelContext:{text:{},structuredContent:{}},message:{text:{}}},{hostContext:d});i=N,N.onsandboxready=()=>{if(c)return;let F=n.getDetail?.()??t;N.sendSandboxResourceReady({html:F.html,sandbox:"allow-scripts",...F.resourceMeta??{}})},N.onsizechange=({height:F})=>{c||typeof F=="number"&&Number.isFinite(F)&&(r.style.height=`${Math.min(1200,Math.max(120,Math.ceil(F)))}px`)},N.onmessage=async({content:F})=>{if(c)return{};let g=F.flatMap(P=>P.type==="text"&&typeof P.text=="string"?[P.text]:[]).join(`
130
+ `).trim();return g&&await e.sendMessage(g),{}},N.onupdatemodelcontext=async F=>c?{}:(e.updateModelContext(F),{}),N.onopenlink=async({url:F})=>{if(c)return{isError:!0};let g=n.getDetail?.()??t,P=aE(F,g.allowedOpenDomains??[],globalThis.location?.href??"https://invalid.example");return P?(globalThis.open?.(P,"_blank","noopener,noreferrer"),{}):{isError:!0}},N.onrequestdisplaymode=async({mode:F})=>{let g=F==="fullscreen"?"fullscreen":"inline";return c?{mode:g}:(a.toggleAttribute("data-fullscreen",g==="fullscreen"),{mode:g})},N.oncalltool=async F=>c?{content:[{type:"text",text:"App view is closing."}],isError:!0}:await e.client.requestApp("tools/call",F),N.onlistresources=async F=>c?{resources:[]}:await e.client.requestApp("resources/list",F??{}),N.onreadresource=async F=>c?{contents:[]}:await e.client.requestApp("resources/read",F),N.oninitialized=()=>{if(c)return;u=!0,clearTimeout(h),N.setHostContext(d);let F=n.getDetail?.()??t;N.sendToolInput({arguments:F.arguments??{}}),N.sendToolResult({content:[{type:"text",text:JSON.stringify(F.result)}],...typeof F.result=="object"&&F.result!==null&&!Array.isArray(F.result)?{structuredContent:F.result}:{}})};let de=new Qs(U,U);s=de,N.connect(de).catch(()=>{S()})},{once:!0});let b=U=>{c||(d=Rx(U),u&&i?.setHostContext(d))},S=()=>m||(c=!0,clearTimeout(h),m=(async()=>{try{u&&await i?.teardownResource({},{timeout:iE})}catch{}await s?.close().catch(()=>{}),a.remove(),Rf.delete(a)})(),m);return Rf.set(a,{destroy:S,updateTheme:b}),a}function Px(t,e){Rf.get(t)?.updateTheme(e)}var Mx={fontFamily:"inherit",monoFontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",baseFontSize:15,messageFontSize:15,lineHeight:1.5,panelRadius:24,cardRadius:16,inputRadius:999,buttonRadius:999,launcherRadius:999,spacing:8,backdropBlur:18,motionScale:1},jt={brand:{name:"Assistant",logo:{},avatar:{},mark:{}},theme:{defaultMode:"auto",light:{...Mx,page:"#F8F8F8",panel:"#F8F8F8",elevated:"#F4F4F5",input:"#FFFFFF",hover:"#F4F4F5",selected:"#FFF1E7",text:"#09090B",mutedText:"#71717A",accent:"#C2410C",accentText:"#FFFFFF",link:"#9A3412",divider:"#E4E4E7",focus:"#C2410C",success:"#16835D",warning:"#A45B00",danger:"#C92A45",overlay:"#18181B66",code:"#F1F1F3",widgetFrame:"#E4E4E7",shadow:"0 4px 16px rgba(0, 0, 0, 0.06), 0 24px 70px rgba(0, 0, 0, 0.10)"},dark:{...Mx,page:"#0C0A09",panel:"#0C0A09",elevated:"#27272A",input:"#1C1917",hover:"#27272A",selected:"#431B0B",text:"#FAFAFA",mutedText:"#A1A1AA",accent:"#FB923C",accentText:"#1C0A02",link:"#FDBA74",divider:"#292524",focus:"#FB923C",success:"#58C69A",warning:"#F2B45F",danger:"#FF8094",overlay:"#00000099",code:"#26262C",widgetFrame:"#34343B",shadow:"0 8px 32px rgba(0, 0, 0, 0.48)"}},layout:{mode:"floating",position:"bottom-right",panelWidth:520,panelMinHeight:540,panelMaxHeight:820,edgeOffset:20,zIndex:2147483e3,density:"comfortable",mobileFullscreen:!0},behavior:{startOpen:!1,closeOnEscape:!0,closeOnOutsideClick:!1,showLauncher:!0,showHeader:!0,showAvatars:!0,showTimestamps:!1},labels:{welcomeHeading:"How can I help?",welcomeMessage:"",composerPlaceholder:"Ask a question\u2026",thinking:"Thinking",send:"Send",stop:"Stop",close:"Close assistant",open:"Open assistant",confirm:"Confirm",decline:"Don't proceed",cancel:"Cancel",confirmationHeading:"Review and confirm",additionalDetails:"Additional details",redacted:"Hidden for security",completed:"Completed",stopped:"Stopped",copy:"Copy",newMessages:"New messages",reconnect:"Reconnect",retry:"Try again",unavailable:"The assistant is temporarily unavailable.",sessionExpired:"Your assistant session expired. Reopen it to continue.",sessionIdle:"Assistant session idle",sessionLoading:"Assistant session loading",sessionReady:"Assistant session ready",sessionError:"Assistant session unavailable"},presentation:{panel:{surface:"glass",elevation:"soft",border:"subtle"},launcher:{icon:"brand-mark",size:"md",status:"none",effect:"none"},header:{mark:"none"},composer:{leadingIcon:"none",sendIcon:"arrow-up",shape:"pill"},messages:{userStyle:"bubble",assistantStyle:"plain"}},suggestedPrompts:[],locale:"en",direction:"auto"};function Pf(t={}){let e=t.branding,n=t.assistant;return{brand:{...jt.brand,...e?.name?{name:e.name}:{},logo:Cf(e?.logo),avatar:Cf(e?.avatar),mark:Cf(e?.mark)},theme:{defaultMode:e?.colorScheme??jt.theme.defaultMode,light:Ox("light",e),dark:Ox("dark",e)},layout:{...jt.layout,...e?.density?{density:e.density}:{},...n?.layout,...n?.layout?.edgeOffset===void 0?{}:{edgeOffset:jx(n.layout.edgeOffset,0,96)}},behavior:{...jt.behavior,...n?.behavior},labels:{...jt.labels,...n?.labels},presentation:lE(n?.presentation),suggestedPrompts:n?.suggestedPrompts??jt.suggestedPrompts,...n?.privacyUrl?{privacyUrl:n.privacyUrl}:{},...n?.termsUrl?{termsUrl:n.termsUrl}:{},locale:n?.locale??jt.locale,direction:n?.direction??jt.direction}}function lE(t){let e=jt.presentation,n=t?.panel?.radius===void 0?e.panel.radius:jx(t.panel.radius,0,64);return{panel:{...e.panel,...t?.panel,...n===void 0?{}:{radius:n}},launcher:{...e.launcher,...t?.launcher},header:{mark:t?.header?.mark??e.header.mark,...t?.header?.badge?{badge:{text:t.header.badge.text,tone:t.header.badge.tone??"neutral",indicator:t.header.badge.indicator??!1}}:{}},composer:{...e.composer,...t?.composer},messages:{...e.messages,...t?.messages}}}function jx(t,e,n){return Math.min(n,Math.max(e,Number.isFinite(t)?Math.round(t):e))}function Cf(t){return t?{light:t.uri,dark:t.darkUri??t.uri}:{}}function Ox(t,e){let n=jt.theme[t],a=t==="light"?e?.surface:e?.surfaceDark,r=e?.theme?.[t],o=r?.accent??e?.accent,i=o&&!r?.accentText?cE(o):void 0,s=e?.radius?dE(e.radius):void 0;return{...n,...e?.accent?{accent:e.accent}:{},...a?{page:a,panel:a}:{},...uE(r),...i?{accentText:i}:{},...s===void 0?{}:{panelRadius:s,cardRadius:s,inputRadius:Math.max(0,s-2),buttonRadius:Math.max(0,s-2)},...e?.typography==="serif"?{fontFamily:"ui-serif, Georgia, serif"}:e?.typography==="mono"?{fontFamily:n.monoFontFamily}:{}}}function cE(t){let e="#09090B",n="#FFFFFF";return Nx(t,e)>=Nx(t,n)?e:n}function Nx(t,e){let n=Math.max(el(t),el(e)),a=Math.min(el(t),el(e));return(n+.05)/(a+.05)}function el(t){let e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!e)return 0;let n=e.slice(1).map(a=>{let r=Number.parseInt(a,16)/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4});return .2126*(n[0]??0)+.7152*(n[1]??0)+.0722*(n[2]??0)}function uE(t){return t?{...t.surface?{page:t.surface,panel:t.surface}:{},...t.surfaceRaised?{elevated:t.surfaceRaised}:{},...t.surfaceMuted?{input:t.surfaceMuted,hover:t.surfaceMuted,selected:t.surfaceMuted}:{},...t.text?{text:t.text}:{},...t.textMuted?{mutedText:t.textMuted}:{},...t.accent?{accent:t.accent}:{},...t.accentText?{accentText:t.accentText}:{},...t.link?{link:t.link}:{},...t.border?{divider:t.border,widgetFrame:t.border}:{},...t.focus?{focus:t.focus}:{},...t.success?{success:t.success}:{},...t.warning?{warning:t.warning}:{},...t.danger?{danger:t.danger}:{},...t.code?{code:t.code}:{}}:{}}function dE(t){return t==="none"?0:t==="sm"?8:t==="lg"?18:14}function Dx(){let t;try{t=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}let e=globalThis.navigator?.language;return{...e?{locale:e}:{},...t?{timeZone:t}:{}}}var m_="vercel.ai.error",pE=Symbol.for(m_),Ux,Lx,re=class f_ extends(Lx=Error,Ux=pE,Lx){constructor({name:e,message:n,cause:a}){super(n),this[Ux]=!0,this.name=e,this.cause=a}static isInstance(e){return f_.hasMarker(e,m_)}static hasMarker(e,n){let a=Symbol.for(n);return e!=null&&typeof e=="object"&&a in e&&typeof e[a]=="boolean"&&e[a]===!0}},h_="AI_APICallError",g_=`vercel.ai.error.${h_}`,mE=Symbol.for(g_),Zx,qx,HU=class extends(qx=re,Zx=mE,qx){constructor({message:t,url:e,requestBodyValues:n,statusCode:a,responseHeaders:r,responseBody:o,cause:i,isRetryable:s=a!=null&&(a===408||a===409||a===429||a>=500),data:c}){super({name:h_,message:t,cause:i}),this[Zx]=!0,this.url=e,this.requestBodyValues=n,this.statusCode=a,this.responseHeaders=r,this.responseBody=o,this.isRetryable=s,this.data=c}static isInstance(t){return re.hasMarker(t,g_)}},v_="AI_EmptyResponseBodyError",y_=`vercel.ai.error.${v_}`,fE=Symbol.for(y_),Fx,Vx,JU=class extends(Vx=re,Fx=fE,Vx){constructor({message:t="Empty response body"}={}){super({name:v_,message:t}),this[Fx]=!0}static isInstance(t){return re.hasMarker(t,y_)}};function b_(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var x_="AI_InvalidArgumentError",__=`vercel.ai.error.${x_}`,hE=Symbol.for(__),Hx,Jx,w_=class extends(Jx=re,Hx=hE,Jx){constructor({message:t,cause:e,argument:n}){super({name:x_,message:t,cause:e}),this[Hx]=!0,this.argument=n}static isInstance(t){return re.hasMarker(t,__)}},k_="AI_InvalidPromptError",S_=`vercel.ai.error.${k_}`,gE=Symbol.for(S_),Bx,Wx,BU=class extends(Wx=re,Bx=gE,Wx){constructor({prompt:t,message:e,cause:n}){super({name:k_,message:`Invalid prompt: ${e}`,cause:n}),this[Bx]=!0,this.prompt=t}static isInstance(t){return re.hasMarker(t,S_)}},T_="AI_InvalidResponseDataError",$_=`vercel.ai.error.${T_}`,vE=Symbol.for($_),Gx,Kx,WU=class extends(Kx=re,Gx=vE,Kx){constructor({data:t,message:e=`Invalid response data: ${JSON.stringify(t)}.`}){super({name:T_,message:e}),this[Gx]=!0,this.data=t}static isInstance(t){return re.hasMarker(t,$_)}},I_="AI_JSONParseError",E_=`vercel.ai.error.${I_}`,yE=Symbol.for(E_),Yx,Qx,Of=class extends(Qx=re,Yx=yE,Qx){constructor({text:t,cause:e}){super({name:I_,message:`JSON parsing failed: Text: ${t}.
131
+ Error message: ${b_(e)}`,cause:e}),this[Yx]=!0,this.text=t}static isInstance(t){return re.hasMarker(t,E_)}},A_="AI_LoadAPIKeyError",z_=`vercel.ai.error.${A_}`,bE=Symbol.for(z_),Xx,e_,GU=class extends(e_=re,Xx=bE,e_){constructor({message:t}){super({name:A_,message:t}),this[Xx]=!0}static isInstance(t){return re.hasMarker(t,z_)}},R_="AI_LoadSettingError",C_=`vercel.ai.error.${R_}`,xE=Symbol.for(C_),t_,r_,KU=class extends(r_=re,t_=xE,r_){constructor({message:t}){super({name:R_,message:t}),this[t_]=!0}static isInstance(t){return re.hasMarker(t,C_)}},P_="AI_NoContentGeneratedError",M_=`vercel.ai.error.${P_}`,_E=Symbol.for(M_),n_,a_,YU=class extends(a_=re,n_=_E,a_){constructor({message:t="No content generated."}={}){super({name:P_,message:t}),this[n_]=!0}static isInstance(t){return re.hasMarker(t,M_)}},O_="AI_NoSuchModelError",N_=`vercel.ai.error.${O_}`,wE=Symbol.for(N_),o_,i_,QU=class extends(i_=re,o_=wE,i_){constructor({errorName:t=O_,modelId:e,modelType:n,message:a=`No such ${n}: ${e}`}){super({name:t,message:a}),this[o_]=!0,this.modelId=e,this.modelType=n}static isInstance(t){return re.hasMarker(t,N_)}},j_="AI_TooManyEmbeddingValuesForCallError",D_=`vercel.ai.error.${j_}`,kE=Symbol.for(D_),s_,l_,XU=class extends(l_=re,s_=kE,l_){constructor(t){super({name:j_,message:`Too many values for a single embedding call. The ${t.provider} model "${t.modelId}" can only embed up to ${t.maxEmbeddingsPerCall} values per call, but ${t.values.length} values were provided.`}),this[s_]=!0,this.provider=t.provider,this.modelId=t.modelId,this.maxEmbeddingsPerCall=t.maxEmbeddingsPerCall,this.values=t.values}static isInstance(t){return re.hasMarker(t,D_)}},U_="AI_TypeValidationError",L_=`vercel.ai.error.${U_}`,SE=Symbol.for(L_),c_,u_,Dt=class Mf extends(u_=re,c_=SE,u_){constructor({value:e,cause:n,context:a}){let r="Type validation failed";if(a?.field&&(r+=` for ${a.field}`),a?.entityName||a?.entityId){r+=" (";let o=[];a.entityName&&o.push(a.entityName),a.entityId&&o.push(`id: "${a.entityId}"`),r+=o.join(", "),r+=")"}super({name:U_,message:`${r}: Value: ${JSON.stringify(e)}.
132
+ Error message: ${b_(n)}`,cause:n}),this[c_]=!0,this.value=e,this.context=a}static isInstance(e){return re.hasMarker(e,L_)}static wrap({value:e,cause:n,context:a}){var r,o,i;return Mf.isInstance(n)&&n.value===e&&((r=n.context)==null?void 0:r.field)===a?.field&&((o=n.context)==null?void 0:o.entityName)===a?.entityName&&((i=n.context)==null?void 0:i.entityId)===a?.entityId?n:new Mf({value:e,cause:n,context:a})}},Z_="AI_UnsupportedFunctionalityError",q_=`vercel.ai.error.${Z_}`,TE=Symbol.for(q_),d_,p_,e6=class extends(p_=re,d_=TE,p_){constructor({functionality:t,message:e=`'${t}' functionality not supported.`}){super({name:Z_,message:e}),this[d_]=!0,this.functionality=t}static isInstance(t){return re.hasMarker(t,q_)}};kt();var{btoa:f6,atob:h6}=globalThis;var W_="AI_DownloadError",G_=`vercel.ai.error.${W_}`,$E=Symbol.for(G_),F_,V_,yt=class extends(V_=re,F_=$E,V_){constructor({url:t,statusCode:e,statusText:n,cause:a,message:r=a==null?`Failed to download ${t}: ${e} ${n}`:`Failed to download ${t}: ${a}`}){super({name:W_,message:r,cause:a}),this[F_]=!0,this.url=t,this.statusCode=e,this.statusText=n}static isInstance(t){return re.hasMarker(t,G_)}},Zf=2*1024*1024*1024;async function K_({response:t,url:e,maxBytes:n=Zf}){let a=t.headers.get("content-length");if(a!=null){let d=parseInt(a,10);if(!isNaN(d)&&d>n)throw new yt({url:e,message:`Download of ${e} exceeded maximum size of ${n} bytes (Content-Length: ${d}).`})}let r=t.body;if(r==null)return new Uint8Array(0);let o=r.getReader(),i=[],s=0;try{for(;;){let{done:d,value:m}=await o.read();if(d)break;if(s+=m.length,s>n)throw new yt({url:e,message:`Download of ${e} exceeded maximum size of ${n} bytes.`});i.push(m)}}finally{try{await o.cancel()}finally{o.releaseLock()}}let c=new Uint8Array(s),u=0;for(let d of i)c.set(d,u),u+=d.length;return c}function qf(t){let e;try{e=new URL(t)}catch{throw new yt({url:t,message:`Invalid URL: ${t}`})}if(e.protocol==="data:")return;if(e.protocol!=="http:"&&e.protocol!=="https:")throw new yt({url:t,message:`URL scheme must be http, https, or data, got ${e.protocol}`});let n=e.hostname;if(!n)throw new yt({url:t,message:"URL must have a hostname"});if(n==="localhost"||n.endsWith(".local")||n.endsWith(".localhost"))throw new yt({url:t,message:`URL with hostname ${n} is not allowed`});if(n.startsWith("[")&&n.endsWith("]")){let a=n.slice(1,-1);if(IE(a))throw new yt({url:t,message:`URL with IPv6 address ${n} is not allowed`});return}if(Y_(n)){if(Df(n))throw new yt({url:t,message:`URL with IP address ${n} is not allowed`});return}}function Y_(t){let e=t.split(".");return e.length!==4?!1:e.every(n=>{let a=Number(n);return Number.isInteger(a)&&a>=0&&a<=255&&String(a)===n})}function Df(t){let e=t.split(".").map(Number),[n,a]=e;return n===0||n===10||n===127||n===169&&a===254||n===172&&a>=16&&a<=31||n===192&&a===168}function IE(t){let e=t.toLowerCase();if(e==="::1"||e==="::")return!0;if(e.startsWith("::ffff:")){let n=e.slice(7);if(Y_(n))return Df(n);let a=n.split(":");if(a.length===2){let r=parseInt(a[0],16),o=parseInt(a[1],16);if(!isNaN(r)&&!isNaN(o)){let i=r>>8&255,s=r&255,c=o>>8&255,u=o&255;return Df(`${i}.${s}.${c}.${u}`)}}}return!!(e.startsWith("fc")||e.startsWith("fd")||e.startsWith("fe80"))}var Qt=({prefix:t,size:e=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{let r=()=>{let o=n.length,i=new Array(e);for(let s=0;s<e;s++)i[s]=n[Math.random()*o|0];return i.join("")};if(t==null)return r;if(n.includes(a))throw new w_({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${n}".`});return()=>`${t}${a}${r()}`},y6=Qt();function Q_(t=globalThis){var e,n,a;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(a=(n=t.process)==null?void 0:n.versions)!=null&&a.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function EE(t){if(t==null)return{};let e={};if(t instanceof Headers)t.forEach((n,a)=>{e[a.toLowerCase()]=n});else{Array.isArray(t)||(t=Object.entries(t));for(let[n,a]of t)a!=null&&(e[n.toLowerCase()]=a)}return e}function tl(t,...e){let n=new Headers(EE(t)),a=n.get("user-agent")||"";return n.set("user-agent",[a,...e].filter(Boolean).join(" ")),Object.fromEntries(n.entries())}var AE=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,zE=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function H_(t){let e=JSON.parse(t);return e===null||typeof e!="object"||AE.test(t)===!1&&zE.test(t)===!1?e:RE(e)}function RE(t){let e=[t];for(;e.length;){let n=e;e=[];for(let a of n){if(Object.prototype.hasOwnProperty.call(a,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(a,"constructor")&&a.constructor!==null&&typeof a.constructor=="object"&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let r in a){let o=a[r];o&&typeof o=="object"&&e.push(o)}}}return t}function CE(t){let{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return H_(t)}try{return H_(t)}finally{Error.stackTraceLimit=e}}function Ff(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;let{properties:n}=t;if(n!=null)for(let a of Object.keys(n))n[a]=qr(n[a])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(qr):qr(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(qr)),t.allOf!=null&&(t.allOf=t.allOf.map(qr)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(qr));let{definitions:e}=t;if(e!=null)for(let n of Object.keys(e))e[n]=qr(e[n]);return t}function qr(t){return typeof t=="boolean"?t:Ff(t)}var PE=Symbol("Let zodToJsonSchema decide on which parser to use"),J_={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},ME=t=>typeof t=="string"?{...J_,name:t}:{...J_,...t};function pt(){return{}}function OE(t,e){var n,a,r;let o={type:"array"};return(n=t.type)!=null&&n._def&&((r=(a=t.type)==null?void 0:a._def)==null?void 0:r.typeName)!==$.ZodAny&&(o.items=me(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function NE(t){let e={type:"integer",format:"int64"};if(!t.checks)return e;for(let n of t.checks)switch(n.kind){case"min":n.inclusive?e.minimum=n.value:e.exclusiveMinimum=n.value;break;case"max":n.inclusive?e.maximum=n.value:e.exclusiveMaximum=n.value;break;case"multipleOf":e.multipleOf=n.value;break}return e}function jE(){return{type:"boolean"}}function X_(t,e){return me(t.type._def,e)}var DE=(t,e)=>me(t.innerType._def,e);function ew(t,e,n){let a=n??e.dateStrategy;if(Array.isArray(a))return{anyOf:a.map((r,o)=>ew(t,e,r))};switch(a){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return UE(t)}}var UE=t=>{let e={type:"integer",format:"unix-time"};for(let n of t.checks)switch(n.kind){case"min":e.minimum=n.value;break;case"max":e.maximum=n.value;break}return e};function LE(t,e){return{...me(t.innerType._def,e),default:t.defaultValue()}}function ZE(t,e){return e.effectStrategy==="input"?me(t.schema._def,e):pt()}function qE(t){return{type:"string",enum:Array.from(t.values)}}var FE=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function VE(t,e){let n=[me(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),me(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),a=[];return n.forEach(r=>{if(FE(r))a.push(...r.allOf);else{let o=r;if("additionalProperties"in r&&r.additionalProperties===!1){let{additionalProperties:i,...s}=r;o=s}a.push(o)}}),a.length?{allOf:a}:void 0}function HE(t){let e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var Nf=void 0,$t={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Nf===void 0&&(Nf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Nf),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function tw(t,e){let n={type:"string"};if(t.checks)for(let a of t.checks)switch(a.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,a.value):a.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,a.value):a.value;break;case"email":switch(e.emailStrategy){case"format:email":It(n,"email",a.message,e);break;case"format:idn-email":It(n,"idn-email",a.message,e);break;case"pattern:zod":Xe(n,$t.email,a.message,e);break}break;case"url":It(n,"uri",a.message,e);break;case"uuid":It(n,"uuid",a.message,e);break;case"regex":Xe(n,a.regex,a.message,e);break;case"cuid":Xe(n,$t.cuid,a.message,e);break;case"cuid2":Xe(n,$t.cuid2,a.message,e);break;case"startsWith":Xe(n,RegExp(`^${jf(a.value,e)}`),a.message,e);break;case"endsWith":Xe(n,RegExp(`${jf(a.value,e)}$`),a.message,e);break;case"datetime":It(n,"date-time",a.message,e);break;case"date":It(n,"date",a.message,e);break;case"time":It(n,"time",a.message,e);break;case"duration":It(n,"duration",a.message,e);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,a.value):a.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,a.value):a.value;break;case"includes":{Xe(n,RegExp(jf(a.value,e)),a.message,e);break}case"ip":{a.version!=="v6"&&It(n,"ipv4",a.message,e),a.version!=="v4"&&It(n,"ipv6",a.message,e);break}case"base64url":Xe(n,$t.base64url,a.message,e);break;case"jwt":Xe(n,$t.jwt,a.message,e);break;case"cidr":{a.version!=="v6"&&Xe(n,$t.ipv4Cidr,a.message,e),a.version!=="v4"&&Xe(n,$t.ipv6Cidr,a.message,e);break}case"emoji":Xe(n,$t.emoji(),a.message,e);break;case"ulid":{Xe(n,$t.ulid,a.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{It(n,"binary",a.message,e);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{Xe(n,$t.base64,a.message,e);break}}break}case"nanoid":Xe(n,$t.nanoid,a.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function jf(t,e){return e.patternStrategy==="escape"?BE(t):t}var JE=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function BE(t){let e="";for(let n=0;n<t.length;n++)JE.has(t[n])||(e+="\\"),e+=t[n];return e}function It(t,e,n,a){var r;t.format||(r=t.anyOf)!=null&&r.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...n&&a.errorMessages&&{errorMessage:{format:n}}})):t.format=e}function Xe(t,e,n,a){var r;t.pattern||(r=t.allOf)!=null&&r.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:B_(e,a),...n&&a.errorMessages&&{errorMessage:{pattern:n}}})):t.pattern=B_(e,a)}function B_(t,e){var n;if(!e.applyRegexFlags||!t.flags)return t.source;let a={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=a.i?t.source.toLowerCase():t.source,o="",i=!1,s=!1,c=!1;for(let u=0;u<r.length;u++){if(i){o+=r[u],i=!1;continue}if(a.i){if(s){if(r[u].match(/[a-z]/)){c?(o+=r[u],o+=`${r[u-2]}-${r[u]}`.toUpperCase(),c=!1):r[u+1]==="-"&&((n=r[u+2])!=null&&n.match(/[a-z]/))?(o+=r[u],c=!0):o+=`${r[u]}${r[u].toUpperCase()}`;continue}}else if(r[u].match(/[a-z]/)){o+=`[${r[u]}${r[u].toUpperCase()}]`;continue}}if(a.m){if(r[u]==="^"){o+=`(^|(?<=[\r
133
+ ]))`;continue}else if(r[u]==="$"){o+=`($|(?=[\r
134
+ ]))`;continue}}if(a.s&&r[u]==="."){o+=s?`${r[u]}\r
135
+ `:`[${r[u]}\r
136
+ ]`;continue}o+=r[u],r[u]==="\\"?i=!0:s&&r[u]==="]"?s=!1:!s&&r[u]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function rw(t,e){var n,a,r,o,i,s;let c={type:"object",additionalProperties:(n=me(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]}))!=null?n:e.allowedAdditionalProperties};if(((a=t.keyType)==null?void 0:a._def.typeName)===$.ZodString&&((r=t.keyType._def.checks)!=null&&r.length)){let{type:u,...d}=tw(t.keyType._def,e);return{...c,propertyNames:d}}else{if(((o=t.keyType)==null?void 0:o._def.typeName)===$.ZodEnum)return{...c,propertyNames:{enum:t.keyType._def.values}};if(((i=t.keyType)==null?void 0:i._def.typeName)===$.ZodBranded&&t.keyType._def.type._def.typeName===$.ZodString&&((s=t.keyType._def.type._def.checks)!=null&&s.length)){let{type:u,...d}=X_(t.keyType._def,e);return{...c,propertyNames:d}}}return c}function WE(t,e){if(e.mapStrategy==="record")return rw(t,e);let n=me(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||pt(),a=me(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||pt();return{type:"array",maxItems:125,items:{type:"array",items:[n,a],minItems:2,maxItems:2}}}function GE(t){let e=t.values,a=Object.keys(t.values).filter(o=>typeof e[e[o]]!="number").map(o=>e[o]),r=Array.from(new Set(a.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:a}}function KE(){return{not:pt()}}function YE(){return{type:"null"}}var Uf={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function QE(t,e){let n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(a=>a._def.typeName in Uf&&(!a._def.checks||!a._def.checks.length))){let a=n.reduce((r,o)=>{let i=Uf[o._def.typeName];return i&&!r.includes(i)?[...r,i]:r},[]);return{type:a.length>1?a:a[0]}}else if(n.every(a=>a._def.typeName==="ZodLiteral"&&!a.description)){let a=n.reduce((r,o)=>{let i=typeof o._def.value;switch(i){case"string":case"number":case"boolean":return[...r,i];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(a.length===n.length){let r=a.filter((o,i,s)=>s.indexOf(o)===i);return{type:r.length>1?r:r[0],enum:n.reduce((o,i)=>o.includes(i._def.value)?o:[...o,i._def.value],[])}}}else if(n.every(a=>a._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((a,r)=>[...a,...r._def.values.filter(o=>!a.includes(o))],[])};return XE(t,e)}var XE=(t,e)=>{let n=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((a,r)=>me(a._def,{...e,currentPath:[...e.currentPath,"anyOf",`${r}`]})).filter(a=>!!a&&(!e.strictUnions||typeof a=="object"&&Object.keys(a).length>0));return n.length?{anyOf:n}:void 0};function eA(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return{type:[Uf[t.innerType._def.typeName],"null"]};let n=me(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function tA(t){let e={type:"number"};if(!t.checks)return e;for(let n of t.checks)switch(n.kind){case"int":e.type="integer";break;case"min":n.inclusive?e.minimum=n.value:e.exclusiveMinimum=n.value;break;case"max":n.inclusive?e.maximum=n.value:e.exclusiveMaximum=n.value;break;case"multipleOf":e.multipleOf=n.value;break}return e}function rA(t,e){let n={type:"object",properties:{}},a=[],r=t.shape();for(let i in r){let s=r[i];if(s===void 0||s._def===void 0)continue;let c=aA(s),u=me(s._def,{...e,currentPath:[...e.currentPath,"properties",i],propertyPath:[...e.currentPath,"properties",i]});u!==void 0&&(n.properties[i]=u,c||a.push(i))}a.length&&(n.required=a);let o=nA(t,e);return o!==void 0&&(n.additionalProperties=o),n}function nA(t,e){if(t.catchall._def.typeName!=="ZodNever")return me(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function aA(t){try{return t.isOptional()}catch{return!0}}var oA=(t,e)=>{var n;if(e.currentPath.toString()===((n=e.propertyPath)==null?void 0:n.toString()))return me(t.innerType._def,e);let a=me(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return a?{anyOf:[{not:pt()},a]}:pt()},iA=(t,e)=>{if(e.pipeStrategy==="input")return me(t.in._def,e);if(e.pipeStrategy==="output")return me(t.out._def,e);let n=me(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),a=me(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,a].filter(r=>r!==void 0)}};function sA(t,e){return me(t.type._def,e)}function lA(t,e){let a={type:"array",uniqueItems:!0,items:me(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&(a.minItems=t.minSize.value),t.maxSize&&(a.maxItems=t.maxSize.value),a}function cA(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((n,a)=>me(n._def,{...e,currentPath:[...e.currentPath,"items",`${a}`]})).reduce((n,a)=>a===void 0?n:[...n,a],[]),additionalItems:me(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((n,a)=>me(n._def,{...e,currentPath:[...e.currentPath,"items",`${a}`]})).reduce((n,a)=>a===void 0?n:[...n,a],[])}}function uA(){return{not:pt()}}function dA(){return pt()}var pA=(t,e)=>me(t.innerType._def,e),mA=(t,e,n)=>{switch(e){case $.ZodString:return tw(t,n);case $.ZodNumber:return tA(t);case $.ZodObject:return rA(t,n);case $.ZodBigInt:return NE(t);case $.ZodBoolean:return jE();case $.ZodDate:return ew(t,n);case $.ZodUndefined:return uA();case $.ZodNull:return YE();case $.ZodArray:return OE(t,n);case $.ZodUnion:case $.ZodDiscriminatedUnion:return QE(t,n);case $.ZodIntersection:return VE(t,n);case $.ZodTuple:return cA(t,n);case $.ZodRecord:return rw(t,n);case $.ZodLiteral:return HE(t);case $.ZodEnum:return qE(t);case $.ZodNativeEnum:return GE(t);case $.ZodNullable:return eA(t,n);case $.ZodOptional:return oA(t,n);case $.ZodMap:return WE(t,n);case $.ZodSet:return lA(t,n);case $.ZodLazy:return()=>t.getter()._def;case $.ZodPromise:return sA(t,n);case $.ZodNaN:case $.ZodNever:return KE();case $.ZodEffects:return ZE(t,n);case $.ZodAny:return pt();case $.ZodUnknown:return dA();case $.ZodDefault:return LE(t,n);case $.ZodBranded:return X_(t,n);case $.ZodReadonly:return pA(t,n);case $.ZodCatch:return DE(t,n);case $.ZodPipeline:return iA(t,n);case $.ZodFunction:case $.ZodVoid:case $.ZodSymbol:return;default:return(a=>{})(e)}},fA=(t,e)=>{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];n++);return[(t.length-n).toString(),...e.slice(n)].join("/")};function me(t,e,n=!1){var a;let r=e.seen.get(t);if(e.override){let c=(a=e.override)==null?void 0:a.call(e,t,e,r,n);if(c!==PE)return c}if(r&&!n){let c=hA(r,e);if(c!==void 0)return c}let o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);let i=mA(t,t.typeName,e),s=typeof i=="function"?me(i(),e):i;if(s&&gA(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var hA=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:fA(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((n,a)=>e.currentPath[a]===n)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),pt()):e.$refStrategy==="seen"?pt():void 0}},gA=(t,e,n)=>(t.description&&(n.description=t.description),n),vA=t=>{let e=ME(t),n=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([a,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,a],jsonSchema:void 0}]))}},yA=(t,e)=>{var n;let a=vA(e),r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((u,[d,m])=>{var h;return{...u,[d]:(h=me(m._def,{...a,currentPath:[...a.basePath,a.definitionPath,d]},!0))!=null?h:pt()}},{}):void 0,o=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,i=(n=me(t._def,o===void 0?a:{...a,currentPath:[...a.basePath,a.definitionPath,o]},!1))!=null?n:pt(),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(i.title=s);let c=o===void 0?r?{...i,[a.definitionPath]:r}:i:{$ref:[...a.$refStrategy==="relative"?[]:a.basePath,a.definitionPath,o].join("/"),[a.definitionPath]:{...r,[o]:i}};return c.$schema="http://json-schema.org/draft-07/schema#",c},Lf=Symbol.for("vercel.ai.schema");function rl(t){let e;return()=>(e==null&&(e=t()),e)}function nl(t,{validate:e}={}){return{[Lf]:!0,_type:void 0,get jsonSchema(){return typeof t=="function"&&(t=t()),t},validate:e}}function bA(t){return typeof t=="object"&&t!==null&&Lf in t&&t[Lf]===!0&&"jsonSchema"in t&&"validate"in t}function al(t){return t==null?nl({properties:{},additionalProperties:!1}):bA(t)?t:"~standard"in t?t["~standard"].vendor==="zod"?wo(t):xA(t):t()}function xA(t){return nl(()=>Ff(t["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async e=>{let n=await t["~standard"].validate(e);return"value"in n?{success:!0,value:n.value}:{success:!1,error:new Dt({value:e,cause:n.issues})}}})}function _A(t,e){var n;let a=(n=e?.useReferences)!=null?n:!1;return nl(()=>yA(t,{$refStrategy:a?"root":"none"}),{validate:async r=>{let o=await t.safeParseAsync(r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function wA(t,e){var n;let a=(n=e?.useReferences)!=null?n:!1;return nl(()=>Ff($n(t,{target:"draft-7",io:"input",reused:a?"ref":"inline"})),{validate:async r=>{let o=await Da(t,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function kA(t){return"_zod"in t}function wo(t,e){return kA(t)?wA(t,e):_A(t,e)}async function ol({value:t,schema:e,context:n}){let a=await Xn({value:t,schema:e,context:n});if(!a.success)throw Dt.wrap({value:t,cause:a.error,context:n});return a.value}async function Xn({value:t,schema:e,context:n}){let a=al(e);try{if(a.validate==null)return{success:!0,value:t,rawValue:t};let r=await a.validate(t);return r.success?{success:!0,value:r.value,rawValue:t}:{success:!1,error:Dt.wrap({value:t,cause:r.error,context:n}),rawValue:t}}catch(r){return{success:!1,error:Dt.wrap({value:t,cause:r,context:n}),rawValue:t}}}async function _r({text:t,schema:e}){try{let n=CE(t);return e==null?{success:!0,value:n,rawValue:n}:await Xn({value:n,schema:e})}catch(n){return{success:!1,error:Of.isInstance(n)?n:new Of({text:t,cause:n}),rawValue:void 0}}}async function Vf(t){return typeof t=="function"&&(t=t()),Promise.resolve(t)}kt();kt();kt();kt();kt();kt();kt();var TA=Object.defineProperty,$A=(t,e)=>{for(var n in e)TA(t,n,{get:e[n],enumerable:!0})},IA="AI_InvalidArgumentError",EA=`vercel.ai.error.${IA}`,AA=Symbol.for(EA),zA;zA=AA;var RA="AI_InvalidStreamPartError",CA=`vercel.ai.error.${RA}`,PA=Symbol.for(CA),MA;MA=PA;var OA="AI_InvalidToolApprovalError",NA=`vercel.ai.error.${OA}`,jA=Symbol.for(NA),DA;DA=jA;var UA="AI_InvalidToolInputError",LA=`vercel.ai.error.${UA}`,ZA=Symbol.for(LA),qA;qA=ZA;var FA="AI_ToolCallNotFoundForApprovalError",VA=`vercel.ai.error.${FA}`,HA=Symbol.for(VA),JA;JA=HA;var BA="AI_MissingToolResultsError",WA=`vercel.ai.error.${BA}`,GA=Symbol.for(WA),KA;KA=GA;var YA="AI_NoImageGeneratedError",QA=`vercel.ai.error.${YA}`,XA=Symbol.for(QA),ez;ez=XA;var ow="AI_NoObjectGeneratedError",iw=`vercel.ai.error.${ow}`,tz=Symbol.for(iw),sw,wr=class extends re{constructor({message:t="No object generated.",cause:e,text:n,response:a,usage:r,finishReason:o}){super({name:ow,message:t,cause:e}),this[sw]=!0,this.text=n,this.response=a,this.usage=r,this.finishReason=o}static isInstance(t){return re.hasMarker(t,iw)}};sw=tz;var rz="AI_NoOutputGeneratedError",nz=`vercel.ai.error.${rz}`,az=Symbol.for(nz),oz;oz=az;var iz="AI_NoSpeechGeneratedError",sz=`vercel.ai.error.${iz}`,lz=Symbol.for(sz),cz;cz=lz;var uz="AI_NoTranscriptGeneratedError",dz=`vercel.ai.error.${uz}`,pz=Symbol.for(dz),mz;mz=pz;var fz="AI_NoVideoGeneratedError",hz=`vercel.ai.error.${fz}`,gz=Symbol.for(hz),vz;vz=gz;var yz="AI_NoSuchToolError",bz=`vercel.ai.error.${yz}`,xz=Symbol.for(bz),_z;_z=xz;var wz="AI_ToolCallRepairError",kz=`vercel.ai.error.${wz}`,Sz=Symbol.for(kz),Tz;Tz=Sz;var lw="AI_UIMessageStreamError",cw=`vercel.ai.error.${lw}`,$z=Symbol.for(cw),uw,ea=class extends re{constructor({chunkType:t,chunkId:e,message:n}){super({name:lw,message:n}),this[uw]=!0,this.chunkType=t,this.chunkId=e}static isInstance(t){return re.hasMarker(t,cw)}};uw=$z;var Iz="AI_InvalidDataContentError",Ez=`vercel.ai.error.${Iz}`,Az=Symbol.for(Ez),zz;zz=Az;var Rz="AI_InvalidMessageRoleError",Cz=`vercel.ai.error.${Rz}`,Pz=Symbol.for(Cz),Mz;Mz=Pz;var Oz="AI_MessageConversionError",Nz=`vercel.ai.error.${Oz}`,jz=Symbol.for(Nz),Dz;Dz=jz;var Uz="AI_RetryError",Lz=`vercel.ai.error.${Uz}`,Zz=Symbol.for(Lz),qz;qz=Zz;var Fz="6.0.201",Vz=async({url:t,maxBytes:e,abortSignal:n})=>{var a;let r=t.toString();qf(r);try{let o=await fetch(r,{headers:tl({},`ai-sdk/${Fz}`,Q_()),signal:n});if(o.redirected&&qf(o.url),!o.ok)throw new yt({url:r,statusCode:o.status,statusText:o.statusText});return{data:await K_({response:o,url:r,maxBytes:e??Zf}),mediaType:(a=o.headers.get("content-type"))!=null?a:void 0}}catch(o){throw yt.isInstance(o)?o:new yt({url:r,cause:o})}};var dw=l.union([l.string(),l.instanceof(Uint8Array),l.instanceof(ArrayBuffer),l.custom(t=>{var e,n;return(n=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?n:!1},{message:"Must be a Buffer"})]);var Fr=l.lazy(()=>l.union([l.null(),l.string(),l.number(),l.boolean(),l.record(l.string(),Fr.optional()),l.array(Fr)])),q=l.record(l.string(),l.record(l.string(),Fr.optional())),pw=l.object({type:l.literal("text"),text:l.string(),providerOptions:q.optional()}),Hz=l.object({type:l.literal("image"),image:l.union([dw,l.instanceof(URL)]),mediaType:l.string().optional(),providerOptions:q.optional()}),mw=l.object({type:l.literal("file"),data:l.union([dw,l.instanceof(URL)]),filename:l.string().optional(),mediaType:l.string(),providerOptions:q.optional()}),Jz=l.object({type:l.literal("reasoning"),text:l.string(),providerOptions:q.optional()}),Bz=l.object({type:l.literal("tool-call"),toolCallId:l.string(),toolName:l.string(),input:l.unknown(),providerOptions:q.optional(),providerExecuted:l.boolean().optional()}),Wz=l.discriminatedUnion("type",[l.object({type:l.literal("text"),value:l.string(),providerOptions:q.optional()}),l.object({type:l.literal("json"),value:Fr,providerOptions:q.optional()}),l.object({type:l.literal("execution-denied"),reason:l.string().optional(),providerOptions:q.optional()}),l.object({type:l.literal("error-text"),value:l.string(),providerOptions:q.optional()}),l.object({type:l.literal("error-json"),value:Fr,providerOptions:q.optional()}),l.object({type:l.literal("content"),value:l.array(l.union([l.object({type:l.literal("text"),text:l.string(),providerOptions:q.optional()}),l.object({type:l.literal("media"),data:l.string(),mediaType:l.string()}),l.object({type:l.literal("file-data"),data:l.string(),mediaType:l.string(),filename:l.string().optional(),providerOptions:q.optional()}),l.object({type:l.literal("file-url"),url:l.string(),providerOptions:q.optional()}),l.object({type:l.literal("file-id"),fileId:l.union([l.string(),l.record(l.string(),l.string())]),providerOptions:q.optional()}),l.object({type:l.literal("image-data"),data:l.string(),mediaType:l.string(),providerOptions:q.optional()}),l.object({type:l.literal("image-url"),url:l.string(),providerOptions:q.optional()}),l.object({type:l.literal("image-file-id"),fileId:l.union([l.string(),l.record(l.string(),l.string())]),providerOptions:q.optional()}),l.object({type:l.literal("custom"),providerOptions:q.optional()})]))})]),fw=l.object({type:l.literal("tool-result"),toolCallId:l.string(),toolName:l.string(),output:Wz,providerOptions:q.optional()}),Gz=l.object({type:l.literal("tool-approval-request"),approvalId:l.string(),toolCallId:l.string()}),Kz=l.object({type:l.literal("tool-approval-response"),approvalId:l.string(),approved:l.boolean(),reason:l.string().optional()}),Yz=l.object({role:l.literal("system"),content:l.string(),providerOptions:q.optional()}),Qz=l.object({role:l.literal("user"),content:l.union([l.string(),l.array(l.union([pw,Hz,mw]))]),providerOptions:q.optional()}),Xz=l.object({role:l.literal("assistant"),content:l.union([l.string(),l.array(l.union([pw,mw,Jz,Bz,fw,Gz]))]),providerOptions:q.optional()}),eR=l.object({role:l.literal("tool"),content:l.array(l.union([fw,Kz])),providerOptions:q.optional()}),D6=l.union([Yz,Qz,Xz,eR]);function hw(t,e){if(t===void 0&&e===void 0)return;if(t===void 0)return e;if(e===void 0)return t;let n={...t};for(let a in e)if(!(a==="__proto__"||a==="constructor"||a==="prototype")&&Object.prototype.hasOwnProperty.call(e,a)){let r=e[a];if(r===void 0)continue;let o=a in t?t[a]:void 0,i=r!==null&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)&&!(r instanceof RegExp),s=o!=null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp);i&&s?n[a]=hw(o,r):n[a]=r}return n}var tR={};$A(tR,{array:()=>oR,choice:()=>iR,json:()=>sR,object:()=>aR,text:()=>nR});function rR(t){let e=["ROOT"],n=-1,a=null;function r(c,u,d){switch(c){case'"':{n=u,e.pop(),e.push(d),e.push("INSIDE_STRING");break}case"f":case"t":case"n":{n=u,a=u,e.pop(),e.push(d),e.push("INSIDE_LITERAL");break}case"-":{e.pop(),e.push(d),e.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=u,e.pop(),e.push(d),e.push("INSIDE_NUMBER");break}case"{":{n=u,e.pop(),e.push(d),e.push("INSIDE_OBJECT_START");break}case"[":{n=u,e.pop(),e.push(d),e.push("INSIDE_ARRAY_START");break}}}function o(c,u){switch(c){case",":{e.pop(),e.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{n=u,e.pop();break}}}function i(c,u){switch(c){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=u,e.pop();break}}}for(let c=0;c<t.length;c++){let u=t[c];switch(e[e.length-1]){case"ROOT":r(u,c,"FINISH");break;case"INSIDE_OBJECT_START":{switch(u){case'"':{e.pop(),e.push("INSIDE_OBJECT_KEY");break}case"}":{n=c,e.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{u==='"'&&(e.pop(),e.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{u==='"'&&(e.pop(),e.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{u===":"&&(e.pop(),e.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{r(u,c,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{o(u,c);break}case"INSIDE_STRING":{switch(u){case'"':{e.pop(),n=c;break}case"\\":{e.push("INSIDE_STRING_ESCAPE");break}default:n=c}break}case"INSIDE_ARRAY_START":{u==="]"?(n=c,e.pop()):(n=c,r(u,c,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(u){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=c,e.pop();break}default:{n=c;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{r(u,c,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{e.pop(),n=c;break}case"INSIDE_NUMBER":{switch(u){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=c;break}case"e":case"E":case"-":case".":break;case",":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(u,c),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(u,c);break}case"}":{e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(u,c);break}case"]":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(u,c);break}default:{e.pop();break}}break}case"INSIDE_LITERAL":{let m=t.substring(a,c+1);!"false".startsWith(m)&&!"true".startsWith(m)&&!"null".startsWith(m)?(e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(u,c):e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(u,c)):n=c;break}}}let s=t.slice(0,n+1);for(let c=e.length-1;c>=0;c--)switch(e[c]){case"INSIDE_STRING":{s+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{s+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{s+="]";break}case"INSIDE_LITERAL":{let d=t.substring(a,t.length);"true".startsWith(d)?s+="true".slice(d.length):"false".startsWith(d)?s+="false".slice(d.length):"null".startsWith(d)&&(s+="null".slice(d.length))}}return s}async function To(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let e=await _r({text:t});return e.success?{value:e.value,state:"successful-parse"}:(e=await _r({text:rR(t)}),e.success?{value:e.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var nR=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:t}){return t},async parsePartialOutput({text:t}){return{partial:t}},createElementStreamTransform(){}}),aR=({schema:t,name:e,description:n})=>{let a=al(t);return{name:"object",responseFormat:Vf(a.jsonSchema).then(r=>({type:"json",schema:r,...e!=null&&{name:e},...n!=null&&{description:n}})),async parseCompleteOutput({text:r},o){let i=await _r({text:r});if(!i.success)throw new wr({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});let s=await Xn({value:i.value,schema:a});if(!s.success)throw new wr({message:"No object generated: response did not match schema.",cause:s.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return s.value},async parsePartialOutput({text:r}){let o=await To(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},oR=({element:t,name:e,description:n})=>{let a=al(t);return{name:"array",responseFormat:Vf(a.jsonSchema).then(r=>{let{$schema:o,...i}=r;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:i}},required:["elements"],additionalProperties:!1},...e!=null&&{name:e},...n!=null&&{description:n}}}),async parseCompleteOutput({text:r},o){let i=await _r({text:r});if(!i.success)throw new wr({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});let s=i.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))throw new wr({message:"No object generated: response did not match schema.",cause:new Dt({value:s,cause:"response must be an object with an elements array"}),text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});for(let c of s.elements){let u=await Xn({value:c,schema:a});if(!u.success)throw new wr({message:"No object generated: response did not match schema.",cause:u.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason})}return s.elements},async parsePartialOutput({text:r}){let o=await To(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let i=o.value;if(i==null||typeof i!="object"||!("elements"in i)||!Array.isArray(i.elements))return;let s=o.state==="repaired-parse"&&i.elements.length>0?i.elements.slice(0,-1):i.elements,c=[];for(let u of s){let d=await Xn({value:u,schema:a});d.success&&c.push(d.value)}return{partial:c}}}},createElementStreamTransform(){let r=0;return new TransformStream({transform({partialOutput:o},i){if(o!=null)for(;r<o.length;r++)i.enqueue(o[r])}})}}},iR=({options:t,name:e,description:n})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:t}},required:["result"],additionalProperties:!1},...e!=null&&{name:e},...n!=null&&{description:n}}),async parseCompleteOutput({text:a},r){let o=await _r({text:a});if(!o.success)throw new wr({message:"No object generated: could not parse the response.",cause:o.error,text:a,response:r.response,usage:r.usage,finishReason:r.finishReason});let i=o.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string"||!t.includes(i.result))throw new wr({message:"No object generated: response did not match schema.",cause:new Dt({value:i,cause:"response must be an object that contains a choice value."}),text:a,response:r.response,usage:r.usage,finishReason:r.finishReason});return i.result},async parsePartialOutput({text:a}){let r=await To(a);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let o=r.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string")return;let i=t.filter(s=>s.startsWith(o.result));return r.state==="successful-parse"?i.includes(o.result)?{partial:o.result}:void 0:i.length===1?{partial:i[0]}:void 0}}},createElementStreamTransform(){}}),sR=({name:t,description:e}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...t!=null&&{name:t},...e!=null&&{description:e}}),async parseCompleteOutput({text:n},a){let r=await _r({text:n});if(!r.success)throw new wr({message:"No object generated: could not parse the response.",cause:r.error,text:n,response:a.response,usage:a.usage,finishReason:a.finishReason});return r.value},async parsePartialOutput({text:n}){let a=await To(n);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return a.value===void 0?void 0:{partial:a.value}}},createElementStreamTransform(){}});var q6=Qt({prefix:"aitxt",size:24});var V6=class extends TransformStream{constructor(){super({transform(t,e){e.enqueue(`data: ${JSON.stringify(t)}
137
+
138
+ `)},flush(t){t.enqueue(`data: [DONE]
139
+
140
+ `)}})}};var ko=l.record(l.string(),Fr.optional()),W6=rl(()=>wo(l.union([l.strictObject({type:l.literal("text-start"),id:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("text-delta"),id:l.string(),delta:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("text-end"),id:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("error"),errorText:l.string()}),l.strictObject({type:l.literal("tool-input-start"),toolCallId:l.string(),toolName:l.string(),providerExecuted:l.boolean().optional(),providerMetadata:q.optional(),toolMetadata:ko.optional(),dynamic:l.boolean().optional(),title:l.string().optional()}),l.strictObject({type:l.literal("tool-input-delta"),toolCallId:l.string(),inputTextDelta:l.string()}),l.strictObject({type:l.literal("tool-input-available"),toolCallId:l.string(),toolName:l.string(),input:l.unknown(),providerExecuted:l.boolean().optional(),providerMetadata:q.optional(),toolMetadata:ko.optional(),dynamic:l.boolean().optional(),title:l.string().optional()}),l.strictObject({type:l.literal("tool-input-error"),toolCallId:l.string(),toolName:l.string(),input:l.unknown(),providerExecuted:l.boolean().optional(),providerMetadata:q.optional(),toolMetadata:ko.optional(),dynamic:l.boolean().optional(),errorText:l.string(),title:l.string().optional()}),l.strictObject({type:l.literal("tool-approval-request"),approvalId:l.string(),toolCallId:l.string()}),l.strictObject({type:l.literal("tool-output-available"),toolCallId:l.string(),output:l.unknown(),providerExecuted:l.boolean().optional(),providerMetadata:q.optional(),toolMetadata:ko.optional(),dynamic:l.boolean().optional(),preliminary:l.boolean().optional()}),l.strictObject({type:l.literal("tool-output-error"),toolCallId:l.string(),errorText:l.string(),providerExecuted:l.boolean().optional(),providerMetadata:q.optional(),toolMetadata:ko.optional(),dynamic:l.boolean().optional()}),l.strictObject({type:l.literal("tool-output-denied"),toolCallId:l.string()}),l.strictObject({type:l.literal("reasoning-start"),id:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("reasoning-delta"),id:l.string(),delta:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("reasoning-end"),id:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("source-url"),sourceId:l.string(),url:l.string(),title:l.string().optional(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("source-document"),sourceId:l.string(),mediaType:l.string(),title:l.string(),filename:l.string().optional(),providerMetadata:q.optional()}),l.strictObject({type:l.literal("file"),url:l.string(),mediaType:l.string(),providerMetadata:q.optional()}),l.strictObject({type:l.custom(t=>typeof t=="string"&&t.startsWith("data-"),{message:'Type must start with "data-"'}),id:l.string().optional(),data:l.unknown(),transient:l.boolean().optional()}),l.strictObject({type:l.literal("start-step")}),l.strictObject({type:l.literal("finish-step")}),l.strictObject({type:l.literal("start"),messageId:l.string().optional(),messageMetadata:l.unknown().optional()}),l.strictObject({type:l.literal("finish"),finishReason:l.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:l.unknown().optional()}),l.strictObject({type:l.literal("abort"),reason:l.string().optional()}),l.strictObject({type:l.literal("message-metadata"),messageMetadata:l.unknown()})])));function lR(t){return t.type.startsWith("data-")}function So(){return Object.create(null)}function Hf(t){return t.type.startsWith("tool-")}function cR(t){return t.type==="dynamic-tool"}function nw(t){return Hf(t)||cR(t)}function aw(t){return t.type.split("-").slice(1).join("-")}function uR({lastMessage:t,messageId:e}){return{message:t?.role==="assistant"?t:{id:e,metadata:void 0,role:"assistant",parts:[]},activeTextParts:So(),activeReasoningParts:So(),partialToolCalls:So()}}function dR({stream:t,messageMetadataSchema:e,dataPartSchemas:n,runUpdateMessageJob:a,onError:r,onToolCall:o,onData:i}){return t.pipeThrough(new TransformStream({async transform(s,c){await a(async({state:u,write:d})=>{var m,h,b,S;function U(g){let H=u.message.parts.filter(nw).find(V=>V.toolCallId===g);if(H==null)throw new ea({chunkType:"tool-invocation",chunkId:g,message:`No tool invocation found for tool call ID "${g}".`});return H}function N(g){var P;let H=u.message.parts.find(xe=>Hf(xe)&&xe.toolCallId===g.toolCallId),V=g,B=H;if(H!=null){H.state=g.state,B.input=V.input,B.output=V.output,B.errorText=V.errorText,B.rawInput=V.rawInput,B.preliminary=V.preliminary,g.title!==void 0&&(B.title=g.title),g.toolMetadata!==void 0&&(B.toolMetadata=g.toolMetadata),B.providerExecuted=(P=V.providerExecuted)!=null?P:H.providerExecuted;let xe=V.providerMetadata;if(xe!=null)if(g.state==="output-available"||g.state==="output-error"){let bt=H;bt.resultProviderMetadata=xe}else H.callProviderMetadata=xe}else u.message.parts.push({type:`tool-${g.toolName}`,toolCallId:g.toolCallId,state:g.state,title:g.title,...g.toolMetadata!==void 0?{toolMetadata:g.toolMetadata}:{},input:V.input,output:V.output,rawInput:V.rawInput,errorText:V.errorText,providerExecuted:V.providerExecuted,preliminary:V.preliminary,...V.providerMetadata!=null&&(g.state==="output-available"||g.state==="output-error")?{resultProviderMetadata:V.providerMetadata}:{},...V.providerMetadata!=null&&!(g.state==="output-available"||g.state==="output-error")?{callProviderMetadata:V.providerMetadata}:{}})}function de(g){var P,H;let V=u.message.parts.find(bt=>bt.type==="dynamic-tool"&&bt.toolCallId===g.toolCallId),B=g,xe=V;if(V!=null){V.state=g.state,xe.toolName=g.toolName,xe.input=B.input,xe.output=B.output,xe.errorText=B.errorText,xe.rawInput=(P=B.rawInput)!=null?P:xe.rawInput,xe.preliminary=B.preliminary,g.title!==void 0&&(xe.title=g.title),g.toolMetadata!==void 0&&(xe.toolMetadata=g.toolMetadata),xe.providerExecuted=(H=B.providerExecuted)!=null?H:V.providerExecuted;let bt=B.providerMetadata;if(bt!=null)if(g.state==="output-available"||g.state==="output-error"){let $r=V;$r.resultProviderMetadata=bt}else V.callProviderMetadata=bt}else u.message.parts.push({type:"dynamic-tool",toolName:g.toolName,toolCallId:g.toolCallId,state:g.state,input:B.input,output:B.output,errorText:B.errorText,preliminary:B.preliminary,providerExecuted:B.providerExecuted,title:g.title,...g.toolMetadata!==void 0?{toolMetadata:g.toolMetadata}:{},...B.providerMetadata!=null&&(g.state==="output-available"||g.state==="output-error")?{resultProviderMetadata:B.providerMetadata}:{},...B.providerMetadata!=null&&!(g.state==="output-available"||g.state==="output-error")?{callProviderMetadata:B.providerMetadata}:{}})}async function F(g){if(g!=null){let P=u.message.metadata!=null?hw(u.message.metadata,g):g;e!=null&&await ol({value:P,schema:e,context:{field:"message.metadata",entityId:u.message.id}}),u.message.metadata=P}}switch(s.type){case"text-start":{let g={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"};u.activeTextParts[s.id]=g,u.message.parts.push(g),d();break}case"text-delta":{let g=u.activeTextParts[s.id];if(g==null)throw new ea({chunkType:"text-delta",chunkId:s.id,message:`Received text-delta for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});g.text+=s.delta,g.providerMetadata=(m=s.providerMetadata)!=null?m:g.providerMetadata,d();break}case"text-end":{let g=u.activeTextParts[s.id];if(g==null)throw new ea({chunkType:"text-end",chunkId:s.id,message:`Received text-end for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});g.state="done",g.providerMetadata=(h=s.providerMetadata)!=null?h:g.providerMetadata,delete u.activeTextParts[s.id],d();break}case"reasoning-start":{let g={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"};u.activeReasoningParts[s.id]=g,u.message.parts.push(g),d();break}case"reasoning-delta":{let g=u.activeReasoningParts[s.id];if(g==null)throw new ea({chunkType:"reasoning-delta",chunkId:s.id,message:`Received reasoning-delta for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});g.text+=s.delta,g.providerMetadata=(b=s.providerMetadata)!=null?b:g.providerMetadata,d();break}case"reasoning-end":{let g=u.activeReasoningParts[s.id];if(g==null)throw new ea({chunkType:"reasoning-end",chunkId:s.id,message:`Received reasoning-end for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});g.providerMetadata=(S=s.providerMetadata)!=null?S:g.providerMetadata,g.state="done",delete u.activeReasoningParts[s.id],d();break}case"file":{u.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url,...s.providerMetadata!=null?{providerMetadata:s.providerMetadata}:{}}),d();break}case"source-url":{u.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),d();break}case"source-document":{u.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),d();break}case"tool-input-start":{let g=u.message.parts.filter(Hf);u.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:g.length,dynamic:s.dynamic,title:s.title,toolMetadata:s.toolMetadata},s.dynamic?de({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,toolMetadata:s.toolMetadata,providerMetadata:s.providerMetadata}):N({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,toolMetadata:s.toolMetadata,providerMetadata:s.providerMetadata}),d();break}case"tool-input-delta":{let g=u.partialToolCalls[s.toolCallId];if(g==null)throw new ea({chunkType:"tool-input-delta",chunkId:s.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${s.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});g.text+=s.inputTextDelta;let{value:P}=await To(g.text);g.dynamic?de({toolCallId:s.toolCallId,toolName:g.toolName,state:"input-streaming",input:P,title:g.title,toolMetadata:g.toolMetadata}):N({toolCallId:s.toolCallId,toolName:g.toolName,state:"input-streaming",input:P,title:g.title,toolMetadata:g.toolMetadata}),d();break}case"tool-input-available":{s.dynamic?de({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title,toolMetadata:s.toolMetadata}):N({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title,toolMetadata:s.toolMetadata}),d(),o&&!s.providerExecuted&&await o({toolCall:s});break}case"tool-input-error":{let g=u.message.parts.filter(nw).find(H=>H.toolCallId===s.toolCallId);(g!=null?g.type==="dynamic-tool":!!s.dynamic)?de({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,toolMetadata:s.toolMetadata}):N({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,toolMetadata:s.toolMetadata}),d();break}case"tool-approval-request":{let g=U(s.toolCallId);g.state="approval-requested",g.approval={id:s.approvalId},d();break}case"tool-output-denied":{let g=U(s.toolCallId);g.state="output-denied",d();break}case"tool-output-available":{let g=U(s.toolCallId);g.type==="dynamic-tool"?de({toolCallId:s.toolCallId,toolName:g.toolName,state:"output-available",input:g.input,output:s.output,preliminary:s.preliminary,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:g.title,toolMetadata:g.toolMetadata}):N({toolCallId:s.toolCallId,toolName:aw(g),state:"output-available",input:g.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary,providerMetadata:s.providerMetadata,title:g.title,toolMetadata:g.toolMetadata}),d();break}case"tool-output-error":{let g=U(s.toolCallId);g.type==="dynamic-tool"?de({toolCallId:s.toolCallId,toolName:g.toolName,state:"output-error",input:g.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:g.title,toolMetadata:g.toolMetadata}):N({toolCallId:s.toolCallId,toolName:aw(g),state:"output-error",input:g.input,rawInput:g.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:g.title,toolMetadata:g.toolMetadata}),d();break}case"start-step":{u.message.parts.push({type:"step-start"});break}case"finish-step":{u.activeTextParts=So(),u.activeReasoningParts=So();break}case"start":{s.messageId!=null&&(u.message.id=s.messageId),await F(s.messageMetadata),(s.messageId!=null||s.messageMetadata!=null)&&d();break}case"finish":{s.finishReason!=null&&(u.finishReason=s.finishReason),await F(s.messageMetadata),s.messageMetadata!=null&&d();break}case"message-metadata":{await F(s.messageMetadata),s.messageMetadata!=null&&d();break}case"error":{r?.(new Error(s.errorText));break}default:if(lR(s)){if(n?.[s.type]!=null){let H=u.message.parts.findIndex(B=>"id"in B&&"data"in B&&B.id===s.id&&B.type===s.type),V=H>=0?H:u.message.parts.length;await ol({value:s.data,schema:n[s.type],context:{field:`message.parts[${V}].data`,entityName:s.type,entityId:s.id}})}let g=s;if(g.transient){i?.(g);break}let P=g.id!=null?u.message.parts.find(H=>g.type===H.type&&g.id===H.id):void 0;P!=null?P.data=g.data:u.message.parts.push(g),i?.(g),d()}}c.enqueue(s)})}}))}function pR(t){let e=t.pipeThrough(new TransformStream);return e[Symbol.asyncIterator]=function(){let n=this.getReader(),a=!1;async function r(o){var i;if(!a){a=!0;try{o&&await((i=n.cancel)==null?void 0:i.call(n))}finally{try{n.releaseLock()}catch{}}}}return{async next(){if(a)return{done:!0,value:void 0};let{done:o,value:i}=await n.read();return o?(await r(!0),{done:!0,value:void 0}):{done:!1,value:i}},async return(){return await r(!0),{done:!0,value:void 0}},async throw(o){throw await r(!0),o}}},e}async function mR({stream:t,onError:e}){let n=t.getReader();try{for(;;){let{done:a}=await n.read();if(a)break}}catch(a){e?.(a)}finally{n.releaseLock()}}var G6=Qt({prefix:"aitxt",size:24});function gw({message:t,stream:e,onError:n,terminateOnError:a=!1}){var r;let o,i=!1,s=new ReadableStream({start(d){o=d}}),c=uR({messageId:(r=t?.id)!=null?r:"",lastMessage:t}),u=d=>{n?.(d),!i&&a&&(i=!0,o?.error(d))};return mR({stream:dR({stream:e,runUpdateMessageJob(d){return d({state:c,write:()=>{o?.enqueue(structuredClone(c.message))}})},onError:u}),onError:u}).finally(()=>{i||o?.close()}),pR(s)}var it=l.record(l.string(),Fr.optional()),Q6=rl(()=>wo(l.array(l.object({id:l.string(),role:l.enum(["system","user","assistant"]),metadata:l.unknown().optional(),parts:l.array(l.union([l.object({type:l.literal("text"),text:l.string(),state:l.enum(["streaming","done"]).optional(),providerMetadata:q.optional()}),l.object({type:l.literal("reasoning"),text:l.string(),state:l.enum(["streaming","done"]).optional(),providerMetadata:q.optional()}),l.object({type:l.literal("source-url"),sourceId:l.string(),url:l.string(),title:l.string().optional(),providerMetadata:q.optional()}),l.object({type:l.literal("source-document"),sourceId:l.string(),mediaType:l.string(),title:l.string(),filename:l.string().optional(),providerMetadata:q.optional()}),l.object({type:l.literal("file"),mediaType:l.string(),filename:l.string().optional(),url:l.string(),providerMetadata:q.optional()}),l.object({type:l.literal("step-start")}),l.object({type:l.string().startsWith("data-"),id:l.string().optional(),data:l.unknown()}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("input-streaming"),input:l.unknown().optional(),providerExecuted:l.boolean().optional(),callProviderMetadata:q.optional(),output:l.never().optional(),errorText:l.never().optional(),approval:l.never().optional()}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("input-available"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.never().optional()}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("approval-requested"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.never().optional(),reason:l.never().optional()})}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("approval-responded"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.boolean(),reason:l.string().optional()})}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("output-available"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.unknown(),errorText:l.never().optional(),callProviderMetadata:q.optional(),resultProviderMetadata:q.optional(),preliminary:l.boolean().optional(),approval:l.object({id:l.string(),approved:l.literal(!0),reason:l.string().optional()}).optional()}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("output-error"),input:l.unknown().optional(),rawInput:l.unknown().optional(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.string(),callProviderMetadata:q.optional(),resultProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.literal(!0),reason:l.string().optional()}).optional()}),l.object({type:l.literal("dynamic-tool"),toolName:l.string(),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("output-denied"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.literal(!1),reason:l.string().optional()})}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("input-streaming"),providerExecuted:l.boolean().optional(),callProviderMetadata:q.optional(),input:l.unknown().optional(),output:l.never().optional(),errorText:l.never().optional(),approval:l.never().optional()}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("input-available"),providerExecuted:l.boolean().optional(),input:l.unknown(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.never().optional()}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("approval-requested"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.never().optional(),reason:l.never().optional()})}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("approval-responded"),input:l.unknown(),providerExecuted:l.boolean().optional(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.boolean(),reason:l.string().optional()})}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("output-available"),providerExecuted:l.boolean().optional(),input:l.unknown(),output:l.unknown(),errorText:l.never().optional(),callProviderMetadata:q.optional(),resultProviderMetadata:q.optional(),preliminary:l.boolean().optional(),approval:l.object({id:l.string(),approved:l.literal(!0),reason:l.string().optional()}).optional()}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("output-error"),providerExecuted:l.boolean().optional(),input:l.unknown().optional(),rawInput:l.unknown().optional(),output:l.never().optional(),errorText:l.string(),callProviderMetadata:q.optional(),resultProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.literal(!0),reason:l.string().optional()}).optional()}),l.object({type:l.string().startsWith("tool-"),toolCallId:l.string(),toolMetadata:it.optional(),state:l.literal("output-denied"),providerExecuted:l.boolean().optional(),input:l.unknown(),output:l.never().optional(),errorText:l.never().optional(),callProviderMetadata:q.optional(),approval:l.object({id:l.string(),approved:l.literal(!1),reason:l.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var eL=Qt({prefix:"aiobj",size:24});function vw(t){return({url:e,abortSignal:n})=>Vz({url:e,maxBytes:t?.maxBytes,abortSignal:n})}var rL=Qt({prefix:"aiobj",size:24});var nL=vw();var fR="AI_NoSuchProviderError",hR=`vercel.ai.error.${fR}`,gR=Symbol.for(hR),vR;vR=gR;var aL=vw();var sl=class{#e=new Set;#t=[];#i="ready";#n;#a;#o=0;subscribe(e){return this.#e.add(e),this.#c(e),()=>this.#e.delete(e)}getState(){return structuredClone({status:this.#i,messages:this.#t,...this.#n?{error:this.#n}:{}})}handle(e){switch(e.event){case"message_started":this.#r(e.data.message);return;case"interaction_started":this.#l(e.data.id);return;case"content":this.#s(e.data.delta);return;case"tool_proposed":this.#h(()=>this.#p(e.data));return;case"interaction_proposed":this.#g("confirmation",e.data.id,{...e.data,status:"pending"});return;case"input_requested":this.#h(()=>this.#g("input-request",e.data.id,{...e.data,status:"pending"}));return;case"tool_completed":this.#g("tool-result",e.data.id,e.data);return;case"view_available":this.#g("view",e.data.id,e.data);return;case"message_completed":this.#v("ready");return;case"interaction_completed":this.#b(e.data.id,yR(e.data.action)),this.#v("ready");return;case"session_reset":this.#_();return;default:return}}fail(e,n){let a=this.#a;a?.interactionId&&this.#b(a.interactionId,"pending"),this.#v(n?"ready":"error",n?void 0:il(e)),a||(this.#i=n?"ready":"error",this.#n=n?void 0:il(e),this.#f())}async flush(){let e=this.#a;e&&await(e.finalization??e.consumer)}#r(e){let n={id:this.#m("user"),role:"user",parts:[{type:"text",text:e}]};this.#t=[...this.#t,n],this.#i="submitted",this.#n=void 0,this.#u(),this.#f()}#l(e){this.#b(e,"submitting"),this.#i="submitted",this.#n=void 0,this.#u(e),this.#f()}#u(e){let n=this.#m("assistant"),a,r=new ReadableStream({start(i){a=i}});if(!a)throw new Error("AI SDK message stream did not initialize");let o={...e?{interactionId:e}:{},controller:a,consumer:Promise.resolve(),textId:void 0,textOpen:!1,closed:!1};this.#a=o,o.consumer=this.#d(o,r).catch(i=>{o.processingError=il(i)}),a.enqueue({type:"start",messageId:n})}async#d(e,n){for await(let a of gw({stream:n})){if(this.#a!==e||a.parts.length===0)continue;let r=this.#t.findIndex(o=>o.id===a.id);this.#t=r<0?[...this.#t,a]:this.#t.map((o,i)=>i===r?a:o),this.#i="streaming",this.#f()}}#s(e){let n=this.#a;if(!n||n.closed||!e)return;n.textOpen||(n.textOpen=!0,n.textId=this.#m("text"),n.controller.enqueue({type:"text-start",id:n.textId}));let a=n.textId;a&&n.controller.enqueue({type:"text-delta",id:a,delta:e})}#p(e){this.#g("confirmation",e.id,{...e,status:"pending"})}#h(e){let n=this.#a===void 0;n&&this.#u(),e(),n&&this.#v("ready")}#g(e,n,a){let r=this.#a;!r||r.closed||(this.#y(r),r.controller.enqueue({type:`data-${e}`,id:n,data:a}))}#v(e,n){let a=this.#a;if(!(!a||a.closed)){a.closed=!0;try{this.#y(a),a.controller.enqueue({type:"finish",finishReason:e==="error"?"error":"stop"}),a.controller.close()}catch(r){a.processingError=il(r)}a.finalization=a.consumer.then(()=>{if(this.#a!==a)return;this.#a=void 0;let r=n??a.processingError;this.#i=r?"error":e,this.#n=r,this.#f()})}}#y(e){let n=e.textId;!e.textOpen||!n||(e.controller.enqueue({type:"text-end",id:n}),e.textOpen=!1,e.textId=void 0)}#b(e,n){let a=!1;this.#t=this.#t.map(r=>{let o=!1,i=r.parts.map(s=>s.type==="data-confirmation"&&s.id===e?(a=!0,o=!0,{...s,data:{...s.data,status:n}}):s.type==="data-input-request"&&s.id===e?(a=!0,o=!0,{...s,data:{...s.data,status:n}}):s);return o?{...r,parts:i}:r}),a&&this.#f()}#_(){let e=this.#a;if(this.#a=void 0,e&&!e.closed){e.closed=!0;try{e.controller.close()}catch{}}this.#t=[],this.#i="ready",this.#n=void 0,this.#f()}#m(e){return this.#o+=1,`${e}-${this.#o}`}#f(){for(let e of this.#e)this.#c(e)}#c(e){try{e(this.getState())}catch{}}};function yR(t){switch(t){case"accept":return"accepted";case"decline":return"declined";case"cancel":return"cancelled"}}function il(t){if(t instanceof Error){let e=bR(t);return{name:t.name,message:t.message,...e?{detail:e}:{}}}return{name:"Error",message:String(t)}}function bR(t){let e=Reflect.get(t,"detail");if(!(!xR(e)||typeof e.code!="string"))return{code:e.code,...typeof e.status=="number"?{status:e.status}:{},retryable:e.retryable===!0}}function xR(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Bf(t){let e=t.data;switch(t.event){case"content":if(typeof e.delta=="string"&&Xt(e))return t;break;case"tool_started":if(Je(e,"id")&&Je(e,"tool")&&Xt(e))return t;break;case"tool_proposed":if(Je(e,"id")&&Je(e,"tool")&&ta(e.title)&&ta(e.description)&&Jf(e.arguments)&&(e.reviewSchema===void 0||ll(e.reviewSchema))&&ta(e.expiresAt)&&(e.requiresConfirmation===void 0||e.requiresConfirmation===!0)&&Xt(e))return t;break;case"input_requested":if(Je(e,"id")&&Je(e,"message")&&ll(e.requestedSchema)&&Je(e,"expiresAt")&&Xt(e))return t;break;case"interaction_resolved":if(Je(e,"id")&&(e.action===void 0||kR(e.action))&&Xt(e))return t;break;case"tool_completed":if(Je(e,"id")&&Je(e,"tool")&&$o(e.result,0)&&(e.replayed===void 0||e.replayed===!0)&&Xt(e))return t;break;case"view_available":if(_R(e))return t;break;case"error":if(Je(e,"code")&&(e.status===void 0||typeof e.status=="number")&&(e.retryable===void 0||typeof e.retryable=="boolean")&&Xt(e))return t;break;case"done":if(Xt(e))return t;break;case"interaction_proposed":if(Je(e,"id")&&(Je(e,"tool")||Je(e,"title"))&&Jf(e.arguments))return t;break}return{event:"unrecognized",data:{name:t.event,payload:e}}}function _R(t){return Je(t,"id")&&Je(t,"tool")&&typeof t.resourceUri=="string"&&t.resourceUri.startsWith("ui://")&&ta(t.title)&&(t.replayed===void 0||t.replayed===!0)&&$o(t.result,0)&&Jf(t.arguments)&&ta(t.html)&&(t.resourceMeta===void 0||ll(t.resourceMeta))&&(t.allowedOpenDomains===void 0||Array.isArray(t.allowedOpenDomains)&&t.allowedOpenDomains.every(wR))&&Xt(t)}function wR(t){if(typeof t!="string")return!1;try{return new URL(t).protocol==="https:"}catch{return!1}}function Xt(t){return ta(t.turnId)}function Je(t,e){let n=t[e];return typeof n=="string"&&n.length>0}function ta(t){return t===void 0||typeof t=="string"}function Jf(t){return t===void 0||$o(t,0)}function kR(t){return t==="accept"||t==="decline"||t==="cancel"}function $o(t,e){if(e>16)return!1;if(t===null||typeof t=="string"||typeof t=="boolean")return!0;if(typeof t=="number")return Number.isFinite(t);if(Array.isArray(t))return t.length<=256&&t.every(a=>$o(a,e+1));if(!ll(t))return!1;let n=Object.entries(t);return n.length<=256&&n.every(([,a])=>$o(a,e+1))}function ll(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var SR=/(?:secret|token|api[-_]?key|password|credential|authorization|cookie)/i,TR=/(?:-----BEGIN [A-Z ]*PRIVATE KEY-----|\bsk-[A-Za-z0-9_-]{20,}\b|\b(?:bearer|basic)\s+[A-Za-z0-9._~+/=-]{20,}\b|\b[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}\b)/i;function Io(t){let e=cl(t,"$",0,new Set);$R(e);let n=JSON.stringify(e);if(new TextEncoder().encode(n).byteLength>16384)throw new Error("Model context must not exceed 16 KiB");return e}function Gf(t){let e=cl(t,"$",0,new Set);if(typeof e!="object"||e===null||Array.isArray(e))throw new Error("Page context must be a JSON object");let n=JSON.stringify(e);if(new TextEncoder().encode(n).byteLength>16384)throw new Error("Page context must not exceed 16 KiB");return e}function $R(t){if(!Wf(t))throw new Error("Model context must be a JSON object");for(let e of Object.keys(t))if(e!=="content"&&e!=="structuredContent")throw new Error(`Model context contains unknown field ${e}`);if(t.content!==void 0){if(!Array.isArray(t.content))throw new Error("Model context content must be an array");for(let e of t.content)if(!Wf(e)||Object.keys(e).some(n=>n!=="type"&&n!=="text")||e.type!=="text"||typeof e.text!="string")throw new Error("Model context content supports text parts only")}if(t.structuredContent!==void 0&&!Wf(t.structuredContent))throw new Error("Model context structuredContent must be an object")}function cl(t,e,n,a){if(n>8)throw new Error(`Model context exceeds maximum depth at ${e}`);if(typeof t=="string"){if(TR.test(t))throw new Error(`Model context contains credential-shaped text at ${e}`);return t}if(t===null||typeof t=="boolean"||typeof t=="number"&&Number.isFinite(t))return t;if(typeof t!="object")throw new Error(`Model context contains non-JSON data at ${e}`);if(IR(t))throw new Error(`Model context must not define or inherit toJSON at ${e}`);let r=Object.getPrototypeOf(t);if(Array.isArray(t)){if(r!==Array.prototype)throw new Error(`Model context contains a non-JSON object at ${e}`)}else if(r!==Object.prototype&&r!==null)throw new Error(`Model context contains a non-JSON object at ${e}`);if(a.has(t))throw new Error(`Model context contains a cycle at ${e}`);if(Array.isArray(t)){if(t.length>128)throw new Error(`Model context has more than 128 entries at ${e}`);let s=[];a.add(t);for(let c=0;c<t.length;c+=1){let u=Object.hasOwn(t,c)?t[c]:null;s.push(cl(u,`${e}.${c}`,n+1,a))}return a.delete(t),s}let o=Object.entries(t);if(o.length>128)throw new Error(`Model context has more than 128 entries at ${e}`);let i=Object.create(null);a.add(t);for(let[s,c]of o){if(SR.test(s))throw new Error(`Model context contains sensitive key ${e}.${s}`);i[s]=cl(c,`${e}.${s}`,n+1,a)}return a.delete(t),i}function Wf(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function IR(t){let e=t,n=new Set;for(;e!==null&&!n.has(e);){if(n.add(e),Object.getOwnPropertyDescriptor(e,"toJSON")!==void 0)return!0;e=Object.getPrototypeOf(e)}return!1}var ER="https://cloud.noodleseed.dev",AR="/v1/assistant/public-sessions";function yw(t){let{sessionEndpoint:e,embedId:n,serviceUrl:a}=t;if(!!n==!!e)throw new Error("pass either embedId or sessionEndpoint, not both and not neither");return n?{kind:"public",url:`${(a??ER).replace(/\/+$/,"")}${AR}`,embedId:n}:{kind:"exchange",url:e}}function bw(t){return`${t.embedId??""}|${t.serviceUrl??""}|${t.sessionEndpoint??""}`}var Eo=class extends Error{code="invalid_response";constructor(e,n){super(e,n),this.name="AssistantTransportError"}};async function _w(t,e){let n=new Kf(e);if(!t.body){let o;try{o=await t.text()}catch(i){throw xw(i)?i:er("assistant event stream could not be read",i)}n.push(o),n.finish(t.headers.get("content-type")??"");return}let a=t.body.getReader(),r=new TextDecoder("utf-8",{fatal:!0});for(;;){let o;try{o=await a.read()}catch(s){throw xw(s)?s:er("assistant event stream ended unexpectedly",s)}let i;try{i=r.decode(o.value,{stream:!o.done})}catch(s){throw er("assistant event stream contained invalid UTF-8",s)}if(n.push(i),o.done)break}n.finish(t.headers.get("content-type")??"")}var Kf=class{#e;#t="";#i;constructor(e){this.#e=e}push(e){this.#t+=e;let n=this.#t.endsWith("\r"),a=n?this.#t.slice(0,-1):this.#t,r=RR(a).split(`
141
+
142
+ `);this.#t=`${r.pop()??""}${n?"\r":""}`;for(let o of r)this.#n(o)}finish(e){if(this.#t.trim().length>0)throw er("assistant event stream ended with an unterminated frame");if(!this.#i)throw er(`assistant response did not contain a terminal done event (content-type: ${e||"unknown"})`);this.#e(this.#i)}#n(e){let n=zR(e);if(n){if(this.#i)throw er("assistant event stream contained an event after done");if(n.event==="done"){this.#i=n;return}this.#e(n)}}};function zR(t){let e,n=[],a=!1;for(let o of t.split(`
143
+ `)){if(!o||o.startsWith(":"))continue;a=!0;let i=o.indexOf(":"),s=i<0?o:o.slice(0,i),c=i<0?"":o.slice(i+1).replace(/^ /,"");s==="event"&&(e=c),s==="data"&&n.push(c)}if(!a)return;if(!e||n.length===0)throw er("assistant event stream contained a malformed frame");let r;try{r=JSON.parse(n.join(`
144
+ `))}catch(o){throw er("assistant event stream contained malformed JSON",o)}if(e==="done"&&!CR(r))throw er("assistant event stream contained an invalid done event");return{event:e,data:ww(r)?r:{value:r}}}function RR(t){return t.replaceAll(`\r
145
+ `,`
146
+ `).replaceAll("\r",`
147
+ `)}function CR(t){return ww(t)&&(t.turnId===void 0||typeof t.turnId=="string"&&t.turnId.length>0)}function ww(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function er(t,e){return new Eo(t,e===void 0?void 0:{cause:e})}function xw(t){return t instanceof DOMException&&t.name==="AbortError"}async function kw(t){try{let n=(await t.clone().json()).code;return typeof n=="string"?n:void 0}catch{return}}var PR=new Set(["daily_turn_budget_exhausted","daily_session_budget_exhausted"]),Hr=class extends Error{detail;constructor(e,n,a){super(n,a),this.name="AssistantClientError",this.detail=e}},Qf=class{#e;#t;#i=new Set;#n=new sl;#a;#o;#r;#l;#u;#d;#s=new Map;constructor(e){this.#e=yw(e),this.#t=e.fetch??((n,a)=>globalThis.fetch(n,a)),this.#l=e.context?{...e.context}:void 0,this.#u=e.modelContext?Io(e.modelContext):void 0,this.#a=e.clientContext,this.#o=e.pageContext}subscribe(e){return this.#i.add(e),()=>this.#i.delete(e)}subscribeChat(e){return this.#n.subscribe(e)}getChatState(){return this.#n.getState()}async connect(){this.#r||await this.#m(async e=>{this.#r||await this.#v(e)})}async sendMessage(e){let n=e.trim();n&&await this.#m(async a=>{await this.#f(a,()=>this.#p(n,!0,a,this.#u))})}async respond(e,n){if(!e)throw _e("invalid_request","interaction id is required",!1);await this.#m(async a=>{await this.#f(a,async()=>{let r=this.#s.get(e),o=this.#r;if(!o)throw _e("confirmation_expired","assistant session is not active",!1);let i=o.endpoints.interactions;if(!i&&n.action!=="accept")throw _e("unsupported_service","the assistant service does not support declining or cancelling interactions",!1);let s=i??o.endpoints.toolConfirmations,c=i?{id:e,action:n.action,...n.action==="accept"&&n.content!==void 0?{content:n.content}:{}}:{id:e};this.#c({event:"interaction_started",data:{id:e,action:n.action}});try{let u=await this.#_(s,{method:"POST",headers:Yf(o.token,"text/event-stream"),body:JSON.stringify(c),signal:a},"confirmation_failed");if(u.status===401&&(this.#r=void 0,this.#c({event:"session_expired",data:{}})),!u.ok){let h=await DR(u),b=u.status===401||u.status===409;throw _e(h??(b?"confirmation_expired":"confirmation_failed"),`Assistant interaction failed (${u.status})`,!1,u.status)}let d,m;await this.#y(u,h=>{h.event==="tool_completed"&&h.data.id===e&&(d=h.data.result),(h.event==="tool_proposed"||h.event==="input_requested")&&h.data.id!==e&&(m=h.data.id)}),this.#c({event:"interaction_completed",data:{id:e,action:n.action}}),r&&(this.#s.delete(e),m?this.#s.set(m,r):n.action!=="accept"?r.resolve(NR(n.action)):d!==void 0?r.resolve(OR(d)):r.reject(_e("invalid_response","Assistant app interaction completed without a tool result",!1)))}catch(u){throw r&&this.#s.get(e)===r&&(this.#s.delete(e),r.reject(u)),u}})})}updateContext(e){this.#l={...e},this.#c({event:"context_changed",data:{context:this.#l}})}updatePageContext(e){this.#o=Gf(e)}updateModelContext(e){this.#u=Io(e),this.#c({event:"model_context_changed",data:{modelContext:this.#u}})}async requestApp(e,n){let a=this.#r;if(!a?.endpoints.apps)throw _e("unsupported_service","the assistant service does not support MCP Apps",!1);let r=await this.#_(a.endpoints.apps,{method:"POST",headers:Yf(a.token,"application/json"),body:JSON.stringify({method:e,params:n})},"app_request_failed");if(!r.ok)throw _e("app_request_failed",`Assistant app request failed (${r.status})`,!1,r.status);let o=await r.json(),i=MR(o);return i?new Promise((s,c)=>{let u=i.data.id,d=this.#s.get(u);d&&d.reject(_e("invalid_response","Assistant returned a duplicate app interaction",!1)),this.#s.set(u,{resolve:s,reject:c}),this.#c(i),this.#n.flush()}):o}appSandboxUrl(){return this.#r?.endpoints.sandbox}resetSession(){this.#T(_e("confirmation_expired","assistant session is not active",!1)),this.#r=void 0,this.#c({event:"session_reset",data:{}})}abort(){this.#d?.abort()}async#p(e,n,a,r){let o=this.#r??await this.#v(a);n&&this.#c({event:"message_started",data:{message:e}});let i=this.#h(),s=this.#g(),c=await this.#_(o.endpoints.turns,{method:"POST",headers:Yf(o.token,"text/event-stream"),body:JSON.stringify({message:e,...i?{clientContext:i}:{},...s===void 0?{}:{pageContext:s},...r?{modelContext:r}:{}}),signal:a},"turn_failed");if(c.status===401&&n){this.#r=void 0,this.#c({event:"session_expired",data:{}}),await this.#p(e,!1,a,r);return}if(!c.ok){let u=await kw(c);throw _e("turn_failed",`Assistant turn failed (${c.status})`,!1,c.status,void 0,u)}await this.#y(c),this.#c({event:"message_completed",data:{}})}#h(){let e;try{e=typeof this.#a=="function"?this.#a():this.#a}catch(a){throw _e("turn_failed","Assistant client context provider failed",!1,void 0,{cause:a})}if(!e)return;let n={...typeof e.locale=="string"&&e.locale?{locale:e.locale}:{},...typeof e.timeZone=="string"&&e.timeZone?{timeZone:e.timeZone}:{}};return Object.keys(n).length>0?n:void 0}#g(){try{let e=typeof this.#o=="function"?this.#o():this.#o;return e===void 0?void 0:Gf(e)}catch(e){throw _e("turn_failed","Assistant page context provider failed",!1,void 0,{cause:e})}}async#v(e){let n=this.#e,a=await this.#b(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n.kind==="public"?{embedId:n.embedId}:this.#l?{context:this.#l}:{}),credentials:n.kind==="public"?"omit":"same-origin",signal:e});if(!a.ok){let i=await kw(a);throw _e("session_failed",`Assistant session failed (${a.status})`,i===void 0||!PR.has(i),a.status,void 0,i)}let r;try{r=await a.json()}catch(i){throw _e("session_failed","Assistant session returned invalid JSON",!0,void 0,{cause:i})}let o=jR(r);return this.#r=o,this.#c({event:"session_started",data:{expiresAt:o.expiresAt,...o.configuration?{configuration:o.configuration}:{}}}),o}async#y(e,n){let a;try{await _w(e,r=>{let o=Bf(r);this.#c(o),n?.(o),!(o.event!=="error"||typeof o.data.code!="string")&&(a={code:o.data.code,...typeof o.data.status=="number"?{status:o.data.status}:{},retryable:o.data.retryable===!0})})}catch(r){throw r instanceof Eo?_e(r.code,r.message,!1,void 0,{cause:r}):r}if(a)throw _e(a.code,`Assistant stream failed (${a.code})`,a.retryable,a.status)}async#b(e,n){try{return await this.#t(e.url,n)}catch(a){throw n.signal?.aborted?a:e.kind!=="public"?_e("session_failed","Assistant request failed",!0,void 0,{cause:a}):_e("session_failed",`Assistant could not reach ${new URL(e.url).origin}. If the page sets a Content-Security-Policy, allow that origin in connect-src (and in script-src and frame-src).`,!0,void 0,{cause:a},"blocked_by_page")}}async#_(e,n,a){try{return await this.#t(e,n)}catch(r){throw n.signal?.aborted?r:_e(a,"Assistant request failed",!0,void 0,{cause:r})}}async#m(e){if(this.#d)throw _e("request_in_progress","an assistant request is already in progress",!0);let n=new AbortController;this.#d=n;try{await e(n.signal)}catch(a){throw n.signal.aborted?_e("request_aborted","assistant request was aborted",!0,void 0,{cause:a}):a}finally{this.#d=void 0}}async#f(e,n){try{await n(),await this.#n.flush()}catch(a){throw this.#n.fail(a,e.aborted),await this.#n.flush(),a}}#c(e){this.#n.handle(e);for(let n of this.#i)try{n(e)}catch{}}#T(e){for(let n of this.#s.values())n.reject(e);this.#s.clear()}};function Xf(t){return new Qf(t)}function Yf(t,e){return{Authorization:`Bearer ${t}`,"Content-Type":"application/json",Accept:e}}function MR(t){if(!Vr(t)||!Vr(t.interaction))return;let e=t.interaction.event,n=t.interaction.data;if(e!=="tool_proposed"&&e!=="input_requested"||!Vr(n))return;let a=Bf({event:e,data:n});return a.event==="tool_proposed"||a.event==="input_requested"?a:void 0}function OR(t){let e=typeof t=="string"?t:JSON.stringify(t);return t!==null&&typeof t=="object"&&!Array.isArray(t)?{content:[{type:"text",text:e}],structuredContent:t,isError:!1}:{content:[{type:"text",text:e}],isError:!1}}function NR(t){return{content:[{type:"text",text:`interaction_${t}`}],isError:!0}}function jR(t){if(!Vr(t)||!Vr(t.endpoints))throw _e("session_failed","Assistant session response is invalid",!0);let e=t.endpoints.interactions,n=t.endpoints.apps,a=t.endpoints.sandbox;if(typeof t.token!="string"||typeof t.expiresAt!="string"||typeof t.endpoints.turns!="string"||typeof t.endpoints.toolConfirmations!="string"||e!==void 0&&typeof e!="string"||n!==void 0&&typeof n!="string"||a!==void 0&&typeof a!="string")throw _e("session_failed","Assistant session response is invalid",!0);return{token:t.token,expiresAt:t.expiresAt,endpoints:{turns:t.endpoints.turns,toolConfirmations:t.endpoints.toolConfirmations,...typeof e=="string"?{interactions:e}:{},...typeof n=="string"?{apps:n}:{},...typeof a=="string"?{sandbox:a}:{}},...Vr(t.configuration)?{configuration:t.configuration}:{}}}function Vr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}async function DR(t){let e;try{e=await t.json()}catch{return}if(!(!Vr(e)||typeof e.code!="string"))return/^[A-Za-z0-9_.-]{1,64}$/.test(e.code)?e.code:void 0}function _e(t,e,n,a,r,o){return new Hr({code:t,...a===void 0?{}:{status:a},retryable:n,...o===void 0?{}:{serviceCode:o}},e,r)}function $w(t){let e=document.createElement("section");e.className="tool-proposal input-request",e.dataset.kind="input";let n=document.createElement("form"),a=document.createElement("strong");a.textContent=t.message,n.append(a);let r=ra(t.requestedSchema.properties),o=new Set(Array.isArray(t.requestedSchema.required)?t.requestedSchema.required.filter(S=>typeof S=="string"):[]),i=new Map,s=new WeakSet;for(let[S,U]of Object.entries(r)){let N=ra(U),de=document.createElement("label"),F=document.createElement("span");F.textContent=typeof N.title=="string"&&N.title?N.title:GR(S);let g=UR(S,N,o.has(S)),P=()=>{s.add(g),th(g,N,o.has(S),s.has(g))};g.addEventListener("input",P),g.addEventListener("change",P),de.append(F,g),n.append(de),i.set(S,g)}let c=document.createElement("div");c.className="proposal-actions";let u=eh(t.labels.submit,"submit"),d=eh(t.labels.decline,"button"),m=eh(t.labels.cancel,"button"),h=[u,d,m],b=async S=>{h.forEach(U=>{U.disabled=!0});try{await t.respond(S)}catch(U){throw h.forEach(N=>{N.disabled=!1}),U}};return n.addEventListener("submit",S=>{S.preventDefault();for(let[U,N]of i)th(N,ra(r[U]),o.has(U),s.has(N));n.reportValidity()&&b({action:"accept",content:LR(i,r,o,s)}).catch(()=>{})}),d.addEventListener("click",()=>{b({action:"decline"}).catch(()=>{})}),m.addEventListener("click",()=>{b({action:"cancel"}).catch(()=>{})}),c.append(u,d,m),n.append(c),e.append(n),e}function UR(t,e,n){let a=Aw(e);if(a||e.type==="array"){let o=document.createElement("select");o.name=t,o.multiple=e.type==="array";let i=a??qR(e);!o.multiple&&(!n||!i.some(s=>s.value===e.default))&&o.append(WR(i));for(let s of i)o.append(zw(s.title,s.value));return VR(o,e.default),th(o,e,n,!1),o}let r=document.createElement("input");return r.name=t,r.type=FR(e),r.required=n&&ZR(e),e.type==="integer"&&(r.step="1"),typeof e.minimum=="number"&&(r.min=String(e.minimum)),typeof e.maximum=="number"&&(r.max=String(e.maximum)),typeof e.minLength=="number"&&(r.minLength=e.minLength),typeof e.maxLength=="number"&&(r.maxLength=e.maxLength),e.format==="date-time"&&(r.step="0.001"),HR(r,e),r}function LR(t,e,n,a){let r={};for(let[o,i]of t){let s=ra(e[o]);if(i instanceof HTMLSelectElement&&i.multiple){let c=[...i.selectedOptions].map(u=>u.value);Iw(s,n.has(o),a.has(i),c.length)&&(r[o]=c)}else if(i instanceof HTMLInputElement&&i.type==="checkbox")(n.has(o)||rh(s)||a.has(i))&&(r[o]=i.checked);else if(i instanceof HTMLSelectElement)Ew(i)||(r[o]=i.value);else if(i.value!==""||s.type==="string"&&(n.has(o)||rh(s)||a.has(i)))if(s.format==="date-time"){let c=BR(i.value);c!==void 0&&(r[o]=c)}else r[o]=s.type==="number"||s.type==="integer"?Number(i.value):i.value}return r}function th(t,e,n,a){if(t.setCustomValidity(""),!(t instanceof HTMLSelectElement))return;if(!t.multiple){t.required=n,n&&Ew(t)&&t.setCustomValidity("Please select an option.");return}let r=t.selectedOptions.length,o=Iw(e,n,a,r),i=Sw(e.minItems),s=Sw(e.maxItems);t.required=o&&i!==void 0&&i>0,o&&i!==void 0&&r<i?t.setCustomValidity(`Select at least ${i} option${i===1?"":"s"}.`):o&&s!==void 0&&r>s&&t.setCustomValidity(`Select at most ${s} option${s===1?"":"s"}.`)}function Iw(t,e,n,a){return e||rh(t)||n||a>0}function rh(t){return Object.hasOwn(t,"default")}function Sw(t){return typeof t=="number"&&Number.isInteger(t)&&t>=0?t:void 0}function ZR(t){return t.type==="number"||t.type==="integer"?!0:t.type!=="string"?!1:t.format==="date"||t.format==="date-time"||t.format==="email"||t.format==="uri"||typeof t.minLength=="number"&&t.minLength>0}function Ew(t){return t.selectedOptions[0]?.dataset.placeholder==="true"}function Aw(t){return Array.isArray(t.enum)&&t.enum.every(e=>typeof e=="string")?t.enum.map(e=>({value:e,title:e})):Tw(t.oneOf)??Tw(t.anyOf)}function qR(t){return Aw(ra(t.items))??[]}function FR(t){return t.type==="boolean"?"checkbox":t.type==="number"||t.type==="integer"?"number":t.format==="date"?"date":t.format==="date-time"?"datetime-local":t.format==="email"?"email":t.format==="uri"?"url":"text"}function Tw(t){if(!Array.isArray(t))return;let e=t.map(n=>ra(n));if(e.every(n=>typeof n.const=="string"))return e.map(n=>({value:String(n.const),title:typeof n.title=="string"?n.title:String(n.const)}))}function VR(t,e){if(t.multiple){let n=new Set(Array.isArray(e)?e.filter(a=>typeof a=="string"):[]);for(let a of t.options)a.selected=n.has(a.value);return}typeof e=="string"&&(t.value=e)}function HR(t,e){let n=e.default;if(e.type==="boolean"){typeof n=="boolean"&&(t.checked=n);return}if(e.type==="number"||e.type==="integer"){typeof n=="number"&&Number.isFinite(n)&&(t.value=String(n));return}if(typeof n=="string"){if(e.format==="date-time"){t.value=JR(n)??"";return}t.value=n}}function JR(t){let e=new Date(t);if(!Number.isNaN(e.valueOf()))return[String(e.getFullYear()).padStart(4,"0"),"-",Ao(e.getMonth()+1),"-",Ao(e.getDate()),"T",Ao(e.getHours()),":",Ao(e.getMinutes()),":",Ao(e.getSeconds()),".",String(e.getMilliseconds()).padStart(3,"0")].join("")}function BR(t){let e=new Date(t);return Number.isNaN(e.valueOf())?void 0:e.toISOString()}function Ao(t){return String(t).padStart(2,"0")}function eh(t,e){let n=document.createElement("button");return n.type=e,n.textContent=t,n}function zw(t,e){let n=document.createElement("option");return n.textContent=t,n.value=e,n}function WR(t){let e="";for(;t.some(a=>a.value===e);)e+="\0";let n=zw("",e);return n.dataset.placeholder="true",n}function GR(t){let e=t.replaceAll(/([a-z0-9])([A-Z])/g,"$1 $2").replaceAll(/[_-]+/g," ");return e?`${e[0]?.toUpperCase()??""}${e.slice(1)}`:t}function ra(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:{}}function Cw(t){let e=document.createElement("section");e.className="tool-proposal",e.setAttribute("aria-label",t.labels.heading);let n=document.createElement("span");n.className="proposal-eyebrow",n.textContent=t.labels.heading;let a=document.createElement("h3");if(a.textContent=t.title??Mw(t.tool),e.append(n,a),t.description){let i=document.createElement("p");i.className="proposal-description",i.textContent=t.description,e.append(i)}if(t.arguments&&Object.keys(t.arguments).length>0){let{action:i,...s}=t.arguments;if(Object.keys(s).length>0&&e.append(nh(s,t.reviewSchema,t.labels)),i!==void 0){let c=document.createElement("details");c.className="proposal-details";let u=document.createElement("summary");u.textContent=t.labels.details;let d=kr(t.reviewSchema?.properties);c.append(u);let m=kr(i);if(m)c.append(nh(m,kr(d?.action),t.labels));else{let h=document.createElement("div");ul(h,i,kr(d?.action),t.labels),c.append(h)}e.append(c)}}let r=document.createElement("div");r.className="proposal-actions";let o=[];for(let[i,s]of[[t.labels.accept,"accept"],[t.labels.decline,"decline"]]){let c=document.createElement("button");c.type="button",c.className=`proposal-${s}`,c.textContent=i,o.push(c),c.addEventListener("click",()=>{for(let u of o)u.disabled=!0;t.respond(s).catch(()=>{for(let u of o)u.disabled=!1})}),r.append(c)}return e.append(r),e}function Pw(t,e,n){let a=document.createElement("section");a.className="tool-result";let r=document.createElement("strong");r.textContent=e,a.append(r);let o=document.createElement("div");return ul(o,t,void 0,{heading:e,accept:"",decline:"",details:"",redacted:n}),a.append(o),a}function nh(t,e,n){let a=document.createElement("dl");a.className="proposal-arguments";let r=kr(e?.properties);for(let[o,i]of Object.entries(t)){let s=kr(r?.[o]),c=document.createElement("dt");c.textContent=Rw(s?.title)??Mw(o);let u=Rw(s?.description);if(u){let m=document.createElement("small");m.textContent=u,c.append(m)}let d=document.createElement("dd");ul(d,i,s,n),a.append(c,d)}return a}function ul(t,e,n,a){if(e==="[REDACTED]"){let o=document.createElement("span");o.className="proposal-redacted",o.textContent=a.redacted,t.append(o);return}if(Array.isArray(e)){let o=document.createElement("ul"),i=kr(n?.items);for(let s of e){let c=document.createElement("li");ul(c,s,i,a),o.append(c)}t.append(o);return}let r=kr(e);if(r){t.append(nh(r,n,a));return}t.textContent=KR(e,n)}function KR(t,e){if(t==null||t==="")return"Not provided";if(typeof t=="boolean")return t?"Yes":"No";if(typeof t=="number")return new Intl.NumberFormat().format(t);if(typeof t!="string")return String(t);if(e?.format==="date"){let n=new Date(`${t}T00:00:00`);if(!Number.isNaN(n.valueOf()))return new Intl.DateTimeFormat(void 0,{dateStyle:"medium"}).format(n)}if(e?.format==="date-time"){let n=new Date(t);if(!Number.isNaN(n.valueOf()))return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(n)}return t}function Mw(t){let e=t.replaceAll(/([a-z0-9])([A-Z])/g,"$1 $2").replaceAll(/[_-]+/g," ");return e?`${e[0]?.toUpperCase()??""}${e.slice(1)}`:t}function kr(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function Rw(t){return typeof t=="string"&&t.length>0?t:void 0}function Ow(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function YR(t){if(Array.isArray(t))return t}function QR(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,r,o,i,s=[],c=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(c=(a=o.call(n)).done)&&(s.push(a.value),s.length!==e);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw r}}return s}}function XR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
148
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eC(t,e){return YR(t)||QR(t,e)||tC(t,e)||XR()}function tC(t,e){if(t){if(typeof t=="string")return Ow(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ow(t,e):void 0}}var Gw=Object.entries,Nw=Object.setPrototypeOf,rC=Object.isFrozen,nC=Object.getPrototypeOf,aC=Object.getOwnPropertyDescriptor,qe=Object.freeze,Fe=Object.seal,aa=Object.create,Kw=typeof Reflect<"u"&&Reflect,ch=Kw.apply,uh=Kw.construct;qe||(qe=function(e){return e});Fe||(Fe=function(e){return e});ch||(ch=function(e,n){for(var a=arguments.length,r=new Array(a>2?a-2:0),o=2;o<a;o++)r[o-2]=arguments[o];return e.apply(n,r)});uh||(uh=function(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return new e(...a)});var zo=Re(Array.prototype.forEach),oC=Re(Array.prototype.lastIndexOf),jw=Re(Array.prototype.pop),na=Re(Array.prototype.push),iC=Re(Array.prototype.splice),Tr=Array.isArray,Po=Re(String.prototype.toLowerCase),ah=Re(String.prototype.toString),Dw=Re(String.prototype.match),Ro=Re(String.prototype.replace),Uw=Re(String.prototype.indexOf),sC=Re(String.prototype.trim),lC=Re(Number.prototype.toString),cC=Re(Boolean.prototype.toString),Lw=typeof BigInt>"u"?null:Re(BigInt.prototype.toString),Zw=typeof Symbol>"u"?null:Re(Symbol.prototype.toString),Me=Re(Object.prototype.hasOwnProperty),Co=Re(Object.prototype.toString),Ze=Re(RegExp.prototype.test),Jr=uC(TypeError);function Re(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return ch(t,e,a)}}function uC(t){return function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return uh(t,n)}}function ae(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Po;if(Nw&&Nw(t,null),!Tr(e))return t;let a=e.length;for(;a--;){let r=e[a];if(typeof r=="string"){let o=n(r);o!==r&&(rC(e)||(e[a]=o),r=o)}t[r]=!0}return t}function dC(t){for(let e=0;e<t.length;e++)Me(t,e)||(t[e]=null);return t}function et(t){let e=aa(null);for(let a of Gw(t)){var n=eC(a,2);let r=n[0],o=n[1];Me(t,r)&&(Tr(o)?e[r]=dC(o):o&&typeof o=="object"&&o.constructor===Object?e[r]=et(o):e[r]=o)}return e}function pC(t){switch(typeof t){case"string":return t;case"number":return lC(t);case"boolean":return cC(t);case"bigint":return Lw?Lw(t):"0";case"symbol":return Zw?Zw(t):"Symbol()";case"undefined":return Co(t);case"function":case"object":{if(t===null)return Co(t);let e=t,n=Lt(e,"toString");if(typeof n=="function"){let a=n(e);return typeof a=="string"?a:Co(a)}return Co(t)}default:return Co(t)}}function Lt(t,e){for(;t!==null;){let a=aC(t,e);if(a){if(a.get)return Re(a.get);if(typeof a.value=="function")return Re(a.value)}t=nC(t)}function n(){return null}return n}function mC(t){try{return Ze(t,""),!0}catch{return!1}}var qw=qe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),oh=qe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ih=qe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fC=qe(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),sh=qe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hC=qe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fw=qe(["#text"]),Vw=qe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),lh=qe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hw=qe(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),dl=qe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gC=Fe(/{{[\w\W]*|^[\w\W]*}}/g),vC=Fe(/<%[\w\W]*|^[\w\W]*%>/g),yC=Fe(/\${[\w\W]*/g),bC=Fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),xC=Fe(/^aria-[\-\w]+$/),Jw=Fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_C=Fe(/^(?:\w+script|data):/i),wC=Fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kC=Fe(/^html$/i),SC=Fe(/^[a-z][.\w]*(-[.\w]+)+$/i),Bw=Fe(/<[/\w!]/g),TC=Fe(/<[/\w]/g),$C=Fe(/<\/no(script|embed|frames)/i),IC=Fe(/\/>/i),Ut={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},EC=function(){return typeof window>"u"?null:window},AC=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(a=n.getAttribute(r));let o="dompurify"+(a?"#"+a:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Ww=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Sr=function(e,n,a,r){return Me(e,n)&&Tr(e[n])?ae(r.base?et(r.base):{},e[n],r.transform):a};function Yw(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EC(),e=A=>Yw(A);if(e.version="3.4.11",e.removed=[],!t||!t.document||t.document.nodeType!==Ut.document||!t.Element)return e.isSupported=!1,e;let n=t.document,a=n,r=a.currentScript;t.DocumentFragment;let o=t.HTMLTemplateElement,i=t.Node,s=t.Element,c=t.NodeFilter,u=t.NamedNodeMap;u===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let d=t.DOMParser,m=t.trustedTypes,h=s.prototype,b=Lt(h,"cloneNode"),S=Lt(h,"remove"),U=Lt(h,"nextSibling"),N=Lt(h,"childNodes"),de=Lt(h,"parentNode"),F=Lt(h,"shadowRoot"),g=Lt(h,"attributes"),P=i&&i.prototype?Lt(i.prototype,"nodeType"):null,H=i&&i.prototype?Lt(i.prototype,"nodeName"):null;if(typeof o=="function"){let A=n.createElement("template");A.content&&A.content.ownerDocument&&(n=A.content.ownerDocument)}let V,B="",xe,bt=!1,$r=0,$h=function(){if($r>0)throw Jr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Gr=function(p){$h(),$r++;try{return V.createHTML(p)}finally{$r--}},Ak=function(p){$h(),$r++;try{return V.createScriptURL(p)}finally{$r--}},zk=function(){return bt||(xe=AC(m,r),bt=!0),xe},Zo=n,kl=Zo.implementation,Ih=Zo.createNodeIterator,Rk=Zo.createDocumentFragment,Ck=Zo.getElementsByTagName,Pk=a.importNode,Ee=Ww();e.isSupported=typeof Gw=="function"&&typeof de=="function"&&kl&&kl.createHTMLDocument!==void 0;let Mk=gC,Ok=vC,Nk=yC,jk=bC,Dk=xC,Uk=_C,Eh=wC,Lk=SC,Ah=Jw,ke=null,zh=ae({},[...qw,...oh,...ih,...sh,...Fw]),Se=null,Rh=ae({},[...Vw,...lh,...Hw,...dl]),Te=Object.seal(aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ia=null,Ch=null,tr=Object.seal(aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ph=!0,Sl=!0,Mh=!1,Oh=!0,rr=!1,sa=!0,Ir=!1,Tl=!1,$l=null,Il=null,El=!1,Kr=!1,qo=!1,Fo=!1,Nh=!0,jh=!1,Dh="user-content-",Al=!0,zl=!1,Yr={},zt=null,Rl=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Uh=null,Lh=ae({},["audio","video","img","source","image","track"]),Cl=null,Zh=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vo="http://www.w3.org/1998/Math/MathML",Ho="http://www.w3.org/2000/svg",Rt="http://www.w3.org/1999/xhtml",Qr=Rt,Pl=!1,Ml=null,Zk=ae({},[Vo,Ho,Rt],ah),qh=qe(["mi","mo","mn","ms","mtext"]),Ol=ae({},qh),Fh=qe(["annotation-xml"]),Nl=ae({},Fh),qk=ae({},["title","style","font","a","script"]),la=null,Fk=["application/xhtml+xml","text/html"],Vk="text/html",$e=null,Xr=null,Hk=n.createElement("form"),Vh=function(p){return p instanceof RegExp||p instanceof Function},jl=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Xr&&Xr===p)return;(!p||typeof p!="object")&&(p={}),p=et(p),la=Fk.indexOf(p.PARSER_MEDIA_TYPE)===-1?Vk:p.PARSER_MEDIA_TYPE,$e=la==="application/xhtml+xml"?ah:Po,ke=Sr(p,"ALLOWED_TAGS",zh,{transform:$e}),Se=Sr(p,"ALLOWED_ATTR",Rh,{transform:$e}),Ml=Sr(p,"ALLOWED_NAMESPACES",Zk,{transform:ah}),Cl=Sr(p,"ADD_URI_SAFE_ATTR",Zh,{transform:$e,base:Zh}),Uh=Sr(p,"ADD_DATA_URI_TAGS",Lh,{transform:$e,base:Lh}),zt=Sr(p,"FORBID_CONTENTS",Rl,{transform:$e}),ia=Sr(p,"FORBID_TAGS",et({}),{transform:$e}),Ch=Sr(p,"FORBID_ATTR",et({}),{transform:$e}),Yr=Me(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?et(p.USE_PROFILES):p.USE_PROFILES:!1,Ph=p.ALLOW_ARIA_ATTR!==!1,Sl=p.ALLOW_DATA_ATTR!==!1,Mh=p.ALLOW_UNKNOWN_PROTOCOLS||!1,Oh=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rr=p.SAFE_FOR_TEMPLATES||!1,sa=p.SAFE_FOR_XML!==!1,Ir=p.WHOLE_DOCUMENT||!1,Kr=p.RETURN_DOM||!1,qo=p.RETURN_DOM_FRAGMENT||!1,Fo=p.RETURN_TRUSTED_TYPE||!1,El=p.FORCE_BODY||!1,Nh=p.SANITIZE_DOM!==!1,jh=p.SANITIZE_NAMED_PROPS||!1,Al=p.KEEP_CONTENT!==!1,zl=p.IN_PLACE||!1,Ah=mC(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:Jw,Qr=typeof p.NAMESPACE=="string"?p.NAMESPACE:Rt,Ol=Me(p,"MATHML_TEXT_INTEGRATION_POINTS")&&p.MATHML_TEXT_INTEGRATION_POINTS&&typeof p.MATHML_TEXT_INTEGRATION_POINTS=="object"?et(p.MATHML_TEXT_INTEGRATION_POINTS):ae({},qh),Nl=Me(p,"HTML_INTEGRATION_POINTS")&&p.HTML_INTEGRATION_POINTS&&typeof p.HTML_INTEGRATION_POINTS=="object"?et(p.HTML_INTEGRATION_POINTS):ae({},Fh);let v=Me(p,"CUSTOM_ELEMENT_HANDLING")&&p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING=="object"?et(p.CUSTOM_ELEMENT_HANDLING):aa(null);if(Te=aa(null),Me(v,"tagNameCheck")&&Vh(v.tagNameCheck)&&(Te.tagNameCheck=v.tagNameCheck),Me(v,"attributeNameCheck")&&Vh(v.attributeNameCheck)&&(Te.attributeNameCheck=v.attributeNameCheck),Me(v,"allowCustomizedBuiltInElements")&&typeof v.allowCustomizedBuiltInElements=="boolean"&&(Te.allowCustomizedBuiltInElements=v.allowCustomizedBuiltInElements),Fe(Te),rr&&(Sl=!1),qo&&(Kr=!0),Yr&&(ke=ae({},Fw),Se=aa(null),Yr.html===!0&&(ae(ke,qw),ae(Se,Vw)),Yr.svg===!0&&(ae(ke,oh),ae(Se,lh),ae(Se,dl)),Yr.svgFilters===!0&&(ae(ke,ih),ae(Se,lh),ae(Se,dl)),Yr.mathMl===!0&&(ae(ke,sh),ae(Se,Hw),ae(Se,dl))),tr.tagCheck=null,tr.attributeCheck=null,Me(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?tr.tagCheck=p.ADD_TAGS:Tr(p.ADD_TAGS)&&(ke===zh&&(ke=et(ke)),ae(ke,p.ADD_TAGS,$e))),Me(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?tr.attributeCheck=p.ADD_ATTR:Tr(p.ADD_ATTR)&&(Se===Rh&&(Se=et(Se)),ae(Se,p.ADD_ATTR,$e))),Me(p,"ADD_URI_SAFE_ATTR")&&Tr(p.ADD_URI_SAFE_ATTR)&&ae(Cl,p.ADD_URI_SAFE_ATTR,$e),Me(p,"FORBID_CONTENTS")&&Tr(p.FORBID_CONTENTS)&&(zt===Rl&&(zt=et(zt)),ae(zt,p.FORBID_CONTENTS,$e)),Me(p,"ADD_FORBID_CONTENTS")&&Tr(p.ADD_FORBID_CONTENTS)&&(zt===Rl&&(zt=et(zt)),ae(zt,p.ADD_FORBID_CONTENTS,$e)),Al&&(ke["#text"]=!0),Ir&&ae(ke,["html","head","body"]),ke.table&&(ae(ke,["tbody"]),delete ia.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let E=V;V=p.TRUSTED_TYPES_POLICY;try{B=Gr("")}catch(L){throw V=E,L}}else p.TRUSTED_TYPES_POLICY===null?(V=void 0,B=""):(V===void 0&&(V=zk()),V&&typeof B=="string"&&(B=Gr("")));qe&&qe(p),Xr=p},Hh=ae({},[...oh,...ih,...fC]),Jh=ae({},[...sh,...hC]),Jk=function(p,v,E){return v.namespaceURI===Rt?p==="svg":v.namespaceURI===Vo?p==="svg"&&(E==="annotation-xml"||Ol[E]):!!Hh[p]},Bk=function(p,v,E){return v.namespaceURI===Rt?p==="math":v.namespaceURI===Ho?p==="math"&&Nl[E]:!!Jh[p]},Wk=function(p,v,E){return v.namespaceURI===Ho&&!Nl[E]||v.namespaceURI===Vo&&!Ol[E]?!1:!Jh[p]&&(qk[p]||!Hh[p])},Gk=function(p){let v=de(p);(!v||!v.tagName)&&(v={namespaceURI:Qr,tagName:"template"});let E=Po(p.tagName),L=Po(v.tagName);return Ml[p.namespaceURI]?p.namespaceURI===Ho?Jk(E,v,L):p.namespaceURI===Vo?Bk(E,v,L):p.namespaceURI===Rt?Wk(E,v,L):!!(la==="application/xhtml+xml"&&Ml[p.namespaceURI]):!1},nr=function(p){na(e.removed,{element:p});try{de(p).removeChild(p)}catch{if(S(p),!de(p))throw Jr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Bh=function(p){let v=N(p);if(v){let L=[];zo(v,Y=>{na(L,Y)}),zo(L,Y=>{try{S(Y)}catch{}})}let E=g(p);if(E)for(let L=E.length-1;L>=0;--L){let Y=E[L],oe=Y&&Y.name;if(typeof oe=="string")try{p.removeAttribute(oe)}catch{}}},Er=function(p,v){try{na(e.removed,{attribute:v.getAttributeNode(p),from:v})}catch{na(e.removed,{attribute:null,from:v})}if(v.removeAttribute(p),p==="is")if(Kr||qo)try{nr(v)}catch{}else try{v.setAttribute(p,"")}catch{}},Kk=function(p){let v=g(p);if(v)for(let E=v.length-1;E>=0;--E){let L=v[E],Y=L&&L.name;if(!(typeof Y!="string"||Se[$e(Y)]))try{p.removeAttribute(Y)}catch{}}},Yk=function(p){let v=[p];for(;v.length>0;){let E=v.pop();(P?P(E):E.nodeType)===Ut.element&&Kk(E);let Y=N(E);if(Y)for(let oe=Y.length-1;oe>=0;--oe)v.push(Y[oe])}},Wh=function(p){let v=null,E=null;if(El)p="<remove></remove>"+p;else{let oe=Dw(p,/^[\r\n\t ]+/);E=oe&&oe[0]}la==="application/xhtml+xml"&&Qr===Rt&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");let L=V?Gr(p):p;if(Qr===Rt)try{v=new d().parseFromString(L,la)}catch{}if(!v||!v.documentElement){v=kl.createDocument(Qr,"template",null);try{v.documentElement.innerHTML=Pl?B:L}catch{}}let Y=v.body||v.documentElement;return p&&E&&Y.insertBefore(n.createTextNode(E),Y.childNodes[0]||null),Qr===Rt?Ck.call(v,Ir?"html":"body")[0]:Ir?v.documentElement:Y},Gh=function(p){return Ih.call(p.ownerDocument||p,p,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Jo=function(p){return p=Ro(p,Mk," "),p=Ro(p,Ok," "),p=Ro(p,Nk," "),p},Dl=function(p){var v;p.normalize();let E=Ih.call(p.ownerDocument||p,p,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),L=E.nextNode();for(;L;)L.data=Jo(L.data),L=E.nextNode();let Y=(v=p.querySelectorAll)===null||v===void 0?void 0:v.call(p,"template");Y&&zo(Y,oe=>{en(oe.content)&&Dl(oe.content)})},Bo=function(p){let v=H?H(p):null;return typeof v!="string"||$e(v)!=="form"?!1:typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||p.attributes!==g(p)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function"||p.nodeType!==P(p)||p.childNodes!==N(p)},en=function(p){if(!P||typeof p!="object"||p===null)return!1;try{return P(p)===Ut.documentFragment}catch{return!1}},ca=function(p){if(!P||typeof p!="object"||p===null)return!1;try{return typeof P(p)=="number"}catch{return!1}};function qt(A,p,v){A.length!==0&&zo(A,E=>{E.call(e,p,v,Xr)})}let Qk=function(p,v){return!!(sa&&p.hasChildNodes()&&!ca(p.firstElementChild)&&Ze(Bw,p.textContent)&&Ze(Bw,p.innerHTML)||sa&&p.namespaceURI===Rt&&v==="style"&&ca(p.firstElementChild)||p.nodeType===Ut.processingInstruction||sa&&p.nodeType===Ut.comment&&Ze(TC,p.data))},Xk=function(p,v){if(!ia[v]&&Qh(v)&&(Te.tagNameCheck instanceof RegExp&&Ze(Te.tagNameCheck,v)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(v)))return!1;if(Al&&!zt[v]){let E=de(p),L=N(p);if(L&&E){let Y=L.length;for(let oe=Y-1;oe>=0;--oe){let Pe=zl?L[oe]:b(L[oe],!0);E.insertBefore(Pe,U(p))}}}return nr(p),!0},Kh=function(p){if(qt(Ee.beforeSanitizeElements,p,null),Bo(p))return nr(p),!0;let v=$e(H?H(p):p.nodeName);if(qt(Ee.uponSanitizeElement,p,{tagName:v,allowedTags:ke}),Qk(p,v))return nr(p),!0;if(ia[v]||!(tr.tagCheck instanceof Function&&tr.tagCheck(v))&&!ke[v])return Xk(p,v);if((P?P(p):p.nodeType)===Ut.element&&!Gk(p)||(v==="noscript"||v==="noembed"||v==="noframes")&&Ze($C,p.innerHTML))return nr(p),!0;if(rr&&p.nodeType===Ut.text){let L=Jo(p.textContent);p.textContent!==L&&(na(e.removed,{element:p.cloneNode()}),p.textContent=L)}return qt(Ee.afterSanitizeElements,p,null),!1},Yh=function(p,v,E){if(Ch[v]||Nh&&(v==="id"||v==="name")&&(E in n||E in Hk))return!1;let L=Se[v]||tr.attributeCheck instanceof Function&&tr.attributeCheck(v,p);if(!(Sl&&Ze(jk,v))){if(!(Ph&&Ze(Dk,v))){if(L){if(!Cl[v]){if(!Ze(Ah,Ro(E,Eh,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&p!=="script"&&Uw(E,"data:")===0&&Uh[p])){if(!(Mh&&!Ze(Uk,Ro(E,Eh,"")))){if(E)return!1}}}}}else if(!(Qh(p)&&(Te.tagNameCheck instanceof RegExp&&Ze(Te.tagNameCheck,p)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(p))&&(Te.attributeNameCheck instanceof RegExp&&Ze(Te.attributeNameCheck,v)||Te.attributeNameCheck instanceof Function&&Te.attributeNameCheck(v,p))||v==="is"&&Te.allowCustomizedBuiltInElements&&(Te.tagNameCheck instanceof RegExp&&Ze(Te.tagNameCheck,E)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(E))))return!1}}return!0},eS=ae({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Qh=function(p){return!eS[Po(p)]&&Ze(Lk,p)},tS=function(p,v,E,L){if(V&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!E)switch(m.getAttributeType(p,v)){case"TrustedHTML":return Gr(L);case"TrustedScriptURL":return Ak(L)}return L},rS=function(p,v,E,L){try{E?p.setAttributeNS(E,v,L):p.setAttribute(v,L),Bo(p)?nr(p):jw(e.removed)}catch{Er(v,p)}},Xh=function(p){qt(Ee.beforeSanitizeAttributes,p,null);let v=p.attributes;if(!v||Bo(p))return;let E={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se,forceKeepAttr:void 0},L=v.length,Y=$e(p.nodeName);for(;L--;){let oe=v[L],Pe=oe.name,ze=oe.namespaceURI,mt=oe.value,xt=$e(Pe),Ll=mt,Be=Pe==="value"?Ll:sC(Ll);if(E.attrName=xt,E.attrValue=Be,E.keepAttr=!0,E.forceKeepAttr=void 0,qt(Ee.uponSanitizeAttribute,p,E),Be=E.attrValue,jh&&(xt==="id"||xt==="name")&&Uw(Be,Dh)!==0&&(Er(Pe,p),Be=Dh+Be),sa&&Ze(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){Er(Pe,p);continue}if(xt==="attributename"&&Dw(Be,"href")){Er(Pe,p);continue}if(!E.forceKeepAttr){if(!E.keepAttr){Er(Pe,p);continue}if(!Oh&&Ze(IC,Be)){Er(Pe,p);continue}if(rr&&(Be=Jo(Be)),!Yh(Y,xt,Be)){Er(Pe,p);continue}Be=tS(Y,xt,ze,Be),Be!==Ll&&rS(p,Pe,ze,Be)}}qt(Ee.afterSanitizeAttributes,p,null)},Wo=function(p){let v=null,E=Gh(p);for(qt(Ee.beforeSanitizeShadowDOM,p,null);v=E.nextNode();)if(qt(Ee.uponSanitizeShadowNode,v,null),Kh(v),Xh(v),en(v.content)&&Wo(v.content),(P?P(v):v.nodeType)===Ut.element){let Y=F(v);en(Y)&&(Ul(Y),Wo(Y))}qt(Ee.afterSanitizeShadowDOM,p,null)},Ul=function(p){let v=[{node:p,shadow:null}];for(;v.length>0;){let E=v.pop();if(E.shadow){Wo(E.shadow);continue}let L=E.node,oe=(P?P(L):L.nodeType)===Ut.element,Pe=N(L);if(Pe)for(let ze=Pe.length-1;ze>=0;--ze)v.push({node:Pe[ze],shadow:null});if(oe){let ze=H?H(L):null;if(typeof ze=="string"&&$e(ze)==="template"){let mt=L.content;en(mt)&&v.push({node:mt,shadow:null})}}if(oe){let ze=F(L);en(ze)&&v.push({node:null,shadow:ze},{node:ze,shadow:null})}}};return e.sanitize=function(A){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,E=null,L=null,Y=null;if(Pl=!A,Pl&&(A="<!-->"),typeof A!="string"&&!ca(A)&&(A=pC(A),typeof A!="string"))throw Jr("dirty is not a string, aborting");if(!e.isSupported)return A;Tl?(ke=$l,Se=Il):jl(p),(Ee.uponSanitizeElement.length>0||Ee.uponSanitizeAttribute.length>0)&&(ke=et(ke)),Ee.uponSanitizeAttribute.length>0&&(Se=et(Se)),e.removed=[];let oe=zl&&typeof A!="string"&&ca(A);if(oe){let mt=H?H(A):A.nodeName;if(typeof mt=="string"){let xt=$e(mt);if(!ke[xt]||ia[xt])throw Jr("root node is forbidden and cannot be sanitized in-place")}if(Bo(A))throw Jr("root node is clobbered and cannot be sanitized in-place");try{Ul(A)}catch(xt){throw Bh(A),xt}}else if(ca(A))v=Wh("<!---->"),E=v.ownerDocument.importNode(A,!0),E.nodeType===Ut.element&&E.nodeName==="BODY"||E.nodeName==="HTML"?v=E:v.appendChild(E),Ul(E);else{if(!Kr&&!rr&&!Ir&&A.indexOf("<")===-1)return V&&Fo?Gr(A):A;if(v=Wh(A),!v)return Kr?null:Fo?B:""}v&&El&&nr(v.firstChild);let Pe=Gh(oe?A:v);try{for(;L=Pe.nextNode();)Kh(L),Xh(L),en(L.content)&&Wo(L.content)}catch(mt){throw oe&&Bh(A),mt}if(oe)return zo(e.removed,mt=>{mt.element&&Yk(mt.element)}),rr&&Dl(A),A;if(Kr){if(rr&&Dl(v),qo)for(Y=Rk.call(v.ownerDocument);v.firstChild;)Y.appendChild(v.firstChild);else Y=v;return(Se.shadowroot||Se.shadowrootmode)&&(Y=Pk.call(a,Y,!0)),Y}let ze=Ir?v.outerHTML:v.innerHTML;return Ir&&ke["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&Ze(kC,v.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
149
+ `+ze),rr&&(ze=Jo(ze)),V&&Fo?Gr(ze):ze},e.setConfig=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jl(A),Tl=!0,$l=ke,Il=Se},e.clearConfig=function(){Xr=null,Tl=!1,$l=null,Il=null,V=xe,B=""},e.isValidAttribute=function(A,p,v){Xr||jl({});let E=$e(A),L=$e(p);return Yh(E,L,v)},e.addHook=function(A,p){typeof p=="function"&&Me(Ee,A)&&na(Ee[A],p)},e.removeHook=function(A,p){if(Me(Ee,A)){if(p!==void 0){let v=oC(Ee[A],p);return v===-1?void 0:iC(Ee[A],v,1)[0]}return jw(Ee[A])}},e.removeHooks=function(A){Me(Ee,A)&&(Ee[A]=[])},e.removeAllHooks=function(){Ee=Ww()},e}var Qw=Yw();function fh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wr=fh();function ok(t){Wr=t}var jo={exec:()=>null};function le(t,e=""){let n=typeof t=="string"?t:t.source,a={replace:(r,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(tt.caret,"$1"),n=n.replace(r,i),a},getRegex:()=>new RegExp(n,e)};return a}var zC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),tt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},RC=/^(?:[ \t]*(?:\n|$))+/,CC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,PC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Do=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,MC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hh=/(?:[*+-]|\d{1,9}[.)])/,ik=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sk=le(ik).replace(/bull/g,hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),OC=le(ik).replace(/bull/g,hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),gh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,NC=/^[^\n]+/,vh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jC=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DC=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hh).getRegex(),gl="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,UC=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yh).replace("tag",gl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lk=le(gh).replace("hr",Do).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gl).getRegex(),LC=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lk).getRegex(),bh={blockquote:LC,code:CC,def:jC,fences:PC,heading:MC,hr:Do,html:UC,lheading:sk,list:DC,newline:RC,paragraph:lk,table:jo,text:NC},Xw=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Do).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gl).getRegex(),ZC={...bh,lheading:OC,table:Xw,paragraph:le(gh).replace("hr",Do).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Xw).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gl).getRegex()},qC={...bh,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:jo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(gh).replace("hr",Do).replace("heading",` *#{1,6} *[^
150
+ ]`).replace("lheading",sk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},FC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,VC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ck=/^( {2,}|\\)\n(?!\s*$)/,HC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vl=/[\p{P}\p{S}]/u,xh=/[\s\p{P}\p{S}]/u,uk=/[^\s\p{P}\p{S}]/u,JC=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xh).getRegex(),dk=/(?!~)[\p{P}\p{S}]/u,BC=/(?!~)[\s\p{P}\p{S}]/u,WC=/(?:[^\s\p{P}\p{S}]|~)/u,GC=le(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",zC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pk=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,KC=le(pk,"u").replace(/punct/g,vl).getRegex(),YC=le(pk,"u").replace(/punct/g,dk).getRegex(),mk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",QC=le(mk,"gu").replace(/notPunctSpace/g,uk).replace(/punctSpace/g,xh).replace(/punct/g,vl).getRegex(),XC=le(mk,"gu").replace(/notPunctSpace/g,WC).replace(/punctSpace/g,BC).replace(/punct/g,dk).getRegex(),eP=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uk).replace(/punctSpace/g,xh).replace(/punct/g,vl).getRegex(),tP=le(/\\(punct)/,"gu").replace(/punct/g,vl).getRegex(),rP=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),nP=le(yh).replace("(?:-->|$)","-->").getRegex(),aP=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",nP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ml=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,oP=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ml).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fk=le(/^!?\[(label)\]\[(ref)\]/).replace("label",ml).replace("ref",vh).getRegex(),hk=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",vh).getRegex(),iP=le("reflink|nolink(?!\\()","g").replace("reflink",fk).replace("nolink",hk).getRegex(),ek=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_h={_backpedal:jo,anyPunctuation:tP,autolink:rP,blockSkip:GC,br:ck,code:VC,del:jo,emStrongLDelim:KC,emStrongRDelimAst:QC,emStrongRDelimUnd:eP,escape:FC,link:oP,nolink:hk,punctuation:JC,reflink:fk,reflinkSearch:iP,tag:aP,text:HC,url:jo},sP={..._h,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",ml).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ml).getRegex()},dh={..._h,emStrongRDelimAst:XC,emStrongLDelim:YC,url:le(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ek).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:le(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ek).getRegex()},lP={...dh,br:le(ck).replace("{2,}","*").getRegex(),text:le(dh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},pl={normal:bh,gfm:ZC,pedantic:qC},Mo={normal:_h,gfm:dh,breaks:lP,pedantic:sP},cP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tk=t=>cP[t];function Zt(t,e){if(e){if(tt.escapeTest.test(t))return t.replace(tt.escapeReplace,tk)}else if(tt.escapeTestNoEncode.test(t))return t.replace(tt.escapeReplaceNoEncode,tk);return t}function rk(t){try{t=encodeURI(t).replace(tt.percentDecode,"%")}catch{return null}return t}function nk(t,e){let n=t.replace(tt.findPipe,(o,i,s)=>{let c=!1,u=i;for(;--u>=0&&s[u]==="\\";)c=!c;return c?"|":" |"}),a=n.split(tt.splitPipe),r=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;r<a.length;r++)a[r]=a[r].trim().replace(tt.slashPipe,"|");return a}function Oo(t,e,n){let a=t.length;if(a===0)return"";let r=0;for(;r<a;){let o=t.charAt(a-r-1);if(o===e&&!n)r++;else if(o!==e&&n)r++;else break}return t.slice(0,a-r)}function uP(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===e[0])n++;else if(t[a]===e[1]&&(n--,n<0))return a;return n>0?-2:-1}function ak(t,e,n,a,r){let o=e.href,i=e.title||null,s=t[1].replace(r.other.outputLinkReplace,"$1");a.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:i,text:s,tokens:a.inlineTokens(s)};return a.state.inLink=!1,c}function dP(t,e,n){let a=t.match(n.other.indentCodeCompensation);if(a===null)return e;let r=a[1];return e.split(`
151
+ `).map(o=>{let i=o.match(n.other.beginningSpace);if(i===null)return o;let[s]=i;return s.length>=r.length?o.slice(r.length):o}).join(`
152
+ `)}var fl=class{options;rules;lexer;constructor(t){this.options=t||Wr}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Oo(n,`
153
+ `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],a=dP(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:a}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let a=Oo(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Oo(e[0],`
154
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Oo(e[0],`
155
+ `).split(`
156
+ `),a="",r="",o=[];for(;n.length>0;){let i=!1,s=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))s.push(n[c]),i=!0;else if(!i)s.push(n[c]);else break;n=n.slice(c);let u=s.join(`
157
+ `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
158
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
159
+ ${u}`:u,r=r?`${r}
160
+ ${d}`:d;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=m,n.length===0)break;let h=o.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let b=h,S=b.raw+`
161
+ `+n.join(`
162
+ `),U=this.blockquote(S);o[o.length-1]=U,a=a.substring(0,a.length-b.raw.length)+U.raw,r=r.substring(0,r.length-b.text.length)+U.text;break}else if(h?.type==="list"){let b=h,S=b.raw+`
163
+ `+n.join(`
164
+ `),U=this.list(S);o[o.length-1]=U,a=a.substring(0,a.length-h.raw.length)+U.raw,r=r.substring(0,r.length-b.raw.length)+U.raw,n=S.substring(o.at(-1).raw.length).split(`
165
+ `);continue}}return{type:"blockquote",raw:a,tokens:o,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),a=n.length>1,r={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let o=this.rules.other.listItemRegex(n),i=!1;for(;t;){let c=!1,u="",d="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let m=e[2].split(`
166
+ `,1)[0].replace(this.rules.other.listReplaceTabs,de=>" ".repeat(3*de.length)),h=t.split(`
167
+ `,1)[0],b=!m.trim(),S=0;if(this.options.pedantic?(S=2,d=m.trimStart()):b?S=e[1].length+1:(S=e[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,d=m.slice(S),S+=e[1].length),b&&this.rules.other.blankLine.test(h)&&(u+=h+`
168
+ `,t=t.substring(h.length+1),c=!0),!c){let de=this.rules.other.nextBulletRegex(S),F=this.rules.other.hrRegex(S),g=this.rules.other.fencesBeginRegex(S),P=this.rules.other.headingBeginRegex(S),H=this.rules.other.htmlBeginRegex(S);for(;t;){let V=t.split(`
169
+ `,1)[0],B;if(h=V,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),B=h):B=h.replace(this.rules.other.tabCharGlobal," "),g.test(h)||P.test(h)||H.test(h)||de.test(h)||F.test(h))break;if(B.search(this.rules.other.nonSpaceChar)>=S||!h.trim())d+=`
170
+ `+B.slice(S);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||g.test(m)||P.test(m)||F.test(m))break;d+=`
171
+ `+h}!b&&!h.trim()&&(b=!0),u+=V+`
172
+ `,t=t.substring(V.length+1),m=B.slice(S)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(i=!0));let U=null,N;this.options.gfm&&(U=this.rules.other.listIsTask.exec(d),U&&(N=U[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:u,task:!!U,checked:N,loose:!1,text:d,tokens:[]}),r.raw+=u}let s=r.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let u=r.items[c].tokens.filter(m=>m.type==="space"),d=u.length>0&&u.some(m=>this.rules.other.anyLine.test(m.raw));r.loose=d}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:a,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=nk(e[1]),a=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
173
+ `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let i of a)this.rules.other.tableAlignRight.test(i)?o.align.push("right"):this.rules.other.tableAlignCenter.test(i)?o.align.push("center"):this.rules.other.tableAlignLeft.test(i)?o.align.push("left"):o.align.push(null);for(let i=0;i<n.length;i++)o.header.push({text:n[i],tokens:this.lexer.inline(n[i]),header:!0,align:o.align[i]});for(let i of r)o.rows.push(nk(i,o.header.length).map((s,c)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:o.align[c]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
174
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Oo(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=uP(e[2],"()");if(o===-2)return;if(o>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let a=e[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),ak(e,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[a.toLowerCase()];if(!r){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return ak(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let r=[...a[0]].length-1,o,i,s=r,c=0,u=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);(a=u.exec(e))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(i=[...o].length,a[3]||a[4]){s+=i;continue}else if((a[5]||a[6])&&r%3&&!((r+i)%3)){c+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+c);let d=[...a[0]][0].length,m=t.slice(0,r+a.index+d+i);if(Math.min(r,i)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let h=m.slice(2,-2);return{type:"strong",raw:m,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,a;return e[2]==="@"?(n=e[1],a="mailto:"+n):(n=e[1],a=n),{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},Et=class ph{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Wr,this.options.tokenizer=this.options.tokenizer||new fl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:tt,block:pl.normal,inline:Mo.normal};this.options.pedantic?(n.block=pl.pedantic,n.inline=Mo.pedantic):this.options.gfm&&(n.block=pl.gfm,this.options.breaks?n.inline=Mo.breaks:n.inline=Mo.gfm),this.tokenizer.rules=n}static get rules(){return{block:pl,inline:Mo}}static lex(e,n){return new ph(n).lex(e)}static lexInline(e,n){return new ph(n).inlineTokens(e)}lex(e){e=e.replace(tt.carriageReturn,`
175
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],a=!1){for(this.options.pedantic&&(e=e.replace(tt.tabCharGlobal," ").replace(tt.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(i=>(r=i.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let i=n.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`
176
+ `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let i=n.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
177
+ `)?"":`
178
+ `)+r.raw,i.text+=`
179
+ `+r.text,this.inlineQueue.at(-1).src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let i=n.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
180
+ `)?"":`
181
+ `)+r.raw,i.text+=`
182
+ `+r.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let i=1/0,s=e.slice(1),c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},s),typeof c=="number"&&c>=0&&(i=Math.min(i,c))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=n.at(-1);a&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
183
+ `)?"":`
184
+ `)+r.raw,i.text+=`
185
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):n.push(r),a=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let i=n.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
186
+ `)?"":`
187
+ `)+r.raw,i.text+=`
188
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):n.push(r);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let a=e,r=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,r.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)o=r[2]?r[2].length:0,a=a.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let i=!1,s="";for(;e;){i||(s=""),i=!1;let c;if(this.options.extensions?.inline?.some(d=>(c=d.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let d=n.at(-1);c.type==="text"&&d?.type==="text"?(d.raw+=c.raw,d.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(e,a,s)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),n.push(c);continue}let u=e;if(this.options.extensions?.startInline){let d=1/0,m=e.slice(1),h;this.options.extensions.startInline.forEach(b=>{h=b.call({lexer:this},m),typeof h=="number"&&h>=0&&(d=Math.min(d,h))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(c=this.tokenizer.inlineText(u)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(s=c.raw.slice(-1)),i=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=c.raw,d.text+=c.text):n.push(c);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},hl=class{options;parser;constructor(t){this.options=t||Wr}space(t){return""}code({text:t,lang:e,escaped:n}){let a=(e||"").match(tt.notSpaceStart)?.[0],r=t.replace(tt.endingNewline,"")+`
189
+ `;return a?'<pre><code class="language-'+Zt(a)+'">'+(n?r:Zt(r,!0))+`</code></pre>
190
+ `:"<pre><code>"+(n?r:Zt(r,!0))+`</code></pre>
191
+ `}blockquote({tokens:t}){return`<blockquote>
192
+ ${this.parser.parse(t)}</blockquote>
193
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
194
+ `}hr(t){return`<hr>
195
+ `}list(t){let e=t.ordered,n=t.start,a="";for(let i=0;i<t.items.length;i++){let s=t.items[i];a+=this.listitem(s)}let r=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
196
+ `+a+"</"+r+`>
197
+ `}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Zt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
198
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
199
+ `}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let a="";for(let r=0;r<t.rows.length;r++){let o=t.rows[r];n="";for(let i=0;i<o.length;i++)n+=this.tablecell(o[i]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
200
+ <thead>
201
+ `+e+`</thead>
202
+ `+a+`</table>
203
+ `}tablerow({text:t}){return`<tr>
204
+ ${t}</tr>
205
+ `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
206
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Zt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let a=this.parser.parseInline(n),r=rk(t);if(r===null)return a;t=r;let o='<a href="'+t+'"';return e&&(o+=' title="'+Zt(e)+'"'),o+=">"+a+"</a>",o}image({href:t,title:e,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let r=rk(t);if(r===null)return Zt(n);t=r;let o=`<img src="${t}" alt="${n}"`;return e&&(o+=` title="${Zt(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Zt(t.text)}},wh=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},At=class mh{options;renderer;textRenderer;constructor(e){this.options=e||Wr,this.options.renderer=this.options.renderer||new hl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wh}static parse(e,n){return new mh(n).parse(e)}static parseInline(e,n){return new mh(n).parseInline(e)}parse(e,n=!0){let a="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let s=o,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){a+=c||"";continue}}let i=o;switch(i.type){case"space":{a+=this.renderer.space(i);continue}case"hr":{a+=this.renderer.hr(i);continue}case"heading":{a+=this.renderer.heading(i);continue}case"code":{a+=this.renderer.code(i);continue}case"table":{a+=this.renderer.table(i);continue}case"blockquote":{a+=this.renderer.blockquote(i);continue}case"list":{a+=this.renderer.list(i);continue}case"html":{a+=this.renderer.html(i);continue}case"def":{a+=this.renderer.def(i);continue}case"paragraph":{a+=this.renderer.paragraph(i);continue}case"text":{let s=i,c=this.renderer.text(s);for(;r+1<e.length&&e[r+1].type==="text";)s=e[++r],c+=`
207
+ `+this.renderer.text(s);n?a+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):a+=c;continue}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return a}parseInline(e,n=this.renderer){let a="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){a+=s||"";continue}}let i=o;switch(i.type){case"escape":{a+=n.text(i);break}case"html":{a+=n.html(i);break}case"link":{a+=n.link(i);break}case"image":{a+=n.image(i);break}case"strong":{a+=n.strong(i);break}case"em":{a+=n.em(i);break}case"codespan":{a+=n.codespan(i);break}case"br":{a+=n.br(i);break}case"del":{a+=n.del(i);break}case"text":{a+=n.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return a}},No=class{options;block;constructor(t){this.options=t||Wr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Et.lex:Et.lexInline}provideParser(){return this.block?At.parse:At.parseInline}},pP=class{defaults=fh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=At;Renderer=hl;TextRenderer=wh;Lexer=Et;Tokenizer=fl;Hooks=No;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let a of t)switch(n=n.concat(e.call(this,a)),a.type){case"table":{let r=a;for(let o of r.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let i of o)n=n.concat(this.walkTokens(i.tokens,e));break}case"list":{let r=a;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=a;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let i=r[o].flat(1/0);n=n.concat(this.walkTokens(i,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...i){let s=r.renderer.apply(this,i);return s===!1&&(s=o.apply(this,i)),s}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),a.extensions=e),n.renderer){let r=this.defaults.renderer||new hl(this.defaults);for(let o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let i=o,s=n.renderer[i],c=r[i];r[i]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=c.apply(r,u)),d||""}}a.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new fl(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let i=o,s=n.tokenizer[i],c=r[i];r[i]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=c.apply(r,u)),d}}a.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new No;for(let o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let i=o,s=n.hooks[i],c=r[i];No.passThroughHooks.has(o)?r[i]=u=>{if(this.defaults.async&&No.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await s.call(r,u);return c.call(r,m)})();let d=s.call(r,u);return c.call(r,d)}:r[i]=(...u)=>{if(this.defaults.async)return(async()=>{let m=await s.apply(r,u);return m===!1&&(m=await c.apply(r,u)),m})();let d=s.apply(r,u);return d===!1&&(d=c.apply(r,u)),d}}a.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;a.walkTokens=function(i){let s=[];return s.push(o.call(this,i)),r&&(s=s.concat(r.call(this,i))),s}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Et.lex(t,e??this.defaults)}parser(t,e){return At.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let a={...n},r={...this.defaults,...a},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let i=r.hooks?await r.hooks.preprocess(e):e,s=await(r.hooks?await r.hooks.provideLexer():t?Et.lex:Et.lexInline)(i,r),c=r.hooks?await r.hooks.processAllTokens(s):s;r.walkTokens&&await Promise.all(this.walkTokens(c,r.walkTokens));let u=await(r.hooks?await r.hooks.provideParser():t?At.parse:At.parseInline)(c,r);return r.hooks?await r.hooks.postprocess(u):u})().catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let i=(r.hooks?r.hooks.provideLexer():t?Et.lex:Et.lexInline)(e,r);r.hooks&&(i=r.hooks.processAllTokens(i)),r.walkTokens&&this.walkTokens(i,r.walkTokens);let s=(r.hooks?r.hooks.provideParser():t?At.parse:At.parseInline)(i,r);return r.hooks&&(s=r.hooks.postprocess(s)),s}catch(i){return o(i)}}}onError(t,e){return n=>{if(n.message+=`
208
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Zt(n.message+"",!0)+"</pre>";return e?Promise.resolve(a):a}if(e)return Promise.reject(n);throw n}}},Br=new pP;function se(t,e){return Br.parse(t,e)}se.options=se.setOptions=function(t){return Br.setOptions(t),se.defaults=Br.defaults,ok(se.defaults),se};se.getDefaults=fh;se.defaults=Wr;se.use=function(...t){return Br.use(...t),se.defaults=Br.defaults,ok(se.defaults),se};se.walkTokens=function(t,e){return Br.walkTokens(t,e)};se.parseInline=Br.parseInline;se.Parser=At;se.parser=At.parse;se.Renderer=hl;se.TextRenderer=wh;se.Lexer=Et;se.lexer=Et.lex;se.Tokenizer=fl;se.Hooks=No;se.parse=se;var SL=se.options,TL=se.setOptions,$L=se.use,IL=se.walkTokens,EL=se.parseInline;var AL=At.parse,zL=Et.lex;se.setOptions({gfm:!0,breaks:!0});var kh=new se.Renderer;kh.link=({href:t,text:e})=>`<a href="${t}" target="_blank" rel="noopener noreferrer">${e}</a>`;kh.html=()=>"";se.use({renderer:kh});function yl(t){if(!t)return"";let e=se.parse(t,{async:!1});return Qw.sanitize(e,{ALLOWED_TAGS:["p","br","strong","b","em","i","s","del","code","pre","a","ul","ol","li","h1","h2","h3","h4","h5","h6","blockquote","span"],ALLOWED_ATTR:["href","target","rel","class"]})}var xl=class{#e;#t;#i="";#n;#a;#o=new Map;constructor(e){this.#e=e}handle(e){if(e.event==="view_available"){this.#e.renderView(e.data),this.#e.element.dispatchEvent(new CustomEvent("assistant-view-available",{detail:e.data}));return}if(e.event==="unrecognized")return;let{event:n,data:a}=e;if(n==="session_started"){bl(a.configuration)&&this.#e.applyConfiguration(a.configuration),this.#e.element.dispatchEvent(new CustomEvent("assistant-session-started",{detail:{expiresAt:String(a.expiresAt??"")}}));return}if(n==="session_expired"){this.#e.element.dispatchEvent(new CustomEvent("assistant-session-expired"));return}if(n==="session_reset"){this.resetConversation();return}if(n==="context_changed"){this.#e.element.dispatchEvent(new CustomEvent("assistant-context-changed",{detail:{context:a.context}}));return}if(n==="model_context_changed"){this.#e.element.dispatchEvent(new CustomEvent("assistant-model-context-changed",{detail:{modelContext:a.modelContext}}));return}if(n==="message_started"){this.#d("message"),this.#e.appendMessage("user",String(a.message??""))&&this.#e.revealLatest(),this.#e.element.dispatchEvent(new CustomEvent("assistant-message-started"));return}if(n==="message_completed"){if(this.#a!=="message")return;this.#s(),this.#e.element.dispatchEvent(new CustomEvent("assistant-message-completed"));return}if(n==="interaction_started"){this.#d("interaction"),this.#n=void 0;return}if(n==="interaction_completed"){if(this.#a!=="interaction")return;this.#r(String(a.id??""),String(a.action??"accept"));return}if(n==="content"){this.#p(String(a.delta??""));return}if(n==="tool_proposed"||n==="interaction_proposed"){this.#l(String(a.id??""),String(a.tool??"action"),bl(a.arguments)?a.arguments:void 0,typeof a.title=="string"?a.title:void 0,"description"in a&&typeof a.description=="string"?a.description:void 0,"reviewSchema"in a&&bl(a.reviewSchema)?a.reviewSchema:void 0);return}if(n==="input_requested"&&bl(a.requestedSchema)){this.#u(String(a.id??""),String(a.message??"More information is required"),a.requestedSchema);return}if(n==="tool_completed"){this.#n=a;return}n==="error"&&(this.#s(),this.#e.dispatchError({code:String(a.code??"stream_failed"),...typeof a.status=="number"?{status:a.status}:{},retryable:a.retryable===!0}))}resetConversation(){let e=this.#e.messages();e?.replaceChildren(),e&&(e.scrollTop=0),this.#o.clear(),this.#s(),this.#n=void 0,this.#e.element.removeAttribute("has-messages"),this.#e.revealLatest(),this.#e.element.dispatchEvent(new CustomEvent("assistant-session-reset"))}#r(e,n){if(this.#n&&!this.#t){let a=this.#e.messages();if(a){let r=this.#e.labels();a.append(Pw(this.#n.result,r.completed,r.redacted)),this.#e.revealLatest()}}this.#o.get(e)?.remove(),this.#o.delete(e),n==="accept"&&this.#e.element.dispatchEvent(new CustomEvent("assistant-tool-completed",{detail:{id:e}})),this.#e.element.dispatchEvent(new CustomEvent("assistant-interaction-resolved",{detail:{id:e,action:n}})),this.#s(),this.#n=void 0}#l(e,n,a,r,o,i){let s=this.#e.messages();if(!s||!e)return;this.#o.get(e)?.remove();let c=this.#e.labels(),u=Cw({tool:n,...r?{title:r}:{},...o?{description:o}:{},...a?{arguments:a}:{},...i?{reviewSchema:i}:{},labels:{heading:c.confirmationHeading,accept:c.confirm,decline:c.decline,details:c.additionalDetails,redacted:c.redacted},respond:d=>this.#e.respond(e,{action:d})});s.append(u),this.#o.set(e,u),this.#e.revealLatest(),this.#e.element.dispatchEvent(new CustomEvent("assistant-tool-proposed",{detail:{id:e,tool:n,title:r,description:o,arguments:a,reviewSchema:i}}))}#u(e,n,a){let r=this.#e.messages();if(!r||!e)return;this.#o.get(e)?.remove();let o=this.#e.labels(),i=$w({message:n,requestedSchema:a,labels:{submit:o.confirm,decline:"Decline",cancel:o.cancel},respond:s=>this.#e.respond(e,s)});r.append(i),this.#o.set(e,i),this.#e.revealLatest(),this.#e.element.dispatchEvent(new CustomEvent("assistant-input-requested",{detail:{id:e,message:n,requestedSchema:a}}))}#d(e){this.#t=void 0,this.#i="",this.#a=e}#s(){this.#t?.parentElement?.classList.remove("streaming"),this.#t=void 0,this.#i="",this.#a=void 0}#p(e){if(!this.#a||!e)return;this.#i+=e;let n=yl(this.#i);if(!n)return;let a=this.#t??this.#e.appendMessage("assistant","");this.#t=a,a&&(a.parentElement?.classList.add("streaming"),a.innerHTML=n,this.#e.element.setAttribute("has-messages",""),this.#e.revealLatest())}};function bl(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function gk(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function vk(t,e){return typeof e!="number"?e:t==="lineHeight"||t==="motionScale"?String(e):`${e}px`}function Uo(t){return t.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;")}function we(t,e){let n=t.querySelector(e);if(!n)throw new Error(`assistant renderer is missing ${e}`);return n}var _l=class{#e;#t;#i;#n;#a;#o=!1;#r=!0;#l=0;connect(e){this.disconnect(),this.#e=e.region,this.#t=e.messages,this.#i=e.control,this.#l=e.messages.scrollTop,this.#r=this.#s()<=30,e.messages.addEventListener("scroll",this.#u,{passive:!0}),e.control.addEventListener("click",this.#d),globalThis.MutationObserver&&(this.#n=new MutationObserver(()=>this.#p()),this.#n.observe(e.messages,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]})),globalThis.ResizeObserver&&(this.#a=new ResizeObserver(()=>this.#p()),this.#a.observe(e.messages)),this.sync()}disconnect(){this.#t?.removeEventListener("scroll",this.#u),this.#i?.removeEventListener("click",this.#d),this.#n?.disconnect(),this.#a?.disconnect(),this.#e?.removeAttribute("data-can-scroll-up"),this.#e?.removeAttribute("data-can-scroll-down"),this.#e=void 0,this.#t=void 0,this.#i=void 0,this.#n=void 0,this.#a=void 0,this.#o=!1,this.#r=!0,this.#l=0}revealLatest(){if(this.#t){if(this.#r||this.#s()<=160){this.scrollToBottom();return}this.sync()}}scrollToBottom(){this.#t&&(this.#r=!0,this.#t.scrollTop=this.#t.scrollHeight,this.sync())}sync(){if(!this.#t||!this.#e||!this.#i)return;let e=this.#s();this.#e.toggleAttribute("data-can-scroll-up",this.#t.scrollTop>20),this.#e.toggleAttribute("data-can-scroll-down",e>20),this.#i.hidden=e<=100}#u=()=>{if(!this.#t)return;let e=this.#s(),n=this.#t.scrollTop<this.#l-5;this.#l=this.#t.scrollTop,n&&e>50&&(this.#r=!1),e<30&&(this.#r=!0),this.sync()};#d=()=>{this.scrollToBottom()};#s(){return this.#t?this.#t.scrollHeight-this.#t.scrollTop-this.#t.clientHeight:0}#p(){this.#o||(this.#o=!0,queueMicrotask(()=>{this.#o=!1,this.#r?this.scrollToBottom():this.sync()}))}};var yk=`<style>
209
+ *, *::before, *::after { box-sizing: border-box; }
210
+ .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
211
+ .visually-hidden[hidden] { display: none !important; }
212
+ :host { color-scheme: light dark; font-family: var(--ns-assistant-font-family, var(--ns-assistant-default-font-family)); font-size: var(--ns-assistant-base-font-size, var(--ns-assistant-default-base-font-size)); line-height: var(--ns-assistant-line-height, var(--ns-assistant-default-line-height)); z-index: var(--ns-assistant-z-index, var(--ns-assistant-default-z-index)); -webkit-font-smoothing: antialiased; }
213
+ :host([data-mode="floating"]) { position: fixed; bottom: 20px; right: 20px; }
214
+ :host([data-mode="floating"][data-position="bottom-left"]) { right: auto; left: 20px; }
215
+ button { font: inherit; }
216
+ button, textarea, input, select { -webkit-tap-highlight-color: transparent; }
217
+ .launcher { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--ns-assistant-launcher-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: 999px; color: var(--ns-assistant-launcher-text, var(--ns-assistant-text, var(--ns-assistant-default-text))); background: var(--ns-assistant-launcher, var(--ns-assistant-panel, var(--ns-assistant-default-panel))); box-shadow: 0 8px 28px rgba(0,0,0,.14); cursor: pointer; transition: transform .24s cubic-bezier(.25,1,.5,1), box-shadow .2s ease; }
218
+ .launcher:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 26px rgba(0,0,0,.16); }
219
+ .launcher img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; }
220
+ .panel { display: none; flex-direction: column; width: min(var(--ns-assistant-panel-width, var(--ns-assistant-default-panel-width)), calc(100vw - 40px)); min-height: var(--ns-assistant-min-height, var(--ns-assistant-default-min-height)); max-height: min(var(--ns-assistant-max-height, var(--ns-assistant-default-max-height)), calc(100vh - 40px)); overflow: hidden; color: var(--ns-assistant-panel-text, var(--ns-assistant-text, var(--ns-assistant-default-text))); background: var(--ns-assistant-panel, var(--ns-assistant-default-panel)); border: 1px solid var(--ns-assistant-panel-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: var(--ns-assistant-panel-radius, var(--ns-assistant-default-panel-radius)); box-shadow: var(--ns-assistant-shadow, var(--ns-assistant-default-shadow)); transform-origin: bottom right; isolation: isolate; animation: halo-panel-in .28s cubic-bezier(.23,1,.32,1) both; }
221
+ :host([open]) .panel { display: flex; }
222
+ .panel { position: relative; }
223
+ :host([open]) .launcher { display: none; }
224
+ header { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; min-height: 64px; padding: 12px 18px; color: var(--ns-assistant-header-text, inherit); background: var(--ns-assistant-header, transparent); border-bottom: 1px solid color-mix(in srgb, var(--ns-assistant-header-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))) 78%, transparent); }
225
+ header strong { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: 0; }
226
+ .brand-logo { display: block; max-width: 120px; max-height: 28px; object-fit: contain; }
227
+ .close, .send { display: grid; place-items: center; border: 0; border-radius: var(--ns-assistant-button-radius, var(--ns-assistant-default-button-radius)); cursor: pointer; }
228
+ .close { position: relative; width: 44px; height: 44px; padding: 0; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); background: transparent; transition: background .15s ease, color .15s ease, transform .15s ease; }
229
+ .close::before { content: ''; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
230
+ .close:hover { color: var(--ns-assistant-text, var(--ns-assistant-default-text)); background: var(--ns-assistant-elevated, var(--ns-assistant-default-elevated)); }
231
+ .close:active { transform: scale(.96); }
232
+ .welcome { flex: 0 0 auto; padding: 30px 22px 18px; }
233
+ .welcome h2 { margin: 0; font-size: 1.35em; line-height: 1.25; letter-spacing: 0; }
234
+ .welcome p { max-width: 42ch; margin: 7px 0 0; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); }
235
+ :host([has-messages]) .welcome, :host([has-messages]) .suggested-prompts { display: none; }
236
+ .suggested-prompts { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px; }
237
+ .suggested-prompts:empty { display: none; }
238
+ .suggested-prompts button { min-height: 44px; padding: 8px 14px; color: var(--ns-assistant-suggestion-text, var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text))); background: var(--ns-assistant-suggestion, color-mix(in srgb, var(--ns-assistant-input, var(--ns-assistant-default-input)) 58%, transparent)); border: 1px solid var(--ns-assistant-suggestion-border, color-mix(in srgb, var(--ns-assistant-divider, var(--ns-assistant-default-divider)) 82%, transparent)); border-radius: 999px; cursor: pointer; font-size: .86em; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
239
+ .suggested-prompts button:hover { color: var(--ns-assistant-text, var(--ns-assistant-default-text)); background: var(--ns-assistant-elevated, var(--ns-assistant-default-elevated)); transform: translateY(-1px); }
240
+ .messages-region { position: relative; display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; }
241
+ .messages-region::before, .messages-region::after { content: ''; position: absolute; right: 0; left: 0; z-index: 1; height: 18px; pointer-events: none; opacity: 0; transition: opacity .18s ease; }
242
+ .messages-region::before { top: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--ns-assistant-panel, var(--ns-assistant-default-panel)) 92%, transparent), transparent); }
243
+ .messages-region::after { bottom: 0; background: linear-gradient(to top, color-mix(in srgb, var(--ns-assistant-panel, var(--ns-assistant-default-panel)) 92%, transparent), transparent); }
244
+ .messages-region[data-can-scroll-up]::before, .messages-region[data-can-scroll-down]::after { opacity: 1; }
245
+ .messages { flex: 1 1 auto; width: 100%; min-height: 0; padding: 18px 20px 24px; overflow-y: auto; background: var(--ns-assistant-canvas, transparent); overscroll-behavior: contain; scroll-behavior: smooth; }
246
+ .messages::-webkit-scrollbar { width: 6px; }
247
+ .messages::-webkit-scrollbar-thumb { background: var(--ns-assistant-divider, var(--ns-assistant-default-divider)); border-radius: 999px; }
248
+ .message { width: fit-content; max-width: 88%; margin: 0 0 14px; padding: 0; border-radius: var(--ns-assistant-card-radius, var(--ns-assistant-default-card-radius)); background: transparent; white-space: pre-wrap; animation: halo-message-in .2s ease both; }
249
+ .message > span, .message > .markdown { overflow-wrap: anywhere; }
250
+ .message .avatar { float: left; width: 24px; height: 24px; margin-right: 9px; border-radius: 50%; object-fit: cover; }
251
+ .message time { display: block; margin-top: 4px; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); font-size: .75em; line-height: 1.2; }
252
+ .message-copy { min-width: 44px; min-height: 32px; margin-top: 6px; padding: 4px 10px; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); background: transparent; border: 0; border-radius: var(--ns-assistant-button-radius, var(--ns-assistant-default-button-radius)); cursor: pointer; font-size: .78em; opacity: 0; transition: opacity .15s ease, background .15s ease; }
253
+ .message:hover .message-copy, .message:focus-within .message-copy { opacity: 1; }
254
+ .conversation-status { margin: 4px auto 14px; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); font-size: .82em; text-align: center; }
255
+ .conversation-error { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 8px 0 16px; padding: 12px 14px; color: var(--ns-assistant-danger, var(--ns-assistant-default-danger)); border: 1px solid color-mix(in srgb, var(--ns-assistant-danger, var(--ns-assistant-default-danger)) 28%, transparent); border-radius: var(--ns-assistant-card-radius, var(--ns-assistant-default-card-radius)); background: color-mix(in srgb, var(--ns-assistant-danger, var(--ns-assistant-default-danger)) 7%, transparent); }
256
+ .conversation-error p { margin: 0; }
257
+ .conversation-error button { min-height: 44px; padding: 8px 14px; color: var(--ns-assistant-secondary-button-text, inherit); background: var(--ns-assistant-secondary-button, var(--ns-assistant-elevated, var(--ns-assistant-default-elevated))); border: 1px solid var(--ns-assistant-secondary-button-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: var(--ns-assistant-button-radius, var(--ns-assistant-default-button-radius)); cursor: pointer; font-weight: 600; }
258
+ .new-messages { position: absolute; left: 50%; bottom: 14px; z-index: 2; width: 44px; height: 44px; padding: 0; color: var(--ns-assistant-secondary-button-text, var(--ns-assistant-text, var(--ns-assistant-default-text))); background: var(--ns-assistant-secondary-button, color-mix(in srgb, var(--ns-assistant-input, var(--ns-assistant-default-input)) 92%, transparent)); border: 1px solid var(--ns-assistant-secondary-button-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: var(--ns-assistant-button-radius, var(--ns-assistant-default-button-radius)); box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateX(-50%); cursor: pointer; }
259
+ .new-messages::before { content: ''; display: block; width: 18px; height: 18px; margin: auto; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
260
+ .message.assistant { max-width: 100%; color: var(--ns-assistant-assistant-message-text, inherit); background: var(--ns-assistant-assistant-message, transparent); border: 1px solid var(--ns-assistant-assistant-message-border, transparent); }
261
+ .message.user { display: grid; max-width: 85%; justify-items: start; gap: 3px; margin-left: auto; padding: 10px 16px 8px; color: var(--ns-assistant-user-message-text, var(--ns-assistant-text, var(--ns-assistant-default-text))); background: var(--ns-assistant-user-message, var(--ns-assistant-elevated, var(--ns-assistant-default-elevated))); border: 1px solid var(--ns-assistant-user-message-border, transparent); border-radius: var(--ns-assistant-card-radius, var(--ns-assistant-default-card-radius)); font-size: .94em; }
262
+ .message.user time { margin-top: 0; }
263
+ .markdown { white-space: normal; }
264
+ .markdown p { margin: 0 0 8px; }
265
+ .markdown p:last-child { margin-bottom: 0; }
266
+ .markdown strong, .markdown b { font-weight: 650; }
267
+ .markdown em, .markdown i { font-style: italic; }
268
+ .markdown a { color: var(--ns-assistant-link, var(--ns-assistant-default-link)); text-decoration: underline; text-underline-offset: 2px; }
269
+ .markdown a:hover { opacity: .8; }
270
+ .markdown code { padding: 2px 6px; color: var(--ns-assistant-code-text, inherit); border: 1px solid var(--ns-assistant-code-border, transparent); border-radius: 5px; background: var(--ns-assistant-code, var(--ns-assistant-default-code)); font-family: var(--ns-assistant-mono-font-family, var(--ns-assistant-default-mono-font-family)); font-size: .87em; }
271
+ .markdown pre { margin: 10px 0; padding: 12px 14px; overflow-x: auto; color: var(--ns-assistant-code-text, inherit); border: 1px solid var(--ns-assistant-code-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: 10px; background: var(--ns-assistant-code, var(--ns-assistant-default-code)); white-space: pre; }
272
+ .markdown pre code { padding: 0; background: transparent; font-size: .86em; }
273
+ .markdown ul, .markdown ol { margin: 8px 0; padding-left: 22px; }
274
+ .markdown li { margin: 3px 0; }
275
+ .markdown blockquote { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--ns-assistant-divider, var(--ns-assistant-default-divider)); color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); }
276
+ .markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 { margin: 14px 0 7px; line-height: 1.25; letter-spacing: 0; }
277
+ .markdown h1:first-child, .markdown h2:first-child, .markdown h3:first-child { margin-top: 0; }
278
+ .markdown h1 { font-size: 1.3em; } .markdown h2 { font-size: 1.18em; } .markdown h3 { font-size: 1.08em; }
279
+ .message.assistant.streaming .markdown::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 3px; border-radius: 999px; background: var(--ns-assistant-accent, var(--ns-assistant-default-accent)); vertical-align: -.14em; animation: halo-caret-blink 1s steps(2, start) infinite; }
280
+ .message.thinking > span { display: inline-block; color: transparent; background: linear-gradient(90deg, var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)) 25%, var(--ns-assistant-text, var(--ns-assistant-default-text)) 50%, var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)) 75%); background-size: 300% 100%; background-clip: text; -webkit-background-clip: text; font-style: italic; font-weight: 500; animation: halo-shimmer 2s linear infinite; }
281
+ .tool-proposal { display: grid; gap: 12px; align-items: start; margin: 8px 0 16px; padding: 18px; color: var(--ns-assistant-confirmation-text, inherit); border: 1px solid var(--ns-assistant-confirmation-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: var(--ns-assistant-card-radius, 14px); background: var(--ns-assistant-confirmation, var(--ns-assistant-input, var(--ns-assistant-default-input))); animation: halo-message-in .2s ease both; }
282
+ .proposal-eyebrow { color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
283
+ .tool-proposal h3 { margin: -4px 0 0; font-size: 1.08em; line-height: 1.3; letter-spacing: 0; }
284
+ .proposal-description { margin: -4px 0 0; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); }
285
+ .proposal-arguments { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: 8px 14px; margin: 0; padding: 12px 0; border-block: 1px solid var(--ns-assistant-divider, var(--ns-assistant-default-divider)); font-size: .9em; }
286
+ .proposal-arguments .proposal-arguments { grid-column: 1 / -1; padding: 4px 0 0; border: 0; }
287
+ .proposal-arguments dt { color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); }
288
+ .proposal-arguments dt small { display: block; margin-top: 2px; font-size: .85em; line-height: 1.35; }
289
+ .proposal-arguments dd { margin: 0; overflow-wrap: anywhere; }
290
+ .proposal-details { color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); font-size: .86em; }
291
+ .proposal-details summary { min-height: 36px; padding: 8px 0; cursor: pointer; font-weight: 600; }
292
+ .proposal-details .proposal-arguments { margin-top: 4px; }
293
+ .proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; }
294
+ .tool-proposal button { min-height: 44px; padding: 9px 16px; border: 1px solid var(--ns-assistant-secondary-button-border, transparent); border-radius: var(--ns-assistant-button-radius, var(--ns-assistant-default-button-radius)); color: var(--ns-assistant-secondary-button-text, var(--ns-assistant-text, var(--ns-assistant-default-text))); background: var(--ns-assistant-secondary-button, var(--ns-assistant-elevated, var(--ns-assistant-default-elevated))); cursor: pointer; font-weight: 600; }
295
+ .tool-proposal .proposal-accept { color: var(--ns-assistant-primary-button-text, var(--ns-assistant-accent-text, var(--ns-assistant-default-accent-text))); background: var(--ns-assistant-primary-button, var(--ns-assistant-accent, var(--ns-assistant-default-accent))); border-color: var(--ns-assistant-primary-button-border, transparent); }
296
+ .tool-proposal button:disabled { opacity: .55; cursor: not-allowed; }
297
+ .tool-proposal button { min-height: 45px; }
298
+ .tool-result { display: grid; gap: 10px; margin: 8px 0 16px; padding: 16px; border: 1px solid var(--ns-assistant-divider, var(--ns-assistant-default-divider)); border-radius: var(--ns-assistant-card-radius, 14px); background: var(--ns-assistant-assistant-message, var(--ns-assistant-elevated, var(--ns-assistant-default-elevated))); }
299
+ .tool-result > strong { color: var(--ns-assistant-success, var(--ns-assistant-default-success)); }
300
+ .input-request form { display: grid; gap: 10px; align-items: stretch; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
301
+ .input-request form:focus-within { box-shadow: none; }
302
+ .input-request label { display: grid; gap: 4px; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); font-size: .9em; }
303
+ .input-request input, .input-request select { width: 100%; min-height: 44px; padding: 8px 14px; color: var(--ns-assistant-text, var(--ns-assistant-default-text)); background: var(--ns-assistant-input, var(--ns-assistant-default-input)); border: 1px solid var(--ns-assistant-divider, var(--ns-assistant-default-divider)); border-radius: var(--ns-assistant-input-radius, var(--ns-assistant-default-input-radius)); outline: 0; font: inherit; }
304
+ .input-request select[multiple] { min-height: 88px; border-radius: var(--ns-assistant-card-radius, var(--ns-assistant-default-card-radius)); }
305
+ .input-request input[type="checkbox"] { width: auto; min-height: auto; justify-self: start; accent-color: var(--ns-assistant-accent, var(--ns-assistant-default-accent)); }
306
+ .input-request input:focus-visible, .input-request select:focus-visible { border-color: var(--ns-assistant-focus, var(--ns-assistant-default-focus)); box-shadow: 0 0 0 2px var(--ns-assistant-focus, var(--ns-assistant-default-focus)); }
307
+ .input-request .proposal-actions { margin-top: 2px; }
308
+ .noodle-app-card { position: relative; display: grid; gap: 8px; width: 100%; margin: 4px 0 16px; overflow: hidden; color: var(--ns-assistant-app-text, inherit); border: 1px solid var(--ns-assistant-app-border, var(--ns-assistant-divider, var(--ns-assistant-default-divider))); border-radius: var(--ns-assistant-card-radius, var(--ns-assistant-default-card-radius)); background: var(--ns-assistant-app, var(--ns-assistant-elevated, var(--ns-assistant-default-elevated))); }
309
+ .noodle-app-title { padding: 10px 12px 0; font-size: .86em; font-weight: 650; }
310
+ .noodle-app-frame { display: block; width: 100%; min-height: 120px; border: 0; background: transparent; }
311
+ .noodle-app-fallback { padding: 14px 16px; font-size: 13px; color: var(--ns-assistant-muted, var(--ns-assistant-default-muted, #6b7280)); }
312
+ .noodle-app-card[data-fullscreen] { position: fixed; inset: 0; z-index: 2; margin: 0; border-radius: 0; background: var(--ns-assistant-panel, var(--ns-assistant-default-panel)); }
313
+ .noodle-app-card[data-fullscreen] .noodle-app-frame { height: 100% !important; }
314
+ form { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; min-height: 56px; margin: 8px 16px 16px; padding: 6px 6px 6px 16px; color: var(--ns-assistant-composer-text, inherit); border: 1px solid var(--ns-assistant-composer-border, color-mix(in srgb, var(--ns-assistant-divider, var(--ns-assistant-default-divider)) 86%, transparent)); border-radius: var(--ns-assistant-input-radius, var(--ns-assistant-default-input-radius)); background: var(--ns-assistant-composer, color-mix(in srgb, var(--ns-assistant-input, var(--ns-assistant-default-input)) 92%, transparent)); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.035); transition: border-color .15s ease, box-shadow .15s ease; }
315
+ form:focus-within { box-shadow: inset 0 0 0 1px var(--ns-assistant-focus, var(--ns-assistant-default-focus)), 0 0 0 2px var(--ns-assistant-focus, var(--ns-assistant-default-focus)); }
316
+ textarea { flex: 1; min-height: 24px; max-height: 120px; resize: none; padding: 0; color: var(--ns-assistant-text, var(--ns-assistant-default-text)); background: transparent; border: 0; border-radius: 0; outline: 0; box-shadow: none; appearance: none; -webkit-appearance: none; font: inherit; font-size: 16px; line-height: 24px; }
317
+ textarea::placeholder { color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); }
318
+ textarea:focus, textarea:focus-visible { outline: none; box-shadow: none; }
319
+ button:focus-visible { outline: 3px solid var(--ns-assistant-focus, var(--ns-assistant-default-focus)); outline-offset: 2px; }
320
+ .send { position: relative; display: block; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; overflow: hidden; color: transparent; border-radius: 999px; background: var(--ns-assistant-primary-button, var(--ns-assistant-accent, var(--ns-assistant-default-accent))); font-size: 0; line-height: 0; transition: transform .15s ease, background .15s ease; }
321
+ .send::before { content: ''; position: absolute; top: 50%; left: 50%; width: 17px; height: 17px; background: var(--ns-assistant-primary-button-text, var(--ns-assistant-accent-text, var(--ns-assistant-default-accent-text))); transform: translate(-50%, -50%); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
322
+ .send:hover { transform: scale(1.05); background: var(--ns-assistant-hover, color-mix(in srgb, var(--ns-assistant-primary-button, var(--ns-assistant-accent, var(--ns-assistant-default-accent))) 88%, var(--ns-assistant-primary-button-text, var(--ns-assistant-accent-text, var(--ns-assistant-default-accent-text))) 12%)); }
323
+ :host([busy]) .send::before { width: 13px; height: 13px; border-radius: 3px; -webkit-mask: none; mask: none; }
324
+ .send:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
325
+ .legal { display: flex; gap: 12px; justify-content: center; padding: 0 12px 9px; font-size: .75em; }
326
+ .legal:empty { display: none; }
327
+ .legal a { color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); text-underline-offset: 2px; }
328
+ ::slotted([slot="conversation-footer"]) { display: block; padding: 0 16px 12px; color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); font-size: 11px; text-align: center; }
329
+ @keyframes halo-panel-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
330
+ @keyframes halo-message-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
331
+ @keyframes halo-shimmer { from { background-position: 100% center; } to { background-position: 0 center; } }
332
+ @keyframes halo-caret-blink { 50% { opacity: 0; } }
333
+ :host([data-density="compact"]) .welcome { padding: 20px 18px 12px; }
334
+ @media (max-width: 640px) { :host([mobile-fullscreen][open]) { inset: 0; } :host([mobile-fullscreen][open]) .panel { width: 100vw; min-height: 100vh; max-height: 100vh; border: 0; border-radius: 0; } :host([mobile-fullscreen]) header { padding-top: max(12px, env(safe-area-inset-top)); padding-right: max(18px, env(safe-area-inset-right)); padding-left: max(18px, env(safe-area-inset-left)); } :host([mobile-fullscreen]) form { margin-right: max(16px, env(safe-area-inset-right)); margin-bottom: max(16px, env(safe-area-inset-bottom)); margin-left: max(16px, env(safe-area-inset-left)); } :host([mobile-fullscreen]) .legal, :host([mobile-fullscreen]) ::slotted([slot="conversation-footer"]) { padding-bottom: max(10px, env(safe-area-inset-bottom)); } }
335
+ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } .messages { scroll-behavior: auto; } .message.assistant.streaming .markdown::after { animation: none; } }
336
+ @media (forced-colors: active) { .message.thinking > span { color: CanvasText; background: none; } }
337
+ @media (hover: none) { .message-copy { opacity: 1; } }
338
+ @media (max-width: 560px) { :host([data-mode="floating"]) { inset: auto 12px 12px; } :host([open]) .panel { width: calc(100vw - 24px); max-height: calc(100vh - 24px); } }
339
+ </style>`;var xk={canvas:"--ns-assistant-canvas",text:"--ns-assistant-text",mutedText:"--ns-assistant-muted-text",link:"--ns-assistant-link",focus:"--ns-assistant-focus",success:"--ns-assistant-success",warning:"--ns-assistant-warning",danger:"--ns-assistant-danger"},_k={panel:"--ns-assistant-panel",header:"--ns-assistant-header",assistantMessage:"--ns-assistant-assistant-message",userMessage:"--ns-assistant-user-message",composer:"--ns-assistant-composer",suggestion:"--ns-assistant-suggestion",confirmation:"--ns-assistant-confirmation",primaryButton:"--ns-assistant-primary-button",secondaryButton:"--ns-assistant-secondary-button",launcher:"--ns-assistant-launcher",code:"--ns-assistant-code",app:"--ns-assistant-app"},BL=[...Object.values(xk),...Object.values(_k).flatMap(t=>[t,`${t}-text`,`${t}-border`])];function wk(t,e,n,a=new Map){for(let[o,i]of a)i.value?t.setProperty(o,i.value,i.priority):t.removeProperty(o);a.clear();let r=e?.[n];if(!r)return[];for(let[o,i]of Object.entries(xk)){let s=r[o];typeof s=="string"&&wl(t,a,i,s)}for(let[o,i]of Object.entries(_k)){let s=r[o];!s||typeof s!="object"||(s.surface&&wl(t,a,i,s.surface),s.text&&wl(t,a,`${i}-text`,s.text),s.border&&wl(t,a,`${i}-border`,s.border))}return mP(r,n)}function wl(t,e,n,a){e.set(n,{value:t.getPropertyValue(n),priority:t.getPropertyPriority(n)}),t.setProperty(n,a)}function mP(t,e){let n=[],a=[["panel",t.panel?.text??t.text,t.panel?.surface??t.canvas],["userMessage",t.userMessage?.text??t.text,t.userMessage?.surface],["composer",t.composer?.text??t.text,t.composer?.surface],["confirmation",t.confirmation?.text??t.text,t.confirmation?.surface],["primaryButton",t.primaryButton?.text,t.primaryButton?.surface]];for(let[r,o,i]of a){if(!o||!i)continue;let s=fP(o,i);s===void 0||s>=4.5||n.push({code:"low_contrast",theme:e,role:r,foreground:o,background:i,contrastRatio:Math.round(s*100)/100,recommendedRatio:4.5})}return n}function fP(t,e){let n=bk(t),a=bk(e);if(n===void 0||a===void 0)return;let r=Math.max(n,a),o=Math.min(n,a);return(r+.05)/(o+.05)}function bk(t){let e=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!e)return;let n=e.slice(1).map(a=>{let r=Number.parseInt(a,16)/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4});return .2126*(n[0]??0)+.7152*(n[1]??0)+.0722*(n[2]??0)}function kk(t,e,n,a,r){let o=n.presentation;t.dataset.panelSurface=o.panel.surface,t.dataset.panelElevation=o.panel.elevation,t.dataset.panelBorder=o.panel.border,t.dataset.launcherEffect=o.launcher.effect,t.dataset.messageUserStyle=o.messages.userStyle,t.dataset.messageAssistantStyle=o.messages.assistantStyle,t.dataset.sessionState=r;let i=o.panel.radius;i===void 0?t.style.removeProperty("--ns-assistant-presentation-panel-radius"):t.style.setProperty("--ns-assistant-presentation-panel-radius",`${i}px`),t.style.setProperty("--ns-assistant-presentation-launcher-size",o.launcher.size==="lg"?"56px":"48px"),t.style.setProperty("--ns-assistant-presentation-panel-background",o.panel.surface==="solid"?"var(--ns-assistant-panel, var(--ns-assistant-default-panel))":"color-mix(in srgb, var(--ns-assistant-panel, var(--ns-assistant-default-panel)) 88%, transparent)"),t.style.setProperty("--ns-assistant-presentation-shadow",hP(o.panel.elevation)),t.style.setProperty("--ns-assistant-presentation-border",gP(o.panel.border)),oa(e,"launcher-icon",[vP(n,a,r)]);let s=e.querySelector("[data-session-status]");s&&(s.hidden=o.launcher.status!=="session",s.textContent=Tk(n,r)),oa(e,"header-leading",yP(n,a)),oa(e,"header-actions",bP(n)),oa(e,"empty-state",[xP(n)]),oa(e,"composer-leading",_P(n,a)),oa(e,"conversation-footer",[]);let c=e.querySelector("form");c&&(c.dataset.shape=o.composer.shape);let u=e.querySelector(".send");u&&(u.dataset.icon=o.composer.sendIcon)}function Sk(t,e,n,a){t.dataset.sessionState=n,e?.querySelectorAll("[data-session-indicator]").forEach(r=>{r.dataset.state=n}),e?.querySelectorAll("[data-session-status]").forEach(r=>{r.textContent=Tk(a,n)})}function hP(t){return t==="dramatic"?"0 34px 100px color-mix(in srgb, var(--ns-assistant-overlay, var(--ns-assistant-default-overlay)) 72%, transparent)":"var(--ns-assistant-default-shadow)"}function gP(t){return t==="strong"?"1px solid var(--ns-assistant-divider, var(--ns-assistant-default-divider))":"1px solid color-mix(in srgb, var(--ns-assistant-divider, var(--ns-assistant-default-divider)) 74%, transparent)"}function vP(t,e,n){let a=t.presentation.launcher,r=document.createElement("span");if(r.className="launcher-visual",r.setAttribute("aria-hidden","true"),r.append(Sh(a.icon,t,e,"launcher-glyph")),a.status==="session"){let o=document.createElement("span");o.className="launcher-status",o.dataset.sessionIndicator="",o.dataset.state=n,r.append(o)}return r}function Tk(t,e){return e==="loading"?t.labels.sessionLoading:e==="ready"?t.labels.sessionReady:e==="error"?t.labels.sessionError:t.labels.sessionIdle}function yP(t,e){let n=t.presentation.header.mark;if(n==="none")return[];let a=document.createElement("span");if(a.className="header-mark",a.dataset.variant=n,a.setAttribute("aria-hidden","true"),n==="brand-mark")a.append(Sh("brand-mark",t,e,"header-mark-glyph"));else{let r=document.createElement("span");r.className="header-mark-core",a.append(r)}return[a]}function bP(t){let e=t.presentation.header;if(!e.badge)return[];let n=document.createElement("div");n.className="header-actions";let a=document.createElement("span");a.className="header-badge",a.dataset.tone=e.badge.tone,e.badge.indicator&&a.append(wP(e.badge.tone));let r=document.createElement("span");return r.textContent=e.badge.text,a.append(r),n.append(a),[n]}function xP(t){let e=document.createElement("section");e.className="empty-state";let n=document.createElement("h2");n.textContent=t.labels.welcomeHeading,e.append(n);let a=t.labels.welcomeMessage;if(a){let r=document.createElement("p");r.textContent=a,e.append(r)}return e}function _P(t,e){let n=t.presentation.composer.leadingIcon;if(n==="none")return[];let a=document.createElement("span");return a.className="composer-leading",a.dataset.icon=n,a.setAttribute("aria-hidden","true"),a.append(Sh(n,t,e,"composer-leading-glyph")),[a]}function wP(t){let e=document.createElement("i");return e.className="tone-indicator",e.dataset.tone=t,e.setAttribute("aria-hidden","true"),e}function Sh(t,e,n,a){let r=e.brand.mark[n];if(t==="brand-mark"&&r){let i=document.createElement("img");return i.className=a,i.src=r,i.alt="",i}let o=document.createElement("span");return o.className=a,o.dataset.icon=t==="brand-mark"?"sparkles":t,o.setAttribute("aria-hidden","true"),o}function oa(t,e,n){t.querySelector(`slot[name="${e}"]`)?.replaceChildren(...n)}function $k(t){let{host:e,root:n,appearance:a,mode:r}=t;e.setAttribute("data-theme",r);for(let[c,u]of Object.entries(a.theme[r]))e.style.setProperty(`--ns-assistant-default-${gk(c)}`,vk(c,u));let o=wk(e.style,t.hostAppearance,r,t.styleSnapshot);e.style.setProperty("--ns-assistant-default-panel-width",`${a.layout.panelWidth}px`),e.style.setProperty("--ns-assistant-default-min-height",`${a.layout.panelMinHeight}px`),e.style.setProperty("--ns-assistant-default-max-height",`${a.layout.panelMaxHeight}px`),e.style.setProperty("--ns-assistant-default-z-index",String(a.layout.zIndex)),e.style.setProperty("--ns-assistant-default-edge-offset",`${a.layout.edgeOffset}px`);let i=n?.querySelector(".brand-logo"),s=a.brand.logo[r];return i&&(i.hidden=!s,s&&(i.src=s)),n&&kk(e,n,a,r,t.sessionState),o}var Ik=`<style>
340
+ :host([data-mode="floating"]) {
341
+ bottom: var(--ns-assistant-edge-offset, var(--ns-assistant-default-edge-offset));
342
+ right: var(--ns-assistant-edge-offset, var(--ns-assistant-default-edge-offset));
343
+ }
344
+ :host([data-mode="floating"][data-position="bottom-left"]) {
345
+ right: auto;
346
+ left: var(--ns-assistant-edge-offset, var(--ns-assistant-default-edge-offset));
347
+ }
348
+ .panel {
349
+ background: var(--ns-assistant-panel-background, var(--ns-assistant-presentation-panel-background));
350
+ border: var(--ns-assistant-panel-border, var(--ns-assistant-presentation-border));
351
+ border-radius: var(--ns-assistant-panel-radius, var(--ns-assistant-presentation-panel-radius, var(--ns-assistant-default-panel-radius)));
352
+ box-shadow: var(--ns-assistant-shadow, var(--ns-assistant-presentation-shadow));
353
+ backdrop-filter: blur(var(--ns-assistant-backdrop-blur, var(--ns-assistant-default-backdrop-blur)));
354
+ -webkit-backdrop-filter: blur(var(--ns-assistant-backdrop-blur, var(--ns-assistant-default-backdrop-blur)));
355
+ }
356
+ :host([data-panel-surface="solid"]) .panel {
357
+ backdrop-filter: none;
358
+ -webkit-backdrop-filter: none;
359
+ }
360
+
361
+ .launcher {
362
+ position: relative;
363
+ width: var(--ns-assistant-launcher-size, var(--ns-assistant-presentation-launcher-size));
364
+ height: var(--ns-assistant-launcher-size, var(--ns-assistant-presentation-launcher-size));
365
+ border-radius: var(--ns-assistant-launcher-radius, var(--ns-assistant-default-launcher-radius));
366
+ isolation: isolate;
367
+ }
368
+ :host([data-launcher-effect="pulse"]) .launcher {
369
+ animation: assistant-launcher-pulse 2s ease-in-out infinite;
370
+ }
371
+ .launcher-visual {
372
+ position: relative;
373
+ display: grid;
374
+ width: 100%;
375
+ height: 100%;
376
+ place-items: center;
377
+ border-radius: inherit;
378
+ }
379
+ .launcher-glyph, .composer-leading-glyph {
380
+ display: block;
381
+ width: 18px;
382
+ height: 18px;
383
+ background: currentColor;
384
+ -webkit-mask-position: center;
385
+ -webkit-mask-repeat: no-repeat;
386
+ -webkit-mask-size: contain;
387
+ mask-position: center;
388
+ mask-repeat: no-repeat;
389
+ mask-size: contain;
390
+ }
391
+ [data-icon="sparkles"] {
392
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 1.7 5.3L19 10l-5.3 1.7L12 17l-1.7-5.3L5 10l5.3-1.7L12 3Zm6 11 .8 2.2L21 17l-2.2.8L18 20l-.8-2.2L15 17l2.2-.8L18 14Z'/%3E%3C/svg%3E");
393
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 1.7 5.3L19 10l-5.3 1.7L12 17l-1.7-5.3L5 10l5.3-1.7L12 3Zm6 11 .8 2.2L21 17l-2.2.8L18 20l-.8-2.2L15 17l2.2-.8L18 14Z'/%3E%3C/svg%3E");
394
+ }
395
+ [data-icon="chat"] {
396
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v12H9l-5 4V4Zm4 5h8v2H8V9Z'/%3E%3C/svg%3E");
397
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v12H9l-5 4V4Zm4 5h8v2H8V9Z'/%3E%3C/svg%3E");
398
+ }
399
+ [data-icon="none"] { display: none; }
400
+ .launcher-glyph:is(img), .composer-leading-glyph:is(img), .header-mark-glyph:is(img) {
401
+ background: none;
402
+ object-fit: contain;
403
+ -webkit-mask: none;
404
+ mask: none;
405
+ }
406
+ .launcher-status {
407
+ position: absolute;
408
+ right: 1px;
409
+ bottom: 1px;
410
+ width: 10px;
411
+ height: 10px;
412
+ border: 2px solid var(--ns-assistant-panel, var(--ns-assistant-default-panel));
413
+ border-radius: 50%;
414
+ background: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text));
415
+ }
416
+ .launcher-status[data-state="loading"] {
417
+ background: var(--ns-assistant-warning, var(--ns-assistant-default-warning));
418
+ animation: assistant-launcher-pulse 1.2s ease-in-out infinite;
419
+ }
420
+ .launcher-status[data-state="ready"] {
421
+ background: var(--ns-assistant-success, var(--ns-assistant-default-success));
422
+ box-shadow: 0 0 9px color-mix(in srgb, var(--ns-assistant-success, var(--ns-assistant-default-success)) 70%, transparent);
423
+ }
424
+ .launcher-status[data-state="error"] {
425
+ background: var(--ns-assistant-danger, var(--ns-assistant-default-danger));
426
+ }
427
+
428
+ .header-mark {
429
+ position: relative;
430
+ display: grid;
431
+ width: 26px;
432
+ height: 26px;
433
+ flex: 0 0 26px;
434
+ place-items: center;
435
+ color: var(--ns-assistant-accent, var(--ns-assistant-default-accent));
436
+ }
437
+ .header-mark[data-variant="status"] .header-mark-core {
438
+ width: 9px;
439
+ height: 9px;
440
+ border-radius: 50%;
441
+ background: var(--ns-assistant-success, var(--ns-assistant-default-success));
442
+ box-shadow: 0 0 0 5px color-mix(in srgb, var(--ns-assistant-success, var(--ns-assistant-default-success)) 16%, transparent);
443
+ }
444
+ .header-mark-glyph {
445
+ width: 24px;
446
+ height: 24px;
447
+ object-fit: contain;
448
+ }
449
+ .header-actions {
450
+ display: flex;
451
+ align-items: center;
452
+ }
453
+ .header-badge {
454
+ display: inline-flex;
455
+ align-items: center;
456
+ gap: 6px;
457
+ min-height: 28px;
458
+ padding: 0 10px;
459
+ border: 1px solid color-mix(in srgb, var(--presentation-tone, var(--ns-assistant-accent, var(--ns-assistant-default-accent))) 22%, transparent);
460
+ border-radius: 999px;
461
+ color: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text));
462
+ background: color-mix(in srgb, var(--presentation-tone, var(--ns-assistant-accent, var(--ns-assistant-default-accent))) 7%, transparent);
463
+ font-family: var(--ns-assistant-mono-font-family, var(--ns-assistant-default-mono-font-family));
464
+ font-size: 9px;
465
+ font-weight: 650;
466
+ letter-spacing: .11em;
467
+ text-transform: uppercase;
468
+ }
469
+ [data-tone="success"] { --presentation-tone: var(--ns-assistant-success, var(--ns-assistant-default-success)); }
470
+ [data-tone="warning"] { --presentation-tone: var(--ns-assistant-warning, var(--ns-assistant-default-warning)); }
471
+ [data-tone="danger"] { --presentation-tone: var(--ns-assistant-danger, var(--ns-assistant-default-danger)); }
472
+ [data-tone="neutral"] { --presentation-tone: var(--ns-assistant-muted-text, var(--ns-assistant-default-muted-text)); }
473
+ .tone-indicator {
474
+ display: inline-block;
475
+ width: 6px;
476
+ height: 6px;
477
+ flex: 0 0 6px;
478
+ border-radius: 50%;
479
+ background: var(--presentation-tone);
480
+ box-shadow: 0 0 8px color-mix(in srgb, var(--presentation-tone) 72%, transparent);
481
+ }
482
+
483
+ .empty-state { min-width: 0; }
484
+ .composer-leading {
485
+ display: grid;
486
+ width: 20px;
487
+ height: 20px;
488
+ flex: 0 0 20px;
489
+ place-items: center;
490
+ color: var(--ns-assistant-accent, var(--ns-assistant-default-accent));
491
+ }
492
+ .composer-leading-glyph { width: 15px; height: 15px; }
493
+ form[data-shape="rounded"] {
494
+ border-radius: var(--ns-assistant-input-radius, var(--ns-assistant-default-input-radius));
495
+ }
496
+ form[data-shape="pill"] { border-radius: 999px; }
497
+ .send[data-icon="paper-plane"]::before {
498
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 4 18 8-18 8 3-7 9-1-9-1-3-7Z'/%3E%3C/svg%3E");
499
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 4 18 8-18 8 3-7 9-1-9-1-3-7Z'/%3E%3C/svg%3E");
500
+ }
501
+
502
+ :host([data-message-user-style="accent"]) .message.user {
503
+ color: var(--ns-assistant-accent-text, var(--ns-assistant-default-accent-text));
504
+ background: var(--ns-assistant-accent, var(--ns-assistant-default-accent));
505
+ }
506
+ :host([data-message-user-style="accent"]) .message.user time {
507
+ color: color-mix(in srgb, var(--ns-assistant-accent-text, var(--ns-assistant-default-accent-text)) 72%, transparent);
508
+ }
509
+ :host([data-message-assistant-style="bubble"]) .message.assistant {
510
+ padding: 10px 14px;
511
+ background: var(--ns-assistant-input, var(--ns-assistant-default-input));
512
+ }
513
+
514
+ @keyframes assistant-launcher-pulse { 50% { opacity: .55; transform: scale(.9); } }
515
+
516
+ @media (max-width: 640px) {
517
+ .header-badge { display: none; }
518
+ }
519
+ @media (prefers-reduced-motion: reduce) {
520
+ .launcher, .launcher-status { animation: none !important; }
521
+ }
522
+ </style>`;var Lo="noodle-assistant",kP=globalThis.HTMLElement??class{},Th=class extends kP{static observedAttributes=["open","theme"];#e=Pf();#t;#i="";#n;#a;#o=0;#r;#l;#u;#d;#s;#p;#h;#g="idle";#v=!1;#y;#b=new Set;#_=new Map;#m=new _l;sessionEndpoint="";embedId="";serviceUrl="";get appearance(){return this.#y}set appearance(e){this.#y=e,this.#b.clear(),this.isConnected&&this.#S()}#f=new xl({element:this,messages:()=>this.#r,appendMessage:(e,n)=>{if(e==="user"&&n===this.#h){this.#h=void 0;return}return this.#M(e,n)},applyConfiguration:e=>{this.#e=Pf(e),this.#F(),this.#N()},labels:()=>this.#e.labels,respond:(e,n)=>this.respond(e,n),dispatchError:e=>this.#A(e),revealLatest:()=>this.#$(),renderView:e=>{let n=this.#r,a=this.#t;if(!n||!a)return;let r=a.appSandboxUrl?.(),o=Cx(e,{client:a,sendMessage:i=>this.sendMessage(i),updateModelContext:i=>this.updateModelContext(i),theme:this.#k()},{...r===void 0?{}:{sandboxUrl:r},onRenderFailure:i=>this.#A(i)});o&&(n.append(o),this.setAttribute("has-messages",""),this.#$())}});connectedCallback(){this.shadowRoot||this.attachShadow({mode:"open"}),this.sessionEndpoint||(this.sessionEndpoint=this.getAttribute("session-endpoint")??""),this.embedId||(this.embedId=this.getAttribute("embed-id")??""),this.serviceUrl||(this.serviceUrl=this.getAttribute("service-url")??""),this.#u=globalThis.matchMedia?.("(prefers-color-scheme: dark)"),this.#u?.addEventListener("change",this.#T),document.addEventListener("keydown",this.#R),document.addEventListener("pointerdown",this.#C),this.#e.behavior.startOpen&&this.#N(),this.#V(),this.dispatchEvent(new CustomEvent("assistant-ready")),this.#P()}disconnectedCallback(){this.#o+=1,this.#t?.abort(),this.#n?.(),this.#t=void 0,this.#i="",this.#n=void 0,this.#a=void 0,this.#m.disconnect(),this.#x(!1),this.#u?.removeEventListener("change",this.#T),document.removeEventListener("keydown",this.#R),document.removeEventListener("pointerdown",this.#C)}attributeChangedCallback(e){e==="theme"&&this.#S(),e==="open"&&this.#q()}open(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("assistant-open"))}close(){this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("assistant-close"))}toggle(){this.hasAttribute("open")?this.close():this.open()}focusComposer(){this.shadowRoot?.querySelector("textarea")?.focus()}stop(){this.hasAttribute("busy")&&(this.#o+=1,this.#t?.abort(),this.#x(!1),this.#U(this.#e.labels.stopped),this.dispatchEvent(new CustomEvent("assistant-stopped")))}resetSession(){this.#o+=1,this.#t?.abort(),this.#n?.(),this.#t=void 0,this.#i="",this.#n=void 0,this.#a=void 0,this.#f.resetConversation(),this.#h=void 0,this.removeAttribute("has-messages"),this.#x(!1),this.#w("idle")}reconnect(){this.#o+=1,this.#t?.abort(),this.#n?.(),this.#t=void 0,this.#i="",this.#n=void 0,this.#a=void 0,this.#x(!1),this.#w("loading"),this.#P(),this.dispatchEvent(new CustomEvent("assistant-reconnecting"))}updateContext(e){this.#d={...e},this.#t?this.#t.updateContext(this.#d):this.dispatchEvent(new CustomEvent("assistant-context-changed",{detail:{context:this.#d}}))}updateModelContext(e){this.#s=Io(e),this.#t?this.#t.updateModelContext(this.#s):this.dispatchEvent(new CustomEvent("assistant-model-context-changed",{detail:{modelContext:this.#s}}))}updatePageContext(e){this.#p=e,this.#t?.updatePageContext(e),this.dispatchEvent(new CustomEvent("assistant-page-context-changed",{detail:{pageContext:e}}))}async sendMessage(e){let n=e.trim();if(!n)return;let a=this.#o;this.#h=n,this.#M("user",n),this.#x(!0),this.#g!=="ready"&&this.#w("loading");try{if(await this.#a,a!==this.#o)return;await this.#I().sendMessage(n)}catch(r){if(a!==this.#o||r instanceof Hr&&r.detail.code==="request_aborted")return;throw this.#z(r,"turn_failed"),r}finally{this.#h===n&&(this.#h=void 0),a===this.#o&&this.#x(!1)}}#c(e){this.sendMessage(e).catch(()=>{})}async confirmTool(e){await this.respond(e,{action:"accept"})}async respond(e,n){let a=this.#o;this.#x(!0);try{await this.#I().respond(e,n)}catch(r){if(a!==this.#o)return;throw this.#z(r,"confirmation_failed"),r}finally{a===this.#o&&this.#x(!1)}}#T=()=>this.#S();#R=e=>{e.key==="Escape"&&this.hasAttribute("open")&&this.#e.behavior.closeOnEscape&&this.#O()};#C=e=>{this.hasAttribute("open")&&this.#e.behavior.closeOnOutsideClick&&!e.composedPath().includes(this)&&this.close()};#I(){let e=bw(this);if(this.#t&&this.#i===e)return this.#t;this.#t?.abort(),this.#n?.(),this.#a=void 0;let n={...this.#d?{context:this.#d}:{},clientContext:Dx,...this.#p?{pageContext:this.#p}:{},...this.#s?{modelContext:this.#s}:{}},a=this.embedId?Xf({embedId:this.embedId,...this.serviceUrl?{serviceUrl:this.serviceUrl}:{},...n}):Xf({sessionEndpoint:this.sessionEndpoint,...n});return this.#t=a,this.#i=e,this.#n=a.subscribe(r=>{this.#t===a&&this.#D(r)}),a}#P(){if(!this.sessionEndpoint&&!this.embedId)return;let e=this.#I(),n=this.#o;this.#w("loading");let a=e.connect().catch(r=>{n!==this.#o||this.#t!==e||this.#z(r,"session_failed")}).finally(()=>{this.#a===a&&(this.#a=void 0)});this.#a=a}#D(e){this.dispatchEvent(new CustomEvent("assistant-event",{detail:e})),this.#f.handle(e),e.event==="session_started"&&(this.#w("ready"),this.#r?.querySelector(".conversation-error")?.remove()),(e.event==="session_expired"||e.event==="session_reset")&&this.#w("idle"),(e.event==="tool_proposed"||e.event==="interaction_proposed"||e.event==="input_requested")&&(this.#E(),this.setAttribute("has-messages","")),(e.event==="content"||e.event==="message_completed"||e.event==="interaction_completed"||e.event==="error")&&this.#E()}#x(e){this.toggleAttribute("busy",e);let n=this.shadowRoot?.querySelector("textarea"),a=this.shadowRoot?.querySelector(".send");if(n&&(n.disabled=!1),a&&(a.dataset.action=e?"stop":"send",a.textContent=e?this.#e.labels.stop:this.#e.labels.send,a.setAttribute("aria-label",a.textContent)),!e){this.#E();return}if(!this.#r||this.#l)return;let r=document.createElement("div");r.className="message assistant thinking";let o=document.createElement("span");o.textContent=this.#e.labels.thinking,r.append(o),this.#r.append(r),this.#l=r,this.#L()}#E(){this.#l?.remove(),this.#l=void 0}#M(e,n){if(!this.#r)return;let a=document.createElement("div");if(a.className=`message ${e}`,e==="assistant"&&this.#e.behavior.showAvatars&&this.#e.brand.avatar[this.#k()]){let o=document.createElement("img");o.className="avatar",o.src=this.#e.brand.avatar[this.#k()]??"",o.alt="",a.append(o)}let r=document.createElement(e==="assistant"?"div":"span");if(e==="assistant"?(r.className="markdown",r.innerHTML=yl(n)):r.textContent=n,a.append(r),e==="assistant"&&n){let o=document.createElement("button");o.type="button",o.className="message-copy",o.textContent=this.#e.labels.copy,o.addEventListener("click",()=>{navigator.clipboard?.writeText(n)}),a.append(o)}if(this.#e.behavior.showTimestamps){let o=document.createElement("time");o.dateTime=new Date().toISOString(),o.textContent=new Intl.DateTimeFormat(this.#e.locale,{hour:"numeric",minute:"2-digit"}).format(new Date),a.append(o)}return this.#r.append(a),this.setAttribute("has-messages",""),this.#$(),r}#U(e){if(!this.#r)return;let n=document.createElement("p");n.className="conversation-status",n.setAttribute("role","status"),n.textContent=e,this.#r.append(n)}#L(){this.#m.scrollToBottom()}#$(){this.#m.revealLatest()}#A(e){this.dispatchEvent(new CustomEvent("assistant-error",{detail:e}))}#z(e,n){e instanceof Hr&&e.detail.code==="session_failed"&&this.#w("error");let a=e instanceof Hr?e.detail:{code:n,retryable:!1};this.#Z(a.code==="session_expired"?this.#e.labels.sessionExpired:this.#e.labels.unavailable,a.retryable!==!1||a.serviceCode===void 0),this.#A(a)}#Z(e,n=!0){if(!this.#r)return;this.#r.querySelector(".conversation-error")?.remove();let a=document.createElement("section");a.className="conversation-error",a.setAttribute("role",n?"alert":"status");let r=document.createElement("p");if(r.textContent=e,a.append(r),n){let o=document.createElement("button");o.type="button",o.textContent=this.#e.labels.reconnect,o.addEventListener("click",()=>this.reconnect()),a.append(o)}this.#r.append(a),this.#$()}#k(){let e=this.getAttribute("theme")??this.#e.theme.defaultMode;return e==="auto"?this.#u?.matches?"dark":"light":e}#S(){let e=this.#k();for(let n of $k({host:this,root:this.shadowRoot,appearance:this.#e,hostAppearance:this.#y,mode:e,sessionState:this.#g,styleSnapshot:this.#_})){let a=`${n.theme}:${n.role}:${n.foreground}:${n.background}`;this.#b.has(a)||(this.#b.add(a),this.dispatchEvent(new CustomEvent("assistant-appearance-warning",{detail:n})))}for(let n of this.shadowRoot?.querySelectorAll(".noodle-app-card")??[])Px(n,e)}#w(e){this.#g=e,Sk(this,this.shadowRoot,e,this.#e)}#q(){this.shadowRoot?.querySelector(".launcher")?.setAttribute("aria-expanded",String(this.hasAttribute("open")))}#O(){this.close(),this.shadowRoot?.querySelector(".launcher")?.focus()}#N(){this.#v||(this.#v=!0,this.#e.behavior.startOpen&&this.setAttribute("open",""))}#F(){if(!this.shadowRoot)return;let e=this.#e;this.setAttribute("aria-label",e.brand.name),this.setAttribute("lang",e.locale),this.setAttribute("dir",e.direction),this.dataset.mode=e.layout.mode,this.dataset.position=e.layout.position,this.dataset.density=e.layout.density,this.toggleAttribute("mobile-fullscreen",e.layout.mobileFullscreen),we(this.shadowRoot,".panel").setAttribute("aria-label",e.brand.name),we(this.shadowRoot,"header strong").textContent=e.brand.name;let n=we(this.shadowRoot,"textarea");n.placeholder=e.labels.composerPlaceholder,n.setAttribute("aria-label",e.labels.composerPlaceholder),we(this.shadowRoot,".send").textContent=e.labels.send,we(this.shadowRoot,".launcher").setAttribute("aria-label",e.labels.open),we(this.shadowRoot,".close").setAttribute("aria-label",e.labels.close);let a=we(this.shadowRoot,".suggested-prompts");a.replaceChildren();for(let o of e.suggestedPrompts){let i=document.createElement("button");i.type="button",i.textContent=o,i.addEventListener("click",()=>this.#c(o)),a.append(i)}we(this.shadowRoot,".launcher").hidden=!e.behavior.showLauncher,we(this.shadowRoot,"header").hidden=!e.behavior.showHeader;let r=we(this.shadowRoot,".legal");r.replaceChildren(),this.#j(r),this.#S()}#V(){if(!this.shadowRoot)return;this.#m.disconnect();let e=this.#r?[...this.#r.childNodes]:[],n=this.#e;this.setAttribute("role","complementary"),this.setAttribute("aria-label",n.brand.name),this.setAttribute("lang",n.locale),this.setAttribute("dir",n.direction),this.dataset.mode=n.layout.mode,this.dataset.position=n.layout.position,this.dataset.density=n.layout.density,this.toggleAttribute("mobile-fullscreen",n.layout.mobileFullscreen),this.shadowRoot.innerHTML=`${yk}${Ik}
523
+ <button class="launcher" type="button" aria-label="${Uo(n.labels.open)}" aria-controls="assistant-panel" aria-expanded="${String(this.hasAttribute("open"))}"><slot name="launcher-icon"></slot><span class="visually-hidden" data-session-status aria-live="polite" hidden></span></button>
524
+ <section class="panel" id="assistant-panel" role="dialog" aria-label="${Uo(n.brand.name)}">
525
+ <header><slot name="header-leading"></slot><img class="brand-logo" alt=""><strong></strong><slot name="header-actions"></slot><button class="close" type="button" aria-label="${Uo(n.labels.close)}"></button></header>
526
+ <div class="welcome"><slot name="empty-state"></slot></div>
527
+ <div class="suggested-prompts"></div>
528
+ <div class="messages-region">
529
+ <div class="messages" aria-live="polite"></div>
530
+ <button class="new-messages" type="button" aria-label="${Uo(n.labels.newMessages)}" hidden></button>
531
+ </div>
532
+ <form><slot name="composer-leading"></slot><textarea rows="1"></textarea><button class="send" type="submit"></button><slot name="composer-trailing"></slot></form>
533
+ <nav class="legal" aria-label="Legal"></nav>
534
+ <slot name="conversation-footer"></slot>
535
+ </section>`,we(this.shadowRoot,"strong").textContent=n.brand.name;let a=we(this.shadowRoot,".brand-logo"),r=n.brand.logo[this.#k()];r?(a.src=r,a.alt=n.brand.name):a.hidden=!0;let o=we(this.shadowRoot,"textarea");o.placeholder=n.labels.composerPlaceholder,o.setAttribute("aria-label",n.labels.composerPlaceholder),we(this.shadowRoot,".send").textContent=n.labels.send;let i=we(this.shadowRoot,".suggested-prompts");for(let d of n.suggestedPrompts){let m=document.createElement("button");m.type="button",m.textContent=d,m.addEventListener("click",()=>this.#c(d)),i.append(m)}n.behavior.showLauncher||(we(this.shadowRoot,".launcher").hidden=!0),n.behavior.showHeader||(we(this.shadowRoot,"header").hidden=!0);let s=we(this.shadowRoot,".legal");this.#j(s),this.#r=this.shadowRoot.querySelector(".messages")??void 0,this.#r?.append(...e),this.#l=this.#r?.querySelector(".thinking")??void 0,this.shadowRoot.querySelector(".launcher")?.addEventListener("click",()=>{this.open(),this.focusComposer()}),this.shadowRoot.querySelector(".close")?.addEventListener("click",()=>this.#O());let c=we(this.shadowRoot,"form");c.addEventListener("submit",d=>{if(d.preventDefault(),this.hasAttribute("busy")){this.stop();return}let m=o.value;o.value="",o.style.height="auto",this.#c(m)}),o.addEventListener("input",()=>{o.style.height="auto",o.style.height=`${Math.min(o.scrollHeight,120)}px`}),o.addEventListener("keydown",d=>{d.key!=="Enter"||d.shiftKey||d.isComposing||(d.preventDefault(),c.requestSubmit())});let u=we(this.shadowRoot,".new-messages");u.setAttribute("aria-label",n.labels.newMessages),this.#m.connect({region:we(this.shadowRoot,".messages-region"),messages:we(this.shadowRoot,".messages"),control:u}),this.#S()}#j(e){for(let[n,a]of[["Privacy",this.#e.privacyUrl],["Terms",this.#e.termsUrl]]){if(!a)continue;let r=document.createElement("a");r.href=a,r.target="_blank",r.rel="noopener noreferrer",r.textContent=n,e.append(r)}}};function Ek(){globalThis.customElements&&!customElements.get(Lo)&&customElements.define(Lo,Th)}function SP(t){let e=t?.dataset.embedId??"";if(!e){console.error("[noodle-assistant] the embed script tag is missing data-embed-id; run `noodle deploy` and paste the snippet it prints");return}let n=t?.dataset.serviceUrl??TP(t?.src),a=()=>{if(document.querySelector(Lo))return;Ek();let r=document.createElement(Lo);r.setAttribute("embed-id",e),n&&r.setAttribute("service-url",n),document.body.append(r)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a,{once:!0}):a()}function TP(t){if(!t)return"";try{return new URL(t,document.baseURI).origin}catch{return""}}SP(document.currentScript);})();
536
+ /*! Bundled license information:
537
+
538
+ dompurify/dist/purify.es.mjs:
539
+ (*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE *)
540
+ */