diff --git a/packages/data-liberation-agent/dist/mcp-server.bundle.mjs b/packages/data-liberation-agent/dist/mcp-server.bundle.mjs index f998f98996..64a96f7f1a 100644 --- a/packages/data-liberation-agent/dist/mcp-server.bundle.mjs +++ b/packages/data-liberation-agent/dist/mcp-server.bundle.mjs @@ -1,135 +1,135 @@ import { createRequire as __bundleCreateRequire } from 'node:module'; const require = __bundleCreateRequire(import.meta.url); -var sQe=Object.create;var YD=Object.defineProperty;var oQe=Object.getOwnPropertyDescriptor;var aQe=Object.getOwnPropertyNames;var cQe=Object.getPrototypeOf,uQe=Object.prototype.hasOwnProperty;var Z=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var D=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var B=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Jt=(e,t)=>{for(var r in t)YD(e,r,{get:t[r],enumerable:!0})},lQe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aQe(t))!uQe.call(e,i)&&i!==r&&YD(e,i,{get:()=>t[i],enumerable:!(n=oQe(t,i))||n.enumerable});return e};var Rr=(e,t,r)=>(r=e!=null?sQe(cQe(e)):{},lQe(t||!e||!e.__esModule?YD(r,"default",{value:e,enumerable:!0}):r,e));function j(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=o.prototype,l=Object.keys(u);for(let d=0;dr?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function Sn(e){return e&&Object.assign(ty,e),ty}var f1,ry,Ra,Cl,ty,dA=D(()=>{f1=Object.freeze({status:"aborted"});ry=Symbol("zod_brand"),Ra=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Cl=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ty={}});var be={};Jt(be,{BIGINT_FORMAT_RANGES:()=>dN,Class:()=>iN,NUMBER_FORMAT_RANGES:()=>lN,aborted:()=>vl,allowsEval:()=>aN,assert:()=>HQe,assertEqual:()=>FQe,assertIs:()=>UQe,assertNever:()=>$Qe,assertNotEqual:()=>OQe,assignProp:()=>Il,base64ToUint8Array:()=>zG,base64urlToUint8Array:()=>XQe,cached:()=>pA,captureStackTrace:()=>h1,cleanEnum:()=>KQe,cleanRegex:()=>sy,clone:()=>bi,cloneDef:()=>qQe,createTransparentProxy:()=>JQe,defineLazy:()=>Ot,esc:()=>p1,escapeRegex:()=>Do,extend:()=>$G,finalizeIssue:()=>Ts,floatSafeRemainder:()=>sN,getElementAtPath:()=>zQe,getEnumValues:()=>iy,getLengthableOrigin:()=>cy,getParsedType:()=>YQe,getSizableOrigin:()=>ay,hexToUint8Array:()=>tDe,isObject:()=>ff,isPlainObject:()=>Sl,issue:()=>hA,joinValues:()=>X,jsonStringifyReplacer:()=>fA,merge:()=>ZQe,mergeDefs:()=>Au,normalizeParams:()=>ke,nullish:()=>wl,numKeys:()=>WQe,objectClone:()=>jQe,omit:()=>UG,optionalKeys:()=>uN,parsedType:()=>we,partial:()=>jG,pick:()=>OG,prefixIssues:()=>co,primitiveTypes:()=>cN,promiseAllObject:()=>VQe,propertyKeyTypes:()=>oy,randomString:()=>GQe,required:()=>qG,safeExtend:()=>HG,shallowClone:()=>A1,slugify:()=>oN,stringifyPrimitive:()=>me,uint8ArrayToBase64:()=>VG,uint8ArrayToBase64url:()=>eDe,uint8ArrayToHex:()=>rDe,unwrapMessage:()=>ny});function FQe(e){return e}function OQe(e){return e}function UQe(e){}function $Qe(e){throw new Error("Unexpected value in exhaustive check")}function HQe(e){}function iy(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function X(e,t="|"){return e.map(r=>me(r)).join(t)}function fA(e,t){return typeof t=="bigint"?t.toString():t}function pA(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function wl(e){return e==null}function sy(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function sN(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let s=r>i?r:i,o=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}function Ot(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==FG)return n===void 0&&(n=FG,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function jQe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Il(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Au(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function qQe(e){return Au(e._zod.def)}function zQe(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function VQe(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let i={};for(let s=0;st};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function JQe(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,s){return t??(t=e()),Reflect.set(t,n,i,s)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function me(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function uN(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function OG(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=Au(e._zod.def,{get shape(){let o={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=r.shape[a])}return Il(this,"shape",o),o},checks:[]});return bi(e,s)}function UG(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=Au(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return Il(this,"shape",o),o},checks:[]});return bi(e,s)}function $G(e,t){if(!Sl(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let s=e._zod.def.shape;for(let o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Au(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t};return Il(this,"shape",s),s}});return bi(e,i)}function HG(e,t){if(!Sl(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Au(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Il(this,"shape",n),n}});return bi(e,r)}function ZQe(e,t){let r=Au(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Il(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return bi(e,r)}function jG(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=Au(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Il(this,"shape",c),c},checks:[]});return bi(t,o)}function qG(e,t,r){let n=Au(t._zod.def,{get shape(){let i=t._zod.def.shape,s={...i};if(r)for(let o in r){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(let o in i)s[o]=new e({type:"nonoptional",innerType:i[o]});return Il(this,"shape",s),s}});return bi(t,n)}function vl(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ny(e){return typeof e=="string"?e:e?.message}function Ts(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=ny(e.inst?._zod.def?.error?.(e))??ny(t?.error?.(e))??ny(r.customError?.(e))??ny(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function ay(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function cy(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function we(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function hA(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function KQe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function zG(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;nt.toString(16).padStart(2,"0")).join("")}var FG,h1,aN,YQe,oy,cN,lN,dN,iN,ot=D(()=>{FG=Symbol("evaluating");h1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};aN=pA(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});YQe=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},oy=new Set(["string","number","symbol"]),cN=new Set(["string","number","bigint","boolean","symbol","undefined"]);lN={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]},dN={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};iN=class{constructor(...t){}}});function AA(e,t=r=>r.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function gA(e,t=r=>r.message){let r={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let o=r,a=0;for(;ar.message){let r={errors:[]},n=(i,s=[])=>{var o,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{let u=[...s,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;dtypeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function m1(e){let t=[],r=[...e.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${WG(n.path)}`);return t.join(` -`)}var GG,uy,Rs,fN=D(()=>{dA();ot();GG=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fA,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uy=j("$ZodError",GG),Rs=j("$ZodError",GG,{Parent:Error})});var mA,yA,bA,EA,CA,pf,wA,IA,y1,YG,b1,JG,E1,ZG,C1,KG,w1,XG,I1,eW,S1,tW,v1,rW,pN=D(()=>{dA();fN();ot();mA=e=>(t,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Ra;if(o.issues.length){let a=new(i?.Err??e)(o.issues.map(c=>Ts(c,s,Sn())));throw h1(a,i?.callee),a}return o.value},yA=mA(Rs),bA=e=>async(t,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){let a=new(i?.Err??e)(o.issues.map(c=>Ts(c,s,Sn())));throw h1(a,i?.callee),a}return o.value},EA=bA(Rs),CA=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Ra;return s.issues.length?{success:!1,error:new(e??uy)(s.issues.map(o=>Ts(o,i,Sn())))}:{success:!0,data:s.value}},pf=CA(Rs),wA=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>Ts(o,i,Sn())))}:{success:!0,data:s.value}},IA=wA(Rs),y1=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return mA(e)(t,r,i)},YG=y1(Rs),b1=e=>(t,r,n)=>mA(e)(t,r,n),JG=b1(Rs),E1=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bA(e)(t,r,i)},ZG=E1(Rs),C1=e=>async(t,r,n)=>bA(e)(t,r,n),KG=C1(Rs),w1=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return CA(e)(t,r,i)},XG=w1(Rs),I1=e=>(t,r,n)=>CA(e)(t,r,n),eW=I1(Rs),S1=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return wA(e)(t,r,i)},tW=S1(Rs),v1=e=>async(t,r,n)=>wA(e)(t,r,n),rW=v1(Rs)});var Qs={};Jt(Qs,{base64:()=>_N,base64url:()=>x1,bigint:()=>MN,boolean:()=>LN,browserEmail:()=>dDe,cidrv4:()=>BN,cidrv6:()=>kN,cuid:()=>hN,cuid2:()=>AN,date:()=>RN,datetime:()=>DN,domain:()=>hDe,duration:()=>EN,e164:()=>TN,email:()=>wN,emoji:()=>IN,extendedDuration:()=>iDe,guid:()=>CN,hex:()=>ADe,hostname:()=>pDe,html5Email:()=>cDe,idnEmail:()=>lDe,integer:()=>PN,ipv4:()=>SN,ipv6:()=>vN,ksuid:()=>yN,lowercase:()=>UN,mac:()=>xN,md5_base64:()=>mDe,md5_base64url:()=>yDe,md5_hex:()=>gDe,nanoid:()=>bN,null:()=>FN,number:()=>B1,rfc5322Email:()=>uDe,sha1_base64:()=>EDe,sha1_base64url:()=>CDe,sha1_hex:()=>bDe,sha256_base64:()=>IDe,sha256_base64url:()=>SDe,sha256_hex:()=>wDe,sha384_base64:()=>xDe,sha384_base64url:()=>BDe,sha384_hex:()=>vDe,sha512_base64:()=>_De,sha512_base64url:()=>TDe,sha512_hex:()=>kDe,string:()=>NN,time:()=>QN,ulid:()=>gN,undefined:()=>ON,unicodeEmail:()=>nW,uppercase:()=>$N,uuid:()=>hf,uuid4:()=>sDe,uuid6:()=>oDe,uuid7:()=>aDe,xid:()=>mN});function IN(){return new RegExp(fDe,"u")}function sW(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function QN(e){return new RegExp(`^${sW(e)}$`)}function DN(e){let t=sW({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${iW}T(?:${n})$`)}function ly(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function dy(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var hN,AN,gN,mN,yN,bN,EN,iDe,CN,hf,sDe,oDe,aDe,wN,cDe,uDe,nW,lDe,dDe,fDe,SN,vN,xN,BN,kN,_N,x1,pDe,hDe,TN,iW,RN,NN,MN,PN,B1,LN,FN,ON,UN,$N,ADe,gDe,mDe,yDe,bDe,EDe,CDe,wDe,IDe,SDe,vDe,xDe,BDe,kDe,_De,TDe,k1=D(()=>{ot();hN=/^[cC][^\s-]{8,}$/,AN=/^[0-9a-z]+$/,gN=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mN=/^[0-9a-vA-V]{20}$/,yN=/^[A-Za-z0-9]{27}$/,bN=/^[a-zA-Z0-9_-]{21}$/,EN=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,iDe=/^[-+]?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)?)??$/,CN=/^([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})$/,hf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,sDe=hf(4),oDe=hf(6),aDe=hf(7),wN=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cDe=/^[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])?)*$/,uDe=/^(([^<>()\[\]\\.,;:\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,}))$/,nW=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,lDe=nW,dDe=/^[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])?)*$/,fDe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";SN=/^(?:(?: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])$/,vN=/^(([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}|:))$/,xN=e=>{let t=Do(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},BN=/^((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])$/,kN=/^(([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])$/,_N=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,x1=/^[A-Za-z0-9_-]*$/,pDe=/^(?=.{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])?)*\.?$/,hDe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,TN=/^\+[1-9]\d{6,14}$/,iW="(?:(?:\\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])))",RN=new RegExp(`^${iW}$`);NN=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},MN=/^-?\d+n?$/,PN=/^-?\d+$/,B1=/^-?\d+(?:\.\d+)?$/,LN=/^(?:true|false)$/i,FN=/^null$/i,ON=/^undefined$/i,UN=/^[^A-Z]*$/,$N=/^[^a-z]*$/,ADe=/^[0-9a-fA-F]*$/;gDe=/^[0-9a-fA-F]{32}$/,mDe=ly(22,"=="),yDe=dy(22),bDe=/^[0-9a-fA-F]{40}$/,EDe=ly(27,"="),CDe=dy(27),wDe=/^[0-9a-fA-F]{64}$/,IDe=ly(43,"="),SDe=dy(43),vDe=/^[0-9a-fA-F]{96}$/,xDe=ly(64,""),BDe=dy(64),kDe=/^[0-9a-fA-F]{128}$/,_De=ly(86,"=="),TDe=dy(86)});function oW(e,t,r){e.issues.length&&t.issues.push(...co(r,e.issues))}var jr,aW,_1,T1,HN,jN,qN,zN,VN,GN,WN,YN,JN,SA,ZN,KN,XN,eM,tM,rM,nM,iM,sM,R1=D(()=>{dA();k1();ot();jr=j("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),aW={number:"number",bigint:"bigint",object:"date"},_1=j("$ZodCheckLessThan",(e,t)=>{jr.init(e,t);let r=aW[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?n.value<=t.value:n.value{jr.init(e,t);let r=aW[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),HN=j("$ZodCheckMultipleOf",(e,t)=>{jr.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):sN(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),jN=j("$ZodCheckNumberFormat",(e,t)=>{jr.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,s]=lN[t.format];e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,a.minimum=i,a.maximum=s,r&&(a.pattern=PN)}),e._zod.check=o=>{let a=o.value;if(r){if(!Number.isInteger(a)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}as&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),qN=j("$ZodCheckBigIntFormat",(e,t)=>{jr.init(e,t);let[r,n]=dN[t.format];e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,s.minimum=r,s.maximum=n}),e._zod.check=i=>{let s=i.value;sn&&i.issues.push({origin:"bigint",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),zN=j("$ZodCheckMaxSize",(e,t)=>{var r;jr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!wl(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{let i=n.value;i.size<=t.maximum||n.issues.push({origin:ay(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),VN=j("$ZodCheckMinSize",(e,t)=>{var r;jr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!wl(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;i.size>=t.minimum||n.issues.push({origin:ay(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),GN=j("$ZodCheckSizeEquals",(e,t)=>{var r;jr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!wl(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=n=>{let i=n.value,s=i.size;if(s===t.size)return;let o=s>t.size;n.issues.push({origin:ay(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),WN=j("$ZodCheckMaxLength",(e,t)=>{var r;jr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!wl(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{let i=n.value;if(i.length<=t.maximum)return;let o=cy(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),YN=j("$ZodCheckMinLength",(e,t)=>{var r;jr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!wl(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let o=cy(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),JN=j("$ZodCheckLengthEquals",(e,t)=>{var r;jr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!wl(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{let i=n.value,s=i.length;if(s===t.length)return;let o=cy(i),a=s>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),SA=j("$ZodCheckStringFormat",(e,t)=>{var r,n;jr.init(e,t),e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ZN=j("$ZodCheckRegex",(e,t)=>{SA.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),KN=j("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=UN),SA.init(e,t)}),XN=j("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$N),SA.init(e,t)}),eM=j("$ZodCheckIncludes",(e,t)=>{jr.init(e,t);let r=Do(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{let s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),tM=j("$ZodCheckStartsWith",(e,t)=>{jr.init(e,t);let r=new RegExp(`^${Do(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),rM=j("$ZodCheckEndsWith",(e,t)=>{jr.init(e,t);let r=new RegExp(`.*${Do(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});nM=j("$ZodCheckProperty",(e,t)=>{jr.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>oW(i,r,t.property));oW(n,r,t.property)}}),iM=j("$ZodCheckMimeType",(e,t)=>{jr.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),sM=j("$ZodCheckOverwrite",(e,t)=>{jr.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var fy,oM=D(()=>{fy=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(` +var AQe=Object.create;var tN=Object.defineProperty;var gQe=Object.getOwnPropertyDescriptor;var mQe=Object.getOwnPropertyNames;var yQe=Object.getPrototypeOf,bQe=Object.prototype.hasOwnProperty;var Y=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var N=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var B=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Yt=(e,t)=>{for(var r in t)tN(e,r,{get:t[r],enumerable:!0})},EQe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mQe(t))!bQe.call(e,i)&&i!==r&&tN(e,i,{get:()=>t[i],enumerable:!(n=gQe(t,i))||n.enumerable});return e};var Dr=(e,t,r)=>(r=e!=null?AQe(yQe(e)):{},EQe(t||!e||!e.__esModule?tN(r,"default",{value:e,enumerable:!0}):r,e));function q(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=o.prototype,l=Object.keys(u);for(let d=0;dr?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function xn(e){return e&&Object.assign(sy,e),sy}var m1,oy,Na,Sl,sy,gA=N(()=>{m1=Object.freeze({status:"aborted"});oy=Symbol("zod_brand"),Na=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Sl=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},sy={}});var Ee={};Yt(Ee,{BIGINT_FORMAT_RANGES:()=>mN,Class:()=>lN,NUMBER_FORMAT_RANGES:()=>gN,aborted:()=>kl,allowsEval:()=>pN,assert:()=>KQe,assertEqual:()=>WQe,assertIs:()=>JQe,assertNever:()=>ZQe,assertNotEqual:()=>YQe,assignProp:()=>xl,base64ToUint8Array:()=>eW,base64urlToUint8Array:()=>uDe,cached:()=>yA,captureStackTrace:()=>b1,cleanEnum:()=>cDe,cleanRegex:()=>uy,clone:()=>Ei,cloneDef:()=>eDe,createTransparentProxy:()=>oDe,defineLazy:()=>Ht,esc:()=>y1,escapeRegex:()=>No,extend:()=>JG,finalizeIssue:()=>Ts,floatSafeRemainder:()=>dN,getElementAtPath:()=>tDe,getEnumValues:()=>cy,getLengthableOrigin:()=>fy,getParsedType:()=>sDe,getSizableOrigin:()=>dy,hexToUint8Array:()=>dDe,isObject:()=>mf,isPlainObject:()=>Bl,issue:()=>bA,joinValues:()=>X,jsonStringifyReplacer:()=>mA,merge:()=>aDe,mergeDefs:()=>gu,normalizeParams:()=>ke,nullish:()=>vl,numKeys:()=>iDe,objectClone:()=>XQe,omit:()=>YG,optionalKeys:()=>AN,parsedType:()=>we,partial:()=>KG,pick:()=>WG,prefixIssues:()=>uo,primitiveTypes:()=>hN,promiseAllObject:()=>rDe,propertyKeyTypes:()=>ly,randomString:()=>nDe,required:()=>XG,safeExtend:()=>ZG,shallowClone:()=>E1,slugify:()=>fN,stringifyPrimitive:()=>ye,uint8ArrayToBase64:()=>tW,uint8ArrayToBase64url:()=>lDe,uint8ArrayToHex:()=>fDe,unwrapMessage:()=>ay});function WQe(e){return e}function YQe(e){return e}function JQe(e){}function ZQe(e){throw new Error("Unexpected value in exhaustive check")}function KQe(e){}function cy(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function X(e,t="|"){return e.map(r=>ye(r)).join(t)}function mA(e,t){return typeof t=="bigint"?t.toString():t}function yA(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function vl(e){return e==null}function uy(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function dN(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let s=r>i?r:i,o=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}function Ht(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==GG)return n===void 0&&(n=GG,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function XQe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function xl(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function gu(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function eDe(e){return gu(e._zod.def)}function tDe(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function rDe(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let i={};for(let s=0;st};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function oDe(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,s){return t??(t=e()),Reflect.set(t,n,i,s)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function ye(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function AN(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function WG(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=gu(e._zod.def,{get shape(){let o={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=r.shape[a])}return xl(this,"shape",o),o},checks:[]});return Ei(e,s)}function YG(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=gu(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return xl(this,"shape",o),o},checks:[]});return Ei(e,s)}function JG(e,t){if(!Bl(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let s=e._zod.def.shape;for(let o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=gu(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t};return xl(this,"shape",s),s}});return Ei(e,i)}function ZG(e,t){if(!Bl(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=gu(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return xl(this,"shape",n),n}});return Ei(e,r)}function aDe(e,t){let r=gu(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return xl(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ei(e,r)}function KG(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=gu(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return xl(this,"shape",c),c},checks:[]});return Ei(t,o)}function XG(e,t,r){let n=gu(t._zod.def,{get shape(){let i=t._zod.def.shape,s={...i};if(r)for(let o in r){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(let o in i)s[o]=new e({type:"nonoptional",innerType:i[o]});return xl(this,"shape",s),s}});return Ei(t,n)}function kl(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ay(e){return typeof e=="string"?e:e?.message}function Ts(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=ay(e.inst?._zod.def?.error?.(e))??ay(t?.error?.(e))??ay(r.customError?.(e))??ay(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function dy(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function fy(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function we(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function bA(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function cDe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function eW(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;nt.toString(16).padStart(2,"0")).join("")}var GG,b1,pN,sDe,ly,hN,gN,mN,lN,ot=N(()=>{GG=Symbol("evaluating");b1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};pN=yA(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});sDe=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ly=new Set(["string","number","symbol"]),hN=new Set(["string","number","bigint","boolean","symbol","undefined"]);gN={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]},mN={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};lN=class{constructor(...t){}}});function EA(e,t=r=>r.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function CA(e,t=r=>r.message){let r={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let o=r,a=0;for(;ar.message){let r={errors:[]},n=(i,s=[])=>{var o,a;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},c.path));else if(c.code==="invalid_key")n({issues:c.issues},c.path);else if(c.code==="invalid_element")n({issues:c.issues},c.path);else{let u=[...s,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;dtypeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function w1(e){let t=[],r=[...e.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${nW(n.path)}`);return t.join(` +`)}var rW,py,Rs,yN=N(()=>{gA();ot();rW=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mA,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},py=q("$ZodError",rW),Rs=q("$ZodError",rW,{Parent:Error})});var wA,IA,SA,vA,xA,yf,BA,kA,I1,iW,S1,sW,v1,oW,x1,aW,B1,cW,k1,uW,_1,lW,T1,dW,bN=N(()=>{gA();yN();ot();wA=e=>(t,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new Na;if(o.issues.length){let a=new(i?.Err??e)(o.issues.map(c=>Ts(c,s,xn())));throw b1(a,i?.callee),a}return o.value},IA=wA(Rs),SA=e=>async(t,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},o=t._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){let a=new(i?.Err??e)(o.issues.map(c=>Ts(c,s,xn())));throw b1(a,i?.callee),a}return o.value},vA=SA(Rs),xA=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Na;return s.issues.length?{success:!1,error:new(e??py)(s.issues.map(o=>Ts(o,i,xn())))}:{success:!0,data:s.value}},yf=xA(Rs),BA=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(o=>Ts(o,i,xn())))}:{success:!0,data:s.value}},kA=BA(Rs),I1=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return wA(e)(t,r,i)},iW=I1(Rs),S1=e=>(t,r,n)=>wA(e)(t,r,n),sW=S1(Rs),v1=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return SA(e)(t,r,i)},oW=v1(Rs),x1=e=>async(t,r,n)=>SA(e)(t,r,n),aW=x1(Rs),B1=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xA(e)(t,r,i)},cW=B1(Rs),k1=e=>(t,r,n)=>xA(e)(t,r,n),uW=k1(Rs),_1=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return BA(e)(t,r,i)},lW=_1(Rs),T1=e=>async(t,r,n)=>BA(e)(t,r,n),dW=T1(Rs)});var Qs={};Yt(Qs,{base64:()=>MN,base64url:()=>R1,bigint:()=>$N,boolean:()=>jN,browserEmail:()=>CDe,cidrv4:()=>DN,cidrv6:()=>NN,cuid:()=>EN,cuid2:()=>CN,date:()=>LN,datetime:()=>ON,domain:()=>SDe,duration:()=>xN,e164:()=>PN,email:()=>kN,emoji:()=>_N,extendedDuration:()=>hDe,guid:()=>BN,hex:()=>vDe,hostname:()=>IDe,html5Email:()=>yDe,idnEmail:()=>EDe,integer:()=>HN,ipv4:()=>TN,ipv6:()=>RN,ksuid:()=>SN,lowercase:()=>VN,mac:()=>QN,md5_base64:()=>BDe,md5_base64url:()=>kDe,md5_hex:()=>xDe,nanoid:()=>vN,null:()=>qN,number:()=>Q1,rfc5322Email:()=>bDe,sha1_base64:()=>TDe,sha1_base64url:()=>RDe,sha1_hex:()=>_De,sha256_base64:()=>DDe,sha256_base64url:()=>NDe,sha256_hex:()=>QDe,sha384_base64:()=>PDe,sha384_base64url:()=>LDe,sha384_hex:()=>MDe,sha512_base64:()=>ODe,sha512_base64url:()=>UDe,sha512_hex:()=>FDe,string:()=>UN,time:()=>FN,ulid:()=>wN,undefined:()=>zN,unicodeEmail:()=>fW,uppercase:()=>GN,uuid:()=>bf,uuid4:()=>ADe,uuid6:()=>gDe,uuid7:()=>mDe,xid:()=>IN});function _N(){return new RegExp(wDe,"u")}function hW(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function FN(e){return new RegExp(`^${hW(e)}$`)}function ON(e){let t=hW({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${pW}T(?:${n})$`)}function hy(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ay(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var EN,CN,wN,IN,SN,vN,xN,hDe,BN,bf,ADe,gDe,mDe,kN,yDe,bDe,fW,EDe,CDe,wDe,TN,RN,QN,DN,NN,MN,R1,IDe,SDe,PN,pW,LN,UN,$N,HN,Q1,jN,qN,zN,VN,GN,vDe,xDe,BDe,kDe,_De,TDe,RDe,QDe,DDe,NDe,MDe,PDe,LDe,FDe,ODe,UDe,D1=N(()=>{ot();EN=/^[cC][^\s-]{8,}$/,CN=/^[0-9a-z]+$/,wN=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,IN=/^[0-9a-vA-V]{20}$/,SN=/^[A-Za-z0-9]{27}$/,vN=/^[a-zA-Z0-9_-]{21}$/,xN=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hDe=/^[-+]?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)?)??$/,BN=/^([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})$/,bf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,ADe=bf(4),gDe=bf(6),mDe=bf(7),kN=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yDe=/^[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])?)*$/,bDe=/^(([^<>()\[\]\\.,;:\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,}))$/,fW=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,EDe=fW,CDe=/^[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])?)*$/,wDe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";TN=/^(?:(?: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])$/,RN=/^(([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}|:))$/,QN=e=>{let t=No(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},DN=/^((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])$/,NN=/^(([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])$/,MN=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,R1=/^[A-Za-z0-9_-]*$/,IDe=/^(?=.{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])?)*\.?$/,SDe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,PN=/^\+[1-9]\d{6,14}$/,pW="(?:(?:\\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])))",LN=new RegExp(`^${pW}$`);UN=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},$N=/^-?\d+n?$/,HN=/^-?\d+$/,Q1=/^-?\d+(?:\.\d+)?$/,jN=/^(?:true|false)$/i,qN=/^null$/i,zN=/^undefined$/i,VN=/^[^A-Z]*$/,GN=/^[^a-z]*$/,vDe=/^[0-9a-fA-F]*$/;xDe=/^[0-9a-fA-F]{32}$/,BDe=hy(22,"=="),kDe=Ay(22),_De=/^[0-9a-fA-F]{40}$/,TDe=hy(27,"="),RDe=Ay(27),QDe=/^[0-9a-fA-F]{64}$/,DDe=hy(43,"="),NDe=Ay(43),MDe=/^[0-9a-fA-F]{96}$/,PDe=hy(64,""),LDe=Ay(64),FDe=/^[0-9a-fA-F]{128}$/,ODe=hy(86,"=="),UDe=Ay(86)});function AW(e,t,r){e.issues.length&&t.issues.push(...uo(r,e.issues))}var zr,gW,N1,M1,WN,YN,JN,ZN,KN,XN,eM,tM,rM,_A,nM,iM,sM,oM,aM,cM,uM,lM,dM,P1=N(()=>{gA();D1();ot();zr=q("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),gW={number:"number",bigint:"bigint",object:"date"},N1=q("$ZodCheckLessThan",(e,t)=>{zr.init(e,t);let r=gW[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?n.value<=t.value:n.value{zr.init(e,t);let r=gW[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),WN=q("$ZodCheckMultipleOf",(e,t)=>{zr.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):dN(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),YN=q("$ZodCheckNumberFormat",(e,t)=>{zr.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,s]=gN[t.format];e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,a.minimum=i,a.maximum=s,r&&(a.pattern=HN)}),e._zod.check=o=>{let a=o.value;if(r){if(!Number.isInteger(a)){o.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}as&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),JN=q("$ZodCheckBigIntFormat",(e,t)=>{zr.init(e,t);let[r,n]=mN[t.format];e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,s.minimum=r,s.maximum=n}),e._zod.check=i=>{let s=i.value;sn&&i.issues.push({origin:"bigint",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),ZN=q("$ZodCheckMaxSize",(e,t)=>{var r;zr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vl(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{let i=n.value;i.size<=t.maximum||n.issues.push({origin:dy(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),KN=q("$ZodCheckMinSize",(e,t)=>{var r;zr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vl(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;i.size>=t.minimum||n.issues.push({origin:dy(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),XN=q("$ZodCheckSizeEquals",(e,t)=>{var r;zr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vl(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=n=>{let i=n.value,s=i.size;if(s===t.size)return;let o=s>t.size;n.issues.push({origin:dy(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),eM=q("$ZodCheckMaxLength",(e,t)=>{var r;zr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vl(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{let i=n.value;if(i.length<=t.maximum)return;let o=fy(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),tM=q("$ZodCheckMinLength",(e,t)=>{var r;zr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vl(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let o=fy(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),rM=q("$ZodCheckLengthEquals",(e,t)=>{var r;zr.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!vl(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{let i=n.value,s=i.length;if(s===t.length)return;let o=fy(i),a=s>t.length;n.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),_A=q("$ZodCheckStringFormat",(e,t)=>{var r,n;zr.init(e,t),e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),nM=q("$ZodCheckRegex",(e,t)=>{_A.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),iM=q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=VN),_A.init(e,t)}),sM=q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=GN),_A.init(e,t)}),oM=q("$ZodCheckIncludes",(e,t)=>{zr.init(e,t);let r=No(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{let s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),aM=q("$ZodCheckStartsWith",(e,t)=>{zr.init(e,t);let r=new RegExp(`^${No(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),cM=q("$ZodCheckEndsWith",(e,t)=>{zr.init(e,t);let r=new RegExp(`.*${No(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});uM=q("$ZodCheckProperty",(e,t)=>{zr.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>AW(i,r,t.property));AW(n,r,t.property)}}),lM=q("$ZodCheckMimeType",(e,t)=>{zr.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),dM=q("$ZodCheckOverwrite",(e,t)=>{zr.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var gy,fM=N(()=>{gy=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(` `).filter(o=>o),i=Math.min(...n.map(o=>o.length-o.trimStart().length)),s=n.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(let o of s)this.content.push(o)}compile(){let t=Function,r=this?.args,i=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,i.join(` -`))}}});var aM,cM=D(()=>{aM={major:4,minor:3,patch:6}});function lM(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function EW(e){if(!x1.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return lM(r)}function CW(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}function uW(e,t,r){e.issues.length&&t.issues.push(...co(r,e.issues)),t.value[r]=e.value}function P1(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...co(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function wW(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=uN(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function IW(e,t,r,n,i,s){let o=[],a=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in t){if(a.has(d))continue;if(u==="never"){o.push(d);continue}let f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(p=>P1(p,r,d,t,l))):P1(f,r,d,t,l)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}function lW(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let i=e.filter(s=>!vl(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(o=>Ts(o,n,Sn())))}),t)}function dW(e,t,r,n){let i=e.filter(s=>s.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(o=>Ts(o,n,Sn())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function uM(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Sl(e)&&Sl(t)){let r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(let s of n){let o=uM(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;na.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),vl(e))return e;let o=uM(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function Q1(e,t,r){e.issues.length&&t.issues.push(...co(r,e.issues)),t.value[r]=e.value}function pW(e,t,r,n,i,s,o){e.issues.length&&(oy.has(typeof n)?r.issues.push(...co(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:s,issues:e.issues.map(a=>Ts(a,o,Sn()))})),t.issues.length&&(oy.has(typeof n)?r.issues.push(...co(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:s,key:n,issues:t.issues.map(a=>Ts(a,o,Sn()))})),r.value.set(e.value,t.value)}function hW(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function AW(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function gW(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function mW(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function D1(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}function N1(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(s=>M1(e,s,t.out,r)):M1(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(s=>M1(e,s,t.in,r)):M1(e,i,t.in,r)}}function M1(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}function yW(e){return e.value=Object.freeze(e.value),e}function bW(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(hA(i))}}var xt,xl,Nr,L1,F1,O1,U1,$1,H1,j1,q1,z1,V1,G1,W1,Y1,J1,Z1,K1,X1,eS,tS,rS,nS,iS,sS,oS,aS,py,cS,vA,hy,uS,lS,dS,fS,pS,hS,AS,gS,mS,yS,dM,fM,xA,bS,ES,CS,Ay,wS,IS,SS,vS,xS,BS,kS,gy,_S,TS,RS,QS,DS,NS,MS,PS,LS,BA,FS,OS,US,$S,HS,jS,pM=D(()=>{R1();dA();oM();pN();k1();ot();cM();ot();xt=j("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=aM;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(o,a,c)=>{let u=vl(o),l;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(u)continue;let f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&c?.async===!1)throw new Ra;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(u||(u=vl(o,f)))});else{if(o.issues.length===f)continue;u||(u=vl(o,f))}}return l?l.then(()=>o):o},s=(o,a,c)=>{if(vl(o))return o.aborted=!0,o;let u=i(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Ra;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){let u=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,o,a)):s(u,o,a)}let c=e._zod.parse(o,a);if(c instanceof Promise){if(a.async===!1)throw new Ra;return c.then(u=>i(u,n,a))}return i(c,n,a)}}Ot(e,"~standard",()=>({validate:i=>{try{let s=pf(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return IA(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),xl=j("$ZodString",(e,t)=>{xt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??NN(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Nr=j("$ZodStringFormat",(e,t)=>{SA.init(e,t),xl.init(e,t)}),L1=j("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=CN),Nr.init(e,t)}),F1=j("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=hf(n))}else t.pattern??(t.pattern=hf());Nr.init(e,t)}),O1=j("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wN),Nr.init(e,t)}),U1=j("$ZodURL",(e,t)=>{Nr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),$1=j("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=IN()),Nr.init(e,t)}),H1=j("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=bN),Nr.init(e,t)}),j1=j("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=hN),Nr.init(e,t)}),q1=j("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=AN),Nr.init(e,t)}),z1=j("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gN),Nr.init(e,t)}),V1=j("$ZodXID",(e,t)=>{t.pattern??(t.pattern=mN),Nr.init(e,t)}),G1=j("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=yN),Nr.init(e,t)}),W1=j("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=DN(t)),Nr.init(e,t)}),Y1=j("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=RN),Nr.init(e,t)}),J1=j("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=QN(t)),Nr.init(e,t)}),Z1=j("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=EN),Nr.init(e,t)}),K1=j("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=SN),Nr.init(e,t),e._zod.bag.format="ipv4"}),X1=j("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=vN),Nr.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),eS=j("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=xN(t.delimiter)),Nr.init(e,t),e._zod.bag.format="mac"}),tS=j("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=BN),Nr.init(e,t)}),rS=j("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=kN),Nr.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,s]=n;if(!s)throw new Error;let o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});nS=j("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=_N),Nr.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{lM(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});iS=j("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=x1),Nr.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{EW(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),sS=j("$ZodE164",(e,t)=>{t.pattern??(t.pattern=TN),Nr.init(e,t)});oS=j("$ZodJWT",(e,t)=>{Nr.init(e,t),e._zod.check=r=>{CW(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),aS=j("$ZodCustomStringFormat",(e,t)=>{Nr.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),py=j("$ZodNumber",(e,t)=>{xt.init(e,t),e._zod.pattern=e._zod.bag.pattern??B1,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),cS=j("$ZodNumberFormat",(e,t)=>{jN.init(e,t),py.init(e,t)}),vA=j("$ZodBoolean",(e,t)=>{xt.init(e,t),e._zod.pattern=LN,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),hy=j("$ZodBigInt",(e,t)=>{xt.init(e,t),e._zod.pattern=MN,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),uS=j("$ZodBigIntFormat",(e,t)=>{qN.init(e,t),hy.init(e,t)}),lS=j("$ZodSymbol",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),r}}),dS=j("$ZodUndefined",(e,t)=>{xt.init(e,t),e._zod.pattern=ON,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),r}}),fS=j("$ZodNull",(e,t)=>{xt.init(e,t),e._zod.pattern=FN,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),pS=j("$ZodAny",(e,t)=>{xt.init(e,t),e._zod.parse=r=>r}),hS=j("$ZodUnknown",(e,t)=>{xt.init(e,t),e._zod.parse=r=>r}),AS=j("$ZodNever",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),gS=j("$ZodVoid",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),mS=j("$ZodDate",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:e}),r}});yS=j("$ZodArray",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let s=[];for(let o=0;ouW(u,r,o))):uW(c,r,o)}return s.length?Promise.all(s).then(()=>r):r}});dM=j("$ZodObject",(e,t)=>{if(xt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=pA(()=>wW(t));Ot(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let i=ff,s=t.catchall,o;e._zod.parse=(a,c)=>{o??(o=n.value);let u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let l=[],d=o.shape;for(let f of o.keys){let p=d[f],h=p._zod.optout==="optional",A=p._zod.run({value:u[f],issues:[]},c);A instanceof Promise?l.push(A.then(g=>P1(g,a,f,u,h))):P1(A,a,f,u,h)}return s?IW(l,u,a,c,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),fM=j("$ZodObjectJIT",(e,t)=>{dM.init(e,t);let r=e._zod.parse,n=pA(()=>wW(t)),i=f=>{let p=new fy(["shape","payload","ctx"]),h=n.value,A=E=>{let C=p1(E);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};p.write("const input = payload.value;");let g=Object.create(null),m=0;for(let E of h.keys)g[E]=`key_${m++}`;p.write("const newResult = {};");for(let E of h.keys){let C=g[E],w=p1(E),_=f[E]?._zod?.optout==="optional";p.write(`const ${C} = ${A(E)};`),_?p.write(` - if (${C}.issues.length) { +`))}}});var pM,hM=N(()=>{pM={major:4,minor:3,patch:6}});function gM(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function _W(e){if(!R1.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return gM(r)}function TW(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}function yW(e,t,r){e.issues.length&&t.issues.push(...uo(r,e.issues)),t.value[r]=e.value}function $1(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...uo(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function RW(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=AN(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function QW(e,t,r,n,i,s){let o=[],a=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in t){if(a.has(d))continue;if(u==="never"){o.push(d);continue}let f=c.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(p=>$1(p,r,d,t,l))):$1(f,r,d,t,l)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}function bW(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let i=e.filter(s=>!kl(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(o=>Ts(o,n,xn())))}),t)}function EW(e,t,r,n){let i=e.filter(s=>s.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(o=>Ts(o,n,xn())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function AM(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Bl(e)&&Bl(t)){let r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(let s of n){let o=AM(e[s],t[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;na.l&&a.r).map(([a])=>a);if(s.length&&i&&e.issues.push({...i,keys:s}),kl(e))return e;let o=AM(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function L1(e,t,r){e.issues.length&&t.issues.push(...uo(r,e.issues)),t.value[r]=e.value}function wW(e,t,r,n,i,s,o){e.issues.length&&(ly.has(typeof n)?r.issues.push(...uo(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:s,issues:e.issues.map(a=>Ts(a,o,xn()))})),t.issues.length&&(ly.has(typeof n)?r.issues.push(...uo(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:s,key:n,issues:t.issues.map(a=>Ts(a,o,xn()))})),r.value.set(e.value,t.value)}function IW(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function SW(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function vW(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function xW(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function F1(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}function O1(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(s=>U1(e,s,t.out,r)):U1(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(s=>U1(e,s,t.in,r)):U1(e,i,t.in,r)}}function U1(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}function BW(e){return e.value=Object.freeze(e.value),e}function kW(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(bA(i))}}var Tt,_l,Lr,H1,j1,q1,z1,V1,G1,W1,Y1,J1,Z1,K1,X1,eS,tS,rS,nS,iS,sS,oS,aS,cS,uS,lS,dS,fS,my,pS,TA,yy,hS,AS,gS,mS,yS,bS,ES,CS,wS,IS,mM,yM,RA,SS,vS,xS,by,BS,kS,_S,TS,RS,QS,DS,Ey,NS,MS,PS,LS,FS,OS,US,$S,HS,QA,jS,qS,zS,VS,GS,WS,bM=N(()=>{P1();gA();fM();bN();D1();ot();hM();ot();Tt=q("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pM;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(o,a,c)=>{let u=kl(o),l;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(u)continue;let f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&c?.async===!1)throw new Na;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(u||(u=kl(o,f)))});else{if(o.issues.length===f)continue;u||(u=kl(o,f))}}return l?l.then(()=>o):o},s=(o,a,c)=>{if(kl(o))return o.aborted=!0,o;let u=i(a,n,c);if(u instanceof Promise){if(c.async===!1)throw new Na;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){let u=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>s(l,o,a)):s(u,o,a)}let c=e._zod.parse(o,a);if(c instanceof Promise){if(a.async===!1)throw new Na;return c.then(u=>i(u,n,a))}return i(c,n,a)}}Ht(e,"~standard",()=>({validate:i=>{try{let s=yf(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return kA(e,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),_l=q("$ZodString",(e,t)=>{Tt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??UN(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Lr=q("$ZodStringFormat",(e,t)=>{_A.init(e,t),_l.init(e,t)}),H1=q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=BN),Lr.init(e,t)}),j1=q("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=bf(n))}else t.pattern??(t.pattern=bf());Lr.init(e,t)}),q1=q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=kN),Lr.init(e,t)}),z1=q("$ZodURL",(e,t)=>{Lr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),V1=q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=_N()),Lr.init(e,t)}),G1=q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=vN),Lr.init(e,t)}),W1=q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=EN),Lr.init(e,t)}),Y1=q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=CN),Lr.init(e,t)}),J1=q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=wN),Lr.init(e,t)}),Z1=q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=IN),Lr.init(e,t)}),K1=q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=SN),Lr.init(e,t)}),X1=q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ON(t)),Lr.init(e,t)}),eS=q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=LN),Lr.init(e,t)}),tS=q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=FN(t)),Lr.init(e,t)}),rS=q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=xN),Lr.init(e,t)}),nS=q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=TN),Lr.init(e,t),e._zod.bag.format="ipv4"}),iS=q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=RN),Lr.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),sS=q("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=QN(t.delimiter)),Lr.init(e,t),e._zod.bag.format="mac"}),oS=q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=DN),Lr.init(e,t)}),aS=q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=NN),Lr.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,s]=n;if(!s)throw new Error;let o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});cS=q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=MN),Lr.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{gM(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});uS=q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=R1),Lr.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{_W(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),lS=q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=PN),Lr.init(e,t)});dS=q("$ZodJWT",(e,t)=>{Lr.init(e,t),e._zod.check=r=>{TW(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),fS=q("$ZodCustomStringFormat",(e,t)=>{Lr.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),my=q("$ZodNumber",(e,t)=>{Tt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Q1,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),pS=q("$ZodNumberFormat",(e,t)=>{YN.init(e,t),my.init(e,t)}),TA=q("$ZodBoolean",(e,t)=>{Tt.init(e,t),e._zod.pattern=jN,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),yy=q("$ZodBigInt",(e,t)=>{Tt.init(e,t),e._zod.pattern=$N,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),hS=q("$ZodBigIntFormat",(e,t)=>{JN.init(e,t),yy.init(e,t)}),AS=q("$ZodSymbol",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),r}}),gS=q("$ZodUndefined",(e,t)=>{Tt.init(e,t),e._zod.pattern=zN,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),r}}),mS=q("$ZodNull",(e,t)=>{Tt.init(e,t),e._zod.pattern=qN,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),yS=q("$ZodAny",(e,t)=>{Tt.init(e,t),e._zod.parse=r=>r}),bS=q("$ZodUnknown",(e,t)=>{Tt.init(e,t),e._zod.parse=r=>r}),ES=q("$ZodNever",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),CS=q("$ZodVoid",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),wS=q("$ZodDate",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:e}),r}});IS=q("$ZodArray",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let s=[];for(let o=0;oyW(u,r,o))):yW(c,r,o)}return s.length?Promise.all(s).then(()=>r):r}});mM=q("$ZodObject",(e,t)=>{if(Tt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=yA(()=>RW(t));Ht(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let i=mf,s=t.catchall,o;e._zod.parse=(a,c)=>{o??(o=n.value);let u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let l=[],d=o.shape;for(let f of o.keys){let p=d[f],h=p._zod.optout==="optional",A=p._zod.run({value:u[f],issues:[]},c);A instanceof Promise?l.push(A.then(g=>$1(g,a,f,u,h))):$1(A,a,f,u,h)}return s?QW(l,u,a,c,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),yM=q("$ZodObjectJIT",(e,t)=>{mM.init(e,t);let r=e._zod.parse,n=yA(()=>RW(t)),i=f=>{let p=new gy(["shape","payload","ctx"]),h=n.value,A=C=>{let E=y1(C);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};p.write("const input = payload.value;");let g=Object.create(null),m=0;for(let C of h.keys)g[C]=`key_${m++}`;p.write("const newResult = {};");for(let C of h.keys){let E=g[C],w=y1(C),_=f[C]?._zod?.optout==="optional";p.write(`const ${E} = ${A(C)};`),_?p.write(` + if (${E}.issues.length) { if (${w} in input) { - payload.issues = payload.issues.concat(${C}.issues.map(iss => ({ + payload.issues = payload.issues.concat(${E}.issues.map(iss => ({ ...iss, path: iss.path ? [${w}, ...iss.path] : [${w}] }))); } } - if (${C}.value === undefined) { + if (${E}.value === undefined) { if (${w} in input) { newResult[${w}] = undefined; } } else { - newResult[${w}] = ${C}.value; + newResult[${w}] = ${E}.value; } `):p.write(` - if (${C}.issues.length) { - payload.issues = payload.issues.concat(${C}.issues.map(iss => ({ + if (${E}.issues.length) { + payload.issues = payload.issues.concat(${E}.issues.map(iss => ({ ...iss, path: iss.path ? [${w}, ...iss.path] : [${w}] }))); } - if (${C}.value === undefined) { + if (${E}.value === undefined) { if (${w} in input) { newResult[${w}] = undefined; } } else { - newResult[${w}] = ${C}.value; + newResult[${w}] = ${E}.value; } - `)}p.write("payload.value = newResult;"),p.write("return payload;");let b=p.compile();return(E,C)=>b(f,E,C)},s,o=ff,a=!ty.jitless,u=a&&aN.value,l=t.catchall,d;e._zod.parse=(f,p)=>{d??(d=n.value);let h=f.value;return o(h)?a&&u&&p?.async===!1&&p.jitless!==!0?(s||(s=i(t.shape)),f=s(f,p),l?IW([],h,f,p,d,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});xA=j("$ZodUnion",(e,t)=>{xt.init(e,t),Ot(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ot(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ot(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ot(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>sy(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>lW(c,i,e,s)):lW(a,i,e,s)}});bS=j("$ZodXor",(e,t)=>{xA.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},s);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(c=>dW(c,i,e,s)):dW(a,i,e,s)}}),ES=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,xA.init(e,t);let r=e._zod.parse;Ot(e._zod,"propValues",()=>{let i={};for(let s of t.options){let o=s._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[a,c]of Object.entries(o)){i[a]||(i[a]=new Set);for(let u of c)i[a].add(u)}}return i});let n=pA(()=>{let i=t.options,s=new Map;for(let o of i){let a=o._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let c of a){if(s.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);s.set(c,o)}}return s});e._zod.parse=(i,s)=>{let o=i.value;if(!ff(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;let a=n.value.get(o?.[t.discriminator]);return a?a._zod.run(i,s):t.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),CS=j("$ZodIntersection",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value,s=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([c,u])=>fW(r,c,u)):fW(r,s,o)}});Ay=j("$ZodTuple",(e,t)=>{xt.init(e,t);let r=t.items;e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let o=[],a=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=a===-1?0:r.length-a;if(!t.rest){let l=s.length>r.length,d=s.length=s.length&&u>=c)continue;let d=l._zod.run({value:s[u],issues:[]},i);d instanceof Promise?o.push(d.then(f=>Q1(f,n,u))):Q1(d,n,u)}if(t.rest){let l=s.slice(r.length);for(let d of l){u++;let f=t.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?o.push(f.then(p=>Q1(p,n,u))):Q1(f,n,u)}}return o.length?Promise.all(o).then(()=>n):n}});wS=j("$ZodRecord",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Sl(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let s=[],o=t.keyType._zod.values;if(o){r.value={};let a=new Set;for(let u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=t.valueType._zod.run({value:i[u],issues:[]},n);l instanceof Promise?s.push(l.then(d=>{d.issues.length&&r.issues.push(...co(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...co(u,l.issues)),r.value[u]=l.value)}let c;for(let u in i)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&B1.test(a)&&c.issues.length){let d=t.keyType._zod.run({value:Number(a),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[a]=i[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>Ts(d,n,Sn())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:i[a],issues:[]},n);l instanceof Promise?s.push(l.then(d=>{d.issues.length&&r.issues.push(...co(a,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...co(a,l.issues)),r.value[c.value]=l.value)}}return s.length?Promise.all(s).then(()=>r):r}}),IS=j("$ZodMap",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let s=[];r.value=new Map;for(let[o,a]of i){let c=t.keyType._zod.run({value:o,issues:[]},n),u=t.valueType._zod.run({value:a,issues:[]},n);c instanceof Promise||u instanceof Promise?s.push(Promise.all([c,u]).then(([l,d])=>{pW(l,d,r,o,i,e,n)})):pW(c,u,r,o,i,e,n)}return s.length?Promise.all(s).then(()=>r):r}});SS=j("$ZodSet",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let s=[];r.value=new Set;for(let o of i){let a=t.valueType._zod.run({value:o,issues:[]},n);a instanceof Promise?s.push(a.then(c=>hW(c,r))):hW(a,r)}return s.length?Promise.all(s).then(()=>r):r}});vS=j("$ZodEnum",(e,t)=>{xt.init(e,t);let r=iy(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>oy.has(typeof i)).map(i=>typeof i=="string"?Do(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),xS=j("$ZodLiteral",(e,t)=>{if(xt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Do(n):n?Do(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}}),BS=j("$ZodFile",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),kS=j("$ZodTransform",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cl(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new Ra;return r.value=i,r}});gy=j("$ZodOptional",(e,t)=>{xt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ot(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sy(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>AW(s,r.value)):AW(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),_S=j("$ZodExactOptional",(e,t)=>{gy.init(e,t),Ot(e._zod,"values",()=>t.innerType._zod.values),Ot(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),TS=j("$ZodNullable",(e,t)=>{xt.init(e,t),Ot(e._zod,"optin",()=>t.innerType._zod.optin),Ot(e._zod,"optout",()=>t.innerType._zod.optout),Ot(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sy(r.source)}|null)$`):void 0}),Ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),RS=j("$ZodDefault",(e,t)=>{xt.init(e,t),e._zod.optin="optional",Ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>gW(s,t)):gW(i,t)}});QS=j("$ZodPrefault",(e,t)=>{xt.init(e,t),e._zod.optin="optional",Ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),DS=j("$ZodNonOptional",(e,t)=>{xt.init(e,t),Ot(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>mW(s,e)):mW(i,e)}});NS=j("$ZodSuccess",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cl("ZodSuccess");let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),MS=j("$ZodCatch",(e,t)=>{xt.init(e,t),Ot(e._zod,"optin",()=>t.innerType._zod.optin),Ot(e._zod,"optout",()=>t.innerType._zod.optout),Ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(o=>Ts(o,n,Sn()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Ts(s,n,Sn()))},input:r.value}),r.issues=[]),r)}}),PS=j("$ZodNaN",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),LS=j("$ZodPipe",(e,t)=>{xt.init(e,t),Ot(e._zod,"values",()=>t.in._zod.values),Ot(e._zod,"optin",()=>t.in._zod.optin),Ot(e._zod,"optout",()=>t.out._zod.optout),Ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(o=>D1(o,t.in,n)):D1(s,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>D1(s,t.out,n)):D1(i,t.out,n)}});BA=j("$ZodCodec",(e,t)=>{xt.init(e,t),Ot(e._zod,"values",()=>t.in._zod.values),Ot(e._zod,"optin",()=>t.in._zod.optin),Ot(e._zod,"optout",()=>t.out._zod.optout),Ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let s=t.in._zod.run(r,n);return s instanceof Promise?s.then(o=>N1(o,t,n)):N1(s,t,n)}else{let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(o=>N1(o,t,n)):N1(s,t,n)}}});FS=j("$ZodReadonly",(e,t)=>{xt.init(e,t),Ot(e._zod,"propValues",()=>t.innerType._zod.propValues),Ot(e._zod,"values",()=>t.innerType._zod.values),Ot(e._zod,"optin",()=>t.innerType?._zod?.optin),Ot(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(yW):yW(i)}});OS=j("$ZodTemplateLiteral",(e,t)=>{xt.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let s=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(s,o))}else if(n===null||cN.has(typeof n))r.push(Do(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),US=j("$ZodFunction",(e,t)=>(xt.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=e._def.input?yA(e._def.input,n):n,s=Reflect.apply(r,this,i);return e._def.output?yA(e._def.output,s):s}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=e._def.input?await EA(e._def.input,n):n,s=await Reflect.apply(r,this,i);return e._def.output?await EA(e._def.output,s):s}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new Ay({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),$S=j("$ZodPromise",(e,t)=>{xt.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),HS=j("$ZodLazy",(e,t)=>{xt.init(e,t),Ot(e._zod,"innerType",()=>t.getter()),Ot(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ot(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ot(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ot(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),jS=j("$ZodCustom",(e,t)=>{jr.init(e,t),xt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>bW(s,r,n,e));bW(i,r,n,e)}})});function SW(){return{localeError:QDe()}}var QDe,vW=D(()=>{ot();QDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\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 ${s}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return i.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 ${me(i.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: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${i.maximum.toString()} ${o.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 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${i.minimum.toString()} ${o.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${i.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${X(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.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 ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function xW(){return{localeError:DDe()}}var DDe,BW=D(()=>{ot();DDe=()=>{let e={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 t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${s}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${me(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${s}${i.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${s.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:s.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${s.suffix}" il\u0259 bitm\u0259lidir`:s.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${s.includes}" daxil olmal\u0131d\u0131r`:s.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${s.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[s.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function kW(e,t,r,n){let i=Math.abs(e),s=i%10,o=i%100;return o>=11&&o<=19?n:s===1?t:s>=2&&s<=4?r:n}function _W(){return{localeError:NDe()}}var NDe,TW=D(()=>{ot();NDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${s}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return i.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 ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);if(o){let a=Number(i.maximum),c=kW(a,o.unit.one,o.unit.few,o.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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${s}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);if(o){let a=Number(i.minimum),c=kW(a,o.unit.one,o.unit.few,o.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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${s}${i.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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function RW(){return{localeError:MDe()}}var MDe,QW=D(()=>{ot();MDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${s}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${s}${i.minimum.toString()} ${o.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;if(s.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 "${s.prefix}"`;if(s.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 "${s.suffix}"`;if(s.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 "${s.includes}"`;if(s.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 ${s.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return s.format==="emoji"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="datetime"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="date"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),s.format==="time"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="duration"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${o} ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.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 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function DW(){return{localeError:PDe()}}var PDe,NW=D(()=>{ot();PDe=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${s}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${me(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${X(i.values," o ")}`;case"too_big":{let s=i.inclusive?"com a m\xE0xim":"menys de",o=t(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${s} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"com a m\xEDnim":"m\xE9s de",o=t(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${s} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${s.prefix}"`:s.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${s.suffix}"`:s.format==="includes"?`Format inv\xE0lid: ha d'incloure "${s.includes}"`:s.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${s.pattern}`:`Format inv\xE0lid per a ${r[s.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}}});function MW(){return{localeError:LDe()}}var LDe,PW=D(()=>{ot();LDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${s}, obdr\u017Eeno ${a}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${me(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${s}${i.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${s}${i.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${s.prefix}"`:s.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${s.suffix}"`:s.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${s.includes}"`:s.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${s.pattern}`:`Neplatn\xFD form\xE1t ${r[s.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${X(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}}});function LW(){return{localeError:FDe()}}var FDe,FW=D(()=>{ot();FDe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${s}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${me(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin),a=n[i.origin]??i.origin;return o?`For stor: forventede ${a??"value"} ${o.verb} ${s} ${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin),a=n[i.origin]??i.origin;return o?`For lille: forventede ${a} ${o.verb} ${s} ${i.minimum.toString()} ${o.unit}`:`For lille: forventede ${a} havde ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${r[s.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}}});function OW(){return{localeError:ODe()}}var ODe,UW=D(()=>{ot();ODe=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${s}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${me(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${s}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${s}${i.maximum.toString()} ist`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${s}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${s}${i.minimum.toString()} ist`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ung\xFCltiger String: muss mit "${s.prefix}" beginnen`:s.format==="ends_with"?`Ung\xFCltiger String: muss mit "${s.suffix}" enden`:s.format==="includes"?`Ung\xFCltiger String: muss "${s.includes}" enthalten`:s.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${s.pattern} entsprechen`:`Ung\xFCltig: ${r[s.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function qS(){return{localeError:UDe()}}var UDe,hM=D(()=>{ot();UDe=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return`Invalid input: expected ${s}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${me(i.values[0])}`:`Invalid option: expected one of ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}}});function $W(){return{localeError:$De()}}var $De,HW=D(()=>{ot();$De=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${s}, ricevi\u011Dis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${me(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${s}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${s}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${s.prefix}"`:s.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${s.suffix}"`:s.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${s.includes}"`:s.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${s.pattern}`:`Nevalida ${r[s.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}}});function jW(){return{localeError:HDe()}}var HDe,qW=D(()=>{ot();HDe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${s}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${me(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin),a=n[i.origin]??i.origin;return o?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${s}${i.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin),a=n[i.origin]??i.origin;return o?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${s}${i.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${r[s.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}}});function zW(){return{localeError:jDe()}}var jDe,VW=D(()=>{ot();jDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \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 ${s} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${me(i.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 ${X(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:s.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:s.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${s.includes}" \u0628\u0627\u0634\u062F`:s.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${s.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[s.format]??i.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 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${X(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.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 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function GW(){return{localeError:qDe()}}var qDe,WW=D(()=>{ot();qDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${s}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${me(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${s}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${s}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${s.includes}"`:s.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${s.pattern}`:`Virheellinen ${r[s.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${X(i.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 YW(){return{localeError:zDe()}}var zDe,JW=D(()=>{ot();zDe=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"nombre",array:"tableau"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${s} attendu, ${a} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${me(i.values[0])} attendu`:`Option invalide : une valeur parmi ${X(i.values,"|")} attendue`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Trop grand : ${i.origin??"valeur"} doit ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Trop petit : ${i.origin} doit ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${s.pattern}`:`${r[s.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${X(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function ZW(){return{localeError:VDe()}}var VDe,KW=D(()=>{ot();VDe=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${s}, re\xE7u ${a}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${me(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"\u2264":"<",o=t(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${s}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"\u2265":">",o=t(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${s}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${s.pattern}`:`${r[s.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${X(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function XW(){return{localeError:GDe()}}var GDe,eY=D(()=>{ot();GDe=()=>{let e={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"}},t={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"}},r=u=>u?e[u]:void 0,n=u=>{let l=r(u);return l?l.label:u??e.unknown.label},i=u=>`\u05D4${n(u)}`,s=u=>(r(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",o=u=>u?t[u]??null:null,a={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 l=u.expected,d=c[l??""]??n(l),f=we(u.input),p=c[f]??e[f]?.label??f;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 ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}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 ${me(u.values[0])}`;let l=u.values.map(p=>me(p));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 ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.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 ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=o(u.origin),d=i(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",A=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`.trim()}let f=u.inclusive?"<=":"<",p=s(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()}`}case"too_small":{let l=o(u.origin),d=i(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}let A=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`.trim()}let f=u.inclusive?">=":">",p=s(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.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 ${l.pattern}`;let d=a[l.format],f=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${h}`}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"}: ${X(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${i(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function tY(){return{localeError:WDe()}}var WDe,rY=D(()=>{ot();WDe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${s}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${me(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${s}${i.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${s}${i.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\xC9rv\xE9nytelen string: "${s.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:s.format==="ends_with"?`\xC9rv\xE9nytelen string: "${s.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:s.format==="includes"?`\xC9rv\xE9nytelen string: "${s.includes}" \xE9rt\xE9ket kell tartalmaznia`:s.format==="regex"?`\xC9rv\xE9nytelen string: ${s.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[s.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function nY(e,t,r){return Math.abs(e)===1?t:r}function kA(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function iY(){return{localeError:YDe()}}var YDe,sY=D(()=>{ot();YDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\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 ${s}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return i.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 ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);if(o){let a=Number(i.maximum),c=nY(a,o.unit.one,o.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 ${kA(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${s}${i.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 ${kA(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);if(o){let a=Number(i.minimum),c=nY(a,o.unit.one,o.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 ${kA(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${s}${i.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 ${kA(i.origin)} \u056C\u056B\u0576\u056B ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${s.prefix}"-\u0578\u057E`:s.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${s.suffix}"-\u0578\u057E`:s.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${s.includes}"`:s.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 ${s.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[s.format]??i.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 ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${X(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${kA(i.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 ${kA(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function oY(){return{localeError:JDe()}}var JDe,aY=D(()=>{ot();JDe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${s}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${me(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${s}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${s}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`String tidak valid: harus dimulai dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak valid: harus berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak valid: harus menyertakan "${s.includes}"`:s.format==="regex"?`String tidak valid: harus sesuai pola ${s.pattern}`:`${r[s.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}}});function cY(){return{localeError:ZDe()}}var ZDe,uY=D(()=>{ot();ZDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${s}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${me(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${s}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${s}${i.minimum.toString()} ${o.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${s.prefix}"`:s.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${s.suffix}"`:s.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${s.includes}"`:s.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${s.pattern}`:`Rangt ${r[s.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${X(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}}});function lY(){return{localeError:KDe()}}var KDe,dY=D(()=>{ot();KDe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${s}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${me(i.values[0])}`:`Opzione non valida: atteso uno tra ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${s}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${s}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Stringa non valida: deve iniziare con "${s.prefix}"`:s.format==="ends_with"?`Stringa non valida: deve terminare con "${s.suffix}"`:s.format==="includes"?`Stringa non valida: deve includere "${s.includes}"`:s.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${X(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}}});function fY(){return{localeError:XDe()}}var XDe,pY=D(()=>{ot();XDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${s}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${me(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${X(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let s=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=t(i.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o.unit??"\u8981\u7D20"}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let s=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=t(i.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o.unit}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${s.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[s.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.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${i.keys.length>1?"\u7FA4":""}: ${X(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function hY(){return{localeError:eNe()}}var eNe,AY=D(()=>{ot();eNe=()=>{let e={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 t(i){return e[i]??null}let r={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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\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 ${s}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return i.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 ${me(i.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 ${X(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\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 ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.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 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${s.prefix}"-\u10D8\u10D7`:s.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${s.suffix}"-\u10D8\u10D7`:s.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${s.includes}"-\u10E1`:s.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 ${s.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[s.format]??i.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 ${i.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${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.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 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function zS(){return{localeError:tNe()}}var tNe,AM=D(()=>{ot();tNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\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 ${s} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return i.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 ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${i.maximum.toString()} ${o.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${s} ${i.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${X(i.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 ${i.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 ${i.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 gY(){return zS()}var mY=D(()=>{AM()});function yY(){return{localeError:rNe()}}var rNe,bY=D(()=>{ot();rNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${s}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${me(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${X(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let s=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=s==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${s}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${s}${o}`}case"too_small":{let s=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=s==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${s}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${s}${o}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:s.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${s.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[s.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${X(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function EY(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}function CY(){return{localeError:nNe()}}var my,nNe,wY=D(()=>{ot();my=e=>e.charAt(0).toUpperCase()+e.slice(1);nNe=()=>{let e={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 t(i,s,o,a){let c=e[i]??null;return c===null?c:{unit:c.unit[s],verb:c.verb[a][o?"inclusive":"notInclusive"]}}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${s}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${me(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${X(i.values,"|")} pasirinkim\u0173`;case"too_big":{let s=n[i.origin]??i.origin,o=t(i.origin,EY(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${my(s??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.maximum.toString()} ${o.unit??"element\u0173"}`;let a=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${my(s??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{let s=n[i.origin]??i.origin,o=t(i.origin,EY(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${my(s??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.minimum.toString()} ${o.unit??"element\u0173"}`;let a=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${my(s??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${s.prefix}"`:s.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${s.suffix}"`:s.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${s.includes}"`:s.format==="regex"?`Eilut\u0117 privalo atitikti ${s.pattern}`:`Neteisingas ${r[s.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${X(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let s=n[i.origin]??i.origin;return`${my(s??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function IY(){return{localeError:iNe()}}var iNe,SY=D(()=>{ot();iNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${s}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${s}${i.minimum.toString()} ${o.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`Invalid ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`${i.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"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.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 ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function vY(){return{localeError:sNe()}}var sNe,xY=D(()=>{ot();sNe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${s}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${me(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`String tidak sah: mesti bermula dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak sah: mesti mengandungi "${s.includes}"`:s.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${s.pattern}`:`${r[s.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${X(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}}});function BY(){return{localeError:oNe()}}var oNe,kY=D(()=>{ot();oNe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){return e[i]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${s}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${me(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return o?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${s}${i.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${s}${i.maximum.toString()} is`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return o?`Te ${a}: verwacht dat ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${a}: verwacht dat ${i.origin} ${s}${i.minimum.toString()} is`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ongeldige tekst: moet met "${s.prefix}" beginnen`:s.format==="ends_with"?`Ongeldige tekst: moet op "${s.suffix}" eindigen`:s.format==="includes"?`Ongeldige tekst: moet "${s.includes}" bevatten`:s.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${s.pattern}`:`Ongeldig: ${r[s.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}}});function _Y(){return{localeError:aNe()}}var aNe,TY=D(()=>{ot();aNe=()=>{let e={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 t(i){return e[i]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\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"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${s}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${me(i.values[0])}`:`Ugyldig valg: forventet en av ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${s}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`For lite(n): forventet ${i.origin} til \xE5 ha ${s}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${r[s.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}}});function RY(){return{localeError:cNe()}}var cNe,QY=D(()=>{ot();cNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${s}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${me(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${s}${i.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${s}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${s}${i.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${s}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let s=i;return s.format==="starts_with"?`F\xE2sit metin: "${s.prefix}" ile ba\u015Flamal\u0131.`:s.format==="ends_with"?`F\xE2sit metin: "${s.suffix}" ile bitmeli.`:s.format==="includes"?`F\xE2sit metin: "${s.includes}" ihtiv\xE2 etmeli.`:s.format==="regex"?`F\xE2sit metin: ${s.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[s.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function DY(){return{localeError:uNe()}}var uNe,NY=D(()=>{ot();uNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${s} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${me(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${X(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:s.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:s.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${s.includes}" \u0648\u0644\u0631\u064A`:s.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${s.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[s.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.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 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function MY(){return{localeError:lNe()}}var lNe,PY=D(()=>{ot();lNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${s}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${me(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${i.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${i.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${s.prefix}"`:s.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${s.suffix}"`:s.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${s.includes}"`:s.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${s.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[s.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function LY(){return{localeError:dNe()}}var dNe,FY=D(()=>{ot();dNe=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${s}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${me(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${s}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${s}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`${r[s.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}}});function OY(e,t,r,n){let i=Math.abs(e),s=i%10,o=i%100;return o>=11&&o<=19?n:s===1?t:s>=2&&s<=4?r:n}function UY(){return{localeError:fNe()}}var fNe,$Y=D(()=>{ot();fNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${s}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);if(o){let a=Number(i.maximum),c=OY(a,o.unit.one,o.unit.few,o.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);if(o){let a=Number(i.minimum),c=OY(a,o.unit.one,o.unit.few,o.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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${i.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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.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 ${i.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 HY(){return{localeError:pNe()}}var pNe,jY=D(()=>{ot();pNe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${s}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${me(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${s}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${s}${i.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${s.prefix}"`:s.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${s.suffix}"`:s.format==="includes"?`Neveljaven niz: mora vsebovati "${s.includes}"`:s.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${s.pattern}`:`Neveljaven ${r[s.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${X(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}}});function qY(){return{localeError:hNe()}}var hNe,zY=D(()=>{ot();hNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${s}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${me(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${s}${i.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${s}${i.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${s.prefix}"`:s.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${s.suffix}"`:s.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${s.includes}"`:s.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${s.pattern}"`:`Ogiltig(t) ${r[s.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function VY(){return{localeError:ANe()}}var ANe,GY=D(()=>{ot();ANe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\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 ${s}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return i.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 ${me(i.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 ${X(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\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 ${i.origin} ${s}${i.minimum.toString()} ${o.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 ${i.origin} ${s}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${s.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 ${r[s.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.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${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.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`${i.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 WY(){return{localeError:gNe()}}var gNe,YY=D(()=>{ot();gNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\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 ${s} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=t(i.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.maximum.toString()} ${o.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=t(i.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.minimum.toString()} ${o.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:s.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 ${s.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[s.format]??i.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 ${i.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: ${X(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.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 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function JY(){return{localeError:mNe()}}var mNe,ZY=D(()=>{ot();mNe=()=>{let e={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 t(i){return e[i]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${s}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${me(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${s}${i.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ge\xE7ersiz metin: "${s.prefix}" ile ba\u015Flamal\u0131`:s.format==="ends_with"?`Ge\xE7ersiz metin: "${s.suffix}" ile bitmeli`:s.format==="includes"?`Ge\xE7ersiz metin: "${s.includes}" i\xE7ermeli`:s.format==="regex"?`Ge\xE7ersiz metin: ${s.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[s.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function VS(){return{localeError:yNe()}}var yNe,gM=D(()=>{ot();yNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\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 ${s}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return i.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 ${me(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${o.verb} ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.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 KY(){return VS()}var XY=D(()=>{gM()});function eJ(){return{localeError:bNe()}}var bNe,tJ=D(()=>{ot();bNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${s} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${me(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${X(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${s}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${s}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${s}${i.minimum.toString()} ${o.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${s}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${s.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[s.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.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${i.keys.length>1?"\u0632":""}: ${X(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function rJ(){return{localeError:ENe()}}var ENe,nJ=D(()=>{ot();ENe=()=>{let e={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"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${s}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${me(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Juda katta: kutilgan ${i.origin??"qiymat"} ${s}${i.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Juda kichik: kutilgan ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${s.prefix}" bilan boshlanishi kerak`:s.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${s.suffix}" bilan tugashi kerak`:s.format==="includes"?`Noto\u2018g\u2018ri satr: "${s.includes}" ni o\u2018z ichiga olishi kerak`:s.format==="regex"?`Noto\u2018g\u2018ri satr: ${s.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[s.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function iJ(){return{localeError:CNe()}}var CNe,sJ=D(()=>{ot();CNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${s}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${me(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${s.prefix}"`:s.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${s.suffix}"`:s.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${s.includes}"`:s.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${s.pattern}`:`${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${X(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.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 ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function oJ(){return{localeError:wNe()}}var wNe,aJ=D(()=>{ot();wNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${s}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${me(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${s}${i.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.prefix}" \u5F00\u5934`:s.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.suffix}" \u7ED3\u5C3E`:s.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${s.pattern}`:`\u65E0\u6548${r[s.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function cJ(){return{localeError:INe()}}var INe,uJ=D(()=>{ot();INe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${s}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${me(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${s}${i.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${s}${i.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.prefix}" \u958B\u982D`:s.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.suffix}" \u7D50\u5C3E`:s.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${s.pattern}`:`\u7121\u6548\u7684 ${r[s.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${X(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function lJ(){return{localeError:SNe()}}var SNe,dJ=D(()=>{ot();SNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${s}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${me(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${o.verb} ${s}${i.maximum} ${o.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${s}${i.maximum}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${o.verb} ${s}${i.minimum} ${o.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${s}${i.minimum}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${s.suffix}"`:s.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${s.includes}"`:s.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${s.pattern}`:`A\u1E63\xEC\u1E63e: ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${X(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.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 ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var _A={};Jt(_A,{ar:()=>SW,az:()=>xW,be:()=>_W,bg:()=>RW,ca:()=>DW,cs:()=>MW,da:()=>LW,de:()=>OW,en:()=>qS,eo:()=>$W,es:()=>jW,fa:()=>zW,fi:()=>GW,fr:()=>YW,frCA:()=>ZW,he:()=>XW,hu:()=>tY,hy:()=>iY,id:()=>oY,is:()=>cY,it:()=>lY,ja:()=>fY,ka:()=>hY,kh:()=>gY,km:()=>zS,ko:()=>yY,lt:()=>CY,mk:()=>IY,ms:()=>vY,nl:()=>BY,no:()=>_Y,ota:()=>RY,pl:()=>MY,ps:()=>DY,pt:()=>LY,ru:()=>UY,sl:()=>HY,sv:()=>qY,ta:()=>VY,th:()=>WY,tr:()=>JY,ua:()=>KY,uk:()=>VS,ur:()=>eJ,uz:()=>rJ,vi:()=>iJ,yo:()=>lJ,zhCN:()=>oJ,zhTW:()=>cJ});var GS=D(()=>{vW();BW();TW();QW();NW();PW();FW();UW();hM();HW();qW();VW();WW();JW();KW();eY();rY();sY();aY();uY();dY();pY();AY();mY();AM();bY();wY();SY();xY();kY();TY();QY();NY();PY();FY();$Y();jY();zY();GY();YY();ZY();XY();gM();tJ();nJ();sJ();aJ();uJ();dJ()});function yy(){return new WS}var fJ,YS,JS,WS,ni,by=D(()=>{YS=Symbol("ZodOutput"),JS=Symbol("ZodInput"),WS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(fJ=globalThis).__zod_globalRegistry??(fJ.__zod_globalRegistry=yy());ni=globalThis.__zod_globalRegistry});function ZS(e,t){return new e({type:"string",...ke(t)})}function KS(e,t){return new e({type:"string",coerce:!0,...ke(t)})}function Ey(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function TA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function Cy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function wy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function Iy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function Sy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function RA(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function vy(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function xy(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function By(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function ky(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function _y(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function Ty(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function Ry(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function Qy(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function Dy(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function XS(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ke(t)})}function Ny(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function My(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function Py(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function Ly(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function Fy(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function Oy(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function tv(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function rv(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function nv(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function iv(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function sv(e,t){return new e({type:"number",checks:[],...ke(t)})}function ov(e,t){return new e({type:"number",coerce:!0,checks:[],...ke(t)})}function av(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ke(t)})}function cv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ke(t)})}function uv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ke(t)})}function lv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ke(t)})}function dv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ke(t)})}function fv(e,t){return new e({type:"boolean",...ke(t)})}function pv(e,t){return new e({type:"boolean",coerce:!0,...ke(t)})}function hv(e,t){return new e({type:"bigint",...ke(t)})}function Av(e,t){return new e({type:"bigint",coerce:!0,...ke(t)})}function gv(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ke(t)})}function mv(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ke(t)})}function yv(e,t){return new e({type:"symbol",...ke(t)})}function bv(e,t){return new e({type:"undefined",...ke(t)})}function Ev(e,t){return new e({type:"null",...ke(t)})}function Cv(e){return new e({type:"any"})}function wv(e){return new e({type:"unknown"})}function Iv(e,t){return new e({type:"never",...ke(t)})}function Sv(e,t){return new e({type:"void",...ke(t)})}function vv(e,t){return new e({type:"date",...ke(t)})}function xv(e,t){return new e({type:"date",coerce:!0,...ke(t)})}function Bv(e,t){return new e({type:"nan",...ke(t)})}function Qa(e,t){return new _1({check:"less_than",...ke(t),value:e,inclusive:!1})}function us(e,t){return new _1({check:"less_than",...ke(t),value:e,inclusive:!0})}function Da(e,t){return new T1({check:"greater_than",...ke(t),value:e,inclusive:!1})}function Ei(e,t){return new T1({check:"greater_than",...ke(t),value:e,inclusive:!0})}function Uy(e){return Da(0,e)}function $y(e){return Qa(0,e)}function Hy(e){return us(0,e)}function jy(e){return Ei(0,e)}function gu(e,t){return new HN({check:"multiple_of",...ke(t),value:e})}function mu(e,t){return new zN({check:"max_size",...ke(t),maximum:e})}function Na(e,t){return new VN({check:"min_size",...ke(t),minimum:e})}function Bl(e,t){return new GN({check:"size_equals",...ke(t),size:e})}function kl(e,t){return new WN({check:"max_length",...ke(t),maximum:e})}function Ac(e,t){return new YN({check:"min_length",...ke(t),minimum:e})}function _l(e,t){return new JN({check:"length_equals",...ke(t),length:e})}function Af(e,t){return new ZN({check:"string_format",format:"regex",...ke(t),pattern:e})}function gf(e){return new KN({check:"string_format",format:"lowercase",...ke(e)})}function mf(e){return new XN({check:"string_format",format:"uppercase",...ke(e)})}function yf(e,t){return new eM({check:"string_format",format:"includes",...ke(t),includes:e})}function bf(e,t){return new tM({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function Ef(e,t){return new rM({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function qy(e,t,r){return new nM({check:"property",property:e,schema:t,...ke(r)})}function Cf(e,t){return new iM({check:"mime_type",mime:e,...ke(t)})}function No(e){return new sM({check:"overwrite",tx:e})}function wf(e){return No(t=>t.normalize(e))}function If(){return No(e=>e.trim())}function Sf(){return No(e=>e.toLowerCase())}function vf(){return No(e=>e.toUpperCase())}function QA(){return No(e=>oN(e))}function mM(e,t,r){return new e({type:"array",element:t,...ke(r)})}function xNe(e,t,r){return new e({type:"union",options:t,...ke(r)})}function BNe(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ke(r)})}function kNe(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ke(n)})}function _Ne(e,t,r){return new e({type:"intersection",left:t,right:r})}function TNe(e,t,r,n){let i=r instanceof xt,s=i?n:r,o=i?r:null;return new e({type:"tuple",items:t,rest:o,...ke(s)})}function RNe(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ke(n)})}function QNe(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ke(n)})}function DNe(e,t,r){return new e({type:"set",valueType:t,...ke(r)})}function NNe(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...ke(r)})}function MNe(e,t,r){return new e({type:"enum",entries:t,...ke(r)})}function PNe(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ke(r)})}function kv(e,t){return new e({type:"file",...ke(t)})}function LNe(e,t){return new e({type:"transform",transform:t})}function FNe(e,t){return new e({type:"optional",innerType:t})}function ONe(e,t){return new e({type:"nullable",innerType:t})}function UNe(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():A1(r)}})}function $Ne(e,t,r){return new e({type:"nonoptional",innerType:t,...ke(r)})}function HNe(e,t){return new e({type:"success",innerType:t})}function jNe(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function qNe(e,t,r){return new e({type:"pipe",in:t,out:r})}function zNe(e,t){return new e({type:"readonly",innerType:t})}function VNe(e,t,r){return new e({type:"template_literal",parts:t,...ke(r)})}function GNe(e,t){return new e({type:"lazy",getter:t})}function WNe(e,t){return new e({type:"promise",innerType:t})}function _v(e,t,r){let n=ke(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Tv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ke(r)})}function Rv(e){let t=pJ(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(hA(n,r.value,t._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(hA(i))}},e(r.value,r)));return t}function pJ(e,t){let r=new jr({check:"custom",...ke(t)});return r._zod.check=e,r}function Qv(e){let t=new jr({check:"describe"});return t._zod.onattach=[r=>{let n=ni.get(r)??{};ni.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function Dv(e){let t=new jr({check:"meta"});return t._zod.onattach=[r=>{let n=ni.get(r)??{};ni.add(r,{...n,...e})}],t._zod.check=()=>{},t}function Nv(e,t){let r=ke(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let s=new Set(n),o=new Set(i),a=e.Codec??BA,c=e.Boolean??vA,u=e.String??xl,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new a({type:"pipe",in:l,out:d,transform:((p,h)=>{let A=p;return r.case!=="sensitive"&&(A=A.toLowerCase()),s.has(A)?!0:o.has(A)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...o],input:h.value,inst:f,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function xf(e,t,r,n={}){let i=ke(n),s={...ke(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(s.pattern=r),new e(s)}var ev,hJ=D(()=>{R1();by();pM();ot();ev={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Tl(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ni,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qr(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);let a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,l);else{let f=o.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,f,l)}let d=e._zod.parent;d&&(o.ref||(o.ref=d),Qr(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io==="input"&&ls(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Rl(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let o of e.seen.entries()){let a=e.metadataRegistry.get(o[0])?.id;if(a){let c=n.get(a);if(c&&c!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}let i=o=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(o[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};let p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};let u=`#/${a}/`,l=o[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},s=o=>{if(o[1].schema.$ref)return;let a=o[1],{ref:c,defId:u}=i(o);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let o of e.seen.entries()){let a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/ + `)}p.write("payload.value = newResult;"),p.write("return payload;");let b=p.compile();return(C,E)=>b(f,C,E)},s,o=mf,a=!sy.jitless,u=a&&pN.value,l=t.catchall,d;e._zod.parse=(f,p)=>{d??(d=n.value);let h=f.value;return o(h)?a&&u&&p?.async===!1&&p.jitless!==!0?(s||(s=i(t.shape)),f=s(f,p),l?QW([],h,f,p,d,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});RA=q("$ZodUnion",(e,t)=>{Tt.init(e,t),Ht(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ht(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ht(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ht(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>uy(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>bW(c,i,e,s)):bW(a,i,e,s)}});SS=q("$ZodXor",(e,t)=>{RA.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},s);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(c=>EW(c,i,e,s)):EW(a,i,e,s)}}),vS=q("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,RA.init(e,t);let r=e._zod.parse;Ht(e._zod,"propValues",()=>{let i={};for(let s of t.options){let o=s._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[a,c]of Object.entries(o)){i[a]||(i[a]=new Set);for(let u of c)i[a].add(u)}}return i});let n=yA(()=>{let i=t.options,s=new Map;for(let o of i){let a=o._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let c of a){if(s.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);s.set(c,o)}}return s});e._zod.parse=(i,s)=>{let o=i.value;if(!mf(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;let a=n.value.get(o?.[t.discriminator]);return a?a._zod.run(i,s):t.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),xS=q("$ZodIntersection",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value,s=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([c,u])=>CW(r,c,u)):CW(r,s,o)}});by=q("$ZodTuple",(e,t)=>{Tt.init(e,t);let r=t.items;e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let o=[],a=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=a===-1?0:r.length-a;if(!t.rest){let l=s.length>r.length,d=s.length=s.length&&u>=c)continue;let d=l._zod.run({value:s[u],issues:[]},i);d instanceof Promise?o.push(d.then(f=>L1(f,n,u))):L1(d,n,u)}if(t.rest){let l=s.slice(r.length);for(let d of l){u++;let f=t.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?o.push(f.then(p=>L1(p,n,u))):L1(f,n,u)}}return o.length?Promise.all(o).then(()=>n):n}});BS=q("$ZodRecord",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Bl(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let s=[],o=t.keyType._zod.values;if(o){r.value={};let a=new Set;for(let u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=t.valueType._zod.run({value:i[u],issues:[]},n);l instanceof Promise?s.push(l.then(d=>{d.issues.length&&r.issues.push(...uo(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...uo(u,l.issues)),r.value[u]=l.value)}let c;for(let u in i)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Q1.test(a)&&c.issues.length){let d=t.keyType._zod.run({value:Number(a),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[a]=i[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>Ts(d,n,xn())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:i[a],issues:[]},n);l instanceof Promise?s.push(l.then(d=>{d.issues.length&&r.issues.push(...uo(a,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...uo(a,l.issues)),r.value[c.value]=l.value)}}return s.length?Promise.all(s).then(()=>r):r}}),kS=q("$ZodMap",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let s=[];r.value=new Map;for(let[o,a]of i){let c=t.keyType._zod.run({value:o,issues:[]},n),u=t.valueType._zod.run({value:a,issues:[]},n);c instanceof Promise||u instanceof Promise?s.push(Promise.all([c,u]).then(([l,d])=>{wW(l,d,r,o,i,e,n)})):wW(c,u,r,o,i,e,n)}return s.length?Promise.all(s).then(()=>r):r}});_S=q("$ZodSet",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let s=[];r.value=new Set;for(let o of i){let a=t.valueType._zod.run({value:o,issues:[]},n);a instanceof Promise?s.push(a.then(c=>IW(c,r))):IW(a,r)}return s.length?Promise.all(s).then(()=>r):r}});TS=q("$ZodEnum",(e,t)=>{Tt.init(e,t);let r=cy(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>ly.has(typeof i)).map(i=>typeof i=="string"?No(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:e}),i}}),RS=q("$ZodLiteral",(e,t)=>{if(Tt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?No(n):n?No(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}}),QS=q("$ZodFile",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),DS=q("$ZodTransform",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sl(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new Na;return r.value=i,r}});Ey=q("$ZodOptional",(e,t)=>{Tt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ht(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ht(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${uy(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>SW(s,r.value)):SW(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),NS=q("$ZodExactOptional",(e,t)=>{Ey.init(e,t),Ht(e._zod,"values",()=>t.innerType._zod.values),Ht(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),MS=q("$ZodNullable",(e,t)=>{Tt.init(e,t),Ht(e._zod,"optin",()=>t.innerType._zod.optin),Ht(e._zod,"optout",()=>t.innerType._zod.optout),Ht(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${uy(r.source)}|null)$`):void 0}),Ht(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),PS=q("$ZodDefault",(e,t)=>{Tt.init(e,t),e._zod.optin="optional",Ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>vW(s,t)):vW(i,t)}});LS=q("$ZodPrefault",(e,t)=>{Tt.init(e,t),e._zod.optin="optional",Ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),FS=q("$ZodNonOptional",(e,t)=>{Tt.init(e,t),Ht(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>xW(s,e)):xW(i,e)}});OS=q("$ZodSuccess",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sl("ZodSuccess");let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),US=q("$ZodCatch",(e,t)=>{Tt.init(e,t),Ht(e._zod,"optin",()=>t.innerType._zod.optin),Ht(e._zod,"optout",()=>t.innerType._zod.optout),Ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(o=>Ts(o,n,xn()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Ts(s,n,xn()))},input:r.value}),r.issues=[]),r)}}),$S=q("$ZodNaN",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),HS=q("$ZodPipe",(e,t)=>{Tt.init(e,t),Ht(e._zod,"values",()=>t.in._zod.values),Ht(e._zod,"optin",()=>t.in._zod.optin),Ht(e._zod,"optout",()=>t.out._zod.optout),Ht(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(o=>F1(o,t.in,n)):F1(s,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>F1(s,t.out,n)):F1(i,t.out,n)}});QA=q("$ZodCodec",(e,t)=>{Tt.init(e,t),Ht(e._zod,"values",()=>t.in._zod.values),Ht(e._zod,"optin",()=>t.in._zod.optin),Ht(e._zod,"optout",()=>t.out._zod.optout),Ht(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let s=t.in._zod.run(r,n);return s instanceof Promise?s.then(o=>O1(o,t,n)):O1(s,t,n)}else{let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(o=>O1(o,t,n)):O1(s,t,n)}}});jS=q("$ZodReadonly",(e,t)=>{Tt.init(e,t),Ht(e._zod,"propValues",()=>t.innerType._zod.propValues),Ht(e._zod,"values",()=>t.innerType._zod.values),Ht(e._zod,"optin",()=>t.innerType?._zod?.optin),Ht(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(BW):BW(i)}});qS=q("$ZodTemplateLiteral",(e,t)=>{Tt.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let s=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(s,o))}else if(n===null||hN.has(typeof n))r.push(No(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),zS=q("$ZodFunction",(e,t)=>(Tt.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=e._def.input?IA(e._def.input,n):n,s=Reflect.apply(r,this,i);return e._def.output?IA(e._def.output,s):s}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=e._def.input?await vA(e._def.input,n):n,s=await Reflect.apply(r,this,i);return e._def.output?await vA(e._def.output,s):s}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new by({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),VS=q("$ZodPromise",(e,t)=>{Tt.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),GS=q("$ZodLazy",(e,t)=>{Tt.init(e,t),Ht(e._zod,"innerType",()=>t.getter()),Ht(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ht(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ht(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ht(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),WS=q("$ZodCustom",(e,t)=>{zr.init(e,t),Tt.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>kW(s,r,n,e));kW(i,r,n,e)}})});function DW(){return{localeError:HDe()}}var HDe,NW=N(()=>{ot();HDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\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 ${s}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return i.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 ${ye(i.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: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${i.maximum.toString()} ${o.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 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${i.minimum.toString()} ${o.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${i.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${X(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.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 ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function MW(){return{localeError:jDe()}}var jDe,PW=N(()=>{ot();jDe=()=>{let e={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 t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${s}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${ye(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${s}${i.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${s.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:s.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${s.suffix}" il\u0259 bitm\u0259lidir`:s.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${s.includes}" daxil olmal\u0131d\u0131r`:s.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${s.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[s.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function LW(e,t,r,n){let i=Math.abs(e),s=i%10,o=i%100;return o>=11&&o<=19?n:s===1?t:s>=2&&s<=4?r:n}function FW(){return{localeError:qDe()}}var qDe,OW=N(()=>{ot();qDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${s}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return i.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 ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);if(o){let a=Number(i.maximum),c=LW(a,o.unit.one,o.unit.few,o.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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${s}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);if(o){let a=Number(i.minimum),c=LW(a,o.unit.one,o.unit.few,o.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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${s}${i.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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function UW(){return{localeError:zDe()}}var zDe,$W=N(()=>{ot();zDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${s}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${s}${i.minimum.toString()} ${o.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;if(s.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 "${s.prefix}"`;if(s.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 "${s.suffix}"`;if(s.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 "${s.includes}"`;if(s.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 ${s.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return s.format==="emoji"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="datetime"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="date"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),s.format==="time"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="duration"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${o} ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.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 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function HW(){return{localeError:VDe()}}var VDe,jW=N(()=>{ot();VDe=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${s}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${ye(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${X(i.values," o ")}`;case"too_big":{let s=i.inclusive?"com a m\xE0xim":"menys de",o=t(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${s} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"com a m\xEDnim":"m\xE9s de",o=t(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${s} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${s.prefix}"`:s.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${s.suffix}"`:s.format==="includes"?`Format inv\xE0lid: ha d'incloure "${s.includes}"`:s.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${s.pattern}`:`Format inv\xE0lid per a ${r[s.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}}});function qW(){return{localeError:GDe()}}var GDe,zW=N(()=>{ot();GDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${s}, obdr\u017Eeno ${a}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${ye(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${s}${i.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${s}${i.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${s.prefix}"`:s.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${s.suffix}"`:s.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${s.includes}"`:s.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${s.pattern}`:`Neplatn\xFD form\xE1t ${r[s.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${X(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}}});function VW(){return{localeError:WDe()}}var WDe,GW=N(()=>{ot();WDe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${s}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${ye(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin),a=n[i.origin]??i.origin;return o?`For stor: forventede ${a??"value"} ${o.verb} ${s} ${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin),a=n[i.origin]??i.origin;return o?`For lille: forventede ${a} ${o.verb} ${s} ${i.minimum.toString()} ${o.unit}`:`For lille: forventede ${a} havde ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${r[s.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}}});function WW(){return{localeError:YDe()}}var YDe,YW=N(()=>{ot();YDe=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${s}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${ye(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${s}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${s}${i.maximum.toString()} ist`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${s}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${s}${i.minimum.toString()} ist`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ung\xFCltiger String: muss mit "${s.prefix}" beginnen`:s.format==="ends_with"?`Ung\xFCltiger String: muss mit "${s.suffix}" enden`:s.format==="includes"?`Ung\xFCltiger String: muss "${s.includes}" enthalten`:s.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${s.pattern} entsprechen`:`Ung\xFCltig: ${r[s.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function YS(){return{localeError:JDe()}}var JDe,EM=N(()=>{ot();JDe=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return`Invalid input: expected ${s}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ye(i.values[0])}`:`Invalid option: expected one of ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}}});function JW(){return{localeError:ZDe()}}var ZDe,ZW=N(()=>{ot();ZDe=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${s}, ricevi\u011Dis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${ye(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${s}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${s}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${s.prefix}"`:s.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${s.suffix}"`:s.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${s.includes}"`:s.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${s.pattern}`:`Nevalida ${r[s.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}}});function KW(){return{localeError:KDe()}}var KDe,XW=N(()=>{ot();KDe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${s}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${ye(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin),a=n[i.origin]??i.origin;return o?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${s}${i.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin),a=n[i.origin]??i.origin;return o?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${s}${i.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${r[s.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}}});function eY(){return{localeError:XDe()}}var XDe,tY=N(()=>{ot();XDe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \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 ${s} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${ye(i.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 ${X(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:s.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:s.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${s.includes}" \u0628\u0627\u0634\u062F`:s.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${s.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[s.format]??i.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 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${X(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.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 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function rY(){return{localeError:eNe()}}var eNe,nY=N(()=>{ot();eNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${s}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${ye(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${s}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${s}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${s.includes}"`:s.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${s.pattern}`:`Virheellinen ${r[s.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${X(i.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 iY(){return{localeError:tNe()}}var tNe,sY=N(()=>{ot();tNe=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"nombre",array:"tableau"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${s} attendu, ${a} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${ye(i.values[0])} attendu`:`Option invalide : une valeur parmi ${X(i.values,"|")} attendue`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Trop grand : ${i.origin??"valeur"} doit ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Trop petit : ${i.origin} doit ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${s.pattern}`:`${r[s.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${X(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function oY(){return{localeError:rNe()}}var rNe,aY=N(()=>{ot();rNe=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${s}, re\xE7u ${a}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${ye(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"\u2264":"<",o=t(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${s}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"\u2265":">",o=t(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${s}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${s.pattern}`:`${r[s.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${X(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}}});function cY(){return{localeError:nNe()}}var nNe,uY=N(()=>{ot();nNe=()=>{let e={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"}},t={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"}},r=u=>u?e[u]:void 0,n=u=>{let l=r(u);return l?l.label:u??e.unknown.label},i=u=>`\u05D4${n(u)}`,s=u=>(r(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",o=u=>u?t[u]??null:null,a={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 l=u.expected,d=c[l??""]??n(l),f=we(u.input),p=c[f]??e[f]?.label??f;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 ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}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 ${ye(u.values[0])}`;let l=u.values.map(p=>ye(p));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 ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.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 ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=o(u.origin),d=i(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",A=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`.trim()}let f=u.inclusive?"<=":"<",p=s(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()}`}case"too_small":{let l=o(u.origin),d=i(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}let A=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`.trim()}let f=u.inclusive?">=":">",p=s(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.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 ${l.pattern}`;let d=a[l.format],f=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${h}`}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"}: ${X(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${i(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function lY(){return{localeError:iNe()}}var iNe,dY=N(()=>{ot();iNe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${s}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${ye(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${s}${i.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${s}${i.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\xC9rv\xE9nytelen string: "${s.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:s.format==="ends_with"?`\xC9rv\xE9nytelen string: "${s.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:s.format==="includes"?`\xC9rv\xE9nytelen string: "${s.includes}" \xE9rt\xE9ket kell tartalmaznia`:s.format==="regex"?`\xC9rv\xE9nytelen string: ${s.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[s.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function fY(e,t,r){return Math.abs(e)===1?t:r}function DA(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function pY(){return{localeError:sNe()}}var sNe,hY=N(()=>{ot();sNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\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 ${s}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return i.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 ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);if(o){let a=Number(i.maximum),c=fY(a,o.unit.one,o.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 ${DA(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${s}${i.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 ${DA(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);if(o){let a=Number(i.minimum),c=fY(a,o.unit.one,o.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 ${DA(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${s}${i.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 ${DA(i.origin)} \u056C\u056B\u0576\u056B ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${s.prefix}"-\u0578\u057E`:s.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${s.suffix}"-\u0578\u057E`:s.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${s.includes}"`:s.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 ${s.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[s.format]??i.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 ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${X(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${DA(i.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 ${DA(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function AY(){return{localeError:oNe()}}var oNe,gY=N(()=>{ot();oNe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${s}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${ye(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${s}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${s}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`String tidak valid: harus dimulai dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak valid: harus berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak valid: harus menyertakan "${s.includes}"`:s.format==="regex"?`String tidak valid: harus sesuai pola ${s.pattern}`:`${r[s.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}}});function mY(){return{localeError:aNe()}}var aNe,yY=N(()=>{ot();aNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${s}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${ye(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${s}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${s}${i.minimum.toString()} ${o.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${s.prefix}"`:s.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${s.suffix}"`:s.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${s.includes}"`:s.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${s.pattern}`:`Rangt ${r[s.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${X(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}}});function bY(){return{localeError:cNe()}}var cNe,EY=N(()=>{ot();cNe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${s}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${ye(i.values[0])}`:`Opzione non valida: atteso uno tra ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${s}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${s}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Stringa non valida: deve iniziare con "${s.prefix}"`:s.format==="ends_with"?`Stringa non valida: deve terminare con "${s.suffix}"`:s.format==="includes"?`Stringa non valida: deve includere "${s.includes}"`:s.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${X(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}}});function CY(){return{localeError:uNe()}}var uNe,wY=N(()=>{ot();uNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${s}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${ye(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${X(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let s=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=t(i.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o.unit??"\u8981\u7D20"}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let s=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=t(i.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o.unit}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${s.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[s.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.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${i.keys.length>1?"\u7FA4":""}: ${X(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function IY(){return{localeError:lNe()}}var lNe,SY=N(()=>{ot();lNe=()=>{let e={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 t(i){return e[i]??null}let r={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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\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 ${s}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return i.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 ${ye(i.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 ${X(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\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 ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.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 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${s.prefix}"-\u10D8\u10D7`:s.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${s.suffix}"-\u10D8\u10D7`:s.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${s.includes}"-\u10E1`:s.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 ${s.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[s.format]??i.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 ${i.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${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.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 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function JS(){return{localeError:dNe()}}var dNe,CM=N(()=>{ot();dNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\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 ${s} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return i.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 ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${i.maximum.toString()} ${o.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${s} ${i.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${X(i.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 ${i.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 ${i.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 vY(){return JS()}var xY=N(()=>{CM()});function BY(){return{localeError:fNe()}}var fNe,kY=N(()=>{ot();fNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${s}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${ye(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${X(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let s=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=s==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${s}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${s}${o}`}case"too_small":{let s=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=s==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(i.origin),c=a?.unit??"\uC694\uC18C";return a?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${s}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${s}${o}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:s.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${s.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[s.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${X(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function _Y(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}function TY(){return{localeError:pNe()}}var Cy,pNe,RY=N(()=>{ot();Cy=e=>e.charAt(0).toUpperCase()+e.slice(1);pNe=()=>{let e={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 t(i,s,o,a){let c=e[i]??null;return c===null?c:{unit:c.unit[s],verb:c.verb[a][o?"inclusive":"notInclusive"]}}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${s}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${ye(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${X(i.values,"|")} pasirinkim\u0173`;case"too_big":{let s=n[i.origin]??i.origin,o=t(i.origin,_Y(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${Cy(s??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.maximum.toString()} ${o.unit??"element\u0173"}`;let a=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Cy(s??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{let s=n[i.origin]??i.origin,o=t(i.origin,_Y(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${Cy(s??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.minimum.toString()} ${o.unit??"element\u0173"}`;let a=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Cy(s??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${s.prefix}"`:s.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${s.suffix}"`:s.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${s.includes}"`:s.format==="regex"?`Eilut\u0117 privalo atitikti ${s.pattern}`:`Neteisingas ${r[s.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${X(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let s=n[i.origin]??i.origin;return`${Cy(s??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function QY(){return{localeError:hNe()}}var hNe,DY=N(()=>{ot();hNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${s}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${s}${i.minimum.toString()} ${o.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`Invalid ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`${i.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"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.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 ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function NY(){return{localeError:ANe()}}var ANe,MY=N(()=>{ot();ANe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${s}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${ye(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`String tidak sah: mesti bermula dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak sah: mesti mengandungi "${s.includes}"`:s.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${s.pattern}`:`${r[s.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${X(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}}});function PY(){return{localeError:gNe()}}var gNe,LY=N(()=>{ot();gNe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){return e[i]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${s}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${ye(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return o?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${s}${i.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${s}${i.maximum.toString()} is`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return o?`Te ${a}: verwacht dat ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${a}: verwacht dat ${i.origin} ${s}${i.minimum.toString()} is`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ongeldige tekst: moet met "${s.prefix}" beginnen`:s.format==="ends_with"?`Ongeldige tekst: moet op "${s.suffix}" eindigen`:s.format==="includes"?`Ongeldige tekst: moet "${s.includes}" bevatten`:s.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${s.pattern}`:`Ongeldig: ${r[s.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}}});function FY(){return{localeError:mNe()}}var mNe,OY=N(()=>{ot();mNe=()=>{let e={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 t(i){return e[i]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\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"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${s}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${ye(i.values[0])}`:`Ugyldig valg: forventet en av ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${s}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`For lite(n): forventet ${i.origin} til \xE5 ha ${s}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${r[s.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}}});function UY(){return{localeError:yNe()}}var yNe,$Y=N(()=>{ot();yNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${s}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${ye(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${s}${i.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${s}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${s}${i.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${s}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let s=i;return s.format==="starts_with"?`F\xE2sit metin: "${s.prefix}" ile ba\u015Flamal\u0131.`:s.format==="ends_with"?`F\xE2sit metin: "${s.suffix}" ile bitmeli.`:s.format==="includes"?`F\xE2sit metin: "${s.includes}" ihtiv\xE2 etmeli.`:s.format==="regex"?`F\xE2sit metin: ${s.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[s.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function HY(){return{localeError:bNe()}}var bNe,jY=N(()=>{ot();bNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${s} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${ye(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${X(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${s}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:s.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:s.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${s.includes}" \u0648\u0644\u0631\u064A`:s.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${s.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[s.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${X(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.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 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function qY(){return{localeError:ENe()}}var ENe,zY=N(()=>{ot();ENe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${s}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${ye(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${i.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${i.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${s.prefix}"`:s.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${s.suffix}"`:s.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${s.includes}"`:s.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${s.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[s.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function VY(){return{localeError:CNe()}}var CNe,GY=N(()=>{ot();CNe=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${s}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${ye(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${s}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${s}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`${r[s.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${X(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}}});function WY(e,t,r,n){let i=Math.abs(e),s=i%10,o=i%100;return o>=11&&o<=19?n:s===1?t:s>=2&&s<=4?r:n}function YY(){return{localeError:wNe()}}var wNe,JY=N(()=>{ot();wNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${s}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);if(o){let a=Number(i.maximum),c=WY(a,o.unit.one,o.unit.few,o.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);if(o){let a=Number(i.minimum),c=WY(a,o.unit.one,o.unit.few,o.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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${i.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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.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 ${i.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 ZY(){return{localeError:INe()}}var INe,KY=N(()=>{ot();INe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${s}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${ye(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${s}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${s}${i.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${s.prefix}"`:s.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${s.suffix}"`:s.format==="includes"?`Neveljaven niz: mora vsebovati "${s.includes}"`:s.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${s.pattern}`:`Neveljaven ${r[s.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${X(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}}});function XY(){return{localeError:SNe()}}var SNe,eJ=N(()=>{ot();SNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${s}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${ye(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${s}${i.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${s}${i.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${s.prefix}"`:s.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${s.suffix}"`:s.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${s.includes}"`:s.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${s.pattern}"`:`Ogiltig(t) ${r[s.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${X(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function tJ(){return{localeError:vNe()}}var vNe,rJ=N(()=>{ot();vNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\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 ${s}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return i.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 ${ye(i.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 ${X(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\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 ${i.origin} ${s}${i.minimum.toString()} ${o.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 ${i.origin} ${s}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${s.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 ${r[s.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.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${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.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`${i.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 nJ(){return{localeError:xNe()}}var xNe,iJ=N(()=>{ot();xNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={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 i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\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 ${s} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=t(i.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.maximum.toString()} ${o.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=t(i.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.minimum.toString()} ${o.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:s.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 ${s.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[s.format]??i.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 ${i.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: ${X(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.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 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function sJ(){return{localeError:BNe()}}var BNe,oJ=N(()=>{ot();BNe=()=>{let e={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 t(i){return e[i]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${s}, al\u0131nan ${a}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${ye(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${s}${i.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ge\xE7ersiz metin: "${s.prefix}" ile ba\u015Flamal\u0131`:s.format==="ends_with"?`Ge\xE7ersiz metin: "${s.suffix}" ile bitmeli`:s.format==="includes"?`Ge\xE7ersiz metin: "${s.includes}" i\xE7ermeli`:s.format==="regex"?`Ge\xE7ersiz metin: ${s.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[s.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function ZS(){return{localeError:kNe()}}var kNe,wM=N(()=>{ot();kNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.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 ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\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 ${s}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return i.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 ${ye(i.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 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${o.verb} ${s}${i.maximum.toString()} ${o.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.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 "${s.suffix}"`:s.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 "${s.includes}"`:s.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 ${s.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${X(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.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 aJ(){return ZS()}var cJ=N(()=>{wM()});function uJ(){return{localeError:_Ne()}}var _Ne,lJ=N(()=>{ot();_Ne=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${s} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${ye(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${X(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${s}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${s}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${s}${i.minimum.toString()} ${o.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${s}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${s.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[s.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.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${i.keys.length>1?"\u0632":""}: ${X(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function dJ(){return{localeError:TNe()}}var TNe,fJ=N(()=>{ot();TNe=()=>{let e={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"}};function t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${s}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${ye(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Juda katta: kutilgan ${i.origin??"qiymat"} ${s}${i.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Juda kichik: kutilgan ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${s.prefix}" bilan boshlanishi kerak`:s.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${s.suffix}" bilan tugashi kerak`:s.format==="includes"?`Noto\u2018g\u2018ri satr: "${s.includes}" ni o\u2018z ichiga olishi kerak`:s.format==="regex"?`Noto\u2018g\u2018ri satr: ${s.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[s.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function pJ(){return{localeError:RNe()}}var RNe,hJ=N(()=>{ot();RNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${s}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${ye(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${s.prefix}"`:s.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${s.suffix}"`:s.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${s.includes}"`:s.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${s.pattern}`:`${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${X(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.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 ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function AJ(){return{localeError:QNe()}}var QNe,gJ=N(()=>{ot();QNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${s}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${ye(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${s}${i.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.prefix}" \u5F00\u5934`:s.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.suffix}" \u7ED3\u5C3E`:s.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${s.pattern}`:`\u65E0\u6548${r[s.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${X(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function mJ(){return{localeError:DNe()}}var DNe,yJ=N(()=>{ot();DNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${s}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${ye(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${s}${i.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${s}${i.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.prefix}" \u958B\u982D`:s.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.suffix}" \u7D50\u5C3E`:s.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${s.pattern}`:`\u7121\u6548\u7684 ${r[s.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${X(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function bJ(){return{localeError:NNe()}}var NNe,EJ=N(()=>{ot();NNe=()=>{let e={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 t(i){return e[i]??null}let r={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"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let s=n[i.expected]??i.expected,o=we(i.input),a=n[o]??o;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${s}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${ye(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${X(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=t(i.origin);return o?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${o.verb} ${s}${i.maximum} ${o.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${s}${i.maximum}`}case"too_small":{let s=i.inclusive?">=":">",o=t(i.origin);return o?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${o.verb} ${s}${i.minimum} ${o.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${s}${i.minimum}`}case"invalid_format":{let s=i;return s.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 "${s.prefix}"`:s.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${s.suffix}"`:s.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${s.includes}"`:s.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${s.pattern}`:`A\u1E63\xEC\u1E63e: ${r[s.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${X(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.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 ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var NA={};Yt(NA,{ar:()=>DW,az:()=>MW,be:()=>FW,bg:()=>UW,ca:()=>HW,cs:()=>qW,da:()=>VW,de:()=>WW,en:()=>YS,eo:()=>JW,es:()=>KW,fa:()=>eY,fi:()=>rY,fr:()=>iY,frCA:()=>oY,he:()=>cY,hu:()=>lY,hy:()=>pY,id:()=>AY,is:()=>mY,it:()=>bY,ja:()=>CY,ka:()=>IY,kh:()=>vY,km:()=>JS,ko:()=>BY,lt:()=>TY,mk:()=>QY,ms:()=>NY,nl:()=>PY,no:()=>FY,ota:()=>UY,pl:()=>qY,ps:()=>HY,pt:()=>VY,ru:()=>YY,sl:()=>ZY,sv:()=>XY,ta:()=>tJ,th:()=>nJ,tr:()=>sJ,ua:()=>aJ,uk:()=>ZS,ur:()=>uJ,uz:()=>dJ,vi:()=>pJ,yo:()=>bJ,zhCN:()=>AJ,zhTW:()=>mJ});var KS=N(()=>{NW();PW();OW();$W();jW();zW();GW();YW();EM();ZW();XW();tY();nY();sY();aY();uY();dY();hY();gY();yY();EY();wY();SY();xY();CM();kY();RY();DY();MY();LY();OY();$Y();jY();zY();GY();JY();KY();eJ();rJ();iJ();oJ();cJ();wM();lJ();fJ();hJ();gJ();yJ();EJ()});function wy(){return new XS}var CJ,ev,tv,XS,ii,Iy=N(()=>{ev=Symbol("ZodOutput"),tv=Symbol("ZodInput"),XS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(CJ=globalThis).__zod_globalRegistry??(CJ.__zod_globalRegistry=wy());ii=globalThis.__zod_globalRegistry});function rv(e,t){return new e({type:"string",...ke(t)})}function nv(e,t){return new e({type:"string",coerce:!0,...ke(t)})}function Sy(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function MA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function vy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function xy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function By(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function ky(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function PA(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function _y(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function Ty(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function Ry(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function Qy(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function Dy(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function Ny(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function My(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function Py(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function Ly(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function iv(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ke(t)})}function Fy(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function Oy(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function Uy(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function $y(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function Hy(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function jy(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function ov(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function av(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function cv(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function uv(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function lv(e,t){return new e({type:"number",checks:[],...ke(t)})}function dv(e,t){return new e({type:"number",coerce:!0,checks:[],...ke(t)})}function fv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ke(t)})}function pv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ke(t)})}function hv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ke(t)})}function Av(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ke(t)})}function gv(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ke(t)})}function mv(e,t){return new e({type:"boolean",...ke(t)})}function yv(e,t){return new e({type:"boolean",coerce:!0,...ke(t)})}function bv(e,t){return new e({type:"bigint",...ke(t)})}function Ev(e,t){return new e({type:"bigint",coerce:!0,...ke(t)})}function Cv(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ke(t)})}function wv(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ke(t)})}function Iv(e,t){return new e({type:"symbol",...ke(t)})}function Sv(e,t){return new e({type:"undefined",...ke(t)})}function vv(e,t){return new e({type:"null",...ke(t)})}function xv(e){return new e({type:"any"})}function Bv(e){return new e({type:"unknown"})}function kv(e,t){return new e({type:"never",...ke(t)})}function _v(e,t){return new e({type:"void",...ke(t)})}function Tv(e,t){return new e({type:"date",...ke(t)})}function Rv(e,t){return new e({type:"date",coerce:!0,...ke(t)})}function Qv(e,t){return new e({type:"nan",...ke(t)})}function Ma(e,t){return new N1({check:"less_than",...ke(t),value:e,inclusive:!1})}function ls(e,t){return new N1({check:"less_than",...ke(t),value:e,inclusive:!0})}function Pa(e,t){return new M1({check:"greater_than",...ke(t),value:e,inclusive:!1})}function Ci(e,t){return new M1({check:"greater_than",...ke(t),value:e,inclusive:!0})}function qy(e){return Pa(0,e)}function zy(e){return Ma(0,e)}function Vy(e){return ls(0,e)}function Gy(e){return Ci(0,e)}function mu(e,t){return new WN({check:"multiple_of",...ke(t),value:e})}function yu(e,t){return new ZN({check:"max_size",...ke(t),maximum:e})}function La(e,t){return new KN({check:"min_size",...ke(t),minimum:e})}function Tl(e,t){return new XN({check:"size_equals",...ke(t),size:e})}function Rl(e,t){return new eM({check:"max_length",...ke(t),maximum:e})}function mc(e,t){return new tM({check:"min_length",...ke(t),minimum:e})}function Ql(e,t){return new rM({check:"length_equals",...ke(t),length:e})}function Ef(e,t){return new nM({check:"string_format",format:"regex",...ke(t),pattern:e})}function Cf(e){return new iM({check:"string_format",format:"lowercase",...ke(e)})}function wf(e){return new sM({check:"string_format",format:"uppercase",...ke(e)})}function If(e,t){return new oM({check:"string_format",format:"includes",...ke(t),includes:e})}function Sf(e,t){return new aM({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function vf(e,t){return new cM({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function Wy(e,t,r){return new uM({check:"property",property:e,schema:t,...ke(r)})}function xf(e,t){return new lM({check:"mime_type",mime:e,...ke(t)})}function Mo(e){return new dM({check:"overwrite",tx:e})}function Bf(e){return Mo(t=>t.normalize(e))}function kf(){return Mo(e=>e.trim())}function _f(){return Mo(e=>e.toLowerCase())}function Tf(){return Mo(e=>e.toUpperCase())}function LA(){return Mo(e=>fN(e))}function IM(e,t,r){return new e({type:"array",element:t,...ke(r)})}function PNe(e,t,r){return new e({type:"union",options:t,...ke(r)})}function LNe(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ke(r)})}function FNe(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ke(n)})}function ONe(e,t,r){return new e({type:"intersection",left:t,right:r})}function UNe(e,t,r,n){let i=r instanceof Tt,s=i?n:r,o=i?r:null;return new e({type:"tuple",items:t,rest:o,...ke(s)})}function $Ne(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ke(n)})}function HNe(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ke(n)})}function jNe(e,t,r){return new e({type:"set",valueType:t,...ke(r)})}function qNe(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...ke(r)})}function zNe(e,t,r){return new e({type:"enum",entries:t,...ke(r)})}function VNe(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ke(r)})}function Dv(e,t){return new e({type:"file",...ke(t)})}function GNe(e,t){return new e({type:"transform",transform:t})}function WNe(e,t){return new e({type:"optional",innerType:t})}function YNe(e,t){return new e({type:"nullable",innerType:t})}function JNe(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():E1(r)}})}function ZNe(e,t,r){return new e({type:"nonoptional",innerType:t,...ke(r)})}function KNe(e,t){return new e({type:"success",innerType:t})}function XNe(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function eMe(e,t,r){return new e({type:"pipe",in:t,out:r})}function tMe(e,t){return new e({type:"readonly",innerType:t})}function rMe(e,t,r){return new e({type:"template_literal",parts:t,...ke(r)})}function nMe(e,t){return new e({type:"lazy",getter:t})}function iMe(e,t){return new e({type:"promise",innerType:t})}function Nv(e,t,r){let n=ke(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Mv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ke(r)})}function Pv(e){let t=wJ(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(bA(n,r.value,t._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(bA(i))}},e(r.value,r)));return t}function wJ(e,t){let r=new zr({check:"custom",...ke(t)});return r._zod.check=e,r}function Lv(e){let t=new zr({check:"describe"});return t._zod.onattach=[r=>{let n=ii.get(r)??{};ii.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function Fv(e){let t=new zr({check:"meta"});return t._zod.onattach=[r=>{let n=ii.get(r)??{};ii.add(r,{...n,...e})}],t._zod.check=()=>{},t}function Ov(e,t){let r=ke(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let s=new Set(n),o=new Set(i),a=e.Codec??QA,c=e.Boolean??TA,u=e.String??_l,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new a({type:"pipe",in:l,out:d,transform:((p,h)=>{let A=p;return r.case!=="sensitive"&&(A=A.toLowerCase()),s.has(A)?!0:o.has(A)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...o],input:h.value,inst:f,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function Rf(e,t,r,n={}){let i=ke(n),s={...ke(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(s.pattern=r),new e(s)}var sv,IJ=N(()=>{P1();Iy();bM();ot();sv={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Dl(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ii,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Nr(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,o);let a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,l);else{let f=o.schema,p=t.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(e,t,f,l)}let d=e._zod.parent;d&&(o.ref||(o.ref=d),Nr(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io==="input"&&ds(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Nl(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let o of e.seen.entries()){let a=e.metadataRegistry.get(o[0])?.id;if(a){let c=n.get(a);if(c&&c!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,o[0])}}let i=o=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(o[0])?.id,f=e.external.uri??(h=>h);if(d)return{ref:f(d)};let p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${a}/${p}`}}if(o[1]===r)return{ref:"#"};let u=`#/${a}/`,l=o[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},s=o=>{if(o[1].schema.$ref)return;let a=o[1],{ref:c,defId:u}=i(o);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let o of e.seen.entries()){let a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let a=o[1];if(t===o[0]){s(o);continue}if(e.external){let u=e.external.registry.get(o[0])?.id;if(t!==o[0]&&u){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&e.reused==="ref"){s(o);continue}}}function Ql(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=o=>{let a=e.seen.get(o);if(a.ref===null)return;let c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){n(l);let f=e.seen.get(l),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,u),o._zod.parent===l)for(let A in c)A==="$ref"||A==="allOf"||A in u||delete c[A];if(p.$ref&&f.def)for(let A in c)A==="$ref"||A==="allOf"||A in f.def&&JSON.stringify(c[A])===JSON.stringify(f.def[A])&&delete c[A]}let d=o._zod.parent;if(d&&d!==l){n(d);let f=e.seen.get(d);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let p in c)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(c[p])===JSON.stringify(f.def[p])&&delete c[p]}e.override({zodSchema:o,jsonSchema:c,path:a.path??[]})};for(let o of[...e.seen.entries()].reverse())n(o[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);let s=e.external?.defs??{};for(let o of e.seen.entries()){let a=o[1];a.def&&a.defId&&(s[a.defId]=a.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:DA(t,"input",e.processors),output:DA(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function ls(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ls(n.element,r);if(n.type==="set")return ls(n.valueType,r);if(n.type==="lazy")return ls(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ls(n.innerType,r);if(n.type==="intersection")return ls(n.left,r)||ls(n.right,r);if(n.type==="record"||n.type==="map")return ls(n.keyType,r)||ls(n.valueType,r);if(n.type==="pipe")return ls(n.in,r)||ls(n.out,r);if(n.type==="object"){for(let i in n.shape)if(ls(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(ls(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(ls(i,r))return!0;return!!(n.rest&&ls(n.rest,r))}return!1}var yM,DA,zy=D(()=>{by();yM=(e,t={})=>r=>{let n=Tl({...r,processors:t});return Qr(e,n),Rl(n,e),Ql(n,e)},DA=(e,t,r={})=>n=>{let{libraryOptions:i,target:s}=n??{},o=Tl({...i??{},target:s,io:t,processors:r});return Qr(e,o),Rl(o,e),Ql(o,e)}});function NA(e,t){if("_idmap"in e){let n=e,i=Tl({...t,processors:Mv}),s={};for(let c of n._idmap.entries()){let[u,l]=c;Qr(l,i)}let o={},a={registry:n,uri:t?.uri,defs:s};i.external=a;for(let c of n._idmap.entries()){let[u,l]=c;Rl(i,l),o[u]=Ql(i,l)}if(Object.keys(s).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[c]:s}}return{schemas:o}}let r=Tl({...t,processors:Mv});return Qr(e,r),Rl(r,e),Ql(r,e)}var YNe,bM,EM,CM,wM,IM,SM,vM,xM,BM,kM,_M,TM,RM,QM,DM,NM,MM,PM,LM,FM,OM,UM,$M,HM,jM,Pv,qM,zM,VM,GM,WM,YM,JM,ZM,KM,XM,e4,Lv,t4,Mv,MA=D(()=>{zy();ot();YNe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bM=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:s,maximum:o,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=YNe[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},EM=(e,t,r,n)=>{let i=r,{minimum:s,maximum:o,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof s=="number"&&(i.minimum=s,typeof l=="number"&&t.target!=="draft-04"&&(l>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof o=="number"&&(i.maximum=o,typeof u=="number"&&t.target!=="draft-04"&&(u<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},CM=(e,t,r,n)=>{r.type="boolean"},wM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},IM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},SM=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},vM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},xM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},BM=(e,t,r,n)=>{r.not={}},kM=(e,t,r,n)=>{},_M=(e,t,r,n)=>{},TM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},RM=(e,t,r,n)=>{let i=e._zod.def,s=iy(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},QM=(e,t,r,n)=>{let i=e._zod.def,s=[];for(let o of i.values)if(o===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(o))}else s.push(o);if(s.length!==0)if(s.length===1){let o=s[0];r.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[o]:r.const=o}else s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),s.every(o=>typeof o=="boolean")&&(r.type="boolean"),s.every(o=>o===null)&&(r.type="null"),r.enum=s},DM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},NM=(e,t,r,n)=>{let i=r,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=s.source},MM=(e,t,r,n)=>{let i=r,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:a,mime:c}=e._zod.bag;o!==void 0&&(s.minLength=o),a!==void 0&&(s.maxLength=a),c?c.length===1?(s.contentMediaType=c[0],Object.assign(i,s)):(Object.assign(i,s),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,s)},PM=(e,t,r,n)=>{r.type="boolean"},LM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},FM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},OM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},UM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},$M=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},HM=(e,t,r,n)=>{let i=r,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Qr(s.element,t,{...n,path:[...n.path,"items"]})},jM=(e,t,r,n)=>{let i=r,s=e._zod.def;i.type="object",i.properties={};let o=s.shape;for(let u in o)i.properties[u]=Qr(o[u],t,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(o)),c=new Set([...a].filter(u=>{let l=s.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Qr(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Pv=(e,t,r,n)=>{let i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,c)=>Qr(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=o:r.anyOf=o},qM=(e,t,r,n)=>{let i=e._zod.def,s=Qr(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=Qr(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];r.allOf=c},zM=(e,t,r,n)=>{let i=r,s=e._zod.def;i.type="array";let o=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=s.items.map((f,p)=>Qr(f,t,{...n,path:[...n.path,o,p]})),u=s.rest?Qr(s.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)},VM=(e,t,r,n)=>{let i=r,s=e._zod.def;i.type="object";let o=s.keyType,c=o._zod.bag?.patterns;if(s.mode==="loose"&&c&&c.size>0){let l=Qr(s.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Qr(s.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Qr(s.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let u=o._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}},GM=(e,t,r,n)=>{let i=e._zod.def,s=Qr(i.innerType,t,n),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},WM=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType},YM=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},JM=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},ZM=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},KM=(e,t,r,n)=>{let i=e._zod.def,s=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Qr(s,t,n);let o=t.seen.get(e);o.ref=s},XM=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},e4=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType},Lv=(e,t,r,n)=>{let i=e._zod.def;Qr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType},t4=(e,t,r,n)=>{let i=e._zod.innerType;Qr(i,t,n);let s=t.seen.get(e);s.ref=i},Mv={string:bM,number:EM,boolean:CM,bigint:wM,symbol:IM,null:SM,undefined:vM,void:xM,never:BM,any:kM,unknown:_M,date:TM,enum:RM,literal:QM,nan:DM,template_literal:NM,file:MM,success:PM,custom:LM,function:FM,transform:OM,map:UM,set:$M,array:HM,object:jM,union:Pv,intersection:qM,tuple:zM,record:VM,nullable:GM,nonoptional:WM,default:YM,prefault:JM,catch:ZM,pipe:KM,readonly:XM,promise:e4,optional:Lv,lazy:t4}});var Fv,AJ=D(()=>{MA();zy();Fv=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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Tl({processors:Mv,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Qr(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Rl(this.ctx,t);let n=Ql(this.ctx,t),{"~standard":i,...s}=n;return s}}});var gJ={};var mJ=D(()=>{});var uo={};Jt(uo,{$ZodAny:()=>pS,$ZodArray:()=>yS,$ZodAsyncError:()=>Ra,$ZodBase64:()=>nS,$ZodBase64URL:()=>iS,$ZodBigInt:()=>hy,$ZodBigIntFormat:()=>uS,$ZodBoolean:()=>vA,$ZodCIDRv4:()=>tS,$ZodCIDRv6:()=>rS,$ZodCUID:()=>j1,$ZodCUID2:()=>q1,$ZodCatch:()=>MS,$ZodCheck:()=>jr,$ZodCheckBigIntFormat:()=>qN,$ZodCheckEndsWith:()=>rM,$ZodCheckGreaterThan:()=>T1,$ZodCheckIncludes:()=>eM,$ZodCheckLengthEquals:()=>JN,$ZodCheckLessThan:()=>_1,$ZodCheckLowerCase:()=>KN,$ZodCheckMaxLength:()=>WN,$ZodCheckMaxSize:()=>zN,$ZodCheckMimeType:()=>iM,$ZodCheckMinLength:()=>YN,$ZodCheckMinSize:()=>VN,$ZodCheckMultipleOf:()=>HN,$ZodCheckNumberFormat:()=>jN,$ZodCheckOverwrite:()=>sM,$ZodCheckProperty:()=>nM,$ZodCheckRegex:()=>ZN,$ZodCheckSizeEquals:()=>GN,$ZodCheckStartsWith:()=>tM,$ZodCheckStringFormat:()=>SA,$ZodCheckUpperCase:()=>XN,$ZodCodec:()=>BA,$ZodCustom:()=>jS,$ZodCustomStringFormat:()=>aS,$ZodDate:()=>mS,$ZodDefault:()=>RS,$ZodDiscriminatedUnion:()=>ES,$ZodE164:()=>sS,$ZodEmail:()=>O1,$ZodEmoji:()=>$1,$ZodEncodeError:()=>Cl,$ZodEnum:()=>vS,$ZodError:()=>uy,$ZodExactOptional:()=>_S,$ZodFile:()=>BS,$ZodFunction:()=>US,$ZodGUID:()=>L1,$ZodIPv4:()=>K1,$ZodIPv6:()=>X1,$ZodISODate:()=>Y1,$ZodISODateTime:()=>W1,$ZodISODuration:()=>Z1,$ZodISOTime:()=>J1,$ZodIntersection:()=>CS,$ZodJWT:()=>oS,$ZodKSUID:()=>G1,$ZodLazy:()=>HS,$ZodLiteral:()=>xS,$ZodMAC:()=>eS,$ZodMap:()=>IS,$ZodNaN:()=>PS,$ZodNanoID:()=>H1,$ZodNever:()=>AS,$ZodNonOptional:()=>DS,$ZodNull:()=>fS,$ZodNullable:()=>TS,$ZodNumber:()=>py,$ZodNumberFormat:()=>cS,$ZodObject:()=>dM,$ZodObjectJIT:()=>fM,$ZodOptional:()=>gy,$ZodPipe:()=>LS,$ZodPrefault:()=>QS,$ZodPromise:()=>$S,$ZodReadonly:()=>FS,$ZodRealError:()=>Rs,$ZodRecord:()=>wS,$ZodRegistry:()=>WS,$ZodSet:()=>SS,$ZodString:()=>xl,$ZodStringFormat:()=>Nr,$ZodSuccess:()=>NS,$ZodSymbol:()=>lS,$ZodTemplateLiteral:()=>OS,$ZodTransform:()=>kS,$ZodTuple:()=>Ay,$ZodType:()=>xt,$ZodULID:()=>z1,$ZodURL:()=>U1,$ZodUUID:()=>F1,$ZodUndefined:()=>dS,$ZodUnion:()=>xA,$ZodUnknown:()=>hS,$ZodVoid:()=>gS,$ZodXID:()=>V1,$ZodXor:()=>bS,$brand:()=>ry,$constructor:()=>j,$input:()=>JS,$output:()=>YS,Doc:()=>fy,JSONSchema:()=>gJ,JSONSchemaGenerator:()=>Fv,NEVER:()=>f1,TimePrecision:()=>ev,_any:()=>Cv,_array:()=>mM,_base64:()=>Py,_base64url:()=>Ly,_bigint:()=>hv,_boolean:()=>fv,_catch:()=>jNe,_check:()=>pJ,_cidrv4:()=>Ny,_cidrv6:()=>My,_coercedBigint:()=>Av,_coercedBoolean:()=>pv,_coercedDate:()=>xv,_coercedNumber:()=>ov,_coercedString:()=>KS,_cuid:()=>By,_cuid2:()=>ky,_custom:()=>_v,_date:()=>vv,_decode:()=>b1,_decodeAsync:()=>C1,_default:()=>UNe,_discriminatedUnion:()=>kNe,_e164:()=>Fy,_email:()=>Ey,_emoji:()=>vy,_encode:()=>y1,_encodeAsync:()=>E1,_endsWith:()=>Ef,_enum:()=>NNe,_file:()=>kv,_float32:()=>cv,_float64:()=>uv,_gt:()=>Da,_gte:()=>Ei,_guid:()=>TA,_includes:()=>yf,_int:()=>av,_int32:()=>lv,_int64:()=>gv,_intersection:()=>_Ne,_ipv4:()=>Qy,_ipv6:()=>Dy,_isoDate:()=>rv,_isoDateTime:()=>tv,_isoDuration:()=>iv,_isoTime:()=>nv,_jwt:()=>Oy,_ksuid:()=>Ry,_lazy:()=>GNe,_length:()=>_l,_literal:()=>PNe,_lowercase:()=>gf,_lt:()=>Qa,_lte:()=>us,_mac:()=>XS,_map:()=>QNe,_max:()=>us,_maxLength:()=>kl,_maxSize:()=>mu,_mime:()=>Cf,_min:()=>Ei,_minLength:()=>Ac,_minSize:()=>Na,_multipleOf:()=>gu,_nan:()=>Bv,_nanoid:()=>xy,_nativeEnum:()=>MNe,_negative:()=>$y,_never:()=>Iv,_nonnegative:()=>jy,_nonoptional:()=>$Ne,_nonpositive:()=>Hy,_normalize:()=>wf,_null:()=>Ev,_nullable:()=>ONe,_number:()=>sv,_optional:()=>FNe,_overwrite:()=>No,_parse:()=>mA,_parseAsync:()=>bA,_pipe:()=>qNe,_positive:()=>Uy,_promise:()=>WNe,_property:()=>qy,_readonly:()=>zNe,_record:()=>RNe,_refine:()=>Tv,_regex:()=>Af,_safeDecode:()=>I1,_safeDecodeAsync:()=>v1,_safeEncode:()=>w1,_safeEncodeAsync:()=>S1,_safeParse:()=>CA,_safeParseAsync:()=>wA,_set:()=>DNe,_size:()=>Bl,_slugify:()=>QA,_startsWith:()=>bf,_string:()=>ZS,_stringFormat:()=>xf,_stringbool:()=>Nv,_success:()=>HNe,_superRefine:()=>Rv,_symbol:()=>yv,_templateLiteral:()=>VNe,_toLowerCase:()=>Sf,_toUpperCase:()=>vf,_transform:()=>LNe,_trim:()=>If,_tuple:()=>TNe,_uint32:()=>dv,_uint64:()=>mv,_ulid:()=>_y,_undefined:()=>bv,_union:()=>xNe,_unknown:()=>wv,_uppercase:()=>mf,_url:()=>RA,_uuid:()=>Cy,_uuidv4:()=>wy,_uuidv6:()=>Iy,_uuidv7:()=>Sy,_void:()=>Sv,_xid:()=>Ty,_xor:()=>BNe,clone:()=>bi,config:()=>Sn,createStandardJSONSchemaMethod:()=>DA,createToJSONSchemaMethod:()=>yM,decode:()=>JG,decodeAsync:()=>KG,describe:()=>Qv,encode:()=>YG,encodeAsync:()=>ZG,extractDefs:()=>Rl,finalize:()=>Ql,flattenError:()=>AA,formatError:()=>gA,globalConfig:()=>ty,globalRegistry:()=>ni,initializeContext:()=>Tl,isValidBase64:()=>lM,isValidBase64URL:()=>EW,isValidJWT:()=>CW,locales:()=>_A,meta:()=>Dv,parse:()=>yA,parseAsync:()=>EA,prettifyError:()=>m1,process:()=>Qr,regexes:()=>Qs,registry:()=>yy,safeDecode:()=>eW,safeDecodeAsync:()=>rW,safeEncode:()=>XG,safeEncodeAsync:()=>tW,safeParse:()=>pf,safeParseAsync:()=>IA,toDotPath:()=>WG,toJSONSchema:()=>NA,treeifyError:()=>g1,util:()=>be,version:()=>aM});var Pn=D(()=>{dA();pN();fN();pM();R1();cM();ot();k1();GS();by();oM();hJ();zy();MA();AJ();mJ()});var Hv={};Jt(Hv,{endsWith:()=>Ef,gt:()=>Da,gte:()=>Ei,includes:()=>yf,length:()=>_l,lowercase:()=>gf,lt:()=>Qa,lte:()=>us,maxLength:()=>kl,maxSize:()=>mu,mime:()=>Cf,minLength:()=>Ac,minSize:()=>Na,multipleOf:()=>gu,negative:()=>$y,nonnegative:()=>jy,nonpositive:()=>Hy,normalize:()=>wf,overwrite:()=>No,positive:()=>Uy,property:()=>qy,regex:()=>Af,size:()=>Bl,slugify:()=>QA,startsWith:()=>bf,toLowerCase:()=>Sf,toUpperCase:()=>vf,trim:()=>If,uppercase:()=>mf});var jv=D(()=>{Pn()});var Nl={};Jt(Nl,{ZodISODate:()=>zv,ZodISODateTime:()=>qv,ZodISODuration:()=>Gv,ZodISOTime:()=>Vv,date:()=>n4,datetime:()=>r4,duration:()=>s4,time:()=>i4});function r4(e){return tv(qv,e)}function n4(e){return rv(zv,e)}function i4(e){return nv(Vv,e)}function s4(e){return iv(Gv,e)}var qv,zv,Vv,Gv,Vy=D(()=>{Pn();Wy();qv=j("ZodISODateTime",(e,t)=>{W1.init(e,t),qr.init(e,t)});zv=j("ZodISODate",(e,t)=>{Y1.init(e,t),qr.init(e,t)});Vv=j("ZodISOTime",(e,t)=>{J1.init(e,t),qr.init(e,t)});Gv=j("ZodISODuration",(e,t)=>{Z1.init(e,t),qr.init(e,t)})});var EJ,tMe,Ds,o4=D(()=>{Pn();Pn();ot();EJ=(e,t)=>{uy.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>gA(e,r)},flatten:{value:r=>AA(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,fA,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,fA,2)}},isEmpty:{get(){return e.issues.length===0}}})},tMe=j("ZodError",EJ),Ds=j("ZodError",EJ,{Parent:Error})});var a4,c4,u4,l4,d4,f4,p4,h4,A4,g4,m4,y4,b4=D(()=>{Pn();o4();a4=mA(Ds),c4=bA(Ds),u4=CA(Ds),l4=wA(Ds),d4=y1(Ds),f4=b1(Ds),p4=E1(Ds),h4=C1(Ds),A4=w1(Ds),g4=I1(Ds),m4=S1(Ds),y4=v1(Ds)});var Gy={};Jt(Gy,{ZodAny:()=>S4,ZodArray:()=>k4,ZodBase64:()=>cx,ZodBase64URL:()=>ux,ZodBigInt:()=>$A,ZodBigIntFormat:()=>fx,ZodBoolean:()=>UA,ZodCIDRv4:()=>ox,ZodCIDRv6:()=>ax,ZodCUID:()=>Xv,ZodCUID2:()=>ex,ZodCatch:()=>W4,ZodCodec:()=>yx,ZodCustom:()=>sb,ZodCustomStringFormat:()=>FA,ZodDate:()=>eb,ZodDefault:()=>H4,ZodDiscriminatedUnion:()=>T4,ZodE164:()=>lx,ZodEmail:()=>Jv,ZodEmoji:()=>Zv,ZodEnum:()=>PA,ZodExactOptional:()=>O4,ZodFile:()=>L4,ZodFunction:()=>nP,ZodGUID:()=>Yy,ZodIPv4:()=>ix,ZodIPv6:()=>sx,ZodIntersection:()=>R4,ZodJWT:()=>dx,ZodKSUID:()=>nx,ZodLazy:()=>eP,ZodLiteral:()=>P4,ZodMAC:()=>E4,ZodMap:()=>N4,ZodNaN:()=>J4,ZodNanoID:()=>Kv,ZodNever:()=>x4,ZodNonOptional:()=>gx,ZodNull:()=>I4,ZodNullable:()=>$4,ZodNumber:()=>OA,ZodNumberFormat:()=>Bf,ZodObject:()=>tb,ZodOptional:()=>Ax,ZodPipe:()=>mx,ZodPrefault:()=>q4,ZodPromise:()=>rP,ZodReadonly:()=>Z4,ZodRecord:()=>ib,ZodSet:()=>M4,ZodString:()=>LA,ZodStringFormat:()=>qr,ZodSuccess:()=>G4,ZodSymbol:()=>C4,ZodTemplateLiteral:()=>X4,ZodTransform:()=>F4,ZodTuple:()=>Q4,ZodType:()=>Ft,ZodULID:()=>tx,ZodURL:()=>Ky,ZodUUID:()=>gc,ZodUndefined:()=>w4,ZodUnion:()=>rb,ZodUnknown:()=>v4,ZodVoid:()=>B4,ZodXID:()=>rx,ZodXor:()=>_4,_ZodString:()=>Yv,_default:()=>j4,_function:()=>wZ,any:()=>iZ,array:()=>Kt,base64:()=>$J,base64url:()=>HJ,bigint:()=>XJ,boolean:()=>Ln,catch:()=>Y4,check:()=>IZ,cidrv4:()=>OJ,cidrv6:()=>UJ,codec:()=>bZ,cuid:()=>RJ,cuid2:()=>QJ,custom:()=>bx,date:()=>oZ,describe:()=>SZ,discriminatedUnion:()=>nb,e164:()=>jJ,email:()=>CJ,emoji:()=>_J,enum:()=>wi,exactOptional:()=>U4,file:()=>AZ,float32:()=>YJ,float64:()=>JJ,function:()=>wZ,guid:()=>wJ,hash:()=>WJ,hex:()=>GJ,hostname:()=>VJ,httpUrl:()=>kJ,instanceof:()=>xZ,int:()=>Wv,int32:()=>ZJ,int64:()=>eZ,intersection:()=>HA,ipv4:()=>PJ,ipv6:()=>FJ,json:()=>kZ,jwt:()=>qJ,keyof:()=>aZ,ksuid:()=>MJ,lazy:()=>tP,literal:()=>st,looseObject:()=>Ci,looseRecord:()=>dZ,mac:()=>LJ,map:()=>fZ,meta:()=>vZ,nan:()=>yZ,nanoid:()=>TJ,nativeEnum:()=>hZ,never:()=>px,nonoptional:()=>V4,null:()=>Xy,nullable:()=>Jy,nullish:()=>gZ,number:()=>wr,object:()=>$e,optional:()=>Kr,partialRecord:()=>lZ,pipe:()=>Zy,prefault:()=>z4,preprocess:()=>ob,promise:()=>CZ,readonly:()=>K4,record:()=>Mr,refine:()=>iP,set:()=>pZ,strictObject:()=>cZ,string:()=>ee,stringFormat:()=>zJ,stringbool:()=>BZ,success:()=>mZ,superRefine:()=>sP,symbol:()=>rZ,templateLiteral:()=>EZ,transform:()=>hx,tuple:()=>D4,uint32:()=>KJ,uint64:()=>tZ,ulid:()=>DJ,undefined:()=>nZ,union:()=>Vr,unknown:()=>zr,url:()=>BJ,uuid:()=>IJ,uuidv4:()=>SJ,uuidv6:()=>vJ,uuidv7:()=>xJ,void:()=>sZ,xid:()=>NJ,xor:()=>uZ});function ee(e){return ZS(LA,e)}function CJ(e){return Ey(Jv,e)}function wJ(e){return TA(Yy,e)}function IJ(e){return Cy(gc,e)}function SJ(e){return wy(gc,e)}function vJ(e){return Iy(gc,e)}function xJ(e){return Sy(gc,e)}function BJ(e){return RA(Ky,e)}function kJ(e){return RA(Ky,{protocol:/^https?$/,hostname:Qs.domain,...be.normalizeParams(e)})}function _J(e){return vy(Zv,e)}function TJ(e){return xy(Kv,e)}function RJ(e){return By(Xv,e)}function QJ(e){return ky(ex,e)}function DJ(e){return _y(tx,e)}function NJ(e){return Ty(rx,e)}function MJ(e){return Ry(nx,e)}function PJ(e){return Qy(ix,e)}function LJ(e){return XS(E4,e)}function FJ(e){return Dy(sx,e)}function OJ(e){return Ny(ox,e)}function UJ(e){return My(ax,e)}function $J(e){return Py(cx,e)}function HJ(e){return Ly(ux,e)}function jJ(e){return Fy(lx,e)}function qJ(e){return Oy(dx,e)}function zJ(e,t,r={}){return xf(FA,e,t,r)}function VJ(e){return xf(FA,"hostname",Qs.hostname,e)}function GJ(e){return xf(FA,"hex",Qs.hex,e)}function WJ(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=Qs[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return xf(FA,n,i,t)}function wr(e){return sv(OA,e)}function Wv(e){return av(Bf,e)}function YJ(e){return cv(Bf,e)}function JJ(e){return uv(Bf,e)}function ZJ(e){return lv(Bf,e)}function KJ(e){return dv(Bf,e)}function Ln(e){return fv(UA,e)}function XJ(e){return hv($A,e)}function eZ(e){return gv(fx,e)}function tZ(e){return mv(fx,e)}function rZ(e){return yv(C4,e)}function nZ(e){return bv(w4,e)}function Xy(e){return Ev(I4,e)}function iZ(){return Cv(S4)}function zr(){return wv(v4)}function px(e){return Iv(x4,e)}function sZ(e){return Sv(B4,e)}function oZ(e){return vv(eb,e)}function Kt(e,t){return mM(k4,e,t)}function aZ(e){let t=e._zod.def.shape;return wi(Object.keys(t))}function $e(e,t){let r={type:"object",shape:e??{},...be.normalizeParams(t)};return new tb(r)}function cZ(e,t){return new tb({type:"object",shape:e,catchall:px(),...be.normalizeParams(t)})}function Ci(e,t){return new tb({type:"object",shape:e,catchall:zr(),...be.normalizeParams(t)})}function Vr(e,t){return new rb({type:"union",options:e,...be.normalizeParams(t)})}function uZ(e,t){return new _4({type:"union",options:e,inclusive:!1,...be.normalizeParams(t)})}function nb(e,t,r){return new T4({type:"union",options:t,discriminator:e,...be.normalizeParams(r)})}function HA(e,t){return new R4({type:"intersection",left:e,right:t})}function D4(e,t,r){let n=t instanceof xt,i=n?r:t,s=n?t:null;return new Q4({type:"tuple",items:e,rest:s,...be.normalizeParams(i)})}function Mr(e,t,r){return new ib({type:"record",keyType:e,valueType:t,...be.normalizeParams(r)})}function lZ(e,t,r){let n=bi(e);return n._zod.values=void 0,new ib({type:"record",keyType:n,valueType:t,...be.normalizeParams(r)})}function dZ(e,t,r){return new ib({type:"record",keyType:e,valueType:t,mode:"loose",...be.normalizeParams(r)})}function fZ(e,t,r){return new N4({type:"map",keyType:e,valueType:t,...be.normalizeParams(r)})}function pZ(e,t){return new M4({type:"set",valueType:e,...be.normalizeParams(t)})}function wi(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new PA({type:"enum",entries:r,...be.normalizeParams(t)})}function hZ(e,t){return new PA({type:"enum",entries:e,...be.normalizeParams(t)})}function st(e,t){return new P4({type:"literal",values:Array.isArray(e)?e:[e],...be.normalizeParams(t)})}function AZ(e){return kv(L4,e)}function hx(e){return new F4({type:"transform",transform:e})}function Kr(e){return new Ax({type:"optional",innerType:e})}function U4(e){return new O4({type:"optional",innerType:e})}function Jy(e){return new $4({type:"nullable",innerType:e})}function gZ(e){return Kr(Jy(e))}function j4(e,t){return new H4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():be.shallowClone(t)}})}function z4(e,t){return new q4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():be.shallowClone(t)}})}function V4(e,t){return new gx({type:"nonoptional",innerType:e,...be.normalizeParams(t)})}function mZ(e){return new G4({type:"success",innerType:e})}function Y4(e,t){return new W4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function yZ(e){return Bv(J4,e)}function Zy(e,t){return new mx({type:"pipe",in:e,out:t})}function bZ(e,t,r){return new yx({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function K4(e){return new Z4({type:"readonly",innerType:e})}function EZ(e,t){return new X4({type:"template_literal",parts:e,...be.normalizeParams(t)})}function tP(e){return new eP({type:"lazy",getter:e})}function CZ(e){return new rP({type:"promise",innerType:e})}function wZ(e){return new nP({type:"function",input:Array.isArray(e?.input)?D4(e?.input):e?.input??Kt(zr()),output:e?.output??zr()})}function IZ(e){let t=new jr({check:"custom"});return t._zod.check=e,t}function bx(e,t){return _v(sb,e??(()=>!0),t)}function iP(e,t={}){return Tv(sb,e,t)}function sP(e){return Rv(e)}function xZ(e,t={}){let r=new sb({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...be.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function kZ(e){let t=tP(()=>Vr([ee(e),wr(),Ln(),Xy(),Kt(t),Mr(ee(),t)]));return t}function ob(e,t){return Zy(hx(e),t)}var Ft,Yv,LA,qr,Jv,Yy,gc,Ky,Zv,Kv,Xv,ex,tx,rx,nx,ix,E4,sx,ox,ax,cx,ux,lx,dx,FA,OA,Bf,UA,$A,fx,C4,w4,I4,S4,v4,x4,B4,eb,k4,tb,rb,_4,T4,R4,Q4,ib,N4,M4,PA,P4,L4,F4,Ax,O4,$4,H4,q4,gx,G4,W4,J4,mx,yx,Z4,X4,eP,rP,nP,sb,SZ,vZ,BZ,Wy=D(()=>{Pn();Pn();MA();zy();jv();Vy();b4();Ft=j("ZodType",(e,t)=>(xt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:DA(e,"input"),output:DA(e,"output")}}),e.toJSONSchema=yM(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(be.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>bi(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>a4(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>u4(e,r,n),e.parseAsync=async(r,n)=>c4(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>l4(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>d4(e,r,n),e.decode=(r,n)=>f4(e,r,n),e.encodeAsync=async(r,n)=>p4(e,r,n),e.decodeAsync=async(r,n)=>h4(e,r,n),e.safeEncode=(r,n)=>A4(e,r,n),e.safeDecode=(r,n)=>g4(e,r,n),e.safeEncodeAsync=async(r,n)=>m4(e,r,n),e.safeDecodeAsync=async(r,n)=>y4(e,r,n),e.refine=(r,n)=>e.check(iP(r,n)),e.superRefine=r=>e.check(sP(r)),e.overwrite=r=>e.check(No(r)),e.optional=()=>Kr(e),e.exactOptional=()=>U4(e),e.nullable=()=>Jy(e),e.nullish=()=>Kr(Jy(e)),e.nonoptional=r=>V4(e,r),e.array=()=>Kt(e),e.or=r=>Vr([e,r]),e.and=r=>HA(e,r),e.transform=r=>Zy(e,hx(r)),e.default=r=>j4(e,r),e.prefault=r=>z4(e,r),e.catch=r=>Y4(e,r),e.pipe=r=>Zy(e,r),e.readonly=()=>K4(e),e.describe=r=>{let n=e.clone();return ni.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return ni.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ni.get(e);let n=e.clone();return ni.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Yv=j("_ZodString",(e,t)=>{xl.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>bM(e,n,i,s);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Af(...n)),e.includes=(...n)=>e.check(yf(...n)),e.startsWith=(...n)=>e.check(bf(...n)),e.endsWith=(...n)=>e.check(Ef(...n)),e.min=(...n)=>e.check(Ac(...n)),e.max=(...n)=>e.check(kl(...n)),e.length=(...n)=>e.check(_l(...n)),e.nonempty=(...n)=>e.check(Ac(1,...n)),e.lowercase=n=>e.check(gf(n)),e.uppercase=n=>e.check(mf(n)),e.trim=()=>e.check(If()),e.normalize=(...n)=>e.check(wf(...n)),e.toLowerCase=()=>e.check(Sf()),e.toUpperCase=()=>e.check(vf()),e.slugify=()=>e.check(QA())}),LA=j("ZodString",(e,t)=>{xl.init(e,t),Yv.init(e,t),e.email=r=>e.check(Ey(Jv,r)),e.url=r=>e.check(RA(Ky,r)),e.jwt=r=>e.check(Oy(dx,r)),e.emoji=r=>e.check(vy(Zv,r)),e.guid=r=>e.check(TA(Yy,r)),e.uuid=r=>e.check(Cy(gc,r)),e.uuidv4=r=>e.check(wy(gc,r)),e.uuidv6=r=>e.check(Iy(gc,r)),e.uuidv7=r=>e.check(Sy(gc,r)),e.nanoid=r=>e.check(xy(Kv,r)),e.guid=r=>e.check(TA(Yy,r)),e.cuid=r=>e.check(By(Xv,r)),e.cuid2=r=>e.check(ky(ex,r)),e.ulid=r=>e.check(_y(tx,r)),e.base64=r=>e.check(Py(cx,r)),e.base64url=r=>e.check(Ly(ux,r)),e.xid=r=>e.check(Ty(rx,r)),e.ksuid=r=>e.check(Ry(nx,r)),e.ipv4=r=>e.check(Qy(ix,r)),e.ipv6=r=>e.check(Dy(sx,r)),e.cidrv4=r=>e.check(Ny(ox,r)),e.cidrv6=r=>e.check(My(ax,r)),e.e164=r=>e.check(Fy(lx,r)),e.datetime=r=>e.check(r4(r)),e.date=r=>e.check(n4(r)),e.time=r=>e.check(i4(r)),e.duration=r=>e.check(s4(r))});qr=j("ZodStringFormat",(e,t)=>{Nr.init(e,t),Yv.init(e,t)}),Jv=j("ZodEmail",(e,t)=>{O1.init(e,t),qr.init(e,t)});Yy=j("ZodGUID",(e,t)=>{L1.init(e,t),qr.init(e,t)});gc=j("ZodUUID",(e,t)=>{F1.init(e,t),qr.init(e,t)});Ky=j("ZodURL",(e,t)=>{U1.init(e,t),qr.init(e,t)});Zv=j("ZodEmoji",(e,t)=>{$1.init(e,t),qr.init(e,t)});Kv=j("ZodNanoID",(e,t)=>{H1.init(e,t),qr.init(e,t)});Xv=j("ZodCUID",(e,t)=>{j1.init(e,t),qr.init(e,t)});ex=j("ZodCUID2",(e,t)=>{q1.init(e,t),qr.init(e,t)});tx=j("ZodULID",(e,t)=>{z1.init(e,t),qr.init(e,t)});rx=j("ZodXID",(e,t)=>{V1.init(e,t),qr.init(e,t)});nx=j("ZodKSUID",(e,t)=>{G1.init(e,t),qr.init(e,t)});ix=j("ZodIPv4",(e,t)=>{K1.init(e,t),qr.init(e,t)});E4=j("ZodMAC",(e,t)=>{eS.init(e,t),qr.init(e,t)});sx=j("ZodIPv6",(e,t)=>{X1.init(e,t),qr.init(e,t)});ox=j("ZodCIDRv4",(e,t)=>{tS.init(e,t),qr.init(e,t)});ax=j("ZodCIDRv6",(e,t)=>{rS.init(e,t),qr.init(e,t)});cx=j("ZodBase64",(e,t)=>{nS.init(e,t),qr.init(e,t)});ux=j("ZodBase64URL",(e,t)=>{iS.init(e,t),qr.init(e,t)});lx=j("ZodE164",(e,t)=>{sS.init(e,t),qr.init(e,t)});dx=j("ZodJWT",(e,t)=>{oS.init(e,t),qr.init(e,t)});FA=j("ZodCustomStringFormat",(e,t)=>{aS.init(e,t),qr.init(e,t)});OA=j("ZodNumber",(e,t)=>{py.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>EM(e,n,i,s),e.gt=(n,i)=>e.check(Da(n,i)),e.gte=(n,i)=>e.check(Ei(n,i)),e.min=(n,i)=>e.check(Ei(n,i)),e.lt=(n,i)=>e.check(Qa(n,i)),e.lte=(n,i)=>e.check(us(n,i)),e.max=(n,i)=>e.check(us(n,i)),e.int=n=>e.check(Wv(n)),e.safe=n=>e.check(Wv(n)),e.positive=n=>e.check(Da(0,n)),e.nonnegative=n=>e.check(Ei(0,n)),e.negative=n=>e.check(Qa(0,n)),e.nonpositive=n=>e.check(us(0,n)),e.multipleOf=(n,i)=>e.check(gu(n,i)),e.step=(n,i)=>e.check(gu(n,i)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});Bf=j("ZodNumberFormat",(e,t)=>{cS.init(e,t),OA.init(e,t)});UA=j("ZodBoolean",(e,t)=>{vA.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>CM(e,r,n,i)});$A=j("ZodBigInt",(e,t)=>{hy.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>wM(e,n,i,s),e.gte=(n,i)=>e.check(Ei(n,i)),e.min=(n,i)=>e.check(Ei(n,i)),e.gt=(n,i)=>e.check(Da(n,i)),e.gte=(n,i)=>e.check(Ei(n,i)),e.min=(n,i)=>e.check(Ei(n,i)),e.lt=(n,i)=>e.check(Qa(n,i)),e.lte=(n,i)=>e.check(us(n,i)),e.max=(n,i)=>e.check(us(n,i)),e.positive=n=>e.check(Da(BigInt(0),n)),e.negative=n=>e.check(Qa(BigInt(0),n)),e.nonpositive=n=>e.check(us(BigInt(0),n)),e.nonnegative=n=>e.check(Ei(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(gu(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});fx=j("ZodBigIntFormat",(e,t)=>{uS.init(e,t),$A.init(e,t)});C4=j("ZodSymbol",(e,t)=>{lS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>IM(e,r,n,i)});w4=j("ZodUndefined",(e,t)=>{dS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vM(e,r,n,i)});I4=j("ZodNull",(e,t)=>{fS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SM(e,r,n,i)});S4=j("ZodAny",(e,t)=>{pS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kM(e,r,n,i)});v4=j("ZodUnknown",(e,t)=>{hS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_M(e,r,n,i)});x4=j("ZodNever",(e,t)=>{AS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>BM(e,r,n,i)});B4=j("ZodVoid",(e,t)=>{gS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xM(e,r,n,i)});eb=j("ZodDate",(e,t)=>{mS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>TM(e,n,i,s),e.min=(n,i)=>e.check(Ei(n,i)),e.max=(n,i)=>e.check(us(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});k4=j("ZodArray",(e,t)=>{yS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>HM(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(Ac(r,n)),e.nonempty=r=>e.check(Ac(1,r)),e.max=(r,n)=>e.check(kl(r,n)),e.length=(r,n)=>e.check(_l(r,n)),e.unwrap=()=>e.element});tb=j("ZodObject",(e,t)=>{fM.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jM(e,r,n,i),be.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>wi(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:zr()}),e.loose=()=>e.clone({...e._zod.def,catchall:zr()}),e.strict=()=>e.clone({...e._zod.def,catchall:px()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>be.extend(e,r),e.safeExtend=r=>be.safeExtend(e,r),e.merge=r=>be.merge(e,r),e.pick=r=>be.pick(e,r),e.omit=r=>be.omit(e,r),e.partial=(...r)=>be.partial(Ax,e,r[0]),e.required=(...r)=>be.required(gx,e,r[0])});rb=j("ZodUnion",(e,t)=>{xA.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Pv(e,r,n,i),e.options=t.options});_4=j("ZodXor",(e,t)=>{rb.init(e,t),bS.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Pv(e,r,n,i),e.options=t.options});T4=j("ZodDiscriminatedUnion",(e,t)=>{rb.init(e,t),ES.init(e,t)});R4=j("ZodIntersection",(e,t)=>{CS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qM(e,r,n,i)});Q4=j("ZodTuple",(e,t)=>{Ay.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zM(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});ib=j("ZodRecord",(e,t)=>{wS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>VM(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});N4=j("ZodMap",(e,t)=>{IS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>UM(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Na(...r)),e.nonempty=r=>e.check(Na(1,r)),e.max=(...r)=>e.check(mu(...r)),e.size=(...r)=>e.check(Bl(...r))});M4=j("ZodSet",(e,t)=>{SS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$M(e,r,n,i),e.min=(...r)=>e.check(Na(...r)),e.nonempty=r=>e.check(Na(1,r)),e.max=(...r)=>e.check(mu(...r)),e.size=(...r)=>e.check(Bl(...r))});PA=j("ZodEnum",(e,t)=>{vS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,i,s)=>RM(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let s={};for(let o of n)if(r.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new PA({...t,checks:[],...be.normalizeParams(i),entries:s})},e.exclude=(n,i)=>{let s={...t.entries};for(let o of n)if(r.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new PA({...t,checks:[],...be.normalizeParams(i),entries:s})}});P4=j("ZodLiteral",(e,t)=>{xS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>QM(e,r,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});L4=j("ZodFile",(e,t)=>{BS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MM(e,r,n,i),e.min=(r,n)=>e.check(Na(r,n)),e.max=(r,n)=>e.check(mu(r,n)),e.mime=(r,n)=>e.check(Cf(Array.isArray(r)?r:[r],n))});F4=j("ZodTransform",(e,t)=>{kS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OM(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cl(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(be.issue(s,r.value,t));else{let o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(be.issue(o))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});Ax=j("ZodOptional",(e,t)=>{gy.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Lv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});O4=j("ZodExactOptional",(e,t)=>{_S.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Lv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});$4=j("ZodNullable",(e,t)=>{TS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>GM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});H4=j("ZodDefault",(e,t)=>{RS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>YM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});q4=j("ZodPrefault",(e,t)=>{QS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>JM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});gx=j("ZodNonOptional",(e,t)=>{DS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>WM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});G4=j("ZodSuccess",(e,t)=>{NS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>PM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});W4=j("ZodCatch",(e,t)=>{MS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ZM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});J4=j("ZodNaN",(e,t)=>{PS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DM(e,r,n,i)});mx=j("ZodPipe",(e,t)=>{LS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>KM(e,r,n,i),e.in=t.in,e.out=t.out});yx=j("ZodCodec",(e,t)=>{mx.init(e,t),BA.init(e,t)});Z4=j("ZodReadonly",(e,t)=>{FS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>XM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});X4=j("ZodTemplateLiteral",(e,t)=>{OS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>NM(e,r,n,i)});eP=j("ZodLazy",(e,t)=>{HS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>t4(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});rP=j("ZodPromise",(e,t)=>{$S.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>e4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});nP=j("ZodFunction",(e,t)=>{US.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FM(e,r,n,i)});sb=j("ZodCustom",(e,t)=>{jS.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,n,i)=>LM(e,r,n,i)});SZ=Qv,vZ=Dv;BZ=(...e)=>Nv({Codec:yx,Boolean:UA,String:LA},...e)});function iMe(e){Sn({customError:e})}function sMe(){return Sn().customError}var nMe,oP,_Z=D(()=>{Pn();Pn();nMe={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"};oP||(oP={})});function aMe(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function cMe(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function TZ(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Fe.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return Fe.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let s=cMe(i,t),o=Oi(s,t);return t.refs.set(i,o),t.processing.delete(i),o}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return Fe.null();if(i.length===0)return Fe.never();if(i.length===1)return Fe.literal(i[0]);if(i.every(o=>typeof o=="string"))return Fe.enum(i);let s=i.map(o=>Fe.literal(o));return s.length<2?s[0]:Fe.union([s[0],s[1],...s.slice(2)])}if(e.const!==void 0)return Fe.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(s=>{let o={...e,type:s};return TZ(o,t)});return i.length===0?Fe.never():i.length===1?i[0]:Fe.union(i)}if(!r)return Fe.any();let n;switch(r){case"string":{let i=Fe.string();if(e.format){let s=e.format;s==="email"?i=i.check(Fe.email()):s==="uri"||s==="uri-reference"?i=i.check(Fe.url()):s==="uuid"||s==="guid"?i=i.check(Fe.uuid()):s==="date-time"?i=i.check(Fe.iso.datetime()):s==="date"?i=i.check(Fe.iso.date()):s==="time"?i=i.check(Fe.iso.time()):s==="duration"?i=i.check(Fe.iso.duration()):s==="ipv4"?i=i.check(Fe.ipv4()):s==="ipv6"?i=i.check(Fe.ipv6()):s==="mac"?i=i.check(Fe.mac()):s==="cidr"?i=i.check(Fe.cidrv4()):s==="cidr-v6"?i=i.check(Fe.cidrv6()):s==="base64"?i=i.check(Fe.base64()):s==="base64url"?i=i.check(Fe.base64url()):s==="e164"?i=i.check(Fe.e164()):s==="jwt"?i=i.check(Fe.jwt()):s==="emoji"?i=i.check(Fe.emoji()):s==="nanoid"?i=i.check(Fe.nanoid()):s==="cuid"?i=i.check(Fe.cuid()):s==="cuid2"?i=i.check(Fe.cuid2()):s==="ulid"?i=i.check(Fe.ulid()):s==="xid"?i=i.check(Fe.xid()):s==="ksuid"&&(i=i.check(Fe.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?Fe.number().int():Fe.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=Fe.boolean();break}case"null":{n=Fe.null();break}case"object":{let i={},s=e.properties||{},o=new Set(e.required||[]);for(let[c,u]of Object.entries(s)){let l=Oi(u,t);i[c]=o.has(c)?l:l.optional()}if(e.propertyNames){let c=Oi(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Oi(e.additionalProperties,t):Fe.any();if(Object.keys(i).length===0){n=Fe.record(c,u);break}let l=Fe.object(i).passthrough(),d=Fe.looseRecord(c,u);n=Fe.intersection(l,d);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let f of u){let p=Oi(c[f],t),h=Fe.string().regex(new RegExp(f));l.push(Fe.looseRecord(h,p))}let d=[];if(Object.keys(i).length>0&&d.push(Fe.object(i).passthrough()),d.push(...l),d.length===0)n=Fe.object({}).passthrough();else if(d.length===1)n=d[0];else{let f=Fe.intersection(d[0],d[1]);for(let p=2;pOi(c,t)),a=s&&typeof s=="object"&&!Array.isArray(s)?Oi(s,t):void 0;a?n=Fe.tuple(o).rest(a):n=Fe.tuple(o),typeof e.minItems=="number"&&(n=n.check(Fe.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Fe.maxLength(e.maxItems)))}else if(Array.isArray(s)){let o=s.map(c=>Oi(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Oi(e.additionalItems,t):void 0;a?n=Fe.tuple(o).rest(a):n=Fe.tuple(o),typeof e.minItems=="number"&&(n=n.check(Fe.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Fe.maxLength(e.maxItems)))}else if(s!==void 0){let o=Oi(s,t),a=Fe.array(o);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Fe.array(Fe.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function Oi(e,t){if(typeof e=="boolean")return e?Fe.any():Fe.never();let r=TZ(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>Oi(u,t)),c=Fe.union(a);r=n?Fe.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>Oi(u,t)),c=Fe.xor(a);r=n?Fe.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Fe.any();else{let a=n?r:Oi(e.allOf[0],t),c=n?0:1;for(let u=c;u0&&t.registry.add(r,i),r}function RZ(e,t){if(typeof e=="boolean")return e?Fe.any():Fe.never();let r=aMe(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ni};return Oi(e,i)}var Fe,oMe,QZ=D(()=>{by();jv();Vy();Wy();Fe={...Gy,...Hv,iso:Nl},oMe=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 aP={};Jt(aP,{bigint:()=>fMe,boolean:()=>dMe,date:()=>pMe,number:()=>lMe,string:()=>uMe});function uMe(e){return KS(LA,e)}function lMe(e){return ov(OA,e)}function dMe(e){return pv(UA,e)}function fMe(e){return Av($A,e)}function pMe(e){return xv(eb,e)}var DZ=D(()=>{Pn();Wy()});var Ne={};Jt(Ne,{$brand:()=>ry,$input:()=>JS,$output:()=>YS,NEVER:()=>f1,TimePrecision:()=>ev,ZodAny:()=>S4,ZodArray:()=>k4,ZodBase64:()=>cx,ZodBase64URL:()=>ux,ZodBigInt:()=>$A,ZodBigIntFormat:()=>fx,ZodBoolean:()=>UA,ZodCIDRv4:()=>ox,ZodCIDRv6:()=>ax,ZodCUID:()=>Xv,ZodCUID2:()=>ex,ZodCatch:()=>W4,ZodCodec:()=>yx,ZodCustom:()=>sb,ZodCustomStringFormat:()=>FA,ZodDate:()=>eb,ZodDefault:()=>H4,ZodDiscriminatedUnion:()=>T4,ZodE164:()=>lx,ZodEmail:()=>Jv,ZodEmoji:()=>Zv,ZodEnum:()=>PA,ZodError:()=>tMe,ZodExactOptional:()=>O4,ZodFile:()=>L4,ZodFirstPartyTypeKind:()=>oP,ZodFunction:()=>nP,ZodGUID:()=>Yy,ZodIPv4:()=>ix,ZodIPv6:()=>sx,ZodISODate:()=>zv,ZodISODateTime:()=>qv,ZodISODuration:()=>Gv,ZodISOTime:()=>Vv,ZodIntersection:()=>R4,ZodIssueCode:()=>nMe,ZodJWT:()=>dx,ZodKSUID:()=>nx,ZodLazy:()=>eP,ZodLiteral:()=>P4,ZodMAC:()=>E4,ZodMap:()=>N4,ZodNaN:()=>J4,ZodNanoID:()=>Kv,ZodNever:()=>x4,ZodNonOptional:()=>gx,ZodNull:()=>I4,ZodNullable:()=>$4,ZodNumber:()=>OA,ZodNumberFormat:()=>Bf,ZodObject:()=>tb,ZodOptional:()=>Ax,ZodPipe:()=>mx,ZodPrefault:()=>q4,ZodPromise:()=>rP,ZodReadonly:()=>Z4,ZodRealError:()=>Ds,ZodRecord:()=>ib,ZodSet:()=>M4,ZodString:()=>LA,ZodStringFormat:()=>qr,ZodSuccess:()=>G4,ZodSymbol:()=>C4,ZodTemplateLiteral:()=>X4,ZodTransform:()=>F4,ZodTuple:()=>Q4,ZodType:()=>Ft,ZodULID:()=>tx,ZodURL:()=>Ky,ZodUUID:()=>gc,ZodUndefined:()=>w4,ZodUnion:()=>rb,ZodUnknown:()=>v4,ZodVoid:()=>B4,ZodXID:()=>rx,ZodXor:()=>_4,_ZodString:()=>Yv,_default:()=>j4,_function:()=>wZ,any:()=>iZ,array:()=>Kt,base64:()=>$J,base64url:()=>HJ,bigint:()=>XJ,boolean:()=>Ln,catch:()=>Y4,check:()=>IZ,cidrv4:()=>OJ,cidrv6:()=>UJ,clone:()=>bi,codec:()=>bZ,coerce:()=>aP,config:()=>Sn,core:()=>uo,cuid:()=>RJ,cuid2:()=>QJ,custom:()=>bx,date:()=>oZ,decode:()=>f4,decodeAsync:()=>h4,describe:()=>SZ,discriminatedUnion:()=>nb,e164:()=>jJ,email:()=>CJ,emoji:()=>_J,encode:()=>d4,encodeAsync:()=>p4,endsWith:()=>Ef,enum:()=>wi,exactOptional:()=>U4,file:()=>AZ,flattenError:()=>AA,float32:()=>YJ,float64:()=>JJ,formatError:()=>gA,fromJSONSchema:()=>RZ,function:()=>wZ,getErrorMap:()=>sMe,globalRegistry:()=>ni,gt:()=>Da,gte:()=>Ei,guid:()=>wJ,hash:()=>WJ,hex:()=>GJ,hostname:()=>VJ,httpUrl:()=>kJ,includes:()=>yf,instanceof:()=>xZ,int:()=>Wv,int32:()=>ZJ,int64:()=>eZ,intersection:()=>HA,ipv4:()=>PJ,ipv6:()=>FJ,iso:()=>Nl,json:()=>kZ,jwt:()=>qJ,keyof:()=>aZ,ksuid:()=>MJ,lazy:()=>tP,length:()=>_l,literal:()=>st,locales:()=>_A,looseObject:()=>Ci,looseRecord:()=>dZ,lowercase:()=>gf,lt:()=>Qa,lte:()=>us,mac:()=>LJ,map:()=>fZ,maxLength:()=>kl,maxSize:()=>mu,meta:()=>vZ,mime:()=>Cf,minLength:()=>Ac,minSize:()=>Na,multipleOf:()=>gu,nan:()=>yZ,nanoid:()=>TJ,nativeEnum:()=>hZ,negative:()=>$y,never:()=>px,nonnegative:()=>jy,nonoptional:()=>V4,nonpositive:()=>Hy,normalize:()=>wf,null:()=>Xy,nullable:()=>Jy,nullish:()=>gZ,number:()=>wr,object:()=>$e,optional:()=>Kr,overwrite:()=>No,parse:()=>a4,parseAsync:()=>c4,partialRecord:()=>lZ,pipe:()=>Zy,positive:()=>Uy,prefault:()=>z4,preprocess:()=>ob,prettifyError:()=>m1,promise:()=>CZ,property:()=>qy,readonly:()=>K4,record:()=>Mr,refine:()=>iP,regex:()=>Af,regexes:()=>Qs,registry:()=>yy,safeDecode:()=>g4,safeDecodeAsync:()=>y4,safeEncode:()=>A4,safeEncodeAsync:()=>m4,safeParse:()=>u4,safeParseAsync:()=>l4,set:()=>pZ,setErrorMap:()=>iMe,size:()=>Bl,slugify:()=>QA,startsWith:()=>bf,strictObject:()=>cZ,string:()=>ee,stringFormat:()=>zJ,stringbool:()=>BZ,success:()=>mZ,superRefine:()=>sP,symbol:()=>rZ,templateLiteral:()=>EZ,toJSONSchema:()=>NA,toLowerCase:()=>Sf,toUpperCase:()=>vf,transform:()=>hx,treeifyError:()=>g1,trim:()=>If,tuple:()=>D4,uint32:()=>KJ,uint64:()=>tZ,ulid:()=>DJ,undefined:()=>nZ,union:()=>Vr,unknown:()=>zr,uppercase:()=>mf,url:()=>BJ,util:()=>be,uuid:()=>IJ,uuidv4:()=>SJ,uuidv6:()=>vJ,uuidv7:()=>xJ,void:()=>sZ,xid:()=>NJ,xor:()=>uZ});var ab=D(()=>{Pn();Wy();jv();o4();b4();_Z();Pn();hM();Pn();MA();QZ();GS();Vy();Vy();DZ();Sn(qS())});var wb=B(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.regexpCode=Ir.getEsmExportName=Ir.getProperty=Ir.safeStringify=Ir.stringify=Ir.strConcat=Ir.addCodeArg=Ir.str=Ir._=Ir.nil=Ir._Code=Ir.Name=Ir.IDENTIFIER=Ir._CodeOrName=void 0;var Eb=class{};Ir._CodeOrName=Eb;Ir.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kf=class extends Eb{constructor(t){if(super(),!Ir.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ir.Name=kf;var Lo=class extends Eb{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof kf&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Ir._Code=Lo;Ir.nil=new Lo("");function KZ(e,...t){let r=[e[0]],n=0;for(;n{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.ValueScope=Ms.ValueScopeName=Ms.Scope=Ms.varKinds=Ms.UsedValueState=void 0;var Ns=wb(),TP=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Mx;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Mx||(Ms.UsedValueState=Mx={}));Ms.varKinds={const:new Ns.Name("const"),let:new Ns.Name("let"),var:new Ns.Name("var")};var Px=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ns.Name?t:this.name(t)}name(t){return new Ns.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ms.Scope=Px;var Lx=class extends Ns.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ns._)`.${new Ns.Name(r)}[${n}]`}};Ms.ValueScopeName=Lx;var aPe=(0,Ns._)`\n`,RP=class extends Px{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?aPe:Ns.nil}}get(){return this._scope}name(t){return new Lx(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(o);if(l)return l}else a=this._values[s]=new Map;a.set(o,i);let c=this._scope[s]||(this._scope[s]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:s,itemIndex:u}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ns._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=Ns.nil;for(let o in t){let a=t[o];if(!a)continue;let c=n[o]=n[o]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Mx.Started);let l=r(u);if(l){let d=this.opts.es5?Ms.varKinds.var:Ms.varKinds.const;s=(0,Ns._)`${s}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))s=(0,Ns._)`${s}${l}${this.opts._n}`;else throw new TP(u);c.set(u,Mx.Completed)})}return s}};Ms.ValueScope=RP});var qt=B(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.or=Xt.and=Xt.not=Xt.CodeGen=Xt.operators=Xt.varKinds=Xt.ValueScopeName=Xt.ValueScope=Xt.Scope=Xt.Name=Xt.regexpCode=Xt.stringify=Xt.getProperty=Xt.nil=Xt.strConcat=Xt.str=Xt._=void 0;var lr=wb(),Ma=QP(),Ll=wb();Object.defineProperty(Xt,"_",{enumerable:!0,get:function(){return Ll._}});Object.defineProperty(Xt,"str",{enumerable:!0,get:function(){return Ll.str}});Object.defineProperty(Xt,"strConcat",{enumerable:!0,get:function(){return Ll.strConcat}});Object.defineProperty(Xt,"nil",{enumerable:!0,get:function(){return Ll.nil}});Object.defineProperty(Xt,"getProperty",{enumerable:!0,get:function(){return Ll.getProperty}});Object.defineProperty(Xt,"stringify",{enumerable:!0,get:function(){return Ll.stringify}});Object.defineProperty(Xt,"regexpCode",{enumerable:!0,get:function(){return Ll.regexpCode}});Object.defineProperty(Xt,"Name",{enumerable:!0,get:function(){return Ll.Name}});var $x=QP();Object.defineProperty(Xt,"Scope",{enumerable:!0,get:function(){return $x.Scope}});Object.defineProperty(Xt,"ValueScope",{enumerable:!0,get:function(){return $x.ValueScope}});Object.defineProperty(Xt,"ValueScopeName",{enumerable:!0,get:function(){return $x.ValueScopeName}});Object.defineProperty(Xt,"varKinds",{enumerable:!0,get:function(){return $x.varKinds}});Xt.operators={GT:new lr._Code(">"),GTE:new lr._Code(">="),LT:new lr._Code("<"),LTE:new lr._Code("<="),EQ:new lr._Code("==="),NEQ:new lr._Code("!=="),NOT:new lr._Code("!"),OR:new lr._Code("||"),AND:new lr._Code("&&"),ADD:new lr._Code("+")};var bu=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},DP=class extends bu{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Ma.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=WA(this.rhs,t,r)),this}get names(){return this.rhs instanceof lr._CodeOrName?this.rhs.names:{}}},Fx=class extends bu{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof lr.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=WA(this.rhs,t,r),this}get names(){let t=this.lhs instanceof lr.Name?{}:{...this.lhs.names};return Ux(t,this.rhs)}},NP=class extends Fx{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},MP=class extends bu{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},PP=class extends bu{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},LP=class extends bu{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},FP=class extends bu{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=WA(this.code,t,r),this}get names(){return this.code instanceof lr._CodeOrName?this.code.names:{}}},Ib=class extends bu{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(cPe(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Rf(t,r.names),{})}},Eu=class extends Ib{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},OP=class extends Ib{},GA=class extends Eu{};GA.kind="else";var _f=class e extends Eu{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new GA(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(eK(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=WA(this.condition,t,r),this}get names(){let t=super.names;return Ux(t,this.condition),this.else&&Rf(t,this.else.names),t}};_f.kind="if";var Tf=class extends Eu{};Tf.kind="for";var UP=class extends Tf{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=WA(this.iteration,t,r),this}get names(){return Rf(super.names,this.iteration.names)}},$P=class extends Tf{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?Ma.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=Ux(super.names,this.from);return Ux(t,this.to)}},Ox=class extends Tf{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=WA(this.iterable,t,r),this}get names(){return Rf(super.names,this.iterable.names)}},Sb=class extends Eu{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Sb.kind="func";var vb=class extends Ib{render(t){return"return "+super.render(t)}};vb.kind="return";var HP=class extends Eu{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Rf(t,this.catch.names),this.finally&&Rf(t,this.finally.names),t}},xb=class extends Eu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};xb.kind="catch";var Bb=class extends Eu{render(t){return"finally"+super.render(t)}};Bb.kind="finally";var jP=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` -`:""},this._extScope=t,this._scope=new Ma.Scope({parent:t}),this._nodes=[new OP]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new DP(t,s,n)),s}const(t,r,n){return this._def(Ma.varKinds.const,t,r,n)}let(t,r,n){return this._def(Ma.varKinds.let,t,r,n)}var(t,r,n){return this._def(Ma.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Fx(t,r,n))}add(t,r){return this._leafNode(new NP(t,Xt.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==lr.nil&&this._leafNode(new FP(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,lr.addCodeArg)(r,i));return r.push("}"),new lr._Code(r)}if(t,r,n){if(this._blockNode(new _f(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new _f(t))}else(){return this._elseNode(new GA)}endIf(){return this._endBlockNode(_f,GA)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new UP(t),r)}forRange(t,r,n,i,s=this.opts.es5?Ma.varKinds.var:Ma.varKinds.let){let o=this._scope.toName(t);return this._for(new $P(s,o,r,n),()=>i(o))}forOf(t,r,n,i=Ma.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let o=r instanceof lr.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,lr._)`${o}.length`,a=>{this.var(s,(0,lr._)`${o}[${a}]`),n(s)})}return this._for(new Ox("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?Ma.varKinds.var:Ma.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,lr._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new Ox("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(Tf)}label(t){return this._leafNode(new MP(t))}break(t){return this._leafNode(new PP(t))}return(t){let r=new vb;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(vb)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new HP;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new xb(s),r(s)}return n&&(this._currNode=i.finally=new Bb,this.code(n)),this._endBlockNode(xb,Bb)}throw(t){return this._leafNode(new LP(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=lr.nil,n,i){return this._blockNode(new Sb(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Sb)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof _f))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Xt.CodeGen=jP;function Rf(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Ux(e,t){return t instanceof lr._CodeOrName?Rf(e,t.names):e}function WA(e,t,r){if(e instanceof lr.Name)return n(e);if(!i(e))return e;return new lr._Code(e._items.reduce((s,o)=>(o instanceof lr.Name&&(o=n(o)),o instanceof lr._Code?s.push(...o._items):s.push(o),s),[]));function n(s){let o=r[s.str];return o===void 0||t[s.str]!==1?s:(delete t[s.str],o)}function i(s){return s instanceof lr._Code&&s._items.some(o=>o instanceof lr.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function cPe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function eK(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,lr._)`!${qP(e)}`}Xt.not=eK;var uPe=tK(Xt.operators.AND);function lPe(...e){return e.reduce(uPe)}Xt.and=lPe;var dPe=tK(Xt.operators.OR);function fPe(...e){return e.reduce(dPe)}Xt.or=fPe;function tK(e){return(t,r)=>t===lr.nil?r:r===lr.nil?t:(0,lr._)`${qP(t)} ${e} ${qP(r)}`}function qP(e){return e instanceof lr.Name?e:(0,lr._)`(${e})`}});var gr=B(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.checkStrictMode=rr.getErrorPath=rr.Type=rr.useFunc=rr.setEvaluated=rr.evaluatedPropsToName=rr.mergeEvaluated=rr.eachItem=rr.unescapeJsonPointer=rr.escapeJsonPointer=rr.escapeFragment=rr.unescapeFragment=rr.schemaRefOrVal=rr.schemaHasRulesButRef=rr.schemaHasRules=rr.checkUnknownRules=rr.alwaysValidSchema=rr.toHash=void 0;var Xr=qt(),pPe=wb();function hPe(e){let t={};for(let r of e)t[r]=!0;return t}rr.toHash=hPe;function APe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(iK(e,t),!sK(t,e.self.RULES.all))}rr.alwaysValidSchema=APe;function iK(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let s in t)i[s]||cK(e,`unknown keyword: "${s}"`)}rr.checkUnknownRules=iK;function sK(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}rr.schemaHasRules=sK;function gPe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}rr.schemaHasRulesButRef=gPe;function mPe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Xr._)`${r}`}return(0,Xr._)`${e}${t}${(0,Xr.getProperty)(n)}`}rr.schemaRefOrVal=mPe;function yPe(e){return oK(decodeURIComponent(e))}rr.unescapeFragment=yPe;function bPe(e){return encodeURIComponent(VP(e))}rr.escapeFragment=bPe;function VP(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}rr.escapeJsonPointer=VP;function oK(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}rr.unescapeJsonPointer=oK;function EPe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}rr.eachItem=EPe;function rK({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,o,a)=>{let c=o===void 0?s:o instanceof Xr.Name?(s instanceof Xr.Name?e(i,s,o):t(i,s,o),o):s instanceof Xr.Name?(t(i,o,s),s):r(s,o);return a===Xr.Name&&!(c instanceof Xr.Name)?n(i,c):c}}rr.mergeEvaluated={props:rK({mergeNames:(e,t,r)=>e.if((0,Xr._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Xr._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Xr._)`${r} || {}`).code((0,Xr._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Xr._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Xr._)`${r} || {}`),GP(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:aK}),items:rK({mergeNames:(e,t,r)=>e.if((0,Xr._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Xr._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Xr._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Xr._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function aK(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Xr._)`{}`);return t!==void 0&&GP(e,r,t),r}rr.evaluatedPropsToName=aK;function GP(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Xr._)`${t}${(0,Xr.getProperty)(n)}`,!0))}rr.setEvaluated=GP;var nK={};function CPe(e,t){return e.scopeValue("func",{ref:t,code:nK[t.code]||(nK[t.code]=new pPe._Code(t.code))})}rr.useFunc=CPe;var zP;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(zP||(rr.Type=zP={}));function wPe(e,t,r){if(e instanceof Xr.Name){let n=t===zP.Num;return r?n?(0,Xr._)`"[" + ${e} + "]"`:(0,Xr._)`"['" + ${e} + "']"`:n?(0,Xr._)`"/" + ${e}`:(0,Xr._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Xr.getProperty)(e).toString():"/"+VP(e)}rr.getErrorPath=wPe;function cK(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}rr.checkStrictMode=cK});var Cu=B(WP=>{"use strict";Object.defineProperty(WP,"__esModule",{value:!0});var Ui=qt(),IPe={data:new Ui.Name("data"),valCxt:new Ui.Name("valCxt"),instancePath:new Ui.Name("instancePath"),parentData:new Ui.Name("parentData"),parentDataProperty:new Ui.Name("parentDataProperty"),rootData:new Ui.Name("rootData"),dynamicAnchors:new Ui.Name("dynamicAnchors"),vErrors:new Ui.Name("vErrors"),errors:new Ui.Name("errors"),this:new Ui.Name("this"),self:new Ui.Name("self"),scope:new Ui.Name("scope"),json:new Ui.Name("json"),jsonPos:new Ui.Name("jsonPos"),jsonLen:new Ui.Name("jsonLen"),jsonPart:new Ui.Name("jsonPart")};WP.default=IPe});var kb=B($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.extendErrors=$i.resetErrorsCount=$i.reportExtraError=$i.reportError=$i.keyword$DataError=$i.keywordError=void 0;var mr=qt(),Hx=gr(),ds=Cu();$i.keywordError={message:({keyword:e})=>(0,mr.str)`must pass "${e}" keyword validation`};$i.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,mr.str)`"${e}" keyword must be ${t} ($data)`:(0,mr.str)`"${e}" keyword is invalid ($data)`};function SPe(e,t=$i.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:o,allErrors:a}=i,c=dK(e,t,r);n??(o||a)?uK(s,c):lK(i,(0,mr._)`[${c}]`)}$i.reportError=SPe;function vPe(e,t=$i.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:o}=n,a=dK(e,t,r);uK(i,a),s||o||lK(n,ds.default.vErrors)}$i.reportExtraError=vPe;function xPe(e,t){e.assign(ds.default.errors,t),e.if((0,mr._)`${ds.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,mr._)`${ds.default.vErrors}.length`,t),()=>e.assign(ds.default.vErrors,null)))}$i.resetErrorsCount=xPe;function BPe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,ds.default.errors,a=>{e.const(o,(0,mr._)`${ds.default.vErrors}[${a}]`),e.if((0,mr._)`${o}.instancePath === undefined`,()=>e.assign((0,mr._)`${o}.instancePath`,(0,mr.strConcat)(ds.default.instancePath,s.errorPath))),e.assign((0,mr._)`${o}.schemaPath`,(0,mr.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,mr._)`${o}.schema`,r),e.assign((0,mr._)`${o}.data`,n))})}$i.extendErrors=BPe;function uK(e,t){let r=e.const("err",t);e.if((0,mr._)`${ds.default.vErrors} === null`,()=>e.assign(ds.default.vErrors,(0,mr._)`[${r}]`),(0,mr._)`${ds.default.vErrors}.push(${r})`),e.code((0,mr._)`${ds.default.errors}++`)}function lK(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,mr._)`new ${e.ValidationError}(${t})`):(r.assign((0,mr._)`${n}.errors`,t),r.return(!1))}var Qf={keyword:new mr.Name("keyword"),schemaPath:new mr.Name("schemaPath"),params:new mr.Name("params"),propertyName:new mr.Name("propertyName"),message:new mr.Name("message"),schema:new mr.Name("schema"),parentSchema:new mr.Name("parentSchema")};function dK(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,mr._)`{}`:kPe(e,t,r)}function kPe(e,t,r={}){let{gen:n,it:i}=e,s=[_Pe(i,r),TPe(e,r)];return RPe(e,t,s),n.object(...s)}function _Pe({errorPath:e},{instancePath:t}){let r=t?(0,mr.str)`${e}${(0,Hx.getErrorPath)(t,Hx.Type.Str)}`:e;return[ds.default.instancePath,(0,mr.strConcat)(ds.default.instancePath,r)]}function TPe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,mr.str)`${t}/${e}`;return r&&(i=(0,mr.str)`${i}${(0,Hx.getErrorPath)(r,Hx.Type.Str)}`),[Qf.schemaPath,i]}function RPe(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:o,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;n.push([Qf.keyword,i],[Qf.params,typeof t=="function"?t(e):t||(0,mr._)`{}`]),c.messages&&n.push([Qf.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Qf.schema,o],[Qf.parentSchema,(0,mr._)`${l}${d}`],[ds.default.data,s]),u&&n.push([Qf.propertyName,u])}});var pK=B(YA=>{"use strict";Object.defineProperty(YA,"__esModule",{value:!0});YA.boolOrEmptySchema=YA.topBoolOrEmptySchema=void 0;var QPe=kb(),DPe=qt(),NPe=Cu(),MPe={message:"boolean schema is false"};function PPe(e){let{gen:t,schema:r,validateName:n}=e;r===!1?fK(e,!1):typeof r=="object"&&r.$async===!0?t.return(NPe.default.data):(t.assign((0,DPe._)`${n}.errors`,null),t.return(!0))}YA.topBoolOrEmptySchema=PPe;function LPe(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),fK(e)):r.var(t,!0)}YA.boolOrEmptySchema=LPe;function fK(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,QPe.reportError)(i,MPe,void 0,t)}});var YP=B(JA=>{"use strict";Object.defineProperty(JA,"__esModule",{value:!0});JA.getRules=JA.isJSONType=void 0;var FPe=["string","number","integer","boolean","null","object","array"],OPe=new Set(FPe);function UPe(e){return typeof e=="string"&&OPe.has(e)}JA.isJSONType=UPe;function $Pe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}JA.getRules=$Pe});var JP=B(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.shouldUseRule=Fl.shouldUseGroup=Fl.schemaHasRulesForType=void 0;function HPe({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&hK(e,n)}Fl.schemaHasRulesForType=HPe;function hK(e,t){return t.rules.some(r=>AK(e,r))}Fl.shouldUseGroup=hK;function AK(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Fl.shouldUseRule=AK});var _b=B(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.reportTypeError=Hi.checkDataTypes=Hi.checkDataType=Hi.coerceAndCheckDataType=Hi.getJSONTypes=Hi.getSchemaTypes=Hi.DataType=void 0;var jPe=YP(),qPe=JP(),zPe=kb(),$t=qt(),gK=gr(),ZA;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ZA||(Hi.DataType=ZA={}));function VPe(e){let t=mK(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Hi.getSchemaTypes=VPe;function mK(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(jPe.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Hi.getJSONTypes=mK;function GPe(e,t){let{gen:r,data:n,opts:i}=e,s=WPe(t,i.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,qPe.schemaHasRulesForType)(e,t[0]));if(o){let a=KP(t,n,i.strictNumbers,ZA.Wrong);r.if(a,()=>{s.length?YPe(e,t,s):XP(e)})}return o}Hi.coerceAndCheckDataType=GPe;var yK=new Set(["string","number","integer","boolean","null"]);function WPe(e,t){return t?e.filter(r=>yK.has(r)||t==="array"&&r==="array"):[]}function YPe(e,t,r){let{gen:n,data:i,opts:s}=e,o=n.let("dataType",(0,$t._)`typeof ${i}`),a=n.let("coerced",(0,$t._)`undefined`);s.coerceTypes==="array"&&n.if((0,$t._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,$t._)`${i}[0]`).assign(o,(0,$t._)`typeof ${i}`).if(KP(t,i,s.strictNumbers),()=>n.assign(a,i))),n.if((0,$t._)`${a} !== undefined`);for(let u of r)(yK.has(u)||u==="array"&&s.coerceTypes==="array")&&c(u);n.else(),XP(e),n.endIf(),n.if((0,$t._)`${a} !== undefined`,()=>{n.assign(i,a),JPe(e,a)});function c(u){switch(u){case"string":n.elseIf((0,$t._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,$t._)`"" + ${i}`).elseIf((0,$t._)`${i} === null`).assign(a,(0,$t._)`""`);return;case"number":n.elseIf((0,$t._)`${o} == "boolean" || ${i} === null - || (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,$t._)`+${i}`);return;case"integer":n.elseIf((0,$t._)`${o} === "boolean" || ${i} === null - || (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,$t._)`+${i}`);return;case"boolean":n.elseIf((0,$t._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,$t._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,$t._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,$t._)`${o} === "string" || ${o} === "number" - || ${o} === "boolean" || ${i} === null`).assign(a,(0,$t._)`[${i}]`)}}}function JPe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,$t._)`${t} !== undefined`,()=>e.assign((0,$t._)`${t}[${r}]`,n))}function ZP(e,t,r,n=ZA.Correct){let i=n===ZA.Correct?$t.operators.EQ:$t.operators.NEQ,s;switch(e){case"null":return(0,$t._)`${t} ${i} null`;case"array":s=(0,$t._)`Array.isArray(${t})`;break;case"object":s=(0,$t._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,$t._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,$t._)`typeof ${t} ${i} ${e}`}return n===ZA.Correct?s:(0,$t.not)(s);function o(a=$t.nil){return(0,$t.and)((0,$t._)`typeof ${t} == "number"`,a,r?(0,$t._)`isFinite(${t})`:$t.nil)}}Hi.checkDataType=ZP;function KP(e,t,r,n){if(e.length===1)return ZP(e[0],t,r,n);let i,s=(0,gK.toHash)(e);if(s.array&&s.object){let o=(0,$t._)`typeof ${t} != "object"`;i=s.null?o:(0,$t._)`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=$t.nil;s.number&&delete s.integer;for(let o in s)i=(0,$t.and)(i,ZP(o,t,r,n));return i}Hi.checkDataTypes=KP;var ZPe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,$t._)`{type: ${e}}`:(0,$t._)`{type: ${t}}`};function XP(e){let t=KPe(e);(0,zPe.reportError)(t,ZPe)}Hi.reportTypeError=XP;function KPe(e){let{gen:t,data:r,schema:n}=e,i=(0,gK.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var EK=B(jx=>{"use strict";Object.defineProperty(jx,"__esModule",{value:!0});jx.assignDefaults=void 0;var KA=qt(),XPe=gr();function eLe(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)bK(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>bK(e,s,i.default))}jx.assignDefaults=eLe;function bK(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=(0,KA._)`${s}${(0,KA.getProperty)(t)}`;if(i){(0,XPe.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,KA._)`${a} === undefined`;o.useDefaults==="empty"&&(c=(0,KA._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,KA._)`${a} = ${(0,KA.stringify)(r)}`)}});var Fo=B(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.validateUnion=Gr.validateArray=Gr.usePattern=Gr.callValidateCode=Gr.schemaProperties=Gr.allSchemaProperties=Gr.noPropertyInData=Gr.propertyInData=Gr.isOwnProperty=Gr.hasPropFunc=Gr.reportMissingProp=Gr.checkMissingProp=Gr.checkReportMissingProp=void 0;var un=qt(),eL=gr(),Ol=Cu(),tLe=gr();function rLe(e,t){let{gen:r,data:n,it:i}=e;r.if(rL(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,un._)`${t}`},!0),e.error()})}Gr.checkReportMissingProp=rLe;function nLe({gen:e,data:t,it:{opts:r}},n,i){return(0,un.or)(...n.map(s=>(0,un.and)(rL(e,t,s,r.ownProperties),(0,un._)`${i} = ${s}`)))}Gr.checkMissingProp=nLe;function iLe(e,t){e.setParams({missingProperty:t},!0),e.error()}Gr.reportMissingProp=iLe;function CK(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,un._)`Object.prototype.hasOwnProperty`})}Gr.hasPropFunc=CK;function tL(e,t,r){return(0,un._)`${CK(e)}.call(${t}, ${r})`}Gr.isOwnProperty=tL;function sLe(e,t,r,n){let i=(0,un._)`${t}${(0,un.getProperty)(r)} !== undefined`;return n?(0,un._)`${i} && ${tL(e,t,r)}`:i}Gr.propertyInData=sLe;function rL(e,t,r,n){let i=(0,un._)`${t}${(0,un.getProperty)(r)} === undefined`;return n?(0,un.or)(i,(0,un.not)(tL(e,t,r))):i}Gr.noPropertyInData=rL;function wK(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Gr.allSchemaProperties=wK;function oLe(e,t){return wK(t).filter(r=>!(0,eL.alwaysValidSchema)(e,t[r]))}Gr.schemaProperties=oLe;function aLe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,c,u){let l=u?(0,un._)`${e}, ${t}, ${n}${i}`:t,d=[[Ol.default.instancePath,(0,un.strConcat)(Ol.default.instancePath,s)],[Ol.default.parentData,o.parentData],[Ol.default.parentDataProperty,o.parentDataProperty],[Ol.default.rootData,Ol.default.rootData]];o.opts.dynamicRef&&d.push([Ol.default.dynamicAnchors,Ol.default.dynamicAnchors]);let f=(0,un._)`${l}, ${r.object(...d)}`;return c!==un.nil?(0,un._)`${a}.call(${c}, ${f})`:(0,un._)`${a}(${f})`}Gr.callValidateCode=aLe;var cLe=(0,un._)`new RegExp`;function uLe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,un._)`${i.code==="new RegExp"?cLe:(0,tLe.useFunc)(e,i)}(${r}, ${n})`})}Gr.usePattern=uLe;function lLe(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let c=t.const("len",(0,un._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:eL.Type.Num},s),t.if((0,un.not)(s),a)})}}Gr.validateArray=lLe;function dLe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,eL.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);t.assign(o,(0,un._)`${o} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,un.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Gr.validateUnion=dLe});var vK=B(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.validateKeywordUsage=mc.validSchemaType=mc.funcKeywordCode=mc.macroKeywordCode=void 0;var fs=qt(),Df=Cu(),fLe=Fo(),pLe=kb();function hLe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),c=SK(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:fs.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}mc.macroKeywordCode=hLe;function ALe(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:c}=e;mLe(c,t);let u=!a&&t.compile?t.compile.call(c.self,s,o,c):t.validate,l=SK(n,i,u),d=n.let("valid");e.block$data(d,f),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function f(){if(t.errors===!1)A(),t.modifying&&IK(e),g(()=>e.error());else{let m=t.async?p():h();t.modifying&&IK(e),g(()=>gLe(e,m))}}function p(){let m=n.let("ruleErrs",null);return n.try(()=>A((0,fs._)`await `),b=>n.assign(d,!1).if((0,fs._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(m,(0,fs._)`${b}.errors`),()=>n.throw(b))),m}function h(){let m=(0,fs._)`${l}.errors`;return n.assign(m,null),A(fs.nil),m}function A(m=t.async?(0,fs._)`await `:fs.nil){let b=c.opts.passContext?Df.default.this:Df.default.self,E=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,fs._)`${m}${(0,fLe.callValidateCode)(e,l,b,E)}`,t.modifying)}function g(m){var b;n.if((0,fs.not)((b=t.valid)!==null&&b!==void 0?b:d),m)}}mc.funcKeywordCode=ALe;function IK(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,fs._)`${n.parentData}[${n.parentDataProperty}]`))}function gLe(e,t){let{gen:r}=e;r.if((0,fs._)`Array.isArray(${t})`,()=>{r.assign(Df.default.vErrors,(0,fs._)`${Df.default.vErrors} === null ? ${t} : ${Df.default.vErrors}.concat(${t})`).assign(Df.default.errors,(0,fs._)`${Df.default.vErrors}.length`),(0,pLe.extendErrors)(e)},()=>e.error())}function mLe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function SK(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,fs.stringify)(r)})}function yLe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}mc.validSchemaType=yLe;function bLe({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}mc.validateKeywordUsage=bLe});var BK=B(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.extendSubschemaMode=Ul.extendSubschemaData=Ul.getSubschema=void 0;var yc=qt(),xK=gr();function ELe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,yc._)`${e.schemaPath}${(0,yc.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,yc._)`${e.schemaPath}${(0,yc.getProperty)(t)}${(0,yc.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,xK.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Ul.getSubschema=ELe;function CLe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,f=a.let("data",(0,yc._)`${t.data}${(0,yc.getProperty)(r)}`,!0);c(f),e.errorPath=(0,yc.str)`${u}${(0,xK.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,yc._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(i!==void 0){let u=i instanceof yc.Name?i:a.let("data",i,!0);c(u),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}Ul.extendSubschemaData=CLe;function wLe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Ul.extendSubschemaMode=wLe});var nL=B((mUt,kK)=>{"use strict";kK.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var TK=B((yUt,_K)=>{"use strict";var $l=_K.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};qx(t,n,i,e,"",e)};$l.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};$l.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};$l.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};$l.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function qx(e,t,r,n,i,s,o,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,a,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in $l.arrayKeywords)for(var f=0;f{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.getSchemaRefs=Ps.resolveUrl=Ps.normalizeId=Ps._getFullPath=Ps.getFullPath=Ps.inlineRef=void 0;var SLe=gr(),vLe=nL(),xLe=TK(),BLe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function kLe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!iL(e):t?RK(e)<=t:!1}Ps.inlineRef=kLe;var _Le=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function iL(e){for(let t in e){if(_Le.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(iL)||typeof r=="object"&&iL(r))return!0}return!1}function RK(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!BLe.has(r)&&(typeof e[r]=="object"&&(0,SLe.eachItem)(e[r],n=>t+=RK(n)),t===1/0))return 1/0}return t}function QK(e,t="",r){r!==!1&&(t=XA(t));let n=e.parse(t);return DK(e,n)}Ps.getFullPath=QK;function DK(e,t){return e.serialize(t).split("#")[0]+"#"}Ps._getFullPath=DK;var TLe=/#\/?$/;function XA(e){return e?e.replace(TLe,""):""}Ps.normalizeId=XA;function RLe(e,t,r){return r=XA(r),e.resolve(t,r)}Ps.resolveUrl=RLe;var QLe=/^[a-z_][-a-z0-9._]*$/i;function DLe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=XA(e[r]||t),s={"":i},o=QK(n,i,!1),a={},c=new Set;return xLe(e,{allKeys:!0},(d,f,p,h)=>{if(h===void 0)return;let A=o+f,g=s[h];typeof d[r]=="string"&&(g=m.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),s[f]=g;function m(E){let C=this.opts.uriResolver.resolve;if(E=XA(g?C(g,E):E),c.has(E))throw l(E);c.add(E);let w=this.refs[E];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?u(d,w.schema,E):E!==XA(A)&&(E[0]==="#"?(u(d,a[E],E),a[E]=d):this.refs[E]=A),E}function b(E){if(typeof E=="string"){if(!QLe.test(E))throw new Error(`invalid anchor "${E}"`);m.call(this,`#${E}`)}}}),a;function u(d,f,p){if(f!==void 0&&!vLe(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ps.getSchemaRefs=DLe});var Db=B(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.getData=Hl.KeywordCxt=Hl.validateFunctionCode=void 0;var FK=pK(),NK=_b(),oL=JP(),zx=_b(),NLe=EK(),Qb=vK(),sL=BK(),ct=qt(),_t=Cu(),MLe=Tb(),wu=gr(),Rb=kb();function PLe(e){if($K(e)&&(HK(e),UK(e))){OLe(e);return}OK(e,()=>(0,FK.topBoolOrEmptySchema)(e))}Hl.validateFunctionCode=PLe;function OK({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,ct._)`${_t.default.data}, ${_t.default.valCxt}`,n.$async,()=>{e.code((0,ct._)`"use strict"; ${MK(r,i)}`),FLe(e,i),e.code(s)}):e.func(t,(0,ct._)`${_t.default.data}, ${LLe(i)}`,n.$async,()=>e.code(MK(r,i)).code(s))}function LLe(e){return(0,ct._)`{${_t.default.instancePath}="", ${_t.default.parentData}, ${_t.default.parentDataProperty}, ${_t.default.rootData}=${_t.default.data}${e.dynamicRef?(0,ct._)`, ${_t.default.dynamicAnchors}={}`:ct.nil}}={}`}function FLe(e,t){e.if(_t.default.valCxt,()=>{e.var(_t.default.instancePath,(0,ct._)`${_t.default.valCxt}.${_t.default.instancePath}`),e.var(_t.default.parentData,(0,ct._)`${_t.default.valCxt}.${_t.default.parentData}`),e.var(_t.default.parentDataProperty,(0,ct._)`${_t.default.valCxt}.${_t.default.parentDataProperty}`),e.var(_t.default.rootData,(0,ct._)`${_t.default.valCxt}.${_t.default.rootData}`),t.dynamicRef&&e.var(_t.default.dynamicAnchors,(0,ct._)`${_t.default.valCxt}.${_t.default.dynamicAnchors}`)},()=>{e.var(_t.default.instancePath,(0,ct._)`""`),e.var(_t.default.parentData,(0,ct._)`undefined`),e.var(_t.default.parentDataProperty,(0,ct._)`undefined`),e.var(_t.default.rootData,_t.default.data),t.dynamicRef&&e.var(_t.default.dynamicAnchors,(0,ct._)`{}`)})}function OLe(e){let{schema:t,opts:r,gen:n}=e;OK(e,()=>{r.$comment&&t.$comment&&qK(e),qLe(e),n.let(_t.default.vErrors,null),n.let(_t.default.errors,0),r.unevaluated&&ULe(e),jK(e),GLe(e)})}function ULe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ct._)`${r}.evaluated`),t.if((0,ct._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ct._)`${e.evaluated}.props`,(0,ct._)`undefined`)),t.if((0,ct._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ct._)`${e.evaluated}.items`,(0,ct._)`undefined`))}function MK(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ct._)`/*# sourceURL=${r} */`:ct.nil}function $Le(e,t){if($K(e)&&(HK(e),UK(e))){HLe(e,t);return}(0,FK.boolOrEmptySchema)(e,t)}function UK({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function $K(e){return typeof e.schema!="boolean"}function HLe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&qK(e),zLe(e),VLe(e);let s=n.const("_errs",_t.default.errors);jK(e,s),n.var(t,(0,ct._)`${s} === ${_t.default.errors}`)}function HK(e){(0,wu.checkUnknownRules)(e),jLe(e)}function jK(e,t){if(e.opts.jtd)return PK(e,[],!1,t);let r=(0,NK.getSchemaTypes)(e.schema),n=(0,NK.coerceAndCheckDataType)(e,r);PK(e,r,!n,t)}function jLe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,wu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function qLe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,wu.checkStrictMode)(e,"default is ignored in the schema root")}function zLe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,MLe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function VLe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function qK({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code((0,ct._)`${_t.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=(0,ct.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,ct._)`${_t.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function GLe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,ct._)`${_t.default.errors} === 0`,()=>t.return(_t.default.data),()=>t.throw((0,ct._)`new ${i}(${_t.default.vErrors})`)):(t.assign((0,ct._)`${n}.errors`,_t.default.vErrors),s.unevaluated&&WLe(e),t.return((0,ct._)`${_t.default.errors} === 0`))}function WLe({gen:e,evaluated:t,props:r,items:n}){r instanceof ct.Name&&e.assign((0,ct._)`${t}.props`,r),n instanceof ct.Name&&e.assign((0,ct._)`${t}.items`,n)}function PK(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,wu.schemaHasRulesButRef)(s,l))){i.block(()=>VK(e,"$ref",l.all.$ref.definition));return}c.jtd||YLe(e,t),i.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,oL.shouldUseGroup)(s,f)&&(f.type?(i.if((0,zx.checkDataType)(f.type,o,c.strictNumbers)),LK(e,f),t.length===1&&t[0]===f.type&&r&&(i.else(),(0,zx.reportTypeError)(e)),i.endIf()):LK(e,f),a||i.if((0,ct._)`${_t.default.errors} === ${n||0}`))}}function LK(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,NLe.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,oL.shouldUseRule)(n,s)&&VK(e,s.keyword,s.definition,t.type)})}function YLe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(JLe(e,t),e.opts.allowUnionTypes||ZLe(e,t),KLe(e,e.dataTypes))}function JLe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{zK(e.dataTypes,r)||aL(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),eFe(e,t)}}function ZLe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&aL(e,"use allowUnionTypes to allow union type keyword")}function KLe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,oL.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;s.length&&!s.some(o=>XLe(t,o))&&aL(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function XLe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function zK(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function eFe(e,t){let r=[];for(let n of e.dataTypes)zK(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function aL(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,wu.checkStrictMode)(e,t,e.opts.strictTypes)}var Vx=class{constructor(t,r,n){if((0,Qb.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,wu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",GK(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Qb.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",_t.default.errors))}result(t,r,n){this.failResult((0,ct.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ct.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ct._)`${r} !== undefined && (${(0,ct.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Rb.reportExtraError:Rb.reportError)(this,this.def.error,r)}$dataError(){(0,Rb.reportError)(this,this.def.$dataError||Rb.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Rb.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ct.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ct.nil,r=ct.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,ct.or)((0,ct._)`${i} === undefined`,r)),t!==ct.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ct.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,ct.or)(o(),a());function o(){if(n.length){if(!(r instanceof ct.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ct._)`${(0,zx.checkDataTypes)(c,r,s.opts.strictNumbers,zx.DataType.Wrong)}`}return ct.nil}function a(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ct._)`!${c}(${r})`}return ct.nil}}subschema(t,r){let n=(0,sL.getSubschema)(this.it,t);(0,sL.extendSubschemaData)(n,this.it,t),(0,sL.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return $Le(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=wu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=wu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ct.Name)),!0}};Hl.KeywordCxt=Vx;function VK(e,t,r,n){let i=new Vx(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Qb.funcKeywordCode)(i,r):"macro"in r?(0,Qb.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Qb.funcKeywordCode)(i,r)}var tFe=/^\/(?:[^~]|~0|~1)*$/,rFe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function GK(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return _t.default.rootData;if(e[0]==="/"){if(!tFe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=_t.default.rootData}else{let u=rFe.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=t)throw new Error(c("property/index",l));return n[t-l]}if(l>t)throw new Error(c("data",l));if(s=r[t-l],!i)return s}let o=s,a=i.split("/");for(let u of a)u&&(s=(0,ct._)`${s}${(0,ct.getProperty)((0,wu.unescapeJsonPointer)(u))}`,o=(0,ct._)`${o} && ${s}`);return o;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}Hl.getData=GK});var Gx=B(uL=>{"use strict";Object.defineProperty(uL,"__esModule",{value:!0});var cL=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};uL.default=cL});var Nb=B(fL=>{"use strict";Object.defineProperty(fL,"__esModule",{value:!0});var lL=Tb(),dL=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,lL.resolveUrl)(t,r,n),this.missingSchema=(0,lL.normalizeId)((0,lL.getFullPath)(t,this.missingRef))}};fL.default=dL});var Yx=B(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.resolveSchema=Oo.getCompilingSchema=Oo.resolveRef=Oo.compileSchema=Oo.SchemaEnv=void 0;var Pa=qt(),nFe=Gx(),Nf=Cu(),La=Tb(),WK=gr(),iFe=Db(),eg=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,La.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Oo.SchemaEnv=eg;function hL(e){let t=YK.call(this,e);if(t)return t;let r=(0,La.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new Pa.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;e.$async&&(a=o.scopeValue("Error",{ref:nFe.default,code:(0,Pa._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");e.validateName=c;let u={gen:o,allErrors:this.opts.allErrors,data:Nf.default.data,parentData:Nf.default.parentData,parentDataProperty:Nf.default.parentDataProperty,dataNames:[Nf.default.data],dataPathArr:[Pa.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Pa.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Pa.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Pa._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,iFe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let d=o.toString();l=`${o.scopeRefs(Nf.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let p=new Function(`${Nf.default.self}`,`${Nf.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:h,items:A}=u;p.evaluated={props:h instanceof Pa.Name?void 0:h,items:A instanceof Pa.Name?void 0:A,dynamicProps:h instanceof Pa.Name,dynamicItems:A instanceof Pa.Name},p.source&&(p.source.evaluated=(0,Pa.stringify)(p.evaluated))}return e.validate=p,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Oo.compileSchema=hL;function sFe(e,t,r){var n;r=(0,La.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=cFe.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new eg({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=oFe.call(this,s)}Oo.resolveRef=sFe;function oFe(e){return(0,La.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:hL.call(this,e)}function YK(e){for(let t of this._compilations)if(aFe(t,e))return t}Oo.getCompilingSchema=YK;function aFe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function cFe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Wx.call(this,e,t)}function Wx(e,t){let r=this.opts.uriResolver.parse(t),n=(0,La._getFullPath)(this.opts.uriResolver,r),i=(0,La.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return pL.call(this,r,e);let s=(0,La.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=Wx.call(this,e,o);return typeof a?.schema!="object"?void 0:pL.call(this,r,a)}if(typeof o?.schema=="object"){if(o.validate||hL.call(this,o),s===(0,La.normalizeId)(t)){let{schema:a}=o,{schemaId:c}=this.opts,u=a[c];return u&&(i=(0,La.resolveUrl)(this.opts.uriResolver,i,u)),new eg({schema:a,schemaId:c,root:e,baseId:i})}return pL.call(this,r,o)}}Oo.resolveSchema=Wx;var uFe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function pL(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,WK.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!uFe.has(a)&&u&&(t=(0,La.resolveUrl)(this.opts.uriResolver,t,u))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,WK.schemaHasRulesButRef)(r,this.RULES)){let a=(0,La.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Wx.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new eg({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var JK=B((SUt,lFe)=>{lFe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var mL=B((vUt,rX)=>{"use strict";var dFe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),KK=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),AL=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),XK=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),fFe=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function gL(e){let t="",r=0,n=0;for(n=0;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var pFe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function ZK(e){return e.length=0,!0}function hFe(e,t,r){if(e.length){let n=gL(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function AFe(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,o=!1,a=hFe;for(let c=0;c7){r.error=!0;break}c>0&&e[c-1]===":"&&(s=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=ZK}else{i.push(u);continue}}return i.length&&(a===ZK?r.zone=i.join(""):o?n.push(i.join("")):n.push(gL(i))),r.address=n.join(""),r}function eX(e){if(gFe(e,":")<2)return{host:e,isIPV6:!1};let t=AFe(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function gFe(e,t){let r=0;for(let n=0;nyFe[n])}function CFe(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n{"use strict";var{isUUID:vFe}=mL(),xFe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,BFe=["http","https","ws","wss","urn","urn:uuid"];function kFe(e){return BFe.indexOf(e)!==-1}function yL(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function nX(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function iX(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function _Fe(e){return e.secure=yL(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function TFe(e){if((e.port===(yL(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function RFe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(xFe);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,s=bL(i);e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function QFe(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,s=bL(i);s&&(e=s.serialize(e,t));let o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o}function DFe(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!vFe(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function NFe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var sX={scheme:"http",domainHost:!0,parse:nX,serialize:iX},MFe={scheme:"https",domainHost:sX.domainHost,parse:nX,serialize:iX},Jx={scheme:"ws",domainHost:!0,parse:_Fe,serialize:TFe},PFe={scheme:"wss",domainHost:Jx.domainHost,parse:Jx.parse,serialize:Jx.serialize},LFe={scheme:"urn",parse:RFe,serialize:QFe,skipNormalize:!0},FFe={scheme:"urn:uuid",parse:DFe,serialize:NFe,skipNormalize:!0},Zx={http:sX,https:MFe,ws:Jx,wss:PFe,urn:LFe,"urn:uuid":FFe};Object.setPrototypeOf(Zx,null);function bL(e){return e&&(Zx[e]||Zx[e.toLowerCase()])||void 0}oX.exports={wsIsSecure:yL,SCHEMES:Zx,isValidSchemeName:kFe,getSchemeHandler:bL}});var fX=B((BUt,eB)=>{"use strict";var{normalizeIPv6:OFe,removeDotSegments:Mb,recomposeAuthority:UFe,normalizePercentEncoding:$Fe,normalizePathEncoding:HFe,escapePreservingEscapes:jFe,reescapeHostDelimiters:qFe,isIPv4:zFe,nonSimpleDomain:VFe}=mL(),{SCHEMES:GFe,getSchemeHandler:uX}=aX();function WFe(e,t){return typeof e=="string"?e=tOe(e,t):typeof e=="object"&&(e=Xx(Mf(e,t),t)),e}function YFe(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:s}=Kx(e,n),{parsed:o,malformedAuthorityOrPort:a}=Kx(t,n);if(s||a)throw new Error(i.error||o.error||"URI is malformed.");let c=lX(i,o,n,!0);return n.skipEscape=!0,Mf(c,n)}function lX(e,t,r,n){let i={};return n||(e=Xx(Mf(e,r),r),t=Xx(Mf(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Mb(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Mb(t.path||""),i.query=t.query):(t.path?(t.path[0]==="/"?i.path=Mb(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=Mb(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function JFe(e,t,r){let n=cX(e,r),i=cX(t,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Mf(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=uX(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=$Fe(r.path):(r.path=jFe(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let o=UFe(r);if(o!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(o),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=Mb(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var ZFe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,KFe=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,XFe=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function eOe(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Kx(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,s=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let o=e.match(KFe);o!==null&&o[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let a=e.match(XFe);if(a!==null){let u=a[1],l=u.replace(/[\t\n\r]/g,"");l.length>=2&&(l.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",i=!0):u.length!==l.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",i=!0))}let c=e.match(ZFe);if(c){n.scheme=c[1],n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]);let u=eOe(n,c);if(u!==void 0&&(n.error=n.error||u,i=!0),n.host)if(zFe(n.host)===!1){let f=OFe(n.host);n.host=f.host.toLowerCase(),s=f.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=uX(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&VFe(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(d){n.error=n.error||"Host's domain name can not be converted to ASCII: "+d}if((!l||l&&!l.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=qFe(unescape(n.host),s))),n.path&&(n.path=HFe(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function Xx(e,t){return Kx(e,t).parsed}function tOe(e,t){return dX(e,t).normalized}function dX(e,t){let{parsed:r,malformedAuthorityOrPort:n}=Kx(e,t);return{normalized:n?e:Mf(r,t),malformedAuthorityOrPort:n}}function cX(e,t){if(typeof e=="string"){let{normalized:r,malformedAuthorityOrPort:n}=dX(e,t);return n?void 0:r}if(typeof e=="object")return Mf(e,t)}var EL={SCHEMES:GFe,normalize:WFe,resolve:YFe,resolveComponent:lX,equal:JFe,serialize:Mf,parse:Xx};eB.exports=EL;eB.exports.default=EL;eB.exports.fastUri=EL});var hX=B(CL=>{"use strict";Object.defineProperty(CL,"__esModule",{value:!0});var pX=fX();pX.code='require("ajv/dist/runtime/uri").default';CL.default=pX});var wX=B(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.CodeGen=xi.Name=xi.nil=xi.stringify=xi.str=xi._=xi.KeywordCxt=void 0;var rOe=Db();Object.defineProperty(xi,"KeywordCxt",{enumerable:!0,get:function(){return rOe.KeywordCxt}});var tg=qt();Object.defineProperty(xi,"_",{enumerable:!0,get:function(){return tg._}});Object.defineProperty(xi,"str",{enumerable:!0,get:function(){return tg.str}});Object.defineProperty(xi,"stringify",{enumerable:!0,get:function(){return tg.stringify}});Object.defineProperty(xi,"nil",{enumerable:!0,get:function(){return tg.nil}});Object.defineProperty(xi,"Name",{enumerable:!0,get:function(){return tg.Name}});Object.defineProperty(xi,"CodeGen",{enumerable:!0,get:function(){return tg.CodeGen}});var nOe=Gx(),bX=Nb(),iOe=YP(),Pb=Yx(),sOe=qt(),Lb=Tb(),tB=_b(),IL=gr(),AX=JK(),oOe=hX(),EX=(e,t)=>new RegExp(e,t);EX.code="new RegExp";var aOe=["removeAdditional","useDefaults","coerceTypes"],cOe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),uOe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},lOe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},gX=200;function dOe(e){var t,r,n,i,s,o,a,c,u,l,d,f,p,h,A,g,m,b,E,C,w,T,_,N,k;let v=e.strict,M=(t=e.code)===null||t===void 0?void 0:t.optimize,O=M===!0||M===void 0?1:M||0,S=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:EX,I=(i=e.uriResolver)!==null&&i!==void 0?i:oOe.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:v)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:v)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:v)!==null&&l!==void 0?l:"log",strictTuples:(f=(d=e.strictTuples)!==null&&d!==void 0?d:v)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=e.strictRequired)!==null&&p!==void 0?p:v)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:O,regExp:S}:{optimize:O,regExp:S},loopRequired:(A=e.loopRequired)!==null&&A!==void 0?A:gX,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:gX,meta:(m=e.meta)!==null&&m!==void 0?m:!0,messages:(b=e.messages)!==null&&b!==void 0?b:!0,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(T=e.validateSchema)!==null&&T!==void 0?T:!0,validateFormats:(_=e.validateFormats)!==null&&_!==void 0?_:!0,unicodeRegExp:(N=e.unicodeRegExp)!==null&&N!==void 0?N:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:I}}var Fb=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...dOe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new sOe.ValueScope({scope:{},prefixes:cOe,es5:r,lines:n}),this.logger=mOe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,iOe.getRules)(),mX.call(this,uOe,t,"NOT SUPPORTED"),mX.call(this,lOe,t,"DEPRECATED","warn"),this._metaOpts=AOe.call(this),t.formats&&pOe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&hOe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),fOe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=AX;n==="id"&&(i={...AX},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(l,d){await s.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||o.call(this,f)}async function s(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof bX.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),o.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await s.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let o of t)this.addSchema(o,void 0,n,i);return this}let s;if(typeof t=="object"){let{schemaId:o}=this.opts;if(s=t[o],s!==void 0&&typeof s!="string")throw new Error(`schema ${o} must be string`)}return r=(0,Lb.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(t){let r;for(;typeof(r=yX.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Pb.SchemaEnv({schema:{},schemaId:n});if(r=Pb.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=yX.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Lb.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(bOe.call(this,n,r),!r)return(0,IL.eachItem)(n,s=>wL.call(this,s)),this;COe.call(this,r);let i={...r,type:(0,tB.getJSONTypes)(r.type),schemaType:(0,tB.getJSONTypes)(r.schemaType)};return(0,IL.eachItem)(n,i.type.length===0?s=>wL.call(this,s,i):s=>i.type.forEach(o=>wL.call(this,s,i,o))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,s)=>i+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let s=i.split("/").slice(1),o=t;for(let a of s)o=o[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=o[a];u&&l&&(o[a]=CX(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof t=="object")o=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,Lb.normalizeId)(o||n);let u=Lb.getSchemaRefs.call(this,t,n);return c=new Pb.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Pb.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Pb.compileSchema.call(this,t)}finally{this.opts=r}}};Fb.ValidationError=nOe.default;Fb.MissingRefError=bX.default;xi.default=Fb;function mX(e,t,r,n="error"){for(let i in e){let s=i;s in t&&this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function yX(e){return e=(0,Lb.normalizeId)(e),this.schemas[e]||this.refs[e]}function fOe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function pOe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function hOe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function AOe(){let e={...this.opts};for(let t of aOe)delete e[t];return e}var gOe={log(){},warn(){},error(){}};function mOe(e){if(e===!1)return gOe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var yOe=/^[a-z_$][a-z0-9_$:-]*$/i;function bOe(e,t){let{RULES:r}=this;if((0,IL.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!yOe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function wL(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,tB.getJSONTypes)(t.type),schemaType:(0,tB.getJSONTypes)(t.schemaType)}};t.before?EOe.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function EOe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function COe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=CX(t)),e.validateSchema=this.compile(t,!0))}var wOe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function CX(e){return{anyOf:[e,wOe]}}});var IX=B(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var IOe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};SL.default=IOe});var BX=B(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.callRef=Pf.getValidate=void 0;var SOe=Nb(),SX=Fo(),Ls=qt(),rg=Cu(),vX=Yx(),rB=gr(),vOe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:c}=n,{root:u}=s;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=vX.resolveRef.call(c,u,i,r);if(l===void 0)throw new SOe.default(n.opts.uriResolver,i,r);if(l instanceof vX.SchemaEnv)return f(l);return p(l);function d(){if(s===u)return nB(e,o,s,s.$async);let h=t.scopeValue("root",{ref:u});return nB(e,(0,Ls._)`${h}.validate`,u,u.$async)}function f(h){let A=xX(e,h);nB(e,A,h,h.$async)}function p(h){let A=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,Ls.stringify)(h)}:{ref:h}),g=t.name("valid"),m=e.subschema({schema:h,dataTypes:[],schemaPath:Ls.nil,topSchemaRef:A,errSchemaPath:r},g);e.mergeEvaluated(m),e.ok(g)}}};function xX(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ls._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Pf.getValidate=xX;function nB(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:c}=s,u=c.passContext?rg.default.this:Ls.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=i.let("valid");i.try(()=>{i.code((0,Ls._)`await ${(0,SX.callValidateCode)(e,t,u)}`),p(t),o||i.assign(h,!0)},A=>{i.if((0,Ls._)`!(${A} instanceof ${s.ValidationError})`,()=>i.throw(A)),f(A),o||i.assign(h,!1)}),e.ok(h)}function d(){e.result((0,SX.callValidateCode)(e,t,u),()=>p(t),()=>f(t))}function f(h){let A=(0,Ls._)`${h}.errors`;i.assign(rg.default.vErrors,(0,Ls._)`${rg.default.vErrors} === null ? ${A} : ${rg.default.vErrors}.concat(${A})`),i.assign(rg.default.errors,(0,Ls._)`${rg.default.vErrors}.length`)}function p(h){var A;if(!s.opts.unevaluated)return;let g=(A=r?.validate)===null||A===void 0?void 0:A.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=rB.mergeEvaluated.props(i,g.props,s.props));else{let m=i.var("props",(0,Ls._)`${h}.evaluated.props`);s.props=rB.mergeEvaluated.props(i,m,s.props,Ls.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=rB.mergeEvaluated.items(i,g.items,s.items));else{let m=i.var("items",(0,Ls._)`${h}.evaluated.items`);s.items=rB.mergeEvaluated.items(i,m,s.items,Ls.Name)}}}Pf.callRef=nB;Pf.default=vOe});var kX=B(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});var xOe=IX(),BOe=BX(),kOe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",xOe.default,BOe.default];vL.default=kOe});var _X=B(xL=>{"use strict";Object.defineProperty(xL,"__esModule",{value:!0});var iB=qt(),jl=iB.operators,sB={maximum:{okStr:"<=",ok:jl.LTE,fail:jl.GT},minimum:{okStr:">=",ok:jl.GTE,fail:jl.LT},exclusiveMaximum:{okStr:"<",ok:jl.LT,fail:jl.GTE},exclusiveMinimum:{okStr:">",ok:jl.GT,fail:jl.LTE}},_Oe={message:({keyword:e,schemaCode:t})=>(0,iB.str)`must be ${sB[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,iB._)`{comparison: ${sB[e].okStr}, limit: ${t}}`},TOe={keyword:Object.keys(sB),type:"number",schemaType:"number",$data:!0,error:_Oe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,iB._)`${r} ${sB[t].fail} ${n} || isNaN(${r})`)}};xL.default=TOe});var TX=B(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});var Ob=qt(),ROe={message:({schemaCode:e})=>(0,Ob.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ob._)`{multipleOf: ${e}}`},QOe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ROe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,Ob._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Ob._)`${o} !== parseInt(${o})`;e.fail$data((0,Ob._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};BL.default=QOe});var QX=B(kL=>{"use strict";Object.defineProperty(kL,"__esModule",{value:!0});function RX(e){let t=e.length,r=0,n=0,i;for(;n=55296&&i<=56319&&n{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var Lf=qt(),DOe=gr(),NOe=QX(),MOe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Lf.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Lf._)`{limit: ${e}}`},POe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:MOe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Lf.operators.GT:Lf.operators.LT,o=i.opts.unicode===!1?(0,Lf._)`${r}.length`:(0,Lf._)`${(0,DOe.useFunc)(e.gen,NOe.default)}(${r})`;e.fail$data((0,Lf._)`${o} ${s} ${n}`)}};_L.default=POe});var NX=B(TL=>{"use strict";Object.defineProperty(TL,"__esModule",{value:!0});var LOe=Fo(),FOe=gr(),ng=qt(),OOe={message:({schemaCode:e})=>(0,ng.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,ng._)`{pattern: ${e}}`},UOe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:OOe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e,a=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,u=c.code==="new RegExp"?(0,ng._)`new RegExp`:(0,FOe.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,ng._)`${u}(${s}, ${a}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,ng._)`!${l}`)}else{let c=(0,LOe.usePattern)(e,i);e.fail$data((0,ng._)`!${c}.test(${r})`)}}};TL.default=UOe});var MX=B(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});var Ub=qt(),$Oe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ub.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ub._)`{limit: ${e}}`},HOe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:$Oe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ub.operators.GT:Ub.operators.LT;e.fail$data((0,Ub._)`Object.keys(${r}).length ${i} ${n}`)}};RL.default=HOe});var PX=B(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});var $b=Fo(),Hb=qt(),jOe=gr(),qOe={message:({params:{missingProperty:e}})=>(0,Hb.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Hb._)`{missingProperty: ${e}}`},zOe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:qOe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors?u():l(),a.strictRequired){let p=e.parentSchema.properties,{definedProperties:h}=e.it;for(let A of r)if(p?.[A]===void 0&&!h.has(A)){let g=o.schemaEnv.baseId+o.errSchemaPath,m=`required property "${A}" is not defined at "${g}" (strictRequired)`;(0,jOe.checkStrictMode)(o,m,o.opts.strictRequired)}}function u(){if(c||s)e.block$data(Hb.nil,d);else for(let p of r)(0,$b.checkReportMissingProp)(e,p)}function l(){let p=t.let("missing");if(c||s){let h=t.let("valid",!0);e.block$data(h,()=>f(p,h)),e.ok(h)}else t.if((0,$b.checkMissingProp)(e,r,p)),(0,$b.reportMissingProp)(e,p),t.else()}function d(){t.forOf("prop",n,p=>{e.setParams({missingProperty:p}),t.if((0,$b.noPropertyInData)(t,i,p,a.ownProperties),()=>e.error())})}function f(p,h){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(h,(0,$b.propertyInData)(t,i,p,a.ownProperties)),t.if((0,Hb.not)(h),()=>{e.error(),t.break()})},Hb.nil)}}};QL.default=zOe});var LX=B(DL=>{"use strict";Object.defineProperty(DL,"__esModule",{value:!0});var jb=qt(),VOe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,jb.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,jb._)`{limit: ${e}}`},GOe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:VOe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?jb.operators.GT:jb.operators.LT;e.fail$data((0,jb._)`${r}.length ${i} ${n}`)}};DL.default=GOe});var oB=B(NL=>{"use strict";Object.defineProperty(NL,"__esModule",{value:!0});var FX=nL();FX.code='require("ajv/dist/runtime/equal").default';NL.default=FX});var OX=B(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var ML=_b(),Bi=qt(),WOe=gr(),YOe=oB(),JOe={message:({params:{i:e,j:t}})=>(0,Bi.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Bi._)`{i: ${e}, j: ${t}}`},ZOe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:JOe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),u=s.items?(0,ML.getSchemaTypes)(s.items):[];e.block$data(c,l,(0,Bi._)`${o} === false`),e.ok(c);function l(){let h=t.let("i",(0,Bi._)`${r}.length`),A=t.let("j");e.setParams({i:h,j:A}),t.assign(c,!0),t.if((0,Bi._)`${h} > 1`,()=>(d()?f:p)(h,A))}function d(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function f(h,A){let g=t.name("item"),m=(0,ML.checkDataTypes)(u,g,a.opts.strictNumbers,ML.DataType.Wrong),b=t.const("indices",(0,Bi._)`{}`);t.for((0,Bi._)`;${h}--;`,()=>{t.let(g,(0,Bi._)`${r}[${h}]`),t.if(m,(0,Bi._)`continue`),u.length>1&&t.if((0,Bi._)`typeof ${g} == "string"`,(0,Bi._)`${g} += "_"`),t.if((0,Bi._)`typeof ${b}[${g}] == "number"`,()=>{t.assign(A,(0,Bi._)`${b}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,Bi._)`${b}[${g}] = ${h}`)})}function p(h,A){let g=(0,WOe.useFunc)(t,YOe.default),m=t.name("outer");t.label(m).for((0,Bi._)`;${h}--;`,()=>t.for((0,Bi._)`${A} = ${h}; ${A}--;`,()=>t.if((0,Bi._)`${g}(${r}[${h}], ${r}[${A}])`,()=>{e.error(),t.assign(c,!1).break(m)})))}}};PL.default=ZOe});var UX=B(FL=>{"use strict";Object.defineProperty(FL,"__esModule",{value:!0});var LL=qt(),KOe=gr(),XOe=oB(),e6e={message:"must be equal to constant",params:({schemaCode:e})=>(0,LL._)`{allowedValue: ${e}}`},t6e={keyword:"const",$data:!0,error:e6e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,LL._)`!${(0,KOe.useFunc)(t,XOe.default)}(${r}, ${i})`):e.fail((0,LL._)`${s} !== ${r}`)}};FL.default=t6e});var $X=B(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var qb=qt(),r6e=gr(),n6e=oB(),i6e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,qb._)`{allowedValues: ${e}}`},s6e={keyword:"enum",schemaType:"array",$data:!0,error:i6e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,c,u=()=>c??(c=(0,r6e.useFunc)(t,n6e.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=t.const("vSchema",s);l=(0,qb.or)(...i.map((h,A)=>f(p,A)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",s,p=>t.if((0,qb._)`${u()}(${r}, ${p})`,()=>t.assign(l,!0).break()))}function f(p,h){let A=i[h];return typeof A=="object"&&A!==null?(0,qb._)`${u()}(${r}, ${p}[${h}])`:(0,qb._)`${r} === ${A}`}}};OL.default=s6e});var HX=B(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});var o6e=_X(),a6e=TX(),c6e=DX(),u6e=NX(),l6e=MX(),d6e=PX(),f6e=LX(),p6e=OX(),h6e=UX(),A6e=$X(),g6e=[o6e.default,a6e.default,c6e.default,u6e.default,l6e.default,d6e.default,f6e.default,p6e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h6e.default,A6e.default];UL.default=g6e});var HL=B(zb=>{"use strict";Object.defineProperty(zb,"__esModule",{value:!0});zb.validateAdditionalItems=void 0;var Ff=qt(),$L=gr(),m6e={message:({params:{len:e}})=>(0,Ff.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ff._)`{limit: ${e}}`},y6e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:m6e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,$L.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}jX(e,n)}};function jX(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",(0,Ff._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Ff._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,$L.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,Ff._)`${a} <= ${t.length}`);r.if((0,Ff.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:$L.Type.Num},u),o.allErrors||r.if((0,Ff.not)(u),()=>r.break())})}}zb.validateAdditionalItems=jX;zb.default=y6e});var jL=B(Vb=>{"use strict";Object.defineProperty(Vb,"__esModule",{value:!0});Vb.validateTuple=void 0;var qX=qt(),aB=gr(),b6e=Fo(),E6e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return zX(e,"additionalItems",t);r.items=!0,!(0,aB.alwaysValidSchema)(r,t)&&e.ok((0,b6e.validateArray)(e))}};function zX(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;l(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=aB.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,qX._)`${s}.length`);r.forEach((d,f)=>{(0,aB.alwaysValidSchema)(a,d)||(n.if((0,qX._)`${u} > ${f}`,()=>e.subschema({keyword:o,schemaProp:f,dataProp:f},c)),e.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=a,h=r.length,A=h===d.minItems&&(h===d.maxItems||d[t]===!1);if(f.strictTuples&&!A){let g=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,aB.checkStrictMode)(a,g,f.strictTuples)}}}Vb.validateTuple=zX;Vb.default=E6e});var VX=B(qL=>{"use strict";Object.defineProperty(qL,"__esModule",{value:!0});var C6e=jL(),w6e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,C6e.validateTuple)(e,"items")};qL.default=w6e});var WX=B(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var GX=qt(),I6e=gr(),S6e=Fo(),v6e=HL(),x6e={message:({params:{len:e}})=>(0,GX.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,GX._)`{limit: ${e}}`},B6e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:x6e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,I6e.alwaysValidSchema)(n,t)&&(i?(0,v6e.validateAdditionalItems)(e,i):e.ok((0,S6e.validateArray)(e)))}};zL.default=B6e});var YX=B(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});var Uo=qt(),cB=gr(),k6e={message:({params:{min:e,max:t}})=>t===void 0?(0,Uo.str)`must contain at least ${e} valid item(s)`:(0,Uo.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Uo._)`{minContains: ${e}}`:(0,Uo._)`{minContains: ${e}, maxContains: ${t}}`},_6e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:k6e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:c,maxContains:u}=n;s.opts.next?(o=c===void 0?1:c,a=u):o=1;let l=t.const("len",(0,Uo._)`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,cB.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,cB.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,cB.alwaysValidSchema)(s,r)){let A=(0,Uo._)`${l} >= ${o}`;a!==void 0&&(A=(0,Uo._)`${A} && ${l} <= ${a}`),e.pass(A);return}s.items=!0;let d=t.name("valid");a===void 0&&o===1?p(d,()=>t.if(d,()=>t.break())):o===0?(t.let(d,!0),a!==void 0&&t.if((0,Uo._)`${i}.length > 0`,f)):(t.let(d,!1),f()),e.result(d,()=>e.reset());function f(){let A=t.name("_valid"),g=t.let("count",0);p(A,()=>t.if(A,()=>h(g)))}function p(A,g){t.forRange("i",0,l,m=>{e.subschema({keyword:"contains",dataProp:m,dataPropType:cB.Type.Num,compositeRule:!0},A),g()})}function h(A){t.code((0,Uo._)`${A}++`),a===void 0?t.if((0,Uo._)`${A} >= ${o}`,()=>t.assign(d,!0).break()):(t.if((0,Uo._)`${A} > ${a}`,()=>t.assign(d,!1).break()),o===1?t.assign(d,!0):t.if((0,Uo._)`${A} >= ${o}`,()=>t.assign(d,!0)))}}};VL.default=_6e});var KX=B(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.validateSchemaDeps=bc.validatePropertyDeps=bc.error=void 0;var GL=qt(),T6e=gr(),Gb=Fo();bc.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,GL.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,GL._)`{property: ${e}, +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let a=o[1];if(t===o[0]){s(o);continue}if(e.external){let u=e.external.registry.get(o[0])?.id;if(t!==o[0]&&u){s(o);continue}}if(e.metadataRegistry.get(o[0])?.id){s(o);continue}if(a.cycle){s(o);continue}if(a.count>1&&e.reused==="ref"){s(o);continue}}}function Ml(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=o=>{let a=e.seen.get(o);if(a.ref===null)return;let c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){n(l);let f=e.seen.get(l),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,u),o._zod.parent===l)for(let A in c)A==="$ref"||A==="allOf"||A in u||delete c[A];if(p.$ref&&f.def)for(let A in c)A==="$ref"||A==="allOf"||A in f.def&&JSON.stringify(c[A])===JSON.stringify(f.def[A])&&delete c[A]}let d=o._zod.parent;if(d&&d!==l){n(d);let f=e.seen.get(d);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let p in c)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(c[p])===JSON.stringify(f.def[p])&&delete c[p]}e.override({zodSchema:o,jsonSchema:c,path:a.path??[]})};for(let o of[...e.seen.entries()].reverse())n(o[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(o)}Object.assign(i,r.def??r.schema);let s=e.external?.defs??{};for(let o of e.seen.entries()){let a=o[1];a.def&&a.defId&&(s[a.defId]=a.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:FA(t,"input",e.processors),output:FA(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function ds(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ds(n.element,r);if(n.type==="set")return ds(n.valueType,r);if(n.type==="lazy")return ds(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ds(n.innerType,r);if(n.type==="intersection")return ds(n.left,r)||ds(n.right,r);if(n.type==="record"||n.type==="map")return ds(n.keyType,r)||ds(n.valueType,r);if(n.type==="pipe")return ds(n.in,r)||ds(n.out,r);if(n.type==="object"){for(let i in n.shape)if(ds(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(ds(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(ds(i,r))return!0;return!!(n.rest&&ds(n.rest,r))}return!1}var SM,FA,Yy=N(()=>{Iy();SM=(e,t={})=>r=>{let n=Dl({...r,processors:t});return Nr(e,n),Nl(n,e),Ml(n,e)},FA=(e,t,r={})=>n=>{let{libraryOptions:i,target:s}=n??{},o=Dl({...i??{},target:s,io:t,processors:r});return Nr(e,o),Nl(o,e),Ml(o,e)}});function OA(e,t){if("_idmap"in e){let n=e,i=Dl({...t,processors:Uv}),s={};for(let c of n._idmap.entries()){let[u,l]=c;Nr(l,i)}let o={},a={registry:n,uri:t?.uri,defs:s};i.external=a;for(let c of n._idmap.entries()){let[u,l]=c;Nl(i,l),o[u]=Ml(i,l)}if(Object.keys(s).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[c]:s}}return{schemas:o}}let r=Dl({...t,processors:Uv});return Nr(e,r),Nl(r,e),Ml(r,e)}var sMe,vM,xM,BM,kM,_M,TM,RM,QM,DM,NM,MM,PM,LM,FM,OM,UM,$M,HM,jM,qM,zM,VM,GM,WM,YM,$v,JM,ZM,KM,XM,e4,t4,r4,n4,i4,s4,o4,Hv,a4,Uv,UA=N(()=>{Yy();ot();sMe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vM=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:s,maximum:o,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=sMe[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},xM=(e,t,r,n)=>{let i=r,{minimum:s,maximum:o,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof s=="number"&&(i.minimum=s,typeof l=="number"&&t.target!=="draft-04"&&(l>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof o=="number"&&(i.maximum=o,typeof u=="number"&&t.target!=="draft-04"&&(u<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},BM=(e,t,r,n)=>{r.type="boolean"},kM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},_M=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},TM=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},RM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},QM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},DM=(e,t,r,n)=>{r.not={}},NM=(e,t,r,n)=>{},MM=(e,t,r,n)=>{},PM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},LM=(e,t,r,n)=>{let i=e._zod.def,s=cy(i.entries);s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),r.enum=s},FM=(e,t,r,n)=>{let i=e._zod.def,s=[];for(let o of i.values)if(o===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(o))}else s.push(o);if(s.length!==0)if(s.length===1){let o=s[0];r.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[o]:r.const=o}else s.every(o=>typeof o=="number")&&(r.type="number"),s.every(o=>typeof o=="string")&&(r.type="string"),s.every(o=>typeof o=="boolean")&&(r.type="boolean"),s.every(o=>o===null)&&(r.type="null"),r.enum=s},OM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},UM=(e,t,r,n)=>{let i=r,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=s.source},$M=(e,t,r,n)=>{let i=r,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:a,mime:c}=e._zod.bag;o!==void 0&&(s.minLength=o),a!==void 0&&(s.maxLength=a),c?c.length===1?(s.contentMediaType=c[0],Object.assign(i,s)):(Object.assign(i,s),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,s)},HM=(e,t,r,n)=>{r.type="boolean"},jM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},qM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},zM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},VM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},GM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},WM=(e,t,r,n)=>{let i=r,s=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Nr(s.element,t,{...n,path:[...n.path,"items"]})},YM=(e,t,r,n)=>{let i=r,s=e._zod.def;i.type="object",i.properties={};let o=s.shape;for(let u in o)i.properties[u]=Nr(o[u],t,{...n,path:[...n.path,"properties",u]});let a=new Set(Object.keys(o)),c=new Set([...a].filter(u=>{let l=s.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Nr(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},$v=(e,t,r,n)=>{let i=e._zod.def,s=i.inclusive===!1,o=i.options.map((a,c)=>Nr(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=o:r.anyOf=o},JM=(e,t,r,n)=>{let i=e._zod.def,s=Nr(i.left,t,{...n,path:[...n.path,"allOf",0]}),o=Nr(i.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];r.allOf=c},ZM=(e,t,r,n)=>{let i=r,s=e._zod.def;i.type="array";let o=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=s.items.map((f,p)=>Nr(f,t,{...n,path:[...n.path,o,p]})),u=s.rest?Nr(s.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)},KM=(e,t,r,n)=>{let i=r,s=e._zod.def;i.type="object";let o=s.keyType,c=o._zod.bag?.patterns;if(s.mode==="loose"&&c&&c.size>0){let l=Nr(s.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Nr(s.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Nr(s.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let u=o._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}},XM=(e,t,r,n)=>{let i=e._zod.def,s=Nr(i.innerType,t,n),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},e4=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType},t4=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},r4=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},n4=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},i4=(e,t,r,n)=>{let i=e._zod.def,s=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Nr(s,t,n);let o=t.seen.get(e);o.ref=s},s4=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType,r.readOnly=!0},o4=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType},Hv=(e,t,r,n)=>{let i=e._zod.def;Nr(i.innerType,t,n);let s=t.seen.get(e);s.ref=i.innerType},a4=(e,t,r,n)=>{let i=e._zod.innerType;Nr(i,t,n);let s=t.seen.get(e);s.ref=i},Uv={string:vM,number:xM,boolean:BM,bigint:kM,symbol:_M,null:TM,undefined:RM,void:QM,never:DM,any:NM,unknown:MM,date:PM,enum:LM,literal:FM,nan:OM,template_literal:UM,file:$M,success:HM,custom:jM,function:qM,transform:zM,map:VM,set:GM,array:WM,object:YM,union:$v,intersection:JM,tuple:ZM,record:KM,nullable:XM,nonoptional:e4,default:t4,prefault:r4,catch:n4,pipe:i4,readonly:s4,promise:o4,optional:Hv,lazy:a4}});var jv,SJ=N(()=>{UA();Yy();jv=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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Dl({processors:Uv,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Nr(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Nl(this.ctx,t);let n=Ml(this.ctx,t),{"~standard":i,...s}=n;return s}}});var vJ={};var xJ=N(()=>{});var lo={};Yt(lo,{$ZodAny:()=>yS,$ZodArray:()=>IS,$ZodAsyncError:()=>Na,$ZodBase64:()=>cS,$ZodBase64URL:()=>uS,$ZodBigInt:()=>yy,$ZodBigIntFormat:()=>hS,$ZodBoolean:()=>TA,$ZodCIDRv4:()=>oS,$ZodCIDRv6:()=>aS,$ZodCUID:()=>W1,$ZodCUID2:()=>Y1,$ZodCatch:()=>US,$ZodCheck:()=>zr,$ZodCheckBigIntFormat:()=>JN,$ZodCheckEndsWith:()=>cM,$ZodCheckGreaterThan:()=>M1,$ZodCheckIncludes:()=>oM,$ZodCheckLengthEquals:()=>rM,$ZodCheckLessThan:()=>N1,$ZodCheckLowerCase:()=>iM,$ZodCheckMaxLength:()=>eM,$ZodCheckMaxSize:()=>ZN,$ZodCheckMimeType:()=>lM,$ZodCheckMinLength:()=>tM,$ZodCheckMinSize:()=>KN,$ZodCheckMultipleOf:()=>WN,$ZodCheckNumberFormat:()=>YN,$ZodCheckOverwrite:()=>dM,$ZodCheckProperty:()=>uM,$ZodCheckRegex:()=>nM,$ZodCheckSizeEquals:()=>XN,$ZodCheckStartsWith:()=>aM,$ZodCheckStringFormat:()=>_A,$ZodCheckUpperCase:()=>sM,$ZodCodec:()=>QA,$ZodCustom:()=>WS,$ZodCustomStringFormat:()=>fS,$ZodDate:()=>wS,$ZodDefault:()=>PS,$ZodDiscriminatedUnion:()=>vS,$ZodE164:()=>lS,$ZodEmail:()=>q1,$ZodEmoji:()=>V1,$ZodEncodeError:()=>Sl,$ZodEnum:()=>TS,$ZodError:()=>py,$ZodExactOptional:()=>NS,$ZodFile:()=>QS,$ZodFunction:()=>zS,$ZodGUID:()=>H1,$ZodIPv4:()=>nS,$ZodIPv6:()=>iS,$ZodISODate:()=>eS,$ZodISODateTime:()=>X1,$ZodISODuration:()=>rS,$ZodISOTime:()=>tS,$ZodIntersection:()=>xS,$ZodJWT:()=>dS,$ZodKSUID:()=>K1,$ZodLazy:()=>GS,$ZodLiteral:()=>RS,$ZodMAC:()=>sS,$ZodMap:()=>kS,$ZodNaN:()=>$S,$ZodNanoID:()=>G1,$ZodNever:()=>ES,$ZodNonOptional:()=>FS,$ZodNull:()=>mS,$ZodNullable:()=>MS,$ZodNumber:()=>my,$ZodNumberFormat:()=>pS,$ZodObject:()=>mM,$ZodObjectJIT:()=>yM,$ZodOptional:()=>Ey,$ZodPipe:()=>HS,$ZodPrefault:()=>LS,$ZodPromise:()=>VS,$ZodReadonly:()=>jS,$ZodRealError:()=>Rs,$ZodRecord:()=>BS,$ZodRegistry:()=>XS,$ZodSet:()=>_S,$ZodString:()=>_l,$ZodStringFormat:()=>Lr,$ZodSuccess:()=>OS,$ZodSymbol:()=>AS,$ZodTemplateLiteral:()=>qS,$ZodTransform:()=>DS,$ZodTuple:()=>by,$ZodType:()=>Tt,$ZodULID:()=>J1,$ZodURL:()=>z1,$ZodUUID:()=>j1,$ZodUndefined:()=>gS,$ZodUnion:()=>RA,$ZodUnknown:()=>bS,$ZodVoid:()=>CS,$ZodXID:()=>Z1,$ZodXor:()=>SS,$brand:()=>oy,$constructor:()=>q,$input:()=>tv,$output:()=>ev,Doc:()=>gy,JSONSchema:()=>vJ,JSONSchemaGenerator:()=>jv,NEVER:()=>m1,TimePrecision:()=>sv,_any:()=>xv,_array:()=>IM,_base64:()=>Uy,_base64url:()=>$y,_bigint:()=>bv,_boolean:()=>mv,_catch:()=>XNe,_check:()=>wJ,_cidrv4:()=>Fy,_cidrv6:()=>Oy,_coercedBigint:()=>Ev,_coercedBoolean:()=>yv,_coercedDate:()=>Rv,_coercedNumber:()=>dv,_coercedString:()=>nv,_cuid:()=>Ry,_cuid2:()=>Qy,_custom:()=>Nv,_date:()=>Tv,_decode:()=>S1,_decodeAsync:()=>x1,_default:()=>JNe,_discriminatedUnion:()=>FNe,_e164:()=>Hy,_email:()=>Sy,_emoji:()=>_y,_encode:()=>I1,_encodeAsync:()=>v1,_endsWith:()=>vf,_enum:()=>qNe,_file:()=>Dv,_float32:()=>pv,_float64:()=>hv,_gt:()=>Pa,_gte:()=>Ci,_guid:()=>MA,_includes:()=>If,_int:()=>fv,_int32:()=>Av,_int64:()=>Cv,_intersection:()=>ONe,_ipv4:()=>Py,_ipv6:()=>Ly,_isoDate:()=>av,_isoDateTime:()=>ov,_isoDuration:()=>uv,_isoTime:()=>cv,_jwt:()=>jy,_ksuid:()=>My,_lazy:()=>nMe,_length:()=>Ql,_literal:()=>VNe,_lowercase:()=>Cf,_lt:()=>Ma,_lte:()=>ls,_mac:()=>iv,_map:()=>HNe,_max:()=>ls,_maxLength:()=>Rl,_maxSize:()=>yu,_mime:()=>xf,_min:()=>Ci,_minLength:()=>mc,_minSize:()=>La,_multipleOf:()=>mu,_nan:()=>Qv,_nanoid:()=>Ty,_nativeEnum:()=>zNe,_negative:()=>zy,_never:()=>kv,_nonnegative:()=>Gy,_nonoptional:()=>ZNe,_nonpositive:()=>Vy,_normalize:()=>Bf,_null:()=>vv,_nullable:()=>YNe,_number:()=>lv,_optional:()=>WNe,_overwrite:()=>Mo,_parse:()=>wA,_parseAsync:()=>SA,_pipe:()=>eMe,_positive:()=>qy,_promise:()=>iMe,_property:()=>Wy,_readonly:()=>tMe,_record:()=>$Ne,_refine:()=>Mv,_regex:()=>Ef,_safeDecode:()=>k1,_safeDecodeAsync:()=>T1,_safeEncode:()=>B1,_safeEncodeAsync:()=>_1,_safeParse:()=>xA,_safeParseAsync:()=>BA,_set:()=>jNe,_size:()=>Tl,_slugify:()=>LA,_startsWith:()=>Sf,_string:()=>rv,_stringFormat:()=>Rf,_stringbool:()=>Ov,_success:()=>KNe,_superRefine:()=>Pv,_symbol:()=>Iv,_templateLiteral:()=>rMe,_toLowerCase:()=>_f,_toUpperCase:()=>Tf,_transform:()=>GNe,_trim:()=>kf,_tuple:()=>UNe,_uint32:()=>gv,_uint64:()=>wv,_ulid:()=>Dy,_undefined:()=>Sv,_union:()=>PNe,_unknown:()=>Bv,_uppercase:()=>wf,_url:()=>PA,_uuid:()=>vy,_uuidv4:()=>xy,_uuidv6:()=>By,_uuidv7:()=>ky,_void:()=>_v,_xid:()=>Ny,_xor:()=>LNe,clone:()=>Ei,config:()=>xn,createStandardJSONSchemaMethod:()=>FA,createToJSONSchemaMethod:()=>SM,decode:()=>sW,decodeAsync:()=>aW,describe:()=>Lv,encode:()=>iW,encodeAsync:()=>oW,extractDefs:()=>Nl,finalize:()=>Ml,flattenError:()=>EA,formatError:()=>CA,globalConfig:()=>sy,globalRegistry:()=>ii,initializeContext:()=>Dl,isValidBase64:()=>gM,isValidBase64URL:()=>_W,isValidJWT:()=>TW,locales:()=>NA,meta:()=>Fv,parse:()=>IA,parseAsync:()=>vA,prettifyError:()=>w1,process:()=>Nr,regexes:()=>Qs,registry:()=>wy,safeDecode:()=>uW,safeDecodeAsync:()=>dW,safeEncode:()=>cW,safeEncodeAsync:()=>lW,safeParse:()=>yf,safeParseAsync:()=>kA,toDotPath:()=>nW,toJSONSchema:()=>OA,treeifyError:()=>C1,util:()=>Ee,version:()=>pM});var Ln=N(()=>{gA();bN();yN();bM();P1();hM();ot();D1();KS();Iy();fM();IJ();Yy();UA();SJ();xJ()});var Gv={};Yt(Gv,{endsWith:()=>vf,gt:()=>Pa,gte:()=>Ci,includes:()=>If,length:()=>Ql,lowercase:()=>Cf,lt:()=>Ma,lte:()=>ls,maxLength:()=>Rl,maxSize:()=>yu,mime:()=>xf,minLength:()=>mc,minSize:()=>La,multipleOf:()=>mu,negative:()=>zy,nonnegative:()=>Gy,nonpositive:()=>Vy,normalize:()=>Bf,overwrite:()=>Mo,positive:()=>qy,property:()=>Wy,regex:()=>Ef,size:()=>Tl,slugify:()=>LA,startsWith:()=>Sf,toLowerCase:()=>_f,toUpperCase:()=>Tf,trim:()=>kf,uppercase:()=>wf});var Wv=N(()=>{Ln()});var Ll={};Yt(Ll,{ZodISODate:()=>Jv,ZodISODateTime:()=>Yv,ZodISODuration:()=>Kv,ZodISOTime:()=>Zv,date:()=>u4,datetime:()=>c4,duration:()=>d4,time:()=>l4});function c4(e){return ov(Yv,e)}function u4(e){return av(Jv,e)}function l4(e){return cv(Zv,e)}function d4(e){return uv(Kv,e)}var Yv,Jv,Zv,Kv,Jy=N(()=>{Ln();Ky();Yv=q("ZodISODateTime",(e,t)=>{X1.init(e,t),Vr.init(e,t)});Jv=q("ZodISODate",(e,t)=>{eS.init(e,t),Vr.init(e,t)});Zv=q("ZodISOTime",(e,t)=>{tS.init(e,t),Vr.init(e,t)});Kv=q("ZodISODuration",(e,t)=>{rS.init(e,t),Vr.init(e,t)})});var _J,dMe,Ds,f4=N(()=>{Ln();Ln();ot();_J=(e,t)=>{py.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>CA(e,r)},flatten:{value:r=>EA(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,mA,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,mA,2)}},isEmpty:{get(){return e.issues.length===0}}})},dMe=q("ZodError",_J),Ds=q("ZodError",_J,{Parent:Error})});var p4,h4,A4,g4,m4,y4,b4,E4,C4,w4,I4,S4,v4=N(()=>{Ln();f4();p4=wA(Ds),h4=SA(Ds),A4=xA(Ds),g4=BA(Ds),m4=I1(Ds),y4=S1(Ds),b4=v1(Ds),E4=x1(Ds),C4=B1(Ds),w4=k1(Ds),I4=_1(Ds),S4=T1(Ds)});var Zy={};Yt(Zy,{ZodAny:()=>T4,ZodArray:()=>N4,ZodBase64:()=>px,ZodBase64URL:()=>hx,ZodBigInt:()=>VA,ZodBigIntFormat:()=>mx,ZodBoolean:()=>zA,ZodCIDRv4:()=>dx,ZodCIDRv6:()=>fx,ZodCUID:()=>ix,ZodCUID2:()=>sx,ZodCatch:()=>eP,ZodCodec:()=>Ix,ZodCustom:()=>ub,ZodCustomStringFormat:()=>jA,ZodDate:()=>ib,ZodDefault:()=>W4,ZodDiscriminatedUnion:()=>P4,ZodE164:()=>Ax,ZodEmail:()=>tx,ZodEmoji:()=>rx,ZodEnum:()=>$A,ZodExactOptional:()=>z4,ZodFile:()=>j4,ZodFunction:()=>uP,ZodGUID:()=>Xy,ZodIPv4:()=>ux,ZodIPv6:()=>lx,ZodIntersection:()=>L4,ZodJWT:()=>gx,ZodKSUID:()=>cx,ZodLazy:()=>oP,ZodLiteral:()=>H4,ZodMAC:()=>x4,ZodMap:()=>U4,ZodNaN:()=>rP,ZodNanoID:()=>nx,ZodNever:()=>Q4,ZodNonOptional:()=>Cx,ZodNull:()=>_4,ZodNullable:()=>G4,ZodNumber:()=>qA,ZodNumberFormat:()=>Qf,ZodObject:()=>sb,ZodOptional:()=>Ex,ZodPipe:()=>wx,ZodPrefault:()=>J4,ZodPromise:()=>cP,ZodReadonly:()=>nP,ZodRecord:()=>cb,ZodSet:()=>$4,ZodString:()=>HA,ZodStringFormat:()=>Vr,ZodSuccess:()=>X4,ZodSymbol:()=>B4,ZodTemplateLiteral:()=>sP,ZodTransform:()=>q4,ZodTuple:()=>F4,ZodType:()=>$t,ZodULID:()=>ox,ZodURL:()=>rb,ZodUUID:()=>yc,ZodUndefined:()=>k4,ZodUnion:()=>ob,ZodUnknown:()=>R4,ZodVoid:()=>D4,ZodXID:()=>ax,ZodXor:()=>M4,_ZodString:()=>ex,_default:()=>Y4,_function:()=>RZ,any:()=>pZ,array:()=>Zt,base64:()=>JJ,base64url:()=>ZJ,bigint:()=>cZ,boolean:()=>Fn,catch:()=>tP,check:()=>QZ,cidrv4:()=>WJ,cidrv6:()=>YJ,codec:()=>kZ,cuid:()=>UJ,cuid2:()=>$J,custom:()=>Sx,date:()=>AZ,describe:()=>DZ,discriminatedUnion:()=>ab,e164:()=>KJ,email:()=>TJ,emoji:()=>FJ,enum:()=>Ii,exactOptional:()=>V4,file:()=>SZ,float32:()=>iZ,float64:()=>sZ,function:()=>RZ,guid:()=>RJ,hash:()=>nZ,hex:()=>rZ,hostname:()=>tZ,httpUrl:()=>LJ,instanceof:()=>MZ,int:()=>Xv,int32:()=>oZ,int64:()=>uZ,intersection:()=>GA,ipv4:()=>zJ,ipv6:()=>GJ,json:()=>LZ,jwt:()=>XJ,keyof:()=>gZ,ksuid:()=>qJ,lazy:()=>aP,literal:()=>st,looseObject:()=>wi,looseRecord:()=>EZ,mac:()=>VJ,map:()=>CZ,meta:()=>NZ,nan:()=>BZ,nanoid:()=>OJ,nativeEnum:()=>IZ,never:()=>yx,nonoptional:()=>K4,null:()=>nb,nullable:()=>eb,nullish:()=>vZ,number:()=>Sr,object:()=>Ue,optional:()=>en,partialRecord:()=>bZ,pipe:()=>tb,prefault:()=>Z4,preprocess:()=>lb,promise:()=>TZ,readonly:()=>iP,record:()=>Fr,refine:()=>lP,set:()=>wZ,strictObject:()=>mZ,string:()=>re,stringFormat:()=>eZ,stringbool:()=>PZ,success:()=>xZ,superRefine:()=>dP,symbol:()=>dZ,templateLiteral:()=>_Z,transform:()=>bx,tuple:()=>O4,uint32:()=>aZ,uint64:()=>lZ,ulid:()=>HJ,undefined:()=>fZ,union:()=>Wr,unknown:()=>Gr,url:()=>PJ,uuid:()=>QJ,uuidv4:()=>DJ,uuidv6:()=>NJ,uuidv7:()=>MJ,void:()=>hZ,xid:()=>jJ,xor:()=>yZ});function re(e){return rv(HA,e)}function TJ(e){return Sy(tx,e)}function RJ(e){return MA(Xy,e)}function QJ(e){return vy(yc,e)}function DJ(e){return xy(yc,e)}function NJ(e){return By(yc,e)}function MJ(e){return ky(yc,e)}function PJ(e){return PA(rb,e)}function LJ(e){return PA(rb,{protocol:/^https?$/,hostname:Qs.domain,...Ee.normalizeParams(e)})}function FJ(e){return _y(rx,e)}function OJ(e){return Ty(nx,e)}function UJ(e){return Ry(ix,e)}function $J(e){return Qy(sx,e)}function HJ(e){return Dy(ox,e)}function jJ(e){return Ny(ax,e)}function qJ(e){return My(cx,e)}function zJ(e){return Py(ux,e)}function VJ(e){return iv(x4,e)}function GJ(e){return Ly(lx,e)}function WJ(e){return Fy(dx,e)}function YJ(e){return Oy(fx,e)}function JJ(e){return Uy(px,e)}function ZJ(e){return $y(hx,e)}function KJ(e){return Hy(Ax,e)}function XJ(e){return jy(gx,e)}function eZ(e,t,r={}){return Rf(jA,e,t,r)}function tZ(e){return Rf(jA,"hostname",Qs.hostname,e)}function rZ(e){return Rf(jA,"hex",Qs.hex,e)}function nZ(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=Qs[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Rf(jA,n,i,t)}function Sr(e){return lv(qA,e)}function Xv(e){return fv(Qf,e)}function iZ(e){return pv(Qf,e)}function sZ(e){return hv(Qf,e)}function oZ(e){return Av(Qf,e)}function aZ(e){return gv(Qf,e)}function Fn(e){return mv(zA,e)}function cZ(e){return bv(VA,e)}function uZ(e){return Cv(mx,e)}function lZ(e){return wv(mx,e)}function dZ(e){return Iv(B4,e)}function fZ(e){return Sv(k4,e)}function nb(e){return vv(_4,e)}function pZ(){return xv(T4)}function Gr(){return Bv(R4)}function yx(e){return kv(Q4,e)}function hZ(e){return _v(D4,e)}function AZ(e){return Tv(ib,e)}function Zt(e,t){return IM(N4,e,t)}function gZ(e){let t=e._zod.def.shape;return Ii(Object.keys(t))}function Ue(e,t){let r={type:"object",shape:e??{},...Ee.normalizeParams(t)};return new sb(r)}function mZ(e,t){return new sb({type:"object",shape:e,catchall:yx(),...Ee.normalizeParams(t)})}function wi(e,t){return new sb({type:"object",shape:e,catchall:Gr(),...Ee.normalizeParams(t)})}function Wr(e,t){return new ob({type:"union",options:e,...Ee.normalizeParams(t)})}function yZ(e,t){return new M4({type:"union",options:e,inclusive:!1,...Ee.normalizeParams(t)})}function ab(e,t,r){return new P4({type:"union",options:t,discriminator:e,...Ee.normalizeParams(r)})}function GA(e,t){return new L4({type:"intersection",left:e,right:t})}function O4(e,t,r){let n=t instanceof Tt,i=n?r:t,s=n?t:null;return new F4({type:"tuple",items:e,rest:s,...Ee.normalizeParams(i)})}function Fr(e,t,r){return new cb({type:"record",keyType:e,valueType:t,...Ee.normalizeParams(r)})}function bZ(e,t,r){let n=Ei(e);return n._zod.values=void 0,new cb({type:"record",keyType:n,valueType:t,...Ee.normalizeParams(r)})}function EZ(e,t,r){return new cb({type:"record",keyType:e,valueType:t,mode:"loose",...Ee.normalizeParams(r)})}function CZ(e,t,r){return new U4({type:"map",keyType:e,valueType:t,...Ee.normalizeParams(r)})}function wZ(e,t){return new $4({type:"set",valueType:e,...Ee.normalizeParams(t)})}function Ii(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new $A({type:"enum",entries:r,...Ee.normalizeParams(t)})}function IZ(e,t){return new $A({type:"enum",entries:e,...Ee.normalizeParams(t)})}function st(e,t){return new H4({type:"literal",values:Array.isArray(e)?e:[e],...Ee.normalizeParams(t)})}function SZ(e){return Dv(j4,e)}function bx(e){return new q4({type:"transform",transform:e})}function en(e){return new Ex({type:"optional",innerType:e})}function V4(e){return new z4({type:"optional",innerType:e})}function eb(e){return new G4({type:"nullable",innerType:e})}function vZ(e){return en(eb(e))}function Y4(e,t){return new W4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ee.shallowClone(t)}})}function Z4(e,t){return new J4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ee.shallowClone(t)}})}function K4(e,t){return new Cx({type:"nonoptional",innerType:e,...Ee.normalizeParams(t)})}function xZ(e){return new X4({type:"success",innerType:e})}function tP(e,t){return new eP({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function BZ(e){return Qv(rP,e)}function tb(e,t){return new wx({type:"pipe",in:e,out:t})}function kZ(e,t,r){return new Ix({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function iP(e){return new nP({type:"readonly",innerType:e})}function _Z(e,t){return new sP({type:"template_literal",parts:e,...Ee.normalizeParams(t)})}function aP(e){return new oP({type:"lazy",getter:e})}function TZ(e){return new cP({type:"promise",innerType:e})}function RZ(e){return new uP({type:"function",input:Array.isArray(e?.input)?O4(e?.input):e?.input??Zt(Gr()),output:e?.output??Gr()})}function QZ(e){let t=new zr({check:"custom"});return t._zod.check=e,t}function Sx(e,t){return Nv(ub,e??(()=>!0),t)}function lP(e,t={}){return Mv(ub,e,t)}function dP(e){return Pv(e)}function MZ(e,t={}){let r=new ub({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Ee.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function LZ(e){let t=aP(()=>Wr([re(e),Sr(),Fn(),nb(),Zt(t),Fr(re(),t)]));return t}function lb(e,t){return tb(bx(e),t)}var $t,ex,HA,Vr,tx,Xy,yc,rb,rx,nx,ix,sx,ox,ax,cx,ux,x4,lx,dx,fx,px,hx,Ax,gx,jA,qA,Qf,zA,VA,mx,B4,k4,_4,T4,R4,Q4,D4,ib,N4,sb,ob,M4,P4,L4,F4,cb,U4,$4,$A,H4,j4,q4,Ex,z4,G4,W4,J4,Cx,X4,eP,rP,wx,Ix,nP,sP,oP,cP,uP,ub,DZ,NZ,PZ,Ky=N(()=>{Ln();Ln();UA();Yy();Wv();Jy();v4();$t=q("ZodType",(e,t)=>(Tt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:FA(e,"input"),output:FA(e,"output")}}),e.toJSONSchema=SM(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ee.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>Ei(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>p4(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>A4(e,r,n),e.parseAsync=async(r,n)=>h4(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>g4(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>m4(e,r,n),e.decode=(r,n)=>y4(e,r,n),e.encodeAsync=async(r,n)=>b4(e,r,n),e.decodeAsync=async(r,n)=>E4(e,r,n),e.safeEncode=(r,n)=>C4(e,r,n),e.safeDecode=(r,n)=>w4(e,r,n),e.safeEncodeAsync=async(r,n)=>I4(e,r,n),e.safeDecodeAsync=async(r,n)=>S4(e,r,n),e.refine=(r,n)=>e.check(lP(r,n)),e.superRefine=r=>e.check(dP(r)),e.overwrite=r=>e.check(Mo(r)),e.optional=()=>en(e),e.exactOptional=()=>V4(e),e.nullable=()=>eb(e),e.nullish=()=>en(eb(e)),e.nonoptional=r=>K4(e,r),e.array=()=>Zt(e),e.or=r=>Wr([e,r]),e.and=r=>GA(e,r),e.transform=r=>tb(e,bx(r)),e.default=r=>Y4(e,r),e.prefault=r=>Z4(e,r),e.catch=r=>tP(e,r),e.pipe=r=>tb(e,r),e.readonly=()=>iP(e),e.describe=r=>{let n=e.clone();return ii.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return ii.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ii.get(e);let n=e.clone();return ii.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),ex=q("_ZodString",(e,t)=>{_l.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vM(e,n,i,s);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Ef(...n)),e.includes=(...n)=>e.check(If(...n)),e.startsWith=(...n)=>e.check(Sf(...n)),e.endsWith=(...n)=>e.check(vf(...n)),e.min=(...n)=>e.check(mc(...n)),e.max=(...n)=>e.check(Rl(...n)),e.length=(...n)=>e.check(Ql(...n)),e.nonempty=(...n)=>e.check(mc(1,...n)),e.lowercase=n=>e.check(Cf(n)),e.uppercase=n=>e.check(wf(n)),e.trim=()=>e.check(kf()),e.normalize=(...n)=>e.check(Bf(...n)),e.toLowerCase=()=>e.check(_f()),e.toUpperCase=()=>e.check(Tf()),e.slugify=()=>e.check(LA())}),HA=q("ZodString",(e,t)=>{_l.init(e,t),ex.init(e,t),e.email=r=>e.check(Sy(tx,r)),e.url=r=>e.check(PA(rb,r)),e.jwt=r=>e.check(jy(gx,r)),e.emoji=r=>e.check(_y(rx,r)),e.guid=r=>e.check(MA(Xy,r)),e.uuid=r=>e.check(vy(yc,r)),e.uuidv4=r=>e.check(xy(yc,r)),e.uuidv6=r=>e.check(By(yc,r)),e.uuidv7=r=>e.check(ky(yc,r)),e.nanoid=r=>e.check(Ty(nx,r)),e.guid=r=>e.check(MA(Xy,r)),e.cuid=r=>e.check(Ry(ix,r)),e.cuid2=r=>e.check(Qy(sx,r)),e.ulid=r=>e.check(Dy(ox,r)),e.base64=r=>e.check(Uy(px,r)),e.base64url=r=>e.check($y(hx,r)),e.xid=r=>e.check(Ny(ax,r)),e.ksuid=r=>e.check(My(cx,r)),e.ipv4=r=>e.check(Py(ux,r)),e.ipv6=r=>e.check(Ly(lx,r)),e.cidrv4=r=>e.check(Fy(dx,r)),e.cidrv6=r=>e.check(Oy(fx,r)),e.e164=r=>e.check(Hy(Ax,r)),e.datetime=r=>e.check(c4(r)),e.date=r=>e.check(u4(r)),e.time=r=>e.check(l4(r)),e.duration=r=>e.check(d4(r))});Vr=q("ZodStringFormat",(e,t)=>{Lr.init(e,t),ex.init(e,t)}),tx=q("ZodEmail",(e,t)=>{q1.init(e,t),Vr.init(e,t)});Xy=q("ZodGUID",(e,t)=>{H1.init(e,t),Vr.init(e,t)});yc=q("ZodUUID",(e,t)=>{j1.init(e,t),Vr.init(e,t)});rb=q("ZodURL",(e,t)=>{z1.init(e,t),Vr.init(e,t)});rx=q("ZodEmoji",(e,t)=>{V1.init(e,t),Vr.init(e,t)});nx=q("ZodNanoID",(e,t)=>{G1.init(e,t),Vr.init(e,t)});ix=q("ZodCUID",(e,t)=>{W1.init(e,t),Vr.init(e,t)});sx=q("ZodCUID2",(e,t)=>{Y1.init(e,t),Vr.init(e,t)});ox=q("ZodULID",(e,t)=>{J1.init(e,t),Vr.init(e,t)});ax=q("ZodXID",(e,t)=>{Z1.init(e,t),Vr.init(e,t)});cx=q("ZodKSUID",(e,t)=>{K1.init(e,t),Vr.init(e,t)});ux=q("ZodIPv4",(e,t)=>{nS.init(e,t),Vr.init(e,t)});x4=q("ZodMAC",(e,t)=>{sS.init(e,t),Vr.init(e,t)});lx=q("ZodIPv6",(e,t)=>{iS.init(e,t),Vr.init(e,t)});dx=q("ZodCIDRv4",(e,t)=>{oS.init(e,t),Vr.init(e,t)});fx=q("ZodCIDRv6",(e,t)=>{aS.init(e,t),Vr.init(e,t)});px=q("ZodBase64",(e,t)=>{cS.init(e,t),Vr.init(e,t)});hx=q("ZodBase64URL",(e,t)=>{uS.init(e,t),Vr.init(e,t)});Ax=q("ZodE164",(e,t)=>{lS.init(e,t),Vr.init(e,t)});gx=q("ZodJWT",(e,t)=>{dS.init(e,t),Vr.init(e,t)});jA=q("ZodCustomStringFormat",(e,t)=>{fS.init(e,t),Vr.init(e,t)});qA=q("ZodNumber",(e,t)=>{my.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,i,s)=>xM(e,n,i,s),e.gt=(n,i)=>e.check(Pa(n,i)),e.gte=(n,i)=>e.check(Ci(n,i)),e.min=(n,i)=>e.check(Ci(n,i)),e.lt=(n,i)=>e.check(Ma(n,i)),e.lte=(n,i)=>e.check(ls(n,i)),e.max=(n,i)=>e.check(ls(n,i)),e.int=n=>e.check(Xv(n)),e.safe=n=>e.check(Xv(n)),e.positive=n=>e.check(Pa(0,n)),e.nonnegative=n=>e.check(Ci(0,n)),e.negative=n=>e.check(Ma(0,n)),e.nonpositive=n=>e.check(ls(0,n)),e.multipleOf=(n,i)=>e.check(mu(n,i)),e.step=(n,i)=>e.check(mu(n,i)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});Qf=q("ZodNumberFormat",(e,t)=>{pS.init(e,t),qA.init(e,t)});zA=q("ZodBoolean",(e,t)=>{TA.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>BM(e,r,n,i)});VA=q("ZodBigInt",(e,t)=>{yy.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,i,s)=>kM(e,n,i,s),e.gte=(n,i)=>e.check(Ci(n,i)),e.min=(n,i)=>e.check(Ci(n,i)),e.gt=(n,i)=>e.check(Pa(n,i)),e.gte=(n,i)=>e.check(Ci(n,i)),e.min=(n,i)=>e.check(Ci(n,i)),e.lt=(n,i)=>e.check(Ma(n,i)),e.lte=(n,i)=>e.check(ls(n,i)),e.max=(n,i)=>e.check(ls(n,i)),e.positive=n=>e.check(Pa(BigInt(0),n)),e.negative=n=>e.check(Ma(BigInt(0),n)),e.nonpositive=n=>e.check(ls(BigInt(0),n)),e.nonnegative=n=>e.check(Ci(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(mu(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});mx=q("ZodBigIntFormat",(e,t)=>{hS.init(e,t),VA.init(e,t)});B4=q("ZodSymbol",(e,t)=>{AS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_M(e,r,n,i)});k4=q("ZodUndefined",(e,t)=>{gS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>RM(e,r,n,i)});_4=q("ZodNull",(e,t)=>{mS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>TM(e,r,n,i)});T4=q("ZodAny",(e,t)=>{yS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>NM(e,r,n,i)});R4=q("ZodUnknown",(e,t)=>{bS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>MM(e,r,n,i)});Q4=q("ZodNever",(e,t)=>{ES.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>DM(e,r,n,i)});D4=q("ZodVoid",(e,t)=>{CS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>QM(e,r,n,i)});ib=q("ZodDate",(e,t)=>{wS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,i,s)=>PM(e,n,i,s),e.min=(n,i)=>e.check(Ci(n,i)),e.max=(n,i)=>e.check(ls(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});N4=q("ZodArray",(e,t)=>{IS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>WM(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(mc(r,n)),e.nonempty=r=>e.check(mc(1,r)),e.max=(r,n)=>e.check(Rl(r,n)),e.length=(r,n)=>e.check(Ql(r,n)),e.unwrap=()=>e.element});sb=q("ZodObject",(e,t)=>{yM.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>YM(e,r,n,i),Ee.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Ii(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gr()}),e.strict=()=>e.clone({...e._zod.def,catchall:yx()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Ee.extend(e,r),e.safeExtend=r=>Ee.safeExtend(e,r),e.merge=r=>Ee.merge(e,r),e.pick=r=>Ee.pick(e,r),e.omit=r=>Ee.omit(e,r),e.partial=(...r)=>Ee.partial(Ex,e,r[0]),e.required=(...r)=>Ee.required(Cx,e,r[0])});ob=q("ZodUnion",(e,t)=>{RA.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$v(e,r,n,i),e.options=t.options});M4=q("ZodXor",(e,t)=>{ob.init(e,t),SS.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$v(e,r,n,i),e.options=t.options});P4=q("ZodDiscriminatedUnion",(e,t)=>{ob.init(e,t),vS.init(e,t)});L4=q("ZodIntersection",(e,t)=>{xS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>JM(e,r,n,i)});F4=q("ZodTuple",(e,t)=>{by.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>ZM(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});cb=q("ZodRecord",(e,t)=>{BS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>KM(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});U4=q("ZodMap",(e,t)=>{kS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>VM(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(La(...r)),e.nonempty=r=>e.check(La(1,r)),e.max=(...r)=>e.check(yu(...r)),e.size=(...r)=>e.check(Tl(...r))});$4=q("ZodSet",(e,t)=>{_S.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>GM(e,r,n,i),e.min=(...r)=>e.check(La(...r)),e.nonempty=r=>e.check(La(1,r)),e.max=(...r)=>e.check(yu(...r)),e.size=(...r)=>e.check(Tl(...r))});$A=q("ZodEnum",(e,t)=>{TS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(n,i,s)=>LM(e,n,i,s),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let s={};for(let o of n)if(r.has(o))s[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new $A({...t,checks:[],...Ee.normalizeParams(i),entries:s})},e.exclude=(n,i)=>{let s={...t.entries};for(let o of n)if(r.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new $A({...t,checks:[],...Ee.normalizeParams(i),entries:s})}});H4=q("ZodLiteral",(e,t)=>{RS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>FM(e,r,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});j4=q("ZodFile",(e,t)=>{QS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$M(e,r,n,i),e.min=(r,n)=>e.check(La(r,n)),e.max=(r,n)=>e.check(yu(r,n)),e.mime=(r,n)=>e.check(xf(Array.isArray(r)?r:[r],n))});q4=q("ZodTransform",(e,t)=>{DS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>zM(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Sl(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(Ee.issue(s,r.value,t));else{let o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(Ee.issue(o))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(s=>(r.value=s,r)):(r.value=i,r)}});Ex=q("ZodOptional",(e,t)=>{Ey.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});z4=q("ZodExactOptional",(e,t)=>{NS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hv(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});G4=q("ZodNullable",(e,t)=>{MS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>XM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});W4=q("ZodDefault",(e,t)=>{PS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>t4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});J4=q("ZodPrefault",(e,t)=>{LS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>r4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});Cx=q("ZodNonOptional",(e,t)=>{FS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>e4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});X4=q("ZodSuccess",(e,t)=>{OS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>HM(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});eP=q("ZodCatch",(e,t)=>{US.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>n4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});rP=q("ZodNaN",(e,t)=>{$S.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>OM(e,r,n,i)});wx=q("ZodPipe",(e,t)=>{HS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>i4(e,r,n,i),e.in=t.in,e.out=t.out});Ix=q("ZodCodec",(e,t)=>{wx.init(e,t),QA.init(e,t)});nP=q("ZodReadonly",(e,t)=>{jS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>s4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});sP=q("ZodTemplateLiteral",(e,t)=>{qS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>UM(e,r,n,i)});oP=q("ZodLazy",(e,t)=>{GS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>a4(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});cP=q("ZodPromise",(e,t)=>{VS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>o4(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});uP=q("ZodFunction",(e,t)=>{zS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>qM(e,r,n,i)});ub=q("ZodCustom",(e,t)=>{WS.init(e,t),$t.init(e,t),e._zod.processJSONSchema=(r,n,i)=>jM(e,r,n,i)});DZ=Lv,NZ=Fv;PZ=(...e)=>Ov({Codec:Ix,Boolean:zA,String:HA},...e)});function hMe(e){xn({customError:e})}function AMe(){return xn().customError}var pMe,fP,FZ=N(()=>{Ln();Ln();pMe={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"};fP||(fP={})});function mMe(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function yMe(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function OZ(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Me.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return Me.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let s=yMe(i,t),o=Ui(s,t);return t.refs.set(i,o),t.processing.delete(i),o}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return Me.null();if(i.length===0)return Me.never();if(i.length===1)return Me.literal(i[0]);if(i.every(o=>typeof o=="string"))return Me.enum(i);let s=i.map(o=>Me.literal(o));return s.length<2?s[0]:Me.union([s[0],s[1],...s.slice(2)])}if(e.const!==void 0)return Me.literal(e.const);let r=e.type;if(Array.isArray(r)){let i=r.map(s=>{let o={...e,type:s};return OZ(o,t)});return i.length===0?Me.never():i.length===1?i[0]:Me.union(i)}if(!r)return Me.any();let n;switch(r){case"string":{let i=Me.string();if(e.format){let s=e.format;s==="email"?i=i.check(Me.email()):s==="uri"||s==="uri-reference"?i=i.check(Me.url()):s==="uuid"||s==="guid"?i=i.check(Me.uuid()):s==="date-time"?i=i.check(Me.iso.datetime()):s==="date"?i=i.check(Me.iso.date()):s==="time"?i=i.check(Me.iso.time()):s==="duration"?i=i.check(Me.iso.duration()):s==="ipv4"?i=i.check(Me.ipv4()):s==="ipv6"?i=i.check(Me.ipv6()):s==="mac"?i=i.check(Me.mac()):s==="cidr"?i=i.check(Me.cidrv4()):s==="cidr-v6"?i=i.check(Me.cidrv6()):s==="base64"?i=i.check(Me.base64()):s==="base64url"?i=i.check(Me.base64url()):s==="e164"?i=i.check(Me.e164()):s==="jwt"?i=i.check(Me.jwt()):s==="emoji"?i=i.check(Me.emoji()):s==="nanoid"?i=i.check(Me.nanoid()):s==="cuid"?i=i.check(Me.cuid()):s==="cuid2"?i=i.check(Me.cuid2()):s==="ulid"?i=i.check(Me.ulid()):s==="xid"?i=i.check(Me.xid()):s==="ksuid"&&(i=i.check(Me.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?Me.number().int():Me.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),n=i;break}case"boolean":{n=Me.boolean();break}case"null":{n=Me.null();break}case"object":{let i={},s=e.properties||{},o=new Set(e.required||[]);for(let[c,u]of Object.entries(s)){let l=Ui(u,t);i[c]=o.has(c)?l:l.optional()}if(e.propertyNames){let c=Ui(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Ui(e.additionalProperties,t):Me.any();if(Object.keys(i).length===0){n=Me.record(c,u);break}let l=Me.object(i).passthrough(),d=Me.looseRecord(c,u);n=Me.intersection(l,d);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let f of u){let p=Ui(c[f],t),h=Me.string().regex(new RegExp(f));l.push(Me.looseRecord(h,p))}let d=[];if(Object.keys(i).length>0&&d.push(Me.object(i).passthrough()),d.push(...l),d.length===0)n=Me.object({}).passthrough();else if(d.length===1)n=d[0];else{let f=Me.intersection(d[0],d[1]);for(let p=2;pUi(c,t)),a=s&&typeof s=="object"&&!Array.isArray(s)?Ui(s,t):void 0;a?n=Me.tuple(o).rest(a):n=Me.tuple(o),typeof e.minItems=="number"&&(n=n.check(Me.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Me.maxLength(e.maxItems)))}else if(Array.isArray(s)){let o=s.map(c=>Ui(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Ui(e.additionalItems,t):void 0;a?n=Me.tuple(o).rest(a):n=Me.tuple(o),typeof e.minItems=="number"&&(n=n.check(Me.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(Me.maxLength(e.maxItems)))}else if(s!==void 0){let o=Ui(s,t),a=Me.array(o);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a}else n=Me.array(Me.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function Ui(e,t){if(typeof e=="boolean")return e?Me.any():Me.never();let r=OZ(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>Ui(u,t)),c=Me.union(a);r=n?Me.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>Ui(u,t)),c=Me.xor(a);r=n?Me.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:Me.any();else{let a=n?r:Ui(e.allOf[0],t),c=n?0:1;for(let u=c;u0&&t.registry.add(r,i),r}function UZ(e,t){if(typeof e=="boolean")return e?Me.any():Me.never();let r=mMe(e,t?.defaultTarget),n=e.$defs||e.definitions||{},i={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ii};return Ui(e,i)}var Me,gMe,$Z=N(()=>{Iy();Wv();Jy();Ky();Me={...Zy,...Gv,iso:Ll},gMe=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 pP={};Yt(pP,{bigint:()=>wMe,boolean:()=>CMe,date:()=>IMe,number:()=>EMe,string:()=>bMe});function bMe(e){return nv(HA,e)}function EMe(e){return dv(qA,e)}function CMe(e){return yv(zA,e)}function wMe(e){return Ev(VA,e)}function IMe(e){return Rv(ib,e)}var HZ=N(()=>{Ln();Ky()});var Qe={};Yt(Qe,{$brand:()=>oy,$input:()=>tv,$output:()=>ev,NEVER:()=>m1,TimePrecision:()=>sv,ZodAny:()=>T4,ZodArray:()=>N4,ZodBase64:()=>px,ZodBase64URL:()=>hx,ZodBigInt:()=>VA,ZodBigIntFormat:()=>mx,ZodBoolean:()=>zA,ZodCIDRv4:()=>dx,ZodCIDRv6:()=>fx,ZodCUID:()=>ix,ZodCUID2:()=>sx,ZodCatch:()=>eP,ZodCodec:()=>Ix,ZodCustom:()=>ub,ZodCustomStringFormat:()=>jA,ZodDate:()=>ib,ZodDefault:()=>W4,ZodDiscriminatedUnion:()=>P4,ZodE164:()=>Ax,ZodEmail:()=>tx,ZodEmoji:()=>rx,ZodEnum:()=>$A,ZodError:()=>dMe,ZodExactOptional:()=>z4,ZodFile:()=>j4,ZodFirstPartyTypeKind:()=>fP,ZodFunction:()=>uP,ZodGUID:()=>Xy,ZodIPv4:()=>ux,ZodIPv6:()=>lx,ZodISODate:()=>Jv,ZodISODateTime:()=>Yv,ZodISODuration:()=>Kv,ZodISOTime:()=>Zv,ZodIntersection:()=>L4,ZodIssueCode:()=>pMe,ZodJWT:()=>gx,ZodKSUID:()=>cx,ZodLazy:()=>oP,ZodLiteral:()=>H4,ZodMAC:()=>x4,ZodMap:()=>U4,ZodNaN:()=>rP,ZodNanoID:()=>nx,ZodNever:()=>Q4,ZodNonOptional:()=>Cx,ZodNull:()=>_4,ZodNullable:()=>G4,ZodNumber:()=>qA,ZodNumberFormat:()=>Qf,ZodObject:()=>sb,ZodOptional:()=>Ex,ZodPipe:()=>wx,ZodPrefault:()=>J4,ZodPromise:()=>cP,ZodReadonly:()=>nP,ZodRealError:()=>Ds,ZodRecord:()=>cb,ZodSet:()=>$4,ZodString:()=>HA,ZodStringFormat:()=>Vr,ZodSuccess:()=>X4,ZodSymbol:()=>B4,ZodTemplateLiteral:()=>sP,ZodTransform:()=>q4,ZodTuple:()=>F4,ZodType:()=>$t,ZodULID:()=>ox,ZodURL:()=>rb,ZodUUID:()=>yc,ZodUndefined:()=>k4,ZodUnion:()=>ob,ZodUnknown:()=>R4,ZodVoid:()=>D4,ZodXID:()=>ax,ZodXor:()=>M4,_ZodString:()=>ex,_default:()=>Y4,_function:()=>RZ,any:()=>pZ,array:()=>Zt,base64:()=>JJ,base64url:()=>ZJ,bigint:()=>cZ,boolean:()=>Fn,catch:()=>tP,check:()=>QZ,cidrv4:()=>WJ,cidrv6:()=>YJ,clone:()=>Ei,codec:()=>kZ,coerce:()=>pP,config:()=>xn,core:()=>lo,cuid:()=>UJ,cuid2:()=>$J,custom:()=>Sx,date:()=>AZ,decode:()=>y4,decodeAsync:()=>E4,describe:()=>DZ,discriminatedUnion:()=>ab,e164:()=>KJ,email:()=>TJ,emoji:()=>FJ,encode:()=>m4,encodeAsync:()=>b4,endsWith:()=>vf,enum:()=>Ii,exactOptional:()=>V4,file:()=>SZ,flattenError:()=>EA,float32:()=>iZ,float64:()=>sZ,formatError:()=>CA,fromJSONSchema:()=>UZ,function:()=>RZ,getErrorMap:()=>AMe,globalRegistry:()=>ii,gt:()=>Pa,gte:()=>Ci,guid:()=>RJ,hash:()=>nZ,hex:()=>rZ,hostname:()=>tZ,httpUrl:()=>LJ,includes:()=>If,instanceof:()=>MZ,int:()=>Xv,int32:()=>oZ,int64:()=>uZ,intersection:()=>GA,ipv4:()=>zJ,ipv6:()=>GJ,iso:()=>Ll,json:()=>LZ,jwt:()=>XJ,keyof:()=>gZ,ksuid:()=>qJ,lazy:()=>aP,length:()=>Ql,literal:()=>st,locales:()=>NA,looseObject:()=>wi,looseRecord:()=>EZ,lowercase:()=>Cf,lt:()=>Ma,lte:()=>ls,mac:()=>VJ,map:()=>CZ,maxLength:()=>Rl,maxSize:()=>yu,meta:()=>NZ,mime:()=>xf,minLength:()=>mc,minSize:()=>La,multipleOf:()=>mu,nan:()=>BZ,nanoid:()=>OJ,nativeEnum:()=>IZ,negative:()=>zy,never:()=>yx,nonnegative:()=>Gy,nonoptional:()=>K4,nonpositive:()=>Vy,normalize:()=>Bf,null:()=>nb,nullable:()=>eb,nullish:()=>vZ,number:()=>Sr,object:()=>Ue,optional:()=>en,overwrite:()=>Mo,parse:()=>p4,parseAsync:()=>h4,partialRecord:()=>bZ,pipe:()=>tb,positive:()=>qy,prefault:()=>Z4,preprocess:()=>lb,prettifyError:()=>w1,promise:()=>TZ,property:()=>Wy,readonly:()=>iP,record:()=>Fr,refine:()=>lP,regex:()=>Ef,regexes:()=>Qs,registry:()=>wy,safeDecode:()=>w4,safeDecodeAsync:()=>S4,safeEncode:()=>C4,safeEncodeAsync:()=>I4,safeParse:()=>A4,safeParseAsync:()=>g4,set:()=>wZ,setErrorMap:()=>hMe,size:()=>Tl,slugify:()=>LA,startsWith:()=>Sf,strictObject:()=>mZ,string:()=>re,stringFormat:()=>eZ,stringbool:()=>PZ,success:()=>xZ,superRefine:()=>dP,symbol:()=>dZ,templateLiteral:()=>_Z,toJSONSchema:()=>OA,toLowerCase:()=>_f,toUpperCase:()=>Tf,transform:()=>bx,treeifyError:()=>C1,trim:()=>kf,tuple:()=>O4,uint32:()=>aZ,uint64:()=>lZ,ulid:()=>HJ,undefined:()=>fZ,union:()=>Wr,unknown:()=>Gr,uppercase:()=>wf,url:()=>PJ,util:()=>Ee,uuid:()=>QJ,uuidv4:()=>DJ,uuidv6:()=>NJ,uuidv7:()=>MJ,void:()=>hZ,xid:()=>jJ,xor:()=>yZ});var db=N(()=>{Ln();Ky();Wv();f4();v4();FZ();Ln();EM();Ln();UA();$Z();KS();Jy();Jy();HZ();xn(YS())});var xb=B(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.regexpCode=vr.getEsmExportName=vr.getProperty=vr.safeStringify=vr.stringify=vr.strConcat=vr.addCodeArg=vr.str=vr._=vr.nil=vr._Code=vr.Name=vr.IDENTIFIER=vr._CodeOrName=void 0;var Sb=class{};vr._CodeOrName=Sb;vr.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Df=class extends Sb{constructor(t){if(super(),!vr.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};vr.Name=Df;var Fo=class extends Sb{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Df&&(r[n.str]=(r[n.str]||0)+1),r),{})}};vr._Code=Fo;vr.nil=new Fo("");function aK(e,...t){let r=[e[0]],n=0;for(;n{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.ValueScope=Ms.ValueScopeName=Ms.Scope=Ms.varKinds=Ms.UsedValueState=void 0;var Ns=xb(),PP=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ux;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ux||(Ms.UsedValueState=Ux={}));Ms.varKinds={const:new Ns.Name("const"),let:new Ns.Name("let"),var:new Ns.Name("var")};var $x=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ns.Name?t:this.name(t)}name(t){return new Ns.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ms.Scope=$x;var Hx=class extends Ns.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ns._)`.${new Ns.Name(r)}[${n}]`}};Ms.ValueScopeName=Hx;var mPe=(0,Ns._)`\n`,LP=class extends $x{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?mPe:Ns.nil}}get(){return this._scope}name(t){return new Hx(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(o);if(l)return l}else a=this._values[s]=new Map;a.set(o,i);let c=this._scope[s]||(this._scope[s]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:s,itemIndex:u}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ns._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=Ns.nil;for(let o in t){let a=t[o];if(!a)continue;let c=n[o]=n[o]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Ux.Started);let l=r(u);if(l){let d=this.opts.es5?Ms.varKinds.var:Ms.varKinds.const;s=(0,Ns._)`${s}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))s=(0,Ns._)`${s}${l}${this.opts._n}`;else throw new PP(u);c.set(u,Ux.Completed)})}return s}};Ms.ValueScope=LP});var Vt=B(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.or=Kt.and=Kt.not=Kt.CodeGen=Kt.operators=Kt.varKinds=Kt.ValueScopeName=Kt.ValueScope=Kt.Scope=Kt.Name=Kt.regexpCode=Kt.stringify=Kt.getProperty=Kt.nil=Kt.strConcat=Kt.str=Kt._=void 0;var fr=xb(),Fa=FP(),Ul=xb();Object.defineProperty(Kt,"_",{enumerable:!0,get:function(){return Ul._}});Object.defineProperty(Kt,"str",{enumerable:!0,get:function(){return Ul.str}});Object.defineProperty(Kt,"strConcat",{enumerable:!0,get:function(){return Ul.strConcat}});Object.defineProperty(Kt,"nil",{enumerable:!0,get:function(){return Ul.nil}});Object.defineProperty(Kt,"getProperty",{enumerable:!0,get:function(){return Ul.getProperty}});Object.defineProperty(Kt,"stringify",{enumerable:!0,get:function(){return Ul.stringify}});Object.defineProperty(Kt,"regexpCode",{enumerable:!0,get:function(){return Ul.regexpCode}});Object.defineProperty(Kt,"Name",{enumerable:!0,get:function(){return Ul.Name}});var Vx=FP();Object.defineProperty(Kt,"Scope",{enumerable:!0,get:function(){return Vx.Scope}});Object.defineProperty(Kt,"ValueScope",{enumerable:!0,get:function(){return Vx.ValueScope}});Object.defineProperty(Kt,"ValueScopeName",{enumerable:!0,get:function(){return Vx.ValueScopeName}});Object.defineProperty(Kt,"varKinds",{enumerable:!0,get:function(){return Vx.varKinds}});Kt.operators={GT:new fr._Code(">"),GTE:new fr._Code(">="),LT:new fr._Code("<"),LTE:new fr._Code("<="),EQ:new fr._Code("==="),NEQ:new fr._Code("!=="),NOT:new fr._Code("!"),OR:new fr._Code("||"),AND:new fr._Code("&&"),ADD:new fr._Code("+")};var Eu=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},OP=class extends Eu{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Fa.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=XA(this.rhs,t,r)),this}get names(){return this.rhs instanceof fr._CodeOrName?this.rhs.names:{}}},jx=class extends Eu{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof fr.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=XA(this.rhs,t,r),this}get names(){let t=this.lhs instanceof fr.Name?{}:{...this.lhs.names};return zx(t,this.rhs)}},UP=class extends jx{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},$P=class extends Eu{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},HP=class extends Eu{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},jP=class extends Eu{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},qP=class extends Eu{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=XA(this.code,t,r),this}get names(){return this.code instanceof fr._CodeOrName?this.code.names:{}}},Bb=class extends Eu{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(yPe(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Pf(t,r.names),{})}},Cu=class extends Bb{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},zP=class extends Bb{},KA=class extends Cu{};KA.kind="else";var Nf=class e extends Cu{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new KA(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(uK(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=XA(this.condition,t,r),this}get names(){let t=super.names;return zx(t,this.condition),this.else&&Pf(t,this.else.names),t}};Nf.kind="if";var Mf=class extends Cu{};Mf.kind="for";var VP=class extends Mf{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=XA(this.iteration,t,r),this}get names(){return Pf(super.names,this.iteration.names)}},GP=class extends Mf{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?Fa.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=zx(super.names,this.from);return zx(t,this.to)}},qx=class extends Mf{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=XA(this.iterable,t,r),this}get names(){return Pf(super.names,this.iterable.names)}},kb=class extends Cu{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};kb.kind="func";var _b=class extends Bb{render(t){return"return "+super.render(t)}};_b.kind="return";var WP=class extends Cu{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Pf(t,this.catch.names),this.finally&&Pf(t,this.finally.names),t}},Tb=class extends Cu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Tb.kind="catch";var Rb=class extends Cu{render(t){return"finally"+super.render(t)}};Rb.kind="finally";var YP=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?` +`:""},this._extScope=t,this._scope=new Fa.Scope({parent:t}),this._nodes=[new zP]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new OP(t,s,n)),s}const(t,r,n){return this._def(Fa.varKinds.const,t,r,n)}let(t,r,n){return this._def(Fa.varKinds.let,t,r,n)}var(t,r,n){return this._def(Fa.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new jx(t,r,n))}add(t,r){return this._leafNode(new UP(t,Kt.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==fr.nil&&this._leafNode(new qP(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,fr.addCodeArg)(r,i));return r.push("}"),new fr._Code(r)}if(t,r,n){if(this._blockNode(new Nf(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Nf(t))}else(){return this._elseNode(new KA)}endIf(){return this._endBlockNode(Nf,KA)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new VP(t),r)}forRange(t,r,n,i,s=this.opts.es5?Fa.varKinds.var:Fa.varKinds.let){let o=this._scope.toName(t);return this._for(new GP(s,o,r,n),()=>i(o))}forOf(t,r,n,i=Fa.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let o=r instanceof fr.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,fr._)`${o}.length`,a=>{this.var(s,(0,fr._)`${o}[${a}]`),n(s)})}return this._for(new qx("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?Fa.varKinds.var:Fa.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,fr._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new qx("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(Mf)}label(t){return this._leafNode(new $P(t))}break(t){return this._leafNode(new HP(t))}return(t){let r=new _b;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_b)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new WP;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new Tb(s),r(s)}return n&&(this._currNode=i.finally=new Rb,this.code(n)),this._endBlockNode(Tb,Rb)}throw(t){return this._leafNode(new jP(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=fr.nil,n,i){return this._blockNode(new kb(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(kb)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Nf))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Kt.CodeGen=YP;function Pf(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function zx(e,t){return t instanceof fr._CodeOrName?Pf(e,t.names):e}function XA(e,t,r){if(e instanceof fr.Name)return n(e);if(!i(e))return e;return new fr._Code(e._items.reduce((s,o)=>(o instanceof fr.Name&&(o=n(o)),o instanceof fr._Code?s.push(...o._items):s.push(o),s),[]));function n(s){let o=r[s.str];return o===void 0||t[s.str]!==1?s:(delete t[s.str],o)}function i(s){return s instanceof fr._Code&&s._items.some(o=>o instanceof fr.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function yPe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function uK(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,fr._)`!${JP(e)}`}Kt.not=uK;var bPe=lK(Kt.operators.AND);function EPe(...e){return e.reduce(bPe)}Kt.and=EPe;var CPe=lK(Kt.operators.OR);function wPe(...e){return e.reduce(CPe)}Kt.or=wPe;function lK(e){return(t,r)=>t===fr.nil?r:r===fr.nil?t:(0,fr._)`${JP(t)} ${e} ${JP(r)}`}function JP(e){return e instanceof fr.Name?e:(0,fr._)`(${e})`}});var yr=B(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.checkStrictMode=tr.getErrorPath=tr.Type=tr.useFunc=tr.setEvaluated=tr.evaluatedPropsToName=tr.mergeEvaluated=tr.eachItem=tr.unescapeJsonPointer=tr.escapeJsonPointer=tr.escapeFragment=tr.unescapeFragment=tr.schemaRefOrVal=tr.schemaHasRulesButRef=tr.schemaHasRules=tr.checkUnknownRules=tr.alwaysValidSchema=tr.toHash=void 0;var tn=Vt(),IPe=xb();function SPe(e){let t={};for(let r of e)t[r]=!0;return t}tr.toHash=SPe;function vPe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(pK(e,t),!hK(t,e.self.RULES.all))}tr.alwaysValidSchema=vPe;function pK(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let s in t)i[s]||mK(e,`unknown keyword: "${s}"`)}tr.checkUnknownRules=pK;function hK(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}tr.schemaHasRules=hK;function xPe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}tr.schemaHasRulesButRef=xPe;function BPe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,tn._)`${r}`}return(0,tn._)`${e}${t}${(0,tn.getProperty)(n)}`}tr.schemaRefOrVal=BPe;function kPe(e){return AK(decodeURIComponent(e))}tr.unescapeFragment=kPe;function _Pe(e){return encodeURIComponent(KP(e))}tr.escapeFragment=_Pe;function KP(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}tr.escapeJsonPointer=KP;function AK(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}tr.unescapeJsonPointer=AK;function TPe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}tr.eachItem=TPe;function dK({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,o,a)=>{let c=o===void 0?s:o instanceof tn.Name?(s instanceof tn.Name?e(i,s,o):t(i,s,o),o):s instanceof tn.Name?(t(i,o,s),s):r(s,o);return a===tn.Name&&!(c instanceof tn.Name)?n(i,c):c}}tr.mergeEvaluated={props:dK({mergeNames:(e,t,r)=>e.if((0,tn._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,tn._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,tn._)`${r} || {}`).code((0,tn._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,tn._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,tn._)`${r} || {}`),XP(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:gK}),items:dK({mergeNames:(e,t,r)=>e.if((0,tn._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,tn._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,tn._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,tn._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function gK(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,tn._)`{}`);return t!==void 0&&XP(e,r,t),r}tr.evaluatedPropsToName=gK;function XP(e,t,r){Object.keys(r).forEach(n=>e.assign((0,tn._)`${t}${(0,tn.getProperty)(n)}`,!0))}tr.setEvaluated=XP;var fK={};function RPe(e,t){return e.scopeValue("func",{ref:t,code:fK[t.code]||(fK[t.code]=new IPe._Code(t.code))})}tr.useFunc=RPe;var ZP;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(ZP||(tr.Type=ZP={}));function QPe(e,t,r){if(e instanceof tn.Name){let n=t===ZP.Num;return r?n?(0,tn._)`"[" + ${e} + "]"`:(0,tn._)`"['" + ${e} + "']"`:n?(0,tn._)`"/" + ${e}`:(0,tn._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,tn.getProperty)(e).toString():"/"+KP(e)}tr.getErrorPath=QPe;function mK(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}tr.checkStrictMode=mK});var wu=B(eL=>{"use strict";Object.defineProperty(eL,"__esModule",{value:!0});var $i=Vt(),DPe={data:new $i.Name("data"),valCxt:new $i.Name("valCxt"),instancePath:new $i.Name("instancePath"),parentData:new $i.Name("parentData"),parentDataProperty:new $i.Name("parentDataProperty"),rootData:new $i.Name("rootData"),dynamicAnchors:new $i.Name("dynamicAnchors"),vErrors:new $i.Name("vErrors"),errors:new $i.Name("errors"),this:new $i.Name("this"),self:new $i.Name("self"),scope:new $i.Name("scope"),json:new $i.Name("json"),jsonPos:new $i.Name("jsonPos"),jsonLen:new $i.Name("jsonLen"),jsonPart:new $i.Name("jsonPart")};eL.default=DPe});var Qb=B(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.extendErrors=Hi.resetErrorsCount=Hi.reportExtraError=Hi.reportError=Hi.keyword$DataError=Hi.keywordError=void 0;var br=Vt(),Gx=yr(),fs=wu();Hi.keywordError={message:({keyword:e})=>(0,br.str)`must pass "${e}" keyword validation`};Hi.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,br.str)`"${e}" keyword must be ${t} ($data)`:(0,br.str)`"${e}" keyword is invalid ($data)`};function NPe(e,t=Hi.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:o,allErrors:a}=i,c=EK(e,t,r);n??(o||a)?yK(s,c):bK(i,(0,br._)`[${c}]`)}Hi.reportError=NPe;function MPe(e,t=Hi.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:o}=n,a=EK(e,t,r);yK(i,a),s||o||bK(n,fs.default.vErrors)}Hi.reportExtraError=MPe;function PPe(e,t){e.assign(fs.default.errors,t),e.if((0,br._)`${fs.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,br._)`${fs.default.vErrors}.length`,t),()=>e.assign(fs.default.vErrors,null)))}Hi.resetErrorsCount=PPe;function LPe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,fs.default.errors,a=>{e.const(o,(0,br._)`${fs.default.vErrors}[${a}]`),e.if((0,br._)`${o}.instancePath === undefined`,()=>e.assign((0,br._)`${o}.instancePath`,(0,br.strConcat)(fs.default.instancePath,s.errorPath))),e.assign((0,br._)`${o}.schemaPath`,(0,br.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,br._)`${o}.schema`,r),e.assign((0,br._)`${o}.data`,n))})}Hi.extendErrors=LPe;function yK(e,t){let r=e.const("err",t);e.if((0,br._)`${fs.default.vErrors} === null`,()=>e.assign(fs.default.vErrors,(0,br._)`[${r}]`),(0,br._)`${fs.default.vErrors}.push(${r})`),e.code((0,br._)`${fs.default.errors}++`)}function bK(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,br._)`new ${e.ValidationError}(${t})`):(r.assign((0,br._)`${n}.errors`,t),r.return(!1))}var Lf={keyword:new br.Name("keyword"),schemaPath:new br.Name("schemaPath"),params:new br.Name("params"),propertyName:new br.Name("propertyName"),message:new br.Name("message"),schema:new br.Name("schema"),parentSchema:new br.Name("parentSchema")};function EK(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,br._)`{}`:FPe(e,t,r)}function FPe(e,t,r={}){let{gen:n,it:i}=e,s=[OPe(i,r),UPe(e,r)];return $Pe(e,t,s),n.object(...s)}function OPe({errorPath:e},{instancePath:t}){let r=t?(0,br.str)`${e}${(0,Gx.getErrorPath)(t,Gx.Type.Str)}`:e;return[fs.default.instancePath,(0,br.strConcat)(fs.default.instancePath,r)]}function UPe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,br.str)`${t}/${e}`;return r&&(i=(0,br.str)`${i}${(0,Gx.getErrorPath)(r,Gx.Type.Str)}`),[Lf.schemaPath,i]}function $Pe(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:o,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=a;n.push([Lf.keyword,i],[Lf.params,typeof t=="function"?t(e):t||(0,br._)`{}`]),c.messages&&n.push([Lf.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Lf.schema,o],[Lf.parentSchema,(0,br._)`${l}${d}`],[fs.default.data,s]),u&&n.push([Lf.propertyName,u])}});var wK=B(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.boolOrEmptySchema=eg.topBoolOrEmptySchema=void 0;var HPe=Qb(),jPe=Vt(),qPe=wu(),zPe={message:"boolean schema is false"};function VPe(e){let{gen:t,schema:r,validateName:n}=e;r===!1?CK(e,!1):typeof r=="object"&&r.$async===!0?t.return(qPe.default.data):(t.assign((0,jPe._)`${n}.errors`,null),t.return(!0))}eg.topBoolOrEmptySchema=VPe;function GPe(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),CK(e)):r.var(t,!0)}eg.boolOrEmptySchema=GPe;function CK(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,HPe.reportError)(i,zPe,void 0,t)}});var tL=B(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.getRules=tg.isJSONType=void 0;var WPe=["string","number","integer","boolean","null","object","array"],YPe=new Set(WPe);function JPe(e){return typeof e=="string"&&YPe.has(e)}tg.isJSONType=JPe;function ZPe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}tg.getRules=ZPe});var rL=B($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.shouldUseRule=$l.shouldUseGroup=$l.schemaHasRulesForType=void 0;function KPe({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&IK(e,n)}$l.schemaHasRulesForType=KPe;function IK(e,t){return t.rules.some(r=>SK(e,r))}$l.shouldUseGroup=IK;function SK(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}$l.shouldUseRule=SK});var Db=B(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.reportTypeError=ji.checkDataTypes=ji.checkDataType=ji.coerceAndCheckDataType=ji.getJSONTypes=ji.getSchemaTypes=ji.DataType=void 0;var XPe=tL(),eLe=rL(),tLe=Qb(),qt=Vt(),vK=yr(),rg;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(rg||(ji.DataType=rg={}));function rLe(e){let t=xK(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}ji.getSchemaTypes=rLe;function xK(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(XPe.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ji.getJSONTypes=xK;function nLe(e,t){let{gen:r,data:n,opts:i}=e,s=iLe(t,i.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,eLe.schemaHasRulesForType)(e,t[0]));if(o){let a=iL(t,n,i.strictNumbers,rg.Wrong);r.if(a,()=>{s.length?sLe(e,t,s):sL(e)})}return o}ji.coerceAndCheckDataType=nLe;var BK=new Set(["string","number","integer","boolean","null"]);function iLe(e,t){return t?e.filter(r=>BK.has(r)||t==="array"&&r==="array"):[]}function sLe(e,t,r){let{gen:n,data:i,opts:s}=e,o=n.let("dataType",(0,qt._)`typeof ${i}`),a=n.let("coerced",(0,qt._)`undefined`);s.coerceTypes==="array"&&n.if((0,qt._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,qt._)`${i}[0]`).assign(o,(0,qt._)`typeof ${i}`).if(iL(t,i,s.strictNumbers),()=>n.assign(a,i))),n.if((0,qt._)`${a} !== undefined`);for(let u of r)(BK.has(u)||u==="array"&&s.coerceTypes==="array")&&c(u);n.else(),sL(e),n.endIf(),n.if((0,qt._)`${a} !== undefined`,()=>{n.assign(i,a),oLe(e,a)});function c(u){switch(u){case"string":n.elseIf((0,qt._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,qt._)`"" + ${i}`).elseIf((0,qt._)`${i} === null`).assign(a,(0,qt._)`""`);return;case"number":n.elseIf((0,qt._)`${o} == "boolean" || ${i} === null + || (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,qt._)`+${i}`);return;case"integer":n.elseIf((0,qt._)`${o} === "boolean" || ${i} === null + || (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,qt._)`+${i}`);return;case"boolean":n.elseIf((0,qt._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,qt._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,qt._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,qt._)`${o} === "string" || ${o} === "number" + || ${o} === "boolean" || ${i} === null`).assign(a,(0,qt._)`[${i}]`)}}}function oLe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,qt._)`${t} !== undefined`,()=>e.assign((0,qt._)`${t}[${r}]`,n))}function nL(e,t,r,n=rg.Correct){let i=n===rg.Correct?qt.operators.EQ:qt.operators.NEQ,s;switch(e){case"null":return(0,qt._)`${t} ${i} null`;case"array":s=(0,qt._)`Array.isArray(${t})`;break;case"object":s=(0,qt._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,qt._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,qt._)`typeof ${t} ${i} ${e}`}return n===rg.Correct?s:(0,qt.not)(s);function o(a=qt.nil){return(0,qt.and)((0,qt._)`typeof ${t} == "number"`,a,r?(0,qt._)`isFinite(${t})`:qt.nil)}}ji.checkDataType=nL;function iL(e,t,r,n){if(e.length===1)return nL(e[0],t,r,n);let i,s=(0,vK.toHash)(e);if(s.array&&s.object){let o=(0,qt._)`typeof ${t} != "object"`;i=s.null?o:(0,qt._)`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=qt.nil;s.number&&delete s.integer;for(let o in s)i=(0,qt.and)(i,nL(o,t,r,n));return i}ji.checkDataTypes=iL;var aLe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,qt._)`{type: ${e}}`:(0,qt._)`{type: ${t}}`};function sL(e){let t=cLe(e);(0,tLe.reportError)(t,aLe)}ji.reportTypeError=sL;function cLe(e){let{gen:t,data:r,schema:n}=e,i=(0,vK.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var _K=B(Wx=>{"use strict";Object.defineProperty(Wx,"__esModule",{value:!0});Wx.assignDefaults=void 0;var ng=Vt(),uLe=yr();function lLe(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)kK(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,s)=>kK(e,s,i.default))}Wx.assignDefaults=lLe;function kK(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=(0,ng._)`${s}${(0,ng.getProperty)(t)}`;if(i){(0,uLe.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,ng._)`${a} === undefined`;o.useDefaults==="empty"&&(c=(0,ng._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,ng._)`${a} = ${(0,ng.stringify)(r)}`)}});var Oo=B(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.validateUnion=Yr.validateArray=Yr.usePattern=Yr.callValidateCode=Yr.schemaProperties=Yr.allSchemaProperties=Yr.noPropertyInData=Yr.propertyInData=Yr.isOwnProperty=Yr.hasPropFunc=Yr.reportMissingProp=Yr.checkMissingProp=Yr.checkReportMissingProp=void 0;var dn=Vt(),oL=yr(),Hl=wu(),dLe=yr();function fLe(e,t){let{gen:r,data:n,it:i}=e;r.if(cL(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,dn._)`${t}`},!0),e.error()})}Yr.checkReportMissingProp=fLe;function pLe({gen:e,data:t,it:{opts:r}},n,i){return(0,dn.or)(...n.map(s=>(0,dn.and)(cL(e,t,s,r.ownProperties),(0,dn._)`${i} = ${s}`)))}Yr.checkMissingProp=pLe;function hLe(e,t){e.setParams({missingProperty:t},!0),e.error()}Yr.reportMissingProp=hLe;function TK(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,dn._)`Object.prototype.hasOwnProperty`})}Yr.hasPropFunc=TK;function aL(e,t,r){return(0,dn._)`${TK(e)}.call(${t}, ${r})`}Yr.isOwnProperty=aL;function ALe(e,t,r,n){let i=(0,dn._)`${t}${(0,dn.getProperty)(r)} !== undefined`;return n?(0,dn._)`${i} && ${aL(e,t,r)}`:i}Yr.propertyInData=ALe;function cL(e,t,r,n){let i=(0,dn._)`${t}${(0,dn.getProperty)(r)} === undefined`;return n?(0,dn.or)(i,(0,dn.not)(aL(e,t,r))):i}Yr.noPropertyInData=cL;function RK(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Yr.allSchemaProperties=RK;function gLe(e,t){return RK(t).filter(r=>!(0,oL.alwaysValidSchema)(e,t[r]))}Yr.schemaProperties=gLe;function mLe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,c,u){let l=u?(0,dn._)`${e}, ${t}, ${n}${i}`:t,d=[[Hl.default.instancePath,(0,dn.strConcat)(Hl.default.instancePath,s)],[Hl.default.parentData,o.parentData],[Hl.default.parentDataProperty,o.parentDataProperty],[Hl.default.rootData,Hl.default.rootData]];o.opts.dynamicRef&&d.push([Hl.default.dynamicAnchors,Hl.default.dynamicAnchors]);let f=(0,dn._)`${l}, ${r.object(...d)}`;return c!==dn.nil?(0,dn._)`${a}.call(${c}, ${f})`:(0,dn._)`${a}(${f})`}Yr.callValidateCode=mLe;var yLe=(0,dn._)`new RegExp`;function bLe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,dn._)`${i.code==="new RegExp"?yLe:(0,dLe.useFunc)(e,i)}(${r}, ${n})`})}Yr.usePattern=bLe;function ELe(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let c=t.const("len",(0,dn._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:oL.Type.Num},s),t.if((0,dn.not)(s),a)})}}Yr.validateArray=ELe;function CLe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,oL.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);t.assign(o,(0,dn._)`${o} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,dn.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Yr.validateUnion=CLe});var NK=B(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.validateKeywordUsage=bc.validSchemaType=bc.funcKeywordCode=bc.macroKeywordCode=void 0;var ps=Vt(),Ff=wu(),wLe=Oo(),ILe=Qb();function SLe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),c=DK(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ps.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}bc.macroKeywordCode=SLe;function vLe(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:c}=e;BLe(c,t);let u=!a&&t.compile?t.compile.call(c.self,s,o,c):t.validate,l=DK(n,i,u),d=n.let("valid");e.block$data(d,f),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function f(){if(t.errors===!1)A(),t.modifying&&QK(e),g(()=>e.error());else{let m=t.async?p():h();t.modifying&&QK(e),g(()=>xLe(e,m))}}function p(){let m=n.let("ruleErrs",null);return n.try(()=>A((0,ps._)`await `),b=>n.assign(d,!1).if((0,ps._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(m,(0,ps._)`${b}.errors`),()=>n.throw(b))),m}function h(){let m=(0,ps._)`${l}.errors`;return n.assign(m,null),A(ps.nil),m}function A(m=t.async?(0,ps._)`await `:ps.nil){let b=c.opts.passContext?Ff.default.this:Ff.default.self,C=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,ps._)`${m}${(0,wLe.callValidateCode)(e,l,b,C)}`,t.modifying)}function g(m){var b;n.if((0,ps.not)((b=t.valid)!==null&&b!==void 0?b:d),m)}}bc.funcKeywordCode=vLe;function QK(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,ps._)`${n.parentData}[${n.parentDataProperty}]`))}function xLe(e,t){let{gen:r}=e;r.if((0,ps._)`Array.isArray(${t})`,()=>{r.assign(Ff.default.vErrors,(0,ps._)`${Ff.default.vErrors} === null ? ${t} : ${Ff.default.vErrors}.concat(${t})`).assign(Ff.default.errors,(0,ps._)`${Ff.default.vErrors}.length`),(0,ILe.extendErrors)(e)},()=>e.error())}function BLe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function DK(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ps.stringify)(r)})}function kLe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}bc.validSchemaType=kLe;function _Le({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}bc.validateKeywordUsage=_Le});var PK=B(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.extendSubschemaMode=jl.extendSubschemaData=jl.getSubschema=void 0;var Ec=Vt(),MK=yr();function TLe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Ec._)`${e.schemaPath}${(0,Ec.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Ec._)`${e.schemaPath}${(0,Ec.getProperty)(t)}${(0,Ec.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,MK.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}jl.getSubschema=TLe;function RLe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,f=a.let("data",(0,Ec._)`${t.data}${(0,Ec.getProperty)(r)}`,!0);c(f),e.errorPath=(0,Ec.str)`${u}${(0,MK.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Ec._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(i!==void 0){let u=i instanceof Ec.Name?i:a.let("data",i,!0);c(u),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}jl.extendSubschemaData=RLe;function QLe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}jl.extendSubschemaMode=QLe});var uL=B((PUt,LK)=>{"use strict";LK.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var OK=B((LUt,FK)=>{"use strict";var ql=FK.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Yx(t,n,i,e,"",e)};ql.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ql.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ql.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ql.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Yx(e,t,r,n,i,s,o,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,a,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in ql.arrayKeywords)for(var f=0;f{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.getSchemaRefs=Ps.resolveUrl=Ps.normalizeId=Ps._getFullPath=Ps.getFullPath=Ps.inlineRef=void 0;var NLe=yr(),MLe=uL(),PLe=OK(),LLe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function FLe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!lL(e):t?UK(e)<=t:!1}Ps.inlineRef=FLe;var OLe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lL(e){for(let t in e){if(OLe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(lL)||typeof r=="object"&&lL(r))return!0}return!1}function UK(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!LLe.has(r)&&(typeof e[r]=="object"&&(0,NLe.eachItem)(e[r],n=>t+=UK(n)),t===1/0))return 1/0}return t}function $K(e,t="",r){r!==!1&&(t=ig(t));let n=e.parse(t);return HK(e,n)}Ps.getFullPath=$K;function HK(e,t){return e.serialize(t).split("#")[0]+"#"}Ps._getFullPath=HK;var ULe=/#\/?$/;function ig(e){return e?e.replace(ULe,""):""}Ps.normalizeId=ig;function $Le(e,t,r){return r=ig(r),e.resolve(t,r)}Ps.resolveUrl=$Le;var HLe=/^[a-z_][-a-z0-9._]*$/i;function jLe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=ig(e[r]||t),s={"":i},o=$K(n,i,!1),a={},c=new Set;return PLe(e,{allKeys:!0},(d,f,p,h)=>{if(h===void 0)return;let A=o+f,g=s[h];typeof d[r]=="string"&&(g=m.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),s[f]=g;function m(C){let E=this.opts.uriResolver.resolve;if(C=ig(g?E(g,C):C),c.has(C))throw l(C);c.add(C);let w=this.refs[C];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?u(d,w.schema,C):C!==ig(A)&&(C[0]==="#"?(u(d,a[C],C),a[C]=d):this.refs[C]=A),C}function b(C){if(typeof C=="string"){if(!HLe.test(C))throw new Error(`invalid anchor "${C}"`);m.call(this,`#${C}`)}}}),a;function u(d,f,p){if(f!==void 0&&!MLe(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ps.getSchemaRefs=jLe});var Lb=B(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.getData=zl.KeywordCxt=zl.validateFunctionCode=void 0;var GK=wK(),jK=Db(),fL=rL(),Jx=Db(),qLe=_K(),Pb=NK(),dL=PK(),ut=Vt(),Dt=wu(),zLe=Nb(),Iu=yr(),Mb=Qb();function VLe(e){if(JK(e)&&(ZK(e),YK(e))){YLe(e);return}WK(e,()=>(0,GK.topBoolOrEmptySchema)(e))}zl.validateFunctionCode=VLe;function WK({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,(0,ut._)`${Dt.default.data}, ${Dt.default.valCxt}`,n.$async,()=>{e.code((0,ut._)`"use strict"; ${qK(r,i)}`),WLe(e,i),e.code(s)}):e.func(t,(0,ut._)`${Dt.default.data}, ${GLe(i)}`,n.$async,()=>e.code(qK(r,i)).code(s))}function GLe(e){return(0,ut._)`{${Dt.default.instancePath}="", ${Dt.default.parentData}, ${Dt.default.parentDataProperty}, ${Dt.default.rootData}=${Dt.default.data}${e.dynamicRef?(0,ut._)`, ${Dt.default.dynamicAnchors}={}`:ut.nil}}={}`}function WLe(e,t){e.if(Dt.default.valCxt,()=>{e.var(Dt.default.instancePath,(0,ut._)`${Dt.default.valCxt}.${Dt.default.instancePath}`),e.var(Dt.default.parentData,(0,ut._)`${Dt.default.valCxt}.${Dt.default.parentData}`),e.var(Dt.default.parentDataProperty,(0,ut._)`${Dt.default.valCxt}.${Dt.default.parentDataProperty}`),e.var(Dt.default.rootData,(0,ut._)`${Dt.default.valCxt}.${Dt.default.rootData}`),t.dynamicRef&&e.var(Dt.default.dynamicAnchors,(0,ut._)`${Dt.default.valCxt}.${Dt.default.dynamicAnchors}`)},()=>{e.var(Dt.default.instancePath,(0,ut._)`""`),e.var(Dt.default.parentData,(0,ut._)`undefined`),e.var(Dt.default.parentDataProperty,(0,ut._)`undefined`),e.var(Dt.default.rootData,Dt.default.data),t.dynamicRef&&e.var(Dt.default.dynamicAnchors,(0,ut._)`{}`)})}function YLe(e){let{schema:t,opts:r,gen:n}=e;WK(e,()=>{r.$comment&&t.$comment&&XK(e),eFe(e),n.let(Dt.default.vErrors,null),n.let(Dt.default.errors,0),r.unevaluated&&JLe(e),KK(e),nFe(e)})}function JLe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ut._)`${r}.evaluated`),t.if((0,ut._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ut._)`${e.evaluated}.props`,(0,ut._)`undefined`)),t.if((0,ut._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ut._)`${e.evaluated}.items`,(0,ut._)`undefined`))}function qK(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ut._)`/*# sourceURL=${r} */`:ut.nil}function ZLe(e,t){if(JK(e)&&(ZK(e),YK(e))){KLe(e,t);return}(0,GK.boolOrEmptySchema)(e,t)}function YK({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function JK(e){return typeof e.schema!="boolean"}function KLe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&XK(e),tFe(e),rFe(e);let s=n.const("_errs",Dt.default.errors);KK(e,s),n.var(t,(0,ut._)`${s} === ${Dt.default.errors}`)}function ZK(e){(0,Iu.checkUnknownRules)(e),XLe(e)}function KK(e,t){if(e.opts.jtd)return zK(e,[],!1,t);let r=(0,jK.getSchemaTypes)(e.schema),n=(0,jK.coerceAndCheckDataType)(e,r);zK(e,r,!n,t)}function XLe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Iu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function eFe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Iu.checkStrictMode)(e,"default is ignored in the schema root")}function tFe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,zLe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function rFe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function XK({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code((0,ut._)`${Dt.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=(0,ut.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,ut._)`${Dt.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function nFe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if((0,ut._)`${Dt.default.errors} === 0`,()=>t.return(Dt.default.data),()=>t.throw((0,ut._)`new ${i}(${Dt.default.vErrors})`)):(t.assign((0,ut._)`${n}.errors`,Dt.default.vErrors),s.unevaluated&&iFe(e),t.return((0,ut._)`${Dt.default.errors} === 0`))}function iFe({gen:e,evaluated:t,props:r,items:n}){r instanceof ut.Name&&e.assign((0,ut._)`${t}.props`,r),n instanceof ut.Name&&e.assign((0,ut._)`${t}.items`,n)}function zK(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,Iu.schemaHasRulesButRef)(s,l))){i.block(()=>tX(e,"$ref",l.all.$ref.definition));return}c.jtd||sFe(e,t),i.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,fL.shouldUseGroup)(s,f)&&(f.type?(i.if((0,Jx.checkDataType)(f.type,o,c.strictNumbers)),VK(e,f),t.length===1&&t[0]===f.type&&r&&(i.else(),(0,Jx.reportTypeError)(e)),i.endIf()):VK(e,f),a||i.if((0,ut._)`${Dt.default.errors} === ${n||0}`))}}function VK(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,qLe.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,fL.shouldUseRule)(n,s)&&tX(e,s.keyword,s.definition,t.type)})}function sFe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(oFe(e,t),e.opts.allowUnionTypes||aFe(e,t),cFe(e,e.dataTypes))}function oFe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{eX(e.dataTypes,r)||pL(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),lFe(e,t)}}function aFe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&pL(e,"use allowUnionTypes to allow union type keyword")}function cFe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,fL.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;s.length&&!s.some(o=>uFe(t,o))&&pL(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function uFe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function eX(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function lFe(e,t){let r=[];for(let n of e.dataTypes)eX(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function pL(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Iu.checkStrictMode)(e,t,e.opts.strictTypes)}var Zx=class{constructor(t,r,n){if((0,Pb.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Iu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",rX(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Pb.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Dt.default.errors))}result(t,r,n){this.failResult((0,ut.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ut.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ut._)`${r} !== undefined && (${(0,ut.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Mb.reportExtraError:Mb.reportError)(this,this.def.error,r)}$dataError(){(0,Mb.reportError)(this,this.def.$dataError||Mb.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Mb.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ut.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ut.nil,r=ut.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,ut.or)((0,ut._)`${i} === undefined`,r)),t!==ut.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ut.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,ut.or)(o(),a());function o(){if(n.length){if(!(r instanceof ut.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ut._)`${(0,Jx.checkDataTypes)(c,r,s.opts.strictNumbers,Jx.DataType.Wrong)}`}return ut.nil}function a(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ut._)`!${c}(${r})`}return ut.nil}}subschema(t,r){let n=(0,dL.getSubschema)(this.it,t);(0,dL.extendSubschemaData)(n,this.it,t),(0,dL.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return ZLe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Iu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Iu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ut.Name)),!0}};zl.KeywordCxt=Zx;function tX(e,t,r,n){let i=new Zx(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pb.funcKeywordCode)(i,r):"macro"in r?(0,Pb.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pb.funcKeywordCode)(i,r)}var dFe=/^\/(?:[^~]|~0|~1)*$/,fFe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function rX(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return Dt.default.rootData;if(e[0]==="/"){if(!dFe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=Dt.default.rootData}else{let u=fFe.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=t)throw new Error(c("property/index",l));return n[t-l]}if(l>t)throw new Error(c("data",l));if(s=r[t-l],!i)return s}let o=s,a=i.split("/");for(let u of a)u&&(s=(0,ut._)`${s}${(0,ut.getProperty)((0,Iu.unescapeJsonPointer)(u))}`,o=(0,ut._)`${o} && ${s}`);return o;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}zl.getData=rX});var Kx=B(AL=>{"use strict";Object.defineProperty(AL,"__esModule",{value:!0});var hL=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};AL.default=hL});var Fb=B(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});var gL=Nb(),mL=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,gL.resolveUrl)(t,r,n),this.missingSchema=(0,gL.normalizeId)((0,gL.getFullPath)(t,this.missingRef))}};yL.default=mL});var eB=B(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.resolveSchema=Uo.getCompilingSchema=Uo.resolveRef=Uo.compileSchema=Uo.SchemaEnv=void 0;var Oa=Vt(),pFe=Kx(),Of=wu(),Ua=Nb(),nX=yr(),hFe=Lb(),sg=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ua.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Uo.SchemaEnv=sg;function EL(e){let t=iX.call(this,e);if(t)return t;let r=(0,Ua.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new Oa.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;e.$async&&(a=o.scopeValue("Error",{ref:pFe.default,code:(0,Oa._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");e.validateName=c;let u={gen:o,allErrors:this.opts.allErrors,data:Of.default.data,parentData:Of.default.parentData,parentDataProperty:Of.default.parentDataProperty,dataNames:[Of.default.data],dataPathArr:[Oa.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Oa.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Oa.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Oa._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,hFe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let d=o.toString();l=`${o.scopeRefs(Of.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let p=new Function(`${Of.default.self}`,`${Of.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:h,items:A}=u;p.evaluated={props:h instanceof Oa.Name?void 0:h,items:A instanceof Oa.Name?void 0:A,dynamicProps:h instanceof Oa.Name,dynamicItems:A instanceof Oa.Name},p.source&&(p.source.evaluated=(0,Oa.stringify)(p.evaluated))}return e.validate=p,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Uo.compileSchema=EL;function AFe(e,t,r){var n;r=(0,Ua.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=yFe.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new sg({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=gFe.call(this,s)}Uo.resolveRef=AFe;function gFe(e){return(0,Ua.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:EL.call(this,e)}function iX(e){for(let t of this._compilations)if(mFe(t,e))return t}Uo.getCompilingSchema=iX;function mFe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function yFe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Xx.call(this,e,t)}function Xx(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Ua._getFullPath)(this.opts.uriResolver,r),i=(0,Ua.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return bL.call(this,r,e);let s=(0,Ua.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=Xx.call(this,e,o);return typeof a?.schema!="object"?void 0:bL.call(this,r,a)}if(typeof o?.schema=="object"){if(o.validate||EL.call(this,o),s===(0,Ua.normalizeId)(t)){let{schema:a}=o,{schemaId:c}=this.opts,u=a[c];return u&&(i=(0,Ua.resolveUrl)(this.opts.uriResolver,i,u)),new sg({schema:a,schemaId:c,root:e,baseId:i})}return bL.call(this,r,o)}}Uo.resolveSchema=Xx;var bFe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function bL(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,nX.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!bFe.has(a)&&u&&(t=(0,Ua.resolveUrl)(this.opts.uriResolver,t,u))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,nX.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Ua.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Xx.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new sg({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var sX=B((jUt,EFe)=>{EFe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var IL=B((qUt,dX)=>{"use strict";var CFe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),aX=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),CL=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),cX=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),wFe=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function wL(e){let t="",r=0,n=0;for(n=0;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var IFe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function oX(e){return e.length=0,!0}function SFe(e,t,r){if(e.length){let n=wL(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function vFe(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,o=!1,a=SFe;for(let c=0;c7){r.error=!0;break}c>0&&e[c-1]===":"&&(s=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=oX}else{i.push(u);continue}}return i.length&&(a===oX?r.zone=i.join(""):o?n.push(i.join("")):n.push(wL(i))),r.address=n.join(""),r}function uX(e){if(xFe(e,":")<2)return{host:e,isIPV6:!1};let t=vFe(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function xFe(e,t){let r=0;for(let n=0;nkFe[n])}function RFe(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n{"use strict";var{isUUID:MFe}=IL(),PFe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,LFe=["http","https","ws","wss","urn","urn:uuid"];function FFe(e){return LFe.indexOf(e)!==-1}function SL(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function fX(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function pX(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function OFe(e){return e.secure=SL(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function UFe(e){if((e.port===(SL(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function $Fe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(PFe);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,s=vL(i);e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function HFe(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,s=vL(i);s&&(e=s.serialize(e,t));let o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o}function jFe(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!MFe(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function qFe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var hX={scheme:"http",domainHost:!0,parse:fX,serialize:pX},zFe={scheme:"https",domainHost:hX.domainHost,parse:fX,serialize:pX},tB={scheme:"ws",domainHost:!0,parse:OFe,serialize:UFe},VFe={scheme:"wss",domainHost:tB.domainHost,parse:tB.parse,serialize:tB.serialize},GFe={scheme:"urn",parse:$Fe,serialize:HFe,skipNormalize:!0},WFe={scheme:"urn:uuid",parse:jFe,serialize:qFe,skipNormalize:!0},rB={http:hX,https:zFe,ws:tB,wss:VFe,urn:GFe,"urn:uuid":WFe};Object.setPrototypeOf(rB,null);function vL(e){return e&&(rB[e]||rB[e.toLowerCase()])||void 0}AX.exports={wsIsSecure:SL,SCHEMES:rB,isValidSchemeName:FFe,getSchemeHandler:vL}});var CX=B((VUt,sB)=>{"use strict";var{normalizeIPv6:YFe,removeDotSegments:Ob,recomposeAuthority:JFe,normalizePercentEncoding:ZFe,normalizePathEncoding:KFe,escapePreservingEscapes:XFe,reescapeHostDelimiters:eOe,isIPv4:tOe,nonSimpleDomain:rOe}=IL(),{SCHEMES:nOe,getSchemeHandler:yX}=gX();function iOe(e,t){return typeof e=="string"?e=dOe(e,t):typeof e=="object"&&(e=iB(Uf(e,t),t)),e}function sOe(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:s}=nB(e,n),{parsed:o,malformedAuthorityOrPort:a}=nB(t,n);if(s||a)throw new Error(i.error||o.error||"URI is malformed.");let c=bX(i,o,n,!0);return n.skipEscape=!0,Uf(c,n)}function bX(e,t,r,n){let i={};return n||(e=iB(Uf(e,r),r),t=iB(Uf(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Ob(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Ob(t.path||""),i.query=t.query):(t.path?(t.path[0]==="/"?i.path=Ob(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=Ob(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function oOe(e,t,r){let n=mX(e,r),i=mX(t,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Uf(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=yX(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=ZFe(r.path):(r.path=XFe(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let o=JFe(r);if(o!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(o),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=Ob(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var aOe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,cOe=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,uOe=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function lOe(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function nB(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,s=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let o=e.match(cOe);o!==null&&o[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let a=e.match(uOe);if(a!==null){let u=a[1],l=u.replace(/[\t\n\r]/g,"");l.length>=2&&(l.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",i=!0):u.length!==l.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",i=!0))}let c=e.match(aOe);if(c){n.scheme=c[1],n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]);let u=lOe(n,c);if(u!==void 0&&(n.error=n.error||u,i=!0),n.host)if(tOe(n.host)===!1){let f=YFe(n.host);n.host=f.host.toLowerCase(),s=f.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=yX(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&rOe(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(d){n.error=n.error||"Host's domain name can not be converted to ASCII: "+d}if((!l||l&&!l.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=eOe(unescape(n.host),s))),n.path&&(n.path=KFe(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function iB(e,t){return nB(e,t).parsed}function dOe(e,t){return EX(e,t).normalized}function EX(e,t){let{parsed:r,malformedAuthorityOrPort:n}=nB(e,t);return{normalized:n?e:Uf(r,t),malformedAuthorityOrPort:n}}function mX(e,t){if(typeof e=="string"){let{normalized:r,malformedAuthorityOrPort:n}=EX(e,t);return n?void 0:r}if(typeof e=="object")return Uf(e,t)}var xL={SCHEMES:nOe,normalize:iOe,resolve:sOe,resolveComponent:bX,equal:oOe,serialize:Uf,parse:iB};sB.exports=xL;sB.exports.default=xL;sB.exports.fastUri=xL});var IX=B(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});var wX=CX();wX.code='require("ajv/dist/runtime/uri").default';BL.default=wX});var RX=B(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.CodeGen=Bi.Name=Bi.nil=Bi.stringify=Bi.str=Bi._=Bi.KeywordCxt=void 0;var fOe=Lb();Object.defineProperty(Bi,"KeywordCxt",{enumerable:!0,get:function(){return fOe.KeywordCxt}});var og=Vt();Object.defineProperty(Bi,"_",{enumerable:!0,get:function(){return og._}});Object.defineProperty(Bi,"str",{enumerable:!0,get:function(){return og.str}});Object.defineProperty(Bi,"stringify",{enumerable:!0,get:function(){return og.stringify}});Object.defineProperty(Bi,"nil",{enumerable:!0,get:function(){return og.nil}});Object.defineProperty(Bi,"Name",{enumerable:!0,get:function(){return og.Name}});Object.defineProperty(Bi,"CodeGen",{enumerable:!0,get:function(){return og.CodeGen}});var pOe=Kx(),kX=Fb(),hOe=tL(),Ub=eB(),AOe=Vt(),$b=Nb(),oB=Db(),_L=yr(),SX=sX(),gOe=IX(),_X=(e,t)=>new RegExp(e,t);_X.code="new RegExp";var mOe=["removeAdditional","useDefaults","coerceTypes"],yOe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),bOe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},EOe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},vX=200;function COe(e){var t,r,n,i,s,o,a,c,u,l,d,f,p,h,A,g,m,b,C,E,w,T,_,D,k;let v=e.strict,M=(t=e.code)===null||t===void 0?void 0:t.optimize,F=M===!0||M===void 0?1:M||0,S=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:_X,I=(i=e.uriResolver)!==null&&i!==void 0?i:gOe.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:v)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:v)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:v)!==null&&l!==void 0?l:"log",strictTuples:(f=(d=e.strictTuples)!==null&&d!==void 0?d:v)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=e.strictRequired)!==null&&p!==void 0?p:v)!==null&&h!==void 0?h:!1,code:e.code?{...e.code,optimize:F,regExp:S}:{optimize:F,regExp:S},loopRequired:(A=e.loopRequired)!==null&&A!==void 0?A:vX,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:vX,meta:(m=e.meta)!==null&&m!==void 0?m:!0,messages:(b=e.messages)!==null&&b!==void 0?b:!0,inlineRefs:(C=e.inlineRefs)!==null&&C!==void 0?C:!0,schemaId:(E=e.schemaId)!==null&&E!==void 0?E:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(T=e.validateSchema)!==null&&T!==void 0?T:!0,validateFormats:(_=e.validateFormats)!==null&&_!==void 0?_:!0,unicodeRegExp:(D=e.unicodeRegExp)!==null&&D!==void 0?D:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:I}}var Hb=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...COe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new AOe.ValueScope({scope:{},prefixes:yOe,es5:r,lines:n}),this.logger=BOe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,hOe.getRules)(),xX.call(this,bOe,t,"NOT SUPPORTED"),xX.call(this,EOe,t,"DEPRECATED","warn"),this._metaOpts=vOe.call(this),t.formats&&IOe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&SOe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),wOe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=SX;n==="id"&&(i={...SX},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(l,d){await s.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||o.call(this,f)}async function s(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof kX.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),o.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await s.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let o of t)this.addSchema(o,void 0,n,i);return this}let s;if(typeof t=="object"){let{schemaId:o}=this.opts;if(s=t[o],s!==void 0&&typeof s!="string")throw new Error(`schema ${o} must be string`)}return r=(0,$b.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(t){let r;for(;typeof(r=BX.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ub.SchemaEnv({schema:{},schemaId:n});if(r=Ub.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=BX.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,$b.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(_Oe.call(this,n,r),!r)return(0,_L.eachItem)(n,s=>kL.call(this,s)),this;ROe.call(this,r);let i={...r,type:(0,oB.getJSONTypes)(r.type),schemaType:(0,oB.getJSONTypes)(r.schemaType)};return(0,_L.eachItem)(n,i.type.length===0?s=>kL.call(this,s,i):s=>i.type.forEach(o=>kL.call(this,s,i,o))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,s)=>i+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let s=i.split("/").slice(1),o=t;for(let a of s)o=o[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=o[a];u&&l&&(o[a]=TX(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let o,{schemaId:a}=this.opts;if(typeof t=="object")o=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,$b.normalizeId)(o||n);let u=$b.getSchemaRefs.call(this,t,n);return c=new Ub.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ub.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ub.compileSchema.call(this,t)}finally{this.opts=r}}};Hb.ValidationError=pOe.default;Hb.MissingRefError=kX.default;Bi.default=Hb;function xX(e,t,r,n="error"){for(let i in e){let s=i;s in t&&this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function BX(e){return e=(0,$b.normalizeId)(e),this.schemas[e]||this.refs[e]}function wOe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function IOe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function SOe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function vOe(){let e={...this.opts};for(let t of mOe)delete e[t];return e}var xOe={log(){},warn(){},error(){}};function BOe(e){if(e===!1)return xOe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var kOe=/^[a-z_$][a-z0-9_$:-]*$/i;function _Oe(e,t){let{RULES:r}=this;if((0,_L.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!kOe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function kL(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,oB.getJSONTypes)(t.type),schemaType:(0,oB.getJSONTypes)(t.schemaType)}};t.before?TOe.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function TOe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function ROe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=TX(t)),e.validateSchema=this.compile(t,!0))}var QOe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function TX(e){return{anyOf:[e,QOe]}}});var QX=B(TL=>{"use strict";Object.defineProperty(TL,"__esModule",{value:!0});var DOe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};TL.default=DOe});var PX=B($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.callRef=$f.getValidate=void 0;var NOe=Fb(),DX=Oo(),Ls=Vt(),ag=wu(),NX=eB(),aB=yr(),MOe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:c}=n,{root:u}=s;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=NX.resolveRef.call(c,u,i,r);if(l===void 0)throw new NOe.default(n.opts.uriResolver,i,r);if(l instanceof NX.SchemaEnv)return f(l);return p(l);function d(){if(s===u)return cB(e,o,s,s.$async);let h=t.scopeValue("root",{ref:u});return cB(e,(0,Ls._)`${h}.validate`,u,u.$async)}function f(h){let A=MX(e,h);cB(e,A,h,h.$async)}function p(h){let A=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,Ls.stringify)(h)}:{ref:h}),g=t.name("valid"),m=e.subschema({schema:h,dataTypes:[],schemaPath:Ls.nil,topSchemaRef:A,errSchemaPath:r},g);e.mergeEvaluated(m),e.ok(g)}}};function MX(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ls._)`${r.scopeValue("wrapper",{ref:t})}.validate`}$f.getValidate=MX;function cB(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:c}=s,u=c.passContext?ag.default.this:Ls.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let h=i.let("valid");i.try(()=>{i.code((0,Ls._)`await ${(0,DX.callValidateCode)(e,t,u)}`),p(t),o||i.assign(h,!0)},A=>{i.if((0,Ls._)`!(${A} instanceof ${s.ValidationError})`,()=>i.throw(A)),f(A),o||i.assign(h,!1)}),e.ok(h)}function d(){e.result((0,DX.callValidateCode)(e,t,u),()=>p(t),()=>f(t))}function f(h){let A=(0,Ls._)`${h}.errors`;i.assign(ag.default.vErrors,(0,Ls._)`${ag.default.vErrors} === null ? ${A} : ${ag.default.vErrors}.concat(${A})`),i.assign(ag.default.errors,(0,Ls._)`${ag.default.vErrors}.length`)}function p(h){var A;if(!s.opts.unevaluated)return;let g=(A=r?.validate)===null||A===void 0?void 0:A.evaluated;if(s.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(s.props=aB.mergeEvaluated.props(i,g.props,s.props));else{let m=i.var("props",(0,Ls._)`${h}.evaluated.props`);s.props=aB.mergeEvaluated.props(i,m,s.props,Ls.Name)}if(s.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(s.items=aB.mergeEvaluated.items(i,g.items,s.items));else{let m=i.var("items",(0,Ls._)`${h}.evaluated.items`);s.items=aB.mergeEvaluated.items(i,m,s.items,Ls.Name)}}}$f.callRef=cB;$f.default=MOe});var LX=B(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});var POe=QX(),LOe=PX(),FOe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",POe.default,LOe.default];RL.default=FOe});var FX=B(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});var uB=Vt(),Vl=uB.operators,lB={maximum:{okStr:"<=",ok:Vl.LTE,fail:Vl.GT},minimum:{okStr:">=",ok:Vl.GTE,fail:Vl.LT},exclusiveMaximum:{okStr:"<",ok:Vl.LT,fail:Vl.GTE},exclusiveMinimum:{okStr:">",ok:Vl.GT,fail:Vl.LTE}},OOe={message:({keyword:e,schemaCode:t})=>(0,uB.str)`must be ${lB[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,uB._)`{comparison: ${lB[e].okStr}, limit: ${t}}`},UOe={keyword:Object.keys(lB),type:"number",schemaType:"number",$data:!0,error:OOe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,uB._)`${r} ${lB[t].fail} ${n} || isNaN(${r})`)}};QL.default=UOe});var OX=B(DL=>{"use strict";Object.defineProperty(DL,"__esModule",{value:!0});var jb=Vt(),$Oe={message:({schemaCode:e})=>(0,jb.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,jb._)`{multipleOf: ${e}}`},HOe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:$Oe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,jb._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,jb._)`${o} !== parseInt(${o})`;e.fail$data((0,jb._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};DL.default=HOe});var $X=B(NL=>{"use strict";Object.defineProperty(NL,"__esModule",{value:!0});function UX(e){let t=e.length,r=0,n=0,i;for(;n=55296&&i<=56319&&n{"use strict";Object.defineProperty(ML,"__esModule",{value:!0});var Hf=Vt(),jOe=yr(),qOe=$X(),zOe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Hf.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Hf._)`{limit: ${e}}`},VOe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:zOe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Hf.operators.GT:Hf.operators.LT,o=i.opts.unicode===!1?(0,Hf._)`${r}.length`:(0,Hf._)`${(0,jOe.useFunc)(e.gen,qOe.default)}(${r})`;e.fail$data((0,Hf._)`${o} ${s} ${n}`)}};ML.default=VOe});var jX=B(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var GOe=Oo(),WOe=yr(),cg=Vt(),YOe={message:({schemaCode:e})=>(0,cg.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,cg._)`{pattern: ${e}}`},JOe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:YOe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e,a=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,u=c.code==="new RegExp"?(0,cg._)`new RegExp`:(0,WOe.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,cg._)`${u}(${s}, ${a}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,cg._)`!${l}`)}else{let c=(0,GOe.usePattern)(e,i);e.fail$data((0,cg._)`!${c}.test(${r})`)}}};PL.default=JOe});var qX=B(LL=>{"use strict";Object.defineProperty(LL,"__esModule",{value:!0});var qb=Vt(),ZOe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,qb.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,qb._)`{limit: ${e}}`},KOe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ZOe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?qb.operators.GT:qb.operators.LT;e.fail$data((0,qb._)`Object.keys(${r}).length ${i} ${n}`)}};LL.default=KOe});var zX=B(FL=>{"use strict";Object.defineProperty(FL,"__esModule",{value:!0});var zb=Oo(),Vb=Vt(),XOe=yr(),e6e={message:({params:{missingProperty:e}})=>(0,Vb.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Vb._)`{missingProperty: ${e}}`},t6e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:e6e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors?u():l(),a.strictRequired){let p=e.parentSchema.properties,{definedProperties:h}=e.it;for(let A of r)if(p?.[A]===void 0&&!h.has(A)){let g=o.schemaEnv.baseId+o.errSchemaPath,m=`required property "${A}" is not defined at "${g}" (strictRequired)`;(0,XOe.checkStrictMode)(o,m,o.opts.strictRequired)}}function u(){if(c||s)e.block$data(Vb.nil,d);else for(let p of r)(0,zb.checkReportMissingProp)(e,p)}function l(){let p=t.let("missing");if(c||s){let h=t.let("valid",!0);e.block$data(h,()=>f(p,h)),e.ok(h)}else t.if((0,zb.checkMissingProp)(e,r,p)),(0,zb.reportMissingProp)(e,p),t.else()}function d(){t.forOf("prop",n,p=>{e.setParams({missingProperty:p}),t.if((0,zb.noPropertyInData)(t,i,p,a.ownProperties),()=>e.error())})}function f(p,h){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(h,(0,zb.propertyInData)(t,i,p,a.ownProperties)),t.if((0,Vb.not)(h),()=>{e.error(),t.break()})},Vb.nil)}}};FL.default=t6e});var VX=B(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var Gb=Vt(),r6e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Gb.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Gb._)`{limit: ${e}}`},n6e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r6e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Gb.operators.GT:Gb.operators.LT;e.fail$data((0,Gb._)`${r}.length ${i} ${n}`)}};OL.default=n6e});var dB=B(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});var GX=uL();GX.code='require("ajv/dist/runtime/equal").default';UL.default=GX});var WX=B(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});var $L=Db(),ki=Vt(),i6e=yr(),s6e=dB(),o6e={message:({params:{i:e,j:t}})=>(0,ki.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,ki._)`{i: ${e}, j: ${t}}`},a6e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o6e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),u=s.items?(0,$L.getSchemaTypes)(s.items):[];e.block$data(c,l,(0,ki._)`${o} === false`),e.ok(c);function l(){let h=t.let("i",(0,ki._)`${r}.length`),A=t.let("j");e.setParams({i:h,j:A}),t.assign(c,!0),t.if((0,ki._)`${h} > 1`,()=>(d()?f:p)(h,A))}function d(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function f(h,A){let g=t.name("item"),m=(0,$L.checkDataTypes)(u,g,a.opts.strictNumbers,$L.DataType.Wrong),b=t.const("indices",(0,ki._)`{}`);t.for((0,ki._)`;${h}--;`,()=>{t.let(g,(0,ki._)`${r}[${h}]`),t.if(m,(0,ki._)`continue`),u.length>1&&t.if((0,ki._)`typeof ${g} == "string"`,(0,ki._)`${g} += "_"`),t.if((0,ki._)`typeof ${b}[${g}] == "number"`,()=>{t.assign(A,(0,ki._)`${b}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,ki._)`${b}[${g}] = ${h}`)})}function p(h,A){let g=(0,i6e.useFunc)(t,s6e.default),m=t.name("outer");t.label(m).for((0,ki._)`;${h}--;`,()=>t.for((0,ki._)`${A} = ${h}; ${A}--;`,()=>t.if((0,ki._)`${g}(${r}[${h}], ${r}[${A}])`,()=>{e.error(),t.assign(c,!1).break(m)})))}}};HL.default=a6e});var YX=B(qL=>{"use strict";Object.defineProperty(qL,"__esModule",{value:!0});var jL=Vt(),c6e=yr(),u6e=dB(),l6e={message:"must be equal to constant",params:({schemaCode:e})=>(0,jL._)`{allowedValue: ${e}}`},d6e={keyword:"const",$data:!0,error:l6e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,jL._)`!${(0,c6e.useFunc)(t,u6e.default)}(${r}, ${i})`):e.fail((0,jL._)`${s} !== ${r}`)}};qL.default=d6e});var JX=B(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var Wb=Vt(),f6e=yr(),p6e=dB(),h6e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Wb._)`{allowedValues: ${e}}`},A6e={keyword:"enum",schemaType:"array",$data:!0,error:h6e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,c,u=()=>c??(c=(0,f6e.useFunc)(t,p6e.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=t.const("vSchema",s);l=(0,Wb.or)(...i.map((h,A)=>f(p,A)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",s,p=>t.if((0,Wb._)`${u()}(${r}, ${p})`,()=>t.assign(l,!0).break()))}function f(p,h){let A=i[h];return typeof A=="object"&&A!==null?(0,Wb._)`${u()}(${r}, ${p}[${h}])`:(0,Wb._)`${r} === ${A}`}}};zL.default=A6e});var ZX=B(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});var g6e=FX(),m6e=OX(),y6e=HX(),b6e=jX(),E6e=qX(),C6e=zX(),w6e=VX(),I6e=WX(),S6e=YX(),v6e=JX(),x6e=[g6e.default,m6e.default,y6e.default,b6e.default,E6e.default,C6e.default,w6e.default,I6e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},S6e.default,v6e.default];VL.default=x6e});var WL=B(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});Yb.validateAdditionalItems=void 0;var jf=Vt(),GL=yr(),B6e={message:({params:{len:e}})=>(0,jf.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,jf._)`{limit: ${e}}`},k6e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:B6e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,GL.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}KX(e,n)}};function KX(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",(0,jf._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,jf._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,GL.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,jf._)`${a} <= ${t.length}`);r.if((0,jf.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:GL.Type.Num},u),o.allErrors||r.if((0,jf.not)(u),()=>r.break())})}}Yb.validateAdditionalItems=KX;Yb.default=k6e});var YL=B(Jb=>{"use strict";Object.defineProperty(Jb,"__esModule",{value:!0});Jb.validateTuple=void 0;var XX=Vt(),fB=yr(),_6e=Oo(),T6e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return eee(e,"additionalItems",t);r.items=!0,!(0,fB.alwaysValidSchema)(r,t)&&e.ok((0,_6e.validateArray)(e))}};function eee(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;l(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=fB.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,XX._)`${s}.length`);r.forEach((d,f)=>{(0,fB.alwaysValidSchema)(a,d)||(n.if((0,XX._)`${u} > ${f}`,()=>e.subschema({keyword:o,schemaProp:f,dataProp:f},c)),e.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=a,h=r.length,A=h===d.minItems&&(h===d.maxItems||d[t]===!1);if(f.strictTuples&&!A){let g=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,fB.checkStrictMode)(a,g,f.strictTuples)}}}Jb.validateTuple=eee;Jb.default=T6e});var tee=B(JL=>{"use strict";Object.defineProperty(JL,"__esModule",{value:!0});var R6e=YL(),Q6e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,R6e.validateTuple)(e,"items")};JL.default=Q6e});var nee=B(ZL=>{"use strict";Object.defineProperty(ZL,"__esModule",{value:!0});var ree=Vt(),D6e=yr(),N6e=Oo(),M6e=WL(),P6e={message:({params:{len:e}})=>(0,ree.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ree._)`{limit: ${e}}`},L6e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:P6e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,D6e.alwaysValidSchema)(n,t)&&(i?(0,M6e.validateAdditionalItems)(e,i):e.ok((0,N6e.validateArray)(e)))}};ZL.default=L6e});var iee=B(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});var $o=Vt(),pB=yr(),F6e={message:({params:{min:e,max:t}})=>t===void 0?(0,$o.str)`must contain at least ${e} valid item(s)`:(0,$o.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,$o._)`{minContains: ${e}}`:(0,$o._)`{minContains: ${e}, maxContains: ${t}}`},O6e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:F6e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:c,maxContains:u}=n;s.opts.next?(o=c===void 0?1:c,a=u):o=1;let l=t.const("len",(0,$o._)`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,pB.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,pB.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,pB.alwaysValidSchema)(s,r)){let A=(0,$o._)`${l} >= ${o}`;a!==void 0&&(A=(0,$o._)`${A} && ${l} <= ${a}`),e.pass(A);return}s.items=!0;let d=t.name("valid");a===void 0&&o===1?p(d,()=>t.if(d,()=>t.break())):o===0?(t.let(d,!0),a!==void 0&&t.if((0,$o._)`${i}.length > 0`,f)):(t.let(d,!1),f()),e.result(d,()=>e.reset());function f(){let A=t.name("_valid"),g=t.let("count",0);p(A,()=>t.if(A,()=>h(g)))}function p(A,g){t.forRange("i",0,l,m=>{e.subschema({keyword:"contains",dataProp:m,dataPropType:pB.Type.Num,compositeRule:!0},A),g()})}function h(A){t.code((0,$o._)`${A}++`),a===void 0?t.if((0,$o._)`${A} >= ${o}`,()=>t.assign(d,!0).break()):(t.if((0,$o._)`${A} > ${a}`,()=>t.assign(d,!1).break()),o===1?t.assign(d,!0):t.if((0,$o._)`${A} >= ${o}`,()=>t.assign(d,!0)))}}};KL.default=O6e});var aee=B(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.validateSchemaDeps=Cc.validatePropertyDeps=Cc.error=void 0;var XL=Vt(),U6e=yr(),Zb=Oo();Cc.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,XL.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,XL._)`{property: ${e}, missingProperty: ${n}, depsCount: ${t}, - deps: ${r}}`};var R6e={keyword:"dependencies",type:"object",schemaType:"object",error:bc.error,code(e){let[t,r]=Q6e(e);JX(e,t),ZX(e,r)}};function Q6e({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function JX(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let c=(0,Gb.propertyInData)(r,n,o,i.opts.ownProperties);e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of a)(0,Gb.checkReportMissingProp)(e,u)}):(r.if((0,GL._)`${c} && (${(0,Gb.checkMissingProp)(e,a,s)})`),(0,Gb.reportMissingProp)(e,s),r.else())}}bc.validatePropertyDeps=JX;function ZX(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,o=r.name("valid");for(let a in t)(0,T6e.alwaysValidSchema)(s,t[a])||(r.if((0,Gb.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},o);e.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),e.ok(o))}bc.validateSchemaDeps=ZX;bc.default=R6e});var eee=B(WL=>{"use strict";Object.defineProperty(WL,"__esModule",{value:!0});var XX=qt(),D6e=gr(),N6e={message:"property name must be valid",params:({params:e})=>(0,XX._)`{propertyName: ${e.propertyName}}`},M6e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:N6e,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,D6e.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,XX.not)(s),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(s)}};WL.default=M6e});var JL=B(YL=>{"use strict";Object.defineProperty(YL,"__esModule",{value:!0});var uB=Fo(),Fa=qt(),P6e=Cu(),lB=gr(),L6e={message:"must NOT have additional properties",params:({params:e})=>(0,Fa._)`{additionalProperty: ${e.additionalProperty}}`},F6e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:L6e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,lB.alwaysValidSchema)(o,r))return;let u=(0,uB.allSchemaProperties)(n.properties),l=(0,uB.allSchemaProperties)(n.patternProperties);d(),e.ok((0,Fa._)`${s} === ${P6e.default.errors}`);function d(){t.forIn("key",i,g=>{!u.length&&!l.length?h(g):t.if(f(g),()=>h(g))})}function f(g){let m;if(u.length>8){let b=(0,lB.schemaRefOrVal)(o,n.properties,"properties");m=(0,uB.isOwnProperty)(t,b,g)}else u.length?m=(0,Fa.or)(...u.map(b=>(0,Fa._)`${g} === ${b}`)):m=Fa.nil;return l.length&&(m=(0,Fa.or)(m,...l.map(b=>(0,Fa._)`${(0,uB.usePattern)(e,b)}.test(${g})`))),(0,Fa.not)(m)}function p(g){t.code((0,Fa._)`delete ${i}[${g}]`)}function h(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,lB.alwaysValidSchema)(o,r)){let m=t.name("valid");c.removeAdditional==="failing"?(A(g,m,!1),t.if((0,Fa.not)(m),()=>{e.reset(),p(g)})):(A(g,m),a||t.if((0,Fa.not)(m),()=>t.break()))}}function A(g,m,b){let E={keyword:"additionalProperties",dataProp:g,dataPropType:lB.Type.Str};b===!1&&Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(E,m)}}};YL.default=F6e});var nee=B(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});var O6e=Db(),tee=Fo(),ZL=gr(),ree=JL(),U6e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ree.default.code(new O6e.KeywordCxt(s,ree.default,"additionalProperties"));let o=(0,tee.allSchemaProperties)(r);for(let d of o)s.definedProperties.add(d);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=ZL.mergeEvaluated.props(t,(0,ZL.toHash)(o),s.props));let a=o.filter(d=>!(0,ZL.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,tee.propertyInData)(t,i,d,s.opts.ownProperties)),l(d),s.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};KL.default=U6e});var aee=B(XL=>{"use strict";Object.defineProperty(XL,"__esModule",{value:!0});var iee=Fo(),dB=qt(),see=gr(),oee=gr(),$6e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,a=(0,iee.allSchemaProperties)(r),c=a.filter(A=>(0,see.alwaysValidSchema)(s,r[A]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof dB.Name)&&(s.props=(0,oee.evaluatedPropsToName)(t,s.props));let{props:d}=s;f();function f(){for(let A of a)u&&p(A),s.allErrors?h(A):(t.var(l,!0),h(A),t.if(l))}function p(A){for(let g in u)new RegExp(A).test(g)&&(0,see.checkStrictMode)(s,`property ${g} matches pattern ${A} (use allowMatchingProperties)`)}function h(A){t.forIn("key",n,g=>{t.if((0,dB._)`${(0,iee.usePattern)(e,A)}.test(${g})`,()=>{let m=c.includes(A);m||e.subschema({keyword:"patternProperties",schemaProp:A,dataProp:g,dataPropType:oee.Type.Str},l),s.opts.unevaluated&&d!==!0?t.assign((0,dB._)`${d}[${g}]`,!0):!m&&!s.allErrors&&t.if((0,dB.not)(l),()=>t.break())})})}}};XL.default=$6e});var cee=B(eF=>{"use strict";Object.defineProperty(eF,"__esModule",{value:!0});var H6e=gr(),j6e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,H6e.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};eF.default=j6e});var uee=B(tF=>{"use strict";Object.defineProperty(tF,"__esModule",{value:!0});var q6e=Fo(),z6e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:q6e.validateUnion,error:{message:"must match a schema in anyOf"}};tF.default=z6e});var lee=B(rF=>{"use strict";Object.defineProperty(rF,"__esModule",{value:!0});var fB=qt(),V6e=gr(),G6e={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,fB._)`{passingSchemas: ${e.passing}}`},W6e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G6e,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(o,()=>e.reset(),()=>e.error(!0));function u(){s.forEach((l,d)=>{let f;(0,V6e.alwaysValidSchema)(i,l)?t.var(c,!0):f=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,fB._)`${c} && ${o}`).assign(o,!1).assign(a,(0,fB._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(o,!0),t.assign(a,d),f&&e.mergeEvaluated(f,fB.Name)})})}}};rF.default=W6e});var dee=B(nF=>{"use strict";Object.defineProperty(nF,"__esModule",{value:!0});var Y6e=gr(),J6e={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((s,o)=>{if((0,Y6e.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(a)})}};nF.default=J6e});var hee=B(iF=>{"use strict";Object.defineProperty(iF,"__esModule",{value:!0});var pB=qt(),pee=gr(),Z6e={message:({params:e})=>(0,pB.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,pB._)`{failingKeyword: ${e.ifClause}}`},K6e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Z6e,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,pee.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=fee(n,"then"),s=fee(n,"else");if(!i&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else i?t.if(a,u("then")):t.if((0,pB.not)(a),u("else"));e.pass(o,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let f=e.subschema({keyword:l},a);t.assign(o,a),e.mergeValidEvaluated(f,o),d?t.assign(d,(0,pB._)`${l}`):e.setParams({ifClause:l})}}}};function fee(e,t){let r=e.schema[t];return r!==void 0&&!(0,pee.alwaysValidSchema)(e,r)}iF.default=K6e});var Aee=B(sF=>{"use strict";Object.defineProperty(sF,"__esModule",{value:!0});var X6e=gr(),e8e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,X6e.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};sF.default=e8e});var gee=B(oF=>{"use strict";Object.defineProperty(oF,"__esModule",{value:!0});var t8e=HL(),r8e=VX(),n8e=jL(),i8e=WX(),s8e=YX(),o8e=KX(),a8e=eee(),c8e=JL(),u8e=nee(),l8e=aee(),d8e=cee(),f8e=uee(),p8e=lee(),h8e=dee(),A8e=hee(),g8e=Aee();function m8e(e=!1){let t=[d8e.default,f8e.default,p8e.default,h8e.default,A8e.default,g8e.default,a8e.default,c8e.default,o8e.default,u8e.default,l8e.default];return e?t.push(r8e.default,i8e.default):t.push(t8e.default,n8e.default),t.push(s8e.default),t}oF.default=m8e});var mee=B(aF=>{"use strict";Object.defineProperty(aF,"__esModule",{value:!0});var Fn=qt(),y8e={message:({schemaCode:e})=>(0,Fn.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Fn._)`{format: ${e}}`},b8e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:y8e,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;i?f():p();function f(){let h=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),A=r.const("fDef",(0,Fn._)`${h}[${o}]`),g=r.let("fType"),m=r.let("format");r.if((0,Fn._)`typeof ${A} == "object" && !(${A} instanceof RegExp)`,()=>r.assign(g,(0,Fn._)`${A}.type || "string"`).assign(m,(0,Fn._)`${A}.validate`),()=>r.assign(g,(0,Fn._)`"string"`).assign(m,A)),e.fail$data((0,Fn.or)(b(),E()));function b(){return c.strictSchema===!1?Fn.nil:(0,Fn._)`${o} && !${m}`}function E(){let C=l.$async?(0,Fn._)`(${A}.async ? await ${m}(${n}) : ${m}(${n}))`:(0,Fn._)`${m}(${n})`,w=(0,Fn._)`(typeof ${m} == "function" ? ${C} : ${m}.test(${n}))`;return(0,Fn._)`${m} && ${m} !== true && ${g} === ${t} && !${w}`}}function p(){let h=d.formats[s];if(!h){b();return}if(h===!0)return;let[A,g,m]=E(h);A===t&&e.pass(C());function b(){if(c.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${s}" ignored in schema at path "${u}"`}}function E(w){let T=w instanceof RegExp?(0,Fn.regexpCode)(w):c.code.formats?(0,Fn._)`${c.code.formats}${(0,Fn.getProperty)(s)}`:void 0,_=r.scopeValue("formats",{key:s,ref:w,code:T});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Fn._)`${_}.validate`]:["string",w,_]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Fn._)`await ${m}(${n})`}return typeof g=="function"?(0,Fn._)`${m}(${n})`:(0,Fn._)`${m}.test(${n})`}}}};aF.default=b8e});var yee=B(cF=>{"use strict";Object.defineProperty(cF,"__esModule",{value:!0});var E8e=mee(),C8e=[E8e.default];cF.default=C8e});var bee=B(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});ig.contentVocabulary=ig.metadataVocabulary=void 0;ig.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ig.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Cee=B(uF=>{"use strict";Object.defineProperty(uF,"__esModule",{value:!0});var w8e=kX(),I8e=HX(),S8e=gee(),v8e=yee(),Eee=bee(),x8e=[w8e.default,I8e.default,(0,S8e.default)(),v8e.default,Eee.metadataVocabulary,Eee.contentVocabulary];uF.default=x8e});var Iee=B(hB=>{"use strict";Object.defineProperty(hB,"__esModule",{value:!0});hB.DiscrError=void 0;var wee;(function(e){e.Tag="tag",e.Mapping="mapping"})(wee||(hB.DiscrError=wee={}))});var vee=B(dF=>{"use strict";Object.defineProperty(dF,"__esModule",{value:!0});var sg=qt(),lF=Iee(),See=Yx(),B8e=Nb(),k8e=gr(),_8e={message:({params:{discrError:e,tagName:t}})=>e===lF.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,sg._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},T8e={keyword:"discriminator",type:"object",schemaType:"object",error:_8e,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,sg._)`${r}${(0,sg.getProperty)(a)}`);t.if((0,sg._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:lF.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let p=f();t.if(!1);for(let h in p)t.elseIf((0,sg._)`${u} === ${h}`),t.assign(c,d(p[h]));t.else(),e.error(!1,{discrError:lF.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(p){let h=t.name("valid"),A=e.subschema({keyword:"oneOf",schemaProp:p},h);return e.mergeEvaluated(A,sg.Name),h}function f(){var p;let h={},A=m(i),g=!0;for(let C=0;C{R8e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var pF=B((ln,fF)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.MissingRefError=ln.ValidationError=ln.CodeGen=ln.Name=ln.nil=ln.stringify=ln.str=ln._=ln.KeywordCxt=ln.Ajv=void 0;var Q8e=wX(),D8e=Cee(),N8e=vee(),Bee=xee(),M8e=["/properties"],AB="http://json-schema.org/draft-07/schema",og=class extends Q8e.default{_addVocabularies(){super._addVocabularies(),D8e.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(N8e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Bee,M8e):Bee;this.addMetaSchema(t,AB,!1),this.refs["http://json-schema.org/schema"]=AB}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(AB)?AB:void 0)}};ln.Ajv=og;fF.exports=ln=og;fF.exports.Ajv=og;Object.defineProperty(ln,"__esModule",{value:!0});ln.default=og;var P8e=Db();Object.defineProperty(ln,"KeywordCxt",{enumerable:!0,get:function(){return P8e.KeywordCxt}});var ag=qt();Object.defineProperty(ln,"_",{enumerable:!0,get:function(){return ag._}});Object.defineProperty(ln,"str",{enumerable:!0,get:function(){return ag.str}});Object.defineProperty(ln,"stringify",{enumerable:!0,get:function(){return ag.stringify}});Object.defineProperty(ln,"nil",{enumerable:!0,get:function(){return ag.nil}});Object.defineProperty(ln,"Name",{enumerable:!0,get:function(){return ag.Name}});Object.defineProperty(ln,"CodeGen",{enumerable:!0,get:function(){return ag.CodeGen}});var L8e=Gx();Object.defineProperty(ln,"ValidationError",{enumerable:!0,get:function(){return L8e.default}});var F8e=Nb();Object.defineProperty(ln,"MissingRefError",{enumerable:!0,get:function(){return F8e.default}})});var Mee=B(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.formatNames=Cc.fastFormats=Cc.fullFormats=void 0;function Ec(e,t){return{validate:e,compare:t}}Cc.fullFormats={date:Ec(Ree,mF),time:Ec(AF(!0),yF),"date-time":Ec(kee(!0),Dee),"iso-time":Ec(AF(),Qee),"iso-date-time":Ec(kee(),Nee),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:q8e,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Z8e,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:z8e,int32:{type:"number",validate:W8e},int64:{type:"number",validate:Y8e},float:{type:"number",validate:Tee},double:{type:"number",validate:Tee},password:!0,binary:!0};Cc.fastFormats={...Cc.fullFormats,date:Ec(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,mF),time:Ec(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,yF),"date-time":Ec(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Dee),"iso-time":Ec(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qee),"iso-date-time":Ec(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Nee),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Cc.formatNames=Object.keys(Cc.fullFormats);function O8e(e){return e%4===0&&(e%100!==0||e%400===0)}var U8e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$8e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ree(e){let t=U8e.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&O8e(r)?29:$8e[n])}function mF(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!a)return!1;if(i<=23&&s<=59&&o<60)return!0;let d=s-l*c,f=i-u*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&o<61}}function yF(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function Qee(e,t){if(!(e&&t))return;let r=hF.exec(e),n=hF.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e=V8e}function Y8e(e){return Number.isInteger(e)}function Tee(){return!0}var J8e=/[^\\]\\Z/;function Z8e(e){if(J8e.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Pee=B(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});cg.formatLimitDefinition=void 0;var K8e=pF(),Oa=qt(),ql=Oa.operators,gB={formatMaximum:{okStr:"<=",ok:ql.LTE,fail:ql.GT},formatMinimum:{okStr:">=",ok:ql.GTE,fail:ql.LT},formatExclusiveMaximum:{okStr:"<",ok:ql.LT,fail:ql.GTE},formatExclusiveMinimum:{okStr:">",ok:ql.GT,fail:ql.LTE}},X8e={message:({keyword:e,schemaCode:t})=>(0,Oa.str)`should be ${gB[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Oa._)`{comparison: ${gB[e].okStr}, limit: ${t}}`};cg.formatLimitDefinition={keyword:Object.keys(gB),type:"string",schemaType:"string",$data:!0,error:X8e,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:o,self:a}=s;if(!o.validateFormats)return;let c=new K8e.KeywordCxt(s,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let f=t.scopeValue("formats",{ref:a.formats,code:o.code.formats}),p=t.const("fmt",(0,Oa._)`${f}[${c.schemaCode}]`);e.fail$data((0,Oa.or)((0,Oa._)`typeof ${p} != "object"`,(0,Oa._)`${p} instanceof RegExp`,(0,Oa._)`typeof ${p}.compare != "function"`,d(p)))}function l(){let f=c.schema,p=a.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let h=t.scopeValue("formats",{key:f,ref:p,code:o.code.formats?(0,Oa._)`${o.code.formats}${(0,Oa.getProperty)(f)}`:void 0});e.fail$data(d(h))}function d(f){return(0,Oa._)`${f}.compare(${r}, ${n}) ${gB[i].fail} 0`}},dependencies:["format"]};var eUe=e=>(e.addKeyword(cg.formatLimitDefinition),e);cg.default=eUe});var Uee=B((Wb,Oee)=>{"use strict";Object.defineProperty(Wb,"__esModule",{value:!0});var ug=Mee(),tUe=Pee(),bF=qt(),Lee=new bF.Name("fullFormats"),rUe=new bF.Name("fastFormats"),EF=(e,t={keywords:!0})=>{if(Array.isArray(t))return Fee(e,t,ug.fullFormats,Lee),e;let[r,n]=t.mode==="fast"?[ug.fastFormats,rUe]:[ug.fullFormats,Lee],i=t.formats||ug.formatNames;return Fee(e,i,r,n),t.keywords&&(0,tUe.default)(e),e};EF.get=(e,t="full")=>{let n=(t==="fast"?ug.fastFormats:ug.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Fee(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=(0,bF._)`require("ajv-formats/dist/formats").${n}`);for(let o of t)e.addFormat(o,r[o])}Oee.exports=Wb=EF;Object.defineProperty(Wb,"__esModule",{value:!0});Wb.default=EF});var Xee={};Jt(Xee,{DEFAULT_ARRAY_CAP:()=>Zee,DEFAULT_SPILL_THRESHOLD:()=>Kee,compactResult:()=>Yb});import{writeFileSync as uUe}from"node:fs";function Yb(e,t){let r=t.cap??Zee,n=t.spillThreshold??Kee,i={...e},s=!1;for(let a of t.arrayFields){let c=i[a];Array.isArray(c)&&c.length>r&&(i[a]=c.slice(0,r),i[`${a}Truncated`]=c.length,s=!0)}if((s||lUe(e)>n)&&t.fullResultPath)try{uUe(t.fullResultPath,JSON.stringify(e,null,2)),i.fullResultPath=t.fullResultPath}catch{}return i}function lUe(e){try{return JSON.stringify(e).length}catch{return Number.POSITIVE_INFINITY}}var Zee,Kee,wB=D(()=>{"use strict";Zee=50,Kee=24e3});var CF={};Jt(CF,{detectFeatures:()=>fUe});function fUe(e,t,r){let n=r.join(` -`);return dUe.filter(i=>i.platforms.includes(e)).map(i=>{let s=t.some(a=>i.urlPatterns.some(c=>c.test(a))),o=i.htmlMarkers.some(a=>a.test(n));return{id:i.id,name:i.name,detected:s||o,transferable:i.transferable,wpRecommendation:i.wpRecommendation}})}var dUe,wF=D(()=>{"use strict";dUe=[{id:"store",name:"Online Store / E-commerce",urlPatterns:[/\/product-page\//i,/\/store\//i,/\/shop\//i,/\/products\//i,/\/collections\//i,/\/cart/i],htmlMarkers:[/data-hook="product-/i,/sqs-block-summary/i,/class="product-/i,/shopify-section/i,/w-commerce/i],platforms:["shopify","squarespace","webflow","wix"],transferable:!0,wpRecommendation:"Products are exported as WooCommerce-compatible CSV during extraction"},{id:"bookings",name:"Bookings / Appointments",urlPatterns:[/\/booking-calendar\//i,/\/bookings-checkout\//i,/\/book-online/i],htmlMarkers:[/data-hook="booking/i,/wix-bookings/i],platforms:["wix"],transferable:!1,wpRecommendation:"Amelia or Simply Schedule Appointments plugin"},{id:"forms",name:"Forms",urlPatterns:[],htmlMarkers:[/data-mesh-id="comp-form/i,/wix-form/i,/sqs-block-form/i,/class="w-form"/i,/data-hook="form/i],platforms:["squarespace","webflow","wix"],transferable:!1,wpRecommendation:"Jetpack Forms (auto-installed when forms are detected)"},{id:"members",name:"Members Area / User Accounts",urlPatterns:[/\/members-area\//i,/\/account\//i,/\/my-account/i],htmlMarkers:[/data-hook="members/i,/wix-members/i],platforms:["squarespace","wix"],transferable:!1,wpRecommendation:"MemberPress or Paid Memberships Pro plugin"},{id:"scheduling",name:"Scheduling / Appointments",urlPatterns:[],htmlMarkers:[/sqs-block-schedulingblock/i,/acuity-embed/i],platforms:["squarespace"],transferable:!1,wpRecommendation:"Amelia or Simply Schedule Appointments plugin"},{id:"forum",name:"Forum / Community",urlPatterns:[/\/forum\//i],htmlMarkers:[/data-hook="forum/i,/wix-forum/i],platforms:["wix"],transferable:!1,wpRecommendation:"bbPress or BuddyPress plugin"},{id:"events",name:"Events",urlPatterns:[/\/events\//i,/\/event\//i],htmlMarkers:[/data-hook="events/i,/wix-events/i,/sqs-block-summary.*event/i],platforms:["squarespace","wix"],transferable:!1,wpRecommendation:"The Events Calendar plugin"}]});function Jb(e){let t=[],r=e.match(/([^<]+)<\/loc>/g);if(!r)return t;for(let n of r){let i=n.replace(/<\/?loc>/g,"").trim();i&&t.push(i)}return t}function cr(e){let t;try{t=new URL(e).pathname.toLowerCase()}catch{t=e.toLowerCase()}return t==="/"||t===""?"homepage":/\/(blog|post|posts|article|articles|news|journal)\/[^/]/.test(t)||/\/blogs\/[^/]+\/[^/]+/.test(t)||/\/blog-\d+\/post\//.test(t)||/\/single-post\//.test(t)?"post":/\/(products?|product-page|store|shop)\//.test(t)?"product":/\/(gallery|portfolio)/.test(t)?"gallery":/\/(event|events)/.test(t)?"event":"page"}async function ii(e){let t=e.includes("://")?e:`https://${e}`,r=`${t.replace(/\/$/,"")}/sitemap.xml`,n;try{n=new URL(t).origin}catch{return[]}let i=[],s=new Set;async function o(a,c){if(!(c>hUe||i.length>=IF||s.has(a))){s.add(a);try{if(new URL(a).origin!==n)return}catch{return}try{let u=await fetch(a,{signal:AbortSignal.timeout(15e3)});if(!u.ok)return;let l=await u.text(),d=Jb(l);for(let f of d){if(i.length>=IF)break;(f.includes("?")?f.slice(0,f.indexOf("?")):f).endsWith(".xml")?await o(f,c+1):i.push(f)}}catch{}}}if(await o(r,0),i.length<5){let a=await gUe(t,n),c=new Set(i);for(let u of a)!c.has(u)&&i.length][\s\S]*?<\/nav>/gi)||[],...i.match(/][\s\S]*?<\/footer>/gi)||[]];s.length===0&&s.push(...i.match(/][\s\S]*?<\/header>/gi)||[]);let o=/]*href=["']([^"'#][^"']*)["'][^>]*>/gi,a=new Set,c;for(let u of s)for(o.lastIndex=0;(c=o.exec(u))!==null;){let l=c[1];if(!l||l.startsWith("javascript:")||l.startsWith("mailto:")||l.startsWith("tel:"))continue;let d=mUe(l,e,t);d&&!a.has(d)&&(a.add(d),r.push(d))}}catch{}return r}function mUe(e,t,r){try{let n=new URL(e,t);return n.origin!==r||/\.(css|js|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot|pdf|zip|xml|json)$/i.test(n.pathname)||AUe.test(n.pathname)?null:n.href}catch{return null}}var hUe,IF,AUe,ki=D(()=>{"use strict";hUe=3,IF=5e4;AUe=/^\/(cart|account|login|signup|checkout|search|api|admin|favicon)/i});function Of(e){if(rte.size>0&&rte.has(e))throw new SF(e)}var SF,rte,IB=D(()=>{"use strict";SF=class extends Error{constructor(t){super(`fault injected at ${t}`),this.name="FaultInjected"}},rte=new Set});import{appendFileSync as vF,readFileSync as SB,writeFileSync as yUe,existsSync as vB,unlinkSync as xF}from"fs";import{join as nte}from"path";var $o,ite=D(()=>{"use strict";IB();$o=class{outputDir;logPath;lockPath;constructor(t){this.outputDir=t,this.logPath=nte(t,"extraction-log.jsonl"),this.lockPath=nte(t,".liberation-lock")}logProcessed(t){let r=JSON.stringify({type:"processed",url:t.url,slug:t.slug,durationMs:t.durationMs,qualityScore:t.qualityScore,timestamp:new Date().toISOString()});Of("extraction-log:before-append"),vF(this.logPath,r+` -`)}logFailed(t){let r=JSON.stringify({type:"failed",url:t.url,error:t.error,timestamp:new Date().toISOString()});vF(this.logPath,r+` -`)}logMedia(t){let r=JSON.stringify({type:t.error?"media_failed":"media_downloaded",url:t.url,localPath:t.localPath||null,error:t.error||null,timestamp:new Date().toISOString()});vF(this.logPath,r+` -`)}getProcessedUrls(){let t=new Set;if(!vB(this.logPath))return t;let n=SB(this.logPath,"utf8").split(` -`);for(let i of n)if(i.trim())try{let s=JSON.parse(i);s.type==="processed"&&t.add(s.url)}catch{}return t}getSummary(){let t=[],r=[],n=[],i=[];if(!vB(this.logPath))return{processed:t,failed:r,mediaDownloaded:n,mediaFailed:i};let s=SB(this.logPath,"utf8");for(let o of s.split(` -`))if(o.trim())try{let a=JSON.parse(o);switch(a.type){case"processed":t.push(a);break;case"failed":r.push(a);break;case"media_downloaded":n.push(a);break;case"media_failed":i.push(a);break}}catch{}return{processed:t,failed:r,mediaDownloaded:n,mediaFailed:i}}acquireLock(){if(vB(this.lockPath))try{let t=JSON.parse(SB(this.lockPath,"utf8"));try{return process.kill(t.pid,0),!1}catch{xF(this.lockPath)}}catch{xF(this.lockPath)}return yUe(this.lockPath,JSON.stringify({pid:process.pid,timestamp:Date.now()})),!0}releaseLock(){try{xF(this.lockPath)}catch{}}isLockActive(){if(!vB(this.lockPath))return!1;try{let t=JSON.parse(SB(this.lockPath,"utf8"));try{return process.kill(t.pid,0),!0}catch{return!1}}catch{return!1}}}});import{existsSync as BF,readFileSync as ste,writeFileSync as bUe,renameSync as ote,mkdirSync as EUe,unlinkSync as CUe}from"fs";import{join as ate,dirname as wUe}from"path";var Ho,cte=D(()=>{"use strict";IB();Ho=class e{sessionPath;data;constructor(t,r){this.sessionPath=t,this.data=r}static readAdapter(t){let r=ate(t,"session.json");if(!BF(r))return null;try{let n=JSON.parse(ste(r,"utf8"));return n.version===1&&typeof n.adapter=="string"?n.adapter:null}catch{return null}}static loadOrCreate(t,r,n,{resume:i=!1}={}){let s=ate(t,"session.json");if(i&&BF(s))try{let u=JSON.parse(ste(s,"utf8"));if(u.version===1&&u.adapter===r){let l=new e(s,u);return l.data.args={...u.args,...n},l}}catch{}if(BF(s))try{let u=`${s}.corrupt.${Date.now()}`;ote(s,u)}catch{try{CUe(s)}catch{}}let o=new Date().toISOString(),a={version:1,adapter:r,stage:"initial",startedAt:o,updatedAt:o,args:n,progress:{},cursors:{}},c=new e(s,a);return c.save(),c}get stage(){return this.data.stage}get adapter(){return this.data.adapter}get args(){return this.data.args}get progress(){return this.data.progress}setStage(t,r){this.data.stage=t,t==="error"&&r&&(this.data.lastError=r),this.save()}getEntity(t){let r=this.data.progress[t];return r||(r={discovered:0,extracted:0,failed:0},this.data.progress[t]=r),r}bumpProgress(t,r,n=1){this.getEntity(t)[r]+=n}setDiscovered(t){for(let[r,n]of Object.entries(t))this.getEntity(r).discovered=n;this.save()}setCursor(t,r){this.data.cursors[t]=r,Of("import-session:cursor-before-save"),this.save()}getCursor(t){return this.data.cursors[t]}save(){this.data.updatedAt=new Date().toISOString(),EUe(wUe(this.sessionPath),{recursive:!0});let t=this.sessionPath+".tmp";Of("import-session:before-save"),bUe(t,JSON.stringify(this.data,null,2)),ote(t,this.sessionPath)}complete(){this.setStage("complete")}}});import{existsSync as IUe,readFileSync as SUe,writeFileSync as vUe,renameSync as xUe,mkdirSync as BUe}from"fs";import{join as kUe,dirname as _Ue}from"path";function xB(e){if(!e)return e;let r=e.indexOf("/wp-content/uploads/");return r<=0?e:e.slice(r)}var jo,ute=D(()=>{"use strict";IB();jo=class e{storePath;data;maxAttempts;constructor(t,r,n){this.storePath=t,this.data=r,this.maxAttempts=n}static load(t,{maxAttempts:r=3}={}){let n=kUe(t,"media-stubs.json");if(IUe(n))try{let i=JSON.parse(SUe(n,"utf8"));if(i.version===1&&i.stubs){for(let s of Object.values(i.stubs))s.localUrl&&(s.localUrl=xB(s.localUrl));return new e(n,i,r)}}catch{}return new e(n,{version:1,stubs:{}},r)}get(t){return this.data.stubs[t]}shouldAttempt(t){let r=this.data.stubs[t];return r?!(r.status==="success"||r.status==="ignored"||r.status==="error"&&r.attempts>=this.maxAttempts):!0}dirty=!1;markSuccess(t,r,n){let i=this.data.stubs[t];this.data.stubs[t]={status:"success",attempts:(i?.attempts||0)+1,localPath:r,...n,updatedAt:new Date().toISOString()},this.dirty=!0}markFailure(t,r){let n=this.data.stubs[t];this.data.stubs[t]={status:"error",attempts:(n?.attempts||0)+1,error:r,updatedAt:new Date().toISOString()},this.save()}markIgnored(t,r){let n=this.data.stubs[t];this.data.stubs[t]={status:"ignored",attempts:n?.attempts||0,error:r,updatedAt:new Date().toISOString()},this.save()}flush(){this.dirty&&this.save()}recordWpPostId(t,r){let n=this.data.stubs[t];n&&(this.data.stubs[t]={...n,wpPostId:r,updatedAt:new Date().toISOString()},this.save())}recordLocalUrl(t,r){let n=this.data.stubs[t];n&&(this.data.stubs[t]={...n,localUrl:xB(r),updatedAt:new Date().toISOString()},this.save())}list(){return Object.entries(this.data.stubs)}counts(){let t={awaiting:0,success:0,error:0,ignored:0};for(let r of Object.values(this.data.stubs))t[r.status]++;return t}save(){BUe(_Ue(this.storePath),{recursive:!0});let t=this.storePath+".tmp";vUe(t,JSON.stringify(this.data,null,2)),Of("media-stubs:mid-flush"),xUe(t,this.storePath),this.dirty=!1}}});var lte={};Jt(lte,{ExtractionLog:()=>$o,ImportSession:()=>Ho,MediaStubStore:()=>jo,toRootRelativeUploadUrl:()=>xB});var Fs=D(()=>{"use strict";ite();cte();ute()});function BB(e,t){let r=[],n=t.exec(e);for(;n;){let i=[];i.startIndex=t.lastIndex-n[0].length;let s=n.length;for(let o=0;o{"use strict";dte=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",TUe=dte+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",RUe="["+dte+"]["+TUe+"]*",QUe=new RegExp("^"+RUe+"$");kF=function(e){let t=QUe.exec(e);return!(t===null||typeof t>"u")};Zb=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],kB=["__proto__","constructor","prototype"]});function mte(e,t){t=Object.assign({},DUe,t);let r=[],n=!1,i=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let s=0;s"&&e[s]!==" "&&e[s]!==" "&&e[s]!==` -`&&e[s]!=="\r";s++)c+=e[s];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),s--),!$Ue(c)){let d;return c.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",On("InvalidTag",d,hs(e,s))}let u=PUe(e,s);if(u===!1)return On("InvalidAttr","Attributes for '"+c+"' have open quote.",hs(e,s));let l=u.value;if(s=u.index,l[l.length-1]==="/"){let d=s-l.length;l=l.substring(0,l.length-1);let f=gte(l,t);if(f===!0)n=!0;else return On(f.err.code,f.err.msg,hs(e,d+f.err.line))}else if(a)if(u.tagClosed){if(l.trim().length>0)return On("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",hs(e,o));if(r.length===0)return On("InvalidTag","Closing tag '"+c+"' has not been opened.",hs(e,o));{let d=r.pop();if(c!==d.tagName){let f=hs(e,d.tagStartPos);return On("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+f.line+", col "+f.col+") instead of closing tag '"+c+"'.",hs(e,o))}r.length==0&&(i=!0)}}else return On("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",hs(e,s));else{let d=gte(l,t);if(d!==!0)return On(d.err.code,d.err.msg,hs(e,s-l.length+d.err.line));if(i===!0)return On("InvalidXml","Multiple possible root nodes found.",hs(e,s));t.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),n=!0}for(s++;s0)return On("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return On("InvalidXml","Start tag expected.",1);return!0}function pte(e){return e===" "||e===" "||e===` -`||e==="\r"}function hte(e,t){let r=t;for(;t5&&n==="xml")return On("InvalidXml","XML declaration allowed only at the start of the document.",hs(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function Ate(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let r=1;for(t+=8;t"&&(r--,r===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}function PUe(e,t){let r="",n="",i=!1;for(;t"&&n===""){i=!0;break}r+=e[t]}return n!==""?!1:{value:r,index:t,tagClosed:i}}function gte(e,t){let r=BB(e,LUe),n={};for(let i=0;i{"use strict";_B();DUe={allowBooleanAttributes:!1,unpairedTags:[]};NUe='"',MUe="'";LUe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g")});var _F,Xb,TF,RF=D(()=>{_F={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},Xb={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},TF={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"}});function bte(e){if(e[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let t of e)if(HUe.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);return e}function eE(...e){let t=Object.create(null);for(let r of e)if(r)for(let n of Object.keys(r)){let i=r[n];if(typeof i=="string")t[n]=i;else if(i&&typeof i=="object"&&i.val!==void 0){let s=i.val;typeof s=="string"&&(t[n]=s)}}return t}function jUe(e){return!e||e===Uf?new Set([Uf]):e===QF?new Set([QF]):e===TB?new Set([TB]):Array.isArray(e)?new Set(e):new Set([Uf])}function zUe(e){if(!e)return{xmlVersion:1,onLevel:Os.allow,nullLevel:Os.remove};let t=e.xmlVersion===1.1?1.1:1,r=Os[e.onNCR]??Os.allow,n=Os[e.nullNCR]??Os.remove,i=Math.max(n,Os.remove);return{xmlVersion:t,onLevel:r,nullLevel:i}}var lg,HUe,Uf,TB,QF,Os,qUe,dg,Ete=D(()=>{RF();lg=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),HUe=new Set("!?\\\\/[]$%{}^&*()<>|+");Uf="external",TB="base",QF="all";Os=Object.freeze({allow:0,leave:1,remove:2,throw:3}),qUe=new Set([9,10,13]);dg=class{constructor(t={}){this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:n=>n,this._limitTiers=jUe(this._limit.applyLimitsTo??Uf),this._numericAllowed=t.numericAllowed??!0,this._baseMap=eE(Xb,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);let r=zUe(t.ncr);this._ncrXmlVersion=r.xmlVersion,this._ncrOnLevel=r.onLevel,this._ncrNullLevel=r.nullLevel,this._onExternalEntity=typeof t.onExternalEntity=="function"?t.onExternalEntity:null,this._onInputEntity=typeof t.onInputEntity=="function"?t.onInputEntity:null}_applyRegistrationHook(t,r,n,i){if(!t)return!0;let s=t(r,n);if(s===lg.BLOCK)return!1;if(s===lg.THROW)throw new Error(`[EntityDecoder] Registration of ${i} entity "&${r};" was rejected by hook`);return!0}setExternalEntities(t){if(t)for(let i of Object.keys(t))bte(i);if(!this._onExternalEntity){this._externalMap=eE(t);return}let r=eE(t),n=Object.create(null);for(let[i,s]of Object.entries(r))this._applyRegistrationHook(this._onExternalEntity,i,s,"external")&&(n[i]=s);this._externalMap=n}addExternalEntity(t,r){bte(t),typeof r=="string"&&r.indexOf("&")===-1&&this._applyRegistrationHook(this._onExternalEntity,t,r,"external")&&(this._externalMap[t]=r)}addInputEntities(t){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity){this._inputMap=eE(t);return}let r=eE(t),n=Object.create(null);for(let[i,s]of Object.entries(r))this._applyRegistrationHook(this._onInputEntity,i,s,"input")&&(n[i]=s);this._inputMap=n}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=t===1.1?1.1:1}decode(t){if(typeof t!="string"||t.length===0||t.indexOf("&")===-1)return t;let r=t,n=[],i=t.length,s=0,o=0,a=this._maxTotalExpansions>0,c=this._maxExpandedLength>0,u=a||c;for(;o=i||t.charCodeAt(d)!==59){o++;continue}let f=t.slice(o+1,d);if(f.length===0){o++;continue}let p,h;if(this._removeSet.has(f))p="",h===void 0&&(h=Uf);else if(this._leaveSet.has(f)){o++;continue}else if(f.charCodeAt(0)===35){let A=this._resolveNCR(f);if(A===void 0){o++;continue}p=A,h=TB}else{let A=this._resolveName(f);p=A?.value,h=A?.tier}if(p===void 0){o++;continue}if(o>s&&n.push(t.slice(s,o)),n.push(p),s=d+1,o=s,u&&this._tierCounts(h)){if(a&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(c){let A=p.length-(f.length+2);if(A>0&&(this._expandedLength+=A,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}s=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!qUe.has(t)?Os.remove:-1}_applyNCRAction(t,r,n){switch(t){case Os.allow:return String.fromCodePoint(n);case Os.remove:return"";case Os.leave:return;case Os.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${r}; (U+${n.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(n)}}_resolveNCR(t){let r=t.charCodeAt(1),n;if(r===120||r===88?n=parseInt(t.slice(2),16):n=parseInt(t.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let i=this._classifyNCR(n);if(!this._numericAllowed&&i{Ete();RF()});function GUe(e,t){if(typeof e!="string")return;let r=e.toLowerCase();if(Zb.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(kB.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Ite(e,t){return typeof e=="boolean"?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof e=="object"&&e!==null?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??"all"}:Ite(!0)}var wte,VUe,Ste,vte=D(()=>{_B();wte=e=>Zb.includes(e)?"__"+e:e,VUe={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0,unicode:!1},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:wte};Ste=function(e){let t=Object.assign({},VUe,e),r=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(let{value:n,name:i}of r)n&&GUe(n,i);return t.onDangerousProperty===null&&(t.onDangerousProperty=wte),t.processEntities=Ite(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n)),t}});var RB,Us,QB=D(()=>{"use strict";typeof Symbol!="function"?RB="@@xmlMetadata":RB=Symbol("XML Node Metadata");Us=class{constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][RB]={startIndex:r})}static getMetaDataSymbol(){return RB}}});var xte,WUe,Bte,YUe,DF,JUe,ZUe,kte,KUe,XUe,e3e,NF,_te=D(()=>{xte=":A-Za-z_\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",WUe=xte+"\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040",Bte=":A-Za-z_\xC0-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",YUe=Bte+"\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040",DF=(e,t,r="")=>{let n=e.replace(":",""),i=t.replace(":",""),s=`[${n}][${i}]*`;return{name:new RegExp(`^[${e}][${t}]*$`,r),ncName:new RegExp(`^${s}$`,r),qName:new RegExp(`^${s}(?::${s})?$`,r),nmToken:new RegExp(`^[${t}]+$`,r),nmTokens:new RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`,r)}},JUe=DF(xte,WUe),ZUe=DF(Bte,YUe,"u"),kte=":A-Za-z_",KUe=kte+"\\-\\.\\d",XUe=DF(kte,KUe),e3e=(e="1.0",t=!1)=>t?XUe:e==="1.1"?ZUe:JUe,NF=(e,{xmlVersion:t="1.0",asciiOnly:r=!1}={})=>e3e(t,r).qName.test(e)});function $f(e,t,r){for(let n=0;n{_te();rE=class{constructor(t,r){this.suppressValidationErr=!t,this.options=t,this.xmlVersion=r||1}setXmlVersion(t=1){this.xmlVersion=t}readDocType(t,r){let n=Object.create(null),i=0;if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let s=1,o=!1,a=!1,c="";for(;r=this.options.maxEntityCount)throw new Error(`Entity count (${i+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[u]=l,i++}}else if(o&&$f(t,"!ELEMENT",r)){r+=8;let{index:u}=this.readElementExp(t,r+1);r=u}else if(o&&$f(t,"!ATTLIST",r))r+=8;else if(o&&$f(t,"!NOTATION",r)){r+=9;let{index:u}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=u}else if($f(t,"!--",r))a=!0;else throw new Error("Invalid DOCTYPE");s++,c=""}else if(t[r]===">"){if(a?t[r-1]==="-"&&t[r-2]==="-"&&(a=!1,s--):s--,s===0)break}else t[r]==="["?o=!0:c+=t[r];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:r}}readEntityExp(t,r){r=$s(t,r);let n=r;for(;rthis.options.maxEntitySize)throw new Error(`Entity "${i}" size (${s.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return r--,[i,s,r]}readNotationExp(t,r){r=$s(t,r);let n=r;for(;r{for(;t{t3e=[48,1632,1776,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,65296,120782,120792,120802,120812,120822,66720,68912,69734,69872,69942,70096,70384,70736,70864,71248,71360,71472,71904,72016,72688,72784,73040,73120,73552,92768,92864,93008,123200,123632,124144,125264,130032],DB=255,NB=new Map,Rte=65535,Qte=1632,fg=Qte,r3e=Rte-Qte+1,MB=new Uint8Array(r3e).fill(DB);for(let e of t3e)for(let t=0;t<10;t++){let r=e+t;r<=Rte?MB[r-fg]=t:NB.set(r,t)}});function n3e(e){if(typeof e!="string")return e;let t=e.length;if(t===0)return e;let r=-1;for(let i=0;i=Nte&&s<=Mte||s===Pte)){if(s=55296&&s<=56319){if(i+1=56320&&o<=57343){let a=65536+(s-55296<<10)+(o-56320);if(NB.has(a)){r=i;break}}}continue}if(MB[s-fg]!==DB||PB.has(s)){r=i;break}}}if(r===-1)return e;let n=[];r>0&&n.push(e.slice(0,r));for(let i=r;i=Nte&&s<=Mte||s===Pte){n.push(e[i]);continue}if(s=55296&&s<=56319){if(i+1=56320&&a<=57343){let c=65536+(s-55296<<10)+(a-56320),u=NB.get(c);if(u!==void 0){n.push(String.fromCharCode(u+48)),i++;continue}}}n.push(e[i]);continue}if(PB.has(s)){n.push("-");continue}let o=MB[s-fg];n.push(o!==DB?String.fromCharCode(o+48):e[i])}return n.join("")}var Nte,Mte,Pte,PB,Lte,Fte=D(()=>{"use strict";Dte();Nte=48,Mte=57,Pte=45,PB=new Set([8722,65293,65123]);Lte=n3e});function PF(e,t={}){if(t=Object.assign({},c3e,t),!e||typeof e!="string")return e;let r=e.trim();if(r.length===0)return e;if(t.skipLike!==void 0&&t.skipLike.test(r))return e;if(r==="0"||t.unicode&&(r=Lte(r),r==="0"))return 0;if(t.hex&&i3e.test(r))return MF(r,16);if(t.binary&&s3e.test(r))return MF(r,2);if(t.octal&&o3e.test(r))return MF(r,8);if(isFinite(r)){if(r.includes("e")||r.includes("E"))return l3e(e,r,t);{let n=a3e.exec(r);if(n){let i=n[1]||"",s=n[2],o=d3e(n[3]),a=i?e[s.length+1]===".":e[s.length]===".";if(!t.leadingZeros&&(s.length>1||s.length===1&&!a))return e;{let c=Number(r),u=String(c);if(c===0)return c;if(u.search(/[eE]/)!==-1)return t.eNotation?c:e;if(r.indexOf(".")!==-1)return u==="0"||u===o||u===`${i}${o}`?c:e;let l=s?o:r;return s?l===u||i+l===u?c:e:l===u||l===i+u?c:e}}else return e}}else return f3e(e,Number(r),t)}function l3e(e,t,r){if(!r.eNotation)return e;let n=t.match(u3e);if(n){let i=n[1]||"",s=n[3].indexOf("e")===-1?"E":"e",o=n[2],a=i?e[o.length+1]===s:e[o.length]===s;return o.length>1&&a?e:o.length===1&&(n[3].startsWith(`.${s}`)||n[3][0]===s)?Number(t):o.length>0?r.leadingZeros&&!a?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}else return e}function d3e(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substring(0,e.length-1))),e}function MF(e,t){let r=e.trim();if((t===2||t===8)&&(e=r.substring(2)),parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function f3e(e,t,r){let n=t===1/0;switch(r.infinity.toLowerCase()){case"null":return null;case"infinity":return t;case"string":return n?"Infinity":"-Infinity";default:return e}}var i3e,s3e,o3e,a3e,c3e,u3e,Ote=D(()=>{Fte();i3e=/^[-+]?0x[a-fA-F0-9]+$/,s3e=/^0b[01]+$/,o3e=/^0o[0-7]+$/,a3e=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,c3e={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original",unicode:!1};u3e=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/});function LF(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(let r of e)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}var Ute=D(()=>{});var fo,$te=D(()=>{fo=class{constructor(t,r={},n){this.pattern=t,this.separator=r.separator||".",this.segments=this._parse(t),this.data=n,this._hasDeepWildcard=this.segments.some(i=>i.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(i=>i.attrName!==void 0),this._hasPositionSelector=this.segments.some(i=>i.position!==void 0)}_parse(t){let r=[],n=0,i="";for(;n{pg=class{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._deepByTerminalTag=new Map,this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard()){let s=t.segments[t.segments.length-1];if(s&&s.type!=="deep-wildcard"&&s.tag!=="*"){let o=s.tag;this._deepByTerminalTag.has(o)||this._deepByTerminalTag.set(o,[]),this._deepByTerminalTag.get(o).push(t)}else this._deepWildcards.push(t);return this}let r=t.length,i=t.segments[t.segments.length-1]?.tag;if(!i||i==="*")this._wildcardByDepth.has(r)||this._wildcardByDepth.set(r,[]),this._wildcardByDepth.get(r).push(t);else{let s=`${r}:${i}`;this._byDepthAndTag.has(s)||this._byDepthAndTag.set(s,[]),this._byDepthAndTag.get(s).push(t)}return this}addAll(t){for(let r of t)this.add(r);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return this.findMatch(t)!==null}findMatch(t){let r=t.getDepth(),n=t.getCurrentTag(),i=`${r}:${n}`,s=this._byDepthAndTag.get(i);if(s){for(let c=0;c{FF=class{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){let t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){let t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){let r=this._matcher.path;if(r.length!==0)return r[r.length-1].values?.[t]}hasAttr(t){let r=this._matcher.path;if(r.length===0)return!1;let n=r[r.length-1];return n.values!==void 0&&t in n.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){let t=this._matcher.path;return t.length===0?-1:t[t.length-1].position??0}getCounter(){let t=this._matcher.path;return t.length===0?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,r=!0){return this._matcher.toString(t,r)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}},wc=class{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new FF(this),this._keptAttrs=[]}push(t,r=null,n=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let s=this.path.length,o=this.siblingStacks[s];o||(o={counts:new Map,total:0},this.siblingStacks[s]=o);let a=n?`${n}:${t}`:t,c=o.counts.get(a)||0,u=o.total;o.counts.set(a,c+1),o.total++;let l={tag:t,position:u,counter:c};n!=null&&(l.namespace=n),r!=null&&(l.values=r),this.path.push(l);let d=this.path.length,f=i!==null?i.keep:null;if(f!=null&&f.length>0&&r)for(let p=0;pthis.path.length+1&&(this.siblingStacks.length=this.path.length+1);let r=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=r;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){let r=this.path[this.path.length-1];t!=null&&(r.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(this.path.length!==0)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(this.path.length===0)return!1;let r=this.path[this.path.length-1];return r.values!==void 0&&t in r.values}getAnyParentAttr(t){let r=this._keptAttrs;for(let n=r.length-1;n>=0;n--)if(r[n].name===t)return r[n].value}hasAnyParentAttr(t){let r=this._keptAttrs;for(let n=r.length-1;n>=0;n--)if(r[n].name===t)return!0;return!1}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,r=!0){let n=t||this.separator;if(n===this.separator&&r===!0){if(this._pathStringCache!==null)return this._pathStringCache;let s=this.path.map(o=>o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(n);return this._pathStringCache=s,s}return this.path.map(s=>r&&s.namespace?`${s.namespace}:${s.tag}`:s.tag).join(n)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){let r=t.segments;return r.length===0?!1:t.hasDeepWildcard()?this._matchWithDeepWildcard(r):this._matchSimple(r)}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let r=0;r=0&&r>=0;){let i=t[n];if(i.type==="deep-wildcard"){if(n--,n<0)return!0;let s=t[n],o=!1;for(let a=r;a>=0;a--)if(this._matchSegment(s,this.path[a],a===this.path.length-1)){r=a-1,n--,o=!0;break}if(!o)return!1}else{if(!this._matchSegment(i,this.path[r],r===this.path.length-1))return!1;r--,n--}}return n<0}_matchSegment(t,r,n){if(t.tag!=="*"&&t.tag!==r.tag||t.namespace!==void 0&&t.namespace!=="*"&&t.namespace!==r.namespace||t.attrName!==void 0&&(!n||!r.values||!(t.attrName in r.values)||t.attrValue!==void 0&&String(r.values[t.attrName])!==String(t.attrValue)))return!1;if(t.position!==void 0){if(!n)return!1;let i=r.counter??0;if(t.position==="first"&&i!==0)return!1;if(t.position==="odd"&&i%2!==1)return!1;if(t.position==="even"&&i%2!==0)return!1;if(t.position==="nth"&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>t&&{counts:new Map(t.counts),total:t.total}),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(r=>({...r})),this.siblingStacks=t.siblingStacks.map(r=>r&&{counts:new Map(r.counts),total:r.total}),this._keptAttrs=(t.keptAttrs||[]).map(r=>({...r}))}readOnly(){return this._view}}});var nE=D(()=>{$te();jte();Hte()});var p3e,hg,OF=D(()=>{p3e=[{id:"html-script-open",description:"]/i},{id:"html-javascript-protocol",description:"javascript: URI scheme (with optional whitespace/encoding)",pattern:/j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i},{id:"html-vbscript-protocol",description:"vbscript: URI scheme",pattern:/vbscript[\t\n\r ]*:/i},{id:"html-data-html",description:"data:text/html URI \u2014 can execute scripts in browsers",pattern:/data[\t\n\r ]*:[\t\n\r ]*text\/html/i},{id:"html-data-xhtml",description:"data:application/xhtml+xml URI",pattern:/data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i},{id:"html-data-svg",description:"data:image/svg+xml URI \u2014 can execute scripts",pattern:/data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i},{id:"html-inline-event-handler",description:"Inline event handler attributes: onclick=, onerror=, onload=, etc.",pattern:/\bon\w{1,30}\s*=/i},{id:"html-entity-obfuscated-script",description:"HTML-entity-encoded ]/i},{id:"html-javascript-protocol",description:"javascript: URI scheme (with optional whitespace/encoding)",pattern:/j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i},{id:"html-vbscript-protocol",description:"vbscript: URI scheme",pattern:/vbscript[\t\n\r ]*:/i},{id:"html-data-html",description:"data:text/html URI \u2014 can execute scripts in browsers",pattern:/data[\t\n\r ]*:[\t\n\r ]*text\/html/i},{id:"html-data-xhtml",description:"data:application/xhtml+xml URI",pattern:/data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i},{id:"html-data-svg",description:"data:image/svg+xml URI \u2014 can execute scripts",pattern:/data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i},{id:"html-inline-event-handler",description:"Inline event handler attributes: onclick=, onerror=, onload=, etc.",pattern:/\bon\w{1,30}\s*=/i},{id:"html-entity-obfuscated-script",description:"HTML-entity-encoded `:null}var ou=3,DBt=30,NBt=/\b(\d{4}-\d{2}-\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\.?\s+\d{1,2},?\s*\d{4}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\.?\s+\d{1,2})\b/i,MBt="html,body,main,section";function XQ(e,t){let r=e(t).children().toArray().map(n=>n.tagName?.toLowerCase()).filter(n=>!!n).sort();return`${t.tagName.toLowerCase()}>${r.join(",")}`}function PBt(e,t){let r=[],n=i=>{for(let s of e(i).children().toArray())r.push(s),n(s)};return n(t),r}function eD(e,t){let r=e.parent;for(;r;){if(r===t)return!0;r=r.parent}return!1}function LBt(e,t){let r=i=>{let s=[],o=i;for(;o&&o.type==="tag";)s.push(o),o=o.parent;return s},n=new Set(r(e));for(let i of r(t))if(n.has(i))return i;return null}function FBt(e,t){let r=new Map;for(let a of t){let c=a.parent;if(!c||c.type!=="tag")continue;let u=r.get(c)??[];u.push(a),r.set(c,u)}let n=[],i=[];for(let[a,c]of r)c.length>=ou?n.push({cards:[...c],container:a}):i.push(...c);if(n.length===0)return t.length>=ou?[t]:[];for(let a of i){let c=null;for(let u of n){let l=LBt(a,u.container);l&&(!c||eD(l,c.ancestor))&&(c={grid:u,ancestor:l})}c&&(c.grid.cards.push(a),c.grid.container=c.ancestor)}let s=e("*").toArray(),o=new Map(s.map((a,c)=>[a,c]));return n.map(a=>a.cards.sort((c,u)=>(o.get(c)??0)-(o.get(u)??0)))}function OBt(e,t){let r=e(t).attr("id");if(r&&e(`#${UBt(r)}`).length===1)return`#${r}`;let n=[],i=t;for(;i&&i.type==="tag";){let s=e(i).attr("id");if(s){n.unshift(`#${s}`);break}let o=i.tagName.toLowerCase(),a=e(i).prevAll(o).length+1;n.unshift(`${o}:nth-of-type(${a})`),i=i.parent}return n.join(" > ")}function UBt(e){return e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function n7(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function mBe(e,t){let r=e(t),n=r.find("h1,h2,h3,h4,h5,h6").length>0||r.find('[class*="title" i],[class*="headline" i]').length>0,i=r.find("img[src],source[srcset]").length>0||!!r.find('[style*="background-image" i]').attr("style"),s=r.find("a[href]").toArray().some(a=>e(a).text().trim().length>0),o=r.text().replace(/\s+/g," ").trim().length;return n&&(i||s)&&o>=20}function KQ(e){let t=e.find("h1,h2,h3,h4,h5,h6").first();return t.length&&t.text().trim()?t.text().replace(/\s+/g," ").trim():e.find('[class*="title" i],[class*="headline" i]').first().text().replace(/\s+/g," ").trim()}function $Bt(e,t){return e(t).children("h1,h2,h3,h4,h5,h6").first().text().replace(/\s+/g," ").trim()}function HBt(e){let t=e.find("img[src]").first().attr("src");if(t)return t;let n=(e.find('[style*="background-image" i]').first().attr("style")??"").match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/i);return n?n[1]:""}function jBt(e,t){let r=e(t);return r.is('[class*="cat" i],[class*="tag" i]')||r.closest('[class*="cat" i],[class*="tag" i]').length>0?1:0}function ZQ(e,t,r){let n=e(t),i=KQ(n),s=n.find("h1,h2,h3,h4,h5,h6").first().find("a[href]").first().attr("href"),o=n.find("a[href]").toArray().map(A=>e(A).attr("href")).find(Boolean),a=s??o??"",c=HBt(n),u=n.find("p").first().text().replace(/\s+/g," ").trim(),d=(n.find("time").first().text().trim()||(n.text().match(NBt)?.[0]??"")).trim(),p=n.find("a[href]").toArray().map((A,g)=>({href:e(A).attr("href")??"",text:e(A).text().replace(/\s+/g," ").trim(),order:g,score:jBt(e,A)})).filter(A=>A.text&&A.text!==i&&A.href!==a&&A.text.length<=DBt).sort((A,g)=>g.score-A.score||A.order-g.order)[0]?.text??"";return{id:n7(i)||n7(a.replace(/\.[a-z]+$/i,""))||`card-${r+1}`,title:i,excerpt:u,image:c,category:p,date:d,link:a,meta:{}}}function i7(e,t,r){let n=de(e.html(t),void 0,!1),i=n.root().children().first();if(r.title){let o=i.find("h1,h2,h3,h4,h5,h6").first(),a=o.find("a[href]").first().length?o.find("a[href]").first():o;a.length&&a.attr("data-dla-text","title").text("")}if(r.excerpt){let o=i.find("p").toArray().find(a=>n(a).text().replace(/\s+/g," ").trim()===r.excerpt);o&&n(o).attr("data-dla-text","content").text("")}if(r.category){let o=i.find("a[href]").toArray().find(a=>n(a).text().replace(/\s+/g," ").trim()===r.category);o&&n(o).attr("data-dla-text","cat.label").text("")}if(r.date){let o=i.find("time").first();if(o.length)o.attr("data-dla-text","meta.date").text("");else{let a=i.find("span").toArray().find(c=>n(c).text().replace(/\s+/g," ").trim()===r.date);a&&n(a).attr("data-dla-text","meta.date").text("")}}if(r.image){let o=i.find("img[src]").first();o.length&&o.attr("data-dla-attr","src:meta.image").removeAttr("src")}let s=(o,a)=>{let c=o.attr("data-dla-attr");o.attr("data-dla-attr",c?`${c},${a}`:a)};if(r.link&&i.find("a[href]").toArray().forEach(o=>{(n(o).attr("href")??"")===r.link&&s(n(o),"href:permalink")}),r.category){let o=i.find('[data-dla-text="cat.label"]').first();o.length&&o.is("a[href]")&&s(o,"href:cat.url")}return(n.html(i)??"").trim()}function qBt(e,t,r){let n=r.filter(l=>l.parent===t),i=r.filter(l=>l.parent!==t),s=new Map;for(let l of i){let d=l.parent;if(!d||d.type!=="tag")continue;let f=s.get(d)??[];f.push(l),s.set(d,f)}if(n.length<1||s.size!==1)return;let[[o,a]]=[...s.entries()];if(a.length<2||n.length+a.length!==r.length||!eD(o,t)||r.includes(o))return;let c=[...n,...a].map(l=>n7(ZQ(e,l,0).category)).filter(Boolean),u=c.length>0&&c.every(l=>l===c[0])?c[0]:void 0;return{leadCount:n.length,columnWrapperClass:(e(o).attr("class")??"").trim(),leadTemplate:i7(e,n[0],ZQ(e,n[0],0)),rowTemplate:i7(e,a[0],ZQ(e,a[0],0)),...u?{termSlug:u}:{}}}function zBt(e,t,r,n){let i=YBt(e,t),s=OBt(e,i),o=(e(i).attr("class")??"").trim(),a=t.filter(g=>mBe(e,g));if(a.lengthZQ(e,g,m)),u=c.map(g=>{let m={id:g.id,title:g.title,link:g.link,excerpt:g.excerpt};g.image&&(m.image=g.image),g.category&&(m.category=g.category),g.date&&(m.date=g.date);for(let[b,E]of Object.entries(g.meta))m[`meta_${b}`]=E;return m}),l=new Map;for(let g of c)g.link&&l.set(g.link,(l.get(g.link)??0)+1);for(let g=0;g1:!1,E=c[g].excerpt;if(n.resolvePage&&m&&!b)try{let C=n.resolvePage(m);if(C){let w=JQ(C);w&&w.trim()&&(E=w)}}catch{}u[g].content=E}let d=[...l.entries()].filter(([,g])=>g>1).map(([g])=>g),f=d.length?` shared-target(single-template)=${d.join(",")}`:"",p=c.every(g=>g.title),h=i7(e,a[0],c[0]),A=qBt(e,i,a);return{containerSelector:s,containerClass:o,records:u,cardTemplate:h,...A?{featured:A}:{},confidence:p&&h?"high":"low",evidence:`signature=${r} cards=${a.length} roles=title,excerpt,image,category,date,link${f}`}}function VBt(e){let t=new Map;for(let r of e){let n=t.get(r.sig)??{sig:r.sig,candidates:[],richCards:[]};n.candidates.push(r);for(let i of r.richCards)n.richCards.includes(i)||n.richCards.push(i);t.set(r.sig,n)}return[...t.values()]}function gBe(e,t){return e.map(r=>t.filter(n=>eD(n,r)).length)}function GBt(e,t,r){let n=0,i=!1;for(let s of t){let o=r.filter(u=>eD(u,s));if(o.length===0)continue;if(o.length!==1)return"none";let a=KQ(e(s)),c=KQ(e(o[0]));a&&c&&a!==c&&(i=!0),n+=1}return nc>=ou)&&r.add(s)}for(let s of i)for(let o of i){if(s===o||gBe(s.richCards,o.richCards).reduce((l,d)=>l+d,0)!==o.richCards.length)continue;let u=GBt(e,s.richCards,o.richCards);u==="part"?n.add(o.sig):u==="wrapper"&&s.candidates.forEach(l=>r.add(l))}return t.filter(s=>!r.has(s)&&!n.has(s.sig))}function YBt(e,t){let r=t[0].parent;return r&&r.type==="tag"&&!e(r).is(MBt)?r:JBt(e,t)?t[0]:r??t[0]}function JBt(e,t){if(t.lengthn.parent).filter(n=>!!n))];return r.lengthn.tagName?.toLowerCase()!=="section")||r.some(n=>t.filter(i=>i.parent===n).length!==1)?!1:t.some(n=>{let i=$Bt(e,n.parent),s=KQ(e(n));return!!(i&&s&&i!==s)})}function s7(e,t={}){let r=de(e),n=r("body")[0],i=n?PBt(r,n):[],s=new Map;for(let l of i){if(r(l).children().length===0)continue;let d=XQ(r,l),f=s.get(d)??[];f.push(l),s.set(d,f)}let o=[];for(let[l,d]of s)if(!(d.length=ou&&o.push({cards:f,sig:l});let a=o.map(l=>({...l,richCards:l.cards.filter(d=>mBe(r,d))})).filter(l=>l.richCards.length>=ou),c=WBt(r,a),u=[];for(let{cards:l,sig:d}of c){let f=zBt(r,l,d,t);f.records.length>0&&u.push(f)}return u}var ZBt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],IBe=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],KBt="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",SBe="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",o7={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a7="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",XBt={5:a7,"5module":a7+" export import",6:a7+" const class extends export import super"},vBe=/^in(stanceof)?$/,ekt=new RegExp("["+SBe+"]"),tkt=new RegExp("["+SBe+KBt+"]");function u7(e,t){for(var r=65536,n=0;ne)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function au(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ekt.test(String.fromCharCode(e)):t===!1?!1:u7(e,IBe)}function tf(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&tkt.test(String.fromCharCode(e)):t===!1?!1:u7(e,IBe)||u7(e,ZBt)}var Sr=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function ba(e,t){return new Sr(e,{beforeExpr:!0,binop:t})}var Ea={beforeExpr:!0},no={startsExpr:!0},p7={};function Ar(e,t){return t===void 0&&(t={}),t.keyword=e,p7[e]=new Sr(e,t)}var x={num:new Sr("num",no),regexp:new Sr("regexp",no),string:new Sr("string",no),name:new Sr("name",no),privateId:new Sr("privateId",no),eof:new Sr("eof"),bracketL:new Sr("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Sr("]"),braceL:new Sr("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Sr("}"),parenL:new Sr("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Sr(")"),comma:new Sr(",",Ea),semi:new Sr(";",Ea),colon:new Sr(":",Ea),dot:new Sr("."),question:new Sr("?",Ea),questionDot:new Sr("?."),arrow:new Sr("=>",Ea),template:new Sr("template"),invalidTemplate:new Sr("invalidTemplate"),ellipsis:new Sr("...",Ea),backQuote:new Sr("`",no),dollarBraceL:new Sr("${",{beforeExpr:!0,startsExpr:!0}),eq:new Sr("=",{beforeExpr:!0,isAssign:!0}),assign:new Sr("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Sr("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Sr("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ba("||",1),logicalAND:ba("&&",2),bitwiseOR:ba("|",3),bitwiseXOR:ba("^",4),bitwiseAND:ba("&",5),equality:ba("==/!=/===/!==",6),relational:ba("/<=/>=",7),bitShift:ba("<>/>>>",8),plusMin:new Sr("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ba("%",10),star:ba("*",10),slash:ba("/",10),starstar:new Sr("**",{beforeExpr:!0}),coalesce:ba("??",1),_break:Ar("break"),_case:Ar("case",Ea),_catch:Ar("catch"),_continue:Ar("continue"),_debugger:Ar("debugger"),_default:Ar("default",Ea),_do:Ar("do",{isLoop:!0,beforeExpr:!0}),_else:Ar("else",Ea),_finally:Ar("finally"),_for:Ar("for",{isLoop:!0}),_function:Ar("function",no),_if:Ar("if"),_return:Ar("return",Ea),_switch:Ar("switch"),_throw:Ar("throw",Ea),_try:Ar("try"),_var:Ar("var"),_const:Ar("const"),_while:Ar("while",{isLoop:!0}),_with:Ar("with"),_new:Ar("new",{beforeExpr:!0,startsExpr:!0}),_this:Ar("this",no),_super:Ar("super",no),_class:Ar("class",no),_extends:Ar("extends",Ea),_export:Ar("export"),_import:Ar("import",no),_null:Ar("null",no),_true:Ar("true",no),_false:Ar("false",no),_in:Ar("in",{beforeExpr:!0,binop:7}),_instanceof:Ar("instanceof",{beforeExpr:!0,binop:7}),_typeof:Ar("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Ar("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Ar("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},io=/\r\n?|\n|\u2028|\u2029/,rkt=new RegExp(io.source,"g");function k0(e){return e===10||e===13||e===8232||e===8233}function xBe(e,t,r){r===void 0&&(r=e.length);for(var n=t;n>10)+55296,(e&1023)+56320))}var skt=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,PI=function(t,r){this.line=t,this.column=r};PI.prototype.offset=function(t){return new PI(this.line,this.column+t)};var oD=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function _Be(e,t){for(var r=1,n=0;;){var i=xBe(e,n,t);if(i<0)return new PI(r,t-n);++r,n=i}}var l7={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},EBe=!1;function okt(e){var t={};for(var r in l7)t[r]=e&&_0(e,r)?e[r]:l7[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!EBe&&typeof console=="object"&&console.warn&&(EBe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),yBe(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}if(yBe(t.onComment)&&(t.onComment=akt(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function akt(e,t){return function(r,n,i,s,o,a){var c={type:r?"Block":"Line",value:n,start:i,end:s};e.locations&&(c.loc=new oD(this,o,a)),e.ranges&&(c.range=[i,s]),t.push(c)}}var Nh=1,Mh=2,h7=4,TBe=8,A7=16,RBe=32,aD=64,QBe=128,Ph=256,LI=512,DBe=1024,cD=Nh|Mh|Ph;function g7(e,t){return Mh|(e?h7:0)|(t?TBe:0)}var rD=0,m7=1,dl=2,NBe=3,MBe=4,PBe=5,Kn=function(t,r,n){this.options=t=okt(t),this.sourceFile=t.sourceFile,this.keywords=ef(XBt[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=o7[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=ef(i);var s=(i?i+" ":"")+o7.strict;this.reservedWordsStrict=ef(s),this.reservedWordsStrictBind=ef(s+" "+o7.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(` -`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(io).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Mh:Nh),this.regexpState=null,this.privateNameStack=[]},wa={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Kn.prototype.parse=function(){var t=this,r=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(r)})};wa.inFunction.get=function(){return(this.currentVarScope().flags&Mh)>0};wa.inGenerator.get=function(){return(this.currentVarScope().flags&TBe)>0};wa.inAsync.get=function(){return(this.currentVarScope().flags&h7)>0};wa.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(Ph|LI))return!1;if(r&Mh)return(r&h7)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};wa.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Nh)};wa.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&aD)>0||this.options.allowSuperOutsideMethod};wa.allowDirectSuper.get=function(){return(this.currentThisScope().flags&QBe)>0};wa.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};wa.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(Ph|LI)||r&Mh&&!(r&A7))return!0}return!1};wa.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&DBe||!this.inModule&&t&Nh)};wa.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ph)>0};Kn.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,gi.lastIndex=e,e+=gi.exec(this.input)[0].length,this.input[e]===";"&&e++}};ss.eat=function(e){return this.type===e?(this.next(),!0):!1};ss.isContextual=function(e){return this.type===x.name&&this.value===e&&!this.containsEsc};ss.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};ss.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};ss.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};ss.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||io.test(this.input.slice(this.lastTokEnd,this.start))};ss.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};ss.semicolon=function(){!this.eat(x.semi)&&!this.insertSemicolon()&&this.unexpected()};ss.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};ss.expect=function(e){this.eat(e)||this.unexpected()};ss.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var uD=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ss.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};ss.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};ss.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case x._class:return e&&this.unexpected(),this.parseClass(i,!0);case x._if:return this.parseIfStatement(i);case x._return:return this.parseReturnStatement(i);case x._switch:return this.parseSwitchStatement(i);case x._throw:return this.parseThrowStatement(i);case x._try:return this.parseTryStatement(i);case x._const:case x._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case x._while:return this.parseWhileStatement(i);case x._with:return this.parseWithStatement(i);case x.braceL:return this.parseBlock(!0,i);case x.semi:return this.parseEmptyStatement(i);case x._export:case x._import:if(this.options.ecmaVersion>10&&n===x._import){gi.lastIndex=this.pos;var o=gi.exec(this.input),a=this.pos+o[0].length,c=this.input.charCodeAt(a);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===x._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var l=this.value,d=this.parseExpression();return n===x.name&&d.type==="Identifier"&&this.eat(x.colon)?this.parseLabeledStatement(i,l,d,e):this.parseExpressionStatement(i,d)}};nt.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(x.semi)||this.insertSemicolon()?e.label=null:this.type!==x.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(x.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};nt.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(y7),this.enterScope(0),this.expect(x.parenL),this.type===x.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===x._var||this.type===x._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),this.parseForAfterInit(e,n,t)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var c=this.startNode();return this.next(),a==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(c,!0,a),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(e,c,t)}var u=this.containsEsc,l=new uD,d=this.start,f=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===x._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===x._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!u&&f.type==="Identifier"&&f.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&o&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,l),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))};nt.parseForAfterInit=function(e,t,r){return(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===x._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&r>-1&&this.unexpected(r)):this.options.ecmaVersion>=9&&(e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};nt.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,MI|(r?0:d7),!1,t)};nt.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(x._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};nt.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(x.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};nt.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(x.braceL),this.labels.push(ukt),this.enterScope(DBe);for(var t,r=!1;this.type!==x.braceR;)if(this.type===x._case||this.type===x._default){var n=this.type===x._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(x.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};nt.parseThrowStatement=function(e){return this.next(),io.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var lkt=[];nt.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?RBe:0),this.checkLValPattern(e,t?MBe:dl),this.expect(x.parenR),e};nt.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===x._catch){var t=this.startNode();this.next(),this.eat(x.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(x._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};nt.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};nt.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(y7),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};nt.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};nt.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};nt.parseLabeledStatement=function(e,t,r,n){for(var i=0,s=this.labels;i=0;c--){var u=this.labels[c];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=a;else break}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};nt.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};nt.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(x.braceL),e&&this.enterScope(0);this.type!==x.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};nt.parseFor=function(e,t){return e.init=t,this.expect(x.semi),e.test=this.type===x.semi?null:this.parseExpression(),this.expect(x.semi),e.update=this.type===x.parenR?null:this.parseExpression(),this.expect(x.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};nt.parseForIn=function(e,t){var r=this.type===x._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(x.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};nt.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(x.eq)?i.init=this.parseMaybeAssign(t):!n&&r==="const"&&!(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==x._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!n&&i.id.type!=="Identifier"&&!(t&&(this.type===x._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(x.comma))break}return e};nt.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?m7:dl,!1)};var MI=1,d7=2,LBe=4;nt.parseFunction=function(e,t,r,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===x.star&&t&d7&&this.unexpected(),e.generator=this.eat(x.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&MI&&(e.id=t&LBe&&this.type!==x.name?null:this.parseIdent(),e.id&&!(t&d7)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?m7:dl:NBe));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(g7(e.async,e.generator)),t&MI||(e.id=this.type===x.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&MI?"FunctionDeclaration":"FunctionExpression")};nt.parseFunctionParams=function(e){this.expect(x.parenL),e.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};nt.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(x.braceL);this.type!==x.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&dkt(n,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};nt.parseClassElement=function(e){if(this.eat(x.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(x.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===x.star?a=!0:n="static"}if(r.static=a,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===x.star)&&!this.canInsertSemicolon()?s=!0:n="async"),!n&&(t>=9||!s)&&this.eat(x.star)&&(i=!0),!n&&!s&&!i){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=c:n=c)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===x.parenL||o!=="method"||i||s){var u=!r.static&&nD(r,"constructor"),l=u&&e;u&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=u?"constructor":o,this.parseClassMethod(r,i,s,l)}else this.parseClassField(r);return r};nt.isClassElementNameStart=function(){return this.type===x.name||this.type===x.privateId||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword};nt.parseClassElementName=function(e){this.type===x.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};nt.parseClassMethod=function(e,t,r,n){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&nD(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};nt.parseClassField=function(e){return nD(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&nD(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(x.eq)?(this.enterScope(LI|aD),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};nt.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Ph|aD);this.type!==x.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};nt.parseClassId=function(e,t){this.type===x.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,dl,!1)):(t===!0&&this.unexpected(),e.id=null)};nt.parseClassSuper=function(e){e.superClass=this.eat(x._extends)?this.parseExprSubscripts(null,!1):null};nt.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};nt.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};nt.parseExport=function(e,t){if(this.next(),this.eat(x.star))return this.parseExportAllDeclaration(e,t);if(this.eat(x._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,n=e.specifiers;r=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};nt.parseExportDeclaration=function(e){return this.parseStatement(null)};nt.parseExportDefaultDeclaration=function(){var e;if(this.type===x._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,MI|LBe,!1,e)}else if(this.type===x._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};nt.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),_0(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};nt.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};nt.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,dl),this.finishNode(e,"ImportSpecifier")};nt.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,dl),this.finishNode(e,"ImportDefaultSpecifier")};nt.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,dl),this.finishNode(e,"ImportNamespaceSpecifier")};nt.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===x.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(x.comma)))return e;if(this.type===x.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(x.braceL);!this.eat(x.braceR);){if(t)t=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;e.push(this.parseImportSpecifier())}return e};nt.parseWithClause=function(){var e=[];if(!this.eat(x._with))return e;this.expect(x.braceL);for(var t={},r=!0;!this.eat(x.braceR);){if(r)r=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;_0(t,i)&&this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(n)}return e};nt.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(x.colon),this.type!==x.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};nt.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===x.string){var e=this.parseLiteral(this.value);return skt.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};nt.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Ia=Kn.prototype;Ia.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n=8&&!a&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(x._function))return this.overrideContext(wn.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(x.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===x.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(x.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[c],!0,t)}return c;case x.regexp:var u=this.value;return n=this.parseLiteral(u.value),n.regex={pattern:u.pattern,flags:u.flags},n;case x.num:case x.string:return this.parseLiteral(this.value);case x._null:case x._true:case x._false:return n=this.startNode(),n.value=this.type===x._null?null:this.type===x._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case x.parenL:var l=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),d;case x.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(x.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case x.braceL:return this.overrideContext(wn.b_expr),this.parseObj(!1,e);case x._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case x._class:return this.parseClass(this.startNode(),!1);case x._new:return this.parseNew();case x.backQuote:return this.parseTemplate();case x._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};Tt.parseExprAtomDefault=function(){this.unexpected()};Tt.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===x.parenL&&!e)return this.parseDynamicImport(t);if(this.type===x.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};Tt.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(x.parenR)?e.options=null:(this.expect(x.comma),this.afterTrailingComma(x.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(x.parenR)||(this.expect(x.comma),this.afterTrailingComma(x.parenR)||this.unexpected())));else if(!this.eat(x.parenR)){var t=this.start;this.eat(x.comma)&&this.eat(x.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};Tt.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};Tt.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};Tt.parseParenExpression=function(){this.expect(x.parenL);var e=this.parseExpression();return this.expect(x.parenR),e};Tt.shouldParseArrow=function(e){return!this.canInsertSemicolon()};Tt.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,c=[],u=!0,l=!1,d=new uD,f=this.yieldPos,p=this.awaitPos,h;for(this.yieldPos=0,this.awaitPos=0;this.type!==x.parenR;)if(u?u=!1:this.expect(x.comma),s&&this.afterTrailingComma(x.parenR,!0)){l=!0;break}else if(this.type===x.ellipsis){h=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var A=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(x.parenR),e&&this.shouldParseArrow(c)&&this.eat(x.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(r,n,c,t);(!c.length||l)&&this.unexpected(this.lastTokStart),h&&this.unexpected(h),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,a),i.expressions=c,this.finishNodeAt(i,"SequenceExpression",A,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var m=this.startNodeAt(r,n);return m.expression=i,this.finishNode(m,"ParenthesizedExpression")}else return i};Tt.parseParenItem=function(e){return e};Tt.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var fkt=[];Tt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===x.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(n,"Invalid use of 'super'"),this.eat(x.parenL)?e.arguments=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1):e.arguments=fkt,this.finishNode(e,"NewExpression")};Tt.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===x.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,` +`:""}function DBt(e){let t=[],r=e.pages.flatMap(m=>{try{return[{p:m,r:zxe({slug:m.slug,isHome:m.isHome,bodyHtml:m.bodyHtml,css:m.css,specs:m.specs??[],mediaUrlMap:e.mediaUrlMap,linkMap:e.linkMap,mobile:m.mobile})}]}catch{return t.push(m.slug),[]}}),n=new Map,i=[],s=new Map,o=m=>{let b=Tw(m.headerIsland,m.footerIsland),C=n.get(b);return C||(C=`c${i.length}`,n.set(b,C),i.push(C),s.set(C,{headerIsland:m.headerIsland,footerIsland:m.footerIsland,chromeCss:m.chromeCss})),C},a=r.find(m=>m.p.isHome)??r[0];a&&o(a.r);let c=new Map,u=[],l=[];for(let{p:m,r:b}of r){let C=o(b);c.set(C,(c.get(C)??0)+1),u.push({slug:m.slug,isHome:m.isHome,postType:m.postType,pageCss:b.mainCss,scaffold:b.scaffold,mobile:m.mobile,chromeKey:C}),l.push({slug:m.slug,title:m.title,isHome:m.isHome,postType:m.postType,postContent:b.mainIsland})}let d=i.map(m=>{let b=s.get(m),C=(c.get(m)??0)>1;return{key:m,headerIsland:C?zm(b.headerIsland):b.headerIsland,footerIsland:C?zm(b.footerIsland):b.footerIsland}}),f=d.map(m=>s.get(m.key)?.chromeCss??"").filter(Boolean).join(` +`),p=QBt(a?.p.bodyHtml??""),h="";if(e.hasProducts){let m=new Map;for(let w of r)w.r.headerIsland&&m.set(w,Tw(w.r.headerIsland,""));let b=new Map;for(let w of m.values())b.set(w,(b.get(w)??0)+1);let C=w=>{let T=m.get(w);return T?b.get(T)??0:0},E=[...r].sort((w,T)=>{let _=Number(w.p.isHome??!1)-Number(T.p.isHome??!1);return _!==0?_:C(T)-C(w)});for(let w of E)if(h=ABe(w.r.headerIsland)||ABe(w.r.mainIsland),h)break}let A=eBe({themeName:e.themeName,chromeVariants:d,siteCss:f,bodyClasses:p,pages:u,storeHeaderIsland:h,hasProducts:e.hasProducts,themeJsonPalette:e.themeJsonPalette,themeJsonFontFamilies:e.themeJsonFontFamilies}),g=[];return e.hasProducts&&!h&&g.push("Store pages (single-product / archive-product) will render WITHOUT site chrome: no
could be isolated from any carried page island, so WooCommerce defaults are used. Capture an interior page with a header, or add a header part manually."),{themeFiles:A,wxrPages:l,skipped:t,warnings:g}}var gBe=async(e,t)=>{let r=e.outputDir,n=e.studioSitePath,i=e.pages,s=e.editableIslands!==!1;if(!r)return t.errorResult("liberate_reconstruct_pages_carry requires `outputDir`.");if(!n)return t.errorResult("liberate_reconstruct_pages_carry requires `studioSitePath`.");if(!Array.isArray(i)||i.length===0)return t.errorResult("liberate_reconstruct_pages_carry requires a non-empty `pages` array ({slug, sourceUrl, title, isHome?}).");let o=Kc(n);if(!o)return t.errorResult(`studioSitePath has no wp-content: ${n}`);let a=e.themeName??"Liberated (Carry)",u=Xw(r).replace(/-replica$/,"")+"-carry",l=no(o,"wp-content","themes",u),d=[],f=[],p=[],h=[],A=(()=>{try{return new URL(i[0].sourceUrl).origin}catch{return}})(),g={};try{let G=no(ou(r),"responsive-images.json");R0(G)&&(g=JSON.parse(tD(G,"utf8")))}catch{}let m={};try{let G=no(ou(r),"html-mobile","heights.json");R0(G)&&(m=JSON.parse(tD(G,"utf8")))}catch{}let b=no(o,"wp-content","uploads","_carry-mobile");for(let G of i){let fe=no(ou(r),"html",`${G.htmlSlug??G.slug}.html`),Ze="";if(R0(fe))try{Ze=tD(fe,"utf8")}catch{}if(!Ze)try{Ze=await(await fetch(G.sourceUrl)).text()}catch(Ye){f.push({slug:G.slug,error:Ye instanceof Error?Ye.message:String(Ye)});continue}let Z=no(ou(r),"screenshots","desktop",`${G.htmlSlug??G.slug}.png`);h.push({slug:G.slug,height:kme(Z),assess:Bme(Ze,A)});let xe="";try{xe=await dBe({html:Ze,inlineStyleText:"",baseUrl:G.sourceUrl,onError:()=>{}})}catch{}try{let Ye=no(ou(r),"css");XQ(Ye,{recursive:!0}),eD(no(Ye,`${G.slug}.css`),xe)}catch{}let Oe,_e=no(ou(r),"html-mobile",`${G.htmlSlug??G.slug}.html`);if(R0(_e))try{XQ(b,{recursive:!0});let Ye=tD(_e,"utf8");eD(no(b,`${G.slug}.html`),Ye),Oe={docUrl:`/wp-content/uploads/_carry-mobile/${G.slug}.html`,height:m[G.htmlSlug??G.slug]??6e3}}catch{}d.push({slug:G.slug,title:G.title,isHome:G.isHome,postType:G.postType,bodyHtml:Ze,css:xe,mobile:Oe})}if(d.length===0)return t.errorResult(`liberate_reconstruct_pages_carry: no pages could be loaded. fetchErrors: ${JSON.stringify(f)}`);p.push(..._me(h));let C=gQ(r,i.map(G=>G.sourceUrl)),E=await iBe(r,d.map(G=>G.bodyHtml)),w=new Map,T=[];try{let G=await mQ({outputDir:r,url:i[0].sourceUrl,wpRoot:o});w=G.mediaUrlMap,T.push(...G.result.errors)}catch(G){T.push({sourceUrl:"*",error:G instanceof Error?G.message:String(G)})}let _=R0(no(ou(r),"products.csv"))||R0(no(ou(r),"products.jsonl")),D=!1,k;if(_){let fe=await Gd(n,"woocommerce",(Ze,Z)=>ts(["wp","--path",Ze,...Z],{timeout:3e5,maxBuffer:16777216}).then(xe=>xe.stdout));fe.ok?D=!0:(k=`WooCommerce auto-install failed (store templates will not render until WooCommerce is installed): ${fe.error}`,console.error(`[reconstruct-carry] ${k}`))}let v=hBe(r),{themeFiles:M,wxrPages:F,skipped:S,warnings:I}=DBt({themeName:a,pages:d,mediaUrlMap:w,linkMap:C,hasProducts:_,themeJsonPalette:v.themeJsonPalette,themeJsonFontFamilies:v.themeJsonFontFamilies}),R=await oBe(l,M,{wpRoot:o});for(let G of R.files){let fe=no(l,G.path);XQ(RBt(fe),{recursive:!0}),eD(fe,G.content)}let U=F.map(G=>({slug:G.slug,title:G.title,isHome:G.isHome,postType:G.postType,postContent:tBe(G.postContent,g,w)})),J=0,oe;if(s){let G=new ef;await G.start().catch(()=>{});try{let fe=[];for(let Ze of U){let Z=p0(Ze.postContent);J+=Z.converted;let xe=(await G.fix([Z.content]))[0];fe.push({...Ze,postContent:xe?.html??Z.content})}U=fe}finally{await G.stop().catch(()=>{})}if(J>0){let fe=h0();ac({wpRoot:o,blockPlugins:[fe]}),oe=fe.slug;try{await ts(["wp","--path",n,"plugin","activate",fe.slug],{timeout:12e4,maxBuffer:16*1024*1024})}catch(Ze){console.error(`[reconstruct-carry] editable-html plugin activate failed: ${Ze.message}`)}}}let j=lBe([...U.map(G=>G.postContent),...R.files.filter(G=>G.path.endsWith(".css")||G.path.endsWith(".html")).map(G=>G.content)]),ee=e.islandsOutDir,K;if(ee){let G=ou(ee);XQ(G,{recursive:!0}),eSe(G,U.map(fe=>fe.slug)),K=U.map(fe=>{let Ze=no(G,`${fe.slug}.html`);return eD(Ze,fe.postContent),{slug:fe.slug,title:fe.title,isHome:fe.isHome,postType:fe.postType,islandPath:Ze,bytes:fe.postContent.length}})}else K=U;let ue=[...I];return p.length&&ue.push(`${p.length} page(s) captured with an empty body (JS-app content that didn't render \u2192 carried blank). Re-capture with the dynamic-content waits, or use a WP-native equivalent: `+p.map(G=>`${G.slug} [${G.reason}${G.detail?": "+G.detail:""}]`).join(", ")),t.textResult({ok:f.length===0,themeRoot:l,themeSlug:u,themeFilesWritten:M.length,fetchErrors:f,skipped:S,warnings:ue,...k?{wooWarning:k}:{},wooEnsured:D,emptyBodies:p,mediaInstalled:w.size,mediaErrors:T,missingMediaDownloaded:E.downloaded,missingMediaFailed:E.failed,fontsLocalized:R.downloaded,fontsFailed:R.failed,residualCdnAssets:j.refs.length,residualCdnByHost:j.byHost,residualCdnSamples:j.samples,islandsConverted:J,editableHtmlPluginSlug:oe,islandsDir:ee?ou(ee):void 0,pages:K})};Fs();import{join as LBt}from"node:path";import{existsSync as FBt}from"node:fs";zo();zo();import{readFileSync as NBt,renameSync as MBt}from"node:fs";function PBt(e,t){let r=0;for(let n of e){if(n.type!=="post"&&n.type!=="page"||!n.content||!n.content.trim())continue;let i=AQ(n.content,t,{url:n.sourceUrl??""});i!=null&&i.trim()&&i!==n.content&&(n.content=i,r++)}return r}function mBe(e,t){let r=NBt(e,"utf8"),n=/\s*publish\s*<\/wp:status>/.test(r)?"publish":"draft",i=js(e),s=new ja(i.site,{contentStatus:n});s.authors=i.authors,s.categories=i.categories,s.tags=i.tags,s.terms=i.terms,s.comments=i.comments,s.redirects=i.redirects,s.items=i.items;let o=0;for(let u of s.items)o=Math.max(o,u.id);for(let u of s.authors)o=Math.max(o,u.id);for(let u of s.categories)o=Math.max(o,u.id);for(let u of s.tags)o=Math.max(o,u.id);for(let u of s.terms)o=Math.max(o,u.id);for(let u of s.comments)o=Math.max(o,u.id);s._nextId=o+1;let a=s.items.filter(u=>u.type==="post"||u.type==="page").length,c=PBt(s.items,t);if(c>0){let u=`${e}.blockify.tmp`;s.serialize(u),MBt(u,e)}return{converted:c,postsAndPages:a}}var yBe=async(e,t)=>{let r=e.outputDir;if(!r)return t.errorResult("liberate_blockify_wxr requires `outputDir`.");let n=e.wxrPath??LBt(r,"output.wxr");if(!FBt(n))return t.errorResult(`WXR not found at ${n}`);let i=e.platform??jo.readAdapter(r)??void 0,s=i?t.findAdapter(i):null;if(!s?.blocks)return t.textResult({wxrPath:n,converted:0,skipped:!0,reason:i?`adapter '${i}' has no block recipe \u2014 bodies left as source HTML`:"no platform recorded in session.json (pass `platform` to override)"});try{let o=mBe(n,s.blocks);return t.textResult({wxrPath:n,platform:i,...o})}catch(o){return t.errorResult(`blockify failed for ${n}: ${o instanceof Error?o.message:String(o)}`)}};_i();Fs();import{mkdirSync as OBt}from"node:fs";var bBe=async(e,t)=>{let r=e.url,n=e.outputDir;OBt(n,{recursive:!0});let i=new Ho(n);if(!i.acquireLock())return t.errorResult("Another liberation workflow is already running in this outputDir.");try{let s=Array.isArray(e.urls)?e.urls:[];s.length===0&&(s=await si(r));let o=await hs(r),a=t.findAdapter(o.platform),{captureScreenshots:c}=await Promise.resolve().then(()=>(xR(),sq)),u=await c({urls:s,outputDir:n,primaryUrl:r,types:e.types,limit:e.limit,concurrency:e.concurrency,browserRestartEvery:e.browserRestartEvery,cdpPort:e.cdpPort,force:e.force,verbose:e.verbose,removeSelectors:a?.capture?.removeSelectors,prepareCapture:a?.capture?.prepare,server:t.server});return t.textResult(u)}finally{i.releaseLock()}};Bt();import{existsSync as Qke,readdirSync as O_t,readFileSync as Dke,writeFileSync as U_t,mkdirSync as $_t}from"node:fs";import{join as yD,extname as H_t,normalize as Tke,isAbsolute as Rke,relative as j_t,resolve as q_t}from"node:path";import{runInNewContext as y_t}from"node:vm";var UBt=20,$Bt=32,EBe=new Set(["string","integer","number","boolean"]),CBe=new Set(["email","url","textarea","date"]),HBt=new Set(["post","page","attachment"]),jBt=new Set(["category","post_tag"]),qBt=new Set(["revision","nav_menu_item","wp_block","wp_template","wp_template_part"]),zBt=new Set(["nav_menu","link_category","post_format"]),VBt=/^[a-z0-9][a-z0-9_-]*$/,GBt=/^[A-Za-z0-9_][A-Za-z0-9_-]*$/;function wBe(e,t,r,n){if(!e){n.push(`${t} slug is required.`);return}e.length>r&&n.push(`${t} slug "${e}" is ${e.length} chars; WordPress max is ${r}.`),VBt.test(e)||n.push(`${t} slug must be lowercase letters/numbers/-/_ : ${e}`)}function IBe(e,t,r,n,i,s){for(let o of e.matchAll(/map\.([A-Za-z0-9_]+)\./g))o[1]in t||n.push(`${s} references undefined map: ${o[1]}`);for(let o of e.matchAll(/meta\.([A-Za-z0-9_]+)/g))r.has(o[1])||i.push(`${s} references undeclared meta key: ${o[1]}`)}function OI(e){let t=[],r=[];if(!e||typeof e!="object")return{valid:!1,errors:["model is not an object."],warnings:[],counts:{fields:0,items:0,terms:0,mounts:0}};e.schema!==3&&r.push(`schema is ${e.schema??"(absent)"}; current is ${3}.`);let n=e.cpt;n?.slug?(wBe(n.slug,"cpt",UBt,t),qBt.has(n.slug)?t.push(`cpt.slug is reserved by WordPress: ${n.slug}`):HBt.has(n.slug)&&r.push(`cpt.slug "${n.slug}" targets a WordPress built-in type; it will be reused, not registered.`)):t.push("cpt.slug is required.");let i=e.taxonomy,s=new Set;if(!i?.slug)t.push("taxonomy.slug is required.");else{wBe(i.slug,"taxonomy",$Bt,t),zBt.has(i.slug)?t.push(`taxonomy.slug is reserved by WordPress: ${i.slug}`):jBt.has(i.slug)&&r.push(`taxonomy.slug "${i.slug}" targets a WordPress built-in taxonomy; it will be reused, not registered.`);for(let c of i.terms??[])c.slug?s.has(c.slug)&&t.push(`duplicate taxonomy term slug: ${c.slug}`):t.push("taxonomy term is missing a slug."),s.add(c.slug)}let o=new Set;for(let c of e.fields??[])c.key?GBt.test(c.key)||t.push(`field key must be alphanumeric/_/- : ${c.key}`):t.push("field key is required."),o.has(c.key)&&t.push(`duplicate field key: ${c.key}`),o.add(c.key),EBe.has(c.type)||t.push(`field ${c.key} type must be one of ${[...EBe].join(", ")}.`),c.format&&!CBe.has(c.format)&&t.push(`field ${c.key} format must be one of ${[...CBe].join(", ")}.`),c.format&&c.type!=="string"&&r.push(`field ${c.key} has format "${c.format}" but type "${c.type}" (format applies to string fields).`);let a=new Set;for(let c of e.items??[]){c.id?a.has(c.id)&&t.push(`duplicate item id: ${c.id}`):t.push("item is missing an id."),a.add(c.id),c.title||r.push(`item ${c.id} has no title.`);for(let u of Object.keys(c.meta??{}))o.has(u)||r.push(`item ${c.id} sets undeclared meta key: ${u}`);for(let u of c.terms??[])s.has(u)||r.push(`item ${c.id} references unknown taxonomy term: ${u}`)}for(let c of e.mounts??[])/^[#.][\w-]+$/.test(c.selector??"")||r.push(`mount selector is not a simple #id/.class: ${c.selector}`),n?.slug&&c.query?.postType&&c.query.postType!==n.slug&&r.push(`mount ${c.selector} queries postType "${c.query.postType}" \u2260 cpt.slug "${n.slug}".`),c.featured&&(typeof c.featured.columnWrapperClass!="string"&&t.push(`mount ${c.selector} featured.columnWrapperClass must be a string.`),(!Number.isInteger(c.featured.leadPerPage)||c.featured.leadPerPage<1)&&t.push(`mount ${c.selector} featured.leadPerPage must be a positive integer.`),(!Number.isInteger(c.featured.columnPerPage)||c.featured.columnPerPage<0)&&t.push(`mount ${c.selector} featured.columnPerPage must be a non-negative integer.`),(!c.featured.variant||typeof c.featured.variant!="string")&&t.push(`mount ${c.selector} featured.variant is required.`));if(e.card){let c=e.card.maps??{};if(e.card.template&&IBe(e.card.template,c,o,t,r,"card template"),e.card.variants!==void 0)if(!e.card.variants||typeof e.card.variants!="object"||Array.isArray(e.card.variants))t.push("card.variants must be an object of template strings.");else for(let[u,l]of Object.entries(e.card.variants)){if(typeof l!="string"){t.push(`card variant ${u} must be a string.`);continue}IBe(l,c,o,t,r,`card variant ${u}`)}}return{valid:t.length===0,errors:t,warnings:r,counts:{fields:e.fields?.length??0,items:e.items?.length??0,terms:i?.terms?.length??0,mounts:e.mounts?.length??0}}}Bt();Bt();var WBt="nav, header, footer, aside, iframe, form",YBt="script, style, noscript, template";function l7(e){let t=de(e,void 0,!1);return t(WBt).remove(),t.root().text().trim()?(t.root().html()??"").trim():""}function rD(e){let t=de(e);t(YBt).remove();for(let i of["main","article",'[role="main"]']){let s=t(i).first();if(s.length&&s.text().trim()){let o=l7(s.html()??"");if(o)return o}}let r=0,n="";if(t("div, section").each((i,s)=>{let o=t(s),a=o.text().trim();if(!a)return;let c=(t.html(s)||"").length||1,u=a.length*a.length/c;u>r&&(r=u,n=o.html()??"")}),n){let i=l7(n);if(i)return i}return l7(t("body").html()??"")}function d7(e){if(Array.isArray(e))return e.flatMap(d7);if(e&&typeof e=="object"){let t=e;return Array.isArray(t["@graph"])?t["@graph"].flatMap(d7):[t]}return[]}function SBe(e){let t=de(e),r=[];return t('script[type="application/ld+json"]').each((n,i)=>{let s=(t(i).html()??t(i).text()??"").trim();if(s)try{r.push(...d7(JSON.parse(s)))}catch{}}),r}var JBt=new Set(["Article","NewsArticle","BlogPosting","Report","TechArticle","ScholarlyArticle"]);function vBe(e){if(!e||typeof e!="object")return[];let t=e["@type"];return Array.isArray(t)?t.filter(r=>typeof r=="string"):typeof t=="string"?[t]:[]}function xBe(e){let t=e.flatMap(vBe);if(t.includes("Product"))return"product";if(t.some(r=>JBt.has(r)))return"post"}function BBe(e){let t=e.find(r=>vBe(r).includes("Product"));return t?``:null}var au=3,ZBt=30,KBt=/\b(\d{4}-\d{2}-\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\.?\s+\d{1,2},?\s*\d{4}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\.?\s+\d{1,2})\b/i,XBt="html,body,main,section";function sD(e,t){let r=e(t).children().toArray().map(n=>n.tagName?.toLowerCase()).filter(n=>!!n).sort();return`${t.tagName.toLowerCase()}>${r.join(",")}`}function ekt(e,t){let r=[],n=i=>{for(let s of e(i).children().toArray())r.push(s),n(s)};return n(t),r}function oD(e,t){let r=e.parent;for(;r;){if(r===t)return!0;r=r.parent}return!1}function tkt(e,t){let r=i=>{let s=[],o=i;for(;o&&o.type==="tag";)s.push(o),o=o.parent;return s},n=new Set(r(e));for(let i of r(t))if(n.has(i))return i;return null}function rkt(e,t){let r=new Map;for(let a of t){let c=a.parent;if(!c||c.type!=="tag")continue;let u=r.get(c)??[];u.push(a),r.set(c,u)}let n=[],i=[];for(let[a,c]of r)c.length>=au?n.push({cards:[...c],container:a}):i.push(...c);if(n.length===0)return t.length>=au?[t]:[];for(let a of i){let c=null;for(let u of n){let l=tkt(a,u.container);l&&(!c||oD(l,c.ancestor))&&(c={grid:u,ancestor:l})}c&&(c.grid.cards.push(a),c.grid.container=c.ancestor)}let s=e("*").toArray(),o=new Map(s.map((a,c)=>[a,c]));return n.map(a=>a.cards.sort((c,u)=>(o.get(c)??0)-(o.get(u)??0)))}function nkt(e,t){let r=e(t).attr("id");if(r&&e(`#${ikt(r)}`).length===1)return`#${r}`;let n=[],i=t;for(;i&&i.type==="tag";){let s=e(i).attr("id");if(s){n.unshift(`#${s}`);break}let o=i.tagName.toLowerCase(),a=e(i).prevAll(o).length+1;n.unshift(`${o}:nth-of-type(${a})`),i=i.parent}return n.join(" > ")}function ikt(e){return e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function f7(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function _Be(e,t){let r=e(t),n=r.find("h1,h2,h3,h4,h5,h6").length>0||r.find('[class*="title" i],[class*="headline" i]').length>0,i=r.find("img[src],source[srcset]").length>0||!!r.find('[style*="background-image" i]').attr("style"),s=r.find("a[href]").toArray().some(a=>e(a).text().trim().length>0),o=r.text().replace(/\s+/g," ").trim().length;return n&&(i||s)&&o>=20}function iD(e){let t=e.find("h1,h2,h3,h4,h5,h6").first();return t.length&&t.text().trim()?t.text().replace(/\s+/g," ").trim():e.find('[class*="title" i],[class*="headline" i]').first().text().replace(/\s+/g," ").trim()}function skt(e,t){return e(t).children("h1,h2,h3,h4,h5,h6").first().text().replace(/\s+/g," ").trim()}function okt(e){let t=e.find("img[src]").first().attr("src");if(t)return t;let n=(e.find('[style*="background-image" i]').first().attr("style")??"").match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/i);return n?n[1]:""}function akt(e,t){let r=e(t);return r.is('[class*="cat" i],[class*="tag" i]')||r.closest('[class*="cat" i],[class*="tag" i]').length>0?1:0}function nD(e,t,r){let n=e(t),i=iD(n),s=n.find("h1,h2,h3,h4,h5,h6").first().find("a[href]").first().attr("href"),o=n.find("a[href]").toArray().map(A=>e(A).attr("href")).find(Boolean),a=s??o??"",c=okt(n),u=n.find("p").first().text().replace(/\s+/g," ").trim(),d=(n.find("time").first().text().trim()||(n.text().match(KBt)?.[0]??"")).trim(),p=n.find("a[href]").toArray().map((A,g)=>({href:e(A).attr("href")??"",text:e(A).text().replace(/\s+/g," ").trim(),order:g,score:akt(e,A)})).filter(A=>A.text&&A.text!==i&&A.href!==a&&A.text.length<=ZBt).sort((A,g)=>g.score-A.score||A.order-g.order)[0]?.text??"";return{id:f7(i)||f7(a.replace(/\.[a-z]+$/i,""))||`card-${r+1}`,title:i,excerpt:u,image:c,category:p,date:d,link:a,meta:{}}}function p7(e,t,r){let n=de(e.html(t),void 0,!1),i=n.root().children().first();if(r.title){let o=i.find("h1,h2,h3,h4,h5,h6").first(),a=o.find("a[href]").first().length?o.find("a[href]").first():o;a.length&&a.attr("data-dla-text","title").text("")}if(r.excerpt){let o=i.find("p").toArray().find(a=>n(a).text().replace(/\s+/g," ").trim()===r.excerpt);o&&n(o).attr("data-dla-text","content").text("")}if(r.category){let o=i.find("a[href]").toArray().find(a=>n(a).text().replace(/\s+/g," ").trim()===r.category);o&&n(o).attr("data-dla-text","cat.label").text("")}if(r.date){let o=i.find("time").first();if(o.length)o.attr("data-dla-text","meta.date").text("");else{let a=i.find("span").toArray().find(c=>n(c).text().replace(/\s+/g," ").trim()===r.date);a&&n(a).attr("data-dla-text","meta.date").text("")}}if(r.image){let o=i.find("img[src]").first();o.length&&o.attr("data-dla-attr","src:meta.image").removeAttr("src")}let s=(o,a)=>{let c=o.attr("data-dla-attr");o.attr("data-dla-attr",c?`${c},${a}`:a)};if(r.link&&i.find("a[href]").toArray().forEach(o=>{(n(o).attr("href")??"")===r.link&&s(n(o),"href:permalink")}),r.category){let o=i.find('[data-dla-text="cat.label"]').first();o.length&&o.is("a[href]")&&s(o,"href:cat.url")}return(n.html(i)??"").trim()}function ckt(e,t,r){let n=r.filter(l=>l.parent===t),i=r.filter(l=>l.parent!==t),s=new Map;for(let l of i){let d=l.parent;if(!d||d.type!=="tag")continue;let f=s.get(d)??[];f.push(l),s.set(d,f)}if(n.length<1||s.size!==1)return;let[[o,a]]=[...s.entries()];if(a.length<2||n.length+a.length!==r.length||!oD(o,t)||r.includes(o))return;let c=[...n,...a].map(l=>f7(nD(e,l,0).category)).filter(Boolean),u=c.length>0&&c.every(l=>l===c[0])?c[0]:void 0;return{leadCount:n.length,columnWrapperClass:(e(o).attr("class")??"").trim(),leadTemplate:p7(e,n[0],nD(e,n[0],0)),rowTemplate:p7(e,a[0],nD(e,a[0],0)),...u?{termSlug:u}:{}}}function ukt(e,t,r,n){let i=pkt(e,t),s=nkt(e,i),o=(e(i).attr("class")??"").trim(),a=t.filter(g=>_Be(e,g));if(a.lengthnD(e,g,m)),u=c.map(g=>{let m={id:g.id,title:g.title,link:g.link,excerpt:g.excerpt};g.image&&(m.image=g.image),g.category&&(m.category=g.category),g.date&&(m.date=g.date);for(let[b,C]of Object.entries(g.meta))m[`meta_${b}`]=C;return m}),l=new Map;for(let g of c)g.link&&l.set(g.link,(l.get(g.link)??0)+1);for(let g=0;g1:!1,C=c[g].excerpt;if(n.resolvePage&&m&&!b)try{let E=n.resolvePage(m);if(E){let w=rD(E);w&&w.trim()&&(C=w)}}catch{}u[g].content=C}let d=[...l.entries()].filter(([,g])=>g>1).map(([g])=>g),f=d.length?` shared-target(single-template)=${d.join(",")}`:"",p=c.every(g=>g.title),h=p7(e,a[0],c[0]),A=ckt(e,i,a);return{containerSelector:s,containerClass:o,records:u,cardTemplate:h,...A?{featured:A}:{},confidence:p&&h?"high":"low",evidence:`signature=${r} cards=${a.length} roles=title,excerpt,image,category,date,link${f}`}}function lkt(e){let t=new Map;for(let r of e){let n=t.get(r.sig)??{sig:r.sig,candidates:[],richCards:[]};n.candidates.push(r);for(let i of r.richCards)n.richCards.includes(i)||n.richCards.push(i);t.set(r.sig,n)}return[...t.values()]}function kBe(e,t){return e.map(r=>t.filter(n=>oD(n,r)).length)}function dkt(e,t,r){let n=0,i=!1;for(let s of t){let o=r.filter(u=>oD(u,s));if(o.length===0)continue;if(o.length!==1)return"none";let a=iD(e(s)),c=iD(e(o[0]));a&&c&&a!==c&&(i=!0),n+=1}return nc>=au)&&r.add(s)}for(let s of i)for(let o of i){if(s===o||kBe(s.richCards,o.richCards).reduce((l,d)=>l+d,0)!==o.richCards.length)continue;let u=dkt(e,s.richCards,o.richCards);u==="part"?n.add(o.sig):u==="wrapper"&&s.candidates.forEach(l=>r.add(l))}return t.filter(s=>!r.has(s)&&!n.has(s.sig))}function pkt(e,t){let r=t[0].parent;return r&&r.type==="tag"&&!e(r).is(XBt)?r:hkt(e,t)?t[0]:r??t[0]}function hkt(e,t){if(t.lengthn.parent).filter(n=>!!n))];return r.lengthn.tagName?.toLowerCase()!=="section")||r.some(n=>t.filter(i=>i.parent===n).length!==1)?!1:t.some(n=>{let i=skt(e,n.parent),s=iD(e(n));return!!(i&&s&&i!==s)})}function h7(e,t={}){let r=de(e),n=r("body")[0],i=n?ekt(r,n):[],s=new Map;for(let l of i){if(r(l).children().length===0)continue;let d=sD(r,l),f=s.get(d)??[];f.push(l),s.set(d,f)}let o=[];for(let[l,d]of s)if(!(d.length=au&&o.push({cards:f,sig:l});let a=o.map(l=>({...l,richCards:l.cards.filter(d=>_Be(r,d))})).filter(l=>l.richCards.length>=au),c=fkt(r,a),u=[];for(let{cards:l,sig:d}of c){let f=ukt(r,l,d,t);f.records.length>0&&u.push(f)}return u}var Akt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],MBe=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],gkt="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",PBe="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",A7={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},g7="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",mkt={5:g7,"5module":g7+" export import",6:g7+" const class extends export import super"},LBe=/^in(stanceof)?$/,ykt=new RegExp("["+PBe+"]"),bkt=new RegExp("["+PBe+gkt+"]");function y7(e,t){for(var r=65536,n=0;ne)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function cu(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ykt.test(String.fromCharCode(e)):t===!1?!1:y7(e,MBe)}function af(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&bkt.test(String.fromCharCode(e)):t===!1?!1:y7(e,MBe)||y7(e,Akt)}var xr=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Ca(e,t){return new xr(e,{beforeExpr:!0,binop:t})}var wa={beforeExpr:!0},io={startsExpr:!0},w7={};function mr(e,t){return t===void 0&&(t={}),t.keyword=e,w7[e]=new xr(e,t)}var x={num:new xr("num",io),regexp:new xr("regexp",io),string:new xr("string",io),name:new xr("name",io),privateId:new xr("privateId",io),eof:new xr("eof"),bracketL:new xr("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new xr("]"),braceL:new xr("{",{beforeExpr:!0,startsExpr:!0}),braceR:new xr("}"),parenL:new xr("(",{beforeExpr:!0,startsExpr:!0}),parenR:new xr(")"),comma:new xr(",",wa),semi:new xr(";",wa),colon:new xr(":",wa),dot:new xr("."),question:new xr("?",wa),questionDot:new xr("?."),arrow:new xr("=>",wa),template:new xr("template"),invalidTemplate:new xr("invalidTemplate"),ellipsis:new xr("...",wa),backQuote:new xr("`",io),dollarBraceL:new xr("${",{beforeExpr:!0,startsExpr:!0}),eq:new xr("=",{beforeExpr:!0,isAssign:!0}),assign:new xr("_=",{beforeExpr:!0,isAssign:!0}),incDec:new xr("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new xr("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ca("||",1),logicalAND:Ca("&&",2),bitwiseOR:Ca("|",3),bitwiseXOR:Ca("^",4),bitwiseAND:Ca("&",5),equality:Ca("==/!=/===/!==",6),relational:Ca("/<=/>=",7),bitShift:Ca("<>/>>>",8),plusMin:new xr("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ca("%",10),star:Ca("*",10),slash:Ca("/",10),starstar:new xr("**",{beforeExpr:!0}),coalesce:Ca("??",1),_break:mr("break"),_case:mr("case",wa),_catch:mr("catch"),_continue:mr("continue"),_debugger:mr("debugger"),_default:mr("default",wa),_do:mr("do",{isLoop:!0,beforeExpr:!0}),_else:mr("else",wa),_finally:mr("finally"),_for:mr("for",{isLoop:!0}),_function:mr("function",io),_if:mr("if"),_return:mr("return",wa),_switch:mr("switch"),_throw:mr("throw",wa),_try:mr("try"),_var:mr("var"),_const:mr("const"),_while:mr("while",{isLoop:!0}),_with:mr("with"),_new:mr("new",{beforeExpr:!0,startsExpr:!0}),_this:mr("this",io),_super:mr("super",io),_class:mr("class",io),_extends:mr("extends",wa),_export:mr("export"),_import:mr("import",io),_null:mr("null",io),_true:mr("true",io),_false:mr("false",io),_in:mr("in",{beforeExpr:!0,binop:7}),_instanceof:mr("instanceof",{beforeExpr:!0,binop:7}),_typeof:mr("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:mr("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:mr("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},so=/\r\n?|\n|\u2028|\u2029/,Ekt=new RegExp(so.source,"g");function Q0(e){return e===10||e===13||e===8232||e===8233}function FBe(e,t,r){r===void 0&&(r=e.length);for(var n=t;n>10)+55296,(e&1023)+56320))}var Ikt=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,$I=function(t,r){this.line=t,this.column=r};$I.prototype.offset=function(t){return new $I(this.line,this.column+t)};var fD=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function $Be(e,t){for(var r=1,n=0;;){var i=FBe(e,n,t);if(i<0)return new $I(r,t-n);++r,n=i}}var b7={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},QBe=!1;function Skt(e){var t={};for(var r in b7)t[r]=e&&D0(e,r)?e[r]:b7[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!QBe&&typeof console=="object"&&console.warn&&(QBe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),TBe(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}if(TBe(t.onComment)&&(t.onComment=vkt(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function vkt(e,t){return function(r,n,i,s,o,a){var c={type:r?"Block":"Line",value:n,start:i,end:s};e.locations&&(c.loc=new fD(this,o,a)),e.ranges&&(c.range=[i,s]),t.push(c)}}var Oh=1,Uh=2,I7=4,HBe=8,S7=16,jBe=32,pD=64,qBe=128,$h=256,HI=512,zBe=1024,hD=Oh|Uh|$h;function v7(e,t){return Uh|(e?I7:0)|(t?HBe:0)}var cD=0,x7=1,hl=2,VBe=3,GBe=4,WBe=5,ei=function(t,r,n){this.options=t=Skt(t),this.sourceFile=t.sourceFile,this.keywords=of(mkt[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=A7[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=of(i);var s=(i?i+" ":"")+A7.strict;this.reservedWordsStrict=of(s),this.reservedWordsStrictBind=of(s+" "+A7.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(` +`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(so).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Uh:Oh),this.regexpState=null,this.privateNameStack=[]},Sa={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};ei.prototype.parse=function(){var t=this,r=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(r)})};Sa.inFunction.get=function(){return(this.currentVarScope().flags&Uh)>0};Sa.inGenerator.get=function(){return(this.currentVarScope().flags&HBe)>0};Sa.inAsync.get=function(){return(this.currentVarScope().flags&I7)>0};Sa.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&($h|HI))return!1;if(r&Uh)return(r&I7)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Sa.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Oh)};Sa.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&pD)>0||this.options.allowSuperOutsideMethod};Sa.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qBe)>0};Sa.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Sa.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&($h|HI)||r&Uh&&!(r&S7))return!0}return!1};Sa.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&zBe||!this.inModule&&t&Oh)};Sa.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&$h)>0};ei.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,mi.lastIndex=e,e+=mi.exec(this.input)[0].length,this.input[e]===";"&&e++}};os.eat=function(e){return this.type===e?(this.next(),!0):!1};os.isContextual=function(e){return this.type===x.name&&this.value===e&&!this.containsEsc};os.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};os.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};os.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};os.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||so.test(this.input.slice(this.lastTokEnd,this.start))};os.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};os.semicolon=function(){!this.eat(x.semi)&&!this.insertSemicolon()&&this.unexpected()};os.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};os.expect=function(e){this.eat(e)||this.unexpected()};os.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var AD=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};os.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};os.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};os.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case x._class:return e&&this.unexpected(),this.parseClass(i,!0);case x._if:return this.parseIfStatement(i);case x._return:return this.parseReturnStatement(i);case x._switch:return this.parseSwitchStatement(i);case x._throw:return this.parseThrowStatement(i);case x._try:return this.parseTryStatement(i);case x._const:case x._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case x._while:return this.parseWhileStatement(i);case x._with:return this.parseWithStatement(i);case x.braceL:return this.parseBlock(!0,i);case x.semi:return this.parseEmptyStatement(i);case x._export:case x._import:if(this.options.ecmaVersion>10&&n===x._import){mi.lastIndex=this.pos;var o=mi.exec(this.input),a=this.pos+o[0].length,c=this.input.charCodeAt(a);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===x._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var l=this.value,d=this.parseExpression();return n===x.name&&d.type==="Identifier"&&this.eat(x.colon)?this.parseLabeledStatement(i,l,d,e):this.parseExpressionStatement(i,d)}};rt.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(x.semi)||this.insertSemicolon()?e.label=null:this.type!==x.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(x.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};rt.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(B7),this.enterScope(0),this.expect(x.parenL),this.type===x.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===x._var||this.type===x._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),this.parseForAfterInit(e,n,t)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var c=this.startNode();return this.next(),a==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(c,!0,a),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(e,c,t)}var u=this.containsEsc,l=new AD,d=this.start,f=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===x._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===x._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!u&&f.type==="Identifier"&&f.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&o&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,l),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))};rt.parseForAfterInit=function(e,t,r){return(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===x._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&r>-1&&this.unexpected(r)):this.options.ecmaVersion>=9&&(e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};rt.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,UI|(r?0:E7),!1,t)};rt.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(x._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};rt.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(x.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};rt.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(x.braceL),this.labels.push(Bkt),this.enterScope(zBe);for(var t,r=!1;this.type!==x.braceR;)if(this.type===x._case||this.type===x._default){var n=this.type===x._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(x.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};rt.parseThrowStatement=function(e){return this.next(),so.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var kkt=[];rt.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?jBe:0),this.checkLValPattern(e,t?GBe:hl),this.expect(x.parenR),e};rt.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===x._catch){var t=this.startNode();this.next(),this.eat(x.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(x._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};rt.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};rt.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(B7),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};rt.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};rt.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};rt.parseLabeledStatement=function(e,t,r,n){for(var i=0,s=this.labels;i=0;c--){var u=this.labels[c];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=a;else break}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};rt.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};rt.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(x.braceL),e&&this.enterScope(0);this.type!==x.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};rt.parseFor=function(e,t){return e.init=t,this.expect(x.semi),e.test=this.type===x.semi?null:this.parseExpression(),this.expect(x.semi),e.update=this.type===x.parenR?null:this.parseExpression(),this.expect(x.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};rt.parseForIn=function(e,t){var r=this.type===x._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(x.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};rt.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(x.eq)?i.init=this.parseMaybeAssign(t):!n&&r==="const"&&!(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==x._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!n&&i.id.type!=="Identifier"&&!(t&&(this.type===x._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(x.comma))break}return e};rt.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?x7:hl,!1)};var UI=1,E7=2,YBe=4;rt.parseFunction=function(e,t,r,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===x.star&&t&E7&&this.unexpected(),e.generator=this.eat(x.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&UI&&(e.id=t&YBe&&this.type!==x.name?null:this.parseIdent(),e.id&&!(t&E7)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?x7:hl:VBe));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(v7(e.async,e.generator)),t&UI||(e.id=this.type===x.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&UI?"FunctionDeclaration":"FunctionExpression")};rt.parseFunctionParams=function(e){this.expect(x.parenL),e.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};rt.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(x.braceL);this.type!==x.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&_kt(n,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};rt.parseClassElement=function(e){if(this.eat(x.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(x.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===x.star?a=!0:n="static"}if(r.static=a,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===x.star)&&!this.canInsertSemicolon()?s=!0:n="async"),!n&&(t>=9||!s)&&this.eat(x.star)&&(i=!0),!n&&!s&&!i){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=c:n=c)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===x.parenL||o!=="method"||i||s){var u=!r.static&&uD(r,"constructor"),l=u&&e;u&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=u?"constructor":o,this.parseClassMethod(r,i,s,l)}else this.parseClassField(r);return r};rt.isClassElementNameStart=function(){return this.type===x.name||this.type===x.privateId||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword};rt.parseClassElementName=function(e){this.type===x.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};rt.parseClassMethod=function(e,t,r,n){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&uD(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};rt.parseClassField=function(e){return uD(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&uD(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(x.eq)?(this.enterScope(HI|pD),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};rt.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope($h|pD);this.type!==x.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};rt.parseClassId=function(e,t){this.type===x.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,hl,!1)):(t===!0&&this.unexpected(),e.id=null)};rt.parseClassSuper=function(e){e.superClass=this.eat(x._extends)?this.parseExprSubscripts(null,!1):null};rt.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};rt.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};rt.parseExport=function(e,t){if(this.next(),this.eat(x.star))return this.parseExportAllDeclaration(e,t);if(this.eat(x._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,n=e.specifiers;r=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};rt.parseExportDeclaration=function(e){return this.parseStatement(null)};rt.parseExportDefaultDeclaration=function(){var e;if(this.type===x._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,UI|YBe,!1,e)}else if(this.type===x._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};rt.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),D0(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};rt.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};rt.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,hl),this.finishNode(e,"ImportSpecifier")};rt.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,hl),this.finishNode(e,"ImportDefaultSpecifier")};rt.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,hl),this.finishNode(e,"ImportNamespaceSpecifier")};rt.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===x.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(x.comma)))return e;if(this.type===x.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(x.braceL);!this.eat(x.braceR);){if(t)t=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;e.push(this.parseImportSpecifier())}return e};rt.parseWithClause=function(){var e=[];if(!this.eat(x._with))return e;this.expect(x.braceL);for(var t={},r=!0;!this.eat(x.braceR);){if(r)r=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;D0(t,i)&&this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(n)}return e};rt.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(x.colon),this.type!==x.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};rt.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===x.string){var e=this.parseLiteral(this.value);return Ikt.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};rt.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var va=ei.prototype;va.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n=8&&!a&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(x._function))return this.overrideContext(Sn.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(x.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===x.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(x.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[c],!0,t)}return c;case x.regexp:var u=this.value;return n=this.parseLiteral(u.value),n.regex={pattern:u.pattern,flags:u.flags},n;case x.num:case x.string:return this.parseLiteral(this.value);case x._null:case x._true:case x._false:return n=this.startNode(),n.value=this.type===x._null?null:this.type===x._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case x.parenL:var l=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),d;case x.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(x.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case x.braceL:return this.overrideContext(Sn.b_expr),this.parseObj(!1,e);case x._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case x._class:return this.parseClass(this.startNode(),!1);case x._new:return this.parseNew();case x.backQuote:return this.parseTemplate();case x._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};Nt.parseExprAtomDefault=function(){this.unexpected()};Nt.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===x.parenL&&!e)return this.parseDynamicImport(t);if(this.type===x.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};Nt.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(x.parenR)?e.options=null:(this.expect(x.comma),this.afterTrailingComma(x.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(x.parenR)||(this.expect(x.comma),this.afterTrailingComma(x.parenR)||this.unexpected())));else if(!this.eat(x.parenR)){var t=this.start;this.eat(x.comma)&&this.eat(x.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};Nt.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};Nt.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};Nt.parseParenExpression=function(){this.expect(x.parenL);var e=this.parseExpression();return this.expect(x.parenR),e};Nt.shouldParseArrow=function(e){return!this.canInsertSemicolon()};Nt.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,c=[],u=!0,l=!1,d=new AD,f=this.yieldPos,p=this.awaitPos,h;for(this.yieldPos=0,this.awaitPos=0;this.type!==x.parenR;)if(u?u=!1:this.expect(x.comma),s&&this.afterTrailingComma(x.parenR,!0)){l=!0;break}else if(this.type===x.ellipsis){h=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var A=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(x.parenR),e&&this.shouldParseArrow(c)&&this.eat(x.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(r,n,c,t);(!c.length||l)&&this.unexpected(this.lastTokStart),h&&this.unexpected(h),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,a),i.expressions=c,this.finishNodeAt(i,"SequenceExpression",A,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var m=this.startNodeAt(r,n);return m.expression=i,this.finishNode(m,"ParenthesizedExpression")}else return i};Nt.parseParenItem=function(e){return e};Nt.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var Tkt=[];Nt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===x.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(n,"Invalid use of 'super'"),this.eat(x.parenL)?e.arguments=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Tkt,this.finishNode(e,"NewExpression")};Nt.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===x.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,` `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` -`),cooked:this.value},this.next(),r.tail=this.type===x.backQuote,this.finishNode(r,"TemplateElement")};Tt.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===x.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(x.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(x.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};Tt.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===x.name||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===x.star)&&!io.test(this.input.slice(this.lastTokEnd,this.start))};Tt.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(x.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),r.properties.push(s)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};Tt.parseProperty=function(e,t){var r=this.startNode(),n,i,s,o;if(this.options.ecmaVersion>=9&&this.eat(x.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===x.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(s=this.start,o=this.startLoc),e||(n=this.eat(x.star)));var a=this.containsEsc;return this.parsePropertyName(r),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(x.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,n,i,s,o,t,a),this.finishNode(r,"Property")};Tt.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var n=e.value.start;e.kind==="get"?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};Tt.parsePropertyValue=function(e,t,r,n,i,s,o,a){(r||n)&&this.type===x.colon&&this.unexpected(),this.eat(x.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===x.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(r,n),e.kind="init"):!t&&!a&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==x.comma&&this.type!==x.braceR&&this.type!==x.eq?((r||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===x.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};Tt.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(x.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(x.bracketR),e.key;e.computed=!1}return e.key=this.type===x.num||this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Tt.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};Tt.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(g7(t,n.generator)|aD|(r?QBe:0)),this.expect(x.parenL),n.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(n,"FunctionExpression")};Tt.parseArrowExpression=function(e,t,r,n){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(g7(r,!1)|A7),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};Tt.parseFunctionBody=function(e,t,r,n){var i=t&&this.type!==x.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,PBe),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};Tt.isSimpleParamList=function(e){for(var t=0,r=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Nh&&delete this.undefinedExports[e]}else if(t===MBe){var s=this.currentScope();s.lexical.push(e)}else if(t===NBe){var o=this.currentScope();this.treatFunctionsAsVar?n=o.lexical.indexOf(e)>-1:n=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var c=this.scopeStack[a];if(c.lexical.indexOf(e)>-1&&!(c.flags&RBe&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){n=!0;break}if(c.var.push(e),this.inModule&&c.flags&Nh&&delete this.undefinedExports[e],c.flags&cD)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};rf.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};rf.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};rf.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(cD|LI|Ph))return t}};rf.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(cD|LI|Ph)&&!(t.flags&A7))return t}};var lD=function(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new oD(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},FI=Kn.prototype;FI.startNode=function(){return new lD(this,this.start,this.startLoc)};FI.startNodeAt=function(e,t){return new lD(this,e,t)};function OBe(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}FI.finishNode=function(e,t){return OBe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};FI.finishNodeAt=function(e,t,r,n){return OBe.call(this,e,t,r,n)};FI.copyNode=function(e){var t=new lD(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var hkt="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",UBe="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",$Be=UBe+" Extended_Pictographic",HBe=$Be,jBe=HBe+" EBase EComp EMod EPres ExtPict",qBe=jBe,Akt=qBe,gkt={9:UBe,10:$Be,11:HBe,12:jBe,13:qBe,14:Akt},mkt="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",ykt={9:"",10:"",11:"",12:"",13:"",14:mkt},CBe="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",zBe="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",VBe=zBe+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",GBe=VBe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",WBe=GBe+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",YBe=WBe+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",bkt=YBe+" "+hkt,Ekt={9:zBe,10:VBe,11:GBe,12:WBe,13:YBe,14:bkt},JBe={};function Ckt(e){var t=JBe[e]={binary:ef(gkt[e]+" "+CBe),binaryOfStrings:ef(ykt[e]),nonBinary:{General_Category:ef(CBe),Script:ef(Ekt[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(tD=0,c7=[9,10,11,12,13,14];tD=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=JBe[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};cu.prototype.reset=function(t,r,n){var i=n.indexOf("v")!==-1,s=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};cu.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};cu.prototype.at=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return-1;var s=n.charCodeAt(t);if(!(r||this.switchU)||s<=55295||s>=57344||t+1>=i)return s;var o=n.charCodeAt(t+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};cu.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return i;var s=n.charCodeAt(t),o;return!(r||this.switchU)||s<=55295||s>=57344||t+1>=i||(o=n.charCodeAt(t+1))<56320||o>57343?t+1:t+2};cu.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};cu.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};cu.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};cu.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};cu.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var n=this.pos,i=0,s=t;i-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(n=!0),o==="v"&&(i=!0)}this.options.ecmaVersion>=15&&n&&i&&this.raise(e.start,"Invalid regular expression flag")};function wkt(e){for(var t in e)return!0;return!1}tt.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&wkt(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};tt.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t=16;for(t&&(e.branchID=new sD(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};tt.regexp_alternative=function(e){for(;e.pos=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};tt.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};tt.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};tt.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=16){var r=this.regexp_eatModifiers(e),n=e.eat(45);if(r||n){for(var i=0;i-1&&e.raise("Duplicate regular expression modifiers")}if(n){var o=this.regexp_eatModifiers(e);!r&&!o&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var a=0;a-1||r.indexOf(c)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};tt.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};tt.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&Ikt(r);)t+=ul(r),e.advance();return t};function Ikt(e){return e===105||e===109||e===115}tt.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};tt.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};tt.regexp_eatSyntaxCharacter=function(e){var t=e.current();return ZBe(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ZBe(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}tt.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!ZBe(r);)e.advance();return e.pos!==t};tt.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};tt.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var n=0,i=r;n=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),Skt(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function Skt(e){return au(e,!0)||e===36||e===95}tt.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),vkt(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function vkt(e){return tf(e,!0)||e===36||e===95||e===8204||e===8205}tt.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};tt.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};tt.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};tt.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};tt.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};tt.regexp_eatZero=function(e){return e.current()===48&&!dD(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};tt.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};tt.regexp_eatControlLetter=function(e){var t=e.current();return KBe(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function KBe(e){return e>=65&&e<=90||e>=97&&e<=122}tt.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&xkt(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function xkt(e){return e>=0&&e<=1114111}tt.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};tt.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var XBe=0,ll=1,Ca=2;tt.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Bkt(t))return e.lastIntValue=-1,e.advance(),ll;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&n===Ca&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return XBe};function Bkt(e){return e===100||e===68||e===115||e===83||e===119||e===87}tt.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),ll}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return XBe};tt.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){_0(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};tt.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return ll;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ca;e.raise("Invalid property name")};tt.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";eke(t=e.current());)e.lastStringValue+=ul(t),e.advance();return e.lastStringValue!==""};function eke(e){return KBe(e)||e===95}tt.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";kkt(t=e.current());)e.lastStringValue+=ul(t),e.advance();return e.lastStringValue!==""};function kkt(e){return eke(e)||dD(e)}tt.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};tt.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===Ca&&e.raise("Negated character class may contain strings"),!0}return!1};tt.regexp_classContents=function(e){return e.current()===93?ll:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),ll)};tt.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};tt.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||nke(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};tt.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};tt.regexp_classSetExpression=function(e){var t=ll,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===Ca&&(t=Ca);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==Ca&&(t=ll);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===Ca&&(t=Ca)}};tt.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return r!==-1&&n!==-1&&r>n&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};tt.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?ll:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};tt.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return r&&n===Ca&&e.raise("Negated character class may contain strings"),n;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};tt.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};tt.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Ca&&(t=Ca);return t};tt.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?ll:Ca};tt.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&_kt(r)||Tkt(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function _kt(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Tkt(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}tt.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Rkt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Rkt(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}tt.regexp_eatClassControlLetter=function(e){var t=e.current();return dD(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};tt.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};tt.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;dD(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function dD(e){return e>=48&&e<=57}tt.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;tke(r=e.current());)e.lastIntValue=16*e.lastIntValue+rke(r),e.advance();return e.pos!==t};function tke(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function rke(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}tt.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};tt.regexp_eatOctalDigit=function(e){var t=e.current();return nke(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function nke(e){return e>=48&&e<=55}tt.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length)return this.finishToken(x.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};sr.readToken=function(e){return au(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};sr.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var r=this.input.charCodeAt(e+1);return r<=56319||r>=57344?t:(t<<10)+r-56613888};sr.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};sr.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var n=void 0,i=t;(n=xBe(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};sr.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&BBe.test(String.fromCharCode(e)))++this.pos;else break e}}};sr.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};sr.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(x.ellipsis)):(++this.pos,this.finishToken(x.dot))};sr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(x.assign,2):this.finishOp(x.slash,1)};sr.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?x.star:x.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=x.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(x.assign,r+1):this.finishOp(n,r)};sr.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(x.assign,3)}return this.finishOp(e===124?x.logicalOR:x.logicalAND,2)}return t===61?this.finishOp(x.assign,2):this.finishOp(e===124?x.bitwiseOR:x.bitwiseAND,1)};sr.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(x.assign,2):this.finishOp(x.bitwiseXOR,1)};sr.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||io.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(x.incDec,2):t===61?this.finishOp(x.assign,2):this.finishOp(x.plusMin,1)};sr.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(x.assign,r+1):this.finishOp(x.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(x.relational,r))};sr.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(x.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(x.arrow)):this.finishOp(e===61?x.eq:x.prefix,1)};sr.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(x.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(x.assign,3)}return this.finishOp(x.coalesce,2)}}return this.finishOp(x.question,1)};sr.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),au(t,!0)||t===92))return this.finishToken(x.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ul(t)+"'")};sr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(x.parenL);case 41:return++this.pos,this.finishToken(x.parenR);case 59:return++this.pos,this.finishToken(x.semi);case 44:return++this.pos,this.finishToken(x.comma);case 91:return++this.pos,this.finishToken(x.bracketL);case 93:return++this.pos,this.finishToken(x.bracketR);case 123:return++this.pos,this.finishToken(x.braceL);case 125:return++this.pos,this.finishToken(x.braceR);case 58:return++this.pos,this.finishToken(x.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(x.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(x.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ul(e)+"'")};sr.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};sr.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(io.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new cu(this));a.reset(r,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(x.regexp,{pattern:i,flags:o,value:c})};sr.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,c=0,u=t??1/0;c=97?d=l-97+10:l>=65?d=l-65+10:l>=48&&l<=57?d=l-48:d=1/0,d>=e)break;a=l,o=o*e+d}return n&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:o};function Qkt(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function ike(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}sr.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=ike(this.input.slice(t,this.pos)),++this.pos):au(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,r)};sr.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var i=ike(this.input.slice(t,this.pos));return++this.pos,au(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),au(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Qkt(this.input.slice(t,this.pos),r);return this.finishToken(x.num,s)};sr.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};sr.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(k0(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(x.string,t)};var ske={};sr.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===ske)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};sr.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ske;this.raise(e,t)};sr.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===x.template||this.type===x.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(x.dollarBraceL)):(++this.pos,this.finishToken(x.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(x.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(k0(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` -`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};sr.readInvalidTemplateToken=function(){for(;this.pos=9&&this.type===x.star)&&!so.test(this.input.slice(this.lastTokEnd,this.start))};Nt.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(x.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),r.properties.push(s)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};Nt.parseProperty=function(e,t){var r=this.startNode(),n,i,s,o;if(this.options.ecmaVersion>=9&&this.eat(x.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===x.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(s=this.start,o=this.startLoc),e||(n=this.eat(x.star)));var a=this.containsEsc;return this.parsePropertyName(r),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(x.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,n,i,s,o,t,a),this.finishNode(r,"Property")};Nt.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var n=e.value.start;e.kind==="get"?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};Nt.parsePropertyValue=function(e,t,r,n,i,s,o,a){(r||n)&&this.type===x.colon&&this.unexpected(),this.eat(x.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===x.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(r,n),e.kind="init"):!t&&!a&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==x.comma&&this.type!==x.braceR&&this.type!==x.eq?((r||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===x.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};Nt.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(x.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(x.bracketR),e.key;e.computed=!1}return e.key=this.type===x.num||this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Nt.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};Nt.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(v7(t,n.generator)|pD|(r?qBe:0)),this.expect(x.parenL),n.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(n,"FunctionExpression")};Nt.parseArrowExpression=function(e,t,r,n){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(v7(r,!1)|S7),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};Nt.parseFunctionBody=function(e,t,r,n){var i=t&&this.type!==x.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,WBe),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};Nt.isSimpleParamList=function(e){for(var t=0,r=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Oh&&delete this.undefinedExports[e]}else if(t===GBe){var s=this.currentScope();s.lexical.push(e)}else if(t===VBe){var o=this.currentScope();this.treatFunctionsAsVar?n=o.lexical.indexOf(e)>-1:n=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var c=this.scopeStack[a];if(c.lexical.indexOf(e)>-1&&!(c.flags&jBe&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){n=!0;break}if(c.var.push(e),this.inModule&&c.flags&Oh&&delete this.undefinedExports[e],c.flags&hD)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};cf.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};cf.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};cf.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(hD|HI|$h))return t}};cf.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(hD|HI|$h)&&!(t.flags&S7))return t}};var gD=function(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new fD(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},jI=ei.prototype;jI.startNode=function(){return new gD(this,this.start,this.startLoc)};jI.startNodeAt=function(e,t){return new gD(this,e,t)};function ZBe(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}jI.finishNode=function(e,t){return ZBe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};jI.finishNodeAt=function(e,t,r,n){return ZBe.call(this,e,t,r,n)};jI.copyNode=function(e){var t=new gD(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var Qkt="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",KBe="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",XBe=KBe+" Extended_Pictographic",eke=XBe,tke=eke+" EBase EComp EMod EPres ExtPict",rke=tke,Dkt=rke,Nkt={9:KBe,10:XBe,11:eke,12:tke,13:rke,14:Dkt},Mkt="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Pkt={9:"",10:"",11:"",12:"",13:"",14:Mkt},DBe="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",nke="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ike=nke+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ske=ike+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",oke=ske+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ake=oke+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Lkt=ake+" "+Qkt,Fkt={9:nke,10:ike,11:ske,12:oke,13:ake,14:Lkt},cke={};function Okt(e){var t=cke[e]={binary:of(Nkt[e]+" "+DBe),binaryOfStrings:of(Pkt[e]),nonBinary:{General_Category:of(DBe),Script:of(Fkt[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(aD=0,m7=[9,10,11,12,13,14];aD=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=cke[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};uu.prototype.reset=function(t,r,n){var i=n.indexOf("v")!==-1,s=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};uu.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};uu.prototype.at=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return-1;var s=n.charCodeAt(t);if(!(r||this.switchU)||s<=55295||s>=57344||t+1>=i)return s;var o=n.charCodeAt(t+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};uu.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return i;var s=n.charCodeAt(t),o;return!(r||this.switchU)||s<=55295||s>=57344||t+1>=i||(o=n.charCodeAt(t+1))<56320||o>57343?t+1:t+2};uu.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};uu.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};uu.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};uu.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};uu.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var n=this.pos,i=0,s=t;i-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(n=!0),o==="v"&&(i=!0)}this.options.ecmaVersion>=15&&n&&i&&this.raise(e.start,"Invalid regular expression flag")};function Ukt(e){for(var t in e)return!0;return!1}et.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Ukt(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};et.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t=16;for(t&&(e.branchID=new dD(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};et.regexp_alternative=function(e){for(;e.pos=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};et.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};et.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};et.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=16){var r=this.regexp_eatModifiers(e),n=e.eat(45);if(r||n){for(var i=0;i-1&&e.raise("Duplicate regular expression modifiers")}if(n){var o=this.regexp_eatModifiers(e);!r&&!o&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var a=0;a-1||r.indexOf(c)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};et.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};et.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&$kt(r);)t+=fl(r),e.advance();return t};function $kt(e){return e===105||e===109||e===115}et.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};et.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};et.regexp_eatSyntaxCharacter=function(e){var t=e.current();return uke(t)?(e.lastIntValue=t,e.advance(),!0):!1};function uke(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}et.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!uke(r);)e.advance();return e.pos!==t};et.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};et.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var n=0,i=r;n=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),Hkt(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function Hkt(e){return cu(e,!0)||e===36||e===95}et.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),jkt(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function jkt(e){return af(e,!0)||e===36||e===95||e===8204||e===8205}et.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};et.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};et.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};et.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};et.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};et.regexp_eatZero=function(e){return e.current()===48&&!mD(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};et.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};et.regexp_eatControlLetter=function(e){var t=e.current();return lke(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function lke(e){return e>=65&&e<=90||e>=97&&e<=122}et.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&qkt(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function qkt(e){return e>=0&&e<=1114111}et.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};et.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var dke=0,pl=1,Ia=2;et.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(zkt(t))return e.lastIntValue=-1,e.advance(),pl;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&n===Ia&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return dke};function zkt(e){return e===100||e===68||e===115||e===83||e===119||e===87}et.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),pl}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return dke};et.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){D0(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};et.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return pl;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ia;e.raise("Invalid property name")};et.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";fke(t=e.current());)e.lastStringValue+=fl(t),e.advance();return e.lastStringValue!==""};function fke(e){return lke(e)||e===95}et.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Vkt(t=e.current());)e.lastStringValue+=fl(t),e.advance();return e.lastStringValue!==""};function Vkt(e){return fke(e)||mD(e)}et.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};et.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===Ia&&e.raise("Negated character class may contain strings"),!0}return!1};et.regexp_classContents=function(e){return e.current()===93?pl:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),pl)};et.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};et.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||Ake(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};et.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};et.regexp_classSetExpression=function(e){var t=pl,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===Ia&&(t=Ia);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==Ia&&(t=pl);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===Ia&&(t=Ia)}};et.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return r!==-1&&n!==-1&&r>n&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};et.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?pl:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};et.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return r&&n===Ia&&e.raise("Negated character class may contain strings"),n;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};et.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};et.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Ia&&(t=Ia);return t};et.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?pl:Ia};et.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&Gkt(r)||Wkt(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function Gkt(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Wkt(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}et.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Ykt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ykt(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}et.regexp_eatClassControlLetter=function(e){var t=e.current();return mD(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};et.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};et.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;mD(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function mD(e){return e>=48&&e<=57}et.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;pke(r=e.current());)e.lastIntValue=16*e.lastIntValue+hke(r),e.advance();return e.pos!==t};function pke(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hke(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}et.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};et.regexp_eatOctalDigit=function(e){var t=e.current();return Ake(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Ake(e){return e>=48&&e<=55}et.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length)return this.finishToken(x.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};ir.readToken=function(e){return cu(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};ir.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var r=this.input.charCodeAt(e+1);return r<=56319||r>=57344?t:(t<<10)+r-56613888};ir.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};ir.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var n=void 0,i=t;(n=FBe(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};ir.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&OBe.test(String.fromCharCode(e)))++this.pos;else break e}}};ir.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};ir.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(x.ellipsis)):(++this.pos,this.finishToken(x.dot))};ir.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(x.assign,2):this.finishOp(x.slash,1)};ir.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?x.star:x.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=x.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(x.assign,r+1):this.finishOp(n,r)};ir.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(x.assign,3)}return this.finishOp(e===124?x.logicalOR:x.logicalAND,2)}return t===61?this.finishOp(x.assign,2):this.finishOp(e===124?x.bitwiseOR:x.bitwiseAND,1)};ir.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(x.assign,2):this.finishOp(x.bitwiseXOR,1)};ir.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||so.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(x.incDec,2):t===61?this.finishOp(x.assign,2):this.finishOp(x.plusMin,1)};ir.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(x.assign,r+1):this.finishOp(x.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(x.relational,r))};ir.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(x.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(x.arrow)):this.finishOp(e===61?x.eq:x.prefix,1)};ir.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(x.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(x.assign,3)}return this.finishOp(x.coalesce,2)}}return this.finishOp(x.question,1)};ir.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),cu(t,!0)||t===92))return this.finishToken(x.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+fl(t)+"'")};ir.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(x.parenL);case 41:return++this.pos,this.finishToken(x.parenR);case 59:return++this.pos,this.finishToken(x.semi);case 44:return++this.pos,this.finishToken(x.comma);case 91:return++this.pos,this.finishToken(x.bracketL);case 93:return++this.pos,this.finishToken(x.bracketR);case 123:return++this.pos,this.finishToken(x.braceL);case 125:return++this.pos,this.finishToken(x.braceR);case 58:return++this.pos,this.finishToken(x.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(x.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(x.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+fl(e)+"'")};ir.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};ir.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(so.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new uu(this));a.reset(r,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(x.regexp,{pattern:i,flags:o,value:c})};ir.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,s=this.pos,o=0,a=0,c=0,u=t??1/0;c=97?d=l-97+10:l>=65?d=l-65+10:l>=48&&l<=57?d=l-48:d=1/0,d>=e)break;a=l,o=o*e+d}return n&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:o};function Jkt(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function gke(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}ir.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=gke(this.input.slice(t,this.pos)),++this.pos):cu(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,r)};ir.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var i=gke(this.input.slice(t,this.pos));return++this.pos,cu(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(x.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),cu(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Jkt(this.input.slice(t,this.pos),r);return this.finishToken(x.num,s)};ir.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};ir.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Q0(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(x.string,t)};var mke={};ir.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===mke)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};ir.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw mke;this.raise(e,t)};ir.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===x.template||this.type===x.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(x.dollarBraceL)):(++this.pos,this.finishToken(x.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(x.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Q0(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` +`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};ir.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return k0(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};sr.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};sr.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.posake?`${r.slice(0,ake)}...`:r}function Fkt(e){return!e||e.type!=="ArrayExpression"||e.elements.length===0?!1:e.elements.every(t=>!t||t.type!=="ObjectExpression"?!1:(t.properties??[]).some(r=>{let n=r.key?.name??r.key?.value;return n==="id"||n==="slug"||typeof n=="string"&&/id$/i.test(n)}))}function OI(e){return e?e.type==="Literal"?!0:e.type==="ArrayExpression"?(e.elements??[]).every(t=>t===null||OI(t)):e.type==="ObjectExpression"?(e.properties??[]).every(t=>!t||t.type!=="Property"||t.kind!=="init"||t.method||t.shorthand||t.computed&&!OI(t.key)?!1:OI(t.value)):e.type==="UnaryExpression"&&["-","+","!","~"].includes(e.operator)?OI(e.argument):e.type==="TemplateLiteral"?(e.expressions??[]).length===0:!1:!1}function Okt(e,t){let r=e.slice(t.start,t.end),n=Lkt(e,t);if(r.length>Mkt)return{confidence:"low",evidence:`literal too large (${r.length} chars) :: ${n}`};if(!OI(t))return{confidence:"low",evidence:n};try{let i=Nkt(`(${r})`,Object.create(null),{timeout:1e3});return!Array.isArray(i)||i.length>Pkt?{confidence:"low",evidence:n}:{records:i,confidence:"high",evidence:n}}catch(i){return{confidence:"low",evidence:`${i.message} :: ${n}`}}}function Ukt(e){return e??"(anonymous)"}function cke(e){let t=Fh(e);if(!t)return[];let r=[],n=new Set,i=(s,o)=>{!Fkt(s)||n.has(s.start)||(n.add(s.start),r.push({name:Ukt(o),...Okt(e,s)}))};return Lh(t,s=>{if(s.type==="VariableDeclarator"&&s.id?.type==="Identifier"&&i(s.init,s.id.name),s.type==="AssignmentExpression"){let o=s.left,a=o?.type==="Identifier"?o.name:o?.property?.name;i(s.right,a)}s.type==="Property"&&i(s.value,s.key?.name??s.key?.value),s.type==="ReturnStatement"&&i(s.argument,void 0)}),r}var $kt=/^(#[\w-]+|\.[\w-]+|\[[\w-]+(=("[^"]*"|'[^']*'|[\w-]+))?\])$/;function Hkt(e){for(let t of e.arguments??[])if(t.type==="Literal"&&typeof t.value=="number")return t.value;for(let t of e.arguments??[])if(t.type==="CallExpression"){let r=(t.arguments??[]).find(n=>n.type==="Literal"&&typeof n.value=="number");if(r)return r.value}}function uke(e,t){let r=de(e),n=Fh(t),i=new Map;n&&Lh(n,a=>{if(a.type!=="CallExpression")return;let c=(a.arguments??[]).filter(u=>u.type==="Literal"&&typeof u.value=="string").map(u=>String(u.value)).find(u=>$kt.test(u));c&&!i.has(c)&&i.set(c,{source:t.slice(a.start,a.end),perPage:Hkt(a)})});let s=[],o=new Set;for(let[a,c]of i){let u=r(a).first();u.length!==0&&(o.add(a),s.push({selector:a,wrapperClass:u.attr("class")||void 0,sourceCall:c.source,perPageHint:c.perPage,confidence:"high",evidence:c.source}))}return r("[id]").each((a,c)=>{let l=`#${r(c).attr("id")}`;o.has(l)||r(c).children().length>0||s.push({selector:l,wrapperClass:r(c).attr("class")||void 0,confidence:"low",evidence:`empty container ${l} has no matching JS call`})}),s}function lke(e){let t=Fh(e);if(!t)return[];let r=new Set,n=i=>i?.type==="MemberExpression"&&i.property?.name==="id";return Lh(t,i=>{if(i.type==="CallExpression"&&i.callee?.type==="MemberExpression"&&i.callee.property?.name==="find"&&i.callee.object?.type==="Identifier"){let s=i.arguments?.[0]?.body;s?.type==="BinaryExpression"&&/^===?$/.test(s.operator)&&(n(s.left)||n(s.right))&&r.add(i.callee.object.name)}}),[...r]}var jkt=["title","name","label","heading"],qkt=["content","story","description","body","excerpt"],zkt=["category","cat","kind","type","collection","group"],Vkt=["images","gallery","photos","media"];var Gkt=e=>[...new Set(e.flatMap(t=>Object.keys(t)))],nf=(e,t)=>e.map(r=>r[t]).filter(r=>r!==void 0),Wkt=e=>e.length>0&&e.every(t=>typeof t=="string"||typeof t=="number"),E7=e=>e.length>0&&e.every(t=>typeof t=="string"),Ykt=e=>new Set(e).size===e.length,R0=(e,t)=>e.find(r=>t.includes(r.toLowerCase()));function C7(e,t){let r=nf(e,t).filter(n=>typeof n=="string");return r.length?r.reduce((n,i)=>n+i.length,0)/r.length:0}function Jkt(e){return Array.isArray(e)&&e.every(t=>typeof t=="string"||!!(t&&typeof t=="object"&&("caption"in t||"url"in t)))}function Zkt(e){return e.every(t=>typeof t=="boolean")?"boolean":e.every(t=>typeof t=="number")?e.every(t=>Number.isInteger(t))?"integer":"number":"string"}function Kkt(e){let t=e.filter(r=>typeof r=="string");if(t.length!==0){if(t.every(r=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(r)))return"email";if(t.every(r=>/^https?:\/\//.test(r)))return"url";if(t.every(r=>/^\d{4}-\d{2}-\d{2}/.test(r)))return"date";if(t.some(r=>r.length>=60))return"textarea"}}function Xkt(e,t){let r=nf(e,t),n=Zkt(r),i=n==="string"?Kkt(r):void 0;return i?{key:t,type:n,format:i}:{key:t,type:n}}function dke(e){let t=Gkt(e),r=R0(t,["id","slug"])??t[0]??"id",n="low";R0(t,["id","slug"])&&Wkt(nf(e,r))&&Ykt(nf(e,r))&&(n="high");let i=R0(t,jkt),s=i?"high":"low";i||(i=t.filter(f=>f!==r&&E7(nf(e,f))).sort((f,p)=>C7(e,f)-C7(e,p))[0]??r);let o=R0(t,qkt)??t.find(f=>f!==i&&E7(nf(e,f))&&C7(e,f)>=60),a=R0(t,zkt),c=a?"high":"low";a||(a=t.find(f=>{let p=nf(e,f);return f!==r&&f!==i&&E7(p)&&new Set(p).size<=Math.max(1,Math.floor(p.length/2))}),a&&(c="low"));let u=R0(t,Vkt)??t.find(f=>{let p=nf(e,f);return p.length>0&&p.every(Jkt)}),l=new Set;n==="high"&&l.add(r),s==="high"&&l.add(i),o&&l.add(o),a&&c==="high"&&l.add(a),u&&l.add(u);let d=t.filter(f=>!l.has(f)).map(f=>Xkt(e,f));return{idKey:r,titleKey:i,contentKey:o,termKey:a,galleryKey:u,fields:d,confidence:{id:n,title:s,terms:c}}}function fke(e,t){let r=`${e}::${t}`,n=2166136261;for(let i=0;i>>0).toString(36)}`}var t_t=2e5,r_t=5e3,w7=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),n_t=e=>e.replace(/s$/i,""),I7=e=>e.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim(),pke=e=>["string","number","boolean"].includes(typeof e),i_t=["newest","recent","latest"],gke=(e,t)=>e?"category":`${t}_cat`;function mke(e){let t=[],r=A_t(e.js),n=lke(e.js),i=uke(e.html,e.js),o={arrays:r.map(d=>({name:d.name,confidence:d.confidence,recordCount:d.records?.length,reason:d.confidence==="low"?d.evidence.slice(0,120):void 0})),skippedFiles:e.skippedFiles??[],unmatchedContainers:i.filter(d=>d.confidence==="low"||!d.sourceCall).map(d=>d.selector)},a=u_t(r,n,i);if(a?.records)return hke({records:a.records,typeName:a.name,mounts:i,idLookupNames:n,source:"js-array",cardTemplateTodoEvidence:E_t(e.js),deterministicCard:void 0,discovered:o,todos:t});let c=e.htmlFiles?.length?e.htmlFiles.flatMap(d=>s7(d.text,{resolvePage:e.resolvePage}).map((f,p)=>({grid:f,disambiguator:`${d.name}:${p}`,sourcePage:d.name}))):s7(e.html,{resolvePage:e.resolvePage}).map((d,f)=>({grid:d,disambiguator:String(f),sourcePage:void 0})),u=c.filter(({grid:d})=>d.records.length>=1);if(u.length>0){let d=s_t(u.flatMap(({grid:A})=>A.records)),f=u.find(({grid:A})=>A.featured),p=gke(!0,"post"),h=u.map(({grid:A,disambiguator:g,sourcePage:m})=>({selector:`#${fke(A.containerSelector,g)}`,sourceSelector:A.containerSelector,...m?{sourcePage:m}:{},sourceCall:`html-cards:${A.containerSelector}`,...A.containerClass?{wrapperClass:A.containerClass}:{},perPageHint:A.records.length,...A.featured?{featured:{columnWrapperClass:A.featured.columnWrapperClass,leadPerPage:A.featured.leadCount,columnPerPage:A.records.length-A.featured.leadCount,variant:"row",...A.featured.termSlug?{termSlug:A.featured.termSlug,taxonomy:p}:{}}}:{},confidence:"high",evidence:A.evidence}));return hke({records:d,coreType:"post",mounts:h,idLookupNames:[],source:"html-cards",cardTemplateTodoEvidence:void 0,deterministicCard:u[0].grid.cardTemplate,deterministicCardVariants:f?.grid.featured?{row:f.grid.featured.rowTemplate}:void 0,discovered:{...o,unmatchedContainers:c.filter(({grid:A})=>A.records.length===0).map(({grid:A})=>A.containerSelector)},todos:t})}let l=h_t();return t.push({path:"items",instruction:"No static data array literal and no repeated content-card grid were found. Author items[] and the model by hand from the source.",evidence:r[0]?.evidence??"(no array-like declarations or card grids found)"}),{model:l,skillTodos:t,discovered:{...o,source:"none"},validation:NI(l)}}function hke(e){let{records:t,todos:r}=e,n=e.coreType==="post",i=dke(t),s=n&&t.some(h=>Object.prototype.hasOwnProperty.call(h,"content"))?{...i,contentKey:"content",fields:o_t(t,i).filter(h=>h.key!=="content")}:i,o=e.typeName??"item",a=n_t(o==="(anonymous)"?"item":o).toLowerCase(),c=n?"post":w7(a)||"item",u=gke(n,c),l=new Map;if(s.termKey)for(let h of t){let A=h[s.termKey];typeof A=="string"&&l.set(w7(A),I7(A))}let d=t.map(h=>{let A={};for(let C of s.fields){let w=h[C.key];pke(w)&&(A[C.key]=w)}let g=s.galleryKey?h[s.galleryKey]:void 0,m=Array.isArray(g)?g.map(C=>{if(typeof C=="string")return{caption:C};let w=C;return{caption:String(w.caption??""),url:w.url}}):[],b=s.termKey?h[s.termKey]:void 0,E=h[s.idKey];return{id:pke(E)?String(E):"",title:String(h[s.titleKey]??""),terms:typeof b=="string"?[w7(b)]:[],meta:A,gallery:m,content:s.contentKey?String(h[s.contentKey]??""):void 0}}),f=[];for(let h of e.mounts){if(h.confidence!=="high"||!h.sourceCall)continue;let A=f.length,g=h.perPageHint??-1,m=d_t(h,g);m.confidence==="low"&&r.push({path:`mounts[${A}].query.order`,instruction:`Confirm ordering/perPage for ${h.selector}; source call: "${h.sourceCall}". Default applied: date/DESC. Adjust to match the source's selection semantics.`,evidence:h.evidence}),f.push({selector:h.selector,sourceCall:h.sourceCall,query:{postType:c,perPage:g,orderBy:"date",order:m.order},wrapperClass:h.wrapperClass,...h.sourceSelector?{sourceSelector:h.sourceSelector}:{},...h.sourcePage?{sourcePage:h.sourcePage}:{},...h.featured?{featured:h.featured}:{}})}e.cardTemplateTodoEvidence&&r.unshift({path:"card.template",instruction:"Author card.template: rewrite the source per-item card function into a single-root skeleton with data-dla-* bindings (data-dla-text/attr/class/if), preserving the source classes. Reference: id, title, content, cat.slug, cat.label, meta., gallery..caption, map... Add any value-keyed lookups to card.maps.",evidence:e.cardTemplateTodoEvidence}),s.confidence.id==="low"&&r.push({path:"items[].id",instruction:`The id field was guessed ('${s.idKey}') and may be non-unique or non-scalar; confirm/choose the stable per-item id (it is the idempotency key for inserts).`,evidence:`record keys: ${Object.keys(t[0]??{}).join(", ")}`}),s.confidence.title==="low"&&r.push({path:"items[].title",instruction:`Title was guessed ('${s.titleKey}') with no name match; confirm it is the human title.`,evidence:`record keys: ${Object.keys(t[0]??{}).join(", ")}`}),s.confidence.terms==="low"&&s.termKey&&r.push({path:"taxonomy",instruction:`Taxonomy column was guessed ('${s.termKey}') by low cardinality; confirm it is a content category.`,evidence:`distinct: ${[...l.keys()].join(", ")}`});let p={cpt:n?{slug:"post",singular:"Post",plural:"Posts",public:!0,supports:["title","editor","thumbnail","custom-fields"]}:{slug:c,singular:I7(a),plural:I7((o==="(anonymous)"?"items":o).toLowerCase()),public:!0,supports:["title","editor","custom-fields"]},taxonomy:{slug:u,label:"Categories",hierarchical:!0,terms:[...l].map(([h,A])=>({slug:h,label:A}))},fields:s.fields,items:d,mounts:f,card:{template:e.deterministicCard??"",maps:{},...e.deterministicCardVariants?{variants:e.deterministicCardVariants}:{}},sourceArrays:n?[]:[...new Set([...e.idLookupNames,o].filter(h=>h&&h!=="(anonymous)"))],schema:3};return{model:p,skillTodos:r,discovered:{...e.discovered,source:e.source},validation:NI(p)}}function s_t(e){let t=new Map,r=[];for(let n of e){let i=n.id;if(typeof i=="string"&&i){let s=t.get(i);if(s){let o=Ake(s),a=Ake(n);o!==a&&console.warn(`[local-data] dropping duplicate card id "${i}" (title "${a}") - shared id/idempotency key`);continue}t.set(i,n)}r.push(n)}return r}function Ake(e){let t=e.title;return t==null?"":String(t)}function o_t(e,t){let r=[...t.fields];t.contentKey&&t.contentKey!=="content"&&!r.some(i=>i.key===t.contentKey)&&r.push(c_t(e,t.contentKey));let n=new Map(a_t(e).map((i,s)=>[i,s]));return r.sort((i,s)=>(n.get(i.key)??Number.MAX_SAFE_INTEGER)-(n.get(s.key)??Number.MAX_SAFE_INTEGER))}function a_t(e){return[...new Set(e.flatMap(t=>Object.keys(t)))]}function c_t(e,t){let r=e.map(i=>i[t]).filter(i=>i!==void 0);if(r.length>0&&r.every(i=>typeof i=="boolean"))return{key:t,type:"boolean"};if(r.length>0&&r.every(i=>typeof i=="number"))return{key:t,type:r.every(i=>Number.isInteger(i))?"integer":"number"};let n=r.filter(i=>typeof i=="string");return n.length>0&&n.every(i=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(i))?{key:t,type:"string",format:"email"}:n.length>0&&n.every(i=>/^https?:\/\//.test(i))?{key:t,type:"string",format:"url"}:n.length>0&&n.every(i=>/^\d{4}-\d{2}-\d{2}/.test(i))?{key:t,type:"string",format:"date"}:n.some(i=>i.length>=60)?{key:t,type:"string",format:"textarea"}:{key:t,type:"string"}}function u_t(e,t,r){let n=e.filter(c=>c.records?.length);if(n.length===0)return;let i=new Set(t),s=n.find(c=>i.has(c.name));if(s)return s;let o=r.map(c=>c.sourceCall).filter(c=>!!c),a=n.find(c=>o.some(u=>l_t(u,c.name)));return a||n.reduce((c,u)=>(u.records?.length??0)>(c.records?.length??0)?u:c)}function l_t(e,t){if(!/^[A-Za-z_$][\w$]*$/.test(t))return!1;let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[^A-Za-z0-9_$])${r}($|[^A-Za-z0-9_$])`).test(e)}function d_t(e,t){return e.sourceCall?.startsWith("html-cards:")?{order:"ASC",confidence:"high"}:e.perPageHint===void 0||t===-1?{order:"ASC",confidence:"high"}:f_t(e.sourceCall??"")?{order:"DESC",confidence:"high"}:{order:"DESC",confidence:"low"}}function f_t(e){return(e.match(/[A-Za-z][A-Za-z0-9_$]*/g)??[]).some(r=>i_t.some(n=>p_t(r,n)))}function p_t(e,t){let r=e.toLowerCase();if(r===t)return!0;if(!r.startsWith(t))return!1;let n=e[t.length];return!!(n&&/[A-Z0-9_$]/.test(n))}function h_t(){return{cpt:{slug:"item",singular:"Item",plural:"Items",public:!0,supports:["title","editor","custom-fields"]},taxonomy:{slug:"item_cat",label:"Categories",hierarchical:!0,terms:[]},fields:[],items:[],mounts:[],card:{template:"",maps:{}},sourceArrays:[],schema:3}}function A_t(e){let t=cke(e);return t.some(r=>r.records?.length)?t:[...t,...g_t(e,t)]}function g_t(e,t){let r=Fh(e);if(!r)return[];let n=new Set(t.map(a=>a.evidence)),i=[],s=new Set,o=(a,c)=>{if(!m_t(a)||s.has(a.start))return;s.add(a.start);let u=b_t(e,a);if(n.has(u))return;let l=y_t(e,a,u);i.push({name:c,...l})};return Lh(r,a=>{if(a.type==="VariableDeclarator"&&a.id?.type==="Identifier"&&o(a.init,a.id.name),a.type==="AssignmentExpression"){let c=a.left,u=c?.type==="Identifier"?c.name:c?.property?.name;o(a.right,u??"(anonymous)")}a.type==="Property"&&o(a.value,String(a.key?.name??a.key?.value??"(anonymous)"))}),i}function m_t(e){return!!(e?.type==="ArrayExpression"&&e.elements?.length>0&&e.elements.every(t=>t?.type==="ObjectExpression"))}function UI(e){return e?e.type==="Literal"?!0:e.type==="ArrayExpression"?(e.elements??[]).every(t=>t===null||UI(t)):e.type==="ObjectExpression"?(e.properties??[]).every(t=>!t||t.type!=="Property"||t.kind!=="init"||t.method||t.shorthand||t.computed&&!UI(t.key)?!1:UI(t.value)):e.type==="UnaryExpression"&&["-","+","!","~"].includes(e.operator)?UI(e.argument):e.type==="TemplateLiteral"?(e.expressions??[]).length===0:!1:!1}function y_t(e,t,r){let n=e.slice(t.start,t.end);if(n.length>t_t)return{confidence:"low",evidence:`literal too large (${n.length} chars) :: ${r}`};if(!UI(t))return{confidence:"low",evidence:r};try{let i=e_t(`(${n})`,Object.create(null),{timeout:1e3});return!Array.isArray(i)||i.length>r_t?{confidence:"low",evidence:r}:{records:i,confidence:"high",evidence:r}}catch(i){return{confidence:"low",evidence:`${i.message} :: ${r}`}}}function b_t(e,t){let r=e.slice(t.start,t.end);return r.length>400?`${r.slice(0,400)}...`:r}function E_t(e){let t=e.match(/function\s+\w*[Cc]ard\s*\([^)]*\)\s*\{[\s\S]*?\}/);return t?t[0].length>600?`${t[0].slice(0,600)}...`:t[0]:"(no *Card function found; author from the rendered card markup)"}var B_t=256*1024;function S7(e,t){if(!Eke(e))return[];let r=[];for(let n of C_t(e))if(t.includes(S_t(n).toLowerCase()))try{r.push({name:n,text:Cke(fD(e,n),"utf8")})}catch{}return r}function k_t(e){let t=[];for(let r of e)try{let n=de(r.text);n("script").each((i,s)=>{if(n(s).attr("src")!==void 0)return;let o=n(s).text();o.trim()&&t.push(o)})}catch{}return t}function __t(e){return t=>{if(!t||/^(https?:|mailto:|tel:|#|javascript:)/i.test(t))return null;let r=decodeURIComponent(t.split(/[?#]/)[0]);if(!r||bke(r))return null;let n=yke(x_t(e)),i=yke(fD(n,r));if(!i.startsWith(n))return null;let s=v_t(n,i);if(s.startsWith("..")||bke(s)||!/\.html?$/i.test(i))return null;try{return Eke(i)?Cke(i,"utf8"):null}catch{return null}}}var wke=async(e,t)=>{let r=e.dir,n=e.outputDir??r;if(!r)return t.errorResult("dir is required");if(!n)return t.errorResult("outputDir is required");let i=Date.now();try{let s=S7(r,[".html",".htm"]),o=s.map(f=>f.text).join(` -`),a=[...S7(fD(r,"assets"),[".js"]),...S7(r,[".js"])],c=k_t(s),u=[],l=[];for(let f of a){if(f.text.length>B_t||Fh(f.text)===null){u.push(f.name);continue}l.push(f.text)}let d=mke({html:o,htmlFiles:s,js:[...l,...c].join(` -`),skippedFiles:u,resolvePage:__t(r)});return I_t(n,{recursive:!0}),w_t(fD(n,"data-model.draft.json"),JSON.stringify(d.model,null,2),"utf8"),console.error(`[data-model] ${JSON.stringify({tool:"scaffold",dir:r,ok:!0,source:d.discovered.source,items:d.model.items.length,todos:d.skillTodos.length,arrays:d.discovered.arrays,skipped:u,durationMs:Date.now()-i})}`),t.textResult(d)}catch(s){return console.error(`[data-model] ${JSON.stringify({tool:"scaffold",dir:r,ok:!1,durationMs:Date.now()-i})}`),t.errorResult(s.message)}};var Ike=async(e,t)=>{let r=e.outputDir,n=e.origin,i=Date.now();try{let{scaffoldDesignFoundation:s}=await Promise.resolve().then(()=>(cq(),UEe)),o=s(r,{origin:n});return console.error(`[design-foundation] ${JSON.stringify({tool:"scaffold",outputDir:r,ok:!0,durationMs:Date.now()-i})}`),t.textResult(o)}catch(s){return console.error(`[design-foundation] ${JSON.stringify({tool:"scaffold",outputDir:r,ok:!1,durationMs:Date.now()-i})}`),t.errorResult(s.message)}};function Ske(e,t){let r=t.split("."),n=e;for(let c of r){if(!n||typeof n!="object")return!1;n=n[c]}if(!n||typeof n!="object")return!1;let i=n,s=Array.isArray(i.evidence)&&i.evidence.length>0,o=typeof i.value=="string"&&i.value.length>0&&i.value!=="TODO"||typeof i.css=="string"&&i.css.length>0&&i.css!=="TODO",a=typeof i.role=="string"&&i.role.length>0&&i.role!=="TODO";return s&&o&&a}var _ke=async(e,t)=>{let r=e.foundation,n=Date.now(),{DesignFoundationSchema:i}=await Promise.resolve().then(()=>(B7(),kke)),s=i.safeParse(r),o={ok:s.success};if(s.success||(o.errors=s.error.issues),s.success){let a=s.data,c=[];for(let u of a.skillTodos)Ske(a,u)||c.push(u);c.length>0&&(o.ok=!1,o.errors=c.map(u=>({code:"skill_todo_unfilled",path:u.split("."),message:`skillTodos entry "${u}" is still empty or TODO`})))}return console.error(`[design-foundation] ${JSON.stringify({tool:"validate",ok:o.ok,durationMs:Date.now()-n,errorCount:o.errors?.length??0})}`),t.textResult(o)};var Fke=async(e,t)=>{let r=e.outputDir,n=e.foundation,i=!!e.force,s=Date.now(),{saveDesignFoundation:o}=await Promise.resolve().then(()=>(Lke(),Pke));try{let a=o(r,n,{force:i});return console.error(`[design-foundation] ${JSON.stringify({tool:"save",outputDir:r,ok:a.ok,durationMs:Date.now()-s,...a.ok?{unchanged:a.unchanged}:{errorCount:a.errors.length}})}`),t.textResult(a)}catch(a){return console.error(`[design-foundation] ${JSON.stringify({tool:"save",outputDir:r,ok:!1,durationMs:Date.now()-s})}`),t.errorResult(a.message)}};var qke=async(e,t)=>{let r=e.outputDir,n=Date.now();try{let{inventoryReplica:i}=await Promise.resolve().then(()=>(jke(),Hke)),s=i(r);return console.error(`[replicate] ${JSON.stringify({tool:"inventory",outputDir:r,ok:!0,durationMs:Date.now()-n,archetypes:Object.fromEntries(Object.entries(s.archetypes).map(([o,a])=>[o,a.count]))})}`),t.textResult(s)}catch(i){return console.error(`[replicate] ${JSON.stringify({tool:"inventory",outputDir:r,ok:!1,durationMs:Date.now()-n})}`),t.errorResult(i.message)}};var Zke=async(e,t)=>{let r=e.outputDir,n=e.replicaBaseUrl,i=e.urls??[],s=Date.now();try{let{verifyReplica:o}=await Promise.resolve().then(()=>(Jke(),Yke)),a=await o({outputDir:r,replicaBaseUrl:n,urls:i,viewports:e.viewports,outputSubdir:e.outputSubdir,cdpPort:e.cdpPort,concurrency:e.concurrency});return console.error(`[replicate] ${JSON.stringify({tool:"verify",outputDir:r,replicaBaseUrl:n,urlCount:i.length,ok:a.ok,durationMs:Date.now()-s})}`),t.textResult(a)}catch(o){return console.error(`[replicate] ${JSON.stringify({tool:"verify",outputDir:r,replicaBaseUrl:n,ok:!1,durationMs:Date.now()-s})}`),t.errorResult(o.message)}};import{writeFileSync as CTt,renameSync as wTt}from"node:fs";import{join as ITt}from"node:path";var f_e=async(e,t)=>{let r=e.originDir,n=e.replicaDir;if(!r||!n)return t.errorResult("liberate_compare requires originDir + replicaDir");let i=Date.now();try{let{compareScreenshotDirs:s,buildRepairTasks:o,DEFAULT_MAX_HEIGHT_DELTA:a}=await Promise.resolve().then(()=>(bD(),d_e)),c=e.maxHeightDelta??a,u=e.floor??.99,l=await s({originDir:r,replicaDir:n,viewports:e.viewports,diffOutputDir:e.diffOutputDir,maxHeightDelta:c}),d=o(l.results,{floor:u}),f=ITt(n,"repair-tasks.json"),p=`${f}.tmp.${process.pid}`;return CTt(p,JSON.stringify({schema:1,floor:u,maxHeightDelta:c,tasks:d},null,2)+` -`),wTt(p,f),console.error(`[compare] ${JSON.stringify({tool:"compare",originDir:r,replicaDir:n,count:l.results.length,repairTasks:d.length,durationMs:Date.now()-i})}`),t.textResult({...l,heightGate:{maxHeightDelta:c,perPage:l.results.map(h=>({pathname:h.pathname,desktop:h.desktop.heightDelta??null,mobile:h.mobile.heightDelta??null}))},repairTasks:{count:d.length,path:f}})}catch(s){return console.error(`[compare] ${JSON.stringify({tool:"compare",originDir:r,replicaDir:n,ok:!1,durationMs:Date.now()-i})}`),t.errorResult(s.message)}};function p_e(e){return e.sections.map(t=>{let r=[t.columns!=null?`c${t.columns}`:"",t.mediaPosition?`m${t.mediaPosition[0]}`:"",t.imageBucket?`i${t.imageBucket[0]}`:""].filter(Boolean).join(",");return r?`${t.type}{${r}}`:t.type}).join("|")}function h_e(e){let t=new Map;for(let n of e){let i=p_e(n),s=t.get(i);s?s.push(n):t.set(i,[n])}let r=[];for(let[n,i]of t){let s=i.reduce((o,a)=>a.htmlBytes>o.htmlBytes?a:o);r.push({key:n,members:i.map(o=>o.url),representative:s.url,signature:s})}return{clusters:r}}var A_e=async(e,t)=>{let r=e.signatures;return Array.isArray(r)?t.textResult(h_e(r)):t.errorResult("signatures[] is required")};F2();var g_e=async(e,t)=>{let r=e.url,n=e.detail;if(!r||!n)return t.errorResult("url and detail are required");if(n==="signature"){let i=e.html;return i?t.textResult(C0e(r,i,i.length)):t.errorResult("html is required for detail=signature")}if(n==="full"){let i=e.mediaMap??{},s=typeof e.cdpPort=="number"?e.cdpPort:void 0;try{let{specs:o}=await L2(r,i,{cdpPort:s});return t.textResult(o)}catch(o){return t.errorResult(`section_extract detail=full failed for ${r}: ${o instanceof Error?o.message:String(o)}`)}}return t.errorResult(`unknown detail: ${n} (expected 'signature' or 'full')`)};function ED(e,t,r){let n=[],i=[];for(let c of e.sections){let u=``;for(let l of c.slots){let d=t[l];d==null||d===""?n.push(l):u+=` +`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};ir.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return` +`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return fl(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Q0(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};ir.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};ir.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.posbke?`${r.slice(0,bke)}...`:r}function r_t(e){return!e||e.type!=="ArrayExpression"||e.elements.length===0?!1:e.elements.every(t=>!t||t.type!=="ObjectExpression"?!1:(t.properties??[]).some(r=>{let n=r.key?.name??r.key?.value;return n==="id"||n==="slug"||typeof n=="string"&&/id$/i.test(n)}))}function qI(e){return e?e.type==="Literal"?!0:e.type==="ArrayExpression"?(e.elements??[]).every(t=>t===null||qI(t)):e.type==="ObjectExpression"?(e.properties??[]).every(t=>!t||t.type!=="Property"||t.kind!=="init"||t.method||t.shorthand||t.computed&&!qI(t.key)?!1:qI(t.value)):e.type==="UnaryExpression"&&["-","+","!","~"].includes(e.operator)?qI(e.argument):e.type==="TemplateLiteral"?(e.expressions??[]).length===0:!1:!1}function n_t(e,t){let r=e.slice(t.start,t.end),n=t_t(e,t);if(r.length>Xkt)return{confidence:"low",evidence:`literal too large (${r.length} chars) :: ${n}`};if(!qI(t))return{confidence:"low",evidence:n};try{let i=Kkt(`(${r})`,Object.create(null),{timeout:1e3});return!Array.isArray(i)||i.length>e_t?{confidence:"low",evidence:n}:{records:i,confidence:"high",evidence:n}}catch(i){return{confidence:"low",evidence:`${i.message} :: ${n}`}}}function i_t(e){return e??"(anonymous)"}function Eke(e){let t=jh(e);if(!t)return[];let r=[],n=new Set,i=(s,o)=>{!r_t(s)||n.has(s.start)||(n.add(s.start),r.push({name:i_t(o),...n_t(e,s)}))};return Hh(t,s=>{if(s.type==="VariableDeclarator"&&s.id?.type==="Identifier"&&i(s.init,s.id.name),s.type==="AssignmentExpression"){let o=s.left,a=o?.type==="Identifier"?o.name:o?.property?.name;i(s.right,a)}s.type==="Property"&&i(s.value,s.key?.name??s.key?.value),s.type==="ReturnStatement"&&i(s.argument,void 0)}),r}var s_t=/^(#[\w-]+|\.[\w-]+|\[[\w-]+(=("[^"]*"|'[^']*'|[\w-]+))?\])$/;function o_t(e){for(let t of e.arguments??[])if(t.type==="Literal"&&typeof t.value=="number")return t.value;for(let t of e.arguments??[])if(t.type==="CallExpression"){let r=(t.arguments??[]).find(n=>n.type==="Literal"&&typeof n.value=="number");if(r)return r.value}}function Cke(e,t){let r=de(e),n=jh(t),i=new Map;n&&Hh(n,a=>{if(a.type!=="CallExpression")return;let c=(a.arguments??[]).filter(u=>u.type==="Literal"&&typeof u.value=="string").map(u=>String(u.value)).find(u=>s_t.test(u));c&&!i.has(c)&&i.set(c,{source:t.slice(a.start,a.end),perPage:o_t(a)})});let s=[],o=new Set;for(let[a,c]of i){let u=r(a).first();u.length!==0&&(o.add(a),s.push({selector:a,wrapperClass:u.attr("class")||void 0,sourceCall:c.source,perPageHint:c.perPage,confidence:"high",evidence:c.source}))}return r("[id]").each((a,c)=>{let l=`#${r(c).attr("id")}`;o.has(l)||r(c).children().length>0||s.push({selector:l,wrapperClass:r(c).attr("class")||void 0,confidence:"low",evidence:`empty container ${l} has no matching JS call`})}),s}function wke(e){let t=jh(e);if(!t)return[];let r=new Set,n=i=>i?.type==="MemberExpression"&&i.property?.name==="id";return Hh(t,i=>{if(i.type==="CallExpression"&&i.callee?.type==="MemberExpression"&&i.callee.property?.name==="find"&&i.callee.object?.type==="Identifier"){let s=i.arguments?.[0]?.body;s?.type==="BinaryExpression"&&/^===?$/.test(s.operator)&&(n(s.left)||n(s.right))&&r.add(i.callee.object.name)}}),[...r]}var a_t=["title","name","label","heading"],c_t=["content","story","description","body","excerpt"],u_t=["category","cat","kind","type","collection","group"],l_t=["images","gallery","photos","media"];var d_t=e=>[...new Set(e.flatMap(t=>Object.keys(t)))],uf=(e,t)=>e.map(r=>r[t]).filter(r=>r!==void 0),f_t=e=>e.length>0&&e.every(t=>typeof t=="string"||typeof t=="number"),_7=e=>e.length>0&&e.every(t=>typeof t=="string"),p_t=e=>new Set(e).size===e.length,M0=(e,t)=>e.find(r=>t.includes(r.toLowerCase()));function T7(e,t){let r=uf(e,t).filter(n=>typeof n=="string");return r.length?r.reduce((n,i)=>n+i.length,0)/r.length:0}function h_t(e){return Array.isArray(e)&&e.every(t=>typeof t=="string"||!!(t&&typeof t=="object"&&("caption"in t||"url"in t)))}function A_t(e){return e.every(t=>typeof t=="boolean")?"boolean":e.every(t=>typeof t=="number")?e.every(t=>Number.isInteger(t))?"integer":"number":"string"}function g_t(e){let t=e.filter(r=>typeof r=="string");if(t.length!==0){if(t.every(r=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(r)))return"email";if(t.every(r=>/^https?:\/\//.test(r)))return"url";if(t.every(r=>/^\d{4}-\d{2}-\d{2}/.test(r)))return"date";if(t.some(r=>r.length>=60))return"textarea"}}function m_t(e,t){let r=uf(e,t),n=A_t(r),i=n==="string"?g_t(r):void 0;return i?{key:t,type:n,format:i}:{key:t,type:n}}function Ike(e){let t=d_t(e),r=M0(t,["id","slug"])??t[0]??"id",n="low";M0(t,["id","slug"])&&f_t(uf(e,r))&&p_t(uf(e,r))&&(n="high");let i=M0(t,a_t),s=i?"high":"low";i||(i=t.filter(f=>f!==r&&_7(uf(e,f))).sort((f,p)=>T7(e,f)-T7(e,p))[0]??r);let o=M0(t,c_t)??t.find(f=>f!==i&&_7(uf(e,f))&&T7(e,f)>=60),a=M0(t,u_t),c=a?"high":"low";a||(a=t.find(f=>{let p=uf(e,f);return f!==r&&f!==i&&_7(p)&&new Set(p).size<=Math.max(1,Math.floor(p.length/2))}),a&&(c="low"));let u=M0(t,l_t)??t.find(f=>{let p=uf(e,f);return p.length>0&&p.every(h_t)}),l=new Set;n==="high"&&l.add(r),s==="high"&&l.add(i),o&&l.add(o),a&&c==="high"&&l.add(a),u&&l.add(u);let d=t.filter(f=>!l.has(f)).map(f=>m_t(e,f));return{idKey:r,titleKey:i,contentKey:o,termKey:a,galleryKey:u,fields:d,confidence:{id:n,title:s,terms:c}}}function Ske(e,t){let r=`${e}::${t}`,n=2166136261;for(let i=0;i>>0).toString(36)}`}var b_t=2e5,E_t=5e3,R7=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),C_t=e=>e.replace(/s$/i,""),Q7=e=>e.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim(),vke=e=>["string","number","boolean"].includes(typeof e),w_t=["newest","recent","latest"],kke=(e,t)=>e?"category":`${t}_cat`;function _ke(e){let t=[],r=D_t(e.js),n=wke(e.js),i=Cke(e.html,e.js),o={arrays:r.map(d=>({name:d.name,confidence:d.confidence,recordCount:d.records?.length,reason:d.confidence==="low"?d.evidence.slice(0,120):void 0})),skippedFiles:e.skippedFiles??[],unmatchedContainers:i.filter(d=>d.confidence==="low"||!d.sourceCall).map(d=>d.selector)},a=B_t(r,n,i);if(a?.records)return xke({records:a.records,typeName:a.name,mounts:i,idLookupNames:n,source:"js-array",cardTemplateTodoEvidence:F_t(e.js),deterministicCard:void 0,discovered:o,todos:t});let c=e.htmlFiles?.length?e.htmlFiles.flatMap(d=>h7(d.text,{resolvePage:e.resolvePage}).map((f,p)=>({grid:f,disambiguator:`${d.name}:${p}`,sourcePage:d.name}))):h7(e.html,{resolvePage:e.resolvePage}).map((d,f)=>({grid:d,disambiguator:String(f),sourcePage:void 0})),u=c.filter(({grid:d})=>d.records.length>=1);if(u.length>0){let d=I_t(u.flatMap(({grid:A})=>A.records)),f=u.find(({grid:A})=>A.featured),p=kke(!0,"post"),h=u.map(({grid:A,disambiguator:g,sourcePage:m})=>({selector:`#${Ske(A.containerSelector,g)}`,sourceSelector:A.containerSelector,...m?{sourcePage:m}:{},sourceCall:`html-cards:${A.containerSelector}`,...A.containerClass?{wrapperClass:A.containerClass}:{},perPageHint:A.records.length,...A.featured?{featured:{columnWrapperClass:A.featured.columnWrapperClass,leadPerPage:A.featured.leadCount,columnPerPage:A.records.length-A.featured.leadCount,variant:"row",...A.featured.termSlug?{termSlug:A.featured.termSlug,taxonomy:p}:{}}}:{},confidence:"high",evidence:A.evidence}));return xke({records:d,coreType:"post",mounts:h,idLookupNames:[],source:"html-cards",cardTemplateTodoEvidence:void 0,deterministicCard:u[0].grid.cardTemplate,deterministicCardVariants:f?.grid.featured?{row:f.grid.featured.rowTemplate}:void 0,discovered:{...o,unmatchedContainers:c.filter(({grid:A})=>A.records.length===0).map(({grid:A})=>A.containerSelector)},todos:t})}let l=Q_t();return t.push({path:"items",instruction:"No static data array literal and no repeated content-card grid were found. Author items[] and the model by hand from the source.",evidence:r[0]?.evidence??"(no array-like declarations or card grids found)"}),{model:l,skillTodos:t,discovered:{...o,source:"none"},validation:OI(l)}}function xke(e){let{records:t,todos:r}=e,n=e.coreType==="post",i=Ike(t),s=n&&t.some(h=>Object.prototype.hasOwnProperty.call(h,"content"))?{...i,contentKey:"content",fields:S_t(t,i).filter(h=>h.key!=="content")}:i,o=e.typeName??"item",a=C_t(o==="(anonymous)"?"item":o).toLowerCase(),c=n?"post":R7(a)||"item",u=kke(n,c),l=new Map;if(s.termKey)for(let h of t){let A=h[s.termKey];typeof A=="string"&&l.set(R7(A),Q7(A))}let d=t.map(h=>{let A={};for(let E of s.fields){let w=h[E.key];vke(w)&&(A[E.key]=w)}let g=s.galleryKey?h[s.galleryKey]:void 0,m=Array.isArray(g)?g.map(E=>{if(typeof E=="string")return{caption:E};let w=E;return{caption:String(w.caption??""),url:w.url}}):[],b=s.termKey?h[s.termKey]:void 0,C=h[s.idKey];return{id:vke(C)?String(C):"",title:String(h[s.titleKey]??""),terms:typeof b=="string"?[R7(b)]:[],meta:A,gallery:m,content:s.contentKey?String(h[s.contentKey]??""):void 0}}),f=[];for(let h of e.mounts){if(h.confidence!=="high"||!h.sourceCall)continue;let A=f.length,g=h.perPageHint??-1,m=__t(h,g);m.confidence==="low"&&r.push({path:`mounts[${A}].query.order`,instruction:`Confirm ordering/perPage for ${h.selector}; source call: "${h.sourceCall}". Default applied: date/DESC. Adjust to match the source's selection semantics.`,evidence:h.evidence}),f.push({selector:h.selector,sourceCall:h.sourceCall,query:{postType:c,perPage:g,orderBy:"date",order:m.order},wrapperClass:h.wrapperClass,...h.sourceSelector?{sourceSelector:h.sourceSelector}:{},...h.sourcePage?{sourcePage:h.sourcePage}:{},...h.featured?{featured:h.featured}:{}})}e.cardTemplateTodoEvidence&&r.unshift({path:"card.template",instruction:"Author card.template: rewrite the source per-item card function into a single-root skeleton with data-dla-* bindings (data-dla-text/attr/class/if), preserving the source classes. Reference: id, title, content, cat.slug, cat.label, meta., gallery..caption, map... Add any value-keyed lookups to card.maps.",evidence:e.cardTemplateTodoEvidence}),s.confidence.id==="low"&&r.push({path:"items[].id",instruction:`The id field was guessed ('${s.idKey}') and may be non-unique or non-scalar; confirm/choose the stable per-item id (it is the idempotency key for inserts).`,evidence:`record keys: ${Object.keys(t[0]??{}).join(", ")}`}),s.confidence.title==="low"&&r.push({path:"items[].title",instruction:`Title was guessed ('${s.titleKey}') with no name match; confirm it is the human title.`,evidence:`record keys: ${Object.keys(t[0]??{}).join(", ")}`}),s.confidence.terms==="low"&&s.termKey&&r.push({path:"taxonomy",instruction:`Taxonomy column was guessed ('${s.termKey}') by low cardinality; confirm it is a content category.`,evidence:`distinct: ${[...l.keys()].join(", ")}`});let p={cpt:n?{slug:"post",singular:"Post",plural:"Posts",public:!0,supports:["title","editor","thumbnail","custom-fields"]}:{slug:c,singular:Q7(a),plural:Q7((o==="(anonymous)"?"items":o).toLowerCase()),public:!0,supports:["title","editor","custom-fields"]},taxonomy:{slug:u,label:"Categories",hierarchical:!0,terms:[...l].map(([h,A])=>({slug:h,label:A}))},fields:s.fields,items:d,mounts:f,card:{template:e.deterministicCard??"",maps:{},...e.deterministicCardVariants?{variants:e.deterministicCardVariants}:{}},sourceArrays:n?[]:[...new Set([...e.idLookupNames,o].filter(h=>h&&h!=="(anonymous)"))],schema:3};return{model:p,skillTodos:r,discovered:{...e.discovered,source:e.source},validation:OI(p)}}function I_t(e){let t=new Map,r=[];for(let n of e){let i=n.id;if(typeof i=="string"&&i){let s=t.get(i);if(s){let o=Bke(s),a=Bke(n);o!==a&&console.warn(`[local-data] dropping duplicate card id "${i}" (title "${a}") - shared id/idempotency key`);continue}t.set(i,n)}r.push(n)}return r}function Bke(e){let t=e.title;return t==null?"":String(t)}function S_t(e,t){let r=[...t.fields];t.contentKey&&t.contentKey!=="content"&&!r.some(i=>i.key===t.contentKey)&&r.push(x_t(e,t.contentKey));let n=new Map(v_t(e).map((i,s)=>[i,s]));return r.sort((i,s)=>(n.get(i.key)??Number.MAX_SAFE_INTEGER)-(n.get(s.key)??Number.MAX_SAFE_INTEGER))}function v_t(e){return[...new Set(e.flatMap(t=>Object.keys(t)))]}function x_t(e,t){let r=e.map(i=>i[t]).filter(i=>i!==void 0);if(r.length>0&&r.every(i=>typeof i=="boolean"))return{key:t,type:"boolean"};if(r.length>0&&r.every(i=>typeof i=="number"))return{key:t,type:r.every(i=>Number.isInteger(i))?"integer":"number"};let n=r.filter(i=>typeof i=="string");return n.length>0&&n.every(i=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(i))?{key:t,type:"string",format:"email"}:n.length>0&&n.every(i=>/^https?:\/\//.test(i))?{key:t,type:"string",format:"url"}:n.length>0&&n.every(i=>/^\d{4}-\d{2}-\d{2}/.test(i))?{key:t,type:"string",format:"date"}:n.some(i=>i.length>=60)?{key:t,type:"string",format:"textarea"}:{key:t,type:"string"}}function B_t(e,t,r){let n=e.filter(c=>c.records?.length);if(n.length===0)return;let i=new Set(t),s=n.find(c=>i.has(c.name));if(s)return s;let o=r.map(c=>c.sourceCall).filter(c=>!!c),a=n.find(c=>o.some(u=>k_t(u,c.name)));return a||n.reduce((c,u)=>(u.records?.length??0)>(c.records?.length??0)?u:c)}function k_t(e,t){if(!/^[A-Za-z_$][\w$]*$/.test(t))return!1;let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[^A-Za-z0-9_$])${r}($|[^A-Za-z0-9_$])`).test(e)}function __t(e,t){return e.sourceCall?.startsWith("html-cards:")?{order:"ASC",confidence:"high"}:e.perPageHint===void 0||t===-1?{order:"ASC",confidence:"high"}:T_t(e.sourceCall??"")?{order:"DESC",confidence:"high"}:{order:"DESC",confidence:"low"}}function T_t(e){return(e.match(/[A-Za-z][A-Za-z0-9_$]*/g)??[]).some(r=>w_t.some(n=>R_t(r,n)))}function R_t(e,t){let r=e.toLowerCase();if(r===t)return!0;if(!r.startsWith(t))return!1;let n=e[t.length];return!!(n&&/[A-Z0-9_$]/.test(n))}function Q_t(){return{cpt:{slug:"item",singular:"Item",plural:"Items",public:!0,supports:["title","editor","custom-fields"]},taxonomy:{slug:"item_cat",label:"Categories",hierarchical:!0,terms:[]},fields:[],items:[],mounts:[],card:{template:"",maps:{}},sourceArrays:[],schema:3}}function D_t(e){let t=Eke(e);return t.some(r=>r.records?.length)?t:[...t,...N_t(e,t)]}function N_t(e,t){let r=jh(e);if(!r)return[];let n=new Set(t.map(a=>a.evidence)),i=[],s=new Set,o=(a,c)=>{if(!M_t(a)||s.has(a.start))return;s.add(a.start);let u=L_t(e,a);if(n.has(u))return;let l=P_t(e,a,u);i.push({name:c,...l})};return Hh(r,a=>{if(a.type==="VariableDeclarator"&&a.id?.type==="Identifier"&&o(a.init,a.id.name),a.type==="AssignmentExpression"){let c=a.left,u=c?.type==="Identifier"?c.name:c?.property?.name;o(a.right,u??"(anonymous)")}a.type==="Property"&&o(a.value,String(a.key?.name??a.key?.value??"(anonymous)"))}),i}function M_t(e){return!!(e?.type==="ArrayExpression"&&e.elements?.length>0&&e.elements.every(t=>t?.type==="ObjectExpression"))}function zI(e){return e?e.type==="Literal"?!0:e.type==="ArrayExpression"?(e.elements??[]).every(t=>t===null||zI(t)):e.type==="ObjectExpression"?(e.properties??[]).every(t=>!t||t.type!=="Property"||t.kind!=="init"||t.method||t.shorthand||t.computed&&!zI(t.key)?!1:zI(t.value)):e.type==="UnaryExpression"&&["-","+","!","~"].includes(e.operator)?zI(e.argument):e.type==="TemplateLiteral"?(e.expressions??[]).length===0:!1:!1}function P_t(e,t,r){let n=e.slice(t.start,t.end);if(n.length>b_t)return{confidence:"low",evidence:`literal too large (${n.length} chars) :: ${r}`};if(!zI(t))return{confidence:"low",evidence:r};try{let i=y_t(`(${n})`,Object.create(null),{timeout:1e3});return!Array.isArray(i)||i.length>E_t?{confidence:"low",evidence:r}:{records:i,confidence:"high",evidence:r}}catch(i){return{confidence:"low",evidence:`${i.message} :: ${r}`}}}function L_t(e,t){let r=e.slice(t.start,t.end);return r.length>400?`${r.slice(0,400)}...`:r}function F_t(e){let t=e.match(/function\s+\w*[Cc]ard\s*\([^)]*\)\s*\{[\s\S]*?\}/);return t?t[0].length>600?`${t[0].slice(0,600)}...`:t[0]:"(no *Card function found; author from the rendered card markup)"}var z_t=256*1024;function D7(e,t){if(!Qke(e))return[];let r=[];for(let n of O_t(e))if(t.includes(H_t(n).toLowerCase()))try{r.push({name:n,text:Dke(yD(e,n),"utf8")})}catch{}return r}function V_t(e){let t=[];for(let r of e)try{let n=de(r.text);n("script").each((i,s)=>{if(n(s).attr("src")!==void 0)return;let o=n(s).text();o.trim()&&t.push(o)})}catch{}return t}function G_t(e){return t=>{if(!t||/^(https?:|mailto:|tel:|#|javascript:)/i.test(t))return null;let r=decodeURIComponent(t.split(/[?#]/)[0]);if(!r||Rke(r))return null;let n=Tke(q_t(e)),i=Tke(yD(n,r));if(!i.startsWith(n))return null;let s=j_t(n,i);if(s.startsWith("..")||Rke(s)||!/\.html?$/i.test(i))return null;try{return Qke(i)?Dke(i,"utf8"):null}catch{return null}}}var Nke=async(e,t)=>{let r=e.dir,n=e.outputDir??r;if(!r)return t.errorResult("dir is required");if(!n)return t.errorResult("outputDir is required");let i=Date.now();try{let s=D7(r,[".html",".htm"]),o=s.map(f=>f.text).join(` +`),a=[...D7(yD(r,"assets"),[".js"]),...D7(r,[".js"])],c=V_t(s),u=[],l=[];for(let f of a){if(f.text.length>z_t||jh(f.text)===null){u.push(f.name);continue}l.push(f.text)}let d=_ke({html:o,htmlFiles:s,js:[...l,...c].join(` +`),skippedFiles:u,resolvePage:G_t(r)});return $_t(n,{recursive:!0}),U_t(yD(n,"data-model.draft.json"),JSON.stringify(d.model,null,2),"utf8"),console.error(`[data-model] ${JSON.stringify({tool:"scaffold",dir:r,ok:!0,source:d.discovered.source,items:d.model.items.length,todos:d.skillTodos.length,arrays:d.discovered.arrays,skipped:u,durationMs:Date.now()-i})}`),t.textResult(d)}catch(s){return console.error(`[data-model] ${JSON.stringify({tool:"scaffold",dir:r,ok:!1,durationMs:Date.now()-i})}`),t.errorResult(s.message)}};var Mke=async(e,t)=>{let r=e.outputDir,n=e.origin,i=Date.now();try{let{scaffoldDesignFoundation:s}=await Promise.resolve().then(()=>(hq(),KEe)),o=s(r,{origin:n});return console.error(`[design-foundation] ${JSON.stringify({tool:"scaffold",outputDir:r,ok:!0,durationMs:Date.now()-i})}`),t.textResult(o)}catch(s){return console.error(`[design-foundation] ${JSON.stringify({tool:"scaffold",outputDir:r,ok:!1,durationMs:Date.now()-i})}`),t.errorResult(s.message)}};function Pke(e,t){let r=t.split("."),n=e;for(let c of r){if(!n||typeof n!="object")return!1;n=n[c]}if(!n||typeof n!="object")return!1;let i=n,s=Array.isArray(i.evidence)&&i.evidence.length>0,o=typeof i.value=="string"&&i.value.length>0&&i.value!=="TODO"||typeof i.css=="string"&&i.css.length>0&&i.css!=="TODO",a=typeof i.role=="string"&&i.role.length>0&&i.role!=="TODO";return s&&o&&a}var $ke=async(e,t)=>{let r=e.foundation,n=Date.now(),{DesignFoundationSchema:i}=await Promise.resolve().then(()=>(P7(),Uke)),s=i.safeParse(r),o={ok:s.success};if(s.success||(o.errors=s.error.issues),s.success){let a=s.data,c=[];for(let u of a.skillTodos)Pke(a,u)||c.push(u);c.length>0&&(o.ok=!1,o.errors=c.map(u=>({code:"skill_todo_unfilled",path:u.split("."),message:`skillTodos entry "${u}" is still empty or TODO`})))}return console.error(`[design-foundation] ${JSON.stringify({tool:"validate",ok:o.ok,durationMs:Date.now()-n,errorCount:o.errors?.length??0})}`),t.textResult(o)};var Jke=async(e,t)=>{let r=e.outputDir,n=e.foundation,i=!!e.force,s=Date.now(),{saveDesignFoundation:o}=await Promise.resolve().then(()=>(Yke(),Wke));try{let a=o(r,n,{force:i});return console.error(`[design-foundation] ${JSON.stringify({tool:"save",outputDir:r,ok:a.ok,durationMs:Date.now()-s,...a.ok?{unchanged:a.unchanged}:{errorCount:a.errors.length}})}`),t.textResult(a)}catch(a){return console.error(`[design-foundation] ${JSON.stringify({tool:"save",outputDir:r,ok:!1,durationMs:Date.now()-s})}`),t.errorResult(a.message)}};var r_e=async(e,t)=>{let r=e.outputDir,n=Date.now();try{let{inventoryReplica:i}=await Promise.resolve().then(()=>(t_e(),e_e)),s=i(r);return console.error(`[replicate] ${JSON.stringify({tool:"inventory",outputDir:r,ok:!0,durationMs:Date.now()-n,archetypes:Object.fromEntries(Object.entries(s.archetypes).map(([o,a])=>[o,a.count]))})}`),t.textResult(s)}catch(i){return console.error(`[replicate] ${JSON.stringify({tool:"inventory",outputDir:r,ok:!1,durationMs:Date.now()-n})}`),t.errorResult(i.message)}};var a_e=async(e,t)=>{let r=e.outputDir,n=e.replicaBaseUrl,i=e.urls??[],s=Date.now();try{let{verifyReplica:o}=await Promise.resolve().then(()=>(o_e(),s_e)),a=await o({outputDir:r,replicaBaseUrl:n,urls:i,viewports:e.viewports,outputSubdir:e.outputSubdir,cdpPort:e.cdpPort,concurrency:e.concurrency});return console.error(`[replicate] ${JSON.stringify({tool:"verify",outputDir:r,replicaBaseUrl:n,urlCount:i.length,ok:a.ok,durationMs:Date.now()-s})}`),t.textResult(a)}catch(o){return console.error(`[replicate] ${JSON.stringify({tool:"verify",outputDir:r,replicaBaseUrl:n,ok:!1,durationMs:Date.now()-s})}`),t.errorResult(o.message)}};import{writeFileSync as OTt,renameSync as UTt}from"node:fs";import{join as $Tt}from"node:path";var w_e=async(e,t)=>{let r=e.originDir,n=e.replicaDir;if(!r||!n)return t.errorResult("liberate_compare requires originDir + replicaDir");let i=Date.now();try{let{compareScreenshotDirs:s,buildRepairTasks:o,DEFAULT_MAX_HEIGHT_DELTA:a}=await Promise.resolve().then(()=>(vD(),C_e)),c=e.maxHeightDelta??a,u=e.floor??.99,l=await s({originDir:r,replicaDir:n,viewports:e.viewports,diffOutputDir:e.diffOutputDir,maxHeightDelta:c}),d=o(l.results,{floor:u}),f=$Tt(n,"repair-tasks.json"),p=`${f}.tmp.${process.pid}`;return OTt(p,JSON.stringify({schema:1,floor:u,maxHeightDelta:c,tasks:d},null,2)+` +`),UTt(p,f),console.error(`[compare] ${JSON.stringify({tool:"compare",originDir:r,replicaDir:n,count:l.results.length,repairTasks:d.length,durationMs:Date.now()-i})}`),t.textResult({...l,heightGate:{maxHeightDelta:c,perPage:l.results.map(h=>({pathname:h.pathname,desktop:h.desktop.heightDelta??null,mobile:h.mobile.heightDelta??null}))},repairTasks:{count:d.length,path:f}})}catch(s){return console.error(`[compare] ${JSON.stringify({tool:"compare",originDir:r,replicaDir:n,ok:!1,durationMs:Date.now()-i})}`),t.errorResult(s.message)}};function I_e(e){return e.sections.map(t=>{let r=[t.columns!=null?`c${t.columns}`:"",t.mediaPosition?`m${t.mediaPosition[0]}`:"",t.imageBucket?`i${t.imageBucket[0]}`:""].filter(Boolean).join(",");return r?`${t.type}{${r}}`:t.type}).join("|")}function S_e(e){let t=new Map;for(let n of e){let i=I_e(n),s=t.get(i);s?s.push(n):t.set(i,[n])}let r=[];for(let[n,i]of t){let s=i.reduce((o,a)=>a.htmlBytes>o.htmlBytes?a:o);r.push({key:n,members:i.map(o=>o.url),representative:s.url,signature:s})}return{clusters:r}}var v_e=async(e,t)=>{let r=e.signatures;return Array.isArray(r)?t.textResult(S_e(r)):t.errorResult("signatures[] is required")};q2();var x_e=async(e,t)=>{let r=e.url,n=e.detail;if(!r||!n)return t.errorResult("url and detail are required");if(n==="signature"){let i=e.html;return i?t.textResult(D0e(r,i,i.length)):t.errorResult("html is required for detail=signature")}if(n==="full"){let i=e.mediaMap??{},s=typeof e.cdpPort=="number"?e.cdpPort:void 0;try{let{specs:o}=await j2(r,i,{cdpPort:s});return t.textResult(o)}catch(o){return t.errorResult(`section_extract detail=full failed for ${r}: ${o instanceof Error?o.message:String(o)}`)}}return t.errorResult(`unknown detail: ${n} (expected 'signature' or 'full')`)};function xD(e,t,r){let n=[],i=[];for(let c of e.sections){let u=``;for(let l of c.slots){let d=t[l];d==null||d===""?n.push(l):u+=` ${String(d)}`}i.push(u)}let o=Number(t.__extraSections??0)>0,a=n.length>0||o;return{postContent:i.join(` -`),misfit:a,sanity:{unfilledSlots:n,sectionCountMismatch:o}}}var m_e=async(e,t)=>{let r=e.skeleton,n=e.pageContent;return!r||!n?t.errorResult("skeleton and pageContent are required"):t.textResult(ED(r,n,e.mediaMap??{}))};uE();import{mkdirSync as F2t,renameSync as W_e,unlinkSync as Y_e,writeFileSync as q7}from"node:fs";import{join as J_e}from"node:path";St();import{readdirSync as STt,readFileSync as vTt,lstatSync as xTt}from"node:fs";import{join as BTt,relative as kTt,sep as _Tt}from"node:path";function TTt(e){let t=[],r=n=>{for(let i of STt(n)){if(i.startsWith(".")||i==="node_modules")continue;let s=BTt(n,i),o=xTt(s);o.isSymbolicLink()||(o.isDirectory()?r(s):(i.toLowerCase().endsWith(".html")||i.toLowerCase().endsWith(".htm"))&&t.push(s))}};return r(e),t}function RTt(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"")}function y_e(e){return e.map(RTt).filter(Boolean).join("-")}function L7(e){let r=e.replace(/\.html?$/i,"").split(_Tt).filter(Boolean);return r.length===0?"home":r[r.length-1].toLowerCase()==="index"?r.length===1?"home":y_e(r.slice(0,-1))||"home":y_e(r)||"home"}function CD(e){let t=TTt(e);if(t.length===0)throw new Error(`no html pages found under ${e}`);let r=t.map(i=>{let s=vTt(i,"utf8"),o=de(s),a=kTt(e,i),c={},u=o("body").attr()??{};for(let[l,d]of Object.entries(u))l.startsWith("data-")&&(c[l.slice(5)]=d);return{relPath:a,slug:L7(a),html:s,title:o("title").first().text().trim(),...Object.keys(c).length>0?{bodyData:c}:{}}});r.sort((i,s)=>i.slug.localeCompare(s.slug));let n=new Set;for(let i of r){if(n.has(i.slug))throw new Error(`slug collision: "${i.slug}" from "${i.relPath}"`);n.add(i.slug)}return{root:e,pages:r}}pi();St();function b_e(e){return e==="home"?"/":`/${e}/`}function wD(e,t){let r=de(e),n=new Set(t);return r("a[href]").each((i,s)=>{let o=r(s).attr("href")??"";if(!o||/^[a-z]+:/i.test(o)||o.startsWith("//")||o.startsWith("#"))return;let a=o.split(/[?#]/)[0];try{a=decodeURIComponent(a)}catch{}let c=L7(a.replace(/^\.\//,"").replace(/^\//,""));n.has(c)&&r(s).attr("href",b_e(c))}),r("body").html()??e}function E_e(e,t){let r=t.flatMap(i=>{let s=b_e(i.slug);return[i.relPath,`./${i.relPath}`,`/${i.relPath}`].map(o=>({raw:o,url:s}))}).sort((i,s)=>s.raw.length-i.raw.length),n=e;for(let{raw:i,url:s}of r){let o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(`(['"])${o}\\1`,"g"),(a,c)=>`${c}${s}${c}`)}return n}St();En();import{createHash as QTt}from"node:crypto";function DTt(e){return e.split(";").map(t=>t.trim().replace(/\s+/g," ")).filter(Boolean).map(t=>{let r=t.indexOf(":");return r<0?t:`${t.slice(0,r).trim()}:${t.slice(r+1).trim()}`}).join(";")}var D0=class{rules=new Map;classFor(t){let r=DTt(t??"");if(!r)return null;let n=`lib-i${QTt("sha1").update(r).digest("hex").slice(0,10)}`;return this.rules.set(n,r),n}get size(){return this.rules.size}toCss(){return[...this.rules.entries()].sort((t,r)=>t[0]r[0]?1:0).map(([t,r])=>`.${t}{${r}}`).join(` -`)}};function C_e(...e){let t=new Set;for(let r of e)for(let n of(r??"").split(` +`),misfit:a,sanity:{unfilledSlots:n,sectionCountMismatch:o}}}var B_e=async(e,t)=>{let r=e.skeleton,n=e.pageContent;return!r||!n?t.errorResult("skeleton and pageContent are required"):t.textResult(xD(r,n,e.mediaMap??{}))};hE();import{mkdirSync as rRt,renameSync as iTe,unlinkSync as sTe,writeFileSync as X7}from"node:fs";import{join as oTe}from"node:path";Bt();import{readdirSync as HTt,readFileSync as jTt,lstatSync as qTt}from"node:fs";import{join as zTt,relative as VTt,sep as GTt}from"node:path";function WTt(e){let t=[],r=n=>{for(let i of HTt(n)){if(i.startsWith(".")||i==="node_modules")continue;let s=zTt(n,i),o=qTt(s);o.isSymbolicLink()||(o.isDirectory()?r(s):(i.toLowerCase().endsWith(".html")||i.toLowerCase().endsWith(".htm"))&&t.push(s))}};return r(e),t}function YTt(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"")}function k_e(e){return e.map(YTt).filter(Boolean).join("-")}function V7(e){let r=e.replace(/\.html?$/i,"").split(GTt).filter(Boolean);return r.length===0?"home":r[r.length-1].toLowerCase()==="index"?r.length===1?"home":k_e(r.slice(0,-1))||"home":k_e(r)||"home"}function BD(e){let t=WTt(e);if(t.length===0)throw new Error(`no html pages found under ${e}`);let r=t.map(i=>{let s=jTt(i,"utf8"),o=de(s),a=VTt(e,i),c={},u=o("body").attr()??{};for(let[l,d]of Object.entries(u))l.startsWith("data-")&&(c[l.slice(5)]=d);return{relPath:a,slug:V7(a),html:s,title:o("title").first().text().trim(),...Object.keys(c).length>0?{bodyData:c}:{}}});r.sort((i,s)=>i.slug.localeCompare(s.slug));let n=new Set;for(let i of r){if(n.has(i.slug))throw new Error(`slug collision: "${i.slug}" from "${i.relPath}"`);n.add(i.slug)}return{root:e,pages:r}}hi();Bt();function __e(e){return e==="home"?"/":`/${e}/`}function kD(e,t){let r=de(e),n=new Set(t);return r("a[href]").each((i,s)=>{let o=r(s).attr("href")??"";if(!o||/^[a-z]+:/i.test(o)||o.startsWith("//")||o.startsWith("#"))return;let a=o.split(/[?#]/)[0];try{a=decodeURIComponent(a)}catch{}let c=V7(a.replace(/^\.\//,"").replace(/^\//,""));n.has(c)&&r(s).attr("href",__e(c))}),r("body").html()??e}function T_e(e,t){let r=t.flatMap(i=>{let s=__e(i.slug);return[i.relPath,`./${i.relPath}`,`/${i.relPath}`].map(o=>({raw:o,url:s}))}).sort((i,s)=>s.raw.length-i.raw.length),n=e;for(let{raw:i,url:s}of r){let o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(`(['"])${o}\\1`,"g"),(a,c)=>`${c}${s}${c}`)}return n}Bt();wn();import{createHash as JTt}from"node:crypto";function ZTt(e){return e.split(";").map(t=>t.trim().replace(/\s+/g," ")).filter(Boolean).map(t=>{let r=t.indexOf(":");return r<0?t:`${t.slice(0,r).trim()}:${t.slice(r+1).trim()}`}).join(";")}var L0=class{rules=new Map;classFor(t){let r=ZTt(t??"");if(!r)return null;let n=`lib-i${JTt("sha1").update(r).digest("hex").slice(0,10)}`;return this.rules.set(n,r),n}get size(){return this.rules.size}toCss(){return[...this.rules.entries()].sort((t,r)=>t[0]r[0]?1:0).map(([t,r])=>`.${t}{${r}}`).join(` +`)}};function R_e(...e){let t=new Set;for(let r of e)for(let n of(r??"").split(` `)){let i=n.trim();i&&t.add(i)}return[...t].sort().join(` -`)}En();function O7(e,t,r,n={}){let i=LTt(e,t);if(!i)return null;let s=OTt(e,i);if(s.unsupported)return null;let o=[],a=0,c=new Set,u=UTt(e,i);for(let l of s.fields){let d=l.tagName.toLowerCase(),f=e(l);if(d==="textarea"){o.push(F7("jetpack/field-textarea",ID(e,i,l,f.attr("placeholder")),{inputType:"textarea"})),a+=1;continue}if(d==="select"){let A=VTt(e,l);if(A.length===0)return null;o.push(F7("jetpack/field-select",ID(e,i,l,GTt(e,l),A),{inputType:"dropdown"})),a+=1;continue}if(d!=="input")return null;let p=jI(f);if(p==="radio"){let A=(f.attr("name")??"").trim(),g=A?`name:${A}`:`node:${s.fields.indexOf(l)}`;if(c.has(g))continue;let m=qTt(e,i,l);if(!m)return null;c.add(g),o.push(YTt("jetpack/field-radio",m,"radio")),a+=1;continue}if(p==="checkbox"){let A=ID(e,i,l),g=KTt(e,l,A.label)?"jetpack/field-consent":"jetpack/field-checkbox";o.push(JTt(g,A)),a+=1;continue}let h=jTt(e,l);if(!h)return null;o.push(F7(h,ID(e,i,l,f.attr("placeholder")),{inputBlockName:h==="jetpack/field-telephone"?"jetpack/phone-input":"jetpack/input",inputType:h==="jetpack/field-telephone"?void 0:p})),a+=1}return a===0?null:(u&&o.push(WTt(e,u)),{markup:` +`)}wn();function W7(e,t,r,n={}){let i=t2t(e,t);if(!i)return null;let s=n2t(e,i);if(s.unsupported)return null;let o=[],a=0,c=new Set,u=i2t(e,i);for(let l of s.fields){let d=l.tagName.toLowerCase(),f=e(l);if(d==="textarea"){o.push(G7("jetpack/field-textarea",_D(e,i,l,f.attr("placeholder")),{inputType:"textarea"})),a+=1;continue}if(d==="select"){let A=l2t(e,l);if(A.length===0)return null;o.push(G7("jetpack/field-select",_D(e,i,l,d2t(e,l),A),{inputType:"dropdown"})),a+=1;continue}if(d!=="input")return null;let p=WI(f);if(p==="radio"){let A=(f.attr("name")??"").trim(),g=A?`name:${A}`:`node:${s.fields.indexOf(l)}`;if(c.has(g))continue;let m=c2t(e,i,l);if(!m)return null;c.add(g),o.push(p2t("jetpack/field-radio",m,"radio")),a+=1;continue}if(p==="checkbox"){let A=_D(e,i,l),g=g2t(e,l,A.label)?"jetpack/field-consent":"jetpack/field-checkbox";o.push(h2t(g,A)),a+=1;continue}let h=a2t(e,l);if(!h)return null;o.push(G7(h,_D(e,i,l,f.attr("placeholder")),{inputBlockName:h==="jetpack/field-telephone"?"jetpack/phone-input":"jetpack/input",inputType:h==="jetpack/field-telephone"?void 0:p})),a+=1}return a===0?null:(u&&o.push(f2t(e,u)),{markup:`
${o.join(` `)}
-`,fieldCount:a})}var NTt="input, select, textarea",MTt="button, input, select, textarea",PTt=new Set(["hidden"]);function LTt(e,t){if((t.tagName?.toLowerCase()??"")==="form")return t;let n=e(t).find("form").toArray();if(n.length!==1)return null;let[i]=n;return FTt(e,t,i)?e(t).find(MTt).toArray().some(o=>!x_e(e,o,i))?null:i:null}function FTt(e,t,r){if(w_e(t))return!1;let n=e(t).clone();return n.find("form").remove(),Bs(n.text())?!1:n.find("*").toArray().every(i=>{let s=e(i),o=i.tagName?.toLowerCase()??"",a=i.attribs??{};return o==="img"||o==="picture"||o==="svg"||o==="video"||o==="canvas"||w_e(i)||a.src||a.href||a.role||a["aria-label"]?!1:s.children().length===0&&!Bs(s.text())})}function w_e(e){return Object.keys(e.attribs??{}).some(t=>t!=="data-astro-cid")}function OTt(e,t){let r=[],n=new Map,i=!1;for(let s of e(t).find(NTt).toArray()){if(!Se(s))continue;let o=s,a=o.tagName.toLowerCase(),c=e(o);if(a==="input"){let u=jI(c);if(PTt.has(u)||$Tt(u))continue;if(u==="checkbox"){let l=(c.attr("name")??"").trim();l&&n.set(l,(n.get(l)??0)+1)}if(!HTt(u)){i=!0;continue}}r.push(o)}for(let s of r){let o=e(s);if(s.tagName.toLowerCase()==="input"&&jI(o)==="checkbox"){let a=(o.attr("name")??"").trim();a&&(n.get(a)??0)>1&&(i=!0)}}for(let s of e(t).find("button").toArray())Se(s)&&(e(s).attr("type")??"submit").trim().toLowerCase()!=="submit"&&(i=!0);return{fields:r,unsupported:i}}function UTt(e,t){for(let r of e(t).find("button, input").toArray()){if(!Se(r))continue;let n=r,i=n.tagName.toLowerCase(),s=e(n);if(i==="button"&&(s.attr("type")??"submit").toLowerCase()==="submit"||i==="input"&&jI(s)==="submit")return n}return null}function jI(e){return(e.attr("type")??"text").trim().toLowerCase()}function $Tt(e){return e==="submit"}function HTt(e){return["text","email","tel","url","checkbox","radio"].includes(e)}function jTt(e,t){let r=e(t);switch(jI(r)){case"text":return ZTt(e,t)?"jetpack/field-name":"jetpack/field-text";case"email":return"jetpack/field-email";case"tel":return"jetpack/field-telephone";case"url":return"jetpack/field-url";default:return null}}function ID(e,t,r,n,i){let s={},o=vD(e,t,r);o&&(s.label=o),U7(e,r)&&(s.required=!0);let a=Bs(n??"");return a&&(s.placeholder=a),i&&i.length>0&&(s.options=i),s}function qTt(e,t,r){let i=(e(r).attr("name")??"").trim(),s=i?XTt(e(t).find('input[type="radio"]').toArray(),e,"name",i):[r],o=s.filter(u=>!e(u).attr("disabled")).map(u=>vD(e,t,u)||Bs(e(u).attr("value")??"")).filter(Boolean);if(o.length===0)return null;let a={options:o},c=zTt(e,t,s)||e2t(i);return c&&(a.label=c),s.some(u=>U7(e,u))&&(a.required=!0),a}function zTt(e,t,r){let n=e(r[0]).closest("fieldset").get(0);if(n&&r.every(i=>x_e(e,i,n))){let i=Bs(e(n).children("legend").first().text());if(i)return i}return vD(e,t,r[0])}function VTt(e,t){return e(t).children("option").toArray().filter((r,n)=>!S_e(e,r,n)).map(r=>Bs(e(r).text())||Bs(e(r).attr("value")??"")).filter(Boolean)}function GTt(e,t){let r=e(t).children("option").first().get(0);return r&&S_e(e,r,0)?Bs(e(r).text()):""}function S_e(e,t,r){let n=e(t);if(n.attr("disabled")===void 0)return!1;let i=Bs(n.attr("value")??"");return r===0||i===""||n.attr("selected")!==void 0}function WTt(e,t){let r=e(t),n=t.tagName.toLowerCase(),i=Bs(n==="input"?r.attr("value")??r.attr("aria-label")??"Submit":r.text()||r.attr("aria-label")||"Submit");return qI("jetpack/button",{element:"button",text:i||"Submit"})}function F7(e,t,r){let n=SD(t),i=r.inputBlockName??(r.inputType?"jetpack/input":void 0),s=[v_e(t),i?qI(i,{placeholder:t.placeholder,type:r.inputType}):""].filter(Boolean).join(` +`,fieldCount:a})}var KTt="input, select, textarea",XTt="button, input, select, textarea",e2t=new Set(["hidden"]);function t2t(e,t){if((t.tagName?.toLowerCase()??"")==="form")return t;let n=e(t).find("form").toArray();if(n.length!==1)return null;let[i]=n;return r2t(e,t,i)?e(t).find(XTt).toArray().some(o=>!P_e(e,o,i))?null:i:null}function r2t(e,t,r){if(Q_e(t))return!1;let n=e(t).clone();return n.find("form").remove(),Bs(n.text())?!1:n.find("*").toArray().every(i=>{let s=e(i),o=i.tagName?.toLowerCase()??"",a=i.attribs??{};return o==="img"||o==="picture"||o==="svg"||o==="video"||o==="canvas"||Q_e(i)||a.src||a.href||a.role||a["aria-label"]?!1:s.children().length===0&&!Bs(s.text())})}function Q_e(e){return Object.keys(e.attribs??{}).some(t=>t!=="data-astro-cid")}function n2t(e,t){let r=[],n=new Map,i=!1;for(let s of e(t).find(KTt).toArray()){if(!Se(s))continue;let o=s,a=o.tagName.toLowerCase(),c=e(o);if(a==="input"){let u=WI(c);if(e2t.has(u)||s2t(u))continue;if(u==="checkbox"){let l=(c.attr("name")??"").trim();l&&n.set(l,(n.get(l)??0)+1)}if(!o2t(u)){i=!0;continue}}r.push(o)}for(let s of r){let o=e(s);if(s.tagName.toLowerCase()==="input"&&WI(o)==="checkbox"){let a=(o.attr("name")??"").trim();a&&(n.get(a)??0)>1&&(i=!0)}}for(let s of e(t).find("button").toArray())Se(s)&&(e(s).attr("type")??"submit").trim().toLowerCase()!=="submit"&&(i=!0);return{fields:r,unsupported:i}}function i2t(e,t){for(let r of e(t).find("button, input").toArray()){if(!Se(r))continue;let n=r,i=n.tagName.toLowerCase(),s=e(n);if(i==="button"&&(s.attr("type")??"submit").toLowerCase()==="submit"||i==="input"&&WI(s)==="submit")return n}return null}function WI(e){return(e.attr("type")??"text").trim().toLowerCase()}function s2t(e){return e==="submit"}function o2t(e){return["text","email","tel","url","checkbox","radio"].includes(e)}function a2t(e,t){let r=e(t);switch(WI(r)){case"text":return A2t(e,t)?"jetpack/field-name":"jetpack/field-text";case"email":return"jetpack/field-email";case"tel":return"jetpack/field-telephone";case"url":return"jetpack/field-url";default:return null}}function _D(e,t,r,n,i){let s={},o=RD(e,t,r);o&&(s.label=o),Y7(e,r)&&(s.required=!0);let a=Bs(n??"");return a&&(s.placeholder=a),i&&i.length>0&&(s.options=i),s}function c2t(e,t,r){let i=(e(r).attr("name")??"").trim(),s=i?m2t(e(t).find('input[type="radio"]').toArray(),e,"name",i):[r],o=s.filter(u=>!e(u).attr("disabled")).map(u=>RD(e,t,u)||Bs(e(u).attr("value")??"")).filter(Boolean);if(o.length===0)return null;let a={options:o},c=u2t(e,t,s)||y2t(i);return c&&(a.label=c),s.some(u=>Y7(e,u))&&(a.required=!0),a}function u2t(e,t,r){let n=e(r[0]).closest("fieldset").get(0);if(n&&r.every(i=>P_e(e,i,n))){let i=Bs(e(n).children("legend").first().text());if(i)return i}return RD(e,t,r[0])}function l2t(e,t){return e(t).children("option").toArray().filter((r,n)=>!N_e(e,r,n)).map(r=>Bs(e(r).text())||Bs(e(r).attr("value")??"")).filter(Boolean)}function d2t(e,t){let r=e(t).children("option").first().get(0);return r&&N_e(e,r,0)?Bs(e(r).text()):""}function N_e(e,t,r){let n=e(t);if(n.attr("disabled")===void 0)return!1;let i=Bs(n.attr("value")??"");return r===0||i===""||n.attr("selected")!==void 0}function f2t(e,t){let r=e(t),n=t.tagName.toLowerCase(),i=Bs(n==="input"?r.attr("value")??r.attr("aria-label")??"Submit":r.text()||r.attr("aria-label")||"Submit");return YI("jetpack/button",{element:"button",text:i||"Submit"})}function G7(e,t,r){let n=TD(t),i=r.inputBlockName??(r.inputType?"jetpack/input":void 0),s=[M_e(t),i?YI(i,{placeholder:t.placeholder,type:r.inputType}):""].filter(Boolean).join(` `);return`
${s}
-`}function YTt(e,t,r){let n=SD(t),i=(t.options??[]).map(o=>qI("jetpack/option",{label:o})).join(` -`),s=[v_e(t),` +`}function p2t(e,t,r){let n=TD(t),i=(t.options??[]).map(o=>YI("jetpack/option",{label:o})).join(` +`),s=[M_e(t),`
    ${i}
@@ -1741,70 +1741,70 @@ ${i}
${s}
-`}function JTt(e,t){let r=e==="jetpack/field-consent"?{...t,consentType:"explicit",explicitConsentMessage:t.label}:t,n=SD(r),i={label:t.label},s=e==="jetpack/field-consent"?{...i,hideInput:!1,isStandalone:!0}:{...i,isStandalone:!0};return` +`}function h2t(e,t){let r=e==="jetpack/field-consent"?{...t,consentType:"explicit",explicitConsentMessage:t.label}:t,n=TD(r),i={label:t.label},s=e==="jetpack/field-consent"?{...i,hideInput:!1,isStandalone:!0}:{...i,isStandalone:!0};return`
-${qI("jetpack/option",s)} +${YI("jetpack/option",s)}
-`}function v_e(e){return e.label?qI("jetpack/label",{label:e.label,requiredText:e.required?"*":void 0}):""}function qI(e,t){let r=SD(t);return``}function SD(e){let t={};return e.label&&(t.label=e.label),e.required&&(t.required=!0),e.placeholder&&(t.placeholder=e.placeholder),e.options&&e.options.length>0&&(t.options=e.options),e.consentType&&(t.consentType=e.consentType),e.explicitConsentMessage&&(t.explicitConsentMessage=e.explicitConsentMessage),e.element&&(t.element=e.element),e.text&&(t.text=e.text),"type"in e&&typeof e.type=="string"&&e.type&&(t.type=e.type),"requiredText"in e&&typeof e.requiredText=="string"&&e.requiredText&&(t.requiredText=e.requiredText),"isStandalone"in e&&typeof e.isStandalone=="boolean"&&(t.isStandalone=e.isStandalone),"hideInput"in e&&typeof e.hideInput=="boolean"&&(t.hideInput=e.hideInput),Object.keys(t).length===0?"":` ${JSON.stringify(t).replace(/--/g,"\\u002d\\u002d")}`}function vD(e,t,r){let n=e(r),i=(n.attr("id")??"").trim();if(i){let c=e(t).find("label").toArray().find(l=>(e(l).attr("for")??"")===i),u=c?I_e(e,c):"";if(u)return u}let s=n.closest("label").get(0);if(s){let c=I_e(e,s);if(c)return c}let o=n.prevAll("label").first();if(o.length>0){let c=Bs(o.text());if(c)return c}let a=Bs(n.attr("aria-label")??"");return a||""}function I_e(e,t){let r=e(t).clone();return r.find("input, select, textarea, button").remove(),Bs(r.text())}function U7(e,t){let r=e(t);return r.attr("required")!==void 0||(r.attr("aria-required")??"").toLowerCase()==="true"}function ZTt(e,t){let r=e(t),n=[r.attr("autocomplete")??"",r.attr("id")??"",r.attr("name")??"",vD(e,e(t).closest("form").get(0),t)].join(" ").toLowerCase();return/(^|[^a-z0-9])(given-name|family-name|additional-name|honorific-prefix|honorific-suffix|name)([^a-z0-9]|$)/.test(n)}function KTt(e,t,r){if(!U7(e,t))return!1;let n=e(t),i=[r??"",n.attr("id")??"",n.attr("name")??""].join(" ").toLowerCase();return/\b(consent|terms?|privacy|agree|agreement|permission)\b/.test(i)}function x_e(e,t,r){return t===r||e(t).parents().toArray().includes(r)}function XTt(e,t,r,n){return e.filter(i=>(t(i).attr(r)??"")===n)}function e2t(e){return Bs(e.replace(/[_-]+/g," "))}function Bs(e){return e.replace(/\s+/g," ").trim()}function fl(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d")}function __e(e){return(e.attr("class")??"").split(/\s+/).filter(Boolean).join(" ")}function _o(e,t){let r=t?[...e,`"className":${fl(t)}`]:e;return r.length?` {${r.join(",")}}`:""}function sf(e,t){let r=__e(e),n=t.classFor(e.attr("style"));return[r,n].filter(Boolean).join(" ")}function zI(e){return e?` +`}function M_e(e){return e.label?YI("jetpack/label",{label:e.label,requiredText:e.required?"*":void 0}):""}function YI(e,t){let r=TD(t);return``}function TD(e){let t={};return e.label&&(t.label=e.label),e.required&&(t.required=!0),e.placeholder&&(t.placeholder=e.placeholder),e.options&&e.options.length>0&&(t.options=e.options),e.consentType&&(t.consentType=e.consentType),e.explicitConsentMessage&&(t.explicitConsentMessage=e.explicitConsentMessage),e.element&&(t.element=e.element),e.text&&(t.text=e.text),"type"in e&&typeof e.type=="string"&&e.type&&(t.type=e.type),"requiredText"in e&&typeof e.requiredText=="string"&&e.requiredText&&(t.requiredText=e.requiredText),"isStandalone"in e&&typeof e.isStandalone=="boolean"&&(t.isStandalone=e.isStandalone),"hideInput"in e&&typeof e.hideInput=="boolean"&&(t.hideInput=e.hideInput),Object.keys(t).length===0?"":` ${JSON.stringify(t).replace(/--/g,"\\u002d\\u002d")}`}function RD(e,t,r){let n=e(r),i=(n.attr("id")??"").trim();if(i){let c=e(t).find("label").toArray().find(l=>(e(l).attr("for")??"")===i),u=c?D_e(e,c):"";if(u)return u}let s=n.closest("label").get(0);if(s){let c=D_e(e,s);if(c)return c}let o=n.prevAll("label").first();if(o.length>0){let c=Bs(o.text());if(c)return c}let a=Bs(n.attr("aria-label")??"");return a||""}function D_e(e,t){let r=e(t).clone();return r.find("input, select, textarea, button").remove(),Bs(r.text())}function Y7(e,t){let r=e(t);return r.attr("required")!==void 0||(r.attr("aria-required")??"").toLowerCase()==="true"}function A2t(e,t){let r=e(t),n=[r.attr("autocomplete")??"",r.attr("id")??"",r.attr("name")??"",RD(e,e(t).closest("form").get(0),t)].join(" ").toLowerCase();return/(^|[^a-z0-9])(given-name|family-name|additional-name|honorific-prefix|honorific-suffix|name)([^a-z0-9]|$)/.test(n)}function g2t(e,t,r){if(!Y7(e,t))return!1;let n=e(t),i=[r??"",n.attr("id")??"",n.attr("name")??""].join(" ").toLowerCase();return/\b(consent|terms?|privacy|agree|agreement|permission)\b/.test(i)}function P_e(e,t,r){return t===r||e(t).parents().toArray().includes(r)}function m2t(e,t,r,n){return e.filter(i=>(t(i).attr(r)??"")===n)}function y2t(e){return Bs(e.replace(/[_-]+/g," "))}function Bs(e){return e.replace(/\s+/g," ").trim()}function Al(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d")}function O_e(e){return(e.attr("class")??"").split(/\s+/).filter(Boolean).join(" ")}function To(e,t){let r=t?[...e,`"className":${Al(t)}`]:e;return r.length?` {${r.join(",")}}`:""}function lf(e,t){let r=O_e(e),n=t.classFor(e.attr("style"));return[r,n].filter(Boolean).join(" ")}function JI(e){return e?` ${e} -`:""}var t2t=/^h([1-6])$/,$7=new Set(["a","strong","em","b","i","br","span"]);function of(e,t){let r="";for(let n of e(t).contents().get())if(en(n))r+=kt(n.data);else if(Se(n)){let i=n.tagName?.toLowerCase()??"";if(i==="br"){r+="
";continue}let s=(e(n).attr("class")??"").trim(),o=(e(n).attr("style")??"").trim();if($7.has(i)){let a=of(e,n),c=s?` class="${kt(s)}"`:"";if(i==="a"){let u=kt(e(n).attr("href")??"");r+=`${a}`}else{let u=o?` style="${kt(o)}"`:"";r+=`<${i}${c}${u}>${a}`}}else r+=of(e,n)}return r}function B_e(e,t,r){let n=kt(e(t).attr("src")??""),i=kt(e(t).attr("alt")??""),s=sf(e(t),r),o=_o([],s),a=["wp-block-image",s].filter(Boolean).join(" ");return` -
${i}
-`}function VI(e){return` +`:""}var b2t=/^h([1-6])$/,J7=new Set(["a","strong","em","b","i","br","span"]);function df(e,t){let r="";for(let n of e(t).contents().get())if(rn(n))r+=Qt(n.data);else if(Se(n)){let i=n.tagName?.toLowerCase()??"";if(i==="br"){r+="
";continue}let s=(e(n).attr("class")??"").trim(),o=(e(n).attr("style")??"").trim();if(J7.has(i)){let a=df(e,n),c=s?` class="${Qt(s)}"`:"";if(i==="a"){let u=Qt(e(n).attr("href")??"");r+=`${a}`}else{let u=o?` style="${Qt(o)}"`:"";r+=`<${i}${c}${u}>${a}`}}else r+=df(e,n)}return r}function L_e(e,t,r){let n=Qt(e(t).attr("src")??""),i=Qt(e(t).attr("alt")??""),s=lf(e(t),r),o=To([],s),a=["wp-block-image",s].filter(Boolean).join(" ");return` +
${i}
+`}function ZI(e){return`

${e}

-`}function r2t(e,t,r){let n=e(t),i=sf(n,r),s=_o([],i),o=i?` class="${kt(i)}"`:"",a=n.children("ul, ol").toArray();if(a.length===0)return` -${of(e,t).trim()} -`;let c=n.clone();c.children("ul, ol").remove(),c.find("button svg").remove();let u=c.get(0),l=u&&Se(u)?of(e,u).trim():"",d=a.map(p=>T_e(e,p,r)).join(` +`}function E2t(e,t,r){let n=e(t),i=lf(n,r),s=To([],i),o=i?` class="${Qt(i)}"`:"",a=n.children("ul, ol").toArray();if(a.length===0)return` +${df(e,t).trim()} +`;let c=n.clone();c.children("ul, ol").remove(),c.find("button svg").remove();let u=c.get(0),l=u&&Se(u)?df(e,u).trim():"",d=a.map(p=>U_e(e,p,r)).join(` `),f=[l,d].filter(Boolean).join(` `);return` ${f} -`}function T_e(e,t,r){let n=t.tagName?.toLowerCase()??"",i=e(t),s=i.children("li").map((d,f)=>r2t(e,f,r)).get().join(` -`),o=sf(i,r),c=_o(n==="ol"?['"ordered":true']:[],o),u=n==="ol"?"ol":"ul",l=["wp-block-list",o].filter(Boolean).join(" ");return` -<${u} class="${kt(l)}">${s} -`}var n2t=new Set(["button","input","select","textarea","svg"]);function i2t(e,t){let r=t.tagName?.toLowerCase()??"";return n2t.has(r)?!0:e(t).find("button, input, select, textarea, svg").length>0}var s2t=/\b(button|btn)\b/i;function k_e(e,t){return(t.tagName??"").toLowerCase()!=="a"?!1:s2t.test(e(t).attr("class")??"")}function o2t(e,t){let r=e(t);return r.attr("id")||!(r.attr("class")??"").trim()?!1:r.children().length===0&&!r.text().trim()}function a2t(e,t){return e(t).find("[id]").toArray().some(r=>{let n=e(r);return n.children().length===0&&!n.text().trim()})}function c2t(e,t,r){return(t.tagName??"").toLowerCase()==="form"?!1:e(t).find("form").toArray().some(n=>O7(e,n,r)!==null)}function R_e(e,t,r,n={}){let i=t.tagName?.toLowerCase()??"",s=e(t);if(n.jetpackForms){let p=O7(e,t,r);if(p)return n.onJetpackForm?.(p.fieldCount),{markup:p.markup,clean:!0}}let o=n.jetpackForms&&c2t(e,t,r);if(n.verbatimInteractive&&!o&&!a2t(e,t)&&(i2t(e,t)||o2t(e,t)))return{markup:zI((e.html(t)??"").trim()),clean:!0};let a=t2t.exec(i);if(a){let p=Number(a[1]),h=sf(s,r),A=_o(p===2?[]:[`"level":${p}`],h),g=["wp-block-heading",h].filter(Boolean).join(" "),m=of(e,t).trim();return{markup:` -${m} -`,clean:!0}}if(i==="p"){let p=sf(s,r),h=_o([],p),A=of(e,t).trim(),m=``;return{markup:` +`}function U_e(e,t,r){let n=t.tagName?.toLowerCase()??"",i=e(t),s=i.children("li").map((d,f)=>E2t(e,f,r)).get().join(` +`),o=lf(i,r),c=To(n==="ol"?['"ordered":true']:[],o),u=n==="ol"?"ol":"ul",l=["wp-block-list",o].filter(Boolean).join(" ");return` +<${u} class="${Qt(l)}">${s} +`}var C2t=new Set(["button","input","select","textarea","svg"]);function w2t(e,t){let r=t.tagName?.toLowerCase()??"";return C2t.has(r)?!0:e(t).find("button, input, select, textarea, svg").length>0}var I2t=/\b(button|btn)\b/i;function F_e(e,t){return(t.tagName??"").toLowerCase()!=="a"?!1:I2t.test(e(t).attr("class")??"")}function S2t(e,t){let r=e(t);return r.attr("id")||!(r.attr("class")??"").trim()?!1:r.children().length===0&&!r.text().trim()}function v2t(e,t){return e(t).find("[id]").toArray().some(r=>{let n=e(r);return n.children().length===0&&!n.text().trim()})}function x2t(e,t,r){return(t.tagName??"").toLowerCase()==="form"?!1:e(t).find("form").toArray().some(n=>W7(e,n,r)!==null)}function $_e(e,t,r,n={}){let i=t.tagName?.toLowerCase()??"",s=e(t);if(n.jetpackForms){let p=W7(e,t,r);if(p)return n.onJetpackForm?.(p.fieldCount),{markup:p.markup,clean:!0}}let o=n.jetpackForms&&x2t(e,t,r);if(n.verbatimInteractive&&!o&&!v2t(e,t)&&(w2t(e,t)||S2t(e,t)))return{markup:JI((e.html(t)??"").trim()),clean:!0};let a=b2t.exec(i);if(a){let p=Number(a[1]),h=lf(s,r),A=To(p===2?[]:[`"level":${p}`],h),g=["wp-block-heading",h].filter(Boolean).join(" "),m=df(e,t).trim();return{markup:` +${m} +`,clean:!0}}if(i==="p"){let p=lf(s,r),h=To([],p),A=df(e,t).trim(),m=``;return{markup:` ${m}${A}

-`,clean:!0}}if(i==="img")return{markup:B_e(e,t,r),clean:!0};if(i==="a"&&k_e(e,t)){let p=kt(s.attr("href")??""),h=kt(s.text().trim()),A=sf(s,r),g=[A,"lib-cta"].filter(Boolean).join(" "),m=_o([],g),b=["wp-block-button",g].filter(Boolean).join(" "),E=["wp-block-button__link","wp-element-button",A].filter(Boolean).join(" ");return{markup:` +`,clean:!0}}if(i==="img")return{markup:L_e(e,t,r),clean:!0};if(i==="a"&&F_e(e,t)){let p=Qt(s.attr("href")??""),h=Qt(s.text().trim()),A=lf(s,r),g=[A,"lib-cta"].filter(Boolean).join(" "),m=To([],g),b=["wp-block-button",g].filter(Boolean).join(" "),C=["wp-block-button__link","wp-element-button",A].filter(Boolean).join(" ");return{markup:` -`,clean:!0}}if(i==="ul"||i==="ol")return{markup:T_e(e,t,r),clean:!0};if(i==="table"){let p=__e(s),h=_=>`${e(_).children("th, td").map((k,v)=>{let M=v.tagName?.toLowerCase()==="th"?"th":"td";return`<${M}>${kt(e(v).text().trim())}`}).get().join("")}`,A=s.find("thead tr").map((_,N)=>h(N)).get(),g=s.find("tbody tr").toArray();if(g.length===0&&(g=s.find("tr").toArray()),A.length===0&&g.length>0){let _=g[0];e(_).children("td").length===0&&e(_).children("th").length>0&&(A.push(h(_)),g=g.slice(1))}let m=g.map(_=>h(_)),b=_o([],p),E=p,C=E?` class="${kt(E)}"`:"",w=A.length?`${A.join("")}`:"",T=`${m.join("")}`;return{markup:` -${w}${T}
-`,clean:!0}}let c=s.attr("id"),u=s.children().toArray();if(c||u.length>0){let p=_=>{let N=(_.tagName??"").toLowerCase();return $7.has(N)?e(_).find("*").toArray().every(k=>$7.has((k.tagName??"").toLowerCase())):!1},h=u.length>0&&u.every(_=>p(_)),A=u.length>0&&u.every(_=>k_e(e,_)),g,m;if(h&&!A)g=zI(of(e,t).trim()),m=!0;else{let _=u.map(M=>R_e(e,M,r,n)),N=_.map(M=>M.markup).filter(Boolean).join(` -`),k=s.clone().children().remove().end().text().trim(),v=k&&_.length===0?VI(kt(k)):"";g=[N,v].filter(Boolean).join(` -`),m=_.every(M=>M.clean)&&!(k&&_.length>0)}let b=sf(s,r),E=['"tagName":"div"'];c&&E.unshift(`"anchor":${fl(c)}`);let C=_o(E,b),w=["wp-block-group",b].filter(Boolean).join(" "),T=c?` id="${kt(c)}"`:"";return{markup:` -${g?` +`,clean:!0}}if(i==="ul"||i==="ol")return{markup:U_e(e,t,r),clean:!0};if(i==="table"){let p=O_e(s),h=_=>`${e(_).children("th, td").map((k,v)=>{let M=v.tagName?.toLowerCase()==="th"?"th":"td";return`<${M}>${Qt(e(v).text().trim())}`}).get().join("")}`,A=s.find("thead tr").map((_,D)=>h(D)).get(),g=s.find("tbody tr").toArray();if(g.length===0&&(g=s.find("tr").toArray()),A.length===0&&g.length>0){let _=g[0];e(_).children("td").length===0&&e(_).children("th").length>0&&(A.push(h(_)),g=g.slice(1))}let m=g.map(_=>h(_)),b=To([],p),C=p,E=C?` class="${Qt(C)}"`:"",w=A.length?`${A.join("")}`:"",T=`${m.join("")}`;return{markup:` +${w}${T}
+`,clean:!0}}let c=s.attr("id"),u=s.children().toArray();if(c||u.length>0){let p=_=>{let D=(_.tagName??"").toLowerCase();return J7.has(D)?e(_).find("*").toArray().every(k=>J7.has((k.tagName??"").toLowerCase())):!1},h=u.length>0&&u.every(_=>p(_)),A=u.length>0&&u.every(_=>F_e(e,_)),g,m;if(h&&!A)g=JI(df(e,t).trim()),m=!0;else{let _=u.map(M=>$_e(e,M,r,n)),D=_.map(M=>M.markup).filter(Boolean).join(` +`),k=s.clone().children().remove().end().text().trim(),v=k&&_.length===0?ZI(Qt(k)):"";g=[D,v].filter(Boolean).join(` +`),m=_.every(M=>M.clean)&&!(k&&_.length>0)}let b=lf(s,r),C=['"tagName":"div"'];c&&C.unshift(`"anchor":${Al(c)}`);let E=To(C,b),w=["wp-block-group",b].filter(Boolean).join(" "),T=c?` id="${Qt(c)}"`:"";return{markup:` +${g?` ${g} `:""} -`,clean:m}}let l=s.find("img");if(l.length>0){let p=l.map((g,m)=>B_e(e,m,r)).get().join(` -`),h=kt(s.text().trim()),A=h?` -${VI(h)}`:"";return{markup:p+A,clean:!1}}let d=s.text().trim();if(i==="div"||i==="span"){if(d){let h=sf(s,r),A=_o([],h),g=h?` class="${kt(h)}"`:"";return{markup:` -${of(e,t).trim()}

-`,clean:!0}}let p=(s.attr("class")??"").trim()?(e.html(t)??"").trim():"";return p?{markup:zI(p),clean:!0}:{markup:VI(kt(d)),clean:!1}}let f=(e.html(t)??"").trim();return f?{markup:zI(f),clean:!0}:{markup:VI(kt(d)),clean:!1}}function u2t(e){return e.replace(//g,"")}function l2t(e,t,r){let n=(e.classes??[]).join(" "),i=[`"anchor":${fl(e.id)}`],s=[];(t.kind==="tabs"||t.kind==="slider")&&(i.push(`"activeClass":${fl(t.activeClass)}`),s.push(`"activeClass":${fl(t.activeClass)}`),t.kind==="slider"&&t.intervalMs&&(i.push(`"intervalMs":${JSON.stringify(t.intervalMs)}`),s.push(`"intervalMs":${JSON.stringify(t.intervalMs)}`)));let o=_o(i,n),a=s.length?`{${s.join(",")}}`.replace(/'/g,"\\u0027"):"",c=a?` data-wp-context='${a}'`:"",u=[`wp-block-dla-${t.kind}`,n].filter(Boolean).join(" ");return` -
${r}
-`}function Q_e(e,t={}){let r=t.instanceStyles??new D0,n=de(e.html),i=0,s=n("section, article, main, div").first(),o=s.length?s:n("body");if(e.behavior&&e.behavior.kind!=="reveal"){let _=u2t(o.html()??"");if((t.behaviorWrapper??"dla")==="group"){let N=(e.classes??[]).join(" "),k=_o([`"anchor":${fl(e.id)}`,'"tagName":"section"'],N),v=["wp-block-group",N].filter(Boolean).join(" "),M=zI(_);return{markup:` -
${M?` +`,clean:m}}let l=s.find("img");if(l.length>0){let p=l.map((g,m)=>L_e(e,m,r)).get().join(` +`),h=Qt(s.text().trim()),A=h?` +${ZI(h)}`:"";return{markup:p+A,clean:!1}}let d=s.text().trim();if(i==="div"||i==="span"){if(d){let h=lf(s,r),A=To([],h),g=h?` class="${Qt(h)}"`:"";return{markup:` +${df(e,t).trim()}

+`,clean:!0}}let p=(s.attr("class")??"").trim()?(e.html(t)??"").trim():"";return p?{markup:JI(p),clean:!0}:{markup:ZI(Qt(d)),clean:!1}}let f=(e.html(t)??"").trim();return f?{markup:JI(f),clean:!0}:{markup:ZI(Qt(d)),clean:!1}}function B2t(e){return e.replace(//g,"")}function k2t(e,t,r){let n=(e.classes??[]).join(" "),i=[`"anchor":${Al(e.id)}`],s=[];(t.kind==="tabs"||t.kind==="slider")&&(i.push(`"activeClass":${Al(t.activeClass)}`),s.push(`"activeClass":${Al(t.activeClass)}`),t.kind==="slider"&&t.intervalMs&&(i.push(`"intervalMs":${JSON.stringify(t.intervalMs)}`),s.push(`"intervalMs":${JSON.stringify(t.intervalMs)}`)));let o=To(i,n),a=s.length?`{${s.join(",")}}`.replace(/'/g,"\\u0027"):"",c=a?` data-wp-context='${a}'`:"",u=[`wp-block-dla-${t.kind}`,n].filter(Boolean).join(" ");return` +
${r}
+`}function H_e(e,t={}){let r=t.instanceStyles??new L0,n=de(e.html),i=0,s=n("section, article, main, div").first(),o=s.length?s:n("body");if(e.behavior&&e.behavior.kind!=="reveal"){let _=B2t(o.html()??"");if((t.behaviorWrapper??"dla")==="group"){let D=(e.classes??[]).join(" "),k=To([`"anchor":${Al(e.id)}`,'"tagName":"section"'],D),v=["wp-block-group",D].filter(Boolean).join(" "),M=JI(_);return{markup:` +
${M?` ${M} `:""}
-`,confidence:1,instanceStyles:r,formsConverted:i}}return{markup:l2t(e,e.behavior,_),confidence:1,instanceStyles:r,formsConverted:i}}let a={verbatimInteractive:t.verbatimInteractive??!1,jetpackForms:t.jetpackForms??!1,onJetpackForm:()=>{i+=1}},c=[],u=0,l=0;for(let _ of o.contents().get())if(Se(_)){l+=1;let N=R_e(n,_,r,a);N.clean||(u+=1),c.push(N.markup)}else if(en(_)){let N=_.data.trim();if(!N)continue;l+=1,c.push(VI(kt(N)))}let d=c.join(` -`),f=(e.classes??[]).join(" "),p=l===0?0:1-u/l;if(e.behavior?.kind==="reveal"){let _=e.behavior,N=[`"anchor":${fl(e.id)}`,`"threshold":${JSON.stringify(_.threshold)}`,`"translateY":${fl(_.translateY)}`,`"durationMs":${JSON.stringify(_.durationMs)}`],k=_o(N,f),v=`{"visible":false,"threshold":${JSON.stringify(_.threshold)}}`.replace(/--/g,"\\u002d\\u002d"),M=["wp-block-dla-reveal",f].filter(Boolean).join(" ");return{markup:` -
${d}
-`,confidence:p,instanceStyles:r,formsConverted:i}}let h=`"anchor":${fl(e.id)}`,A='"tagName":"section"',g=t.wrapper??"section",m=r.classFor(o.attr("style")),b=[f,m].filter(Boolean).join(" "),C=_o(g==="section"?[h,A]:[h],b),w=["wp-block-group",b].filter(Boolean).join(" ");return{markup:` -<${g} id="${kt(e.id)}" class="${kt(w)}">${d} -`,confidence:p,instanceStyles:r,formsConverted:i}}St();var d2t=new Set(["script","style","template","noscript"]),f2t=/"className"\s*:\s*"([^"]*)"/g;function D_e(e){let t=new Set,r=de(e);r("[class]").each((n,i)=>{let s=i;if(!d2t.has(s.tagName?.toLowerCase()??""))for(let o of(r(s).attr("class")??"").split(/\s+/))o&&t.add(o)});for(let n of e.matchAll(f2t))for(let i of n[1].split(/\s+/))i&&t.add(i);return t}function N_e(e,t){let r=D_e(t),n=new Set;for(let i of D_e(e))r.has(i)||n.add(i);return[...n].sort()}function M_e(e,t={}){let r=t.native===!0,n=t.pageSlugs?.length?wD(e.html,t.pageSlugs):e.html,i=Zu(n).filter(p=>p.role==="body").map(p=>{let h=t.detectSection?.(p);return h?{...p,behavior:h}:t.reveal?{...p,behavior:t.reveal}:p});if(i.length===0)return{postContent:"",report:[],formsConverted:0,contractIssues:[],stylingDrops:[]};let s={sections:[]},o={},a=[],c=[],u=0;for(let p of i){let{markup:h,confidence:A,formsConverted:g}=Q_e(p,{behaviorWrapper:r?"dla":"group",instanceStyles:t.instanceStyles,verbatimInteractive:t.verbatimInteractive,jetpackForms:t.jetpackForms});u+=g;let m=g>0?[]:N_e(p.html,h);m.length>0&&c.push({sectionId:p.id,droppedClasses:m}),s.sections.push({type:"content",slots:[p.id]}),o[p.id]=h;let b=p.behavior&&(r||p.behavior.kind==="reveal")?`dla/${p.behavior.kind}`:"group";a.push({sectionId:p.id,blockType:b,confidence:A})}let l=ED(s,o,{});if(l.misfit)throw new Error(`compose mismatch for "${e.slug}": ${JSON.stringify(l.sanity)}`);let d=l.postContent.split(` +`,confidence:1,instanceStyles:r,formsConverted:i}}return{markup:k2t(e,e.behavior,_),confidence:1,instanceStyles:r,formsConverted:i}}let a={verbatimInteractive:t.verbatimInteractive??!1,jetpackForms:t.jetpackForms??!1,onJetpackForm:()=>{i+=1}},c=[],u=0,l=0;for(let _ of o.contents().get())if(Se(_)){l+=1;let D=$_e(n,_,r,a);D.clean||(u+=1),c.push(D.markup)}else if(rn(_)){let D=_.data.trim();if(!D)continue;l+=1,c.push(ZI(Qt(D)))}let d=c.join(` +`),f=(e.classes??[]).join(" "),p=l===0?0:1-u/l;if(e.behavior?.kind==="reveal"){let _=e.behavior,D=[`"anchor":${Al(e.id)}`,`"threshold":${JSON.stringify(_.threshold)}`,`"translateY":${Al(_.translateY)}`,`"durationMs":${JSON.stringify(_.durationMs)}`],k=To(D,f),v=`{"visible":false,"threshold":${JSON.stringify(_.threshold)}}`.replace(/--/g,"\\u002d\\u002d"),M=["wp-block-dla-reveal",f].filter(Boolean).join(" ");return{markup:` +
${d}
+`,confidence:p,instanceStyles:r,formsConverted:i}}let h=`"anchor":${Al(e.id)}`,A='"tagName":"section"',g=t.wrapper??"section",m=r.classFor(o.attr("style")),b=[f,m].filter(Boolean).join(" "),E=To(g==="section"?[h,A]:[h],b),w=["wp-block-group",b].filter(Boolean).join(" ");return{markup:` +<${g} id="${Qt(e.id)}" class="${Qt(w)}">${d} +`,confidence:p,instanceStyles:r,formsConverted:i}}Bt();var _2t=new Set(["script","style","template","noscript"]),T2t=/"className"\s*:\s*"([^"]*)"/g;function j_e(e){let t=new Set,r=de(e);r("[class]").each((n,i)=>{let s=i;if(!_2t.has(s.tagName?.toLowerCase()??""))for(let o of(r(s).attr("class")??"").split(/\s+/))o&&t.add(o)});for(let n of e.matchAll(T2t))for(let i of n[1].split(/\s+/))i&&t.add(i);return t}function q_e(e,t){let r=j_e(t),n=new Set;for(let i of j_e(e))r.has(i)||n.add(i);return[...n].sort()}function z_e(e,t={}){let r=t.native===!0,n=t.pageSlugs?.length?kD(e.html,t.pageSlugs):e.html,i=Xu(n).filter(p=>p.role==="body").map(p=>{let h=t.detectSection?.(p);return h?{...p,behavior:h}:t.reveal?{...p,behavior:t.reveal}:p});if(i.length===0)return{postContent:"",report:[],formsConverted:0,contractIssues:[],stylingDrops:[]};let s={sections:[]},o={},a=[],c=[],u=0;for(let p of i){let{markup:h,confidence:A,formsConverted:g}=H_e(p,{behaviorWrapper:r?"dla":"group",instanceStyles:t.instanceStyles,verbatimInteractive:t.verbatimInteractive,jetpackForms:t.jetpackForms});u+=g;let m=g>0?[]:q_e(p.html,h);m.length>0&&c.push({sectionId:p.id,droppedClasses:m}),s.sections.push({type:"content",slots:[p.id]}),o[p.id]=h;let b=p.behavior&&(r||p.behavior.kind==="reveal")?`dla/${p.behavior.kind}`:"group";a.push({sectionId:p.id,blockType:b,confidence:A})}let l=xD(s,o,{});if(l.misfit)throw new Error(`compose mismatch for "${e.slug}": ${JSON.stringify(l.sanity)}`);let d=l.postContent.split(` `).filter(p=>!/^ +`}var JRt=uG(GRt(YRt(new URL("../src/lib/replicate/local-data/data-install.ts",import.meta.url).href)),"..","..","preview","scripts","install-data.php"),aG=".dla-scripts",vTe="/wordpress";function ZRt(e){return{cpt:e.cpt.slug,taxonomy:e.taxonomy.slug,fields:e.fields.map(t=>t.key),terms:e.taxonomy.terms.map(t=>({slug:t.slug,label:t.label})),items:e.items.map(t=>({id:t.id,title:t.title,content:t.content??"",terms:t.terms,meta:t.meta,gallery:t.gallery}))}}function KRt(e,t){let r=U0(e,"wp-content","mu-plugins");xTe(r,{recursive:!0});let n=ETe(t);cG(U0(r,n),bTe(t));let i=[n];if(t.card){let s=wTe(t);cG(U0(r,s),ITe(t)),i.push(s)}return i}var XRt=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".avif"]);function eQt(e,t){let r=uG(t),n=r.endsWith(STe)?r:`${r}${STe}`,i=new Set,s=[],o=a=>{let c=lG(a);if(!c||i.has(c))return;let u=uG(r,c);if(u.startsWith(n)&&XRt.has(WRt(u).toLowerCase())){try{if(!VRt(u).isFile())return}catch{return}i.add(c),s.push({relPath:c,absPath:u})}};for(let a of e.items){for(let c of Object.values(a.meta))typeof c=="string"&&o(c);for(let c of a.gallery??[])typeof c.url=="string"&&o(c.url)}return s}function lG(e){return e.replace(/^(?:\.\/)+/,"")}function tQt(e,t){if(t.size!==0)for(let r of e.items){for(let[n,i]of Object.entries(r.meta)){if(typeof i!="string")continue;let s=t.get(lG(i));s&&(r.meta[n]=s)}for(let n of r.gallery??[]){if(typeof n.url!="string")continue;let i=t.get(lG(n.url));i&&(n.url=i)}}}async function BTe(e){let{model:t,studioSitePath:r,wpRoot:n}=e,i=e.exec??ts,s=KRt(n,t),o=0,a=[];if(e.sourceDir){let m=eQt(t,e.sourceDir);if(m.length>0){let b=m.map(C=>({absPath:C.absPath,sourceUrl:C.relPath}));try{let C=await(e._installMedia??FEe)({files:b,wpRoot:n});o=C.installed.length,a.push(...C.errors),tQt(t,new Map(C.installed.map(E=>[E.sourceUrl,E.localUrl])))}catch(C){let E=C instanceof Error?C.message:String(C);a.push(...m.map(w=>({sourceUrl:w.relPath,error:E})))}}}let c=U0(r,aG);xTe(c,{recursive:!0}),zRt(JRt,U0(c,"install-data.php"));let u=`${vTe}/${aG}/install-data.php`,d=`install-data-${e.uniqueSuffix??`${Date.now()}-${Math.random().toString(36).slice(2,8)}`}.json`;cG(U0(c,d),JSON.stringify(ZRt(t)));let f=`${vTe}/${aG}/${d}`,{stdout:p}=await i(["wp","--path",r,"eval-file",u,f],{timeout:12e4,maxBuffer:10*1024*1024}),h=p.trim(),A=h.match(/\{[\s\S]*\}/);if(!A)throw new Error(`install-data.php produced no JSON result: ${h.slice(0,400)}`);let g=JSON.parse(A[0]);if(g.error)throw new Error(`install-data.php error: ${g.error}`);return{muPlugins:s,inserted:g.inserted??0,updated:g.updated??0,skippedModified:g.skippedModified??0,collisions:g.collisions??0,terms:g.terms??0,defaultsTrashed:g.defaultsTrashed??0,mediaInstalled:o,mediaErrors:a,raw:h}}var rQt="dla/data-card",nQt=100,iQt=1e5;function sQt(e){return e==="ASC"?"asc":"desc"}function fG(e){return Object.keys(e).length>0?` ${JSON.stringify(e)}`:""}function kTe(e){return e?`wp-block-group ${e}`:"wp-block-group"}function dG(e){let r={perPage:e.perPage===-1?nQt:e.perPage,pages:0,offset:e.offset,postType:e.postType,order:sQt(e.order),orderBy:e.orderBy??"date",inherit:!1},n={queryId:e.queryId,query:r};e.anchor&&(n.anchor=e.anchor);let i={};e.postTemplateClassName&&(i.className=e.postTemplateClassName),e.dlaTaxonomy&&e.dlaTermSlug&&(i.dlaTaxonomy=e.dlaTaxonomy,i.dlaTermSlug=e.dlaTermSlug);let s=e.anchor?` id="${e.anchor}"`:"",o=fG(i),a=e.variant?` ${JSON.stringify({variant:e.variant})}`:"";return`
- +
-`}function BD(e,t=0){let r=N0(e.selector);if(e.featured){let s={};r&&(s.anchor=r),s.tagName="div",e.wrapperClass&&(s.className=e.wrapperClass);let o=r?` id="${r}"`:"",a=yTe(e.wrapperClass),c={};e.featured.columnWrapperClass&&(c.className=e.featured.columnWrapperClass);let u=yTe(e.featured.columnWrapperClass),l=e.featured.termSlug&&e.featured.taxonomy?{dlaTermSlug:e.featured.termSlug,dlaTaxonomy:e.featured.taxonomy}:{},d=rG({perPage:e.featured.leadPerPage,offset:0,postType:e.query.postType,order:e.query.order,orderBy:e.query.orderBy,queryId:t,...l}),f=rG({perPage:e.featured.columnPerPage,offset:e.featured.leadPerPage,postType:e.query.postType,order:e.query.order,orderBy:e.query.orderBy,queryId:t+URt,variant:e.featured.variant,...l}),p=` +`}function DD(e,t=0){let r=F0(e.selector);if(e.featured){let s={};r&&(s.anchor=r),s.tagName="div",e.wrapperClass&&(s.className=e.wrapperClass);let o=r?` id="${r}"`:"",a=kTe(e.wrapperClass),c={};e.featured.columnWrapperClass&&(c.className=e.featured.columnWrapperClass);let u=kTe(e.featured.columnWrapperClass),l=e.featured.termSlug&&e.featured.taxonomy?{dlaTermSlug:e.featured.termSlug,dlaTaxonomy:e.featured.taxonomy}:{},d=dG({perPage:e.featured.leadPerPage,offset:0,postType:e.query.postType,order:e.query.order,orderBy:e.query.orderBy,queryId:t,...l}),f=dG({perPage:e.featured.columnPerPage,offset:e.featured.leadPerPage,postType:e.query.postType,order:e.query.order,orderBy:e.query.orderBy,queryId:t+iQt,variant:e.featured.variant,...l}),p=` ${d} - +
${f}
`,h=r?`#${r} .wp-block-query, #${r} .wp-block-post-template{display:contents} -#${r} .wp-block-post-template > li{display:contents}`:"";return{markup:p,css:h}}let n=rG({anchor:r,perPage:e.query.perPage,offset:0,postType:e.query.postType,order:e.query.order,orderBy:e.query.orderBy,queryId:t,postTemplateClassName:e.wrapperClass}),i=r?`#${r} .wp-block-post-template > li{display:contents}`:"";return{markup:n,css:i}}function bTe(e,t){let r=e,n=[],i=[],s=[];return t.forEach((o,a)=>{let c=N0(o.selector);if(!c){i.push(o.selector);return}let u=new RegExp(`\\s*
]*>\\s*
\\s*`);if(!u.test(r)){i.push(c);return}let l=BD(o,a);r=r.replace(u,()=>l.markup),n.push(c),l.css&&s.push(l.css)}),{markup:r,injected:n,missing:i,css:s.join(` -`)}}function ETe(e,t){let r=e,n=0;for(let i of t){let s=new RegExp(`(?(n+=1,`/* data-mount neutralized (WordPress-driven): ${i} */`))}return{js:r,removed:n}}var CTe=`/* dla: read a WordPress-driven card record from its DOM data island */ +#${r} .wp-block-post-template > li{display:contents}`:"";return{markup:p,css:h}}let n=dG({anchor:r,perPage:e.query.perPage,offset:0,postType:e.query.postType,order:e.query.order,orderBy:e.query.orderBy,queryId:t,postTemplateClassName:e.wrapperClass}),i=r?`#${r} .wp-block-post-template > li{display:contents}`:"";return{markup:n,css:i}}function _Te(e,t){let r=e,n=[],i=[],s=[];return t.forEach((o,a)=>{let c=F0(o.selector);if(!c){i.push(o.selector);return}let u=new RegExp(`\\s*
]*>\\s*
\\s*`);if(!u.test(r)){i.push(c);return}let l=DD(o,a);r=r.replace(u,()=>l.markup),n.push(c),l.css&&s.push(l.css)}),{markup:r,injected:n,missing:i,css:s.join(` +`)}}function TTe(e,t){let r=e,n=0;for(let i of t){let s=new RegExp(`(?(n+=1,`/* data-mount neutralized (WordPress-driven): ${i} */`))}return{js:r,removed:n}}var RTe=`/* dla: read a WordPress-driven card record from its DOM data island */ window.dlaItem = function (id) { var sel = '.dla-item[data-id="' + (window.CSS && CSS.escape ? CSS.escape(id) : id) + '"]'; var el = document.querySelector(sel); @@ -2131,11 +2131,11 @@ window.dlaItem = function (id) { } return d; } catch (e) { return null; } -};`;function wTe(e,t){let r=e,n=0;for(let i of t){let s=new RegExp(`${Uh(i)}\\.find\\(\\s*([\\w$]+)\\s*=>\\s*\\1\\.id\\s*===?\\s*((?:[^()]|\\([^()]*\\))+?)\\s*\\)`,"g");r=r.replace(s,(o,a,c)=>(n+=1,`window.dlaItem(${c.trim()})`))}return{js:r,rewritten:n}}ic();import{mkdirSync as HRt,writeFileSync as jRt,existsSync as qRt}from"node:fs";import{join as ITe}from"node:path";var STe="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36",zRt=new Set(["woff2","woff","ttf","otf","eot"]);function kD(e,t){let n=new RegExp(`${t}\\s*:\\s*([^;]+)`,"i").exec(e);return n?n[1].trim():null}function VRt(e){let t=e.split("?")[0].split("#")[0],r=t.lastIndexOf(".");if(r<0)return null;let n=t.slice(r+1).toLowerCase();return zRt.has(n)?n:null}function GRt(e){let t=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi,r=[],n;for(;(n=t.exec(e))!==null;){let i=n[2].trim(),s=VRt(i);s&&r.push({url:i,format:s})}return r.length===0?null:(r.sort((i,s)=>{let o=a=>a.format==="woff2"?0:a.format==="woff"?1:2;return o(i)-o(s)}),r[0])}function WRt(e){let t=e.trim().toLowerCase();if(t==="normal")return"400";if(t==="bold")return"700";let r=/\d{3}/.exec(t);return r?r[0]:"400"}function YRt(e){let t=(e??"").trim().toLowerCase();return t==="italic"?"italic":t.startsWith("oblique")?"oblique":"normal"}function JRt(e){let t=[],r=new Set,n=/@font-face\s*\{([^}]*)\}/gi,i;for(;(i=n.exec(e))!==null;){let s=i[1],o=kD(s,"font-family");if(!o)continue;let a=o.replace(/^["']|["']$/g,"").trim();if(!a)continue;let c=kD(s,"src");if(!c)continue;let u=GRt(c);if(!u)continue;let l=WRt(kD(s,"font-weight")??"400"),d=YRt(kD(s,"font-style")),f=`${a.toLowerCase()}|${l}|${d}|${u.url}`;r.has(f)||(r.add(f),t.push({family:a,src:u.url,format:u.format,weight:l,style:d}))}return t}function ZRt(e){let r=(e.src.split("?")[0].split("#")[0].split("/").pop()??"").replace(/[^A-Za-z0-9._-]+/g,"");if(r&&/\.[a-z0-9]+$/i.test(r))return r;let n=e.family.replace(/[^A-Za-z0-9]+/g,""),i=e.style==="italic"?"-italic":"",s=e.format==="woff"?"woff":"woff2";return`${n}-${e.weight}${i}.${s}`}async function vTe(e,t){let r=t.fetchImpl??fetch,n=t.fontsSubdir??"assets/fonts",i=ITe(t.themeDir,n),s=[],o=[],a=[],c=new Map;for(let u of e){let l;try{let f=await r(u,{headers:{"User-Agent":STe},signal:AbortSignal.timeout(t.timeoutMs??3e4)});if(!f.ok)throw new Error(`HTTP ${f.status}`);l=await f.text()}catch(f){o.push({url:u,error:`css fetch failed: ${f.message}`});continue}let d=l;for(let f of JRt(l))try{let p=c.get(f.src);if(!p){Xu(f.src);let A=ZRt(f);p=`${n}/${A}`;let g=ITe(i,A);if(!qRt(g)){let m=await r(f.src,{headers:{"User-Agent":STe},signal:AbortSignal.timeout(t.timeoutMs??3e4)});if(!m.ok)throw new Error(`HTTP ${m.status}`);HRt(i,{recursive:!0}),jRt(g,Buffer.from(await m.arrayBuffer()))}c.set(f.src,p),s.push({...f,localPath:p})}let h=p.replace(/^assets\//,"../");d=d.split(f.src).join(h)}catch(p){o.push({url:f.src,error:p.message})}a.push(d)}return{faces:s,localizedCss:a.join(` +};`;function QTe(e,t){let r=e,n=0;for(let i of t){let s=new RegExp(`${zh(i)}\\.find\\(\\s*([\\w$]+)\\s*=>\\s*\\1\\.id\\s*===?\\s*((?:[^()]|\\([^()]*\\))+?)\\s*\\)`,"g");r=r.replace(s,(o,a,c)=>(n+=1,`window.dlaItem(${c.trim()})`))}return{js:r,rewritten:n}}oc();import{mkdirSync as oQt,writeFileSync as aQt,existsSync as cQt}from"node:fs";import{join as DTe}from"node:path";var NTe="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36",uQt=new Set(["woff2","woff","ttf","otf","eot"]);function ND(e,t){let n=new RegExp(`${t}\\s*:\\s*([^;]+)`,"i").exec(e);return n?n[1].trim():null}function lQt(e){let t=e.split("?")[0].split("#")[0],r=t.lastIndexOf(".");if(r<0)return null;let n=t.slice(r+1).toLowerCase();return uQt.has(n)?n:null}function dQt(e){let t=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi,r=[],n;for(;(n=t.exec(e))!==null;){let i=n[2].trim(),s=lQt(i);s&&r.push({url:i,format:s})}return r.length===0?null:(r.sort((i,s)=>{let o=a=>a.format==="woff2"?0:a.format==="woff"?1:2;return o(i)-o(s)}),r[0])}function fQt(e){let t=e.trim().toLowerCase();if(t==="normal")return"400";if(t==="bold")return"700";let r=/\d{3}/.exec(t);return r?r[0]:"400"}function pQt(e){let t=(e??"").trim().toLowerCase();return t==="italic"?"italic":t.startsWith("oblique")?"oblique":"normal"}function hQt(e){let t=[],r=new Set,n=/@font-face\s*\{([^}]*)\}/gi,i;for(;(i=n.exec(e))!==null;){let s=i[1],o=ND(s,"font-family");if(!o)continue;let a=o.replace(/^["']|["']$/g,"").trim();if(!a)continue;let c=ND(s,"src");if(!c)continue;let u=dQt(c);if(!u)continue;let l=fQt(ND(s,"font-weight")??"400"),d=pQt(ND(s,"font-style")),f=`${a.toLowerCase()}|${l}|${d}|${u.url}`;r.has(f)||(r.add(f),t.push({family:a,src:u.url,format:u.format,weight:l,style:d}))}return t}function AQt(e){let r=(e.src.split("?")[0].split("#")[0].split("/").pop()??"").replace(/[^A-Za-z0-9._-]+/g,"");if(r&&/\.[a-z0-9]+$/i.test(r))return r;let n=e.family.replace(/[^A-Za-z0-9]+/g,""),i=e.style==="italic"?"-italic":"",s=e.format==="woff"?"woff":"woff2";return`${n}-${e.weight}${i}.${s}`}async function MTe(e,t){let r=t.fetchImpl??fetch,n=t.fontsSubdir??"assets/fonts",i=DTe(t.themeDir,n),s=[],o=[],a=[],c=new Map;for(let u of e){let l;try{let f=await r(u,{headers:{"User-Agent":NTe},signal:AbortSignal.timeout(t.timeoutMs??3e4)});if(!f.ok)throw new Error(`HTTP ${f.status}`);l=await f.text()}catch(f){o.push({url:u,error:`css fetch failed: ${f.message}`});continue}let d=l;for(let f of hQt(l))try{let p=c.get(f.src);if(!p){tl(f.src);let A=AQt(f);p=`${n}/${A}`;let g=DTe(i,A);if(!cQt(g)){let m=await r(f.src,{headers:{"User-Agent":NTe},signal:AbortSignal.timeout(t.timeoutMs??3e4)});if(!m.ok)throw new Error(`HTTP ${m.status}`);oQt(i,{recursive:!0}),aQt(g,Buffer.from(await m.arrayBuffer()))}c.set(f.src,p),s.push({...f,localPath:p})}let h=p.replace(/^assets\//,"../");d=d.split(f.src).join(h)}catch(p){o.push({url:f.src,error:p.message})}a.push(d)}return{faces:s,localizedCss:a.join(` -`),errors:o}}pi();var $h=Rr(xI(),1),xTe=[".wp-block-jetpack-contact-form",".jetpack-contact-form-container"],va=".contact-form.commentsblock.jetpack-contact-form__form",KRt=new Set(["display","visibility","position","opacity","transform","float","clip","clip-path","z-index"]),XRt=[...xTe,...YI([va])],eQt=YI([`${va} [class*="grunion-field-"][class*="-wrap"]`,`${va} .contact-form__inset-label-wrap`,`${va} .contact-form__select-wrapper`]),tQt=YI([`${va} input.grunion-field:not([type=checkbox]):not([type=radio]):not([type=hidden])`,`${va} textarea.grunion-field`,`${va} .grunion-field-url-wrap input.grunion-field[type=text]`,`${va} .contact-form__select-wrapper select`]),rQt=YI([`${va} .grunion-field-label`]),nQt=YI([`${va} .wp-block-jetpack-button .wp-block-button__link`,".wp-block-jetpack-button .wp-block-button__link",`${va} .contact-submit button[type=submit]`,`${va} button.pushbutton-wide`]),iQt=new Set([":active",":checked",":disabled",":enabled",":hover",":invalid",":optional",":placeholder-shown",":required",":valid",":visited"]);function BTe(e){if(e.formsConverted<=0||e.sourceCss.trim()==="")return{css:""};let t;try{t=Kd.parse(e.sourceCss)}catch{return{css:""}}let r=[];return t.walkRules(n=>{if(EQt(n))return;let i=cQt(n);if(i.length!==0)for(let s of i){let[o,a]=s.split(":"),c=sQt(n,o);if(c.length===0)continue;let u=mQt(o,a);r.push(CQt(u,c,bQt(n)))}}),{css:r.join(` -`)}}function YI(e){return xTe.flatMap(t=>e.map(r=>`${t} ${r}`))}function sQt(e,t){let r=[];for(let n of e.nodes??[]){if(n.type!=="decl")continue;let i=n,s=i.prop.trim().toLowerCase(),o=i.value.trim();!s||!o||!oQt(s,t)||r.push({prop:s,value:o,important:i.important})}return r}function oQt(e,t){return KRt.has(e)?!1:!!(e==="color"||e==="height"||e==="line-height"||e==="letter-spacing"||e==="min-height"||e==="min-width"||e==="background"||e==="background-color"||e==="box-shadow"||e==="width"||e==="max-width"||e.startsWith("border")||e.startsWith("outline")||e.startsWith("padding")||e.startsWith("font")||(t==="form"||t==="field")&&aQt(e)||(t==="label"||t==="submit")&&(e==="display"||e.startsWith("margin"))||t==="submit"&&(e==="text-decoration"||e==="text-transform"))}function aQt(e){return e==="display"||e==="gap"||e==="row-gap"||e==="column-gap"||e==="align-items"||e==="justify-items"||e==="justify-content"||e==="flex-direction"||e==="flex-wrap"||e==="grid-template-columns"||e==="grid-template-rows"||e.startsWith("margin")}function cQt(e){let t=new Set;for(let r of e.selectors){let n=uQt(r);if(!n)continue;let i=n.focus?"focus":"base";for(let s of n.kinds)t.add(`${s}:${i}`)}return[...t]}function uQt(e){let t;try{t=(0,$h.default)().astSync(e,{lossless:!1})}catch{return null}let r=new Set,n=!1,i=!1;for(let s of t.nodes){let o=lQt(s);o.unsupportedState&&(i=!0),o.focus&&(n=!0);let a=o.tags.includes("button")||o.hasTypeSubmit&&o.tags.includes("input"),c=o.tags.some(f=>f==="select"||f==="textarea")||o.tags.includes("input")&&!a,u=o.tags.includes("label")||o.classes.some(AQt),l=o.classes.some(hQt),d=o.tags.includes("form")||o.classes.some(kTe)||o.ids.some(pQt);(c||o.classes.some(fQt))&&r.add("control"),u&&r.add("label"),(a||o.classes.some(gQt))&&r.add("submit"),l&&!c&&!u&&!a&&r.add("field"),d&&r.size===0&&r.add("form")}return i||r.size===0?null:{kinds:r,focus:n}}function lQt(e){let t=[],r=[],n=[],i=!1,s=!1,o=!1;return e.walk(a=>{if(!dQt(a)){if($h.default.isTag(a)){t.push(a.value.toLowerCase());return}if($h.default.isClassName(a)){r.push(a.value.toLowerCase());return}if(a.type==="id"){let c=a.value;c&&n.push(c.toLowerCase());return}if($h.default.isAttribute(a)){let c=a.attribute.toLowerCase(),u=(a.value??"").toLowerCase();c==="type"&&a.operator==="="&&u==="submit"&&(i=!0);return}if($h.default.isPseudo(a)){let c=a.value.toLowerCase();if(c===":focus"||c===":focus-visible"){s=!0;return}iQt.has(c)&&(o=!0)}}}),{tags:t,classes:r,ids:n,hasTypeSubmit:i,focus:s,unsupportedState:o}}function dQt(e){let t=e.parent;for(;t;){if($h.default.isPseudo(t))return!0;t=t.parent}return!1}function fQt(e){return!!(["form-control","form-input","form-select","form-textarea"].includes(e)||/^(?:input|select|textarea)(?:[-_](?:field|control))?$/.test(e)||/^(?:field|control)[-_](?:input|select|textarea)$/.test(e)||/(?:^|[-_])form[-_](?:control|field|input|select|textarea)(?:$|[-_])/.test(e)||/(?:^|[-_])(?:input|select|textarea)(?:$|[-_])/.test(e)&&/(?:form|field|control|contact|email|message|name|phone)/.test(e)||/(?:^|[-_])(?:field|control)(?:$|[-_])/.test(e)&&/(?:form|contact|input|select|textarea)/.test(e))}function kTe(e){return e==="form"?!0:/(?:^|[-_])form(?:$|[-_])/.test(e)?!/(?:input|select|textarea|label|submit|button|btn|control|field|check|checkbox|radio)/.test(e):!1}function pQt(e){return kTe(e)}function hQt(e){return["field","form-field","form-group","form-row","form-check","input-group"].includes(e)?!0:/(?:^|[-_])(?:form|contact)[-_](?:field|group|row|check)(?:$|[-_])/.test(e)||/(?:^|[-_])(?:field|group|row|check)[-_](?:form|contact)(?:$|[-_])/.test(e)}function AQt(e){return e==="label"||e==="form-label"?!0:/(?:^|[-_])(?:form|field|contact)[-_]label(?:$|[-_])/.test(e)}function gQt(e){return e==="submit"||e==="form-submit"?!0:/(?:^|[-_])(?:form|contact)[-_]submit(?:$|[-_])/.test(e)||/(?:^|[-_])submit[-_](?:button|btn)(?:$|[-_])/.test(e)}function mQt(e,t){let r=e==="form"?XRt:e==="field"?eQt:e==="control"?tQt:e==="label"?rQt:nQt;return t==="focus"?r.map(yQt):r}function yQt(e){return`${e}:focus`}function bQt(e){let t=[],r=e.parent;for(;r;){if(r.type==="atrule"){let n=r;t.unshift({name:n.name,params:n.params})}r=r.parent}return t}function EQt(e){let t=e.parent;for(;t;){if(t.type==="atrule"&&/keyframes$/i.test(t.name))return!0;t=t.parent}return!1}function CQt(e,t,r){let n=`${e.join(",")}{${t.map(wQt).join(";")}}`;for(let i=r.length-1;i>=0;i-=1){let s=r[i];n=`@${s.name}${s.params?` ${s.params}`:""}{${n}}`}return n}function wQt(e){return`${e.prop}:${e.value}${e.important?"!important":""}`}function _Te(e){return BTe(e)}var Hh={themeRelativePath:"assets/css/jetpack-form-parity.css",outputFileName:"jetpack-form-parity.css",frontendHandleSuffix:"jetpack-form-parity",editorStylePath:"assets/css/jetpack-form-parity.css"};St();N2();pi();var TTe=24;function RTe(e){return e.replace(/\s+/g," ").trim()}function IQt(e){let t=e("body").children().first().get(0);return t||(e.root().children().first().get(0)??null)}function SQt(e,t,r){let n=r.tagName?.toLowerCase()??"",i=(t(r).attr("role")??"").trim().toLowerCase();return n==="header"||n==="nav"||n==="footer"||n==="aside"?n:i==="navigation"?"nav":i==="complementary"?"complementary":i?"region":e.role==="header"||e.role==="nav"||e.role==="footer"?e.role:"body"}function vQt(e){return e.role!=="body"}function xQt(e){return vQt(e)||e.linkCount>=2||e.text.length>=TTe}function BQt(e){let t=de(e.html),r=IQt(t),n=r?.tagName?.toLowerCase()||"section",i=t(r||"body"),s=(i.attr("id")??"").trim()||null,o=(e.classes?.length?e.classes:(i.attr("class")??"").split(/\s+/)).filter(Boolean);return{selector:jp({tag:n,id:s,classes:o,nthOfType:1}),role:r?SQt(e,t,r):e.role,sectionId:e.id,html:e.html,text:RTe(i.text()),linkCount:i.find("a[href]").length+(n==="a"&&i.attr("href")?1:0),classes:o}}function kQt(e){return Zu(e).map(BQt).filter(xQt)}function _Qt(e){let t=new Set;return e("[id]").each((r,n)=>{let i=e(n).attr("id");i&&t.add(i)}),t}function TQt(e,t){return e.includes(`"anchor":${JSON.stringify(t)}`)}function RQt(e,t,r,n){let i=_Qt(r);if(i.has(e.sectionId)||TQt(t,e.sectionId))return!0;let s=/#([A-Za-z0-9_-]+)/.exec(e.selector)?.[1];return!!(s&&i.has(s)||e.role==="body"&&e.text.length>=TTe&&n.includes(e.text))}function QTe(e){let t=[e.postContent,...e.partMarkup??[]].filter(Boolean).join(` -`),r=de(t),n=RTe(r.text());return kQt(e.sourceHtml).filter(i=>!RQt(i,t,r,n)).map(i=>({selector:i.selector,role:i.role,pageSlug:e.pageSlug,reason:"actionable_region_unplaced"}))}N2();var QQt="dla-interactivity",DQt=`{if(FQt(n))return;let i=xQt(n);if(i.length!==0)for(let s of i){let[o,a]=s.split(":"),c=IQt(n,o);if(c.length===0)continue;let u=MQt(o,a);r.push(OQt(u,c,LQt(n)))}}),{css:r.join(` +`)}}function e1(e){return PTe.flatMap(t=>e.map(r=>`${t} ${r}`))}function IQt(e,t){let r=[];for(let n of e.nodes??[]){if(n.type!=="decl")continue;let i=n,s=i.prop.trim().toLowerCase(),o=i.value.trim();!s||!o||!SQt(s,t)||r.push({prop:s,value:o,important:i.important})}return r}function SQt(e,t){return gQt.has(e)?!1:!!(e==="color"||e==="height"||e==="line-height"||e==="letter-spacing"||e==="min-height"||e==="min-width"||e==="background"||e==="background-color"||e==="box-shadow"||e==="width"||e==="max-width"||e.startsWith("border")||e.startsWith("outline")||e.startsWith("padding")||e.startsWith("font")||(t==="form"||t==="field")&&vQt(e)||(t==="label"||t==="submit")&&(e==="display"||e.startsWith("margin"))||t==="submit"&&(e==="text-decoration"||e==="text-transform"))}function vQt(e){return e==="display"||e==="gap"||e==="row-gap"||e==="column-gap"||e==="align-items"||e==="justify-items"||e==="justify-content"||e==="flex-direction"||e==="flex-wrap"||e==="grid-template-columns"||e==="grid-template-rows"||e.startsWith("margin")}function xQt(e){let t=new Set;for(let r of e.selectors){let n=BQt(r);if(!n)continue;let i=n.focus?"focus":"base";for(let s of n.kinds)t.add(`${s}:${i}`)}return[...t]}function BQt(e){let t;try{t=(0,Vh.default)().astSync(e,{lossless:!1})}catch{return null}let r=new Set,n=!1,i=!1;for(let s of t.nodes){let o=kQt(s);o.unsupportedState&&(i=!0),o.focus&&(n=!0);let a=o.tags.includes("button")||o.hasTypeSubmit&&o.tags.includes("input"),c=o.tags.some(f=>f==="select"||f==="textarea")||o.tags.includes("input")&&!a,u=o.tags.includes("label")||o.classes.some(DQt),l=o.classes.some(QQt),d=o.tags.includes("form")||o.classes.some(FTe)||o.ids.some(RQt);(c||o.classes.some(TQt))&&r.add("control"),u&&r.add("label"),(a||o.classes.some(NQt))&&r.add("submit"),l&&!c&&!u&&!a&&r.add("field"),d&&r.size===0&&r.add("form")}return i||r.size===0?null:{kinds:r,focus:n}}function kQt(e){let t=[],r=[],n=[],i=!1,s=!1,o=!1;return e.walk(a=>{if(!_Qt(a)){if(Vh.default.isTag(a)){t.push(a.value.toLowerCase());return}if(Vh.default.isClassName(a)){r.push(a.value.toLowerCase());return}if(a.type==="id"){let c=a.value;c&&n.push(c.toLowerCase());return}if(Vh.default.isAttribute(a)){let c=a.attribute.toLowerCase(),u=(a.value??"").toLowerCase();c==="type"&&a.operator==="="&&u==="submit"&&(i=!0);return}if(Vh.default.isPseudo(a)){let c=a.value.toLowerCase();if(c===":focus"||c===":focus-visible"){s=!0;return}wQt.has(c)&&(o=!0)}}}),{tags:t,classes:r,ids:n,hasTypeSubmit:i,focus:s,unsupportedState:o}}function _Qt(e){let t=e.parent;for(;t;){if(Vh.default.isPseudo(t))return!0;t=t.parent}return!1}function TQt(e){return!!(["form-control","form-input","form-select","form-textarea"].includes(e)||/^(?:input|select|textarea)(?:[-_](?:field|control))?$/.test(e)||/^(?:field|control)[-_](?:input|select|textarea)$/.test(e)||/(?:^|[-_])form[-_](?:control|field|input|select|textarea)(?:$|[-_])/.test(e)||/(?:^|[-_])(?:input|select|textarea)(?:$|[-_])/.test(e)&&/(?:form|field|control|contact|email|message|name|phone)/.test(e)||/(?:^|[-_])(?:field|control)(?:$|[-_])/.test(e)&&/(?:form|contact|input|select|textarea)/.test(e))}function FTe(e){return e==="form"?!0:/(?:^|[-_])form(?:$|[-_])/.test(e)?!/(?:input|select|textarea|label|submit|button|btn|control|field|check|checkbox|radio)/.test(e):!1}function RQt(e){return FTe(e)}function QQt(e){return["field","form-field","form-group","form-row","form-check","input-group"].includes(e)?!0:/(?:^|[-_])(?:form|contact)[-_](?:field|group|row|check)(?:$|[-_])/.test(e)||/(?:^|[-_])(?:field|group|row|check)[-_](?:form|contact)(?:$|[-_])/.test(e)}function DQt(e){return e==="label"||e==="form-label"?!0:/(?:^|[-_])(?:form|field|contact)[-_]label(?:$|[-_])/.test(e)}function NQt(e){return e==="submit"||e==="form-submit"?!0:/(?:^|[-_])(?:form|contact)[-_]submit(?:$|[-_])/.test(e)||/(?:^|[-_])submit[-_](?:button|btn)(?:$|[-_])/.test(e)}function MQt(e,t){let r=e==="form"?mQt:e==="field"?yQt:e==="control"?bQt:e==="label"?EQt:CQt;return t==="focus"?r.map(PQt):r}function PQt(e){return`${e}:focus`}function LQt(e){let t=[],r=e.parent;for(;r;){if(r.type==="atrule"){let n=r;t.unshift({name:n.name,params:n.params})}r=r.parent}return t}function FQt(e){let t=e.parent;for(;t;){if(t.type==="atrule"&&/keyframes$/i.test(t.name))return!0;t=t.parent}return!1}function OQt(e,t,r){let n=`${e.join(",")}{${t.map(UQt).join(";")}}`;for(let i=r.length-1;i>=0;i-=1){let s=r[i];n=`@${s.name}${s.params?` ${s.params}`:""}{${n}}`}return n}function UQt(e){return`${e.prop}:${e.value}${e.important?"!important":""}`}function OTe(e){return LTe(e)}var Gh={themeRelativePath:"assets/css/jetpack-form-parity.css",outputFileName:"jetpack-form-parity.css",frontendHandleSuffix:"jetpack-form-parity",editorStylePath:"assets/css/jetpack-form-parity.css"};Bt();U2();hi();var UTe=24;function $Te(e){return e.replace(/\s+/g," ").trim()}function $Qt(e){let t=e("body").children().first().get(0);return t||(e.root().children().first().get(0)??null)}function HQt(e,t,r){let n=r.tagName?.toLowerCase()??"",i=(t(r).attr("role")??"").trim().toLowerCase();return n==="header"||n==="nav"||n==="footer"||n==="aside"?n:i==="navigation"?"nav":i==="complementary"?"complementary":i?"region":e.role==="header"||e.role==="nav"||e.role==="footer"?e.role:"body"}function jQt(e){return e.role!=="body"}function qQt(e){return jQt(e)||e.linkCount>=2||e.text.length>=UTe}function zQt(e){let t=de(e.html),r=$Qt(t),n=r?.tagName?.toLowerCase()||"section",i=t(r||"body"),s=(i.attr("id")??"").trim()||null,o=(e.classes?.length?e.classes:(i.attr("class")??"").split(/\s+/)).filter(Boolean);return{selector:Wp({tag:n,id:s,classes:o,nthOfType:1}),role:r?HQt(e,t,r):e.role,sectionId:e.id,html:e.html,text:$Te(i.text()),linkCount:i.find("a[href]").length+(n==="a"&&i.attr("href")?1:0),classes:o}}function VQt(e){return Xu(e).map(zQt).filter(qQt)}function GQt(e){let t=new Set;return e("[id]").each((r,n)=>{let i=e(n).attr("id");i&&t.add(i)}),t}function WQt(e,t){return e.includes(`"anchor":${JSON.stringify(t)}`)}function YQt(e,t,r,n){let i=GQt(r);if(i.has(e.sectionId)||WQt(t,e.sectionId))return!0;let s=/#([A-Za-z0-9_-]+)/.exec(e.selector)?.[1];return!!(s&&i.has(s)||e.role==="body"&&e.text.length>=UTe&&n.includes(e.text))}function HTe(e){let t=[e.postContent,...e.partMarkup??[]].filter(Boolean).join(` +`),r=de(t),n=$Te(r.text());return VQt(e.sourceHtml).filter(i=>!YQt(i,t,r,n)).map(i=>({selector:i.selector,role:i.role,pageSlug:e.pageSlug,reason:"actionable_region_unplaced"}))}U2();var JQt="dla-interactivity",ZQt=` array( '@wordpress/interactivity' ), 'version' => '1.0.0' ); -`,ZI=` array( 'wp-blocks', 'wp-block-editor', 'wp-element' ), 'version' => '1.0.0' ); -`;function _D(e){return{type:"string",source:"html",selector:e}}function KI(e){let t=`dla/${e}`,r=`wp-block-dla-${e}`;return`( function ( blocks, blockEditor, element ) { +`,t1=` array( '@wordpress/interactivity' ), 'version' => '1.0.0' ); +`,r1=` array( 'wp-blocks', 'wp-block-editor', 'wp-element' ), 'version' => '1.0.0' ); +`;function MD(e){return{type:"string",source:"html",selector:e}}function n1(e){let t=`dla/${e}`,r=`wp-block-dla-${e}`;return`( function ( blocks, blockEditor, element ) { var el = element.createElement; var RawHTML = element.RawHTML; var blockName = '${t}'; @@ -2250,8 +2250,8 @@ add_action( 'init', function () { }, } ); } )( window.wp.blocks, window.wp.blockEditor, window.wp.element ); -`}var NQt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/reveal",title:"Reveal Section",category:"design",description:"Scroll-reveal section (IntersectionObserver via the Interactivity API).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},threshold:{type:"number",default:.12},translateY:{type:"string",default:"18px"},durationMs:{type:"number",default:600}},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js",style:"file:./style.css"},null," ")+` -`,MQt=`import { store, getContext, getElement } from '@wordpress/interactivity'; +`}var KQt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/reveal",title:"Reveal Section",category:"design",description:"Scroll-reveal section (IntersectionObserver via the Interactivity API).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},threshold:{type:"number",default:.12},translateY:{type:"string",default:"18px"},durationMs:{type:"number",default:600}},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js",style:"file:./style.css"},null," ")+` +`,XQt=`import { store, getContext, getElement } from '@wordpress/interactivity'; document.documentElement.classList.add( 'dla-reveal-js' ); @@ -2279,7 +2279,7 @@ store( 'dla/reveal', { }, }, } ); -`,PQt=`.dla-reveal-js .wp-block-dla-reveal:not(.is-visible) { +`,eDt=`.dla-reveal-js .wp-block-dla-reveal:not(.is-visible) { opacity: 0; transform: translateY( var( --dla-reveal-y, 18px ) ); } @@ -2295,8 +2295,8 @@ store( 'dla/reveal', { transition: none; } } -`,LQt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/sticky",title:"Sticky Header State",category:"design",description:"Scroll-reactive header state (toggles the source-authored class past an offset).",supports:{interactivity:!0,html:!1},attributes:{className:{type:"string"},toggleClass:{type:"string",default:"is-scrolled"},offset:{type:"number",default:8},content:_D(".wp-block-dla-sticky")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` -`,FQt=`import { store, getContext, getElement } from '@wordpress/interactivity'; +`,tDt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/sticky",title:"Sticky Header State",category:"design",description:"Scroll-reactive header state (toggles the source-authored class past an offset).",supports:{interactivity:!0,html:!1},attributes:{className:{type:"string"},toggleClass:{type:"string",default:"is-scrolled"},offset:{type:"number",default:8},content:MD(".wp-block-dla-sticky")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` +`,rDt=`import { store, getContext, getElement } from '@wordpress/interactivity'; store( 'dla/sticky', { callbacks: { @@ -2312,8 +2312,8 @@ store( 'dla/sticky', { }, }, } ); -`,OQt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/tabs",title:"Tabs Section",category:"design",description:"Tabbed section (verbatim source markup; toggles the source-authored active class).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},activeClass:{type:"string",default:"is-active"},content:_D(".wp-block-dla-tabs")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` -`,UQt=`import { store, getContext, getElement } from '@wordpress/interactivity'; +`,nDt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/tabs",title:"Tabs Section",category:"design",description:"Tabbed section (verbatim source markup; toggles the source-authored active class).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},activeClass:{type:"string",default:"is-active"},content:MD(".wp-block-dla-tabs")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` +`,iDt=`import { store, getContext, getElement } from '@wordpress/interactivity'; store( 'dla/tabs', { callbacks: { @@ -2352,8 +2352,8 @@ store( 'dla/tabs', { }, }, } ); -`,$Qt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/slider",title:"Slider Section",category:"design",description:"Carousel section (verbatim source markup; moves the source-authored active class).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},activeClass:{type:"string",default:"is-current"},intervalMs:{type:"number"},content:_D(".wp-block-dla-slider")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` -`,HQt=`import { store, getContext, getElement } from '@wordpress/interactivity'; +`,sDt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/slider",title:"Slider Section",category:"design",description:"Carousel section (verbatim source markup; moves the source-authored active class).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},activeClass:{type:"string",default:"is-current"},intervalMs:{type:"number"},content:MD(".wp-block-dla-slider")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` +`,oDt=`import { store, getContext, getElement } from '@wordpress/interactivity'; store( 'dla/slider', { callbacks: { @@ -2388,8 +2388,8 @@ store( 'dla/slider', { }, }, } ); -`,jQt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/modal",title:"Modal Section",category:"design",description:"Section with a native dialog modal (verbatim source markup; showModal/close wiring).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},content:_D(".wp-block-dla-modal")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` -`,qQt=`import { store, getElement, withSyncEvent } from '@wordpress/interactivity'; +`,aDt=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/modal",title:"Modal Section",category:"design",description:"Section with a native dialog modal (verbatim source markup; showModal/close wiring).",supports:{interactivity:!0,html:!1},attributes:{anchor:{type:"string"},className:{type:"string"},content:MD(".wp-block-dla-modal")},editorScript:"file:./editor.js",viewScriptModule:"file:./view.js"},null," ")+` +`,cDt=`import { store, getElement, withSyncEvent } from '@wordpress/interactivity'; store( 'dla/modal', { callbacks: { @@ -2410,10 +2410,10 @@ store( 'dla/modal', { }, }, } ); -`;function DTe(){return{slug:QQt,files:[{relativePath:"plugin.php",content:DQt},{relativePath:"blocks/reveal/block.json",content:NQt},{relativePath:"blocks/reveal/editor.js",content:KI("reveal")},{relativePath:"blocks/reveal/editor.asset.php",content:ZI},{relativePath:"blocks/reveal/view.js",content:MQt},{relativePath:"blocks/reveal/view.asset.php",content:JI},{relativePath:"blocks/reveal/style.css",content:PQt},{relativePath:"blocks/sticky/block.json",content:LQt},{relativePath:"blocks/sticky/editor.js",content:KI("sticky")},{relativePath:"blocks/sticky/editor.asset.php",content:ZI},{relativePath:"blocks/sticky/view.js",content:FQt},{relativePath:"blocks/sticky/view.asset.php",content:JI},{relativePath:"blocks/tabs/block.json",content:OQt},{relativePath:"blocks/tabs/editor.js",content:KI("tabs")},{relativePath:"blocks/tabs/editor.asset.php",content:ZI},{relativePath:"blocks/tabs/view.js",content:UQt},{relativePath:"blocks/tabs/view.asset.php",content:JI},{relativePath:"blocks/slider/block.json",content:$Qt},{relativePath:"blocks/slider/editor.js",content:KI("slider")},{relativePath:"blocks/slider/editor.asset.php",content:ZI},{relativePath:"blocks/slider/view.js",content:HQt},{relativePath:"blocks/slider/view.asset.php",content:JI},{relativePath:"blocks/modal/block.json",content:jQt},{relativePath:"blocks/modal/editor.js",content:KI("modal")},{relativePath:"blocks/modal/editor.asset.php",content:ZI},{relativePath:"blocks/modal/view.js",content:qQt},{relativePath:"blocks/modal/view.asset.php",content:JI}]}}ic();pi();import{normalize as YQt}from"node:path";var zQt={color:{surface:{base:{value:"#ffffff"}},text:{default:{value:"#111111"}},accent:{primary:{value:"#0066cc"}}},typography:{families:{body:{value:"system-ui, sans-serif"}}}};function NTe(e,t,r){let n=e?``:"",i=t?.partSlug?` +`;function jTe(){return{slug:JQt,files:[{relativePath:"plugin.php",content:ZQt},{relativePath:"blocks/reveal/block.json",content:KQt},{relativePath:"blocks/reveal/editor.js",content:n1("reveal")},{relativePath:"blocks/reveal/editor.asset.php",content:r1},{relativePath:"blocks/reveal/view.js",content:XQt},{relativePath:"blocks/reveal/view.asset.php",content:t1},{relativePath:"blocks/reveal/style.css",content:eDt},{relativePath:"blocks/sticky/block.json",content:tDt},{relativePath:"blocks/sticky/editor.js",content:n1("sticky")},{relativePath:"blocks/sticky/editor.asset.php",content:r1},{relativePath:"blocks/sticky/view.js",content:rDt},{relativePath:"blocks/sticky/view.asset.php",content:t1},{relativePath:"blocks/tabs/block.json",content:nDt},{relativePath:"blocks/tabs/editor.js",content:n1("tabs")},{relativePath:"blocks/tabs/editor.asset.php",content:r1},{relativePath:"blocks/tabs/view.js",content:iDt},{relativePath:"blocks/tabs/view.asset.php",content:t1},{relativePath:"blocks/slider/block.json",content:sDt},{relativePath:"blocks/slider/editor.js",content:n1("slider")},{relativePath:"blocks/slider/editor.asset.php",content:r1},{relativePath:"blocks/slider/view.js",content:oDt},{relativePath:"blocks/slider/view.asset.php",content:t1},{relativePath:"blocks/modal/block.json",content:aDt},{relativePath:"blocks/modal/editor.js",content:n1("modal")},{relativePath:"blocks/modal/editor.asset.php",content:r1},{relativePath:"blocks/modal/view.js",content:cDt},{relativePath:"blocks/modal/view.asset.php",content:t1}]}}oc();hi();import{normalize as pDt}from"node:path";var uDt={color:{surface:{base:{value:"#ffffff"}},text:{default:{value:"#111111"}},accent:{primary:{value:"#0066cc"}}},typography:{families:{body:{value:"system-ui, sans-serif"}}}};function qTe(e,t,r){let n=e?``:"",i=t?.partSlug?` `:"",s=r?{tagName:"main",className:r}:{tagName:"main"},o=["wp-block-group",r].filter(Boolean).join(" "),a=` -
+
${n}
@@ -2421,13 +2421,13 @@ ${n} `,c=` `,u=` -`,l=t?.layoutWrapperTag?.trim();if(t&&i&&l){let d=(t.layoutWrapperClasses??[]).filter(Boolean).join(" ").trim(),f=d?{tagName:l,className:d}:{tagName:l},p=["wp-block-group",d].filter(Boolean).join(" "),h=t.layoutWrapperRailPosition==="afterMain"?a+i:i+a,A=kt(p);return c+` +`,l=t?.layoutWrapperTag?.trim();if(t&&i&&l){let d=(t.layoutWrapperClasses??[]).filter(Boolean).join(" ").trim(),f=d?{tagName:l,className:d}:{tagName:l},p=["wp-block-group",d].filter(Boolean).join(" "),h=t.layoutWrapperRailPosition==="afterMain"?a+i:i+a,A=Qt(p);return c+` <${l} class="${A}"> `+h+` `+u}return c+i+a+` -`}function VQt(e,t,r,n=!1){let i=t?` +`}function lDt(e,t,r,n=!1){let i=t?` // Source reveal scripts gate on html.js (no-JS visitors keep content visible). add_action( 'wp_head', function () { echo ""; @@ -2437,7 +2437,7 @@ add_action( 'wp_head', function () { add_action( 'wp_body_open', function () { echo ''; } ); -`:"",o=Hh.themeRelativePath,a=`${e}-${Hh.frontendHandleSuffix}`,c=n?` +`:"",o=Gh.themeRelativePath,a=`${e}-${Gh.frontendHandleSuffix}`,c=n?` $jetpack_form = get_theme_file_path( '${o}' ); $jetpack_form_mtime = @filemtime( $jetpack_form ); if ( false !== $jetpack_form_mtime ) { @@ -2464,7 +2464,7 @@ add_action( 'wp_body_open', function () { $deps = array( '${e}-source' ); } else { $deps = array( '${e}-style' ); - }`,l=["assets/css/source.css","assets/css/instance-styles.css",...n?[Hh.editorStylePath]:[],"assets/css/parity-patch.css","assets/css/editor-reveal-reset.css"];return` + }`,l=["assets/css/source.css","assets/css/instance-styles.css",...n?[Gh.editorStylePath]:[],"assets/css/parity-patch.css","assets/css/editor-reveal-reset.css"];return` // Stage 1d carry: the source site's own CSS/JS, adapted for the block DOM. // Enqueued at priority 20 so it lands AFTER global styles + theme style. // Guards are @filemtime (not file_exists): PHP's realpath cache keeps @@ -2513,7 +2513,7 @@ add_action( 'after_setup_theme', function () { } } } ); -${i}${s}`}var GQt=`/* editor-reveal-reset.css \u2014 add_editor_style ONLY; never a front-end style. */ +${i}${s}`}var dDt=`/* editor-reveal-reset.css \u2014 add_editor_style ONLY; never a front-end style. */ .reveal, [class*="reveal"], [class*="fade-in"], @@ -2527,21 +2527,21 @@ ${i}${s}`}var GQt=`/* editor-reveal-reset.css \u2014 add_editor_style ONLY; neve animation: none !important; transition: none !important; } -`;function iG(e){let n=tQ({foundation:e.foundation??zQt,themeSlug:e.themeSlug,siteTitle:e.siteTitle,capturedFonts:e.capturedFonts}).map(a=>a.relativePath==="parts/header.html"?{...a,content:e.headerPart}:a.relativePath==="parts/footer.html"?{...a,content:e.footerPart}:a).map(a=>{if(a.relativePath!=="theme.json")return a;let c=JSON.parse(a.content),u=[...c.customTemplates??[],{name:"page-local",title:"Local Page (no title)",postTypes:["page"]},...(e.interiorChromeTemplates??[]).map(l=>({name:l.templateName,title:l.templateTitle,postTypes:["page"]}))];return{...a,content:JSON.stringify({...c,customTemplates:u},null,2)+` -`}}),i=NTe(e.mainClass,void 0,e.mainWrapperClass);n.push({relativePath:"templates/page-local.html",content:i});for(let a of e.interiorChromeTemplates??[])n.push({relativePath:`parts/${a.partSlug}.html`,content:a.partMarkup}),n.push({relativePath:`templates/${a.templateName}.html`,content:NTe(e.mainClass,a,e.mainWrapperClass)});n.push({relativePath:"templates/front-page.html",content:i});let s=(e.jetpackFormParityCss??"").trim(),o=s.length>0;if(e.carrySourceAssets||o){let{css:a,js:c}=e.carrySourceAssets??{css:"",js:""},u=a.trim().length>0,l=c.trim().length>0;if(u){let p=n.findIndex(h=>h.relativePath==="theme.json");if(p>=0){let h=JSON.parse(n[p].content);delete h.styles,h.settings={...h.settings??{},spacing:{...h.settings?.spacing??{},blockGap:null}},n[p]={...n[p],content:JSON.stringify(h,null,2)+` -`}}}u&&(n.push({relativePath:"assets/css/source.css",content:a}),n.push({relativePath:"assets/css/editor-reveal-reset.css",content:GQt})),l&&n.push({relativePath:"assets/js/source.js",content:c}),o&&n.push({relativePath:Hh.themeRelativePath,content:s+` +`;function pG(e){let n=aQ({foundation:e.foundation??uDt,themeSlug:e.themeSlug,siteTitle:e.siteTitle,capturedFonts:e.capturedFonts}).map(a=>a.relativePath==="parts/header.html"?{...a,content:e.headerPart}:a.relativePath==="parts/footer.html"?{...a,content:e.footerPart}:a).map(a=>{if(a.relativePath!=="theme.json")return a;let c=JSON.parse(a.content),u=[...c.customTemplates??[],{name:"page-local",title:"Local Page (no title)",postTypes:["page"]},...(e.interiorChromeTemplates??[]).map(l=>({name:l.templateName,title:l.templateTitle,postTypes:["page"]}))];return{...a,content:JSON.stringify({...c,customTemplates:u},null,2)+` +`}}),i=qTe(e.mainClass,void 0,e.mainWrapperClass);n.push({relativePath:"templates/page-local.html",content:i});for(let a of e.interiorChromeTemplates??[])n.push({relativePath:`parts/${a.partSlug}.html`,content:a.partMarkup}),n.push({relativePath:`templates/${a.templateName}.html`,content:qTe(e.mainClass,a,e.mainWrapperClass)});n.push({relativePath:"templates/front-page.html",content:i});let s=(e.jetpackFormParityCss??"").trim(),o=s.length>0;if(e.carrySourceAssets||o){let{css:a,js:c}=e.carrySourceAssets??{css:"",js:""},u=a.trim().length>0,l=c.trim().length>0;if(u){let p=n.findIndex(h=>h.relativePath==="theme.json");if(p>=0){let h=JSON.parse(n[p].content);delete h.styles,h.settings={...h.settings??{},spacing:{...h.settings?.spacing??{},blockGap:null}},n[p]={...n[p],content:JSON.stringify(h,null,2)+` +`}}}u&&(n.push({relativePath:"assets/css/source.css",content:a}),n.push({relativePath:"assets/css/editor-reveal-reset.css",content:dDt})),l&&n.push({relativePath:"assets/js/source.js",content:c}),o&&n.push({relativePath:Gh.themeRelativePath,content:s+` `});let d=(e.instanceStylesCss??"").trim();u&&d.length>0&&n.push({relativePath:"assets/css/instance-styles.css",content:d+` -`});let f=n.findIndex(p=>p.relativePath==="functions.php");f>=0&&(n[f]={...n[f],content:n[f].content+VQt(e.themeSlug,l,e.carrySourceAssets?e.bodyDataByPath:void 0,o)})}return n}function MTe(e,t={}){let r=e.html;return t.pageSlugs?.length&&(r=wD(r,t.pageSlugs)),r.trim()}function PTe(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let r=parseInt(t[1],16),n=(r>>16&255)/255,i=(r>>8&255)/255,s=(r&255)/255,o=Math.max(n,i,s),a=Math.min(n,i,s),c=(o+a)/2,u=o-a,l=u===0?0:u/(1-Math.abs(2*c-1)),d=0;return u!==0&&(o===n?d=(i-s)/u%6:o===i?d=(s-n)/u+2:d=(n-i)/u+4,d*=60,d<0&&(d+=360)),{h:d,s:l,l:c}}var WQt=.5;function LTe(e){let t=new Map,r=/#([0-9a-f]{6}|[0-9a-f]{3})\b/gi;for(let n of e)for(let i of n.matchAll(r)){let s=i[1].toLowerCase(),o=s.length===3?`#${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:`#${s}`;t.set(o,(t.get(o)??0)+1)}return[...t.entries()].map(([n,i])=>({hex:n,count:i})).sort((n,i)=>i.count-n.count)}function FTe(e,t){let{palette:r,typography:n,breakpoints:i}=e,s=Math.max(1,Math.ceil((r.sampledUrls||1)*WQt)),o=r.colors.map(k=>({...k,hsl:PTe(k.hex)})).filter(k=>k.urls>=s&&k.hsl!==null),a=[...o].sort((k,v)=>k.hsl.l-v.hsl.l),c=a[0]?.hex??"#111111",u=a[a.length-1]?.hex??"#ffffff",d=([...o].sort((k,v)=>v.count-k.count)[0]?.hsl.l??.5)<.4,f=d?c:u,p=d?u:c,h=k=>k.hsl.s>=.35&&k.hsl.l>=.25&&k.hsl.l<=.7&&k.hex.toLowerCase()!==c.toLowerCase()&&k.hex.toLowerCase()!==u.toLowerCase(),A=(t?.cssColors??[]).map(k=>({hex:k.hex,count:k.count,hsl:PTe(k.hex)})).filter(k=>k.hsl!==null),g=[...o.filter(h).sort((k,v)=>v.count-k.count),...A.filter(h).sort((k,v)=>v.count-k.count)][0]?.hex??p,m=k=>n.bySelector[k]?.slice().sort((v,M)=>M.urls-v.urls)[0]?.fontFamily,b=m("body")??"system-ui, sans-serif",E=m("h1")??m("h2")??b,C=[...new Set([...i.minWidth,...i.maxWidth])].sort((k,v)=>k-v),w=(k,v)=>`${C.filter(M=>M<=k).pop()??v}px`,T=w(768,768),_=w(1024,1024),N=`${C.filter(k=>k>1024).pop()??1280}px`;return{foundation:{color:{surface:{base:{value:f},inverse:{value:p}},text:{default:{value:p},inverse:{value:f}},accent:{primary:{value:g}}},typography:{families:{body:{value:b},display:{value:E}}},breakpoints:{md:T,lg:_,xl:N},components:{button:{background:g,text:f,radius:"999px"}}},footerBgToken:"surface-inverse",footerTextToken:"text-inverse"}}function $Te(e){let t=e.cssColors??(e.cssSources?LTe(e.cssSources):void 0),n=FTe({palette:e.palette??nDt(),typography:e.typography??iDt(),breakpoints:e.breakpoints??sDt()},t?{cssColors:t}:void 0).foundation,s={palette:[XI("Surface Base",n.color?.surface?.base),XI("Surface Inverse",n.color?.surface?.inverse),XI("Text Default",n.color?.text?.default),XI("Text Inverse",n.color?.text?.inverse),XI("Accent Primary",n.color?.accent?.primary)].filter(o=>o!==null),typography:{...e1("body",n.typography?.families?.body?.value),...e1("display",n.typography?.families?.display?.value)},breakpoints:{...e1("md",n.breakpoints?.md),...e1("lg",n.breakpoints?.lg),...e1("xl",n.breakpoints?.xl)}};return{tokens:s,foundationAggregates:{palette:s.palette,typography:s.typography,breakpoints:s.breakpoints}}}function HTe(e){let t=iG({siteTitle:e.siteTitle,themeSlug:e.themeSlug,headerPart:"",footerPart:"",carrySourceAssets:e.carrySourceAssets,instanceStylesCss:e.instanceStylesCss,jetpackFormParityCss:e.jetpackFormParityCss,bodyDataByPath:e.bodyDataByPath}).find(r=>r.relativePath==="functions.php");if(!t)throw new Error("DLA theme assembly did not emit functions.php");return t.content}function jTe(e,t){let r=e.pages.map(i=>i.slug),n=new Map;for(let i of e.pages){if(i.slug===t)continue;let s=Zu(i.html).filter(u=>u.chromeSource==="layout-rail");if(s.length===0)continue;let o=i.slug.replace(/[^a-z0-9_-]+/gi,"-").replace(/^-+|-+$/g,"")||"page",a=s.map(u=>MTe(u,{pageSlugs:r})).join(` -`),c=s.find(u=>u.layoutWrapperTag&&u.layoutWrapperRailPosition);n.set(i.slug,{templateName:`page-local-${o}-chrome`,templateTitle:`Local Page Chrome (${i.title||i.slug})`,partSlug:`interior-chrome-${o}`,partMarkup:a,...c?{layoutWrapperTag:c.layoutWrapperTag,layoutWrapperClasses:c.layoutWrapperClasses??[],layoutWrapperRailPosition:c.layoutWrapperRailPosition}:{}})}return n}function qTe(e){return Zu(e)}async function zTe(e,t){let r=WTe(t),n={...e.templates},i={...e.parts},s=e.themeJson;for(let o of r){if(o.relativePath==="theme.json"){let a=JSON.parse(o.content);s=XQt(s,a,t);continue}if(o.relativePath.startsWith("templates/")){let a=o.relativePath.slice(10);(a==="front-page.html"||a==="page-local.html"||/^page-local-.+-chrome\.html$/.test(a))&&(n[a]=o.content);continue}o.relativePath.startsWith("parts/interior-chrome-")&&(i[o.relativePath.slice(6)]=o.content)}return JQt({...e,themeJson:s,templates:n,parts:i},t)}function VTe(e){return WTe(e).filter(t=>t.relativePath.startsWith("assets/"))}function GTe(e,t){let r=rDt([{relativePath:"style.css",content:e.model.styleCss},{relativePath:"theme.json",content:JSON.stringify(e.model.themeJson,null,2)+` -`},...sG("templates",e.model.templates),...sG("parts",e.model.parts),...sG("patterns",e.model.patterns),...t.extraThemeFiles??[],{relativePath:"functions.php",content:t.functionsPhp}]),n=e.written.map(t1),i=[...new Set(n.filter(s=>s.startsWith("assets/")))].sort();return{themeFiles:r,assetSourceDir:e.outDir,assetFiles:i,writtenThemeFiles:r.map(s=>s.relativePath)}}function WTe(e){return iG({siteTitle:e.siteTitle,themeSlug:e.themeSlug,headerPart:"",footerPart:"",mainClass:e.mainClass,mainWrapperClass:e.mainWrapperClass,interiorChromeTemplates:e.interiorChromeTemplates??[],carrySourceAssets:e.carrySourceAssets,instanceStylesCss:e.instanceStylesCss,jetpackFormParityCss:e.jetpackFormParityCss})}async function JQt(e,t){if(!t.site)return e;let r=t.site.pages.find(l=>l.slug==="home")??t.site.pages[0];if(!r)return e;let n=t.site.pages.map(l=>l.slug),i=Zu(r.html),s={...e.parts},o=(t.carrySourceAssets?.css??"").trim().length>0,a=t.allowSourceChromeMounts?Mj(r.html):{},c=i.find(l=>l.role==="header")??i.find(l=>l.role==="nav");c?s["header.html"]=await Dj(o?ZQt(c,i):c,{pageSlugs:n,convertPart:OTe,...t.sticky?{sticky:t.sticky}:{}}):a.header?s["header.html"]=yR(a.header,t.sticky):s["header.html"]=Qj(t.siteTitle,[],n,{plain:o,...t.sticky?{sticky:t.sticky}:{}});let u=i.find(l=>l.role==="footer")??null;return s["footer.html"]=a.footer?yR(a.footer):await Nj(u,t.siteTitle,{pageSlugs:n,convertPart:OTe}),{...e,parts:s}}function OTe(e){return e}function ZQt(e,t){let r=t.filter(i=>i.chromeSource==="layout-rail"&&i!==e);if(r.length===0)return e;let n=e.html.replace(/^]*>)/i,"\s*$/i,"");return{...e,html:`
${[n,...r.map(i=>i.html)].join(` -`)}
`,classes:["dla-carried-header-chrome"]}}function XI(e,t){let r=t?.value?.trim();return r?{name:e,color:r}:null}function e1(e,t){let r=t?.trim();return r?{[e]:r}:{}}function sG(e,t){return Object.entries(t).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>({relativePath:KQt(e,r),content:n}))}function KQt(e,t){let r=t.trim();if(r.startsWith(`${e}/`)||r.includes("/"))return t1(r);let n=/\.[a-z0-9]+$/i.test(r)?r:`${r}.html`;return t1(`${e}/${n}`)}function t1(e){let t=e.replace(/\\/g,"/"),r=YQt(t).replace(/\\/g,"/");if(!r||r==="."||r===".."||r.startsWith("../")||t.startsWith("/"))throw new Error(`theme path must stay relative: ${e}`);return r}function XQt(e,t,r){let n={...e};return(r.carrySourceAssets?.css??"").trim().length>0&&(delete n.styles,n.settings=tDt(n.settings,t.settings)),eDt(n,t.customTemplates)}function eDt(e,t){if(!Array.isArray(t))return e;let r=Array.isArray(e.customTemplates)?e.customTemplates:[],n=new Set(t.map(s=>UTe(s)).filter(s=>!!s)),i=r.filter(s=>{let o=UTe(s);return!o||!n.has(o)});return{...e,customTemplates:[...i,...t]}}function UTe(e){if(!e||typeof e!="object"||Array.isArray(e))return;let t=e.name;return typeof t=="string"&&t.trim()?t:void 0}function tDt(e,t){let r=TD(e),n=TD(t),i=TD(r.spacing),s=TD(n.spacing);return{...r,spacing:{...i,...s}}}function TD(e){return e&&typeof e=="object"&&!Array.isArray(e)?{...e}:{}}function rDt(e){let t=new Map;for(let r of e)t.set(t1(r.relativePath),{...r,relativePath:t1(r.relativePath)});return[...t.values()]}function nDt(){return{version:1,sampledUrls:0,colors:[]}}function iDt(){return{version:1,sampledUrls:0,bySelector:{}}}function sDt(){return{version:1,sampledUrls:0,minWidth:[],maxWidth:[]}}var YTe="failOnConservationRailDrop",RD=["nav","complementary"];var JTe=["display","position","marginTop","marginBottom","marginLeft","marginRight","paddingTop","paddingBottom","paddingLeft","paddingRight","maxWidth","fontSize","fontFamily","fontWeight","lineHeight","letterSpacing","textTransform","color","backgroundColor","gap","justifyContent","flexWrap","borderBottomWidth"];function oDt(e,t,r,n){let i=new Map(t.map(a=>[a.match,a])),s=[],o=n!==void 0?{page:n}:{};for(let a of e){let c=i.get(a.match);if(!c){s.push({match:a.match,viewport:r,kind:"missing",prop:"element",source:"present",replica:"absent",replicaOnlyClasses:[],...o});continue}for(let u of JTe){let l=a.props[u],d=c.props[u];l!==void 0&&d!==void 0&&l!==d&&s.push({match:a.match,viewport:r,kind:"prop",prop:u,source:l,replica:d,replicaOnlyClasses:c.replicaOnlyClasses,...o})}for(let u of["top","left","width","height"])Math.abs(a.rect[u]-c.rect[u])>2&&s.push({match:a.match,viewport:r,kind:"rect",prop:u,source:String(a.rect[u]),replica:String(c.rect[u]),replicaOnlyClasses:c.replicaOnlyClasses,...o})}return s}var oG="*,*::before,*::after{transition:none!important;animation:none!important}html.js section{opacity:1!important;transform:none!important}.dla-reveal-js .wp-block-dla-reveal{opacity:1!important;transform:none!important}html{scroll-behavior:auto!important}",aG=`(() => { +`});let f=n.findIndex(p=>p.relativePath==="functions.php");f>=0&&(n[f]={...n[f],content:n[f].content+lDt(e.themeSlug,l,e.carrySourceAssets?e.bodyDataByPath:void 0,o)})}return n}function zTe(e,t={}){let r=e.html;return t.pageSlugs?.length&&(r=kD(r,t.pageSlugs)),r.trim()}function VTe(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let r=parseInt(t[1],16),n=(r>>16&255)/255,i=(r>>8&255)/255,s=(r&255)/255,o=Math.max(n,i,s),a=Math.min(n,i,s),c=(o+a)/2,u=o-a,l=u===0?0:u/(1-Math.abs(2*c-1)),d=0;return u!==0&&(o===n?d=(i-s)/u%6:o===i?d=(s-n)/u+2:d=(n-i)/u+4,d*=60,d<0&&(d+=360)),{h:d,s:l,l:c}}var fDt=.5;function GTe(e){let t=new Map,r=/#([0-9a-f]{6}|[0-9a-f]{3})\b/gi;for(let n of e)for(let i of n.matchAll(r)){let s=i[1].toLowerCase(),o=s.length===3?`#${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`:`#${s}`;t.set(o,(t.get(o)??0)+1)}return[...t.entries()].map(([n,i])=>({hex:n,count:i})).sort((n,i)=>i.count-n.count)}function WTe(e,t){let{palette:r,typography:n,breakpoints:i}=e,s=Math.max(1,Math.ceil((r.sampledUrls||1)*fDt)),o=r.colors.map(k=>({...k,hsl:VTe(k.hex)})).filter(k=>k.urls>=s&&k.hsl!==null),a=[...o].sort((k,v)=>k.hsl.l-v.hsl.l),c=a[0]?.hex??"#111111",u=a[a.length-1]?.hex??"#ffffff",d=([...o].sort((k,v)=>v.count-k.count)[0]?.hsl.l??.5)<.4,f=d?c:u,p=d?u:c,h=k=>k.hsl.s>=.35&&k.hsl.l>=.25&&k.hsl.l<=.7&&k.hex.toLowerCase()!==c.toLowerCase()&&k.hex.toLowerCase()!==u.toLowerCase(),A=(t?.cssColors??[]).map(k=>({hex:k.hex,count:k.count,hsl:VTe(k.hex)})).filter(k=>k.hsl!==null),g=[...o.filter(h).sort((k,v)=>v.count-k.count),...A.filter(h).sort((k,v)=>v.count-k.count)][0]?.hex??p,m=k=>n.bySelector[k]?.slice().sort((v,M)=>M.urls-v.urls)[0]?.fontFamily,b=m("body")??"system-ui, sans-serif",C=m("h1")??m("h2")??b,E=[...new Set([...i.minWidth,...i.maxWidth])].sort((k,v)=>k-v),w=(k,v)=>`${E.filter(M=>M<=k).pop()??v}px`,T=w(768,768),_=w(1024,1024),D=`${E.filter(k=>k>1024).pop()??1280}px`;return{foundation:{color:{surface:{base:{value:f},inverse:{value:p}},text:{default:{value:p},inverse:{value:f}},accent:{primary:{value:g}}},typography:{families:{body:{value:b},display:{value:C}}},breakpoints:{md:T,lg:_,xl:D},components:{button:{background:g,text:f,radius:"999px"}}},footerBgToken:"surface-inverse",footerTextToken:"text-inverse"}}function ZTe(e){let t=e.cssColors??(e.cssSources?GTe(e.cssSources):void 0),n=WTe({palette:e.palette??CDt(),typography:e.typography??wDt(),breakpoints:e.breakpoints??IDt()},t?{cssColors:t}:void 0).foundation,s={palette:[i1("Surface Base",n.color?.surface?.base),i1("Surface Inverse",n.color?.surface?.inverse),i1("Text Default",n.color?.text?.default),i1("Text Inverse",n.color?.text?.inverse),i1("Accent Primary",n.color?.accent?.primary)].filter(o=>o!==null),typography:{...s1("body",n.typography?.families?.body?.value),...s1("display",n.typography?.families?.display?.value)},breakpoints:{...s1("md",n.breakpoints?.md),...s1("lg",n.breakpoints?.lg),...s1("xl",n.breakpoints?.xl)}};return{tokens:s,foundationAggregates:{palette:s.palette,typography:s.typography,breakpoints:s.breakpoints}}}function KTe(e){let t=pG({siteTitle:e.siteTitle,themeSlug:e.themeSlug,headerPart:"",footerPart:"",carrySourceAssets:e.carrySourceAssets,instanceStylesCss:e.instanceStylesCss,jetpackFormParityCss:e.jetpackFormParityCss,bodyDataByPath:e.bodyDataByPath}).find(r=>r.relativePath==="functions.php");if(!t)throw new Error("DLA theme assembly did not emit functions.php");return t.content}function XTe(e,t){let r=e.pages.map(i=>i.slug),n=new Map;for(let i of e.pages){if(i.slug===t)continue;let s=Xu(i.html).filter(u=>u.chromeSource==="layout-rail");if(s.length===0)continue;let o=i.slug.replace(/[^a-z0-9_-]+/gi,"-").replace(/^-+|-+$/g,"")||"page",a=s.map(u=>zTe(u,{pageSlugs:r})).join(` +`),c=s.find(u=>u.layoutWrapperTag&&u.layoutWrapperRailPosition);n.set(i.slug,{templateName:`page-local-${o}-chrome`,templateTitle:`Local Page Chrome (${i.title||i.slug})`,partSlug:`interior-chrome-${o}`,partMarkup:a,...c?{layoutWrapperTag:c.layoutWrapperTag,layoutWrapperClasses:c.layoutWrapperClasses??[],layoutWrapperRailPosition:c.layoutWrapperRailPosition}:{}})}return n}function e2e(e){return Xu(e)}async function t2e(e,t){let r=i2e(t),n={...e.templates},i={...e.parts},s=e.themeJson;for(let o of r){if(o.relativePath==="theme.json"){let a=JSON.parse(o.content);s=mDt(s,a,t);continue}if(o.relativePath.startsWith("templates/")){let a=o.relativePath.slice(10);(a==="front-page.html"||a==="page-local.html"||/^page-local-.+-chrome\.html$/.test(a))&&(n[a]=o.content);continue}o.relativePath.startsWith("parts/interior-chrome-")&&(i[o.relativePath.slice(6)]=o.content)}return hDt({...e,themeJson:s,templates:n,parts:i},t)}function r2e(e){return i2e(e).filter(t=>t.relativePath.startsWith("assets/"))}function n2e(e,t){let r=EDt([{relativePath:"style.css",content:e.model.styleCss},{relativePath:"theme.json",content:JSON.stringify(e.model.themeJson,null,2)+` +`},...hG("templates",e.model.templates),...hG("parts",e.model.parts),...hG("patterns",e.model.patterns),...t.extraThemeFiles??[],{relativePath:"functions.php",content:t.functionsPhp}]),n=e.written.map(o1),i=[...new Set(n.filter(s=>s.startsWith("assets/")))].sort();return{themeFiles:r,assetSourceDir:e.outDir,assetFiles:i,writtenThemeFiles:r.map(s=>s.relativePath)}}function i2e(e){return pG({siteTitle:e.siteTitle,themeSlug:e.themeSlug,headerPart:"",footerPart:"",mainClass:e.mainClass,mainWrapperClass:e.mainWrapperClass,interiorChromeTemplates:e.interiorChromeTemplates??[],carrySourceAssets:e.carrySourceAssets,instanceStylesCss:e.instanceStylesCss,jetpackFormParityCss:e.jetpackFormParityCss})}async function hDt(e,t){if(!t.site)return e;let r=t.site.pages.find(l=>l.slug==="home")??t.site.pages[0];if(!r)return e;let n=t.site.pages.map(l=>l.slug),i=Xu(r.html),s={...e.parts},o=(t.carrySourceAssets?.css??"").trim().length>0,a=t.allowSourceChromeMounts?$j(r.html):{},c=i.find(l=>l.role==="header")??i.find(l=>l.role==="nav");c?s["header.html"]=await Oj(o?ADt(c,i):c,{pageSlugs:n,convertPart:YTe,...t.sticky?{sticky:t.sticky}:{}}):a.header?s["header.html"]=SR(a.header,t.sticky):s["header.html"]=Fj(t.siteTitle,[],n,{plain:o,...t.sticky?{sticky:t.sticky}:{}});let u=i.find(l=>l.role==="footer")??null;return s["footer.html"]=a.footer?SR(a.footer):await Uj(u,t.siteTitle,{pageSlugs:n,convertPart:YTe}),{...e,parts:s}}function YTe(e){return e}function ADt(e,t){let r=t.filter(i=>i.chromeSource==="layout-rail"&&i!==e);if(r.length===0)return e;let n=e.html.replace(/^]*>)/i,"\s*$/i,"");return{...e,html:`
${[n,...r.map(i=>i.html)].join(` +`)}
`,classes:["dla-carried-header-chrome"]}}function i1(e,t){let r=t?.value?.trim();return r?{name:e,color:r}:null}function s1(e,t){let r=t?.trim();return r?{[e]:r}:{}}function hG(e,t){return Object.entries(t).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>({relativePath:gDt(e,r),content:n}))}function gDt(e,t){let r=t.trim();if(r.startsWith(`${e}/`)||r.includes("/"))return o1(r);let n=/\.[a-z0-9]+$/i.test(r)?r:`${r}.html`;return o1(`${e}/${n}`)}function o1(e){let t=e.replace(/\\/g,"/"),r=pDt(t).replace(/\\/g,"/");if(!r||r==="."||r===".."||r.startsWith("../")||t.startsWith("/"))throw new Error(`theme path must stay relative: ${e}`);return r}function mDt(e,t,r){let n={...e};return(r.carrySourceAssets?.css??"").trim().length>0&&(delete n.styles,n.settings=bDt(n.settings,t.settings)),yDt(n,t.customTemplates)}function yDt(e,t){if(!Array.isArray(t))return e;let r=Array.isArray(e.customTemplates)?e.customTemplates:[],n=new Set(t.map(s=>JTe(s)).filter(s=>!!s)),i=r.filter(s=>{let o=JTe(s);return!o||!n.has(o)});return{...e,customTemplates:[...i,...t]}}function JTe(e){if(!e||typeof e!="object"||Array.isArray(e))return;let t=e.name;return typeof t=="string"&&t.trim()?t:void 0}function bDt(e,t){let r=PD(e),n=PD(t),i=PD(r.spacing),s=PD(n.spacing);return{...r,spacing:{...i,...s}}}function PD(e){return e&&typeof e=="object"&&!Array.isArray(e)?{...e}:{}}function EDt(e){let t=new Map;for(let r of e)t.set(o1(r.relativePath),{...r,relativePath:o1(r.relativePath)});return[...t.values()]}function CDt(){return{version:1,sampledUrls:0,colors:[]}}function wDt(){return{version:1,sampledUrls:0,bySelector:{}}}function IDt(){return{version:1,sampledUrls:0,minWidth:[],maxWidth:[]}}var s2e="failOnConservationRailDrop",LD=["nav","complementary"];var o2e=["display","position","marginTop","marginBottom","marginLeft","marginRight","paddingTop","paddingBottom","paddingLeft","paddingRight","maxWidth","fontSize","fontFamily","fontWeight","lineHeight","letterSpacing","textTransform","color","backgroundColor","gap","justifyContent","flexWrap","borderBottomWidth"];function SDt(e,t,r,n){let i=new Map(t.map(a=>[a.match,a])),s=[],o=n!==void 0?{page:n}:{};for(let a of e){let c=i.get(a.match);if(!c){s.push({match:a.match,viewport:r,kind:"missing",prop:"element",source:"present",replica:"absent",replicaOnlyClasses:[],...o});continue}for(let u of o2e){let l=a.props[u],d=c.props[u];l!==void 0&&d!==void 0&&l!==d&&s.push({match:a.match,viewport:r,kind:"prop",prop:u,source:l,replica:d,replicaOnlyClasses:c.replicaOnlyClasses,...o})}for(let u of["top","left","width","height"])Math.abs(a.rect[u]-c.rect[u])>2&&s.push({match:a.match,viewport:r,kind:"rect",prop:u,source:String(a.rect[u]),replica:String(c.rect[u]),replicaOnlyClasses:c.replicaOnlyClasses,...o})}return s}var AG="*,*::before,*::after{transition:none!important;animation:none!important}html.js section{opacity:1!important;transform:none!important}.dla-reveal-js .wp-block-dla-reveal{opacity:1!important;transform:none!important}html{scroll-behavior:auto!important}",gG=`(() => { const top = window.setInterval(() => {}, 9999); for (let i = top; i >= 0; i--) window.clearInterval(i); -})()`,aDt=` +})()`,vDt=` if (typeof globalThis.__name === 'undefined') { globalThis.__name = function (fn) { return fn; }; } -`,cDt=`(args) => { +`,xDt=`(args) => { const { regions, battery } = args; const intersects = (r) => regions.some((g) => r.top <= g.bottom && r.bottom >= g.top); const counters = new Map(); @@ -2575,36 +2575,36 @@ ${i}${s}`}var GQt=`/* editor-reveal-reset.css \u2014 add_editor_style ONLY; neve }); } return out; -}`;async function uDt(e,t){return await e.evaluate(`(${cDt})(${JSON.stringify({regions:t,battery:JTe})})`)}var lDt={desktop:{width:1440,height:900,mobile:!1},mobile:{width:390,height:844,mobile:!0}},dDt="Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1";async function ZTe(e){let t=lDt[e.viewport],r=await e.browser.newContext({viewport:{width:t.width,height:t.height},...t.mobile?{isMobile:!0,hasTouch:!0,userAgent:dDt}:{}});await r.addInitScript(aDt);try{let n=await r.newPage(),i=async c=>(await n.goto(c,{waitUntil:"networkidle"}),await n.evaluate("document.fonts.ready"),await n.addStyleTag({content:oG}),await n.evaluate(aG),uDt(n,e.regions)),s=await i(e.sourceUrl),o=await i(e.replicaUrl),a=e.page;if(a===void 0)try{a=new URL(e.sourceUrl).pathname}catch{a=e.sourceUrl}return oDt(s,o,e.viewport,a)}finally{await r.close()}}var KTe=Rr(Kw(),1);function fDt(e,t){return e[t]>200&&e[t+1]<100&&e[t+2]<100&&e[t+3]>0}function XTe(e,t){let{scale:r}=t,n=t.gapTolerance??8,i=t.minPixels??6,s=KTe.PNG.sync.read(e),o=[];for(let l=0;l0&&o.push({y:l,x0:d,x1:f,count:p})}let a=[],c=null,u=()=>{c&&c.pixels>=i&&a.push({top:Math.round(c.top/r),bottom:Math.round(c.bottom/r),left:Math.round(c.left/r),right:Math.round(c.right/r),pixels:c.pixels}),c=null};for(let l of o)c&&l.y-c.bottom<=n?(c.bottom=l.y,c.left=Math.min(c.left,l.x0),c.right=Math.max(c.right,l.x1),c.pixels+=l.count):(u(),c={top:l.y,bottom:l.y,left:l.x0,right:l.x1,pixels:l.count});return u(),a}import{createHash as pDt}from"node:crypto";var hDt=new Set(["display","marginTop","marginBottom","marginLeft","marginRight","paddingTop","paddingBottom","paddingLeft","paddingRight","maxWidth","fontSize","fontWeight","lineHeight","letterSpacing","textTransform","color","backgroundColor","gap","justifyContent","flexWrap","borderBottomWidth"]),ADt={fontFamily:"font-authority"},gDt=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function mDt(e){let t=/^(.*)\[(\d+)\]$/.exec(e);return t?{selector:t[1],occurrence:Number(t[2])}:{selector:e,occurrence:0}}var yDt=/[:\[\]{}()"'\\]/;function bDt(e){return!(yDt.test(e)||e.startsWith("#")&&e.slice(1).includes("."))}function e2e(e){let t=new Map,r=[],n=[];for(let a of e){if(a.kind!=="prop"){r.push({...a,cause:"structural"});continue}let c=ADt[a.prop];if(c){r.push({...a,cause:c});continue}let{selector:u,occurrence:l}=mDt(a.match);if(!bDt(u)){r.push({...a,cause:"unsafe-selector"});continue}if(!hDt.has(a.prop)){r.push({...a,cause:"unpatchable-prop"});continue}if(l!==0){r.push({...a,cause:"occurrence-ambiguous"});continue}n.push({div:a,selector:u,occurrence:l})}let i=new Map;for(let a of n){let c=`${a.selector}|${a.occurrence}|${a.div.prop}|${a.div.viewport}`,u=i.get(c);u||(u=new Set,i.set(c,u)),u.add(a.div.source)}let s=new Set([...i.entries()].filter(([,a])=>a.size>1).map(([a])=>a));for(let a of n){let{div:c,selector:u,occurrence:l}=a,d=`${u}|${l}|${c.prop}|${c.viewport}`;if(s.has(d)){r.push({...c,cause:"page-conflict"});continue}let f=`${u}|${l}|${c.prop}|${c.source}`,p=t.get(f);p?p.viewports.includes(c.viewport)||p.viewports.push(c.viewport):t.set(f,{selector:u,occurrence:l,prop:gDt(c.prop),value:c.source,viewports:[c.viewport],cause:c.replicaOnlyClasses.length>0?"wp-interference":"cascade-divergence"})}let o=[...t.values()].sort((a,c)=>a.selector.localeCompare(c.selector)||a.prop.localeCompare(c.prop));for(let a of o)a.viewports.sort();return{overrides:o,unresolved:r}}var EDt=["desktop","mobile"];function t2e(e){let t=new Map;for(let i of e){let s=`${i.selector}|${i.occurrence}|${i.prop}`,o=t.get(s);o?o.push(i):t.set(s,[i])}let r=[],n=[];for(let[,i]of t){let s=new Set;for(let o of EDt){let a=new Set;for(let c of i)c.viewports.includes(o)&&a.add(c.value);a.size>1&&(s.add(o),r.push({selector:i[0].selector,occurrence:i[0].occurrence,prop:i[0].prop,viewport:o,values:[...a].sort()}))}if(s.size===0){n.push(...i);continue}for(let o of i){let a=o.viewports.filter(c=>!s.has(c));a.length>0&&n.push({...o,viewports:a})}}return{overrides:n,conflicts:r}}var CDt="@media (max-width: 767px)",wDt="@media (min-width: 768px)";function r2e(e){if(e.overrides.length===0)return"";let t=[],r=[],n=[];for(let s of e.overrides){let o=`${s.selector} { ${s.prop}: ${s.value}; }`;s.viewports.length===2?t.push(o):s.viewports[0]==="mobile"?r.push(o):n.push(o)}let i=["/* parity-patch: generated deterministically by the repair loop \u2014 same"," divergence inputs produce identical bytes. Source-measured values"," restoring authorial intent over residual WP interference. */",...t];return n.length&&i.push(`${wDt} { +}`;async function BDt(e,t){return await e.evaluate(`(${xDt})(${JSON.stringify({regions:t,battery:o2e})})`)}var kDt={desktop:{width:1440,height:900,mobile:!1},mobile:{width:390,height:844,mobile:!0}},_Dt="Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1";async function a2e(e){let t=kDt[e.viewport],r=await e.browser.newContext({viewport:{width:t.width,height:t.height},...t.mobile?{isMobile:!0,hasTouch:!0,userAgent:_Dt}:{}});await r.addInitScript(vDt);try{let n=await r.newPage(),i=async c=>(await n.goto(c,{waitUntil:"networkidle"}),await n.evaluate("document.fonts.ready"),await n.addStyleTag({content:AG}),await n.evaluate(gG),BDt(n,e.regions)),s=await i(e.sourceUrl),o=await i(e.replicaUrl),a=e.page;if(a===void 0)try{a=new URL(e.sourceUrl).pathname}catch{a=e.sourceUrl}return SDt(s,o,e.viewport,a)}finally{await r.close()}}var c2e=Dr(nI(),1);function TDt(e,t){return e[t]>200&&e[t+1]<100&&e[t+2]<100&&e[t+3]>0}function u2e(e,t){let{scale:r}=t,n=t.gapTolerance??8,i=t.minPixels??6,s=c2e.PNG.sync.read(e),o=[];for(let l=0;l0&&o.push({y:l,x0:d,x1:f,count:p})}let a=[],c=null,u=()=>{c&&c.pixels>=i&&a.push({top:Math.round(c.top/r),bottom:Math.round(c.bottom/r),left:Math.round(c.left/r),right:Math.round(c.right/r),pixels:c.pixels}),c=null};for(let l of o)c&&l.y-c.bottom<=n?(c.bottom=l.y,c.left=Math.min(c.left,l.x0),c.right=Math.max(c.right,l.x1),c.pixels+=l.count):(u(),c={top:l.y,bottom:l.y,left:l.x0,right:l.x1,pixels:l.count});return u(),a}import{createHash as RDt}from"node:crypto";var QDt=new Set(["display","marginTop","marginBottom","marginLeft","marginRight","paddingTop","paddingBottom","paddingLeft","paddingRight","maxWidth","fontSize","fontWeight","lineHeight","letterSpacing","textTransform","color","backgroundColor","gap","justifyContent","flexWrap","borderBottomWidth"]),DDt={fontFamily:"font-authority"},NDt=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function MDt(e){let t=/^(.*)\[(\d+)\]$/.exec(e);return t?{selector:t[1],occurrence:Number(t[2])}:{selector:e,occurrence:0}}var PDt=/[:\[\]{}()"'\\]/;function LDt(e){return!(PDt.test(e)||e.startsWith("#")&&e.slice(1).includes("."))}function l2e(e){let t=new Map,r=[],n=[];for(let a of e){if(a.kind!=="prop"){r.push({...a,cause:"structural"});continue}let c=DDt[a.prop];if(c){r.push({...a,cause:c});continue}let{selector:u,occurrence:l}=MDt(a.match);if(!LDt(u)){r.push({...a,cause:"unsafe-selector"});continue}if(!QDt.has(a.prop)){r.push({...a,cause:"unpatchable-prop"});continue}if(l!==0){r.push({...a,cause:"occurrence-ambiguous"});continue}n.push({div:a,selector:u,occurrence:l})}let i=new Map;for(let a of n){let c=`${a.selector}|${a.occurrence}|${a.div.prop}|${a.div.viewport}`,u=i.get(c);u||(u=new Set,i.set(c,u)),u.add(a.div.source)}let s=new Set([...i.entries()].filter(([,a])=>a.size>1).map(([a])=>a));for(let a of n){let{div:c,selector:u,occurrence:l}=a,d=`${u}|${l}|${c.prop}|${c.viewport}`;if(s.has(d)){r.push({...c,cause:"page-conflict"});continue}let f=`${u}|${l}|${c.prop}|${c.source}`,p=t.get(f);p?p.viewports.includes(c.viewport)||p.viewports.push(c.viewport):t.set(f,{selector:u,occurrence:l,prop:NDt(c.prop),value:c.source,viewports:[c.viewport],cause:c.replicaOnlyClasses.length>0?"wp-interference":"cascade-divergence"})}let o=[...t.values()].sort((a,c)=>a.selector.localeCompare(c.selector)||a.prop.localeCompare(c.prop));for(let a of o)a.viewports.sort();return{overrides:o,unresolved:r}}var FDt=["desktop","mobile"];function d2e(e){let t=new Map;for(let i of e){let s=`${i.selector}|${i.occurrence}|${i.prop}`,o=t.get(s);o?o.push(i):t.set(s,[i])}let r=[],n=[];for(let[,i]of t){let s=new Set;for(let o of FDt){let a=new Set;for(let c of i)c.viewports.includes(o)&&a.add(c.value);a.size>1&&(s.add(o),r.push({selector:i[0].selector,occurrence:i[0].occurrence,prop:i[0].prop,viewport:o,values:[...a].sort()}))}if(s.size===0){n.push(...i);continue}for(let o of i){let a=o.viewports.filter(c=>!s.has(c));a.length>0&&n.push({...o,viewports:a})}}return{overrides:n,conflicts:r}}var ODt="@media (max-width: 767px)",UDt="@media (min-width: 768px)";function f2e(e){if(e.overrides.length===0)return"";let t=[],r=[],n=[];for(let s of e.overrides){let o=`${s.selector} { ${s.prop}: ${s.value}; }`;s.viewports.length===2?t.push(o):s.viewports[0]==="mobile"?r.push(o):n.push(o)}let i=["/* parity-patch: generated deterministically by the repair loop \u2014 same"," divergence inputs produce identical bytes. Source-measured values"," restoring authorial intent over residual WP interference. */",...t];return n.length&&i.push(`${UDt} { ${n.join(` `)} -}`),r.length&&i.push(`${CDt} { +}`),r.length&&i.push(`${ODt} { ${r.join(` `)} }`),i.join(` `)+` -`}function n2e(e){let t=e.map(r=>`${r.match}|${r.viewport}|${r.kind}|${r.prop}|${r.source}|${r.replica}`).sort();return pDt("sha1").update(t.join(` -`)).digest("hex")}async function qh(e,t){return(await Ur(e,[...t],{timeout:6e4,maxBuffer:10*1024*1024})).trim()}async function BDt(e,t){let r=TDt(t?.headers??_Dt(e)),n=await nc(kDt(e),{...r?{headers:r}:{}});return new Response(Uint8Array.from(n.body).buffer,{status:n.status,headers:n.headers})}function kDt(e){return typeof e=="string"?e:e instanceof URL?e.toString():typeof Request<"u"&&e instanceof Request?e.url:String(e)}function _Dt(e){if(typeof Request<"u"&&e instanceof Request)return e.headers}function TDt(e){if(!e)return;let t=new Headers(e),r={};return t.forEach((n,i)=>{r[i]=n}),Object.keys(r).length>0?r:void 0}function QD(e,t){ND(fG(e),{recursive:!0});let r=`${e}.tmp.${process.pid}`;try{L0(r,t),r1(r,e)}catch(n){try{DD(r)}catch{}throw n}}function uG(e){return e.replace(/\s+/g," ").trim()}function s2e(e){let t=e("body").children().first().get(0)??e.root().children().first().get(0);return t&&Se(t)?t:null}function o2e(e){return e==="header"||e==="nav"||e==="footer"||e==="aside"||e==="complementary"}function RDt(e,t){let r=t.tagName.toLowerCase(),n=1;for(let s=t.prev;s;s=s.prev)Se(s)&&s.tagName?.toLowerCase()===r&&(n+=1);let i=e(t);return{tag:r,id:(i.attr("id")??"").trim()||null,classes:(i.attr("class")??"").split(/\s+/).filter(Boolean),nthOfType:n}}function QDt(e){let t=de(e),r=new Set;return n=>{let i=de(n),s=i("body").children().first().get(0)??i.root().children().first().get(0);if(!s||!Se(s))return jm(n);let o=i.html(s),a=s.tagName.toLowerCase(),c=t(a).toArray().filter(u=>Se(u));for(let u of c)if(!r.has(u)&&t.html(u)===o)return r.add(u),jp(RDt(t,u));return jm(n)}}function lG(e,t,r=jm){let n=fR(e.html);return{kind:t,selector:r(e.html),...o2e(n)?{role:n}:{}}}function DDt(e,t=jm){let r=fR(e.html);return{kind:"page_body_section",selector:t(e.html),...o2e(r)?{role:r}:{}}}function NDt(e){let t=de(e),r=[],n=s2e(t);if(n){let i=(t(n).attr("id")??"").trim();i&&r.push(i)}return t("[id]").each((i,s)=>{let o=(t(s).attr("id")??"").trim();o&&!r.includes(o)&&r.push(o)}),r}function dG(e,t){if(!t.trim())return!1;let r=de(e.html),n=s2e(r),i=r(n||"body"),s=n?(r(n).attr("class")??"").split(/\s+/).filter(Boolean):[],o=de(t),a=uG(o.text()),c=new Set;o("[id]").each((p,h)=>{let A=(o(h).attr("id")??"").trim();A&&c.add(A)});let u=new Set;o("[class]").each((p,h)=>{for(let A of(o(h).attr("class")??"").split(/\s+/).filter(Boolean))u.add(A)});let l=NDt(e.html);if(l.some(p=>c.has(p)||t.includes(`"anchor":${JSON.stringify(p)}`))||t.includes(`"anchor":${JSON.stringify(e.id)}`)||s.some(p=>u.has(p)))return!0;if(l.length>0||s.length>0)return!1;let d=r("a[href]").toArray().map(p=>uG(r(p).text())).filter(Boolean);if(d.length>0&&d.every(p=>a.includes(p)))return!0;let f=uG(i.text());return f.length>=24&&a.includes(f)}function MDt(e,t){let r=t.filter(i=>i.kind==="page_body_section"),n=t.filter(i=>i.kind==="page_body_section"?!1:i.selector===e.selector?!0:i.selector===void 0&&(i.role===void 0||i.role===e.role));return[...r,...n]}function PDt(e,t,r,n){let i=e.map(a=>qm([a],MDt(a,t),r,n).assignments[0]),s={};for(let a of e)s[a.role]=(s[a.role]??0)+1;let o=i.filter(a=>a.kind==="unassigned").map(a=>a.landmark);return{page:r,entryUrl:n,assignments:i,unassignedRegions:o,counts:{sourceLandmarks:s,assigned:i.filter(a=>["page_body_section","header_part","footer_part"].includes(a.kind)).length,unassigned:o.length,nonActionable:i.filter(a=>a.kind==="non_actionable").length}}}var a2e=async(e,t)=>{let r=e.dir,n=e.studioSitePath,i=e.outputDir??r;if(!r)return t.errorResult("dir is required");if(!n)return t.errorResult("studioSitePath is required");if(!i)return t.errorResult("outputDir is required");let s=xDt(zw(n)),o=[],a=e.createSite===!0,c=Zc(s);if(!c&&a){let $=e.siteTitle??(vDt(s.replace(/\/+$/,""))||"Local Site");try{let Ae=await uwe({name:$,sitePath:s,adminUser:process.env.WP_ADMIN_USER,adminPassword:process.env.WP_ADMIN_PASS});c=Ae.wpRoot,Ae.created&&o.push(`created Studio site "${$}" at ${s}`)}catch(Ae){return t.errorResult(`failed to create Studio site at ${s}: ${Ae.message}`)}}if(!c)return t.errorResult(`no wp-content found under ${s} (or its wordpress/ subdir) \u2014 pass createSite:true to provision a fresh Studio site`);let u=e.skipDesign===!0,l=e.skipCompare===!0,d=e.editorSurface===!0,f=e.repair!==!1,p=Math.min(Math.max(Number(e.maxRepairRounds??2),0),5),h=e[YTe]===!0,A=e.carryCss!==!1,g=e.wpUrl?.replace(/\/$/,""),m=e.nativeBehaviors===!0,b=e.editableIslands!==!1;m&&e.carryJs===!0&&o.push("nativeBehaviors forces carryJs off (carried source JS would double-drive block behaviors)");let E=m?!1:e.carryJs!==!1,C;if(e.dataModel!==!1){for(let $ of[xr(i,"data-model.json"),xr(r,"data-model.json")])if(jh($)){try{let Ae=JSON.parse(cf($,"utf8"));if(Ae&&Ae.cpt?.slug&&Array.isArray(Ae.mounts)){let et=NI(Ae);try{let At=xr(i,"reports");ND(At,{recursive:!0}),L0(xr(At,"data-model-validation.json"),JSON.stringify(et,null,2))}catch{}for(let At of et.warnings)o.push(`data-model warning: ${At}`);if(et.valid)C=Ae;else{for(let At of et.errors)o.push(`data-model ERROR: ${At}`);o.push(`data-model.json invalid (${et.errors.length} error(s)) \u2014 data path skipped; see reports/data-model-validation.json`)}}else o.push(`data-model.json at ${$} is missing cpt/mounts \u2014 ignored`)}catch(Ae){o.push(`data-model.json parse failed (${$}): ${Ae.message}`)}break}}let w=C?.mounts.filter($=>$.sourceSelector)??[],T=await xD({dir:r,outputDir:i,nativeBehaviors:m,editableIslands:b,cardMounts:w},t);if(T.isError)return T;let _=JSON.parse(T.content[0].text),N=_.formsConverted??0,k=_.islandsConverted??0,v={lowConfidence:_.lowConfidence,failedPageCount:_.failedPageCount,failedPagesList:_.failedPagesList,stylingDrops:_.stylingDrops??0},M={tabs:_.behaviors?.tabs??0,slider:_.behaviors?.slider??0,modal:_.behaviors?.modal??0},O=new Set;M.tabs>0&&O.add("tabs"),M.slider>0&&O.add("slider"),M.modal>0&&O.add("modal");let S=CD(r),I=e.siteTitle??S.pages.find($=>$.slug==="home")?.title??"Local Site",R=e.themeSlug??"local-site-theme",U,J="",K=!1,q=xr(i,"source"),W=async $=>{await $.addStyleTag({content:oG}),await $.evaluate(aG)};if(!u){let $;try{$=await J7(r);let Ae=S.pages.map(ut=>$.urlForPage(ut.relPath));await Rw({urls:Ae,outputDir:q,primaryUrl:$.url,captureDesign:!0,concurrency:6,prepareCapture:W});let et=ut=>JSON.parse(cf(xr(q,ut),"utf8")),At=S.pages.map(ut=>ut.html);for(let ut of SDt(r))ut.endsWith(".css")&&At.push(cf(xr(r,ut),"utf8"));U=$Te({palette:et("palette.json"),typography:et("typography.json"),breakpoints:et("breakpoints.json"),cssSources:At});let ht=Oj(At);if(ht.length>0){let ut=await vTe(ht,{themeDir:xr(i,"theme")});J=ut.localizedCss;for(let Dt of ut.errors)o.push(`font self-host failed: ${Dt.url}: ${Dt.error}`)}K=!0}catch(Ae){o.push(`design capture failed (default styling used): ${Ae.message}`)}finally{await $?.close()}}let ue,ne,G={},se=0,De=!1;if(A||E||m){let $=Vm(r,S.pages.map(Ae=>({relPath:Ae.relPath,html:Ae.html})));$.skippedUnlinked.length>0&&o.push(`unlinked top-level assets skipped (linked assets exist; stale-revision protection): ${$.skippedUnlinked.join(", ")}`),G=$.imgRewritesByPage;for(let Ae of $.imgAssets)try{let et=xr(i,"theme",Ae.themeRel);ND(fG(et),{recursive:!0}),i2e(Ae.srcAbs,et),se++,/\.svg$/i.test(Ae.themeRel)&&(De=!0)}catch(et){o.push(`carry img ${Ae.themeRel}: ${et.message}`)}if(A||E){let Ae=J?$.css.replace(Bw,Bw+J+` - -`):$.css,et=E?E_e($.js,S.pages):"";if(et&&C){let At=ETe(et,C.mounts.map(ut=>ut.selector)),ht=wTe(At.js,C.sourceArrays??[]);et=`${ht.js} -${CTe} -`,o.push(`data: neutralized ${At.removed} mount call(s), rebound ${ht.rewritten} lookup(s)`)}if(ue={css:A?Ae:"",js:et},A)for(let At of $.mediaAssets)try{let ht=xr(i,"theme",At.themeRel);ND(fG(ht),{recursive:!0}),i2e(At.srcAbs,ht)}catch(ht){o.push(`carry media ${At.themeRel}: ${ht.message}`)}}ne=m?GI({css:$.css,js:$.js},{sectionKinds:O}):void 0}if(ne){let $=xr(i,"behavior-gaps.json"),Ae=`${$}.tmp.${process.pid}`;try{L0(Ae,JSON.stringify({schema:1,site:r,gaps:ne.gaps},null,2)+` -`),r1(Ae,$)}catch(et){try{DD(Ae)}catch{}o.push(`behavior-gaps write failed: ${et.message}`)}}let te=A&&(ue?.css??"").trim().length>0,_e=E&&(ue?.js??"").trim().length>0,Et;if(N>=1){let Ae=_Te({sourceCss:ue?.css??"",formsConverted:N}).css.trim();Ae.length>0&&(Et=Ae)}let ve=S.pages.find($=>$.slug==="home")??S.pages[0],Me=!!ne?.sticky&&te;ne?.sticky&&!Me&&o.push("sticky behavior detected but not emitted (requires carried chrome header)");let Re=jTe(S,ve.slug),Vt=C?C.mounts.map($=>BD($).css).filter(Boolean).join(` -`):"",Rt;{let $=[];if(te){let et="";try{et=cf(DR(i),"utf8")}catch{}$.push(et)}Vt&&$.push(Vt);let Ae=C_e(...$);Rt=Ae.length>0?Ae:void 0}let Gt=(()=>{for(let $ of[ve,...S.pages]){let Ae=$?.html?.match(/]*\bclass="([^"]+)"/i);if(Ae)return Ae[1]}})(),Hr=aR(ve.html,ue?.css??""),H=Object.fromEntries(S.pages.filter($=>$.bodyData).map($=>[$.slug===ve.slug?"/":`/${$.slug}/`,$.bodyData])),fe=[...Re.values()],ae,ie="",le="";try{ae=await kj(r,{outDir:xr(i,"theme"),themeMeta:{slug:R,name:I},...U?{foundationAggregates:U.foundationAggregates}:{},fetchImpl:BDt,coverageFloor:0,carrySourceCss:!1,variationHoist:!1,hooks:{onFoundation:async $=>U?.tokens??$,onSection:async $=>$,onAssets:async $=>({keep:$.assets.map(Ae=>Ae.relPath),decoration:[]}),onRefine:async $=>zTe($,{site:S,siteTitle:I,themeSlug:R,mainClass:Gt,mainWrapperClass:Hr,interiorChromeTemplates:fe,carrySourceAssets:ue,instanceStylesCss:Rt,jetpackFormParityCss:Et,allowSourceChromeMounts:te&&_e,...Me?{sticky:ne.sticky}:{}})}}),ie=ae.model.parts["header.html"]??"",le=ae.model.parts["footer.html"]??"";for(let $ of ae.warnings)o.push($)}catch($){return t.errorResult(`theme build failed: ${$.message}`)}let xe=0,Ce=[];try{let $=[...m?[DTe()]:[],...b&&k>0?[l0()]:[]],Ae=HTe({siteTitle:I,themeSlug:R,carrySourceAssets:ue,instanceStylesCss:Rt,jetpackFormParityCss:Et,bodyDataByPath:H}),et=VTe({siteTitle:I,themeSlug:R,mainClass:Gt,mainWrapperClass:Hr,interiorChromeTemplates:fe,carrySourceAssets:ue,instanceStylesCss:Rt,jetpackFormParityCss:Et});QD(xr(ae.outDir,"functions.php"),Ae);let At=GTe(ae,{functionsPhp:Ae,extraThemeFiles:et}),ht=sc({wpRoot:c,themeSlug:R,themeFiles:At.themeFiles,assetSourceDir:At.assetSourceDir,...$.length>0?{blockPlugins:$}:{}});xe=ht.themeWritten,Ce=ht.pluginSlugs}catch($){return t.errorResult(`theme write failed: ${$.message}`)}if(Et)try{QD(xr(i,Hh.outputFileName),Et+` -`)}catch($){o.push(`jetpack form parity css mirror write failed: ${$.message}`)}{let $=xr(c,"wp-content","themes",R);try{if(!_e){let Ae=xr($,"assets","js","source.js");jh(Ae)&&DD(Ae)}if(!te){let Ae=xr($,"assets","css","source.css");jh(Ae)&&DD(Ae)}}catch(Ae){o.push(`stale carry asset cleanup failed: ${Ae.message}`)}}try{await qh(s,["theme","activate",R])}catch($){o.push(`theme activate failed: ${$.message}`)}if(Z_e(N))try{await qh(s,af.wpArgs);try{await qh(s,WI.wpArgs)}catch($){o.push(X_e($))}}catch($){o.push(K_e($))}for(let $ of Ce)try{await qh(s,["plugin","activate",$])}catch(Ae){o.push(`plugin activate failed for ${$}: ${Ae.message}`)}let pe=!1;if(De){let $=await Hd(s,"safe-svg",qh);$.ok?pe=!0:o.push(`safe-svg install failed: ${$.error}`)}if(se>0&&o.push(`carried ${se} HTML asset(s) into the theme`+(De?` (safe-svg ${pe?"ensured":"NOT installed"})`:"")),!g)try{g=(await qh(s,["option","get","siteurl"])).trim().replace(/\/$/,"")}catch($){g="http://localhost:8889",o.push(`siteurl resolve failed, using ${g}: ${$.message}`)}for(let $ of Yw())try{await qh(s,$)}catch(Ae){o.push(`cache flush failed (${$.slice(0,2).join(" ")}): ${Ae.message}`)}if(C)try{let $=await mTe({model:C,studioSitePath:s,wpRoot:c,sourceDir:r}),Ae=($.skippedModified?`, ${$.skippedModified} skipped (edited in wp-admin)`:"")+($.collisions?`, ${$.collisions} slug-collision(s)`:"")+($.defaultsTrashed?`, ${$.defaultsTrashed} WP seed default(s) trashed`:"");for(let et of $.mediaErrors)o.push(`data media: ${et.sourceUrl}: ${et.error}`);o.push(`data: ${$.inserted} inserted, ${$.updated} updated, ${$.terms} term(s), ${$.mediaInstalled} media item(s) installed${Ae}; mu-plugins ${$.muPlugins.join(", ")}`)}catch($){o.push(`data install failed: ${$.message}`)}let Ze=eTe(S,i),We=Ze.items.filter($=>!$.content.trim()).map($=>$.slug),Ue=[];for(let $ of Ze.items){let Ae=S.pages.find(At=>At.slug===$.slug);if(!Ae)continue;let et=Re.get($.slug);Ue.push(...QTe({pageSlug:$.slug,sourceHtml:Ae.html,postContent:$.content,partMarkup:[ie,le,...et?[et.partMarkup]:[]]}))}let Je=xr(i,"conservation-leaks.json");try{QD(Je,JSON.stringify({schema:1,site:r,leaks:Ue},null,2)+` -`)}catch($){o.push(`conservation leaks report write failed: ${$.message}`)}let wt=xr(i,"region-audit.json"),Wt=()=>({ok:!0,status:"pass",unassignedRegions:0,hardFailRegions:0,artifact:wt,railHardFail:{enabled:h,roles:RD,minLinks:2}}),oe=Wt();try{let $=QDt(ve.html),Ae=pR(ve.html),et=qTe(ve.html),At=et.find(tr=>tr.role==="header")??et.find(tr=>tr.role==="nav")??null,ht=et.find(tr=>tr.role==="footer")??null,ut=[...et.filter(tr=>tr.role==="body"&&tr.chromeSource!=="layout-rail").map(tr=>DDt(tr,$))];At&&At.chromeSource!=="layout-rail"&&dG(At,ie)&&ut.push(lG(At,"header_part",$)),ht&&dG(ht,le)&&ut.push(lG(ht,"footer_part",$));for(let tr of et.filter(yi=>yi.chromeSource==="layout-rail"))dG(tr,ie)&&ut.push(lG(tr,"header_part",$));let Dt=PDt(Ae,ut,ve.slug,ve.relPath),kn=Dt.unassignedRegions.filter(tr=>RD.includes(tr.role)&&(tr.linkCount??0)>=2),Vn=h?kn:[];oe={ok:Vn.length===0,status:Vn.length>0?"fail":Dt.counts.unassigned>0?"warn":"pass",unassignedRegions:Dt.counts.unassigned,hardFailRegions:Vn.length,artifact:wt,railHardFail:{enabled:h,roles:RD,minLinks:2}};try{let tr={schema:1,site:r,pages:[Dt],unassignedRegions:Dt.counts.unassigned,hardFailRegions:Vn};QD(wt,JSON.stringify(tr,null,2)+` -`)}catch(tr){o.push(`region audit write failed: ${tr.message}`)}}catch($){o.push(`region audit failed: ${$.message}`),oe=Wt()}let ce=[],Oe=[];for(let $ of Ze.items)try{let Ae;if(C){let ut=bTe($.content,C.mounts);ut.injected.length>0&&(Ae=ut.markup,o.push(`data: ${$.slug} \u2192 query loop(s) for ${ut.injected.join(", ")}`))}let et=S.pages.find(ut=>ut.slug===$.slug),At=et?G[et.relPath]:void 0;At&&At.length>0&&(Ae=xj(Ae??$.content,At,R));let ht=await rTe({item:$,outputDir:i,studioSitePath:s,contentOverride:Ae});!ht||ht.action==="error"?Oe.push({slug:$.slug,error:ht?.error??"unsupported item"}):ce.push({slug:$.slug,postId:ht.postId})}catch(Ae){Oe.push({slug:$.slug,error:Ae.message})}let Xe=!1;{let $={};for(let[ht,ut]of VR({title:I}))$[ht]=ut;let Ae=ce.filter(ht=>ht.postId!=null).map(ht=>({postId:ht.postId,slug:ht.slug,template:Re.get(ht.slug)?.templateName??"page-local"})),et=ce.find(ht=>ht.slug===Ze.homeSlug),At=et?.postId!=null?et.postId:void 0;try{let ht=await iTe({payload:{options:$,templateAssigns:Ae,...At!==void 0?{frontPageId:At}:{}},studioSitePath:s});Xe=ht.applied.frontPage;for(let ut of ht.errors)ut.item.startsWith("option:")?o.push(`${ut.item.slice(7)} set failed: ${ut.error}`):ut.item.startsWith("template:")?o.push(`template assign failed for ${ut.item.slice(9)}: ${ut.error}`):ut.item==="frontPage"?o.push(`front page set failed: ${ut.error}`):o.push(`site finalize ${ut.item} failed: ${ut.error}`)}catch(ht){let ut=[...Object.keys($).map(Dt=>`option ${Dt}`),...Ae.map(Dt=>`template ${Dt.slug}`),...At!==void 0?["front page"]:[]];o.push(`site finalize failed (attempted: ${ut.join(", ")}): ${ht.message}`)}}let Ye=.99,Te=xr(i,"replica"),Ht=ce.filter($=>$.postId!=null).map($=>$.slug===Ze.homeSlug?`${g}/`:`${g}/${$.slug}/`),ur;if(!u&&!l&&K)try{await Rw({urls:Ht,outputDir:Te,primaryUrl:g,concurrency:6,prepareCapture:W});let $=await yD({originDir:xr(q,"screenshots"),replicaDir:xr(Te,"screenshots")}),Ae=Dt=>$.results.map(kn=>kn[Dt]?.score).filter(kn=>typeof kn=="number"),et=Dt=>Dt.length?Dt.reduce((kn,Vn)=>kn+Vn,0)/Dt.length:0,At=$.results.map(Dt=>{let kn=Dt.desktop?.score??null,Vn=Dt.mobile?.score??null;return{pathname:Dt.pathname,desktop:kn,mobile:Vn,desktopHeightPass:Dt.desktop?.heightPass,mobileHeightPass:Dt.mobile?.heightPass,passes:kn!==null&&Vn!==null&&kn>=Ye&&Vn>=Ye&&Dt.desktop?.heightPass!==!1&&Dt.mobile?.heightPass!==!1}});ur={floor:Ye,allPass:At.length>0&&At.every(Dt=>Dt.passes),avgDesktop:et(Ae("desktop")),avgMobile:et(Ae("mobile")),pages:At};let ht=xr(i,"parity-report.json"),ut=`${ht}.tmp.${process.pid}`;L0(ut,JSON.stringify({schema:1,comparison:$,parity:ur},null,2)+` -`),r1(ut,ht)}catch($){o.push(`compare failed: ${$.message}`)}if(f&&ur&&!ur.allPass&&p>0&&!te&&o.push("repair skipped: requires carried source css (carryCss)"),f&&ur&&!ur.allPass&&p>0&&te){let $=0,Ae,et=!1,At=new Map,ht=[],ut=[],Dt=ur;for(;!Dt.allPass&&$!Nt.passes);ut=[];let Vn=new Map;try{let Nt=xr(Te,"screenshots","manifest.json");if(jh(Nt)){let Nn=JSON.parse(cf(Nt,"utf8"));for(let[os,Mn]of Object.entries(Nn.entries))try{Vn.set(new URL(os).pathname,Mn.slug)}catch{}}}catch(Nt){o.push(`repair round ${$}: manifest read failed: ${Nt.message}`);break}let tr=[],yi,xa,Ba=!0;try{yi=await J7(r),xa=await $a({});for(let Nt of kn){let Nn=Vn.get(Nt.pathname);if(!Nn)continue;let os=S.pages.find(Mn=>{let In=Mn.slug===Ze.homeSlug?`${g}/`:`${g}/${Mn.slug}/`;return new URL(In).pathname===Nt.pathname});if(os)for(let Mn of["desktop","mobile"]){let In=Nt[Mn],so=Mn==="desktop"?Nt.desktopHeightPass:Nt.mobileHeightPass;if(In!==null&&In>=Ye){so===!1&&ut.push(`${Nt.pathname} ${Mn}`);continue}let _s=xr(Te,"screenshots","diff",`${Nn}.${Mn}.diff.png`);if(!jh(_s))continue;let uu;try{uu=XTe(cf(_s),{scale:Mn==="desktop"?YB:1})}catch{continue}if(uu.length===0)continue;let c1=yi.urlForPage(os.relPath),gl=os.slug===Ze.homeSlug?`${g}/`:`${g}/${os.slug}/`;try{let U0=await ZTe({browser:xa,sourceUrl:c1,replicaUrl:gl,viewport:Mn,regions:uu});tr.push(...U0)}catch(U0){o.push(`repair round ${$}: probe ${Nt.pathname} ${Mn}: ${U0.message}`)}}}}catch(Nt){o.push(`repair round ${$}: probe setup failed: ${Nt.message}`),Ba=!1}finally{await xa?.close(),await yi?.close()}if(!Ba)break;let ka=e2e(tr),Al=n2e(tr);if(Al===Ae){ht=ka.unresolved;break}Ae=Al;for(let Nt of ka.overrides){let Nn=`${Nt.selector}|${Nt.occurrence}|${Nt.prop}|${Nt.value}`,os=At.get(Nn);if(os)for(let Mn of Nt.viewports)os.viewports.includes(Mn)||os.viewports.push(Mn);else At.set(Nn,{...Nt,viewports:[...Nt.viewports]})}ht=ka.unresolved;let Gh=t2e([...At.values()].sort((Nt,Nn)=>Nt.selector.localeCompare(Nn.selector)||Nt.prop.localeCompare(Nn.prop)));for(let Nt of Gh.conflicts)o.push(`repair: page-conflict (unpatchable globally) ${Nt.selector} ${Nt.prop} ${Nt.viewport}: ${Nt.values.join(" vs ")}`);let Wh={overrides:Gh.overrides,unresolved:ht};if(Wh.overrides.length===0){ut.length>0&&o.push(`repair: height-only failures (content lost below the crop; not deterministically patchable): ${ut.join(", ")}`);break}let uf=r2e(Wh);try{sc({wpRoot:c,themeSlug:R,themeFiles:[{relativePath:"assets/css/parity-patch.css",content:uf}]});let Nt=xr(i,"parity-patch.css"),Nn=`${Nt}.tmp.${process.pid}`;L0(Nn,uf),r1(Nn,Nt)}catch(Nt){o.push(`repair round ${$}: patch write failed: ${Nt.message}`);break}try{await Rw({urls:Ht,outputDir:Te,primaryUrl:g,concurrency:6,prepareCapture:W,force:!0});let Nn=(await yD({originDir:xr(q,"screenshots"),replicaDir:xr(Te,"screenshots")})).results.map(In=>{let so=In.desktop?.score??null,_s=In.mobile?.score??null;return{pathname:In.pathname,desktop:so,mobile:_s,desktopHeightPass:In.desktop?.heightPass,mobileHeightPass:In.mobile?.heightPass,passes:so!==null&&_s!==null&&so>=Ye&&_s>=Ye&&In.desktop?.heightPass!==!1&&In.mobile?.heightPass!==!1}}),os=In=>Nn.map(so=>so[In]).filter(so=>so!==null),Mn=In=>In.length?In.reduce((so,_s)=>so+_s,0)/In.length:0;Dt={...Dt,allPass:Nn.length>0&&Nn.every(In=>In.passes),avgDesktop:Mn(os("desktop")),avgMobile:Mn(os("mobile")),pages:Nn}}catch(Nt){o.push(`repair round ${$}: re-compare failed: ${Nt.message}`);break}if($++,Dt.allPass){et=!0;break}}ur={...Dt,repair:{rounds:$,overrides:At.size,unresolved:ht,converged:et,...ut.length>0?{heightOnly:ut}:{}}}}let ti;if(d){let $=process.env.WP_ADMIN_PASS;if(!$)o.push("editorSurface skipped: set WP_ADMIN_PASS (editor login credential) in the environment");else if(!g)o.push("editorSurface skipped: replica wpUrl not resolved");else try{let Ae=new Map;try{let tr=xr(q,"screenshots","manifest.json");if(jh(tr)){let yi=JSON.parse(cf(tr,"utf8"));for(let[xa,Ba]of Object.entries(yi.entries??{}))try{Ae.set(new URL(xa).pathname,Ba.slug)}catch{}}}catch{}let et=[];for(let tr of ce){let yi=S.pages.find(Gh=>Gh.slug===tr.slug);if(!yi)continue;let xa="";try{xa=cf(Km(i,tr.slug),"utf8")}catch{continue}if(!xa.trim())continue;let Ba=yi.slug===Ze.homeSlug?"/":`/${yi.slug}/`,ka=Ae.get(Ba),Al=ka?xr(q,"screenshots","desktop",`${ka}.png`):null;et.push({pathname:Ba,slug:tr.slug,markup:xa,blocksPath:!1,sourceShotDesktop:Al&&jh(Al)?Al:null})}let At=await aTe({wpUrl:g,sitePath:s,username:process.env.WP_ADMIN_USER??"admin",password:$}),ht;try{ht=await cTe({session:At,pages:et,floor:Ye,diffDir:xr(Te,"screenshots")})}finally{await At.close()}let ut=ht.results.filter(tr=>tr.editorScore!==null),Dt=ut.length>0?ut.reduce((tr,yi)=>tr+(yi.editorScore??0),0)/ut.length:null;ti={scored:ut.length,skipped:ht.results.length-ut.length,avgEditorScore:Dt,repairTasks:ht.repairTasks.length};let kn=xr(i,"editor-report.json"),Vn=`${kn}.tmp.${process.pid}`;L0(Vn,JSON.stringify({schema:1,surface:"editor",results:ht.results,repairTasks:ht.repairTasks},null,2)+` -`),r1(Vn,kn)}catch(Ae){o.push(`editorSurface failed: ${Ae.message}`)}}let Dn=t.textResult({pages:Ze.items.length,installed:ce.length,...ti!==void 0?{editorSurface:ti}:{},failedInstalls:Oe,missingSidecars:Ze.missingSidecars,emptySidecars:We,ingest:v,...b?{islandsConverted:k}:{},themeSlug:R,themeWritten:xe,frontPageSet:Xe,designCaptured:K,carried:{css:te,js:_e},conservationLeaks:{count:Ue.length,artifact:Je},conservation:oe,...ne!==void 0?{behaviors:{reveal:!!ne.reveal,sticky:Me,tabs:M.tabs,slider:M.slider,modal:M.modal,gaps:ne.gaps.length}}:{},...ur!==void 0?{parity:ur}:{},warnings:o});return oe.status==="fail"&&(Dn.isError=!0),Dn};var c2e=async(e,t)=>{let r=e.patterns;if(!Array.isArray(r))return t.errorResult("patterns[] is required");let n=XR({patterns:r});return t.textResult(n)};import{existsSync as LDt,readdirSync as FDt,readFileSync as ODt}from"node:fs";import{join as l2e}from"node:path";function u2e(e){let t=[],r=0,n=0,i=0;return e.forEach((s,o)=>{let a=`section[${o}] (index ${typeof s?.index=="number"?s.index:"?"})`;if(typeof s!="object"||s===null||!Array.isArray(s.findings)||!Array.isArray(s.applied)||!Array.isArray(s.skipped)){t.push(`${a}: malformed report \u2014 findings/applied/skipped arrays are required`);return}let c=new Set;for(let d of s.findings){if(typeof d?.id!="string"||d.id===""){t.push(`${a}: finding with missing id`);continue}c.has(d.id)&&t.push(`${a}: duplicate finding id "${d.id}"`),c.add(d.id)}let u=new Set(s.applied.map(d=>d?.id).filter(d=>typeof d=="string")),l=new Set(s.skipped.map(d=>d?.id).filter(d=>typeof d=="string"));for(let d of c){let f=u.has(d),p=l.has(d);f&&p&&t.push(`${a}: finding "${d}" appears in both applied and skipped`),!f&&!p&&t.push(`${a}: finding "${d}" is UNACCOUNTED \u2014 add it to applied (with summary) or skipped (with reason)`)}for(let d of s.applied)d?.id&&!c.has(d.id)&&t.push(`${a}: applied id "${d.id}" has no matching finding`);for(let d of s.skipped)d?.id&&!c.has(d.id)&&t.push(`${a}: skipped id "${d.id}" has no matching finding`);r+=c.size,n+=s.applied.length,i+=s.skipped.length}),{ok:t.length===0,errors:t,sections:e.length,findings:r,applied:n,skipped:i}}var d2e=async(e,t)=>{let r=e.outputDir,n=e.slug;if(!r||!n)return t.errorResult("outputDir and slug are required");if(!/^[a-z0-9][a-z0-9._-]*$/i.test(n)||n.includes(".."))return t.errorResult(`Invalid slug "${n}" \u2014 expected a plain page slug (letters/digits/dot/dash/underscore).`);let i=l2e(r,"refine",n);if(!LDt(i))return t.errorResult(`No refine reports at ${i} \u2014 match-section must write refine//.json before validation.`);let s=[],o=[];for(let c of FDt(i).filter(u=>u.endsWith(".json")).sort())try{s.push(JSON.parse(ODt(l2e(i,c),"utf8")))}catch{o.push(c)}if(o.length>0)return t.errorResult(`Unparseable refine report file(s): ${o.join(", ")}`);if(s.length===0)return t.errorResult(`No section reports found in ${i}.`);let a=u2e(s);return a.ok?t.textResult({ok:!0,slug:n,sections:a.sections,findings:a.findings,applied:a.applied,skipped:a.skipped}):t.errorResult(`Refine coverage FAILED for ${n}: +`}function p2e(e){let t=e.map(r=>`${r.match}|${r.viewport}|${r.kind}|${r.prop}|${r.source}|${r.replica}`).sort();return RDt("sha1").update(t.join(` +`)).digest("hex")}async function Yh(e,t){return(await jr(e,[...t],{timeout:6e4,maxBuffer:10*1024*1024})).trim()}async function zDt(e,t){let r=WDt(t?.headers??GDt(e)),n=await sc(VDt(e),{...r?{headers:r}:{}});return new Response(Uint8Array.from(n.body).buffer,{status:n.status,headers:n.headers})}function VDt(e){return typeof e=="string"?e:e instanceof URL?e.toString():typeof Request<"u"&&e instanceof Request?e.url:String(e)}function GDt(e){if(typeof Request<"u"&&e instanceof Request)return e.headers}function WDt(e){if(!e)return;let t=new Headers(e),r={};return t.forEach((n,i)=>{r[i]=n}),Object.keys(r).length>0?r:void 0}function FD(e,t){UD(CG(e),{recursive:!0});let r=`${e}.tmp.${process.pid}`;try{$0(r,t),a1(r,e)}catch(n){try{OD(r)}catch{}throw n}}function yG(e){return e.replace(/\s+/g," ").trim()}function A2e(e){let t=e("body").children().first().get(0)??e.root().children().first().get(0);return t&&Se(t)?t:null}function g2e(e){return e==="header"||e==="nav"||e==="footer"||e==="aside"||e==="complementary"}function YDt(e,t){let r=t.tagName.toLowerCase(),n=1;for(let s=t.prev;s;s=s.prev)Se(s)&&s.tagName?.toLowerCase()===r&&(n+=1);let i=e(t);return{tag:r,id:(i.attr("id")??"").trim()||null,classes:(i.attr("class")??"").split(/\s+/).filter(Boolean),nthOfType:n}}function JDt(e){let t=de(e),r=new Set;return n=>{let i=de(n),s=i("body").children().first().get(0)??i.root().children().first().get(0);if(!s||!Se(s))return Wm(n);let o=i.html(s),a=s.tagName.toLowerCase(),c=t(a).toArray().filter(u=>Se(u));for(let u of c)if(!r.has(u)&&t.html(u)===o)return r.add(u),Wp(YDt(t,u));return Wm(n)}}function bG(e,t,r=Wm){let n=yR(e.html);return{kind:t,selector:r(e.html),...g2e(n)?{role:n}:{}}}function ZDt(e,t=Wm){let r=yR(e.html);return{kind:"page_body_section",selector:t(e.html),...g2e(r)?{role:r}:{}}}function KDt(e){let t=de(e),r=[],n=A2e(t);if(n){let i=(t(n).attr("id")??"").trim();i&&r.push(i)}return t("[id]").each((i,s)=>{let o=(t(s).attr("id")??"").trim();o&&!r.includes(o)&&r.push(o)}),r}function EG(e,t){if(!t.trim())return!1;let r=de(e.html),n=A2e(r),i=r(n||"body"),s=n?(r(n).attr("class")??"").split(/\s+/).filter(Boolean):[],o=de(t),a=yG(o.text()),c=new Set;o("[id]").each((p,h)=>{let A=(o(h).attr("id")??"").trim();A&&c.add(A)});let u=new Set;o("[class]").each((p,h)=>{for(let A of(o(h).attr("class")??"").split(/\s+/).filter(Boolean))u.add(A)});let l=KDt(e.html);if(l.some(p=>c.has(p)||t.includes(`"anchor":${JSON.stringify(p)}`))||t.includes(`"anchor":${JSON.stringify(e.id)}`)||s.some(p=>u.has(p)))return!0;if(l.length>0||s.length>0)return!1;let d=r("a[href]").toArray().map(p=>yG(r(p).text())).filter(Boolean);if(d.length>0&&d.every(p=>a.includes(p)))return!0;let f=yG(i.text());return f.length>=24&&a.includes(f)}function XDt(e,t){let r=t.filter(i=>i.kind==="page_body_section"),n=t.filter(i=>i.kind==="page_body_section"?!1:i.selector===e.selector?!0:i.selector===void 0&&(i.role===void 0||i.role===e.role));return[...r,...n]}function eNt(e,t,r,n){let i=e.map(a=>Ym([a],XDt(a,t),r,n).assignments[0]),s={};for(let a of e)s[a.role]=(s[a.role]??0)+1;let o=i.filter(a=>a.kind==="unassigned").map(a=>a.landmark);return{page:r,entryUrl:n,assignments:i,unassignedRegions:o,counts:{sourceLandmarks:s,assigned:i.filter(a=>["page_body_section","header_part","footer_part"].includes(a.kind)).length,unassigned:o.length,nonActionable:i.filter(a=>a.kind==="non_actionable").length}}}var m2e=async(e,t)=>{let r=e.dir,n=e.studioSitePath,i=e.outputDir??r;if(!r)return t.errorResult("dir is required");if(!n)return t.errorResult("studioSitePath is required");if(!i)return t.errorResult("outputDir is required");let s=qDt(Jw(n)),o=[],a=e.createSite===!0,c=Kc(s);if(!c&&a){let $=e.siteTitle??(jDt(s.replace(/\/+$/,""))||"Local Site");try{let Ae=await Cwe({name:$,sitePath:s,adminUser:process.env.WP_ADMIN_USER,adminPassword:process.env.WP_ADMIN_PASS});c=Ae.wpRoot,Ae.created&&o.push(`created Studio site "${$}" at ${s}`)}catch(Ae){return t.errorResult(`failed to create Studio site at ${s}: ${Ae.message}`)}}if(!c)return t.errorResult(`no wp-content found under ${s} (or its wordpress/ subdir) \u2014 pass createSite:true to provision a fresh Studio site`);let u=e.skipDesign===!0,l=e.skipCompare===!0,d=e.editorSurface===!0,f=e.repair!==!1,p=Math.min(Math.max(Number(e.maxRepairRounds??2),0),5),h=e[s2e]===!0,A=e.carryCss!==!1,g=e.wpUrl?.replace(/\/$/,""),m=e.nativeBehaviors===!0,b=e.editableIslands!==!1;m&&e.carryJs===!0&&o.push("nativeBehaviors forces carryJs off (carried source JS would double-drive block behaviors)");let C=m?!1:e.carryJs!==!1,E;if(e.dataModel!==!1){for(let $ of[kr(i,"data-model.json"),kr(r,"data-model.json")])if(Wh($)){try{let Ae=JSON.parse(pf($,"utf8"));if(Ae&&Ae.cpt?.slug&&Array.isArray(Ae.mounts)){let Xe=OI(Ae);try{let mt=kr(i,"reports");UD(mt,{recursive:!0}),$0(kr(mt,"data-model-validation.json"),JSON.stringify(Xe,null,2))}catch{}for(let mt of Xe.warnings)o.push(`data-model warning: ${mt}`);if(Xe.valid)E=Ae;else{for(let mt of Xe.errors)o.push(`data-model ERROR: ${mt}`);o.push(`data-model.json invalid (${Xe.errors.length} error(s)) \u2014 data path skipped; see reports/data-model-validation.json`)}}else o.push(`data-model.json at ${$} is missing cpt/mounts \u2014 ignored`)}catch(Ae){o.push(`data-model.json parse failed (${$}): ${Ae.message}`)}break}}let w=E?.mounts.filter($=>$.sourceSelector)??[],T=await QD({dir:r,outputDir:i,nativeBehaviors:m,editableIslands:b,cardMounts:w},t);if(T.isError)return T;let _=JSON.parse(T.content[0].text),D=_.formsConverted??0,k=_.islandsConverted??0,v={lowConfidence:_.lowConfidence,failedPageCount:_.failedPageCount,failedPagesList:_.failedPagesList,stylingDrops:_.stylingDrops??0},M={tabs:_.behaviors?.tabs??0,slider:_.behaviors?.slider??0,modal:_.behaviors?.modal??0},F=new Set;M.tabs>0&&F.add("tabs"),M.slider>0&&F.add("slider"),M.modal>0&&F.add("modal");let S=BD(r),I=e.siteTitle??S.pages.find($=>$.slug==="home")?.title??"Local Site",R=e.themeSlug??"local-site-theme",U,J="",oe=!1,j=kr(i,"source"),ee=async $=>{await $.addStyleTag({content:AG}),await $.evaluate(gG)};if(!u){let $;try{$=await sG(r);let Ae=S.pages.map(lt=>$.urlForPage(lt.relPath));await Pw({urls:Ae,outputDir:j,primaryUrl:$.url,captureDesign:!0,concurrency:6,prepareCapture:ee});let Xe=lt=>JSON.parse(pf(kr(j,lt),"utf8")),mt=S.pages.map(lt=>lt.html);for(let lt of HDt(r))lt.endsWith(".css")&&mt.push(pf(kr(r,lt),"utf8"));U=ZTe({palette:Xe("palette.json"),typography:Xe("typography.json"),breakpoints:Xe("breakpoints.json"),cssSources:mt});let gt=zj(mt);if(gt.length>0){let lt=await MTe(gt,{themeDir:kr(i,"theme")});J=lt.localizedCss;for(let Pt of lt.errors)o.push(`font self-host failed: ${Pt.url}: ${Pt.error}`)}oe=!0}catch(Ae){o.push(`design capture failed (default styling used): ${Ae.message}`)}finally{await $?.close()}}let K,ue,G={},fe=0,Ze=!1;if(A||C||m){let $=Zm(r,S.pages.map(Ae=>({relPath:Ae.relPath,html:Ae.html})));$.skippedUnlinked.length>0&&o.push(`unlinked top-level assets skipped (linked assets exist; stale-revision protection): ${$.skippedUnlinked.join(", ")}`),G=$.imgRewritesByPage;for(let Ae of $.imgAssets)try{let Xe=kr(i,"theme",Ae.themeRel);UD(CG(Xe),{recursive:!0}),h2e(Ae.srcAbs,Xe),fe++,/\.svg$/i.test(Ae.themeRel)&&(Ze=!0)}catch(Xe){o.push(`carry img ${Ae.themeRel}: ${Xe.message}`)}if(A||C){let Ae=J?$.css.replace(Qw,Qw+J+` + +`):$.css,Xe=C?T_e($.js,S.pages):"";if(Xe&&E){let mt=TTe(Xe,E.mounts.map(lt=>lt.selector)),gt=QTe(mt.js,E.sourceArrays??[]);Xe=`${gt.js} +${RTe} +`,o.push(`data: neutralized ${mt.removed} mount call(s), rebound ${gt.rewritten} lookup(s)`)}if(K={css:A?Ae:"",js:Xe},A)for(let mt of $.mediaAssets)try{let gt=kr(i,"theme",mt.themeRel);UD(CG(gt),{recursive:!0}),h2e(mt.srcAbs,gt)}catch(gt){o.push(`carry media ${mt.themeRel}: ${gt.message}`)}}ue=m?KI({css:$.css,js:$.js},{sectionKinds:F}):void 0}if(ue){let $=kr(i,"behavior-gaps.json"),Ae=`${$}.tmp.${process.pid}`;try{$0(Ae,JSON.stringify({schema:1,site:r,gaps:ue.gaps},null,2)+` +`),a1(Ae,$)}catch(Xe){try{OD(Ae)}catch{}o.push(`behavior-gaps write failed: ${Xe.message}`)}}let Z=A&&(K?.css??"").trim().length>0,xe=C&&(K?.js??"").trim().length>0,Oe;if(D>=1){let Ae=OTe({sourceCss:K?.css??"",formsConverted:D}).css.trim();Ae.length>0&&(Oe=Ae)}let _e=S.pages.find($=>$.slug==="home")??S.pages[0],Ye=!!ue?.sticky&&Z;ue?.sticky&&!Ye&&o.push("sticky behavior detected but not emitted (requires carried chrome header)");let _t=XTe(S,_e.slug),sr=E?E.mounts.map($=>DD($).css).filter(Boolean).join(` +`):"",Le;{let $=[];if(Z){let Xe="";try{Xe=pf(OR(i),"utf8")}catch{}$.push(Xe)}sr&&$.push(sr);let Ae=R_e(...$);Le=Ae.length>0?Ae:void 0}let it=(()=>{for(let $ of[_e,...S.pages]){let Ae=$?.html?.match(/]*\bclass="([^"]+)"/i);if(Ae)return Ae[1]}})(),Ke=pR(_e.html,K?.css??""),H=Object.fromEntries(S.pages.filter($=>$.bodyData).map($=>[$.slug===_e.slug?"/":`/${$.slug}/`,$.bodyData])),le=[..._t.values()],ce,ie="",ae="";try{ce=await Nj(r,{outDir:kr(i,"theme"),themeMeta:{slug:R,name:I},...U?{foundationAggregates:U.foundationAggregates}:{},fetchImpl:zDt,coverageFloor:0,carrySourceCss:!1,variationHoist:!1,hooks:{onFoundation:async $=>U?.tokens??$,onSection:async $=>$,onAssets:async $=>({keep:$.assets.map(Ae=>Ae.relPath),decoration:[]}),onRefine:async $=>t2e($,{site:S,siteTitle:I,themeSlug:R,mainClass:it,mainWrapperClass:Ke,interiorChromeTemplates:le,carrySourceAssets:K,instanceStylesCss:Le,jetpackFormParityCss:Oe,allowSourceChromeMounts:Z&&xe,...Ye?{sticky:ue.sticky}:{}})}}),ie=ce.model.parts["header.html"]??"",ae=ce.model.parts["footer.html"]??"";for(let $ of ce.warnings)o.push($)}catch($){return t.errorResult(`theme build failed: ${$.message}`)}let Be=0,ge=[];try{let $=[...m?[jTe()]:[],...b&&k>0?[h0()]:[]],Ae=KTe({siteTitle:I,themeSlug:R,carrySourceAssets:K,instanceStylesCss:Le,jetpackFormParityCss:Oe,bodyDataByPath:H}),Xe=r2e({siteTitle:I,themeSlug:R,mainClass:it,mainWrapperClass:Ke,interiorChromeTemplates:le,carrySourceAssets:K,instanceStylesCss:Le,jetpackFormParityCss:Oe});FD(kr(ce.outDir,"functions.php"),Ae);let mt=n2e(ce,{functionsPhp:Ae,extraThemeFiles:Xe}),gt=ac({wpRoot:c,themeSlug:R,themeFiles:mt.themeFiles,assetSourceDir:mt.assetSourceDir,...$.length>0?{blockPlugins:$}:{}});Be=gt.themeWritten,ge=gt.pluginSlugs}catch($){return t.errorResult(`theme write failed: ${$.message}`)}if(Oe)try{FD(kr(i,Gh.outputFileName),Oe+` +`)}catch($){o.push(`jetpack form parity css mirror write failed: ${$.message}`)}{let $=kr(c,"wp-content","themes",R);try{if(!xe){let Ae=kr($,"assets","js","source.js");Wh(Ae)&&OD(Ae)}if(!Z){let Ae=kr($,"assets","css","source.css");Wh(Ae)&&OD(Ae)}}catch(Ae){o.push(`stale carry asset cleanup failed: ${Ae.message}`)}}try{await Yh(s,["theme","activate",R])}catch($){o.push(`theme activate failed: ${$.message}`)}if(aTe(D))try{await Yh(s,ff.wpArgs);try{await Yh(s,XI.wpArgs)}catch($){o.push(uTe($))}}catch($){o.push(cTe($))}for(let $ of ge)try{await Yh(s,["plugin","activate",$])}catch(Ae){o.push(`plugin activate failed for ${$}: ${Ae.message}`)}let pe=!1;if(Ze){let $=await Gd(s,"safe-svg",Yh);$.ok?pe=!0:o.push(`safe-svg install failed: ${$.error}`)}if(fe>0&&o.push(`carried ${fe} HTML asset(s) into the theme`+(Ze?` (safe-svg ${pe?"ensured":"NOT installed"})`:"")),!g)try{g=(await Yh(s,["option","get","siteurl"])).trim().replace(/\/$/,"")}catch($){g="http://localhost:8889",o.push(`siteurl resolve failed, using ${g}: ${$.message}`)}for(let $ of eI())try{await Yh(s,$)}catch(Ae){o.push(`cache flush failed (${$.slice(0,2).join(" ")}): ${Ae.message}`)}if(E)try{let $=await BTe({model:E,studioSitePath:s,wpRoot:c,sourceDir:r}),Ae=($.skippedModified?`, ${$.skippedModified} skipped (edited in wp-admin)`:"")+($.collisions?`, ${$.collisions} slug-collision(s)`:"")+($.defaultsTrashed?`, ${$.defaultsTrashed} WP seed default(s) trashed`:"");for(let Xe of $.mediaErrors)o.push(`data media: ${Xe.sourceUrl}: ${Xe.error}`);o.push(`data: ${$.inserted} inserted, ${$.updated} updated, ${$.terms} term(s), ${$.mediaInstalled} media item(s) installed${Ae}; mu-plugins ${$.muPlugins.join(", ")}`)}catch($){o.push(`data install failed: ${$.message}`)}let Ge=lTe(S,i),St=Ge.items.filter($=>!$.content.trim()).map($=>$.slug),We=[];for(let $ of Ge.items){let Ae=S.pages.find(mt=>mt.slug===$.slug);if(!Ae)continue;let Xe=_t.get($.slug);We.push(...HTe({pageSlug:$.slug,sourceHtml:Ae.html,postContent:$.content,partMarkup:[ie,ae,...Xe?[Xe.partMarkup]:[]]}))}let It=kr(i,"conservation-leaks.json");try{FD(It,JSON.stringify({schema:1,site:r,leaks:We},null,2)+` +`)}catch($){o.push(`conservation leaks report write failed: ${$.message}`)}let or=kr(i,"region-audit.json"),vt=()=>({ok:!0,status:"pass",unassignedRegions:0,hardFailRegions:0,artifact:or,railHardFail:{enabled:h,roles:LD,minLinks:2}}),se=vt();try{let $=JDt(_e.html),Ae=bR(_e.html),Xe=e2e(_e.html),mt=Xe.find(er=>er.role==="header")??Xe.find(er=>er.role==="nav")??null,gt=Xe.find(er=>er.role==="footer")??null,lt=[...Xe.filter(er=>er.role==="body"&&er.chromeSource!=="layout-rail").map(er=>ZDt(er,$))];mt&&mt.chromeSource!=="layout-rail"&&EG(mt,ie)&<.push(bG(mt,"header_part",$)),gt&&EG(gt,ae)&<.push(bG(gt,"footer_part",$));for(let er of Xe.filter(bi=>bi.chromeSource==="layout-rail"))EG(er,ie)&<.push(bG(er,"header_part",$));let Pt=eNt(Ae,lt,_e.slug,_e.relPath),Tn=Pt.unassignedRegions.filter(er=>LD.includes(er.role)&&(er.linkCount??0)>=2),Wn=h?Tn:[];se={ok:Wn.length===0,status:Wn.length>0?"fail":Pt.counts.unassigned>0?"warn":"pass",unassignedRegions:Pt.counts.unassigned,hardFailRegions:Wn.length,artifact:or,railHardFail:{enabled:h,roles:LD,minLinks:2}};try{let er={schema:1,site:r,pages:[Pt],unassignedRegions:Pt.counts.unassigned,hardFailRegions:Wn};FD(or,JSON.stringify(er,null,2)+` +`)}catch(er){o.push(`region audit write failed: ${er.message}`)}}catch($){o.push(`region audit failed: ${$.message}`),se=vt()}let te=[],Te=[];for(let $ of Ge.items)try{let Ae;if(E){let lt=_Te($.content,E.mounts);lt.injected.length>0&&(Ae=lt.markup,o.push(`data: ${$.slug} \u2192 query loop(s) for ${lt.injected.join(", ")}`))}let Xe=S.pages.find(lt=>lt.slug===$.slug),mt=Xe?G[Xe.relPath]:void 0;mt&&mt.length>0&&(Ae=Qj(Ae??$.content,mt,R));let gt=await fTe({item:$,outputDir:i,studioSitePath:s,contentOverride:Ae});!gt||gt.action==="error"?Te.push({slug:$.slug,error:gt?.error??"unsupported item"}):te.push({slug:$.slug,postId:gt.postId})}catch(Ae){Te.push({slug:$.slug,error:Ae.message})}let Fe=!1;{let $={};for(let[gt,lt]of KR({title:I}))$[gt]=lt;let Ae=te.filter(gt=>gt.postId!=null).map(gt=>({postId:gt.postId,slug:gt.slug,template:_t.get(gt.slug)?.templateName??"page-local"})),Xe=te.find(gt=>gt.slug===Ge.homeSlug),mt=Xe?.postId!=null?Xe.postId:void 0;try{let gt=await hTe({payload:{options:$,templateAssigns:Ae,...mt!==void 0?{frontPageId:mt}:{}},studioSitePath:s});Fe=gt.applied.frontPage;for(let lt of gt.errors)lt.item.startsWith("option:")?o.push(`${lt.item.slice(7)} set failed: ${lt.error}`):lt.item.startsWith("template:")?o.push(`template assign failed for ${lt.item.slice(9)}: ${lt.error}`):lt.item==="frontPage"?o.push(`front page set failed: ${lt.error}`):o.push(`site finalize ${lt.item} failed: ${lt.error}`)}catch(gt){let lt=[...Object.keys($).map(Pt=>`option ${Pt}`),...Ae.map(Pt=>`template ${Pt.slug}`),...mt!==void 0?["front page"]:[]];o.push(`site finalize failed (attempted: ${lt.join(", ")}): ${gt.message}`)}}let Pe=.99,ft=kr(i,"replica"),Pr=te.filter($=>$.postId!=null).map($=>$.slug===Ge.homeSlug?`${g}/`:`${g}/${$.slug}/`),ar;if(!u&&!l&&oe)try{await Pw({urls:Pr,outputDir:ft,primaryUrl:g,concurrency:6,prepareCapture:ee});let $=await SD({originDir:kr(j,"screenshots"),replicaDir:kr(ft,"screenshots")}),Ae=Pt=>$.results.map(Tn=>Tn[Pt]?.score).filter(Tn=>typeof Tn=="number"),Xe=Pt=>Pt.length?Pt.reduce((Tn,Wn)=>Tn+Wn,0)/Pt.length:0,mt=$.results.map(Pt=>{let Tn=Pt.desktop?.score??null,Wn=Pt.mobile?.score??null;return{pathname:Pt.pathname,desktop:Tn,mobile:Wn,desktopHeightPass:Pt.desktop?.heightPass,mobileHeightPass:Pt.mobile?.heightPass,passes:Tn!==null&&Wn!==null&&Tn>=Pe&&Wn>=Pe&&Pt.desktop?.heightPass!==!1&&Pt.mobile?.heightPass!==!1}});ar={floor:Pe,allPass:mt.length>0&&mt.every(Pt=>Pt.passes),avgDesktop:Xe(Ae("desktop")),avgMobile:Xe(Ae("mobile")),pages:mt};let gt=kr(i,"parity-report.json"),lt=`${gt}.tmp.${process.pid}`;$0(lt,JSON.stringify({schema:1,comparison:$,parity:ar},null,2)+` +`),a1(lt,gt)}catch($){o.push(`compare failed: ${$.message}`)}if(f&&ar&&!ar.allPass&&p>0&&!Z&&o.push("repair skipped: requires carried source css (carryCss)"),f&&ar&&!ar.allPass&&p>0&&Z){let $=0,Ae,Xe=!1,mt=new Map,gt=[],lt=[],Pt=ar;for(;!Pt.allPass&&$!Lt.passes);lt=[];let Wn=new Map;try{let Lt=kr(ft,"screenshots","manifest.json");if(Wh(Lt)){let Mn=JSON.parse(pf(Lt,"utf8"));for(let[as,Pn]of Object.entries(Mn.entries))try{Wn.set(new URL(as).pathname,Pn.slug)}catch{}}}catch(Lt){o.push(`repair round ${$}: manifest read failed: ${Lt.message}`);break}let er=[],bi,_a,Ta=!0;try{bi=await sG(r),_a=await Vo({});for(let Lt of Tn){let Mn=Wn.get(Lt.pathname);if(!Mn)continue;let as=S.pages.find(Pn=>{let vn=Pn.slug===Ge.homeSlug?`${g}/`:`${g}/${Pn.slug}/`;return new URL(vn).pathname===Lt.pathname});if(as)for(let Pn of["desktop","mobile"]){let vn=Lt[Pn],oo=Pn==="desktop"?Lt.desktopHeightPass:Lt.mobileHeightPass;if(vn!==null&&vn>=Pe){oo===!1&<.push(`${Lt.pathname} ${Pn}`);continue}let _s=kr(ft,"screenshots","diff",`${Mn}.${Pn}.diff.png`);if(!Wh(_s))continue;let lu;try{lu=u2e(pf(_s),{scale:Pn==="desktop"?tk:1})}catch{continue}if(lu.length===0)continue;let p1=bi.urlForPage(as.relPath),bl=as.slug===Ge.homeSlug?`${g}/`:`${g}/${as.slug}/`;try{let q0=await a2e({browser:_a,sourceUrl:p1,replicaUrl:bl,viewport:Pn,regions:lu});er.push(...q0)}catch(q0){o.push(`repair round ${$}: probe ${Lt.pathname} ${Pn}: ${q0.message}`)}}}}catch(Lt){o.push(`repair round ${$}: probe setup failed: ${Lt.message}`),Ta=!1}finally{await _a?.close(),await bi?.close()}if(!Ta)break;let Ra=l2e(er),yl=p2e(er);if(yl===Ae){gt=Ra.unresolved;break}Ae=yl;for(let Lt of Ra.overrides){let Mn=`${Lt.selector}|${Lt.occurrence}|${Lt.prop}|${Lt.value}`,as=mt.get(Mn);if(as)for(let Pn of Lt.viewports)as.viewports.includes(Pn)||as.viewports.push(Pn);else mt.set(Mn,{...Lt,viewports:[...Lt.viewports]})}gt=Ra.unresolved;let Kh=d2e([...mt.values()].sort((Lt,Mn)=>Lt.selector.localeCompare(Mn.selector)||Lt.prop.localeCompare(Mn.prop)));for(let Lt of Kh.conflicts)o.push(`repair: page-conflict (unpatchable globally) ${Lt.selector} ${Lt.prop} ${Lt.viewport}: ${Lt.values.join(" vs ")}`);let Xh={overrides:Kh.overrides,unresolved:gt};if(Xh.overrides.length===0){lt.length>0&&o.push(`repair: height-only failures (content lost below the crop; not deterministically patchable): ${lt.join(", ")}`);break}let hf=f2e(Xh);try{ac({wpRoot:c,themeSlug:R,themeFiles:[{relativePath:"assets/css/parity-patch.css",content:hf}]});let Lt=kr(i,"parity-patch.css"),Mn=`${Lt}.tmp.${process.pid}`;$0(Mn,hf),a1(Mn,Lt)}catch(Lt){o.push(`repair round ${$}: patch write failed: ${Lt.message}`);break}try{await Pw({urls:Pr,outputDir:ft,primaryUrl:g,concurrency:6,prepareCapture:ee,force:!0});let Mn=(await SD({originDir:kr(j,"screenshots"),replicaDir:kr(ft,"screenshots")})).results.map(vn=>{let oo=vn.desktop?.score??null,_s=vn.mobile?.score??null;return{pathname:vn.pathname,desktop:oo,mobile:_s,desktopHeightPass:vn.desktop?.heightPass,mobileHeightPass:vn.mobile?.heightPass,passes:oo!==null&&_s!==null&&oo>=Pe&&_s>=Pe&&vn.desktop?.heightPass!==!1&&vn.mobile?.heightPass!==!1}}),as=vn=>Mn.map(oo=>oo[vn]).filter(oo=>oo!==null),Pn=vn=>vn.length?vn.reduce((oo,_s)=>oo+_s,0)/vn.length:0;Pt={...Pt,allPass:Mn.length>0&&Mn.every(vn=>vn.passes),avgDesktop:Pn(as("desktop")),avgMobile:Pn(as("mobile")),pages:Mn}}catch(Lt){o.push(`repair round ${$}: re-compare failed: ${Lt.message}`);break}if($++,Pt.allPass){Xe=!0;break}}ar={...Pt,repair:{rounds:$,overrides:mt.size,unresolved:gt,converged:Xe,...lt.length>0?{heightOnly:lt}:{}}}}let jn;if(d){let $=process.env.WP_ADMIN_PASS;if(!$)o.push("editorSurface skipped: set WP_ADMIN_PASS (editor login credential) in the environment");else if(!g)o.push("editorSurface skipped: replica wpUrl not resolved");else try{let Ae=new Map;try{let er=kr(j,"screenshots","manifest.json");if(Wh(er)){let bi=JSON.parse(pf(er,"utf8"));for(let[_a,Ta]of Object.entries(bi.entries??{}))try{Ae.set(new URL(_a).pathname,Ta.slug)}catch{}}}catch{}let Xe=[];for(let er of te){let bi=S.pages.find(Kh=>Kh.slug===er.slug);if(!bi)continue;let _a="";try{_a=pf(n0(i,er.slug),"utf8")}catch{continue}if(!_a.trim())continue;let Ta=bi.slug===Ge.homeSlug?"/":`/${bi.slug}/`,Ra=Ae.get(Ta),yl=Ra?kr(j,"screenshots","desktop",`${Ra}.png`):null;Xe.push({pathname:Ta,slug:er.slug,markup:_a,blocksPath:!1,sourceShotDesktop:yl&&Wh(yl)?yl:null})}let mt=await mTe({wpUrl:g,sitePath:s,username:process.env.WP_ADMIN_USER??"admin",password:$}),gt;try{gt=await yTe({session:mt,pages:Xe,floor:Pe,diffDir:kr(ft,"screenshots")})}finally{await mt.close()}let lt=gt.results.filter(er=>er.editorScore!==null),Pt=lt.length>0?lt.reduce((er,bi)=>er+(bi.editorScore??0),0)/lt.length:null;jn={scored:lt.length,skipped:gt.results.length-lt.length,avgEditorScore:Pt,repairTasks:gt.repairTasks.length};let Tn=kr(i,"editor-report.json"),Wn=`${Tn}.tmp.${process.pid}`;$0(Wn,JSON.stringify({schema:1,surface:"editor",results:gt.results,repairTasks:gt.repairTasks},null,2)+` +`),a1(Wn,Tn)}catch(Ae){o.push(`editorSurface failed: ${Ae.message}`)}}let ct=t.textResult({pages:Ge.items.length,installed:te.length,...jn!==void 0?{editorSurface:jn}:{},failedInstalls:Te,missingSidecars:Ge.missingSidecars,emptySidecars:St,ingest:v,...b?{islandsConverted:k}:{},themeSlug:R,themeWritten:Be,frontPageSet:Fe,designCaptured:oe,carried:{css:Z,js:xe},conservationLeaks:{count:We.length,artifact:It},conservation:se,...ue!==void 0?{behaviors:{reveal:!!ue.reveal,sticky:Ye,tabs:M.tabs,slider:M.slider,modal:M.modal,gaps:ue.gaps.length}}:{},...ar!==void 0?{parity:ar}:{},warnings:o});return se.status==="fail"&&(ct.isError=!0),ct};var y2e=async(e,t)=>{let r=e.patterns;if(!Array.isArray(r))return t.errorResult("patterns[] is required");let n=sQ({patterns:r});return t.textResult(n)};import{existsSync as tNt,readdirSync as rNt,readFileSync as nNt}from"node:fs";import{join as E2e}from"node:path";function b2e(e){let t=[],r=0,n=0,i=0;return e.forEach((s,o)=>{let a=`section[${o}] (index ${typeof s?.index=="number"?s.index:"?"})`;if(typeof s!="object"||s===null||!Array.isArray(s.findings)||!Array.isArray(s.applied)||!Array.isArray(s.skipped)){t.push(`${a}: malformed report \u2014 findings/applied/skipped arrays are required`);return}let c=new Set;for(let d of s.findings){if(typeof d?.id!="string"||d.id===""){t.push(`${a}: finding with missing id`);continue}c.has(d.id)&&t.push(`${a}: duplicate finding id "${d.id}"`),c.add(d.id)}let u=new Set(s.applied.map(d=>d?.id).filter(d=>typeof d=="string")),l=new Set(s.skipped.map(d=>d?.id).filter(d=>typeof d=="string"));for(let d of c){let f=u.has(d),p=l.has(d);f&&p&&t.push(`${a}: finding "${d}" appears in both applied and skipped`),!f&&!p&&t.push(`${a}: finding "${d}" is UNACCOUNTED \u2014 add it to applied (with summary) or skipped (with reason)`)}for(let d of s.applied)d?.id&&!c.has(d.id)&&t.push(`${a}: applied id "${d.id}" has no matching finding`);for(let d of s.skipped)d?.id&&!c.has(d.id)&&t.push(`${a}: skipped id "${d.id}" has no matching finding`);r+=c.size,n+=s.applied.length,i+=s.skipped.length}),{ok:t.length===0,errors:t,sections:e.length,findings:r,applied:n,skipped:i}}var C2e=async(e,t)=>{let r=e.outputDir,n=e.slug;if(!r||!n)return t.errorResult("outputDir and slug are required");if(!/^[a-z0-9][a-z0-9._-]*$/i.test(n)||n.includes(".."))return t.errorResult(`Invalid slug "${n}" \u2014 expected a plain page slug (letters/digits/dot/dash/underscore).`);let i=E2e(r,"refine",n);if(!tNt(i))return t.errorResult(`No refine reports at ${i} \u2014 match-section must write refine//.json before validation.`);let s=[],o=[];for(let c of rNt(i).filter(u=>u.endsWith(".json")).sort())try{s.push(JSON.parse(nNt(E2e(i,c),"utf8")))}catch{o.push(c)}if(o.length>0)return t.errorResult(`Unparseable refine report file(s): ${o.join(", ")}`);if(s.length===0)return t.errorResult(`No section reports found in ${i}.`);let a=b2e(s);return a.ok?t.textResult({ok:!0,slug:n,sections:a.sections,findings:a.findings,applied:a.applied,skipped:a.skipped}):t.errorResult(`Refine coverage FAILED for ${n}: - ${a.errors.join(` -- `)}`)};var f2e={liberate_cluster_pages:{description:"Cluster page signatures by exact layout signature; pick a representative per cluster.",inputSchema:{type:"object",properties:{signatures:{type:"array",description:"PageSignature[]"}},required:["signatures"]}},liberate_section_extract:{description:"Extract a page signature (off saved HTML) or full computed-style section specs (representatives).",inputSchema:{type:"object",properties:{url:{type:"string"},html:{type:"string"},detail:{type:"string",enum:["signature","full"]},mediaMap:{type:"object",description:"detail=full only: {sourceCdnUrl: uploadedWpUrl} rewrite map"},cdpPort:{type:"number",description:"detail=full only: connect to an existing Chromium over CDP instead of launching"}},required:["url","detail"]}},liberate_compose_instantiate:{description:"Deterministically fill a cluster layout skeleton with a page's content; flag misfits.",inputSchema:{type:"object",properties:{skeleton:{type:"object"},pageContent:{type:"object"}},required:["skeleton","pageContent"]}},liberate_validate_artifacts:{description:"Pre-install gate: drift + escaping/injection + provenance over generated patterns.",inputSchema:{type:"object",properties:{patterns:{type:"array",description:"ArtifactPattern[]"}},required:["patterns"]}}};ki();St();var Dr=/\.(jpg|jpeg|png|gif|svg|webp|avif|ico|bmp|tiff)/i;function Qe(e,t){let r=de(e);return r(`meta[property="${t}"]`).attr("content")||r(`meta[name="${t}"]`).attr("content")||""}function br(e){return de(e)("title").first().text().trim()}function zh(e){let t=de(e),r=t("h1").first().text().trim();return r||t("title").first().text().trim()}function ks(e,t){let r=de(e),n=[],i=new Set;return r("nav a[href]").each((s,o)=>{let a=r(o).attr("href")||"",c=r(o).text().trim();if(!c||i.has(a))return;i.add(a);let u=a;if(a.startsWith("/"))try{u=new URL(a,t).href}catch{u=a}n.push({text:c,href:u})}),n}var UDt="Mozilla/5.0 (compatible; DataLiberation/1.0)";async function p2e(e,t){let r=e.includes("://")?e:`https://${e}`,n="";try{let h=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":UDt}});h.ok?n=await h.text():await h.body?.cancel()}catch{}let i=Qe(n,"og:title"),s=Qe(n,"og:description"),o=i||br(n)||"Imported Site",a=s||Qe(n,"description")||"",u=n.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",l=await ii(e),d=ks(n,r),f={},p=[];for(let h of l){let A=cr(h);p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:r,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:o,tagline:a,language:u},navigation:d,counts:f,urls:p}}St();ki();ic();Fs();var Xn={throughputEmaAlpha:.2,aimdDropRatio:.9,aimdDecreaseFactor:.7,errorDecreaseFactor:.5,errorBackoffRequests:3,pageDelayMin:50,pageDelayMax:1e4,pageDelayIncrease:50,mediaConcurrencyMin:1,mediaConcurrencyMax:12,mediaConcurrencyIncrease:1,mediaConcurrencyStart:6,mediaErrorMinCount:2,mediaErrorRatio:.5};function pG(e){return typeof e=="number"&&Number.isFinite(e)}function h2e(e,t,r,n,i,s){let o={currentValue:t,throughputEma:null,errorBackoffRemaining:0,min:r,max:n,additiveIncrease:i,invertDirection:s};return e&&(pG(e.currentValue)&&(o.currentValue=Math.max(r,Math.min(n,e.currentValue))),e.throughputEma===null?o.throughputEma=null:pG(e.throughputEma)&&e.throughputEma>0&&(o.throughputEma=e.throughputEma),pG(e.errorBackoffRemaining)&&(o.errorBackoffRemaining=Math.max(0,Math.min(Xn.errorBackoffRequests,Math.floor(e.errorBackoffRemaining))))),o}var MD=class{page;media;lastDebug=null;constructor(t,r){let n=t.config??{},i=n.pageDelayMin??Xn.pageDelayMin,s=n.pageDelayMax??Xn.pageDelayMax,o=n.pageDelayIncrease??Xn.pageDelayIncrease,a=n.mediaConcurrencyMin??Xn.mediaConcurrencyMin,c=n.mediaConcurrencyMax??Xn.mediaConcurrencyMax,u=n.mediaConcurrencyIncrease??Xn.mediaConcurrencyIncrease;this.page=h2e(r?.page,t.pageDelayStart,i,s,o,!0),this.media=h2e(r?.media,Xn.mediaConcurrencyStart,a,c,u,!1)}getPageDelay(){return Math.round(this.page.currentValue)}getMediaConcurrency(){return Math.round(this.media.currentValue)}getPageConcurrency(){let t=this.getPageDelay();return t<200?3:t<500?2:1}getState(){return{page:{currentValue:this.page.currentValue,throughputEma:this.page.throughputEma,errorBackoffRemaining:this.page.errorBackoffRemaining},media:{currentValue:this.media.currentValue,throughputEma:this.media.throughputEma,errorBackoffRemaining:this.media.errorBackoffRemaining}}}updateTrack(t,r,n,i){if(r<=0)return this.lastDebug={track:i,elapsed:r,workDone:n,throughput:0,ema:t.throughputEma,ratio:null,decision:"skip"},"skip";let s=n/r;if(t.throughputEma===null)return t.throughputEma=s,t.errorBackoffRemaining>0&&t.errorBackoffRemaining--,this.lastDebug={track:i,elapsed:r,workDone:n,throughput:s,ema:s,ratio:null,decision:"warmup"},"warmup";let o=s/t.throughputEma;if(t.throughputEma=t.throughputEma*(1-Xn.throughputEmaAlpha)+s*Xn.throughputEmaAlpha,t.errorBackoffRemaining>0)return t.errorBackoffRemaining--,this.lastDebug={track:i,elapsed:r,workDone:n,throughput:s,ema:t.throughputEma,ratio:o,decision:"error_backoff"},"error_backoff";let a;return osetTimeout(t,e))}function jDt(e,t){let r=de(e),n=[];r('script[type="application/ld+json"]').each((i,s)=>{n.push(r(s).html()||"")});for(let i of n)try{let s=JSON.parse(i);if(s["@type"]==="Product"&&s.name){let o=Array.isArray(s.offers)?s.offers:s.offers?[s.offers]:[],a=o[0]?.price?String(o[0].price):"",c=[];if(typeof s.image=="string")c.push(s.image);else if(Array.isArray(s.image))for(let u of s.image)typeof u=="string"?c.push(u):u?.url&&c.push(u.url);return{name:s.name,description:s.description||"",regularPrice:a,sku:s.sku||"",images:c,inStock:o[0]?.availability?.includes("InStock")??!0,sourceUrl:t}}}catch{}return null}function qDt(e,t,r){if(t<0)return[];if(e.length<=t)return e.slice();if(t===0)return[];let n=new Map;for(let u of e){let l=n.get(u.type);l?l.push(u):n.set(u.type,[u])}let i=[],s=new Set,o=n.get("homepage");if(o){for(let u of o){if(i.length>=t)break;i.push(u),s.add(u)}n.delete("homepage")}if(r&&r.size>0)for(let u of e){if(i.length>=t)break;s.has(u)||u.url&&r.has(u.url)&&(i.push(u),s.add(u))}let a=new Map;for(let u of n.keys())a.set(u,0);let c=!0;for(;i.length=t)break;let d=a.get(u);for(;d!se.has(De.url))}let S=zDt(r,M),I=g??(a?3:void 0);I!==void 0&&I>=0&&(M=qDt(M,I,S));let R=M.map(se=>se.url);if(R.length===0)return{pagesExtracted:0,postsExtracted:0,productsExtracted:0,failed:0,mediaCollected:0};let U=0,J=0,K=0,q=0,W=new Set,ue=new Map,ne=se=>{try{l?.sendLoggingMessage?.({level:"info",data:se})}catch{}},G=0;for(;G{let Me=Date.now();try{let Re=await p(ve);return{url:ve,pageData:Re,elapsedMs:Date.now()-Me,error:null}}catch(Re){return{url:ve,pageData:null,elapsedMs:Date.now()-Me,error:Re instanceof Error?Re.message:String(Re)}}}));if(te.some(ve=>ve.error)&&(E.recordPageError(),u)){let ve=te.filter(Me=>Me.error).length;ne(` [tuner] page delay: \u2192 ${E.getPageDelay()}ms (error backoff \u2014 ${ve}/${te.length} failed)`)}for(let ve of te)if(!ve.error){let Me=ve.elapsedMs/1e3,Re=E.recordPageResult({elapsed:Me});if(u&&E.lastDebug){let Vt=E.lastDebug;ne(` [tuner:debug] page: elapsed=${Vt.elapsed.toFixed(2)}s throughput=${Vt.throughput.toFixed(2)} ema=${Vt.ema?.toFixed(2)??"null"} ratio=${Vt.ratio?.toFixed(2)??"n/a"} \u2192 ${Vt.decision}`)}u&&(Re==="increase"||Re==="decrease")&&ne(` [tuner] page delay: \u2192 ${E.getPageDelay()}ms (${Re})`)}for(let ve=0;veWt.url===Me)?.type||cr(Me),wt=Je==="product"?"product":Je==="post"||Je==="blog-post"?"post":"page";f.bumpProgress(wt,"failed"),f.save()}continue}let H;if(!a&&C){let We=E.getMediaConcurrency(),Ue=[];for(let Je of Re.mediaUrls)if(!_.has(Je)){if(bq(Je)){_.add(Je);continue}if(N&&!N.shouldAttempt(Je)){_.add(Je);let wt=N.get(Je);if(wt?.status==="success"&&wt.localPath){let Wt=k.get(wt.localPath);Wt||(Wt=n.addMedia({url:Je,localPath:wt.localPath,title:wt.localPath.split("/").pop()||""}),k.set(wt.localPath,Wt),n.isStreaming&&n.flushItem(n.items[n.items.length-1])),H||(H=Wt)}continue}_.add(Je),Ue.push(Je)}for(let Je=0;Jenh(Te,C,w,T,{svgRaster:!0}).then(Ht=>({mediaUrl:Te,...Ht})))),ce=(Date.now()-Wt)/1e3,Oe=oe.reduce((Te,Ht)=>Te+(Ht.bytes??0),0),Xe=oe.filter(Te=>Te.error).length,Ye=oe.filter(Te=>!Te.error&&(Te.bytes??0)>0).length;if(Xe>=Xn.mediaErrorMinCount&&Xe>wt.length*Xn.mediaErrorRatio)E.recordMediaError(),u&&ne(` [tuner] media concurrency: \u2192 ${E.getMediaConcurrency()} (error \u2014 ${Xe}/${wt.length} failed)`);else if(Ye>0){let Te=E.recordMediaResult({elapsed:ce,bytesDownloaded:Oe});if(u&&E.lastDebug){let Ht=E.lastDebug;ne(` [tuner:debug] media: elapsed=${Ht.elapsed.toFixed(2)}s bytes=${Ht.workDone} throughput=${Ht.throughput.toFixed(0)} ema=${Ht.ema?.toFixed(0)??"null"} ratio=${Ht.ratio?.toFixed(2)??"n/a"} \u2192 ${Ht.decision}`)}u&&(Te==="increase"||Te==="decrease")&&ne(` [tuner] media concurrency: \u2192 ${E.getMediaConcurrency()} (${Te})`)}for(let Te of oe){if(!Te.error&&Te.localPath){let Ht=k.get(Te.localPath);if(Ht)H||(H=Ht);else{let ur=n.addMedia({url:Te.mediaUrl,localPath:Te.localPath,title:Te.filename||""});k.set(Te.localPath,ur),n.isStreaming&&n.flushItem(n.items[n.items.length-1]),H||(H=ur)}}if(i.logMedia({url:Te.mediaUrl,localPath:Te.localPath,error:Te.error}),N){if(Te.error)N.markFailure(Te.mediaUrl,Te.error);else if(Te.localPath){let Ht=Te.svgRisky!==void 0||Te.rasterPath||Te.rasterError?{svgRisky:Te.svgRisky,rasterPath:Te.rasterPath,rasterError:Te.rasterError}:void 0;N.markSuccess(Te.mediaUrl,Te.localPath,Ht)}}}}}let fe=t.find(We=>We.url===Me),ae=Re.detectedType||fe?.type||cr(Me);if(ae==="page"||ae==="homepage"){let We=new Set(["BlogPosting","NewsArticle","Article","SocialMediaPosting"]);Array.isArray(Re.jsonLd)&&Re.jsonLd.some(Je=>{if(!Je||typeof Je!="object")return!1;let wt=Je,Wt=wt["@type"];if(typeof Wt!="string"||!We.has(Wt))return!1;let oe=wt.mainEntityOfPage;if(oe&&typeof oe=="object"){let ce=oe,Oe=typeof ce.url=="string"?ce.url:typeof ce["@id"]=="string"?ce["@id"]:null;if(Oe&&Oe!==Me)return!1}return!0})&&(ae="post")}let ie=ae==="post"||ae==="blog-post",le=ae==="product";if(le&&d&&!a){let We=h?.(Me,Re.content)??jDt(Re.content,Me);We&&(d.addProduct(We),K++)}let xe=$Dt(Re.content),Ce=le&&d?Re.slug:GB(VB(Me),ue),pe;if(Re.author&&(pe=Re.author.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||void 0,pe&&!W.has(pe)&&(W.add(pe),n.addAuthor({login:pe,displayName:Re.author}))),le&&d||(ie?(n.addPost({title:Re.title,slug:Ce,content:xe,excerpt:Re.excerpt,date:Re.date,seoTitle:Re.seoTitle,seoDescription:Re.seoDescription,sourceUrl:Me,featuredMediaId:H,categories:Re.categories,tags:Re.tags,author:pe}),J++):(n.addPage({title:Re.title,slug:Ce,content:xe,excerpt:Re.excerpt,date:Re.date,seoTitle:Re.seoTitle,seoDescription:Re.seoDescription,sourceUrl:Me}),U++)),!(le&&d)){n.isStreaming&&n.flushItem(n.items[n.items.length-1]);try{let We=new URL(Me).pathname,Ue=`/${Ce}/`;We&&We!=="/"&&We!==Ue&&n.addRedirect({from:We,to:Ue})}catch{}}let Ze=Date.now()-Gt;if(i.logProcessed({url:Me,slug:Re.slug,durationMs:Ze,qualityScore:Re.qualityScore}),f){let We=le?"product":ie?"post":"page";f.bumpProgress(We,"extracted"),(Rt+1)%10===0&&(f.setCursor("adaptive-tuner",E.getState()),f.save(),N?.flush())}if(u&&ne(` media: ${Re.mediaUrls.length}, quality: ${Re.qualityScore}, ${Ze}ms`),A){N?.flush();try{await A({url:Me,slug:Re.slug,type:ae,items:n.items.slice(Hr),mediaUrls:Re.mediaUrls})}catch(We){ne(` [warn] onPageExtracted failed for ${Me}: ${We.message}`)}}}f&&f.setCursor("adaptive-tuner",E.getState());let Et=E.getPageDelay();G+De.length0&&await HDt(Et),G+=De.length}for(let se=0;set&&(t=r.attributes.length);return t}customMetaKeys(){let t=new Set;for(let r of this.products)if(r.meta)for(let n of Object.keys(r.meta))hG.includes(n)||t.add(n);return[...t].sort()}buildHeaders(t){let r=["id","type","sku","name","published","short_description","description","regular_price","sale_price","category_ids","tag_ids","images","weight","length","width","height","stock_status","stock_quantity"],n=this.maxAttributes();for(let i=1;i<=n;i++)r.push(`attributes:name${i}`),r.push(`attributes:value${i}`),r.push(`attributes:visible${i}`),r.push(`attributes:taxonomy${i}`);r.push("parent_id");for(let i of hG)r.push(`meta:${i}`);for(let i of t)r.push(`meta:${i}`);return r}static collapseNewlines(t){return t.replace(/\r?\n/g," ")}static metaValue(t,r){return r===E2e&&t.seoTitle?t.seoTitle:r===C2e&&t.seoDescription?t.seoDescription:r===w2e&&t.costOfGoods?t.costOfGoods:t.meta?.[r]||""}buildRow(t,r,n){let i=e.collapseNewlines,s=["",t.type||"simple",t.sku||"",i(t.name),t.published===!1?"0":"1",i(t.shortDescription||""),i(t.description||""),t.regularPrice||"",t.salePrice||"",t.categories?t.categories.join(" | "):"",t.tags?t.tags.join(" | "):"",t.images?t.images.join(", "):"",t.weight||"",t.length||"",t.width||"",t.height||"",t.inStock===!1?"outofstock":t.inStock===!0?"instock":"",t.stock!=null?String(t.stock):""];for(let o=0;othis.buildRow(a,i,r)),o=b2e.default.unparse({fields:n,data:s},{newline:`\r -`});g2e(t,o,"utf8")}_streamDir=null;_jsonlPath=null;_streaming=!1;get isStreaming(){return this._streaming}openStream(t,{resume:r=!1}={}){y2e(t,{recursive:!0}),this._streamDir=t,this._jsonlPath=m2e(t,"products.jsonl"),this._streaming=!0,r||g2e(this._jsonlPath,"","utf8")}flushProduct(t){if(!this._streaming||!this._jsonlPath)throw new Error("Cannot flushProduct: streaming is not active. Call openStream() first.");GDt(this._jsonlPath,JSON.stringify(t)+` -`,"utf8")}closeStream(){if(!this._streaming||!this._jsonlPath||!this._streamDir)throw new Error("Cannot closeStream: streaming is not active.");let t=m2e(this._streamDir,"products.csv"),r=ZDt(this._jsonlPath);return r.length>0&&(this.products=r,this.serialize(t),this.products=[]),this._streaming=!1,t}};function ZDt(e){if(!YDt(e))return[];let t=WDt(e,"utf8"),r=[];for(let n of t.split(` -`))if(n.trim())try{r.push(JSON.parse(n))}catch{}return r}St();function KDt(e,t){let r=(e??"").trim();if(!r||r.startsWith("data:"))return null;try{return new URL(r,t).toString()}catch{return null}}function I2e(e){return e.split(",").map(t=>t.trim().split(/\s+/)[0]).filter(Boolean)}function S2e(e,t){let r=de(e),n=new Set,i=s=>{let o=KDt(s,t);o&&n.add(o)};return r("img").each((s,o)=>{i(r(o).attr("src"));for(let a of I2e(r(o).attr("srcset")||""))i(a)}),r("source").each((s,o)=>{for(let a of I2e(r(o).attr("srcset")||""))i(a)}),i(r('meta[property="og:image"]').attr("content")),[...n]}var XDt="Mozilla/5.0 (compatible; DataLiberation/1.0)";async function eNt(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":XDt}});if(t.ok)return await t.text();await t.body?.cancel()}catch{}return""}async function tNt(e,t){let r=await e.newPage();try{return await r.goto(t,{waitUntil:"domcontentloaded",timeout:2e4}),await r.waitForTimeout(800).catch(()=>{}),await r.content()}catch{return""}finally{await r.close().catch(()=>{})}}function rNt(e,t){let r=Qe(e,"article:published_time");if(r)return r;let n=e.match(/]+datetime=["']([^"']+)["']/i)?.[1];if(n)return n;for(let i of t){let s=i.datePublished;if(typeof s=="string")return s}return""}function nNt(e,t){let r=Qe(e,"article:author");if(r)return r;for(let n of t){let i=n.author;if(typeof i=="string")return i;if(i&&typeof i=="object"){let s=i.name;if(typeof s=="string")return s}}}function iNt(e,t){let r=JQ(t),n=fBe(t),i=hBe(n),s=zh(t)||er(e),o=Qe(t,"og:description")||Qe(t,"description")||"",a=Qe(t,"og:title")||br(t)||s,c=S2e(t,e),u=ABe(n),l=u?r+` -`+u:r,d="low";return r.length>200?d="high":r.length>50&&(d="medium"),{title:s,slug:er(e),content:l,excerpt:o,date:rNt(t,n),seoTitle:a,seoDescription:o,mediaUrls:c,qualityScore:d,categories:[],tags:[],author:nNt(t,n),detectedType:i,jsonLd:n}}async function v2e(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=s.render!==!1,u=new ei;a&&!s.dryRun&&u.openStream(a);let l=null,d=null;if(c)try{l=(await Ic({cdpPort:s.cdpPort})).browser,d=l.contexts()[0]||await l.newContext()}catch{l=null,d=null}try{let f=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:u,onPageExtracted:s.onPageExtracted,extractPage:async p=>{let h=d?await tNt(d,p):"";return h||(h=await eNt(p)),iNt(p,h)}});return f.productsExtracted>0&&a&&!s.dryRun&&(u.isStreaming?u.closeStream():u.serialize(a+"/products.csv")),f}finally{await l?.close().catch(()=>{})}}function sNt(e){return!1}var x2e={id:"default",detect:sNt,discover:p2e,extract:v2e};ki();async function oNt(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});return t.ok?await t.text():(await t.body?.cancel(),"")}catch{return""}}async function aNt(e){let t=e.includes("://")?e:`https://${e}`,r=new URL(t).origin,n=[],i=new Set,s=[{path:"/sitemap.website.xml",type:"page"},{path:"/sitemap.blog.xml",type:"post"}];for(let{path:o,type:a}of s){let c=await oNt(`${r}${o}`);if(!c)continue;let u=Jb(c);for(let l of u){if(i.has(l))continue;i.add(l);let d=cr(l)==="homepage"?"homepage":a;n.push({url:l,type:d})}}return n}async function B2e(e,t){let r=e.includes("://")?e:`https://${e}`,n="";try{let h=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});h.ok?n=await h.text():await h.body?.cancel()}catch{}let i=Qe(n,"og:title"),s=Qe(n,"og:description"),a=Qe(n,"og:site_name")||i||br(n)||"Imported Site",c=s||Qe(n,"description")||"",l=n.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",d=ks(n,r),f=await aNt(r);f.length===0&&f.push({url:r,type:"homepage"});let p={};for(let h of f)p[h.type]=(p[h.type]||0)+1;return{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:a,tagline:c,language:l},navigation:d,counts:p,urls:f}}qi();St();function hl(e){if(!e)return e;let t=e.trim();if(t.startsWith("//")&&(t=`https:${t}`),!/^https?:\/\/img1\.wsimg\.com\/isteam\//i.test(t))return e;let[r]=t.split("/:/");return`${r}/:/rs=w:4000,cg:true`}function k2e(e){let t=new Set,r=/https?:\/\/img1\.wsimg\.com\/isteam\/[^\s"'<>)]+/g,n=/\/\/img1\.wsimg\.com\/isteam\/[^\s"'<>)]+/g;for(let o of e.match(r)||[])t.add(o);for(let o of e.match(n)||[])t.add(`https:${o}`);let i=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let o of i){let a=o.match(/src=["']([^"']+)["']/i);if(a?.[1]&&!a[1].startsWith("data:")){let c=a[1].startsWith("//")?`https:${a[1]}`:a[1];c.startsWith("http")&&t.add(c)}}let s=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].map(hl).filter(o=>{try{let a=new URL(o);return/\/favicon\//i.test(a.pathname)?!1:/^img1\.wsimg\.com$/i.test(a.hostname)?!0:s.test(a.pathname)?!1:Dr.test(a.pathname)}catch{return!1}})}function n1(e){return e.replace(/&/g,"&").replace(/"/g,""")}function _2e(e){let t="window._BLOG_DATA=",r=e.indexOf(t);if(r<0)return null;let n=e.indexOf("",r);if(n<0)return null;let i=e.slice(r+t.length,n).trim().replace(/;$/,"");try{return JSON.parse(i)}catch{return null}}function T2e(e){let t=de(e);t("script, style, noscript, link, meta").remove(),t('section[data-aid="HEADER_SECTION"]').remove(),t('header[data-aid="HEADER_WIDGET"]').remove(),t('[data-aid^="FOOTER_"]').remove(),t("footer").remove(),t('[data-aid*="COOKIE"], [data-aid*="HAMBURGER"], [data-aid="NAV_MORE"]').remove(),t('[data-aid$="_SECTION_TITLE_RENDERED"]').first().remove(),t('[data-aid$="_IMAGE_RENDERED0"]').first().remove(),t("img, source").each((n,i)=>{let s=t(i),o=s.attr("src");o&&!o.startsWith("data:")&&s.attr("src",hl(o));let a=s.attr("data-srclazy");if(a){let c=hl(a);s.attr("data-srclazy",c),(!o||o.startsWith("data:"))&&s.attr("src",c)}s.removeAttr("srcset"),s.removeAttr("data-srcsetlazy")}),t("source").remove();let r=t("main").first();return r.length&&r.text().trim().length>50?r.html()?.trim()||"":t("body").html()?.trim()||""}function AG(e){let t=de(e),r=t('section[data-aid="HEADER_SECTION"]'),n=new Set(r.find("h1, h2").toArray()),i=t("h1").toArray().find(o=>!n.has(o));if(i){let o=t(i).text().trim();if(o)return o}let s=t("h2").toArray().find(o=>!n.has(o));if(s){let o=t(s).text().trim();if(o)return o}return Qe(e,"og:title")||br(e)}var R2e={BOLD:"strong",ITALIC:"em",UNDERLINE:"u",STRIKETHROUGH:"s",CODE:"code"};function Q2e(e,t){let r=e.text||"";if(!r)return"";let n=e.inlineStyleRanges||[],i=e.entityRanges||[],s=[];for(let d=0;d=h.offset&&d=h.offset&&d{for(;a.length;){let d=a.pop(),f=R2e[d];f&&(o+=``)}if(c!=null){let d=t[String(c)];d&&d.type==="LINK"&&(o+=""),c=null}},l={styles:new Set,entity:null};for(let d=0;dl.styles.has(A)),h=f.entityKey===l.entity;if(!p||!h){if(u(),f.entityKey!=null){let A=t[String(f.entityKey)];if(A&&A.type==="LINK"){let g=n1(String(A.data?.href||"#")),m=A.data?.target?` target="${n1(String(A.data.target))}"`:"";o+=``,c=f.entityKey}}for(let A of f.styles){let g=R2e[A];g&&(o+=`<${g}>`,a.push(A))}l.styles=new Set(f.styles),l.entity=f.entityKey}o+=Ss(f.char)}return u(),o}function cNt(e,t){let r=e.entityRanges||[];if(r.length===0)return"";let n=t[String(r[0].key)];if(!n||n.type!=="IMAGE")return"";let i=hl(String(n.data?.src||"")),s=n1(String(n.data?.alt||""));return`
${s}
`}function D2e(e){let t=e.blocks||[],r=e.entityMap||{},n=[],i=null,s=()=>{i&&(n.push(``),i=null)};for(let o of t){let a=o.type||"unstyled",c=a==="unordered-list-item";if(c||a==="ordered-list-item"){let d=c?"ul":"ol";i!==d&&(s(),n.push(`<${d}>`),i=d),n.push(`
  • ${Q2e(o,r)}
  • `);continue}if(s(),a==="atomic"){let d=cNt(o,r);d&&n.push(d);continue}let l=Q2e(o,r);if(a==="unstyled")l.trim()&&n.push(`

    ${l}

    `);else if(/^header-(one|two|three|four|five|six)$/.test(a)){let f={"header-one":1,"header-two":2,"header-three":3,"header-four":4,"header-five":5,"header-six":6}[a];n.push(`${l}`)}else a==="blockquote"?n.push(`
    ${l}
    `):a==="code-block"?n.push(`
    ${l}
    `):l.trim()&&n.push(`

    ${l}

    `)}return s(),n.join(` -`)}async function N2e(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"";return mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,onPageExtracted:s.onPageExtracted,extractPage:async c=>{let u="";try{let N=await fetch(c,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});N.ok?u=await N.text():await N.body?.cancel()}catch{}let d=_2e(u)?.post,f,p,h,A=[],g;if(d&&typeof d.fullContent=="string"){try{let N=JSON.parse(d.fullContent),k=d.featuredImage||"";if(k&&N.blocks?.length){let v=N.blocks[0];if(v.type==="atomic"&&(v.entityRanges?.length??0)>0){let M=N.entityMap?.[String(v.entityRanges[0].key)];if(M?.type==="IMAGE"){let O=String(M.data?.src||"");O.startsWith("//")&&(O=`https:${O}`);let S=I=>I.replace(/^https?:/,"").split("?")[0];S(O)===S(k)&&(N.blocks=N.blocks.slice(1))}}}f=D2e(N)}catch{f=d.content?`

    ${Ss(d.content)}

    `:""}p=d.title||AG(u)||er(c),h=d.publishedDate||d.date||"",A=Array.isArray(d.categories)?d.categories:[],g="post"}else{f=T2e(u),p=AG(u)||er(c);let N=Qe(u,"article:published_time"),k=u.match(/]+datetime=["']([^"']+)["']/i)?.[1];h=N||k||""}let m=d?.content&&d.content.replace(/\.{3}$/,"").trim()||Qe(u,"og:description")||Qe(u,"description")||"",b=Qe(u,"og:title")||br(u)||p,E=m,C=Qe(u,"author")||void 0,w=k2e(u);if(f){let N=f.match(/https?:\/\/img1\.wsimg\.com\/isteam\/[^\s"'<>)]+/g)||[];for(let k of N)w.includes(k)||w.push(k)}if(d?.featuredImage){let N=hl(d.featuredImage);w.includes(N)||w.push(N)}let T=Qe(u,"og:image");if(T&&T.startsWith("http")){let N=hl(T);if(!w.includes(N))try{let k=new URL(N);(/^img1\.wsimg\.com$/i.test(k.hostname)||Dr.test(k.pathname))&&w.push(N)}catch{}}let _="low";return f.length>500?_="high":f.length>100&&(_="medium"),{title:p,slug:er(c),content:f,excerpt:m,date:h,seoTitle:b,seoDescription:E,mediaUrls:w,qualityScore:_,categories:A,tags:[],author:C,detectedType:g}}})}var M2e={id:"godaddy-wm",detect(e){return!1},discover:B2e,extract:N2e};ki();async function P2e(e,t){let r="";try{let h=e.includes("://")?e:`https://${e}`,A=await fetch(h,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});A.ok?r=await A.text():await A.body?.cancel()}catch{}let n=Qe(r,"og:title"),i=Qe(r,"og:description"),s=n||br(r)||"Imported Site",o=i||Qe(r,"description")||"",c=r.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",u=await ii(e),l=e.includes("://")?e:`https://${e}`,d=ks(r,l),f={},p=[];for(let h of u){let A=cr(h);A==="page"&&/\/blog-post|\/blog\//.test(h)&&(A="post"),p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:l,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:s,tagline:o,language:c},navigation:d,counts:f,urls:p}}qi();function L2e(e){let t=[],r=/]+type=["']application\/ld\+json["'][^>]*>([\s\S]*?)<\/script>/gi,n;for(;(n=r.exec(e))!==null;)try{let i=JSON.parse(n[1].trim());if(Array.isArray(i))for(let s of i)s&&typeof s=="object"&&t.push(s);else i&&typeof i=="object"&&t.push(i)}catch{}return t}function gG(e,t){for(let r of e){let n=r["@type"];if(typeof n=="string"&&t.test(n)||Array.isArray(n)&&n.some(i=>typeof i=="string"&&t.test(i)))return r}return null}function F2e(e,t){let r=typeof e.name=="string"?e.name:"";if(!r)return null;let i=(Array.isArray(e.offers)?e.offers:e.offers&&typeof e.offers=="object"?[e.offers]:[])[0],s=i?.price!=null?String(i.price):"",o=typeof i?.availability=="string"?i.availability:"",a=[];if(typeof e.image=="string")a.push(e.image);else if(Array.isArray(e.image))for(let c of e.image)typeof c=="string"?a.push(c):c&&typeof c=="object"&&typeof c.url=="string"&&a.push(c.url);return{name:r,type:"simple",description:typeof e.description=="string"?e.description:"",regularPrice:s,sku:typeof e.sku=="string"?e.sku:"",images:a,inStock:o?/InStock/i.test(o):!0,sourceUrl:t}}var O2e=/\b(block-sticky-bar|block-header|block--footer|block-header-cart|block-header-item|block-blog-header)\b/,uNt=/]*\bclass=["'][^"']*\b(block-sticky-bar|block-header|block--footer|block-blog-header)\b[^"']*["'][^>]*>[\s\S]*?<\/section>/gi,lNt=[/]*>[\s\S]*?<\/nav>/gi,/]*>[\s\S]*?<\/header>/gi,/]*>[\s\S]*?<\/footer>/gi];function mG(e){let t=e;for(let r of lNt)t=t.replace(r,"");return t.replace(uNt,"")}function U2e(e){let t=/]*\bclass=["']([^"']*)["'][^>]*>([\s\S]*?)<\/section>/gi,r=[],n;for(;(n=t.exec(e))!==null;){let a=n[1],c=n[2];/\bblock\b/.test(a)&&(O2e.test(a)||c.trim()&&r.push(c.trim()))}if(r.length>0)return r.join(` - -`);let i=e.match(/]*>([\s\S]*?)<\/article>/i);if(i?.[1]?.trim())return i[1].trim();let s=e.match(/]*>([\s\S]*?)<\/main>/i);if(s?.[1]?.trim())return mG(s[1]).trim();let o=e.match(/]*>([\s\S]*?)<\/body>/i);return o?.[1]?mG(o[1]).trim():""}function $2e(e){let t=e.match(/]*>([\s\S]*?)<\/h1>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(t)return t;let r=Qe(e,"og:title");return r||br(e)}function H2e(e,t){if(!t)return e;let r=i=>i.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().toLowerCase(),n=r(t);return n?e.replace(/]*>([\s\S]*?)<\/h1>/i,(i,s)=>r(s)===n?"":i):e}function j2e(e,t){let r;try{r=new URL(t.includes("://")?t:`https://${t}`).origin}catch{return e}return e.replace(/(src|href)=["'](\/[^"']+)["']/gi,(n,i,s)=>`${i}="${r}${s}"`)}function q2e(e){let t=new Set,r=/https?:\/\/[^\s"'<>)]*zyrosite\.com\/[^\s"'<>)]+/g,n=e.match(r)||[];for(let o of n){let a=o.replace(/(https?:\/\/[^/]+\/cdn-cgi\/image\/[^/]+\/)(.+)/,(c,u,l)=>`https://assets.zyrosite.com/${l}`);t.add(a)}let i=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let o of i){let a=o.match(/src=["']([^"']+)["']/i);a?.[1]&&a[1].startsWith("http")&&t.add(a[1])}let s=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].filter(o=>{try{let a=new URL(o);return s.test(a.pathname)?!1:/zyrosite\.com/i.test(a.hostname)?!0:Dr.test(a.pathname)}catch{return!1}})}async function z2e(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ei;a&&!s.dryRun&&c.openStream(a);let u=new Map,l=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async d=>{let f=await fetch(d,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});if(!f.ok)throw await f.body?.cancel(),new Error(`HTTP ${f.status} ${f.statusText}`);let p=await f.text(),h=L2e(p),A=gG(h,/^(Article|BlogPosting|NewsArticle)$/),g=gG(h,/^Product$/),m=!!g||/class=["'][^"']*\bblock-product(?:-wrapper)?\b/.test(p);if(m&&g){let U=F2e(g,d);U&&u.set(d,U)}let b=A?.headline||$2e(p)||er(d),E=j2e(H2e(U2e(p),b),d),C=Qe(p,"og:description")||Qe(p,"description")||"",w=Qe(p,"og:title")||br(p)||b,T=C,_=A?.datePublished||"";if(_||(_=Qe(p,"article:published_time")||""),!_){let U=p.match(/]+datetime=["']([^"']+)["']/i)?.[1];U&&(_=U)}let N=[],k=A?.articleSection;typeof k=="string"?N=[k]:Array.isArray(k)&&(N=k.filter(U=>typeof U=="string"));let v,M=A?.author;if(M&&typeof M=="object")if(Array.isArray(M)){let U=M[0];U&&typeof U=="object"&&typeof U.name=="string"&&(v=U.name)}else typeof M.name=="string"&&(v=M.name);let O=q2e(p),S=Qe(p,"og:image");if(S&&S.startsWith("http")&&!O.includes(S))try{let U=new URL(S);(Dr.test(U.pathname)||/zyrosite\.com/i.test(U.hostname))&&O.push(S)}catch{}let I=E.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),R="low";return I.length>200?R="high":I.length>50&&(R="medium"),{title:b,slug:er(d),content:E,excerpt:C,date:_,seoTitle:w,seoDescription:T,mediaUrls:O,qualityScore:R,categories:N,tags:[],author:v,detectedType:m?"product":void 0}},extractProduct:d=>u.get(d)??null});return l.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),l}function dNt(e){return!1}var V2e={id:"hostinger",detect:dNt,discover:P2e,extract:z2e};St();ki();function F0(e){try{return new URL(e.includes("://")?e:`https://${e}`).origin}catch{return null}}function PD(e,t){return e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("//")?"https:"+e:e.startsWith("/")&&t?t+e:null:null}function LD(e){return!!(/\/(blog|news|insights|articles)\/[^/?#]+/i.test(e)||/\/(resources|updates)\/[^/?#]+\/[^/?#]+/i.test(e))}async function G2e(e,t){let r=e.includes("://")?e:`https://${e}`,n;try{n=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}})}catch(A){throw new Error(`HubSpot discover(): fetch failed for ${r}: ${A.message}`)}if(!n.ok)throw await n.body?.cancel(),new Error(`HubSpot discover(): HTTP ${n.status} ${n.statusText} for ${r}`);let i;try{i=await n.text()}catch(A){throw await n.body?.cancel().catch(()=>{}),new Error(`HubSpot discover(): failed reading body of ${r}: ${A.message}`)}i.length>5242880&&(i=i.slice(0,5242880));let s=de(i),o=Qe(i,"og:title"),a=Qe(i,"og:description"),c=o||br(i)||"Imported Site",u=a||Qe(i,"description")||"",l=s("html").attr("lang")||"en-US",d=await ii(e),f=ks(i,r),p={},h=[];for(let A of d){let g=cr(A);g==="page"&&LD(A)&&(g="post"),h.push({url:A,type:g}),p[g]=(p[g]||0)+1}return h.length===0&&(h.push({url:r,type:"homepage"}),p.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:c,tagline:u,language:l},navigation:f,counts:p,urls:h}}St();qi();var yG=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|otf|pdf|zip|mp4|webm|mov)$/i;function fNt(e){let t=[],r=e.length,n=0;for(;n=r)break;let i=n;for(;n{let o=s.match(/(\d+(?:\.\d+)?)w/);if(o)return parseFloat(o[1]);let a=s.match(/(\d+(?:\.\d+)?)x/);return a?parseFloat(a[1]):0},n=t[t.length-1],i=r(n.descriptor);for(let s of t){let o=r(s.descriptor);o>i&&(n=s,i=o)}return n.url}function W2e(e,t){let r=new Set,n=F0(t),i=s=>{if(!s)return;let o=PD(s,n);o&&r.add(o)};return e("img").each((s,o)=>{let a=e(o);i(a.attr("src")),i(a.attr("data-src"));let c=a.attr("srcset");c&&i(FD(c))}),e("source[srcset]").each((s,o)=>{let a=e(o).attr("srcset")||"";i(FD(a))}),[...r].filter(s=>{try{let o=new URL(s);return yG.test(o.pathname)?!1:Dr.test(o.pathname)?!0:/hubspotusercontent/i.test(o.hostname)||/\/hubfs\//.test(o.pathname)}catch{return!1}})}function Y2e(e){let t=[];return e('script[type="application/ld+json"]').each((r,n)=>{let i=e(n).text().trim().replace(/^$/,"").trim();if(!i)return;let s;try{s=JSON.parse(i)}catch{return}let o=Array.isArray(s)?s:[s];for(let a of o){if(!a||typeof a!="object")continue;let c=a,u=c["@graph"];if(Array.isArray(u))for(let l of u)l&&typeof l=="object"&&t.push(l);else t.push(c)}}),t}function J2e(e){let t=e["@type"],r=n=>n==="BlogPosting"||n==="Article"||n==="NewsArticle";return r(t)||Array.isArray(t)&&t.some(r)}function Z2e(e,t){let r=e(".blog-post__timestamp").first().text().replace(/\s+/g," ").trim();if(r){let c=new Date(r);if(!isNaN(c.getTime()))return c.toISOString()}let n=e("time[datetime]").first().attr("datetime");if(n)return n;for(let c of Y2e(e)){if(!J2e(c))continue;let u=c.datePublished;if(typeof u=="string"&&u)return u}let i=Qe(t,"article:published_time");if(i)return i;let a=(e(".post-body").first().text()||e("body").first().text()||"").slice(0,500).match(/\b(?:on|posted on|published on|by[^,\n]{1,80},\s*on)\s+([A-Z][a-z]{2,}\s+\d{1,2},\s+\d{4}(?:\s+\d{1,2}:\d{2}(?::\d{2})?\s*[AP]M)?)/);if(a?.[1]){let c=new Date(a[1]);if(!isNaN(c.getTime()))return c.toISOString()}return""}function K2e(e,t){let r=e(".blog-post__author").first().text().replace(/\s+/g," ").trim();if(r)return r;let n=e('a[href*="/author/"]').first().text().trim();if(n)return n;let i=Y2e(e);for(let o of i){if(!J2e(o))continue;let a=o.author;if(!a)continue;let c=Array.isArray(a)?a[0]:a;if(c&&typeof c=="object"&&typeof c.name=="string")return c.name}for(let o of i)if(o["@type"]==="Person"&&typeof o.name=="string")return o.name;return Qe(t,"author")||void 0}function X2e(e){let t=[],r=new Set,n=s=>{let o=s.replace(/\s+/g," ").trim();if(!o)return;let a=o.toLowerCase();r.has(a)||(r.add(a),t.push(o))},i=e(".blog-post__tag-link");return i.length?(i.each((s,o)=>n(e(o).text())),t):(e('a[href*="/topic/"]').each((s,o)=>{let a=e(o).attr("href")||"";/\/topic\/[^/?#]+\/?(?:[?#]|$)/.test(a)&&n(e(o).text())}),t)}St();var pNt=[".hs-cta-wrapper",".hs-cta-node",".hs_cos_wrapper_type_form",".hs_cos_wrapper_type_blog_comments",".addthis_toolbox",".addthis_sharing_toolbox",".blog-post__preheader",".blog-post__summary",".blog-post__timestamp",".blog-post__author",".blog-post__social-sharing",".blog-post__tags",".blog-more",".blog-more-grid",".subscriber-form"].join(", ");function eRe(e){return e(".hs-blog-post").length>0}function OD(e){e.find(pNt).remove()}function tRe(e){let t=e(".post-body").first();if(t.length){OD(t);let s=t.html();if(s)return s.trim()}let r=e(".body-container").first();if(r.length){r.find("nav, header, footer").remove(),OD(r);let s=r.html();if(s)return s.trim()}let n=e("main").first();if(n.length&&n.text().trim()){OD(n);let s=n.html();if(s)return s.trim()}let i=e("body").first();if(i.length){i.find("nav, header, footer").remove(),OD(i);let s=i.html();if(s)return s.trim()}return""}function rRe(e,t){let r=F0(t),n=r?s=>/^https?:\/\//i.test(s)?s:s.startsWith("//")?"https:"+s:s.startsWith("/")?r+s:s:s=>s,i=de(e,null,!1);return i("img[srcset]").each((s,o)=>{let a=i(o),c=a.attr("srcset")||"",u=FD(c);u&&a.attr("src",u)}),r&&i("[src], [href], [data-src]").each((s,o)=>{let a=i(o);for(let c of["src","href","data-src"]){let u=a.attr(c);u&&a.attr(c,n(u))}}),i("img").removeAttr("srcset").removeAttr("sizes"),i("picture source").remove(),i.html()}function nRe(e,t){if(!t)return;let r=t.replace(/\s+/g," ").trim().toLowerCase();if(!r)return;let n=e("h1").first();if(!n.length)return;n.text().replace(/\s+/g," ").trim().toLowerCase()===r&&n.remove()}async function iRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ei;a&&!s.dryRun&&c.openStream(a);let u=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async l=>{let d=await fetch(l,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});if(!d.ok)throw await d.body?.cancel(),new Error(`HTTP ${d.status} ${d.statusText}`);let f=await d.text();f.length>5242880&&(f=f.slice(0,5242880));let p=de(f),h=eRe(p)||LD(l),A=zh(f)||er(l),m=p(".blog-post__summary").first().text().replace(/\s+/g," ").trim()||Qe(f,"og:description")||Qe(f,"description")||"",b=h?Z2e(p,f):"",E=h?K2e(p,f):void 0,C=h?X2e(p):[];nRe(p,A);let w=tRe(p),T=rRe(w,l),_=Qe(f,"og:title")||br(f)||A,N=Qe(f,"og:description")||Qe(f,"description")||m,k=W2e(p,l),v=Qe(f,"og:image");if(v&&!k.includes(v)){let S=PD(v,F0(l));if(S)try{let I=new URL(S);!yG.test(I.pathname)&&(Dr.test(I.pathname)||/hubspotusercontent/i.test(I.hostname)||/\/hubfs\//.test(I.pathname))&&k.push(S)}catch{}}let M=T.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),O="low";return M.length>200?O="high":M.length>50&&(O="medium"),{title:A,slug:er(l),content:T,excerpt:m,date:b,seoTitle:_,seoDescription:N,mediaUrls:k,qualityScore:O,categories:C,tags:[],author:E,detectedType:h?"post":void 0}}});return u.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),u}function hNt(e){return!1}var sRe={id:"hubspot",detect:hNt,discover:G2e,extract:iRe};var oRe={removeSelectors:["#upCart","#upCartStickyButton",'[class*="kl-teaser"]']};ki();async function bG(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)",Accept:"application/json"}});return t.ok?await t.json():(await t.body?.cancel(),null)}catch{return null}}async function UD(e,t){let r=[],n=1,i=20;for(;n<=i;){let s=e.includes("?")?"&":"?",o=`${e}${s}limit=250&page=${n}`,a=await bG(o);if(!a||!a[t]||a[t].length===0||(r.push(...a[t]),a[t].length<250))break;n++}return r}function EG(e){let t=e.match(/Shopify\.shop\s*=\s*["']([^"']+\.myshopify\.com)["']/i);if(t?.[1])return t[1];let r=e.match(/shopId["']?\s*[:,]\s*\d+[^}]*shop["']?\s*[:,]\s*["']([^"']+\.myshopify\.com)["']/i);if(r?.[1])return r[1];let n=e.match(/"shop"\s*:\s*"([^"]+\.myshopify\.com)"/i);if(n?.[1])return n[1]}function CG(e){let t=0;return e.title.length>0&&(t+=20),e.content.length>200?t+=25:e.content.length>50&&(t+=10),e.images.length>0&&(t+=15),e.hasStructuredData&&(t+=10),e.hasPriceSku&&(t+=10),e.date.length>0&&(t+=10),t>=50?"high":t>=25?"medium":"low"}function cRe(e){let t=c=>c.replace(/<[^>]*>/g,"").trim().length,n=e.match(/]*id="replo-fullpage-element"[^>]*>([\s\S]*?)<\/main>/i);if(n?.[1]&&t(n[1])>=100)return n[1].trim();let i=e.match(/]*class="[^"]*\brte\b[^"]*"[^>]*>/i);if(i){let u=e.indexOf(i[0])+i[0].length,l=1,d=u;for(;d0;){let f=e.indexOf("",d);if(p===-1)break;if(f!==-1&&f=100)return h;break}d=p+6}}}let s=e.match(/]*class="[^"]*alchemy-rte[^"]*"[^>]*>([\s\S]*?)<\/div>/i);if(s?.[1]&&t(s[1])>=100)return s[1].trim();let o=e.match(/]*>([\s\S]*?)<\/article>/i);if(o?.[1]&&t(o[1])>=100)return o[1].trim();let a=e.match(/]*>([\s\S]*?)<\/main>/i);return a?.[1]?.trim()?a[1].trim():""}var ANt=/\.(css|js|mjs|json|xml|txt|map|woff2?|ttf|eot|otf|pdf|zip|mp4|webm|mov|m4v)(?:$|[?#])/i,aRe=/(google-analytics|googletagmanager|facebook\.com\/tr|doubleclick|hotjar|segment\.|cdn\.shopify\.com\/shopifycloud\/(?:web-pixels|consent))/i;function O0(e){let t=new Set,r=n=>{if(!n)return;let i=n.trim();/^https?:\/\//i.test(i)&&t.add(i)};for(let n of e.match(/https?:\/\/cdn\.shopify\.com\/s\/files\/[^\s"'<>)]+/g)||[])r(n);for(let n of e.match(/<(?:img|source)\b[^>]*>/gi)||[]){for(let i of["src","data-src","data-lazy-src","data-original","data-image"]){let s=n.match(new RegExp(`\\b${i}=["']([^"']+)["']`,"i"));r(s?.[1])}for(let i of["srcset","data-srcset"]){let s=n.match(new RegExp(`\\b${i}=["']([^"']+)["']`,"i"));if(s?.[1])for(let o of s[1].split(","))r(o.trim().split(/\s+/)[0])}}for(let n of e.matchAll(/background(?:-image)?\s*:\s*[^;"']*url\((['"]?)([^)'"]+)\1\)/gi))r(n[2]);return[...t].filter(n=>{try{let i=new URL(n);return aRe.test(i.host)||aRe.test(n)||ANt.test(i.pathname)?!1:(Dr.test(i.pathname),!0)}catch{return!1}})}function uRe(e){let t=e.match(/datePublished["']?\s*[:=]\s*["']([^"']+)["']/i)?.[1];if(t)return t;let r=e.match(/]+datetime=["']([^"']+)["']/i)?.[1];if(r)return r;let n=Qe(e,"article:published_time");return n||""}async function gNt(e,t){let{launchBrowser:r}=await Promise.resolve().then(()=>(zi(),fO)),{page:n,close:i}=await r({cdpPort:e}),s=[],o=new Set;try{let a=n;a.on("response",async c=>{let u=c.url();if(u.includes("admin.shopify.com/api/operations/")&&!(!u.includes("ProductIndex")&&!u.includes("ProductList")))try{let d=(await c.json()).data;if(!d)return;let p=d.filteredProducts?.edges||[];for(let h of p){let A=h.node?.handle;A&&!o.has(A)&&(o.add(A),s.push(A))}}catch{}});try{await a.goto(`${t}/admin/products`,{waitUntil:"networkidle",timeout:3e4})}catch{}for(let c=0;c<5&&(await a.evaluate(()=>window.scrollTo(0,document.body.scrollHeight)),await new Promise(u=>setTimeout(u,2e3)),!(s.length>200));c++);await new Promise(c=>setTimeout(c,1e3))}finally{await i()}return s}async function lRe(e,t){let r=e.includes("://")?e:`https://${e}`,n=new URL(r).origin,i=!1,s=await UD(`${n}/pages.json`,"pages");s.length>0&&(i=!0);let o="";try{let E=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});E.ok?o=await E.text():await E.body?.cancel()}catch{}let a=Qe(o,"og:title"),c=Qe(o,"og:description"),u=a||br(o)||"Imported Site",l=c||Qe(o,"description")||"",f=o.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",p=ks(o,n),h=[],A={};if(i){for(let C of s){let w=`${n}/pages/${C.handle}`;h.push({url:w,type:"page"}),A.page=(A.page||0)+1}let E=await UD(`${n}/blogs.json`,"blogs");for(let C of E){let w=await UD(`${n}/blogs/${C.handle}/articles.json`,"articles");for(let T of w){let _=`${n}/blogs/${C.handle}/${T.handle}`;h.push({url:_,type:"post"}),A.post=(A.post||0)+1}}}let g=await ii(r);for(let E of g){if(h.some(w=>w.url===E))continue;let C=cr(E);h.push({url:E,type:C}),A[C]=(A[C]||0)+1}for(let E of p){let C;try{C=new URL(E.href)}catch{continue}if(C.origin!==n)continue;let w=`${C.origin}${C.pathname.replace(/\/+$/,"")}`;if(w===n||w===`${n}/`||h.some(_=>_.url===w||_.url===E.href))continue;let T=cr(w);h.push({url:w,type:T}),A[T]=(A[T]||0)+1}let m=t;if(m.cdpPort)try{let E=await gNt(m.cdpPort,n);for(let C of E){let w=`${n}/products/${C}`;h.some(T=>T.url===w)||(h.push({url:w,type:"product"}),A.product=(A.product||0)+1)}}catch{}h.length===0&&(h.push({url:r,type:"homepage"}),A.homepage=1);let b=EG(o);if(!b){let E=new URL(r).hostname;E.endsWith(".myshopify.com")&&(b=E)}return{siteUrl:e,discoveredAt:new Date().toISOString(),shopDomain:b,siteMeta:{title:u,tagline:l,language:f},navigation:p,counts:A,urls:h,jsonApiAvailable:i}}Fs();var mNt="2025-04",$D=class{endpoint;accessToken;constructor({shopDomain:t,accessToken:r}){let n=t.replace(/^https?:\/\//,"").replace(/\/$/,"");this.endpoint=`https://${n}/admin/api/${mNt}/graphql.json`,this.accessToken=r}async request(t,r={}){let n=await fetch(this.endpoint,{method:"POST",signal:AbortSignal.timeout(3e4),headers:{"Content-Type":"application/json","X-Shopify-Access-Token":this.accessToken,Accept:"application/json"},body:JSON.stringify({query:t,variables:r})});if(!n.ok){let s=await n.text().catch(()=>"");throw new Error(`Shopify GraphQL HTTP ${n.status}: ${s.slice(0,200)}`)}let i=await n.json();if(i.errors&&i.errors.length>0){let s=i.errors.map(o=>o.message).join("; ");throw new Error(`Shopify GraphQL errors: ${s}`)}if(!i.data)throw new Error("Shopify GraphQL: empty data field");return i.data}},yNt=` +- `)}`)};var w2e={liberate_cluster_pages:{description:"Cluster page signatures by exact layout signature; pick a representative per cluster.",inputSchema:{type:"object",properties:{signatures:{type:"array",description:"PageSignature[]"}},required:["signatures"]}},liberate_section_extract:{description:"Extract a page signature (off saved HTML) or full computed-style section specs (representatives).",inputSchema:{type:"object",properties:{url:{type:"string"},html:{type:"string"},detail:{type:"string",enum:["signature","full"]},mediaMap:{type:"object",description:"detail=full only: {sourceCdnUrl: uploadedWpUrl} rewrite map"},cdpPort:{type:"number",description:"detail=full only: connect to an existing Chromium over CDP instead of launching"}},required:["url","detail"]}},liberate_compose_instantiate:{description:"Deterministically fill a cluster layout skeleton with a page's content; flag misfits.",inputSchema:{type:"object",properties:{skeleton:{type:"object"},pageContent:{type:"object"}},required:["skeleton","pageContent"]}},liberate_validate_artifacts:{description:"Pre-install gate: drift + escaping/injection + provenance over generated patterns.",inputSchema:{type:"object",properties:{patterns:{type:"array",description:"ArtifactPattern[]"}},required:["patterns"]}}};_i();Bt();var Mr=/\.(jpg|jpeg|png|gif|svg|webp|avif|ico|bmp|tiff)/i;function Re(e,t){let r=de(e);return r(`meta[property="${t}"]`).attr("content")||r(`meta[name="${t}"]`).attr("content")||""}function Cr(e){return de(e)("title").first().text().trim()}function Jh(e){let t=de(e),r=t("h1").first().text().trim();return r||t("title").first().text().trim()}function ks(e,t){let r=de(e),n=[],i=new Set;return r("nav a[href]").each((s,o)=>{let a=r(o).attr("href")||"",c=r(o).text().trim();if(!c||i.has(a))return;i.add(a);let u=a;if(a.startsWith("/"))try{u=new URL(a,t).href}catch{u=a}n.push({text:c,href:u})}),n}var iNt="Mozilla/5.0 (compatible; DataLiberation/1.0)";async function I2e(e,t){let r=e.includes("://")?e:`https://${e}`,n="";try{let h=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":iNt}});h.ok?n=await h.text():await h.body?.cancel()}catch{}let i=Re(n,"og:title"),s=Re(n,"og:description"),o=i||Cr(n)||"Imported Site",a=s||Re(n,"description")||"",u=n.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",l=await si(e),d=ks(n,r),f={},p=[];for(let h of l){let A=lr(h);p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:r,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:o,tagline:a,language:u},navigation:d,counts:f,urls:p}}Su();Bt();_i();oc();Fs();var ti={throughputEmaAlpha:.2,aimdDropRatio:.9,aimdDecreaseFactor:.7,errorDecreaseFactor:.5,errorBackoffRequests:3,pageDelayMin:50,pageDelayMax:1e4,pageDelayIncrease:50,mediaConcurrencyMin:1,mediaConcurrencyMax:12,mediaConcurrencyIncrease:1,mediaConcurrencyStart:6,mediaErrorMinCount:2,mediaErrorRatio:.5};function wG(e){return typeof e=="number"&&Number.isFinite(e)}function S2e(e,t,r,n,i,s){let o={currentValue:t,throughputEma:null,errorBackoffRemaining:0,min:r,max:n,additiveIncrease:i,invertDirection:s};return e&&(wG(e.currentValue)&&(o.currentValue=Math.max(r,Math.min(n,e.currentValue))),e.throughputEma===null?o.throughputEma=null:wG(e.throughputEma)&&e.throughputEma>0&&(o.throughputEma=e.throughputEma),wG(e.errorBackoffRemaining)&&(o.errorBackoffRemaining=Math.max(0,Math.min(ti.errorBackoffRequests,Math.floor(e.errorBackoffRemaining))))),o}var $D=class{page;media;lastDebug=null;constructor(t,r){let n=t.config??{},i=n.pageDelayMin??ti.pageDelayMin,s=n.pageDelayMax??ti.pageDelayMax,o=n.pageDelayIncrease??ti.pageDelayIncrease,a=n.mediaConcurrencyMin??ti.mediaConcurrencyMin,c=n.mediaConcurrencyMax??ti.mediaConcurrencyMax,u=n.mediaConcurrencyIncrease??ti.mediaConcurrencyIncrease;this.page=S2e(r?.page,t.pageDelayStart,i,s,o,!0),this.media=S2e(r?.media,ti.mediaConcurrencyStart,a,c,u,!1)}getPageDelay(){return Math.round(this.page.currentValue)}getMediaConcurrency(){return Math.round(this.media.currentValue)}getPageConcurrency(){let t=this.getPageDelay();return t<200?3:t<500?2:1}getState(){return{page:{currentValue:this.page.currentValue,throughputEma:this.page.throughputEma,errorBackoffRemaining:this.page.errorBackoffRemaining},media:{currentValue:this.media.currentValue,throughputEma:this.media.throughputEma,errorBackoffRemaining:this.media.errorBackoffRemaining}}}updateTrack(t,r,n,i){if(r<=0)return this.lastDebug={track:i,elapsed:r,workDone:n,throughput:0,ema:t.throughputEma,ratio:null,decision:"skip"},"skip";let s=n/r;if(t.throughputEma===null)return t.throughputEma=s,t.errorBackoffRemaining>0&&t.errorBackoffRemaining--,this.lastDebug={track:i,elapsed:r,workDone:n,throughput:s,ema:s,ratio:null,decision:"warmup"},"warmup";let o=s/t.throughputEma;if(t.throughputEma=t.throughputEma*(1-ti.throughputEmaAlpha)+s*ti.throughputEmaAlpha,t.errorBackoffRemaining>0)return t.errorBackoffRemaining--,this.lastDebug={track:i,elapsed:r,workDone:n,throughput:s,ema:t.throughputEma,ratio:o,decision:"error_backoff"},"error_backoff";let a;return osetTimeout(t,e))}function cNt(e,t){let r=de(e),n=[];r('script[type="application/ld+json"]').each((i,s)=>{n.push(r(s).html()||"")});for(let i of n)try{let s=JSON.parse(i);if(s["@type"]==="Product"&&s.name){let o=Array.isArray(s.offers)?s.offers:s.offers?[s.offers]:[],a=o[0]?.price?String(o[0].price):"",c=[];if(typeof s.image=="string")c.push(s.image);else if(Array.isArray(s.image))for(let u of s.image)typeof u=="string"?c.push(u):u?.url&&c.push(u.url);return{name:s.name,description:s.description||"",regularPrice:a,sku:s.sku||"",images:c,inStock:o[0]?.availability?.includes("InStock")??!0,sourceUrl:t}}}catch{}return null}function uNt(e,t,r){if(t<0)return[];if(e.length<=t)return e.slice();if(t===0)return[];let n=new Map;for(let u of e){let l=n.get(u.type);l?l.push(u):n.set(u.type,[u])}let i=[],s=new Set,o=n.get("homepage");if(o){for(let u of o){if(i.length>=t)break;i.push(u),s.add(u)}n.delete("homepage")}if(r&&r.size>0)for(let u of e){if(i.length>=t)break;s.has(u)||u.url&&r.has(u.url)&&(i.push(u),s.add(u))}let a=new Map;for(let u of n.keys())a.set(u,0);let c=!0;for(;i.length=t)break;let d=a.get(u);for(;d!Oe.has(_e.url))}let J=lNt(r,R),oe=g??(a?3:void 0);oe!==void 0&&oe>=0&&(R=uNt(R,oe,J));let j=R.map(Oe=>Oe.url);if(j.length===0)return{pagesExtracted:0,postsExtracted:0,productsExtracted:0,failed:0,mediaCollected:0};let ee=0,K=0,ue=0,G=0,fe=new Set,Ze=new Map,Z=Oe=>{try{l?.sendLoggingMessage?.({level:"info",data:Oe})}catch{}},xe=0;for(;xe{let it=Date.now(),Ke=`extractPage ${Le}`;try{let H=await dr(p(Le),w,Ke);return{url:Le,pageData:H,elapsedMs:Date.now()-it,error:null,timedOut:!1}}catch(H){let le=H instanceof dE&&H.label===Ke;return{url:Le,pageData:null,elapsedMs:Date.now()-it,error:H instanceof Error?H.message:String(H),timedOut:le}}}));if(b&&Ye.some(Le=>Le.timedOut))try{await b()}catch(Le){Z(` [warn] onExtractTimeout failed: ${Le instanceof Error?Le.message:String(Le)}`)}if(Ye.some(Le=>Le.error)&&(_.recordPageError(),u)){let Le=Ye.filter(it=>it.error).length;Z(` [tuner] page delay: \u2192 ${_.getPageDelay()}ms (error backoff \u2014 ${Le}/${Ye.length} failed)`)}for(let Le of Ye)if(!Le.error){let it=Le.elapsedMs/1e3,Ke=_.recordPageResult({elapsed:it});if(u&&_.lastDebug){let H=_.lastDebug;Z(` [tuner:debug] page: elapsed=${H.elapsed.toFixed(2)}s throughput=${H.throughput.toFixed(2)} ema=${H.ema?.toFixed(2)??"null"} ratio=${H.ratio?.toFixed(2)??"n/a"} \u2192 ${H.decision}`)}u&&(Ke==="increase"||Ke==="decrease")&&Z(` [tuner] page delay: \u2192 ${_.getPageDelay()}ms (${Ke})`)}for(let Le=0;LeFe.url===it)?.type||lr(it),Te=te==="product"?"product":te==="post"||te==="blog-post"?"post":"page";f.bumpProgress(Te,"failed"),f.save()}continue}let ae;if(!a&&D){let vt=_.getMediaConcurrency(),se=[];for(let te of Ke.mediaUrls)if(!M.has(te)){if(kq(te)){M.add(te);continue}if(F&&!F.shouldAttempt(te)){M.add(te);let Te=F.get(te);if(Te?.status==="success"&&Te.localPath){let Fe=S.get(Te.localPath);Fe||(Fe=n.addMedia({url:te,localPath:Te.localPath,title:Te.localPath.split("/").pop()||""}),S.set(Te.localPath,Fe),n.isStreaming&&n.flushItem(n.items[n.items.length-1])),ae||(ae=Fe)}continue}M.add(te),se.push(te)}for(let te=0;tech(ct,D,k,v,{svgRaster:!0}).then($=>({mediaUrl:ct,...$})))),ft=(Date.now()-Fe)/1e3,Pr=Pe.reduce((ct,$)=>ct+($.bytes??0),0),ar=Pe.filter(ct=>ct.error).length,jn=Pe.filter(ct=>!ct.error&&(ct.bytes??0)>0).length;if(ar>=ti.mediaErrorMinCount&&ar>Te.length*ti.mediaErrorRatio)_.recordMediaError(),u&&Z(` [tuner] media concurrency: \u2192 ${_.getMediaConcurrency()} (error \u2014 ${ar}/${Te.length} failed)`);else if(jn>0){let ct=_.recordMediaResult({elapsed:ft,bytesDownloaded:Pr});if(u&&_.lastDebug){let $=_.lastDebug;Z(` [tuner:debug] media: elapsed=${$.elapsed.toFixed(2)}s bytes=${$.workDone} throughput=${$.throughput.toFixed(0)} ema=${$.ema?.toFixed(0)??"null"} ratio=${$.ratio?.toFixed(2)??"n/a"} \u2192 ${$.decision}`)}u&&(ct==="increase"||ct==="decrease")&&Z(` [tuner] media concurrency: \u2192 ${_.getMediaConcurrency()} (${ct})`)}for(let ct of Pe){if(!ct.error&&ct.localPath){let $=S.get(ct.localPath);if($)ae||(ae=$);else{let Ae=n.addMedia({url:ct.mediaUrl,localPath:ct.localPath,title:ct.filename||""});S.set(ct.localPath,Ae),n.isStreaming&&n.flushItem(n.items[n.items.length-1]),ae||(ae=Ae)}}if(i.logMedia({url:ct.mediaUrl,localPath:ct.localPath,error:ct.error}),F){if(ct.error)F.markFailure(ct.mediaUrl,ct.error);else if(ct.localPath){let $=ct.svgRisky!==void 0||ct.rasterPath||ct.rasterError?{svgRisky:ct.svgRisky,rasterPath:ct.rasterPath,rasterError:ct.rasterError}:void 0;F.markSuccess(ct.mediaUrl,ct.localPath,$)}}}}}let Be=t.find(vt=>vt.url===it),ge=Ke.detectedType||Be?.type||lr(it);if(ge==="page"||ge==="homepage"){let vt=new Set(["BlogPosting","NewsArticle","Article","SocialMediaPosting"]);Array.isArray(Ke.jsonLd)&&Ke.jsonLd.some(te=>{if(!te||typeof te!="object")return!1;let Te=te,Fe=Te["@type"];if(typeof Fe!="string"||!vt.has(Fe))return!1;let Pe=Te.mainEntityOfPage;if(Pe&&typeof Pe=="object"){let ft=Pe,Pr=typeof ft.url=="string"?ft.url:typeof ft["@id"]=="string"?ft["@id"]:null;if(Pr&&Pr!==it)return!1}return!0})&&(ge="post")}let pe=ge==="post"||ge==="blog-post",Ge=ge==="product";if(Ge&&d&&!a){let vt=h?.(it,Ke.content)??cNt(Ke.content,it);vt&&(d.addProduct(vt),ue++)}let St=oNt(Ke.content),We=Ge&&d?Ke.slug:KB(ZB(it),Ze),It;if(Ke.author&&(It=Ke.author.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||void 0,It&&!fe.has(It)&&(fe.add(It),n.addAuthor({login:It,displayName:Ke.author}))),Ge&&d||(pe?(n.addPost({title:Ke.title,slug:We,content:St,excerpt:Ke.excerpt,date:Ke.date,seoTitle:Ke.seoTitle,seoDescription:Ke.seoDescription,sourceUrl:it,featuredMediaId:ae,categories:Ke.categories,tags:Ke.tags,author:It}),K++):(n.addPage({title:Ke.title,slug:We,content:St,excerpt:Ke.excerpt,date:Ke.date,seoTitle:Ke.seoTitle,seoDescription:Ke.seoDescription,sourceUrl:it}),ee++)),!(Ge&&d)){n.isStreaming&&n.flushItem(n.items[n.items.length-1]);try{let vt=new URL(it).pathname,se=`/${We}/`;vt&&vt!=="/"&&vt!==se&&n.addRedirect({from:vt,to:se})}catch{}}let or=Date.now()-ce;if(i.logProcessed({url:it,slug:Ke.slug,durationMs:or,qualityScore:Ke.qualityScore}),f){let vt=Ge?"product":pe?"post":"page";f.bumpProgress(vt,"extracted"),(le+1)%10===0&&(f.setCursor("adaptive-tuner",_.getState()),f.save(),F?.flush())}if(u&&Z(` media: ${Ke.mediaUrls.length}, quality: ${Ke.qualityScore}, ${or}ms`),A){F?.flush();try{await A({url:it,slug:Ke.slug,type:ge,items:n.items.slice(ie),mediaUrls:Ke.mediaUrls})}catch(vt){Z(` [warn] onPageExtracted failed for ${it}: ${vt.message}`)}}}f&&f.setCursor("adaptive-tuner",_.getState());let sr=_.getPageDelay();xe+_e.length0&&await aNt(sr),xe+=_e.length}for(let Oe=0;Oet&&(t=r.attributes.length);return t}customMetaKeys(){let t=new Set;for(let r of this.products)if(r.meta)for(let n of Object.keys(r.meta))IG.includes(n)||t.add(n);return[...t].sort()}buildHeaders(t){let r=["id","type","sku","name","published","short_description","description","regular_price","sale_price","category_ids","tag_ids","images","weight","length","width","height","stock_status","stock_quantity"],n=this.maxAttributes();for(let i=1;i<=n;i++)r.push(`attributes:name${i}`),r.push(`attributes:value${i}`),r.push(`attributes:visible${i}`),r.push(`attributes:taxonomy${i}`);r.push("parent_id");for(let i of IG)r.push(`meta:${i}`);for(let i of t)r.push(`meta:${i}`);return r}static collapseNewlines(t){return t.replace(/\r?\n/g," ")}static metaValue(t,r){return r===T2e&&t.seoTitle?t.seoTitle:r===R2e&&t.seoDescription?t.seoDescription:r===Q2e&&t.costOfGoods?t.costOfGoods:t.meta?.[r]||""}buildRow(t,r,n){let i=e.collapseNewlines,s=["",t.type||"simple",t.sku||"",i(t.name),t.published===!1?"0":"1",i(t.shortDescription||""),i(t.description||""),t.regularPrice||"",t.salePrice||"",t.categories?t.categories.join(" | "):"",t.tags?t.tags.join(" | "):"",t.images?t.images.join(", "):"",t.weight||"",t.length||"",t.width||"",t.height||"",t.inStock===!1?"outofstock":t.inStock===!0?"instock":"",t.stock!=null?String(t.stock):""];for(let o=0;othis.buildRow(a,i,r)),o=_2e.default.unparse({fields:n,data:s},{newline:`\r +`});x2e(t,o,"utf8")}_streamDir=null;_jsonlPath=null;_streaming=!1;get isStreaming(){return this._streaming}openStream(t,{resume:r=!1}={}){k2e(t,{recursive:!0}),this._streamDir=t,this._jsonlPath=B2e(t,"products.jsonl"),this._streaming=!0,r||x2e(this._jsonlPath,"","utf8")}flushProduct(t){if(!this._streaming||!this._jsonlPath)throw new Error("Cannot flushProduct: streaming is not active. Call openStream() first.");fNt(this._jsonlPath,JSON.stringify(t)+` +`,"utf8")}closeStream(){if(!this._streaming||!this._jsonlPath||!this._streamDir)throw new Error("Cannot closeStream: streaming is not active.");let t=B2e(this._streamDir,"products.csv"),r=gNt(this._jsonlPath);return r.length>0&&(this.products=r,this.serialize(t),this.products=[]),this._streaming=!1,t}};function gNt(e){if(!hNt(e))return[];let t=pNt(e,"utf8"),r=[];for(let n of t.split(` +`))if(n.trim())try{r.push(JSON.parse(n))}catch{}return r}Bt();function mNt(e,t){let r=(e??"").trim();if(!r||r.startsWith("data:"))return null;try{return new URL(r,t).toString()}catch{return null}}function D2e(e){return e.split(",").map(t=>t.trim().split(/\s+/)[0]).filter(Boolean)}function N2e(e,t){let r=de(e),n=new Set,i=s=>{let o=mNt(s,t);o&&n.add(o)};return r("img").each((s,o)=>{i(r(o).attr("src"));for(let a of D2e(r(o).attr("srcset")||""))i(a)}),r("source").each((s,o)=>{for(let a of D2e(r(o).attr("srcset")||""))i(a)}),i(r('meta[property="og:image"]').attr("content")),[...n]}var yNt="Mozilla/5.0 (compatible; DataLiberation/1.0)";async function bNt(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":yNt}});if(t.ok)return await t.text();await t.body?.cancel()}catch{}return""}async function ENt(e,t){let r=await e.newPage();try{return await r.goto(t,{waitUntil:"domcontentloaded",timeout:2e4}),await r.waitForTimeout(800).catch(()=>{}),await r.content()}catch{return""}finally{await r.close().catch(()=>{})}}function CNt(e,t){let r=Re(e,"article:published_time");if(r)return r;let n=e.match(/]+datetime=["']([^"']+)["']/i)?.[1];if(n)return n;for(let i of t){let s=i.datePublished;if(typeof s=="string")return s}return""}function wNt(e,t){let r=Re(e,"article:author");if(r)return r;for(let n of t){let i=n.author;if(typeof i=="string")return i;if(i&&typeof i=="object"){let s=i.name;if(typeof s=="string")return s}}}function INt(e,t){let r=rD(t),n=SBe(t),i=xBe(n),s=Jh(t)||Xt(e),o=Re(t,"og:description")||Re(t,"description")||"",a=Re(t,"og:title")||Cr(t)||s,c=N2e(t,e),u=BBe(n),l=u?r+` +`+u:r,d="low";return r.length>200?d="high":r.length>50&&(d="medium"),{title:s,slug:Xt(e),content:l,excerpt:o,date:CNt(t,n),seoTitle:a,seoDescription:o,mediaUrls:c,qualityScore:d,categories:[],tags:[],author:wNt(t,n),detectedType:i,jsonLd:n}}async function M2e(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=s.render!==!1,u=new ri;a&&!s.dryRun&&u.openStream(a);let l=null,d=null,f=null;if(c)try{let p=await Jl({cdpPort:s.cdpPort});l=p.browser,d=p.close,f=l.contexts()[0]||await dr(l.newContext(),3e4,"context create")}catch{l=null,f=null}try{let p=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:u,onPageExtracted:s.onPageExtracted,extractPage:async h=>{let A=f?await ENt(f,h):"";return A||(A=await bNt(h)),INt(h,A)}});return p.productsExtracted>0&&a&&!s.dryRun&&(u.isStreaming?u.closeStream():u.serialize(a+"/products.csv")),p}finally{await d?.().catch(()=>{})}}function SNt(e){return!1}var P2e={id:"default",detect:SNt,discover:I2e,extract:M2e};_i();async function vNt(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});return t.ok?await t.text():(await t.body?.cancel(),"")}catch{return""}}async function xNt(e){let t=e.includes("://")?e:`https://${e}`,r=new URL(t).origin,n=[],i=new Set,s=[{path:"/sitemap.website.xml",type:"page"},{path:"/sitemap.blog.xml",type:"post"}];for(let{path:o,type:a}of s){let c=await vNt(`${r}${o}`);if(!c)continue;let u=eE(c);for(let l of u){if(i.has(l))continue;i.add(l);let d=lr(l)==="homepage"?"homepage":a;n.push({url:l,type:d})}}return n}async function L2e(e,t){let r=e.includes("://")?e:`https://${e}`,n="";try{let h=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});h.ok?n=await h.text():await h.body?.cancel()}catch{}let i=Re(n,"og:title"),s=Re(n,"og:description"),a=Re(n,"og:site_name")||i||Cr(n)||"Imported Site",c=s||Re(n,"description")||"",l=n.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",d=ks(n,r),f=await xNt(r);f.length===0&&f.push({url:r,type:"homepage"});let p={};for(let h of f)p[h.type]=(p[h.type]||0)+1;return{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:a,tagline:c,language:l},navigation:d,counts:p,urls:f}}zi();Bt();function ml(e){if(!e)return e;let t=e.trim();if(t.startsWith("//")&&(t=`https:${t}`),!/^https?:\/\/img1\.wsimg\.com\/isteam\//i.test(t))return e;let[r]=t.split("/:/");return`${r}/:/rs=w:4000,cg:true`}function F2e(e){let t=new Set,r=/https?:\/\/img1\.wsimg\.com\/isteam\/[^\s"'<>)]+/g,n=/\/\/img1\.wsimg\.com\/isteam\/[^\s"'<>)]+/g;for(let o of e.match(r)||[])t.add(o);for(let o of e.match(n)||[])t.add(`https:${o}`);let i=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let o of i){let a=o.match(/src=["']([^"']+)["']/i);if(a?.[1]&&!a[1].startsWith("data:")){let c=a[1].startsWith("//")?`https:${a[1]}`:a[1];c.startsWith("http")&&t.add(c)}}let s=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].map(ml).filter(o=>{try{let a=new URL(o);return/\/favicon\//i.test(a.pathname)?!1:/^img1\.wsimg\.com$/i.test(a.hostname)?!0:s.test(a.pathname)?!1:Mr.test(a.pathname)}catch{return!1}})}function c1(e){return e.replace(/&/g,"&").replace(/"/g,""")}function O2e(e){let t="window._BLOG_DATA=",r=e.indexOf(t);if(r<0)return null;let n=e.indexOf("",r);if(n<0)return null;let i=e.slice(r+t.length,n).trim().replace(/;$/,"");try{return JSON.parse(i)}catch{return null}}function U2e(e){let t=de(e);t("script, style, noscript, link, meta").remove(),t('section[data-aid="HEADER_SECTION"]').remove(),t('header[data-aid="HEADER_WIDGET"]').remove(),t('[data-aid^="FOOTER_"]').remove(),t("footer").remove(),t('[data-aid*="COOKIE"], [data-aid*="HAMBURGER"], [data-aid="NAV_MORE"]').remove(),t('[data-aid$="_SECTION_TITLE_RENDERED"]').first().remove(),t('[data-aid$="_IMAGE_RENDERED0"]').first().remove(),t("img, source").each((n,i)=>{let s=t(i),o=s.attr("src");o&&!o.startsWith("data:")&&s.attr("src",ml(o));let a=s.attr("data-srclazy");if(a){let c=ml(a);s.attr("data-srclazy",c),(!o||o.startsWith("data:"))&&s.attr("src",c)}s.removeAttr("srcset"),s.removeAttr("data-srcsetlazy")}),t("source").remove();let r=t("main").first();return r.length&&r.text().trim().length>50?r.html()?.trim()||"":t("body").html()?.trim()||""}function SG(e){let t=de(e),r=t('section[data-aid="HEADER_SECTION"]'),n=new Set(r.find("h1, h2").toArray()),i=t("h1").toArray().find(o=>!n.has(o));if(i){let o=t(i).text().trim();if(o)return o}let s=t("h2").toArray().find(o=>!n.has(o));if(s){let o=t(s).text().trim();if(o)return o}return Re(e,"og:title")||Cr(e)}var $2e={BOLD:"strong",ITALIC:"em",UNDERLINE:"u",STRIKETHROUGH:"s",CODE:"code"};function H2e(e,t){let r=e.text||"";if(!r)return"";let n=e.inlineStyleRanges||[],i=e.entityRanges||[],s=[];for(let d=0;d=h.offset&&d=h.offset&&d{for(;a.length;){let d=a.pop(),f=$2e[d];f&&(o+=``)}if(c!=null){let d=t[String(c)];d&&d.type==="LINK"&&(o+="
    "),c=null}},l={styles:new Set,entity:null};for(let d=0;dl.styles.has(A)),h=f.entityKey===l.entity;if(!p||!h){if(u(),f.entityKey!=null){let A=t[String(f.entityKey)];if(A&&A.type==="LINK"){let g=c1(String(A.data?.href||"#")),m=A.data?.target?` target="${c1(String(A.data.target))}"`:"";o+=``,c=f.entityKey}}for(let A of f.styles){let g=$2e[A];g&&(o+=`<${g}>`,a.push(A))}l.styles=new Set(f.styles),l.entity=f.entityKey}o+=Ss(f.char)}return u(),o}function BNt(e,t){let r=e.entityRanges||[];if(r.length===0)return"";let n=t[String(r[0].key)];if(!n||n.type!=="IMAGE")return"";let i=ml(String(n.data?.src||"")),s=c1(String(n.data?.alt||""));return`
    ${s}
    `}function j2e(e){let t=e.blocks||[],r=e.entityMap||{},n=[],i=null,s=()=>{i&&(n.push(``),i=null)};for(let o of t){let a=o.type||"unstyled",c=a==="unordered-list-item";if(c||a==="ordered-list-item"){let d=c?"ul":"ol";i!==d&&(s(),n.push(`<${d}>`),i=d),n.push(`
  • ${H2e(o,r)}
  • `);continue}if(s(),a==="atomic"){let d=BNt(o,r);d&&n.push(d);continue}let l=H2e(o,r);if(a==="unstyled")l.trim()&&n.push(`

    ${l}

    `);else if(/^header-(one|two|three|four|five|six)$/.test(a)){let f={"header-one":1,"header-two":2,"header-three":3,"header-four":4,"header-five":5,"header-six":6}[a];n.push(`${l}`)}else a==="blockquote"?n.push(`
    ${l}
    `):a==="code-block"?n.push(`
    ${l}
    `):l.trim()&&n.push(`

    ${l}

    `)}return s(),n.join(` +`)}async function q2e(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"";return yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,onPageExtracted:s.onPageExtracted,extractPage:async c=>{let u="";try{let D=await fetch(c,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});D.ok?u=await D.text():await D.body?.cancel()}catch{}let d=O2e(u)?.post,f,p,h,A=[],g;if(d&&typeof d.fullContent=="string"){try{let D=JSON.parse(d.fullContent),k=d.featuredImage||"";if(k&&D.blocks?.length){let v=D.blocks[0];if(v.type==="atomic"&&(v.entityRanges?.length??0)>0){let M=D.entityMap?.[String(v.entityRanges[0].key)];if(M?.type==="IMAGE"){let F=String(M.data?.src||"");F.startsWith("//")&&(F=`https:${F}`);let S=I=>I.replace(/^https?:/,"").split("?")[0];S(F)===S(k)&&(D.blocks=D.blocks.slice(1))}}}f=j2e(D)}catch{f=d.content?`

    ${Ss(d.content)}

    `:""}p=d.title||SG(u)||Xt(c),h=d.publishedDate||d.date||"",A=Array.isArray(d.categories)?d.categories:[],g="post"}else{f=U2e(u),p=SG(u)||Xt(c);let D=Re(u,"article:published_time"),k=u.match(/]+datetime=["']([^"']+)["']/i)?.[1];h=D||k||""}let m=d?.content&&d.content.replace(/\.{3}$/,"").trim()||Re(u,"og:description")||Re(u,"description")||"",b=Re(u,"og:title")||Cr(u)||p,C=m,E=Re(u,"author")||void 0,w=F2e(u);if(f){let D=f.match(/https?:\/\/img1\.wsimg\.com\/isteam\/[^\s"'<>)]+/g)||[];for(let k of D)w.includes(k)||w.push(k)}if(d?.featuredImage){let D=ml(d.featuredImage);w.includes(D)||w.push(D)}let T=Re(u,"og:image");if(T&&T.startsWith("http")){let D=ml(T);if(!w.includes(D))try{let k=new URL(D);(/^img1\.wsimg\.com$/i.test(k.hostname)||Mr.test(k.pathname))&&w.push(D)}catch{}}let _="low";return f.length>500?_="high":f.length>100&&(_="medium"),{title:p,slug:Xt(c),content:f,excerpt:m,date:h,seoTitle:b,seoDescription:C,mediaUrls:w,qualityScore:_,categories:A,tags:[],author:E,detectedType:g}}})}var z2e={id:"godaddy-wm",detect(e){return!1},discover:L2e,extract:q2e};_i();async function V2e(e,t){let r="";try{let h=e.includes("://")?e:`https://${e}`,A=await fetch(h,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});A.ok?r=await A.text():await A.body?.cancel()}catch{}let n=Re(r,"og:title"),i=Re(r,"og:description"),s=n||Cr(r)||"Imported Site",o=i||Re(r,"description")||"",c=r.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",u=await si(e),l=e.includes("://")?e:`https://${e}`,d=ks(r,l),f={},p=[];for(let h of u){let A=lr(h);A==="page"&&/\/blog-post|\/blog\//.test(h)&&(A="post"),p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:l,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:s,tagline:o,language:c},navigation:d,counts:f,urls:p}}zi();function G2e(e){let t=[],r=/]+type=["']application\/ld\+json["'][^>]*>([\s\S]*?)<\/script>/gi,n;for(;(n=r.exec(e))!==null;)try{let i=JSON.parse(n[1].trim());if(Array.isArray(i))for(let s of i)s&&typeof s=="object"&&t.push(s);else i&&typeof i=="object"&&t.push(i)}catch{}return t}function vG(e,t){for(let r of e){let n=r["@type"];if(typeof n=="string"&&t.test(n)||Array.isArray(n)&&n.some(i=>typeof i=="string"&&t.test(i)))return r}return null}function W2e(e,t){let r=typeof e.name=="string"?e.name:"";if(!r)return null;let i=(Array.isArray(e.offers)?e.offers:e.offers&&typeof e.offers=="object"?[e.offers]:[])[0],s=i?.price!=null?String(i.price):"",o=typeof i?.availability=="string"?i.availability:"",a=[];if(typeof e.image=="string")a.push(e.image);else if(Array.isArray(e.image))for(let c of e.image)typeof c=="string"?a.push(c):c&&typeof c=="object"&&typeof c.url=="string"&&a.push(c.url);return{name:r,type:"simple",description:typeof e.description=="string"?e.description:"",regularPrice:s,sku:typeof e.sku=="string"?e.sku:"",images:a,inStock:o?/InStock/i.test(o):!0,sourceUrl:t}}var Y2e=/\b(block-sticky-bar|block-header|block--footer|block-header-cart|block-header-item|block-blog-header)\b/,kNt=/]*\bclass=["'][^"']*\b(block-sticky-bar|block-header|block--footer|block-blog-header)\b[^"']*["'][^>]*>[\s\S]*?<\/section>/gi,_Nt=[/]*>[\s\S]*?<\/nav>/gi,/]*>[\s\S]*?<\/header>/gi,/]*>[\s\S]*?<\/footer>/gi];function xG(e){let t=e;for(let r of _Nt)t=t.replace(r,"");return t.replace(kNt,"")}function J2e(e){let t=/]*\bclass=["']([^"']*)["'][^>]*>([\s\S]*?)<\/section>/gi,r=[],n;for(;(n=t.exec(e))!==null;){let a=n[1],c=n[2];/\bblock\b/.test(a)&&(Y2e.test(a)||c.trim()&&r.push(c.trim()))}if(r.length>0)return r.join(` + +`);let i=e.match(/]*>([\s\S]*?)<\/article>/i);if(i?.[1]?.trim())return i[1].trim();let s=e.match(/]*>([\s\S]*?)<\/main>/i);if(s?.[1]?.trim())return xG(s[1]).trim();let o=e.match(/]*>([\s\S]*?)<\/body>/i);return o?.[1]?xG(o[1]).trim():""}function Z2e(e){let t=e.match(/]*>([\s\S]*?)<\/h1>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(t)return t;let r=Re(e,"og:title");return r||Cr(e)}function K2e(e,t){if(!t)return e;let r=i=>i.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().toLowerCase(),n=r(t);return n?e.replace(/]*>([\s\S]*?)<\/h1>/i,(i,s)=>r(s)===n?"":i):e}function X2e(e,t){let r;try{r=new URL(t.includes("://")?t:`https://${t}`).origin}catch{return e}return e.replace(/(src|href)=["'](\/[^"']+)["']/gi,(n,i,s)=>`${i}="${r}${s}"`)}function eRe(e){let t=new Set,r=/https?:\/\/[^\s"'<>)]*zyrosite\.com\/[^\s"'<>)]+/g,n=e.match(r)||[];for(let o of n){let a=o.replace(/(https?:\/\/[^/]+\/cdn-cgi\/image\/[^/]+\/)(.+)/,(c,u,l)=>`https://assets.zyrosite.com/${l}`);t.add(a)}let i=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let o of i){let a=o.match(/src=["']([^"']+)["']/i);a?.[1]&&a[1].startsWith("http")&&t.add(a[1])}let s=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].filter(o=>{try{let a=new URL(o);return s.test(a.pathname)?!1:/zyrosite\.com/i.test(a.hostname)?!0:Mr.test(a.pathname)}catch{return!1}})}async function tRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ri;a&&!s.dryRun&&c.openStream(a);let u=new Map,l=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async d=>{let f=await fetch(d,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});if(!f.ok)throw await f.body?.cancel(),new Error(`HTTP ${f.status} ${f.statusText}`);let p=await f.text(),h=G2e(p),A=vG(h,/^(Article|BlogPosting|NewsArticle)$/),g=vG(h,/^Product$/),m=!!g||/class=["'][^"']*\bblock-product(?:-wrapper)?\b/.test(p);if(m&&g){let U=W2e(g,d);U&&u.set(d,U)}let b=A?.headline||Z2e(p)||Xt(d),C=X2e(K2e(J2e(p),b),d),E=Re(p,"og:description")||Re(p,"description")||"",w=Re(p,"og:title")||Cr(p)||b,T=E,_=A?.datePublished||"";if(_||(_=Re(p,"article:published_time")||""),!_){let U=p.match(/]+datetime=["']([^"']+)["']/i)?.[1];U&&(_=U)}let D=[],k=A?.articleSection;typeof k=="string"?D=[k]:Array.isArray(k)&&(D=k.filter(U=>typeof U=="string"));let v,M=A?.author;if(M&&typeof M=="object")if(Array.isArray(M)){let U=M[0];U&&typeof U=="object"&&typeof U.name=="string"&&(v=U.name)}else typeof M.name=="string"&&(v=M.name);let F=eRe(p),S=Re(p,"og:image");if(S&&S.startsWith("http")&&!F.includes(S))try{let U=new URL(S);(Mr.test(U.pathname)||/zyrosite\.com/i.test(U.hostname))&&F.push(S)}catch{}let I=C.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),R="low";return I.length>200?R="high":I.length>50&&(R="medium"),{title:b,slug:Xt(d),content:C,excerpt:E,date:_,seoTitle:w,seoDescription:T,mediaUrls:F,qualityScore:R,categories:D,tags:[],author:v,detectedType:m?"product":void 0}},extractProduct:d=>u.get(d)??null});return l.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),l}function TNt(e){return!1}var rRe={id:"hostinger",detect:TNt,discover:V2e,extract:tRe};Bt();_i();function H0(e){try{return new URL(e.includes("://")?e:`https://${e}`).origin}catch{return null}}function HD(e,t){return e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("//")?"https:"+e:e.startsWith("/")&&t?t+e:null:null}function jD(e){return!!(/\/(blog|news|insights|articles)\/[^/?#]+/i.test(e)||/\/(resources|updates)\/[^/?#]+\/[^/?#]+/i.test(e))}async function nRe(e,t){let r=e.includes("://")?e:`https://${e}`,n;try{n=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}})}catch(A){throw new Error(`HubSpot discover(): fetch failed for ${r}: ${A.message}`)}if(!n.ok)throw await n.body?.cancel(),new Error(`HubSpot discover(): HTTP ${n.status} ${n.statusText} for ${r}`);let i;try{i=await n.text()}catch(A){throw await n.body?.cancel().catch(()=>{}),new Error(`HubSpot discover(): failed reading body of ${r}: ${A.message}`)}i.length>5242880&&(i=i.slice(0,5242880));let s=de(i),o=Re(i,"og:title"),a=Re(i,"og:description"),c=o||Cr(i)||"Imported Site",u=a||Re(i,"description")||"",l=s("html").attr("lang")||"en-US",d=await si(e),f=ks(i,r),p={},h=[];for(let A of d){let g=lr(A);g==="page"&&jD(A)&&(g="post"),h.push({url:A,type:g}),p[g]=(p[g]||0)+1}return h.length===0&&(h.push({url:r,type:"homepage"}),p.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:c,tagline:u,language:l},navigation:f,counts:p,urls:h}}Bt();zi();var BG=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|otf|pdf|zip|mp4|webm|mov)$/i;function RNt(e){let t=[],r=e.length,n=0;for(;n=r)break;let i=n;for(;n{let o=s.match(/(\d+(?:\.\d+)?)w/);if(o)return parseFloat(o[1]);let a=s.match(/(\d+(?:\.\d+)?)x/);return a?parseFloat(a[1]):0},n=t[t.length-1],i=r(n.descriptor);for(let s of t){let o=r(s.descriptor);o>i&&(n=s,i=o)}return n.url}function iRe(e,t){let r=new Set,n=H0(t),i=s=>{if(!s)return;let o=HD(s,n);o&&r.add(o)};return e("img").each((s,o)=>{let a=e(o);i(a.attr("src")),i(a.attr("data-src"));let c=a.attr("srcset");c&&i(qD(c))}),e("source[srcset]").each((s,o)=>{let a=e(o).attr("srcset")||"";i(qD(a))}),[...r].filter(s=>{try{let o=new URL(s);return BG.test(o.pathname)?!1:Mr.test(o.pathname)?!0:/hubspotusercontent/i.test(o.hostname)||/\/hubfs\//.test(o.pathname)}catch{return!1}})}function sRe(e){let t=[];return e('script[type="application/ld+json"]').each((r,n)=>{let i=e(n).text().trim().replace(/^$/,"").trim();if(!i)return;let s;try{s=JSON.parse(i)}catch{return}let o=Array.isArray(s)?s:[s];for(let a of o){if(!a||typeof a!="object")continue;let c=a,u=c["@graph"];if(Array.isArray(u))for(let l of u)l&&typeof l=="object"&&t.push(l);else t.push(c)}}),t}function oRe(e){let t=e["@type"],r=n=>n==="BlogPosting"||n==="Article"||n==="NewsArticle";return r(t)||Array.isArray(t)&&t.some(r)}function aRe(e,t){let r=e(".blog-post__timestamp").first().text().replace(/\s+/g," ").trim();if(r){let c=new Date(r);if(!isNaN(c.getTime()))return c.toISOString()}let n=e("time[datetime]").first().attr("datetime");if(n)return n;for(let c of sRe(e)){if(!oRe(c))continue;let u=c.datePublished;if(typeof u=="string"&&u)return u}let i=Re(t,"article:published_time");if(i)return i;let a=(e(".post-body").first().text()||e("body").first().text()||"").slice(0,500).match(/\b(?:on|posted on|published on|by[^,\n]{1,80},\s*on)\s+([A-Z][a-z]{2,}\s+\d{1,2},\s+\d{4}(?:\s+\d{1,2}:\d{2}(?::\d{2})?\s*[AP]M)?)/);if(a?.[1]){let c=new Date(a[1]);if(!isNaN(c.getTime()))return c.toISOString()}return""}function cRe(e,t){let r=e(".blog-post__author").first().text().replace(/\s+/g," ").trim();if(r)return r;let n=e('a[href*="/author/"]').first().text().trim();if(n)return n;let i=sRe(e);for(let o of i){if(!oRe(o))continue;let a=o.author;if(!a)continue;let c=Array.isArray(a)?a[0]:a;if(c&&typeof c=="object"&&typeof c.name=="string")return c.name}for(let o of i)if(o["@type"]==="Person"&&typeof o.name=="string")return o.name;return Re(t,"author")||void 0}function uRe(e){let t=[],r=new Set,n=s=>{let o=s.replace(/\s+/g," ").trim();if(!o)return;let a=o.toLowerCase();r.has(a)||(r.add(a),t.push(o))},i=e(".blog-post__tag-link");return i.length?(i.each((s,o)=>n(e(o).text())),t):(e('a[href*="/topic/"]').each((s,o)=>{let a=e(o).attr("href")||"";/\/topic\/[^/?#]+\/?(?:[?#]|$)/.test(a)&&n(e(o).text())}),t)}Bt();var QNt=[".hs-cta-wrapper",".hs-cta-node",".hs_cos_wrapper_type_form",".hs_cos_wrapper_type_blog_comments",".addthis_toolbox",".addthis_sharing_toolbox",".blog-post__preheader",".blog-post__summary",".blog-post__timestamp",".blog-post__author",".blog-post__social-sharing",".blog-post__tags",".blog-more",".blog-more-grid",".subscriber-form"].join(", ");function lRe(e){return e(".hs-blog-post").length>0}function zD(e){e.find(QNt).remove()}function dRe(e){let t=e(".post-body").first();if(t.length){zD(t);let s=t.html();if(s)return s.trim()}let r=e(".body-container").first();if(r.length){r.find("nav, header, footer").remove(),zD(r);let s=r.html();if(s)return s.trim()}let n=e("main").first();if(n.length&&n.text().trim()){zD(n);let s=n.html();if(s)return s.trim()}let i=e("body").first();if(i.length){i.find("nav, header, footer").remove(),zD(i);let s=i.html();if(s)return s.trim()}return""}function fRe(e,t){let r=H0(t),n=r?s=>/^https?:\/\//i.test(s)?s:s.startsWith("//")?"https:"+s:s.startsWith("/")?r+s:s:s=>s,i=de(e,null,!1);return i("img[srcset]").each((s,o)=>{let a=i(o),c=a.attr("srcset")||"",u=qD(c);u&&a.attr("src",u)}),r&&i("[src], [href], [data-src]").each((s,o)=>{let a=i(o);for(let c of["src","href","data-src"]){let u=a.attr(c);u&&a.attr(c,n(u))}}),i("img").removeAttr("srcset").removeAttr("sizes"),i("picture source").remove(),i.html()}function pRe(e,t){if(!t)return;let r=t.replace(/\s+/g," ").trim().toLowerCase();if(!r)return;let n=e("h1").first();if(!n.length)return;n.text().replace(/\s+/g," ").trim().toLowerCase()===r&&n.remove()}async function hRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ri;a&&!s.dryRun&&c.openStream(a);let u=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async l=>{let d=await fetch(l,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});if(!d.ok)throw await d.body?.cancel(),new Error(`HTTP ${d.status} ${d.statusText}`);let f=await d.text();f.length>5242880&&(f=f.slice(0,5242880));let p=de(f),h=lRe(p)||jD(l),A=Jh(f)||Xt(l),m=p(".blog-post__summary").first().text().replace(/\s+/g," ").trim()||Re(f,"og:description")||Re(f,"description")||"",b=h?aRe(p,f):"",C=h?cRe(p,f):void 0,E=h?uRe(p):[];pRe(p,A);let w=dRe(p),T=fRe(w,l),_=Re(f,"og:title")||Cr(f)||A,D=Re(f,"og:description")||Re(f,"description")||m,k=iRe(p,l),v=Re(f,"og:image");if(v&&!k.includes(v)){let S=HD(v,H0(l));if(S)try{let I=new URL(S);!BG.test(I.pathname)&&(Mr.test(I.pathname)||/hubspotusercontent/i.test(I.hostname)||/\/hubfs\//.test(I.pathname))&&k.push(S)}catch{}}let M=T.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),F="low";return M.length>200?F="high":M.length>50&&(F="medium"),{title:A,slug:Xt(l),content:T,excerpt:m,date:b,seoTitle:_,seoDescription:D,mediaUrls:k,qualityScore:F,categories:E,tags:[],author:C,detectedType:h?"post":void 0}}});return u.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),u}function DNt(e){return!1}var ARe={id:"hubspot",detect:DNt,discover:nRe,extract:hRe};var gRe={removeSelectors:["#upCart","#upCartStickyButton",'[class*="kl-teaser"]']};_i();async function kG(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)",Accept:"application/json"}});return t.ok?await t.json():(await t.body?.cancel(),null)}catch{return null}}async function VD(e,t){let r=[],n=1,i=20;for(;n<=i;){let s=e.includes("?")?"&":"?",o=`${e}${s}limit=250&page=${n}`,a=await kG(o);if(!a||!a[t]||a[t].length===0||(r.push(...a[t]),a[t].length<250))break;n++}return r}function _G(e){let t=e.match(/Shopify\.shop\s*=\s*["']([^"']+\.myshopify\.com)["']/i);if(t?.[1])return t[1];let r=e.match(/shopId["']?\s*[:,]\s*\d+[^}]*shop["']?\s*[:,]\s*["']([^"']+\.myshopify\.com)["']/i);if(r?.[1])return r[1];let n=e.match(/"shop"\s*:\s*"([^"]+\.myshopify\.com)"/i);if(n?.[1])return n[1]}function TG(e){let t=0;return e.title.length>0&&(t+=20),e.content.length>200?t+=25:e.content.length>50&&(t+=10),e.images.length>0&&(t+=15),e.hasStructuredData&&(t+=10),e.hasPriceSku&&(t+=10),e.date.length>0&&(t+=10),t>=50?"high":t>=25?"medium":"low"}function yRe(e){let t=c=>c.replace(/<[^>]*>/g,"").trim().length,n=e.match(/]*id="replo-fullpage-element"[^>]*>([\s\S]*?)<\/main>/i);if(n?.[1]&&t(n[1])>=100)return n[1].trim();let i=e.match(/]*class="[^"]*\brte\b[^"]*"[^>]*>/i);if(i){let u=e.indexOf(i[0])+i[0].length,l=1,d=u;for(;d0;){let f=e.indexOf("",d);if(p===-1)break;if(f!==-1&&f=100)return h;break}d=p+6}}}let s=e.match(/]*class="[^"]*alchemy-rte[^"]*"[^>]*>([\s\S]*?)<\/div>/i);if(s?.[1]&&t(s[1])>=100)return s[1].trim();let o=e.match(/]*>([\s\S]*?)<\/article>/i);if(o?.[1]&&t(o[1])>=100)return o[1].trim();let a=e.match(/]*>([\s\S]*?)<\/main>/i);return a?.[1]?.trim()?a[1].trim():""}var NNt=/\.(css|js|mjs|json|xml|txt|map|woff2?|ttf|eot|otf|pdf|zip|mp4|webm|mov|m4v)(?:$|[?#])/i,mRe=/(google-analytics|googletagmanager|facebook\.com\/tr|doubleclick|hotjar|segment\.|cdn\.shopify\.com\/shopifycloud\/(?:web-pixels|consent))/i;function j0(e){let t=new Set,r=n=>{if(!n)return;let i=n.trim();/^https?:\/\//i.test(i)&&t.add(i)};for(let n of e.match(/https?:\/\/cdn\.shopify\.com\/s\/files\/[^\s"'<>)]+/g)||[])r(n);for(let n of e.match(/<(?:img|source)\b[^>]*>/gi)||[]){for(let i of["src","data-src","data-lazy-src","data-original","data-image"]){let s=n.match(new RegExp(`\\b${i}=["']([^"']+)["']`,"i"));r(s?.[1])}for(let i of["srcset","data-srcset"]){let s=n.match(new RegExp(`\\b${i}=["']([^"']+)["']`,"i"));if(s?.[1])for(let o of s[1].split(","))r(o.trim().split(/\s+/)[0])}}for(let n of e.matchAll(/background(?:-image)?\s*:\s*[^;"']*url\((['"]?)([^)'"]+)\1\)/gi))r(n[2]);return[...t].filter(n=>{try{let i=new URL(n);return mRe.test(i.host)||mRe.test(n)||NNt.test(i.pathname)?!1:(Mr.test(i.pathname),!0)}catch{return!1}})}function bRe(e){let t=e.match(/datePublished["']?\s*[:=]\s*["']([^"']+)["']/i)?.[1];if(t)return t;let r=e.match(/]+datetime=["']([^"']+)["']/i)?.[1];if(r)return r;let n=Re(e,"article:published_time");return n||""}async function MNt(e,t){let{launchBrowser:r}=await Promise.resolve().then(()=>(Vi(),Mre)),{page:n,close:i}=await r({cdpPort:e}),s=[],o=new Set;try{let a=n;a.on("response",async c=>{let u=c.url();if(u.includes("admin.shopify.com/api/operations/")&&!(!u.includes("ProductIndex")&&!u.includes("ProductList")))try{let d=(await c.json()).data;if(!d)return;let p=d.filteredProducts?.edges||[];for(let h of p){let A=h.node?.handle;A&&!o.has(A)&&(o.add(A),s.push(A))}}catch{}});try{await a.goto(`${t}/admin/products`,{waitUntil:"networkidle",timeout:3e4})}catch{}for(let c=0;c<5&&(await a.evaluate(()=>window.scrollTo(0,document.body.scrollHeight)),await new Promise(u=>setTimeout(u,2e3)),!(s.length>200));c++);await new Promise(c=>setTimeout(c,1e3))}finally{await i()}return s}async function ERe(e,t){let r=e.includes("://")?e:`https://${e}`,n=new URL(r).origin,i=!1,s=await VD(`${n}/pages.json`,"pages");s.length>0&&(i=!0);let o="";try{let C=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});C.ok?o=await C.text():await C.body?.cancel()}catch{}let a=Re(o,"og:title"),c=Re(o,"og:description"),u=a||Cr(o)||"Imported Site",l=c||Re(o,"description")||"",f=o.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",p=ks(o,n),h=[],A={};if(i){for(let E of s){let w=`${n}/pages/${E.handle}`;h.push({url:w,type:"page"}),A.page=(A.page||0)+1}let C=await VD(`${n}/blogs.json`,"blogs");for(let E of C){let w=await VD(`${n}/blogs/${E.handle}/articles.json`,"articles");for(let T of w){let _=`${n}/blogs/${E.handle}/${T.handle}`;h.push({url:_,type:"post"}),A.post=(A.post||0)+1}}}let g=await si(r);for(let C of g){if(h.some(w=>w.url===C))continue;let E=lr(C);h.push({url:C,type:E}),A[E]=(A[E]||0)+1}for(let C of p){let E;try{E=new URL(C.href)}catch{continue}if(E.origin!==n)continue;let w=`${E.origin}${E.pathname.replace(/\/+$/,"")}`;if(w===n||w===`${n}/`||h.some(_=>_.url===w||_.url===C.href))continue;let T=lr(w);h.push({url:w,type:T}),A[T]=(A[T]||0)+1}let m=t;if(m.cdpPort)try{let C=await MNt(m.cdpPort,n);for(let E of C){let w=`${n}/products/${E}`;h.some(T=>T.url===w)||(h.push({url:w,type:"product"}),A.product=(A.product||0)+1)}}catch{}h.length===0&&(h.push({url:r,type:"homepage"}),A.homepage=1);let b=_G(o);if(!b){let C=new URL(r).hostname;C.endsWith(".myshopify.com")&&(b=C)}return{siteUrl:e,discoveredAt:new Date().toISOString(),shopDomain:b,siteMeta:{title:u,tagline:l,language:f},navigation:p,counts:A,urls:h,jsonApiAvailable:i}}Fs();var PNt="2025-04",GD=class{endpoint;accessToken;constructor({shopDomain:t,accessToken:r}){let n=t.replace(/^https?:\/\//,"").replace(/\/$/,"");this.endpoint=`https://${n}/admin/api/${PNt}/graphql.json`,this.accessToken=r}async request(t,r={}){let n=await fetch(this.endpoint,{method:"POST",signal:AbortSignal.timeout(3e4),headers:{"Content-Type":"application/json","X-Shopify-Access-Token":this.accessToken,Accept:"application/json"},body:JSON.stringify({query:t,variables:r})});if(!n.ok){let s=await n.text().catch(()=>"");throw new Error(`Shopify GraphQL HTTP ${n.status}: ${s.slice(0,200)}`)}let i=await n.json();if(i.errors&&i.errors.length>0){let s=i.errors.map(o=>o.message).join("; ");throw new Error(`Shopify GraphQL errors: ${s}`)}if(!i.data)throw new Error("Shopify GraphQL: empty data field");return i.data}},LNt=` query GetShopifyProducts( $first: Int!, $after: String, @@ -2665,24 +2665,24 @@ ${CTe} pageInfo { hasNextPage endCursor } } } -`;async function dRe(e,{pageSize:t=50,filter:r,session:n,cursorKey:i="shopify:products:endCursor",onBatch:s}={}){let o=!s,a=[],c=n?.getCursor(i)??null,u=1e4,l=0;for(;;){if(++l>u)throw new Error(`Shopify GraphQL pagination exceeded ${u} pages \u2014 aborting`);let d=await e.request(yNt,{first:t,after:c,query:r??null}),p=d.products.edges.map(g=>g.node);o&&a.push(...p),s&&p.length>0&&await s(p);let{hasNextPage:h,endCursor:A}=d.products.pageInfo;if(n&&A&&n.setCursor(i,A),!h||!A)break;if(A===c)throw new Error("Shopify GraphQL pagination cursor did not advance \u2014 aborting");c=A}return n&&n.setCursor(i,null),a}qi();function s1(e,t){if(e==null||e===0)return;let r=(t||"kg").toLowerCase(),n;switch(r){case"kg":n=e;break;case"g":n=e/1e3;break;case"lb":n=e*.453592;break;case"oz":n=e*.0283495;break;default:n=e}return Number(n.toFixed(4)).toString()}function HD(e,t){let r=e.variants||[],n=e.options||[],i=r.length>1||n.length>0&&n[0]?.name!=="Title",s=new Set;e.image?.src&&s.add(e.image.src);for(let C of e.images||[])s.add(C.src);let o=/src="(https?:\/\/[^"']+\.(jpg|jpeg|png|gif|webp)[^"']*)"/gi,a;for(;(a=o.exec(e.body_html||""))!==null;)s.add(a[1]);let c=[...s],u=r[0],l=e.tags?e.tags.split(",").map(C=>C.trim()).filter(Boolean):[],d=e.product_type?[e.product_type]:[],f=u?.price?Number(u.price):NaN,p=u?.compare_at_price?Number(u.compare_at_price):NaN,h=!i&&Number.isFinite(f)&&Number.isFinite(p)&&p>f,A={name:e.title,type:i?"variable":"simple",sku:i?e.handle||e.title.toLowerCase().replace(/[^a-z0-9]+/g,"-"):u?.sku||"",published:!0,description:e.body_html||"",regularPrice:i?"":h?String(u.compare_at_price):u?.price||"",salePrice:h&&u?.price||void 0,categories:d,tags:l,images:c,inStock:u?.available!==!1,stock:u?.inventory_quantity!=null?u.inventory_quantity:void 0,sourceUrl:t};n.length>0&&(A.attributes=n.map(C=>({name:C.name,values:C.values,visible:!0,global:!1})));let g=s1(u?.weight,u?.weight_unit);g&&(A.weight=g);let m=new Map,b=new Map;for(let C of e.images||[]){C.id&&m.set(C.id,C.src);for(let w of C.variant_ids||[])b.set(w,C.src)}let E=[];if(i)for(let C of r){let w=C.compare_at_price!=null&&C.compare_at_price!=="",T;C.featured_image?.src?T=C.featured_image.src:C.image_id&&m.has(C.image_id)?T=m.get(C.image_id):C.id&&b.has(C.id)&&(T=b.get(C.id));let _={name:e.title,type:"variation",sku:C.sku||"",parentSku:A.sku,published:!0,description:"",regularPrice:w?String(C.compare_at_price):C.price||"",salePrice:w&&C.price||void 0,inStock:C.available!==!1,stock:C.inventory_quantity!=null?C.inventory_quantity:void 0,...T?{images:[T]}:{}},N=s1(C.weight,C.weight_unit);N&&(_.weight=N);let k=[];C.option1!=null&&n[0]&&k.push({name:n[0].name,values:[C.option1],visible:!0,global:!1}),C.option2!=null&&n[1]&&k.push({name:n[1].name,values:[C.option2],visible:!0,global:!1}),C.option3!=null&&n[2]&&k.push({name:n[2].name,values:[C.option3],visible:!0,global:!1}),k.length>0&&(_.attributes=k),E.push(_)}return{parent:A,variations:E}}function wG(e,t){let n=(e.variants?.edges||[]).map(k=>k.node),i=e.options||[],s=n.length>1||i.length>0&&i[0]?.name!=="Title",o=new Set;e.featuredMedia?.image?.url&&o.add(e.featuredMedia.image.url);for(let k of e.media?.edges||[])k.node.image?.url&&o.add(k.node.image.url);let a=/src="(https?:\/\/[^"']+\.(jpg|jpeg|png|gif|webp)[^"']*)"/gi,c;for(;(c=a.exec(e.descriptionHtml||""))!==null;)o.add(c[1]);let u=[...o],l=n[0],d=e.tags||[],f=new Set;for(let k of e.collections?.edges||[])k.node.title&&f.add(k.node.title);f.size===0&&e.productType&&f.add(e.productType);let p=[...f],h=k=>{let v=k.inventoryItem?.tracked,M=k.inventoryPolicy,O=k.inventoryQuantity;return v?O==null?{inStock:!0,stock:void 0}:O>0?{inStock:!0,stock:O}:{inStock:M==="CONTINUE",stock:O}:{inStock:!0}},A=l?h(l):{inStock:!0},g=l?.price?Number(l.price):NaN,m=l?.compareAtPrice?Number(l.compareAtPrice):NaN,b=!s&&Number.isFinite(g)&&Number.isFinite(m)&&m>g,E={name:e.title,type:s?"variable":"simple",sku:s?e.handle||e.title.toLowerCase().replace(/[^a-z0-9]+/g,"-"):l?.sku||"",published:e.status==="ACTIVE",description:e.descriptionHtml||"",regularPrice:s?"":b?String(l.compareAtPrice):l?.price||"",salePrice:b&&l?.price||void 0,categories:p,tags:d,images:u,inStock:A.inStock,stock:A.stock,sourceUrl:t},C=e.seo?.title||e.metafields?.edges?.find(k=>k.node.key==="title_tag")?.node.value||"",w=e.seo?.description||e.metafields?.edges?.find(k=>k.node.key==="description_tag")?.node.value||"";C&&(E.seoTitle=C),w&&(E.seoDescription=w);let T=l?.inventoryItem?.unitCost?.amount;T&&Number.isFinite(Number(T))&&(E.costOfGoods=T),i.length>0&&(E.attributes=i.map(k=>({name:k.name,values:k.values,visible:!0,global:!1})));let _=s1(l?.inventoryItem?.measurement?.weight?.value,l?.inventoryItem?.measurement?.weight?.unit);_&&(E.weight=_);let N=[];if(s)for(let k of n){let v=k.price?Number(k.price):NaN,M=k.compareAtPrice?Number(k.compareAtPrice):NaN,O=Number.isFinite(v)&&Number.isFinite(M)&&M>v,S=k.media?.edges?.[0]?.node?.image?.url,I=h(k),R={name:e.title,type:"variation",sku:k.sku||"",parentSku:E.sku,published:!0,description:"",regularPrice:O?String(k.compareAtPrice):k.price||"",salePrice:O&&k.price||void 0,inStock:I.inStock,stock:I.stock,...S?{images:[S]}:{}},U=s1(k.inventoryItem?.measurement?.weight?.value,k.inventoryItem?.measurement?.weight?.unit);U&&(R.weight=U);let J=k.inventoryItem?.unitCost?.amount;J&&Number.isFinite(Number(J))&&(R.costOfGoods=J);let K=[];for(let q of k.selectedOptions||[])K.push({name:q.name,values:[q.value],visible:!0,global:!1});K.length>0&&(R.attributes=K),N.push(R)}return{parent:E,variations:N}}function bNt(e,t){let r=e.match(/]+type=["']application\/ld\+json["'][^>]*>([\s\S]*?)<\/script>/gi)||[];for(let i of r){let s=i.replace(/]*>/i,"").replace(/<\/script>/i,"");try{let o=JSON.parse(s);if(o["@type"]==="Product"&&o.name){let a=Array.isArray(o.offers)?o.offers:o.offers?[o.offers]:[],c=a[0]?.price?String(a[0].price):"",u=[];if(typeof o.image=="string")u.push(o.image);else if(Array.isArray(o.image))for(let l of o.image)typeof l=="string"?u.push(l):l?.url&&u.push(l.url);return{name:o.name,description:o.description||"",regularPrice:c,sku:o.sku||"",images:u,inStock:a[0]?.availability?.includes("InStock")??!0,sourceUrl:t}}}catch{}}let n=e.match(/data-product-json[^>]*>([\s\S]*?)<\/script>/i);if(n?.[1])try{let i=JSON.parse(n[1]);if(i.title)return HD(i,t).parent}catch{}return null}async function fRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=a?Ho.loadOrCreate(a,"shopify",s,{resume:!!s.resume}):void 0,u=new ei,l=!1;a&&!s.dryRun&&u.openStream(a,{resume:!!s.resume});let d=new Set;if(s.adminToken&&!s.dryRun){let g=s.shopDomain||i.shopDomain;if(g){if(!g.endsWith(".myshopify.com"))throw new Error(`shopDomain "${g}" must end in .myshopify.com`)}else{let E=new URL(i.siteUrl.includes("://")?i.siteUrl:`https://${i.siteUrl}`).hostname;if(E.endsWith(".myshopify.com"))g=E;else throw new Error(`Shopify GraphQL requires a *.myshopify.com host, but auto-detection failed and siteUrl "${E}" is a custom domain. Pass --shop-domain explicitly, or re-run discover() to refresh inventory.shopDomain.`)}let m=c?.getCursor("shopify:products:emittedHandles")??[];for(let E of m)d.add(E);let b;try{b=new URL(i.siteUrl.includes("://")?i.siteUrl:`https://${i.siteUrl}`).origin}catch{b=`https://${g}`}try{let E=new $D({shopDomain:g,accessToken:s.adminToken});await dRe(E,{session:c,onBatch:C=>{for(let w of C){if(w.handle&&d.has(w.handle))continue;let T=w.handle?`${b}/products/${w.handle}`:void 0,{parent:_,variations:N}=wG(w,T);u.addProduct(_);for(let k of N)u.addProduct(k);l=!0,w.handle&&d.add(w.handle),c&&c.bumpProgress("product","extracted")}c&&(c.setCursor("shopify:products:emittedHandles",[...d]),c.save())}}),c&&c.setCursor("shopify:products:emittedHandles",null)}catch(E){let C=E instanceof Error?E.message:String(E);n.server?.sendLoggingMessage?.({level:"warning",data:`Shopify GraphQL fetch failed, falling back to JSON API: ${C}`})}}d.size>0&&(i.urls=i.urls.filter(g=>{if(g.type!=="product")return!0;let m=g.url.match(/\/products\/([^/?#]+)/)?.[1];return!m||!d.has(m)}));let f=new Set(i.urls.filter(g=>g.type==="product").map(g=>g.url)),p=null;async function h(){if(!p){let{launchBrowser:g}=await Promise.resolve().then(()=>(zi(),fO)),m=await g(s.cdpPort?{cdpPort:s.cdpPort}:{headed:!0});p={page:m.page,close:()=>m.close()}}return p.page}let A;try{return A=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:u,session:c,onPageExtracted:s.onPageExtracted,extractPage:async g=>{let m="",b="",E="",C="",w=[],T=[],_=[],N=!1,k=!1,v,M,O=f.has(g)||/\/products\//.test(g);try{let K=g.replace(/\/?$/,"")+".json",q=await bG(K);if(q){let W=q.article,ue=q.page,ne=q.product;if(ne?.title){v="product";let{parent:G,variations:se}=HD(ne,g);u.addProduct(G);for(let De of se)u.addProduct(De);l=!0,k=!0,m=ne.title,b=ne.body_html||"",w=ne.tags?ne.tags.split(",").map(De=>De.trim()).filter(Boolean):[],T=ne.product_type?[ne.product_type]:[],_=G.images?[...G.images]:[],_.push(...O0(b))}else W?.body_html?(m=W.title,b=W.body_html,E=W.summary_html||W.body_html.replace(/<[^>]*>/g,"").slice(0,200),C=W.published_at||"",M=W.author||void 0,w=W.tags?W.tags.split(",").map(G=>G.trim()).filter(Boolean):[],W.image?.src&&_.push(W.image.src),_.push(...O0(b)),N=!0):ue?.body_html&&(m=ue.title,b=ue.body_html,C=ue.published_at||"",M=ue.author||void 0,_.push(...O0(b)),N=!0);N&&b.replace(/<[^>]*>/g,"").trim().length<100&&(N=!1)}}catch{}let S=/\/blogs\//.test(g);if(!N||S){let K="",q=!1;try{let W=await fetch(g,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});W.ok?(K=await W.text(),K.includes("Just a moment...")&&K.includes("cf_chl_opt")&&(K="",q=!0)):(await W.body?.cancel(),W.status===403&&(q=!0))}catch{}if(q&&!K)try{let W=await h();await W.goto(g,{waitUntil:"networkidle",timeout:3e4}),K=await W.content()}catch{}if(!N){if(!k){let ne=bNt(K,g);ne&&(v="product",u.addProduct(ne),l=!0)}let W=cRe(K);W.replace(/<[^>]*>/g,"").trim().length>b.replace(/<[^>]*>/g,"").trim().length&&(b=W),m||(m=zh(K)||""),E||(E=Qe(K,"og:description")||Qe(K,"description")||""),C||(C=uRe(K));let ue=O0(K);for(let ne of ue)_.includes(ne)||_.push(ne)}if(K){let W=Qe(K,"og:image");if(W&&W.startsWith("http")&&!_.includes(W))try{Dr.test(new URL(W).pathname)&&_.unshift(W)}catch{}}}m||(m=er(g));let R=m,U=E;_=[...new Set(_)];let J=CG({title:m,content:b,images:_,date:C,hasStructuredData:N,hasPriceSku:v==="product"});return{title:m,slug:er(g),content:b,excerpt:E,date:C,seoTitle:R,seoDescription:U,mediaUrls:_,qualityScore:J,categories:T,tags:w,detectedType:v,author:M}}}),l&&a&&!s.dryRun&&(u.isStreaming?u.closeStream():u.serialize(`${a}/products.csv`)),c&&c.complete(),A}catch(g){if(c)try{c.setStage("error",g instanceof Error?g.message:String(g))}catch{}throw g}finally{p&&await p.close()}}function ENt(e){return/myshopify\.com|shopify\.com/i.test(e)}var pRe={id:"shopify",capture:oRe,detect:ENt,discover:lRe,extract:fRe};ki();async function o1(e){try{let t=e.includes("?")?"&":"?",r=`${e}${t}format=json`,n=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});return n.ok?await n.json():null}catch{return null}}function IG(e,t){let r=new Set;t&&r.add(t);let n=/https?:\/\/images\.squarespace-cdn\.com\/content\/[^\s"'<>)]+/g,i=e.match(n)||[];for(let l of i)r.add(l);let s=/https?:\/\/static1?\.squarespace\.com\/static\/[^\s"'<>)]+/g,o=e.match(s)||[];for(let l of o)r.add(l);let a=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let l of a){let d=l.match(/src=["']([^"']+)["']/i);d?.[1]&&d[1].startsWith("http")&&r.add(d[1])}let c=Dr,u=/squarespace-cdn\.com|squarespace\.com\/static/i;return[...r].filter(l=>{try{let d=new URL(l);return c.test(d.pathname)||u.test(d.hostname+d.pathname)}catch{return!1}})}function hRe(e){return e?new Date(e).toISOString():new Date().toISOString()}async function ARe(e,t){let r=e;await r.goto(t,{waitUntil:"domcontentloaded",timeout:45e3});try{await r.waitForLoadState("networkidle",{timeout:1e4})}catch{}let n=await r.title().catch(()=>""),i=await r.evaluate(()=>{let a=[...(document.querySelector("main")||document.querySelector('[role="main"]')||document.body).querySelectorAll("h1, h2, h3, h4, h5, h6, p, li, img, blockquote, figcaption")],c=[],u=[],l=new Set;for(let d of a.slice(0,250)){if(d.tagName==="IMG"){let h=d.src,A=d.alt||"";h&&h.startsWith("http")&&(u.push(h),l.has(h)||(l.add(h),c.push(`${A}`)));continue}let f=d.innerText?.trim();if(!f||l.has(f)||["Skip to Content","SKIP TO CONTENT"].includes(f))continue;l.add(f);let p=d.tagName.toLowerCase();p.startsWith("h")?c.push(`<${p}>${f}`):p==="li"?c.push(`
  • ${f}
  • `):p==="blockquote"?c.push(`
    ${f}
    `):p==="figcaption"?c.push(`
    ${f}
    `):c.push(`

    ${f}

    `)}return{blocks:c,mediaUrls:u}}),s=i.blocks.join(` +`;async function CRe(e,{pageSize:t=50,filter:r,session:n,cursorKey:i="shopify:products:endCursor",onBatch:s}={}){let o=!s,a=[],c=n?.getCursor(i)??null,u=1e4,l=0;for(;;){if(++l>u)throw new Error(`Shopify GraphQL pagination exceeded ${u} pages \u2014 aborting`);let d=await e.request(LNt,{first:t,after:c,query:r??null}),p=d.products.edges.map(g=>g.node);o&&a.push(...p),s&&p.length>0&&await s(p);let{hasNextPage:h,endCursor:A}=d.products.pageInfo;if(n&&A&&n.setCursor(i,A),!h||!A)break;if(A===c)throw new Error("Shopify GraphQL pagination cursor did not advance \u2014 aborting");c=A}return n&&n.setCursor(i,null),a}Vi();zi();function l1(e,t){if(e==null||e===0)return;let r=(t||"kg").toLowerCase(),n;switch(r){case"kg":n=e;break;case"g":n=e/1e3;break;case"lb":n=e*.453592;break;case"oz":n=e*.0283495;break;default:n=e}return Number(n.toFixed(4)).toString()}function WD(e,t){let r=e.variants||[],n=e.options||[],i=r.length>1||n.length>0&&n[0]?.name!=="Title",s=new Set;e.image?.src&&s.add(e.image.src);for(let E of e.images||[])s.add(E.src);let o=/src="(https?:\/\/[^"']+\.(jpg|jpeg|png|gif|webp)[^"']*)"/gi,a;for(;(a=o.exec(e.body_html||""))!==null;)s.add(a[1]);let c=[...s],u=r[0],l=e.tags?e.tags.split(",").map(E=>E.trim()).filter(Boolean):[],d=e.product_type?[e.product_type]:[],f=u?.price?Number(u.price):NaN,p=u?.compare_at_price?Number(u.compare_at_price):NaN,h=!i&&Number.isFinite(f)&&Number.isFinite(p)&&p>f,A={name:e.title,type:i?"variable":"simple",sku:i?e.handle||e.title.toLowerCase().replace(/[^a-z0-9]+/g,"-"):u?.sku||"",published:!0,description:e.body_html||"",regularPrice:i?"":h?String(u.compare_at_price):u?.price||"",salePrice:h&&u?.price||void 0,categories:d,tags:l,images:c,inStock:u?.available!==!1,stock:u?.inventory_quantity!=null?u.inventory_quantity:void 0,sourceUrl:t};n.length>0&&(A.attributes=n.map(E=>({name:E.name,values:E.values,visible:!0,global:!1})));let g=l1(u?.weight,u?.weight_unit);g&&(A.weight=g);let m=new Map,b=new Map;for(let E of e.images||[]){E.id&&m.set(E.id,E.src);for(let w of E.variant_ids||[])b.set(w,E.src)}let C=[];if(i)for(let E of r){let w=E.compare_at_price!=null&&E.compare_at_price!=="",T;E.featured_image?.src?T=E.featured_image.src:E.image_id&&m.has(E.image_id)?T=m.get(E.image_id):E.id&&b.has(E.id)&&(T=b.get(E.id));let _={name:e.title,type:"variation",sku:E.sku||"",parentSku:A.sku,published:!0,description:"",regularPrice:w?String(E.compare_at_price):E.price||"",salePrice:w&&E.price||void 0,inStock:E.available!==!1,stock:E.inventory_quantity!=null?E.inventory_quantity:void 0,...T?{images:[T]}:{}},D=l1(E.weight,E.weight_unit);D&&(_.weight=D);let k=[];E.option1!=null&&n[0]&&k.push({name:n[0].name,values:[E.option1],visible:!0,global:!1}),E.option2!=null&&n[1]&&k.push({name:n[1].name,values:[E.option2],visible:!0,global:!1}),E.option3!=null&&n[2]&&k.push({name:n[2].name,values:[E.option3],visible:!0,global:!1}),k.length>0&&(_.attributes=k),C.push(_)}return{parent:A,variations:C}}function RG(e,t){let n=(e.variants?.edges||[]).map(k=>k.node),i=e.options||[],s=n.length>1||i.length>0&&i[0]?.name!=="Title",o=new Set;e.featuredMedia?.image?.url&&o.add(e.featuredMedia.image.url);for(let k of e.media?.edges||[])k.node.image?.url&&o.add(k.node.image.url);let a=/src="(https?:\/\/[^"']+\.(jpg|jpeg|png|gif|webp)[^"']*)"/gi,c;for(;(c=a.exec(e.descriptionHtml||""))!==null;)o.add(c[1]);let u=[...o],l=n[0],d=e.tags||[],f=new Set;for(let k of e.collections?.edges||[])k.node.title&&f.add(k.node.title);f.size===0&&e.productType&&f.add(e.productType);let p=[...f],h=k=>{let v=k.inventoryItem?.tracked,M=k.inventoryPolicy,F=k.inventoryQuantity;return v?F==null?{inStock:!0,stock:void 0}:F>0?{inStock:!0,stock:F}:{inStock:M==="CONTINUE",stock:F}:{inStock:!0}},A=l?h(l):{inStock:!0},g=l?.price?Number(l.price):NaN,m=l?.compareAtPrice?Number(l.compareAtPrice):NaN,b=!s&&Number.isFinite(g)&&Number.isFinite(m)&&m>g,C={name:e.title,type:s?"variable":"simple",sku:s?e.handle||e.title.toLowerCase().replace(/[^a-z0-9]+/g,"-"):l?.sku||"",published:e.status==="ACTIVE",description:e.descriptionHtml||"",regularPrice:s?"":b?String(l.compareAtPrice):l?.price||"",salePrice:b&&l?.price||void 0,categories:p,tags:d,images:u,inStock:A.inStock,stock:A.stock,sourceUrl:t},E=e.seo?.title||e.metafields?.edges?.find(k=>k.node.key==="title_tag")?.node.value||"",w=e.seo?.description||e.metafields?.edges?.find(k=>k.node.key==="description_tag")?.node.value||"";E&&(C.seoTitle=E),w&&(C.seoDescription=w);let T=l?.inventoryItem?.unitCost?.amount;T&&Number.isFinite(Number(T))&&(C.costOfGoods=T),i.length>0&&(C.attributes=i.map(k=>({name:k.name,values:k.values,visible:!0,global:!1})));let _=l1(l?.inventoryItem?.measurement?.weight?.value,l?.inventoryItem?.measurement?.weight?.unit);_&&(C.weight=_);let D=[];if(s)for(let k of n){let v=k.price?Number(k.price):NaN,M=k.compareAtPrice?Number(k.compareAtPrice):NaN,F=Number.isFinite(v)&&Number.isFinite(M)&&M>v,S=k.media?.edges?.[0]?.node?.image?.url,I=h(k),R={name:e.title,type:"variation",sku:k.sku||"",parentSku:C.sku,published:!0,description:"",regularPrice:F?String(k.compareAtPrice):k.price||"",salePrice:F&&k.price||void 0,inStock:I.inStock,stock:I.stock,...S?{images:[S]}:{}},U=l1(k.inventoryItem?.measurement?.weight?.value,k.inventoryItem?.measurement?.weight?.unit);U&&(R.weight=U);let J=k.inventoryItem?.unitCost?.amount;J&&Number.isFinite(Number(J))&&(R.costOfGoods=J);let oe=[];for(let j of k.selectedOptions||[])oe.push({name:j.name,values:[j.value],visible:!0,global:!1});oe.length>0&&(R.attributes=oe),D.push(R)}return{parent:C,variations:D}}function FNt(e,t){let r=e.match(/]+type=["']application\/ld\+json["'][^>]*>([\s\S]*?)<\/script>/gi)||[];for(let i of r){let s=i.replace(/]*>/i,"").replace(/<\/script>/i,"");try{let o=JSON.parse(s);if(o["@type"]==="Product"&&o.name){let a=Array.isArray(o.offers)?o.offers:o.offers?[o.offers]:[],c=a[0]?.price?String(a[0].price):"",u=[];if(typeof o.image=="string")u.push(o.image);else if(Array.isArray(o.image))for(let l of o.image)typeof l=="string"?u.push(l):l?.url&&u.push(l.url);return{name:o.name,description:o.description||"",regularPrice:c,sku:o.sku||"",images:u,inStock:a[0]?.availability?.includes("InStock")??!0,sourceUrl:t}}}catch{}}let n=e.match(/data-product-json[^>]*>([\s\S]*?)<\/script>/i);if(n?.[1])try{let i=JSON.parse(n[1]);if(i.title)return WD(i,t).parent}catch{}return null}async function wRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=a?jo.loadOrCreate(a,"shopify",s,{resume:!!s.resume}):void 0,u=new ri,l=!1;a&&!s.dryRun&&u.openStream(a,{resume:!!s.resume});let d=new Set;if(s.adminToken&&!s.dryRun){let A=s.shopDomain||i.shopDomain;if(A){if(!A.endsWith(".myshopify.com"))throw new Error(`shopDomain "${A}" must end in .myshopify.com`)}else{let b=new URL(i.siteUrl.includes("://")?i.siteUrl:`https://${i.siteUrl}`).hostname;if(b.endsWith(".myshopify.com"))A=b;else throw new Error(`Shopify GraphQL requires a *.myshopify.com host, but auto-detection failed and siteUrl "${b}" is a custom domain. Pass --shop-domain explicitly, or re-run discover() to refresh inventory.shopDomain.`)}let g=c?.getCursor("shopify:products:emittedHandles")??[];for(let b of g)d.add(b);let m;try{m=new URL(i.siteUrl.includes("://")?i.siteUrl:`https://${i.siteUrl}`).origin}catch{m=`https://${A}`}try{let b=new GD({shopDomain:A,accessToken:s.adminToken});await CRe(b,{session:c,onBatch:C=>{for(let E of C){if(E.handle&&d.has(E.handle))continue;let w=E.handle?`${m}/products/${E.handle}`:void 0,{parent:T,variations:_}=RG(E,w);u.addProduct(T);for(let D of _)u.addProduct(D);l=!0,E.handle&&d.add(E.handle),c&&c.bumpProgress("product","extracted")}c&&(c.setCursor("shopify:products:emittedHandles",[...d]),c.save())}}),c&&c.setCursor("shopify:products:emittedHandles",null)}catch(b){let C=b instanceof Error?b.message:String(b);n.server?.sendLoggingMessage?.({level:"warning",data:`Shopify GraphQL fetch failed, falling back to JSON API: ${C}`})}}d.size>0&&(i.urls=i.urls.filter(A=>{if(A.type!=="product")return!0;let g=A.url.match(/\/products\/([^/?#]+)/)?.[1];return!g||!d.has(g)}));let f=new Set(i.urls.filter(A=>A.type==="product").map(A=>A.url)),p=Zl(s.cdpPort?{cdpPort:s.cdpPort}:{headed:!0}),h;try{return h=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:u,session:c,onPageExtracted:s.onPageExtracted,maxPageConcurrency:1,onExtractTimeout:()=>p.reset(),extractPage:async A=>{let g=p.openLease(),m=[],b="",C="",E="",w="",T=[],_=[],D=[],k=!1,v=!1,M,F,S=f.has(A)||/\/products\//.test(A);try{let j=A.replace(/\/?$/,"")+".json",ee=await kG(j);if(ee){let K=ee.article,ue=ee.page,G=ee.product;if(G?.title){M="product";let{parent:fe,variations:Ze}=WD(G,A);m.push(fe,...Ze),v=!0,b=G.title,C=G.body_html||"",T=G.tags?G.tags.split(",").map(Z=>Z.trim()).filter(Boolean):[],_=G.product_type?[G.product_type]:[],D=fe.images?[...fe.images]:[],D.push(...j0(C))}else K?.body_html?(b=K.title,C=K.body_html,E=K.summary_html||K.body_html.replace(/<[^>]*>/g,"").slice(0,200),w=K.published_at||"",F=K.author||void 0,T=K.tags?K.tags.split(",").map(fe=>fe.trim()).filter(Boolean):[],K.image?.src&&D.push(K.image.src),D.push(...j0(C)),k=!0):ue?.body_html&&(b=ue.title,C=ue.body_html,w=ue.published_at||"",F=ue.author||void 0,D.push(...j0(C)),k=!0);k&&C.replace(/<[^>]*>/g,"").trim().length<100&&(k=!1)}}catch{}let I=/\/blogs\//.test(A);if(!k||I){let j="",ee=!1;try{let K=await fetch(A,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});K.ok?(j=await K.text(),j.includes("Just a moment...")&&j.includes("cf_chl_opt")&&(j="",ee=!0)):(await K.body?.cancel(),K.status===403&&(ee=!0))}catch{}if(ee&&!j)try{let K=(await g.acquire()).page;await K.goto(A,{waitUntil:"networkidle",timeout:3e4}),j=await K.content()}catch{}if(!k){if(!v){let G=FNt(j,A);G&&(M="product",m.push(G))}let K=yRe(j);K.replace(/<[^>]*>/g,"").trim().length>C.replace(/<[^>]*>/g,"").trim().length&&(C=K),b||(b=Jh(j)||""),E||(E=Re(j,"og:description")||Re(j,"description")||""),w||(w=bRe(j));let ue=j0(j);for(let G of ue)D.includes(G)||D.push(G)}if(j){let K=Re(j,"og:image");if(K&&K.startsWith("http")&&!D.includes(K))try{Mr.test(new URL(K).pathname)&&D.unshift(K)}catch{}}}b||(b=Xt(A));let U=b,J=E;D=[...new Set(D)];let oe=TG({title:b,content:C,images:D,date:w,hasStructuredData:k,hasPriceSku:M==="product"});if(!g.isValid())throw new Error(`extraction abandoned by watchdog: ${A}`);if(m.length>0){for(let j of m)u.addProduct(j);l=!0}return{title:b,slug:Xt(A),content:C,excerpt:E,date:w,seoTitle:U,seoDescription:J,mediaUrls:D,qualityScore:oe,categories:_,tags:T,detectedType:M,author:F}}}),l&&a&&!s.dryRun&&(u.isStreaming?u.closeStream():u.serialize(`${a}/products.csv`)),c&&c.complete(),h}catch(A){if(c)try{c.setStage("error",A instanceof Error?A.message:String(A))}catch{}throw A}finally{await p.end()}}function ONt(e){return/myshopify\.com|shopify\.com/i.test(e)}var IRe={id:"shopify",capture:gRe,detect:ONt,discover:ERe,extract:wRe};_i();async function d1(e){try{let t=e.includes("?")?"&":"?",r=`${e}${t}format=json`,n=await fetch(r,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});return n.ok?await n.json():null}catch{return null}}function QG(e,t){let r=new Set;t&&r.add(t);let n=/https?:\/\/images\.squarespace-cdn\.com\/content\/[^\s"'<>)]+/g,i=e.match(n)||[];for(let l of i)r.add(l);let s=/https?:\/\/static1?\.squarespace\.com\/static\/[^\s"'<>)]+/g,o=e.match(s)||[];for(let l of o)r.add(l);let a=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let l of a){let d=l.match(/src=["']([^"']+)["']/i);d?.[1]&&d[1].startsWith("http")&&r.add(d[1])}let c=Mr,u=/squarespace-cdn\.com|squarespace\.com\/static/i;return[...r].filter(l=>{try{let d=new URL(l);return c.test(d.pathname)||u.test(d.hostname+d.pathname)}catch{return!1}})}function SRe(e){return e?new Date(e).toISOString():new Date().toISOString()}async function vRe(e,t){let r=e;await r.goto(t,{waitUntil:"domcontentloaded",timeout:45e3});try{await r.waitForLoadState("networkidle",{timeout:1e4})}catch{}let n=await r.title().catch(()=>""),i=await r.evaluate(()=>{let a=[...(document.querySelector("main")||document.querySelector('[role="main"]')||document.body).querySelectorAll("h1, h2, h3, h4, h5, h6, p, li, img, blockquote, figcaption")],c=[],u=[],l=new Set;for(let d of a.slice(0,250)){if(d.tagName==="IMG"){let h=d.src,A=d.alt||"";h&&h.startsWith("http")&&(u.push(h),l.has(h)||(l.add(h),c.push(`${A}`)));continue}let f=d.innerText?.trim();if(!f||l.has(f)||["Skip to Content","SKIP TO CONTENT"].includes(f))continue;l.add(f);let p=d.tagName.toLowerCase();p.startsWith("h")?c.push(`<${p}>${f}`):p==="li"?c.push(`
  • ${f}
  • `):p==="blockquote"?c.push(`
    ${f}
    `):p==="figcaption"?c.push(`
    ${f}
    `):c.push(`

    ${f}

    `)}return{blocks:c,mediaUrls:u}}),s=i.blocks.join(` `);if(!s)try{let o=await r.context().newCDPSession(e),a=await o.send("Accessibility.getFullAXTree",{depth:10}),c=[];for(let u of a.nodes||[]){let l=u.role?.value||"",d=u.name?.value||"";d&&(l==="heading"?c.push(`

    ${d}

    `):["paragraph","StaticText"].includes(l)&&c.push(`

    ${d}

    `))}s=c.join(` -`),await o.detach()}catch{}return{content:s,mediaUrls:i.mediaUrls,title:n}}zi();var gRe={1:"index",2:"gallery",5:"album",6:"blog",7:"events",8:"product",10:"page",11:"portfolio"};function CNt(e,t){if(typeof e=="number"&&gRe[e])return gRe[e];if(typeof e=="string"){let n=e.toLowerCase();return n.startsWith("blog")?"post":n.startsWith("gallery")||n.startsWith("portfolio")?"gallery":n.startsWith("events")?"event":n.startsWith("products")?"product":n.startsWith("index")||n.startsWith("folder")?"page":n}let r=t.toLowerCase();return r.includes("/blog")||r.includes("/post")?"post":r.includes("/gallery")||r.includes("/portfolio")?"gallery":r.includes("/store")||r.includes("/product")?"product":r.includes("/event")?"event":r==="/"?"homepage":"page"}function wNt(e){if(e.assetUrl||e.scriptUrl||e.mimeType||e.contentType)return!1;let t=!!(e.fullUrl||e.publicUrl||e.pageUrl||e.path||e.url||e.href||e.slug),r=!!(e.title||e.navigationTitle||e.name),n=!!(e.id||e.pageId||e.collectionId);return t&&(r||n)}function mRe(e,t,r){let n=new Map,i=new WeakSet;function s(a){if(!a||typeof a!="string")return null;let c=a.trim();if(!c||c.includes("/config/pages"))return null;try{let u=new URL(c,t);return u.host!==r||/^\/(api|scripts|assets|styles|fonts|static)\//.test(u.pathname)||/\.(jpg|jpeg|png|gif|webp|svg|avif|ico|js|css|map|json|txt|xml|pdf|woff2?|ttf|eot)$/i.test(u.pathname)?null:(u.hash="",u.toString())}catch{return null}}function o(a){if(!a||typeof a!="object"||i.has(a))return;if(i.add(a),Array.isArray(a)){for(let u of a)o(u);return}let c=a;if(wNt(c)){let u=s(c.fullUrl||c.publicUrl||c.pageUrl||c.path||c.url||c.href||c.slug);if(u){let l=c.navigationTitle||c.title||c.name||new URL(u).pathname,d=c.pageId||c.collectionId||c.id,f=c.published===!1?"draft":c.showInNavigation===!1||c.navigationHidden||c.unlinked?"unlinked":c.passwordProtected?"password-protected":"published";n.set(u,{url:u,title:l,type:CNt(c.typeName||c.pageType||c.type||c.collectionType,new URL(u).pathname),visibility:f,adminPageId:d?String(d):null})}}for(let u of Object.values(c))o(u)}return o(e),[...n.values()]}async function yRe(e,t){let r=new URL(e).origin,n=new URL(e).host,s=await(await As()).chromium.connectOverCDP(`http://127.0.0.1:${t}`);try{let o=s.contexts()[0]||await s.newContext(),c=o.pages().find(h=>h.url().includes("/config"));c||(c=await o.newPage());let u=[],l=async h=>{let A=h,g=A.url();if(!(!(A.headers()["content-type"]||"").includes("application/json")||!(g.includes("/api/")||g.includes("/api/content/")||g.includes("/api/commondata/"))))try{u.push({url:g,data:await A.json()})}catch{}};c.on("response",l);try{await c.goto(`${r}/config/pages`,{waitUntil:"domcontentloaded",timeout:45e3}),await new Promise(h=>setTimeout(h,3e3)),await c.waitForLoadState("networkidle",{timeout:1e4}).catch(()=>{}),await new Promise(h=>setTimeout(h,1e3))}catch{}c.off("response",l);let d=null;try{d=await c.evaluate(()=>window.__NEXT_DATA__||null)}catch{}let f=[...mRe(u.map(h=>h.data),r,n),...mRe(d,r,n)],p=new Map;for(let h of f)p.set(h.url,h);return[...p.values()]}finally{await s.close()}}function bRe(e,t){if(t.length===0)return e;let r=new Map;for(let a of e.urls)r.set(a.url,{...a});for(let a of t){let c=r.get(a.url);c?(a.type&&a.type!=="page"&&(c.type=a.type),c.visibility=a.visibility):r.set(a.url,{url:a.url,type:a.type||"page",visibility:a.visibility})}let n=new Set(e.navigation.map(a=>a.href)),i=[...e.navigation];for(let a of t)a.visibility!=="published"||n.has(a.url)||(i.push({text:a.title,href:a.url}),n.add(a.url));let s={},o=[];for(let a of r.values())o.push(a),s[a.type]=(s[a.type]||0)+1;return{...e,navigation:i,counts:s,urls:o}}async function ERe(e,t){let r=t,n=await o1(e),i=n?.website?.siteTitle||n?.websiteSettings?.siteTitle||"Imported Site",s=n?.website?.siteTagLine||n?.websiteSettings?.siteTagLine||n?.website?.siteDescription||"",o=n?.website?.language||"en-US",a=await ii(e),c=[],u={},l=[];for(let f of a){let p=cr(f);l.push({url:f,type:p}),u[p]=(u[p]||0)+1}if(l.length===0&&n?.items){let f=new URL(e).origin;for(let p of n.items)if(p.fullUrl){let h=p.fullUrl.startsWith("http")?p.fullUrl:`${f}${p.fullUrl}`,A=cr(h);l.push({url:h,type:A}),u[A]=(u[A]||0)+1}}l.length===0&&(l.push({url:e,type:"homepage"}),u.homepage=1);let d={siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:i,tagline:s,language:o},navigation:c,counts:u,urls:l};if(r.cdpPort)try{let f=await yRe(e,r.cdpPort);f.length>0&&(d=bRe(d,f))}catch(f){let p=f instanceof Error?f.message:String(f);d.adminWarning=`Squarespace admin discovery failed: ${p}. Drafts, unlisted pages, and password-protected content may be missing. Make sure you are logged in to Squarespace admin in the Chrome window connected via CDP.`}return d}ki();qi();zi();async function INt(e){let r=(await o1(e))?.item;if(!r)return null;let n=r.structuredContent;if(!n)return null;let i=n.priceMoney,s=n.salePriceMoney,o=n.onSale,a=n.variants||[],c=[],u=r.items;if(u)for(let A of u)A.assetUrl&&c.push(A.assetUrl);r.assetUrl&&!c.includes(r.assetUrl)&&c.unshift(r.assetUrl);let l=a.length>1,d=i?.value||"",f=o&&s?.value&&s.value!=="0.00"?s.value:void 0,p={name:r.title||"",type:l?"variable":"simple",sku:l?"":a[0]?.sku||"",published:!0,description:r.body||"",regularPrice:l?"":d,salePrice:l?void 0:f,images:c,categories:r.categories||[],tags:r.tags||[],sourceUrl:e},h=n.variantOptionOrdering||[];if(h.length>0&&l){let A=new Map;for(let g of h)A.set(g,new Set);for(let g of a)for(let m of g.optionValues||[])m.optionName&&m.value&&A.get(m.optionName)?.add(m.value);p.attributes=h.map(g=>({name:g,values:[...A.get(g)||[]],visible:!0,global:!1}))}return p}async function CRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=null;async function c(){if(!a){let d=await Ic({cdpPort:s.cdpPort});a={page:d.page,close:()=>d.close()}}return a.page}let u=s.outputDir||"",l=new ei;u&&!s.dryRun&&l.openStream(u);try{let d=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:u,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:l,onPageExtracted:s.onPageExtracted,extractPage:async p=>{let h=await o1(p),A=h?.item,g=h?.collection,m=A?.body||g?.mainContent||"",b=A?.title||g?.title||er(p),E=A?.excerpt||g?.description||"",C=hRe(A?.publishOn||A?.addedOn),w=A?.seoData?.seoTitle||b,T=A?.seoData?.seoDescription||E,_=A?.categories||[],N=A?.tags||[],k=IG(m,A?.assetUrl),v=m.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();if(!m||m.includes("columns-12 empty")||v.length<50)try{let R=await c(),U=await ARe(R,p);U.content&&(m=U.content,k=[...k,...IG(U.content),...U.mediaUrls],k=[...new Set(k)]),U.title&&b===er(p)&&(b=U.title)}catch{}let O=m.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),S="low";O.length>200?S="high":O.length>50&&(S="medium");let I=A?.author?.displayName||void 0;return{title:b,slug:er(p),content:m,excerpt:E,date:C,seoTitle:w,seoDescription:T,mediaUrls:k,qualityScore:S,categories:_,tags:N,author:I}},extractProduct:(p,h)=>null}),f=i.urls.filter(p=>cr(p.url)==="product");for(let p of f){if(s.dryRun)break;try{let h=await INt(p.url);h&&h.name&&(l.addProduct(h),d.productsExtracted++)}catch{}}return d.productsExtracted>0&&u&&!s.dryRun&&(l.isStreaming?l.closeStream():l.serialize(`${u}/products.csv`)),d}finally{a&&await a.close()}}St();pi();th();var SNt=/\bsqs-block\b/;function vNt(e,t){if(!e||!SNt.test(e))return null;let r=de(e,null,!1),n=[];return r(".sqs-block").each((i,s)=>{let o=r(s);if(o.parents(".sqs-block").length>0)return;let a=xNt(r,o);a&&n.push(a)}),n.length===0?null:n.join(` +`),await o.detach()}catch{}return{content:s,mediaUrls:i.mediaUrls,title:n}}Vi();var xRe={1:"index",2:"gallery",5:"album",6:"blog",7:"events",8:"product",10:"page",11:"portfolio"};function UNt(e,t){if(typeof e=="number"&&xRe[e])return xRe[e];if(typeof e=="string"){let n=e.toLowerCase();return n.startsWith("blog")?"post":n.startsWith("gallery")||n.startsWith("portfolio")?"gallery":n.startsWith("events")?"event":n.startsWith("products")?"product":n.startsWith("index")||n.startsWith("folder")?"page":n}let r=t.toLowerCase();return r.includes("/blog")||r.includes("/post")?"post":r.includes("/gallery")||r.includes("/portfolio")?"gallery":r.includes("/store")||r.includes("/product")?"product":r.includes("/event")?"event":r==="/"?"homepage":"page"}function $Nt(e){if(e.assetUrl||e.scriptUrl||e.mimeType||e.contentType)return!1;let t=!!(e.fullUrl||e.publicUrl||e.pageUrl||e.path||e.url||e.href||e.slug),r=!!(e.title||e.navigationTitle||e.name),n=!!(e.id||e.pageId||e.collectionId);return t&&(r||n)}function BRe(e,t,r){let n=new Map,i=new WeakSet;function s(a){if(!a||typeof a!="string")return null;let c=a.trim();if(!c||c.includes("/config/pages"))return null;try{let u=new URL(c,t);return u.host!==r||/^\/(api|scripts|assets|styles|fonts|static)\//.test(u.pathname)||/\.(jpg|jpeg|png|gif|webp|svg|avif|ico|js|css|map|json|txt|xml|pdf|woff2?|ttf|eot)$/i.test(u.pathname)?null:(u.hash="",u.toString())}catch{return null}}function o(a){if(!a||typeof a!="object"||i.has(a))return;if(i.add(a),Array.isArray(a)){for(let u of a)o(u);return}let c=a;if($Nt(c)){let u=s(c.fullUrl||c.publicUrl||c.pageUrl||c.path||c.url||c.href||c.slug);if(u){let l=c.navigationTitle||c.title||c.name||new URL(u).pathname,d=c.pageId||c.collectionId||c.id,f=c.published===!1?"draft":c.showInNavigation===!1||c.navigationHidden||c.unlinked?"unlinked":c.passwordProtected?"password-protected":"published";n.set(u,{url:u,title:l,type:UNt(c.typeName||c.pageType||c.type||c.collectionType,new URL(u).pathname),visibility:f,adminPageId:d?String(d):null})}}for(let u of Object.values(c))o(u)}return o(e),[...n.values()]}async function kRe(e,t){let r=new URL(e).origin,n=new URL(e).host,s=await(await qs()).chromium.connectOverCDP(`http://127.0.0.1:${t}`);try{let o=s.contexts()[0]||await s.newContext(),c=o.pages().find(h=>h.url().includes("/config"));c||(c=await o.newPage());let u=[],l=async h=>{let A=h,g=A.url();if(!(!(A.headers()["content-type"]||"").includes("application/json")||!(g.includes("/api/")||g.includes("/api/content/")||g.includes("/api/commondata/"))))try{u.push({url:g,data:await A.json()})}catch{}};c.on("response",l);try{await c.goto(`${r}/config/pages`,{waitUntil:"domcontentloaded",timeout:45e3}),await new Promise(h=>setTimeout(h,3e3)),await c.waitForLoadState("networkidle",{timeout:1e4}).catch(()=>{}),await new Promise(h=>setTimeout(h,1e3))}catch{}c.off("response",l);let d=null;try{d=await c.evaluate(()=>window.__NEXT_DATA__||null)}catch{}let f=[...BRe(u.map(h=>h.data),r,n),...BRe(d,r,n)],p=new Map;for(let h of f)p.set(h.url,h);return[...p.values()]}finally{await s.close()}}function _Re(e,t){if(t.length===0)return e;let r=new Map;for(let a of e.urls)r.set(a.url,{...a});for(let a of t){let c=r.get(a.url);c?(a.type&&a.type!=="page"&&(c.type=a.type),c.visibility=a.visibility):r.set(a.url,{url:a.url,type:a.type||"page",visibility:a.visibility})}let n=new Set(e.navigation.map(a=>a.href)),i=[...e.navigation];for(let a of t)a.visibility!=="published"||n.has(a.url)||(i.push({text:a.title,href:a.url}),n.add(a.url));let s={},o=[];for(let a of r.values())o.push(a),s[a.type]=(s[a.type]||0)+1;return{...e,navigation:i,counts:s,urls:o}}async function TRe(e,t){let r=t,n=await d1(e),i=n?.website?.siteTitle||n?.websiteSettings?.siteTitle||"Imported Site",s=n?.website?.siteTagLine||n?.websiteSettings?.siteTagLine||n?.website?.siteDescription||"",o=n?.website?.language||"en-US",a=await si(e),c=[],u={},l=[];for(let f of a){let p=lr(f);l.push({url:f,type:p}),u[p]=(u[p]||0)+1}if(l.length===0&&n?.items){let f=new URL(e).origin;for(let p of n.items)if(p.fullUrl){let h=p.fullUrl.startsWith("http")?p.fullUrl:`${f}${p.fullUrl}`,A=lr(h);l.push({url:h,type:A}),u[A]=(u[A]||0)+1}}l.length===0&&(l.push({url:e,type:"homepage"}),u.homepage=1);let d={siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:i,tagline:s,language:o},navigation:c,counts:u,urls:l};if(r.cdpPort)try{let f=await kRe(e,r.cdpPort);f.length>0&&(d=_Re(d,f))}catch(f){let p=f instanceof Error?f.message:String(f);d.adminWarning=`Squarespace admin discovery failed: ${p}. Drafts, unlisted pages, and password-protected content may be missing. Make sure you are logged in to Squarespace admin in the Chrome window connected via CDP.`}return d}_i();zi();Vi();async function HNt(e){let r=(await d1(e))?.item;if(!r)return null;let n=r.structuredContent;if(!n)return null;let i=n.priceMoney,s=n.salePriceMoney,o=n.onSale,a=n.variants||[],c=[],u=r.items;if(u)for(let A of u)A.assetUrl&&c.push(A.assetUrl);r.assetUrl&&!c.includes(r.assetUrl)&&c.unshift(r.assetUrl);let l=a.length>1,d=i?.value||"",f=o&&s?.value&&s.value!=="0.00"?s.value:void 0,p={name:r.title||"",type:l?"variable":"simple",sku:l?"":a[0]?.sku||"",published:!0,description:r.body||"",regularPrice:l?"":d,salePrice:l?void 0:f,images:c,categories:r.categories||[],tags:r.tags||[],sourceUrl:e},h=n.variantOptionOrdering||[];if(h.length>0&&l){let A=new Map;for(let g of h)A.set(g,new Set);for(let g of a)for(let m of g.optionValues||[])m.optionName&&m.value&&A.get(m.optionName)?.add(m.value);p.attributes=h.map(g=>({name:g,values:[...A.get(g)||[]],visible:!0,global:!1}))}return p}async function RRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=Zl({cdpPort:s.cdpPort}),c=s.outputDir||"",u=new ri;c&&!s.dryRun&&u.openStream(c);try{let l=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:c,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:u,onPageExtracted:s.onPageExtracted,maxPageConcurrency:1,onExtractTimeout:()=>a.reset(),extractPage:async f=>{let p=a.openLease(),h=await d1(f),A=h?.item,g=h?.collection,m=A?.body||g?.mainContent||"",b=A?.title||g?.title||Xt(f),C=A?.excerpt||g?.description||"",E=SRe(A?.publishOn||A?.addedOn),w=A?.seoData?.seoTitle||b,T=A?.seoData?.seoDescription||C,_=A?.categories||[],D=A?.tags||[],k=QG(m,A?.assetUrl),v=m.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();if(!m||m.includes("columns-12 empty")||v.length<50)try{let{page:R}=await p.acquire(),U=await vRe(R,f);U.content&&(m=U.content,k=[...k,...QG(U.content),...U.mediaUrls],k=[...new Set(k)]),U.title&&b===Xt(f)&&(b=U.title)}catch{}let F=m.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),S="low";F.length>200?S="high":F.length>50&&(S="medium");let I=A?.author?.displayName||void 0;return{title:b,slug:Xt(f),content:m,excerpt:C,date:E,seoTitle:w,seoDescription:T,mediaUrls:k,qualityScore:S,categories:_,tags:D,author:I}},extractProduct:(f,p)=>null}),d=i.urls.filter(f=>lr(f.url)==="product");for(let f of d){if(s.dryRun)break;try{let p=await HNt(f.url);p&&p.name&&(u.addProduct(p),l.productsExtracted++)}catch{}}return l.productsExtracted>0&&c&&!s.dryRun&&(u.isStreaming?u.closeStream():u.serialize(`${c}/products.csv`)),l}finally{await a.end()}}Bt();hi();oh();var jNt=/\bsqs-block\b/;function qNt(e,t){if(!e||!jNt.test(e))return null;let r=de(e,null,!1),n=[];return r(".sqs-block").each((i,s)=>{let o=r(s);if(o.parents(".sqs-block").length>0)return;let a=zNt(r,o);a&&n.push(a)}),n.length===0?null:n.join(` -`)}function xNt(e,t){let r=t.attr("class")||"";return/\bimage-block\b/.test(r)?kNt(e,t):/\bgallery-block\b/.test(r)?_Nt(e,t):/\b(?:embed-block|video-block)\b/.test(r)?TNt(e,t):/\bquote-block\b/.test(r)?RNt(e,t):/\b(?:horizontal-rule-block|line-block)\b/.test(r)?` +`)}function zNt(e,t){let r=t.attr("class")||"";return/\bimage-block\b/.test(r)?GNt(e,t):/\bgallery-block\b/.test(r)?WNt(e,t):/\b(?:embed-block|video-block)\b/.test(r)?YNt(e,t):/\bquote-block\b/.test(r)?JNt(e,t):/\b(?:horizontal-rule-block|line-block)\b/.test(r)?`
    -`:/\bspacer-block\b/.test(r)?null:/\bhtml-block\b/.test(r)?QNt(e,t):DNt(e,t)}function BNt(e){let t=e.find("img").first();if(t.length===0)return null;let r=t.attr("data-image")||t.attr("data-src")||"",n=/^https?:\/\//.test(r)?r:t.attr("src")||"";if(!n)return null;let i=(t.attr("alt")||"").trim(),s=e.find("figcaption, .image-caption-wrapper").first(),o=s.length?s.text().trim():"";return{src:n,alt:i,caption:o}}function kNt(e,t){let r=BNt(t);return r?` -${r.caption?`
    ${Vh(r.alt)}
    ${rs(r.caption)}
    `:`
    ${Vh(r.alt)}
    `} -`:null}function _Nt(e,t){let r=[];if(t.find("img").each((i,s)=>{let o=e(s),a=o.attr("data-image")||o.attr("data-src")||"",c=/^https?:\/\//.test(a)?a:o.attr("src")||"";c&&r.push({src:c,alt:(o.attr("alt")||"").trim()})}),r.length===0)return null;let n=[];for(let i of r)n.push(` -
    ${Vh(i.alt)}
    +`:/\bspacer-block\b/.test(r)?null:/\bhtml-block\b/.test(r)?ZNt(e,t):KNt(e,t)}function VNt(e){let t=e.find("img").first();if(t.length===0)return null;let r=t.attr("data-image")||t.attr("data-src")||"",n=/^https?:\/\//.test(r)?r:t.attr("src")||"";if(!n)return null;let i=(t.attr("alt")||"").trim(),s=e.find("figcaption, .image-caption-wrapper").first(),o=s.length?s.text().trim():"";return{src:n,alt:i,caption:o}}function GNt(e,t){let r=VNt(t);return r?` +${r.caption?`
    ${Zh(r.alt)}
    ${ns(r.caption)}
    `:`
    ${Zh(r.alt)}
    `} +`:null}function WNt(e,t){let r=[];if(t.find("img").each((i,s)=>{let o=e(s),a=o.attr("data-image")||o.attr("data-src")||"",c=/^https?:\/\//.test(a)?a:o.attr("src")||"";c&&r.push({src:c,alt:(o.attr("alt")||"").trim()})}),r.length===0)return null;let n=[];for(let i of r)n.push(` +
    ${Zh(i.alt)}
    `);return` -`}function TNt(e,t){let n=t.find("iframe").first().attr("src")||t.find("a[href]").first().attr("href")||"";return/^https?:\/\//.test(n)?aQ(n):null}function RNt(e,t){let r=t.find("blockquote, .quote-content, p").first().text().trim();if(!r)return null;let n=t.find("cite, .source").first().text().trim();return` -${n?`

    ${rs(r)}

    ${rs(n)}
    `:`

    ${rs(r)}

    `} -`}function QNt(e,t){let r=t.find(".html-block-html").first().length?t.find(".html-block-html").first():t,n=[];if(r.children().each((i,s)=>{let o=(s.tagName||"").toLowerCase(),a=e(s);if(/^h[1-6]$/.test(o)){let c=parseInt(o.slice(1),10),u=a.html()||"";n.push(` +`}function YNt(e,t){let n=t.find("iframe").first().attr("src")||t.find("a[href]").first().attr("href")||"";return/^https?:\/\//.test(n)?pQ(n):null}function JNt(e,t){let r=t.find("blockquote, .quote-content, p").first().text().trim();if(!r)return null;let n=t.find("cite, .source").first().text().trim();return` +${n?`

    ${ns(r)}

    ${ns(n)}
    `:`

    ${ns(r)}

    `} +`}function ZNt(e,t){let r=t.find(".html-block-html").first().length?t.find(".html-block-html").first():t,n=[];if(r.children().each((i,s)=>{let o=(s.tagName||"").toLowerCase(),a=e(s);if(/^h[1-6]$/.test(o)){let c=parseInt(o.slice(1),10),u=a.html()||"";n.push(` <${o}>${u} `)}else if(o==="ul"||o==="ol"){let c=o==="ol",u=[];a.children("li").each((f,p)=>{u.push(`
  • ${e(p).html()||""}
  • @@ -2697,17 +2697,17 @@ ${d}
    `);else if(o==="p"){let c=(a.html()||"").trim();c&&n.push(`

    ${c}

    -`)}else n.push(`${eh} -${pa(e.html(s))} +`)}else n.push(`${sh} +${Aa(e.html(s))} `)}),n.length===0){let i=r.text().trim();i&&n.push(` -

    ${rs(i)}

    +

    ${ns(i)}

    `)}return n.length?n.join(` -`):null}function DNt(e,t){let r=e.html(t);return r.trim()?`${eh} -${pa(r)} -`:null}function Vh(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var wRe={htmlToBlocks:vNt};function NNt(e){return/squarespace\.com/i.test(e)}var IRe={id:"squarespace",detect:NNt,discover:ERe,extract:CRe,blocks:wRe};ki();async function SRe(e,t){let r="";try{let h=e.includes("://")?e:`https://${e}`,A=await fetch(h,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});A.ok?r=await A.text():await A.body?.cancel()}catch{}let n=Qe(r,"og:title"),i=Qe(r,"og:description"),s=n||br(r)||"Imported Site",o=i||Qe(r,"description")||"",c=r.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",u=await ii(e),l=e.includes("://")?e:`https://${e}`,d=ks(r,l),f={},p=[];for(let h of u){let A=cr(h);p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:l,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:s,tagline:o,language:c},navigation:d,counts:f,urls:p}}qi();function MNt(e){let t=e.match(/]*class="[^"]*w-richtext[^"]*"[^>]*>/i);if(t){let s=e.indexOf(t[0])+t[0].length,o=1,a=s;for(;a0;){let c=e.indexOf("",a);if(u===-1)break;if(c!==-1&&c]*>([\s\S]*?)<\/article>/i);if(r?.[1]?.trim())return r[1].trim();let n=e.match(/]*>([\s\S]*?)<\/main>/i);return n?.[1]?.trim()?n[1].trim():""}function PNt(e){let t=e.match(/]*>([\s\S]*?)<\/h1>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(t)return t;let r=e.match(/]*>([\s\S]*?)<\/h2>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();return r||br(e)}function LNt(e){let t=new Set,r=/https?:\/\/cdn\.prod\.website-files\.com\/[^\s"'<>)]+/g,n=e.match(r)||[];for(let u of n)t.add(u);let i=/https?:\/\/[^\s"'<>)]*website-files\.com\/[^\s"'<>)]+/g,s=e.match(i)||[];for(let u of s)t.add(u);let o=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let u of o){let l=u.match(/src=["']([^"']+)["']/i);l?.[1]&&l[1].startsWith("http")&&t.add(l[1])}let a=Dr,c=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].filter(u=>{try{let l=new URL(u);return c.test(l.pathname)?!1:a.test(l.pathname)}catch{return!1}})}async function vRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ei;a&&!s.dryRun&&c.openStream(a);let u=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async l=>{let d="";try{let N=await fetch(l,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});N.ok?d=await N.text():await N.body?.cancel()}catch{}let f=MNt(d),p=PNt(d)||er(l),h=Qe(d,"og:description")||Qe(d,"description")||"",A=Qe(d,"og:title")||br(d)||p,g=h,m=Qe(d,"article:published_time"),b=d.match(/]+datetime=["']([^"']+)["']/i)?.[1],E=m||b||"",C=LNt(d),w=Qe(d,"og:image");if(w&&w.startsWith("http")&&!C.includes(w)){let N=Dr;try{N.test(new URL(w).pathname)&&C.push(w)}catch{}}let T=Qe(d,"article:author")||void 0;if(!T){let N=d.match(/"author"\s*:\s*\{\s*"@type"\s*:\s*"Person"\s*,\s*"name"\s*:\s*"([^"]+)"/);N&&(T=N[1])}if(!T){let N=d.match(/"author"\s*:\s*"([^"]+)"/);N&&(T=N[1])}let _="low";return f.length>200?_="high":f.length>50&&(_="medium"),{title:p,slug:er(l),content:f,excerpt:h,date:E,seoTitle:A,seoDescription:g,mediaUrls:C,qualityScore:_,categories:[],tags:[],author:T}}});return u.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),u}function FNt(e){return/webflow\.io|webflow\.com/i.test(e)}var xRe={id:"webflow",detect:FNt,discover:SRe,extract:vRe};ki();function BRe(e,t){let r=[],n=new Set,i=/]+class=["'][^"']*wsite-menu-item[^"']*["'][^>]*>([\s\S]*?)<\/a>/gi,s;for(;(s=i.exec(e))!==null;){let o=s[0],a=s[1].replace(/<[^>]*>/g,"").trim(),c=o.match(/href=["']([^"']+)["']/i);if(!a||!c)continue;let u=c[1];if(!n.has(u)){if(n.add(u),u.startsWith("//"))u="https:"+u;else if(u.startsWith("/"))try{u=new URL(u,t).href}catch{}r.push({text:a,href:u})}}return r.length===0?ks(e,t):r}function kRe(e){let t=new Set,r=/https?:\/\/[^\s"'<>)]*editmysite\.com\/[^\s"'<>)]+/g,n=e.match(r)||[];for(let l of n)t.add(l);let i=/https?:\/\/[^\s"'<>)]*weeblycloud\.com\/[^\s"'<>)]+/g,s=e.match(i)||[];for(let l of s)t.add(l);let o=/https?:\/\/[^\s"'<>)]*\/uploads\/[^\s"'<>)]+/g,a=e.match(o)||[];for(let l of a)t.add(l);let c=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let l of c){let d=l.match(/src=["']([^"']+)["']/i);d?.[1]&&d[1].startsWith("http")&&t.add(d[1])}let u=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].filter(l=>{try{let d=new URL(l);return u.test(d.pathname)?!1:Dr.test(d.pathname)}catch{return!1}})}async function _Re(e,t){let r="";try{let h=e.includes("://")?e:`https://${e}`,A=await fetch(h,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});A.ok?r=await A.text():await A.body?.cancel()}catch{}let n=Qe(r,"og:title"),i=Qe(r,"og:description"),s=n||br(r)||"Imported Site",o=i||Qe(r,"description")||"",c=r.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",u=await ii(e),l=e.includes("://")?e:`https://${e}`,d=BRe(r,l),f={},p=[];for(let h of u){let A=cr(h);A==="page"&&/\/blog\//.test(h)&&!/\/blog\/category\//.test(h)&&(A="post"),p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:l,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:s,tagline:o,language:c},navigation:d,counts:f,urls:p}}qi();function TRe(e,t,r="div"){let n=e.match(t);if(!n)return"";let s=e.indexOf(n[0])+n[0].length,o=1,a=s,c=`<${r}`,u=``;for(;a0;){let l=e.indexOf(c,a),d=e.indexOf(u,a);if(d===-1)break;if(l!==-1&&l]*\sid=["']wsite-content["'][^>]*>/i);if(t)return t;let r=e.match(/]*>([\s\S]*?)<\/main>/i);if(r?.[1]?.trim())return r[1].trim();let n=e.match(/]*>([\s\S]*?)<\/article>/i);return n?.[1]?.trim()?n[1].trim():""}function QRe(e){let t=e.match(/]*>([\s\S]*?)<\/h1>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(t)return t;let r=Qe(e,"og:title");return r||br(e)}function DRe(e){let t=Qe(e,"article:published_time");if(t)return t;let r=e.match(/class=["'][^"']*date-text[^"']*["'][^>]*>([^<]+)]+datetime=["']([^"']+)["']/i)?.[1];if(n)return n;let i=TRe(e,/]*\sid=["']wsite-content["'][^>]*>/i)||e,s=/(\d{1,2}\/\d{1,2}\/\d{4})/,o=i.match(s);if(o?.[1]){let a=new Date(o[1]);if(!isNaN(a.getTime()))return a.toISOString()}return""}function NRe(e){let t=[],r=new Set,n=/href=["'][^"']*\/blog\/category\/([^"']+)["'][^>]*>([^<]+)/gi,i;for(;(i=n.exec(e))!==null;){let s=i[2].trim();s&&!r.has(s.toLowerCase())&&(r.add(s.toLowerCase()),t.push(s))}return t}function MRe(e,t){let r;try{r=new URL(t.includes("://")?t:`https://${t}`).origin}catch{return e}return e.replace(/(src|href)=["'](\/(?!\/)[^"']+)["']/gi,(n,i,s)=>`${i}="${r}${s}"`)}function PRe(e,t){if(!t)return null;let n=t.match(/]*>([\s\S]*?)<\/h2>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(!n)return null;let i=/\$\s*(\d+(?:\.\d{2})?)/,o=t.match(i)?.[1]||"",c=t.match(/class=["'][^"']*(?:sale|original)[^"']*["'][^>]*>\s*\$\s*(\d+(?:\.\d{2})?)/i)?.[1]||void 0,u=[];function l(m){return!(m.length<15||/^\$\d/.test(m)||/^SKU:/i.test(m)||/^(Add to Cart|Unavailable|Out of Stock|per item|Have questions|Items handcrafted)/i.test(m))}let d=t.match(/]*>([\s\S]*?)<\/p>/gi)||[];for(let m of d){let b=m.replace(/<[^>]*>/g,"").trim();l(b)&&u.push(b)}if(u.length===0){let m=t.match(/]+class=["'][^"']*paragraph[^"']*["'][^>]*>([\s\S]*?)<\/div>/gi)||[];for(let b of m){let E=b.replace(/<[^>]*>/g,"").trim();l(E)&&u.push(E)}}let f=u.join(` +`):null}function KNt(e,t){let r=e.html(t);return r.trim()?`${sh} +${Aa(r)} +`:null}function Zh(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}var QRe={htmlToBlocks:qNt};function XNt(e){return/squarespace\.com/i.test(e)}var DRe={id:"squarespace",detect:XNt,discover:TRe,extract:RRe,blocks:QRe};_i();async function NRe(e,t){let r="";try{let h=e.includes("://")?e:`https://${e}`,A=await fetch(h,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});A.ok?r=await A.text():await A.body?.cancel()}catch{}let n=Re(r,"og:title"),i=Re(r,"og:description"),s=n||Cr(r)||"Imported Site",o=i||Re(r,"description")||"",c=r.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",u=await si(e),l=e.includes("://")?e:`https://${e}`,d=ks(r,l),f={},p=[];for(let h of u){let A=lr(h);p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:l,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:s,tagline:o,language:c},navigation:d,counts:f,urls:p}}zi();function eMt(e){let t=e.match(/]*class="[^"]*w-richtext[^"]*"[^>]*>/i);if(t){let s=e.indexOf(t[0])+t[0].length,o=1,a=s;for(;a0;){let c=e.indexOf("",a);if(u===-1)break;if(c!==-1&&c]*>([\s\S]*?)<\/article>/i);if(r?.[1]?.trim())return r[1].trim();let n=e.match(/]*>([\s\S]*?)<\/main>/i);return n?.[1]?.trim()?n[1].trim():""}function tMt(e){let t=e.match(/]*>([\s\S]*?)<\/h1>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(t)return t;let r=e.match(/]*>([\s\S]*?)<\/h2>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();return r||Cr(e)}function rMt(e){let t=new Set,r=/https?:\/\/cdn\.prod\.website-files\.com\/[^\s"'<>)]+/g,n=e.match(r)||[];for(let u of n)t.add(u);let i=/https?:\/\/[^\s"'<>)]*website-files\.com\/[^\s"'<>)]+/g,s=e.match(i)||[];for(let u of s)t.add(u);let o=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let u of o){let l=u.match(/src=["']([^"']+)["']/i);l?.[1]&&l[1].startsWith("http")&&t.add(l[1])}let a=Mr,c=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].filter(u=>{try{let l=new URL(u);return c.test(l.pathname)?!1:a.test(l.pathname)}catch{return!1}})}async function MRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ri;a&&!s.dryRun&&c.openStream(a);let u=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async l=>{let d="";try{let D=await fetch(l,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});D.ok?d=await D.text():await D.body?.cancel()}catch{}let f=eMt(d),p=tMt(d)||Xt(l),h=Re(d,"og:description")||Re(d,"description")||"",A=Re(d,"og:title")||Cr(d)||p,g=h,m=Re(d,"article:published_time"),b=d.match(/]+datetime=["']([^"']+)["']/i)?.[1],C=m||b||"",E=rMt(d),w=Re(d,"og:image");if(w&&w.startsWith("http")&&!E.includes(w)){let D=Mr;try{D.test(new URL(w).pathname)&&E.push(w)}catch{}}let T=Re(d,"article:author")||void 0;if(!T){let D=d.match(/"author"\s*:\s*\{\s*"@type"\s*:\s*"Person"\s*,\s*"name"\s*:\s*"([^"]+)"/);D&&(T=D[1])}if(!T){let D=d.match(/"author"\s*:\s*"([^"]+)"/);D&&(T=D[1])}let _="low";return f.length>200?_="high":f.length>50&&(_="medium"),{title:p,slug:Xt(l),content:f,excerpt:h,date:C,seoTitle:A,seoDescription:g,mediaUrls:E,qualityScore:_,categories:[],tags:[],author:T}}});return u.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),u}function nMt(e){return/webflow\.io|webflow\.com/i.test(e)}var PRe={id:"webflow",detect:nMt,discover:NRe,extract:MRe};_i();function LRe(e,t){let r=[],n=new Set,i=/]+class=["'][^"']*wsite-menu-item[^"']*["'][^>]*>([\s\S]*?)<\/a>/gi,s;for(;(s=i.exec(e))!==null;){let o=s[0],a=s[1].replace(/<[^>]*>/g,"").trim(),c=o.match(/href=["']([^"']+)["']/i);if(!a||!c)continue;let u=c[1];if(!n.has(u)){if(n.add(u),u.startsWith("//"))u="https:"+u;else if(u.startsWith("/"))try{u=new URL(u,t).href}catch{}r.push({text:a,href:u})}}return r.length===0?ks(e,t):r}function FRe(e){let t=new Set,r=/https?:\/\/[^\s"'<>)]*editmysite\.com\/[^\s"'<>)]+/g,n=e.match(r)||[];for(let l of n)t.add(l);let i=/https?:\/\/[^\s"'<>)]*weeblycloud\.com\/[^\s"'<>)]+/g,s=e.match(i)||[];for(let l of s)t.add(l);let o=/https?:\/\/[^\s"'<>)]*\/uploads\/[^\s"'<>)]+/g,a=e.match(o)||[];for(let l of a)t.add(l);let c=e.match(/]+src=["']([^"']+)["']/gi)||[];for(let l of c){let d=l.match(/src=["']([^"']+)["']/i);d?.[1]&&d[1].startsWith("http")&&t.add(d[1])}let u=/\.(css|js|json|xml|txt|map|woff2?|ttf|eot|pdf)$/i;return[...t].filter(l=>{try{let d=new URL(l);return u.test(d.pathname)?!1:Mr.test(d.pathname)}catch{return!1}})}async function ORe(e,t){let r="";try{let h=e.includes("://")?e:`https://${e}`,A=await fetch(h,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});A.ok?r=await A.text():await A.body?.cancel()}catch{}let n=Re(r,"og:title"),i=Re(r,"og:description"),s=n||Cr(r)||"Imported Site",o=i||Re(r,"description")||"",c=r.match(/]+lang=["']([^"']+)["']/i)?.[1]||"en-US",u=await si(e),l=e.includes("://")?e:`https://${e}`,d=LRe(r,l),f={},p=[];for(let h of u){let A=lr(h);A==="page"&&/\/blog\//.test(h)&&!/\/blog\/category\//.test(h)&&(A="post"),p.push({url:h,type:A}),f[A]=(f[A]||0)+1}return p.length===0&&(p.push({url:l,type:"homepage"}),f.homepage=1),{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:s,tagline:o,language:c},navigation:d,counts:f,urls:p}}zi();function URe(e,t,r="div"){let n=e.match(t);if(!n)return"";let s=e.indexOf(n[0])+n[0].length,o=1,a=s,c=`<${r}`,u=``;for(;a0;){let l=e.indexOf(c,a),d=e.indexOf(u,a);if(d===-1)break;if(l!==-1&&l]*\sid=["']wsite-content["'][^>]*>/i);if(t)return t;let r=e.match(/]*>([\s\S]*?)<\/main>/i);if(r?.[1]?.trim())return r[1].trim();let n=e.match(/]*>([\s\S]*?)<\/article>/i);return n?.[1]?.trim()?n[1].trim():""}function HRe(e){let t=e.match(/]*>([\s\S]*?)<\/h1>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(t)return t;let r=Re(e,"og:title");return r||Cr(e)}function jRe(e){let t=Re(e,"article:published_time");if(t)return t;let r=e.match(/class=["'][^"']*date-text[^"']*["'][^>]*>([^<]+)]+datetime=["']([^"']+)["']/i)?.[1];if(n)return n;let i=URe(e,/]*\sid=["']wsite-content["'][^>]*>/i)||e,s=/(\d{1,2}\/\d{1,2}\/\d{4})/,o=i.match(s);if(o?.[1]){let a=new Date(o[1]);if(!isNaN(a.getTime()))return a.toISOString()}return""}function qRe(e){let t=[],r=new Set,n=/href=["'][^"']*\/blog\/category\/([^"']+)["'][^>]*>([^<]+)/gi,i;for(;(i=n.exec(e))!==null;){let s=i[2].trim();s&&!r.has(s.toLowerCase())&&(r.add(s.toLowerCase()),t.push(s))}return t}function zRe(e,t){let r;try{r=new URL(t.includes("://")?t:`https://${t}`).origin}catch{return e}return e.replace(/(src|href)=["'](\/(?!\/)[^"']+)["']/gi,(n,i,s)=>`${i}="${r}${s}"`)}function VRe(e,t){if(!t)return null;let n=t.match(/]*>([\s\S]*?)<\/h2>/i)?.[1]?.replace(/<[^>]*>/g,"").trim();if(!n)return null;let i=/\$\s*(\d+(?:\.\d{2})?)/,o=t.match(i)?.[1]||"",c=t.match(/class=["'][^"']*(?:sale|original)[^"']*["'][^>]*>\s*\$\s*(\d+(?:\.\d{2})?)/i)?.[1]||void 0,u=[];function l(m){return!(m.length<15||/^\$\d/.test(m)||/^SKU:/i.test(m)||/^(Add to Cart|Unavailable|Out of Stock|per item|Have questions|Items handcrafted)/i.test(m))}let d=t.match(/]*>([\s\S]*?)<\/p>/gi)||[];for(let m of d){let b=m.replace(/<[^>]*>/g,"").trim();l(b)&&u.push(b)}if(u.length===0){let m=t.match(/]+class=["'][^"']*paragraph[^"']*["'][^>]*>([\s\S]*?)<\/div>/gi)||[];for(let b of m){let C=b.replace(/<[^>]*>/g,"").trim();l(C)&&u.push(C)}}let f=u.join(` -`),p=[],h=/]+src=["']([^"']*\/uploads\/[^"']+)["']/gi,A;for(;(A=h.exec(t))!==null;){let m=A[1];if(m.startsWith("/"))try{m=new URL(e).origin+m}catch{}m=m.replace(/\?width=\d+/,""),p.includes(m)||p.push(m)}let g=/]+src=["'](https?:\/\/[^"']*editmysite\.com\/[^"']+)["']/gi;for(;(A=g.exec(t))!==null;){let m=A[1];Dr.test(m)&&!p.includes(m)&&p.push(m)}return{name:n,type:"simple",description:f,regularPrice:o,salePrice:c,images:p,inStock:!0,sourceUrl:e}}async function LRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ei;a&&!s.dryRun&&c.openStream(a);let u=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async l=>{let d=await fetch(l,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});if(!d.ok)throw await d.body?.cancel(),new Error(`HTTP ${d.status} ${d.statusText}`);let f=await d.text(),p=MRe(RRe(f),l),h=QRe(f)||er(l),A=Qe(f,"og:description")||Qe(f,"description")||"",g=Qe(f,"og:title")||br(f)||h,m=A,b=DRe(f),E=kRe(f),C=Qe(f,"og:image");if(C&&C.startsWith("http")&&!E.includes(C))try{Dr.test(new URL(C).pathname)&&E.push(C)}catch{}let w=NRe(f),T=p.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),_="low";return T.length>200?_="high":T.length>50&&(_="medium"),{title:h,slug:er(l),content:p,excerpt:A,date:b,seoTitle:g,seoDescription:m,mediaUrls:E,qualityScore:_,categories:w,tags:[]}},extractProduct:PRe});return u.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),u}function ONt(e){return/weebly\.com/i.test(e)}var FRe={id:"weebly",detect:ONt,discover:_Re,extract:LRe};ki();qi();zi();async function ORe(e,t){let r=t;e=zB(e);let{browser:n,page:i,close:s}=await Ic({cdpPort:r.cdpPort});try{let o=i,a=(()=>{let b=new URL(e);return b.origin+b.pathname.replace(/\/$/,"")})(),c=[],u=new Set,l=new Set,d=[];async function f(b,E=0,C=!1){if(E>3||l.has(b))return;l.add(b);let w=N=>{if(C){r.verbose&&console.warn(`[wix:discover] optional sub-sitemap not present: ${b} (${N})`);return}console.warn(`[wix:discover] sitemap fetch failed after ${T} attempts: ${b} (${N})`),d.push({url:b,reason:N})},T=3,_=null;for(let N=1;N<=T;N++)try{let k=await o.goto(b,{timeout:15e3});if(!k||!k.ok()){if(_=k?`HTTP ${k.ok()?"ok=false":"status-not-ok"}`:"no response",NsetTimeout(O,500*N));continue}w(_??"unknown");return}let v=await o.content(),M=Jb(v);for(let O of M)O.endsWith(".xml")?await f(O,E+1):u.has(O)||(u.add(O),c.push(O));return}catch(k){if(_=k instanceof Error?k.message:String(k),NsetTimeout(v,500*N));continue}w(_??"unknown")}}await f(`${a}/sitemap.xml`),d.length>0&&console.warn(`[wix:discover] ${d.length} sitemap fetch(es) failed \u2014 inventory may be incomplete`);for(let b of["blog-posts-sitemap.xml","store-products-sitemap.xml","forum-posts-sitemap.xml"])await f(`${a}/${b}`,0,!0);let p=c;if(p.length===0)try{await o.goto(e,{waitUntil:"domcontentloaded",timeout:3e4}),await o.waitForTimeout(4e3);let b=new URL(e).origin;p=await o.evaluate(E=>{let C=E;return[...new Set([...document.querySelectorAll("a[href]")].map(w=>w.href).filter(w=>w.startsWith(C)&&!w.includes("#")))]},b)}catch{}let h=[];try{await o.goto(e,{waitUntil:"domcontentloaded",timeout:3e4}).catch(()=>{}),await o.waitForTimeout(4e3),h=await o.evaluate(()=>{let b=[];return document.querySelectorAll('nav a, header a, [role="navigation"] a').forEach(E=>{let C=E,w=C.textContent?.trim()||"",T=C.href;w&&T&&!T.includes("#")&&!b.find(_=>_.href===T)&&b.push({text:w,href:T})}),b})}catch{}let A="";try{A=await o.evaluate(()=>{let b=document.title,E=b.lastIndexOf(" | ");return(E>0?b.slice(E+3).trim():b).replace(/ Main$/,"").trim()})}catch{}let g={},m=[];for(let b of p){let E=cr(b);m.push({url:b,type:E}),g[E]=(g[E]||0)+1}return{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:A||"Imported Site",tagline:"",language:"en-US"},navigation:h,counts:g,urls:m}}finally{await s()}}zi();function SG(e){let t=e instanceof Error?e.message:String(e??"");return/execution context was destroyed|context was destroyed|because of (?:a )?navigation/i.test(t)}var vG=` +`),p=[],h=/]+src=["']([^"']*\/uploads\/[^"']+)["']/gi,A;for(;(A=h.exec(t))!==null;){let m=A[1];if(m.startsWith("/"))try{m=new URL(e).origin+m}catch{}m=m.replace(/\?width=\d+/,""),p.includes(m)||p.push(m)}let g=/]+src=["'](https?:\/\/[^"']*editmysite\.com\/[^"']+)["']/gi;for(;(A=g.exec(t))!==null;){let m=A[1];Mr.test(m)&&!p.includes(m)&&p.push(m)}return{name:n,type:"simple",description:f,regularPrice:o,salePrice:c,images:p,inStock:!0,sourceUrl:e}}async function GRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:300,a=s.outputDir||"",c=new ri;a&&!s.dryRun&&c.openStream(a);let u=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async l=>{let d=await fetch(l,{signal:AbortSignal.timeout(15e3),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});if(!d.ok)throw await d.body?.cancel(),new Error(`HTTP ${d.status} ${d.statusText}`);let f=await d.text(),p=zRe($Re(f),l),h=HRe(f)||Xt(l),A=Re(f,"og:description")||Re(f,"description")||"",g=Re(f,"og:title")||Cr(f)||h,m=A,b=jRe(f),C=FRe(f),E=Re(f,"og:image");if(E&&E.startsWith("http")&&!C.includes(E))try{Mr.test(new URL(E).pathname)&&C.push(E)}catch{}let w=qRe(f),T=p.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),_="low";return T.length>200?_="high":T.length>50&&(_="medium"),{title:h,slug:Xt(l),content:p,excerpt:A,date:b,seoTitle:g,seoDescription:m,mediaUrls:C,qualityScore:_,categories:w,tags:[]}},extractProduct:VRe});return u.productsExtracted>0&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),u}function iMt(e){return/weebly\.com/i.test(e)}var WRe={id:"weebly",detect:iMt,discover:ORe,extract:GRe};_i();zi();Vi();Su();function DG(e){let t=e instanceof Error?e.message:String(e??"");return/execution context was destroyed|context was destroyed|because of (?:a )?navigation/i.test(t)}var NG=` (function () { try { var noop = function () { return undefined; }; @@ -2724,10 +2724,10 @@ ${pa(r)} } catch (e) {} } catch (e) {} })(); -`;function URe(){return{title:"",description:"",ogTitle:"",ogDescription:"",ogImage:"",canonical:""}}function $Re(e){let t=new Set,n=JSON.stringify({apiCalls:e.apiCalls,globals:e.globals,jsonLd:e.jsonLd}).match(/https?:\/\/[^"'\s]*(?:wixstatic\.com|wixmp\.com)[^"'\s]*/g)||[];for(let o of n)t.add(o);for(let o of e.jsonLd){let a=o;if(typeof a.image=="string"&&t.add(a.image),Array.isArray(a.image))for(let c of a.image)typeof c=="string"&&t.add(c),typeof c=="object"&&c&&typeof c.url=="string"&&t.add(c.url);typeof a.thumbnailUrl=="string"&&t.add(a.thumbnailUrl)}if(e.meta.ogImage&&t.add(e.meta.ogImage),e.pageHtml){let o=e.pageHtml.match(/]+src=["']([^"']+)["']/gi)||[];for(let c of o){let u=c.match(/src=["']([^"']+)["']/i);u?.[1]&&u[1].startsWith("http")&&t.add(u[1])}let a=e.pageHtml.match(/url\(["']?(https?:\/\/[^"')]+)["']?\)/gi)||[];for(let c of a){let u=c.match(/url\(["']?(https?:\/\/[^"')]+)["']?\)/i);u?.[1]&&t.add(u[1])}}let i=Dr,s=/wixstatic\.com|wixmp\.com|parastorage\.com|images\.unsplash\.com|cdn\.shopify\.com/i;return[...t].filter(o=>{try{let a=new URL(o);return i.test(a.pathname)||s.test(a.hostname)}catch{return!1}})}function HRe(e){for(let t of e){let r=t,n=r["@type"];if(!(n==="BlogPosting"||n==="Article"||n==="NewsArticle"||Array.isArray(n)&&n.some(o=>o==="BlogPosting"||o==="Article"||o==="NewsArticle")))continue;let s=r.image;if(typeof s=="string")return s;if(s&&typeof s=="object"&&!Array.isArray(s)){let o=s.url;if(typeof o=="string")return o}if(Array.isArray(s))for(let o of s){if(typeof o=="string")return o;if(o&&typeof o=="object"){let a=o.url;if(typeof a=="string")return a}}}return null}function xG(e,t=0){if(t>8||e==null||typeof e=="string"||typeof e!="object")return null;let r=e,n=["html","richText","body","content","text","plainText"];for(let i of n){let s=r[i];if(typeof s=="string"&&s.length>50&&s.includes("<"))return s}if(Array.isArray(e))for(let i of e){let s=xG(i,t+1);if(s)return s}else for(let i of Object.values(r)){let s=xG(i,t+1);if(s)return s}return null}function jRe(e){for(let n of e.apiCalls){let i=xG(n.data);if(i&&i.length>50){let s=i.replace(//gi,"").replace(//gi,"").replace(//gi,"").replace(/]*\/?>/gi,"").replace(/]*\/?>/gi,"").trim();if(s.length>50&&/<[a-z][\s\S]*>/i.test(s))return{content:i,qualityScore:"high"}}}if(e.renderedContent&&e.renderedContent.length>30)return{content:e.renderedContent,qualityScore:"high"};let t=new Set(["Article","BlogPosting","NewsArticle","SocialMediaPosting","Product","ItemPage","Event","Recipe","Course","Book","Movie"]);for(let n of e.jsonLd){let i=n;if(typeof i.articleBody=="string"&&i.articleBody.length>50)return{content:`

    ${i.articleBody}

    `,qualityScore:"medium"};let s=i["@type"];if(typeof s=="string"&&t.has(s)&&typeof i.description=="string"&&i.description.length>50)return{content:`

    ${i.description}

    `,qualityScore:"medium"}}let r=e.meta.ogDescription||e.meta.description||"";if(r.length>50)return{content:`

    ${r}

    `,qualityScore:"medium"};if(e.accessibility&&e.accessibility.length>0){let n=[];for(let i of e.accessibility)i.role==="heading"?n.push(`

    ${i.name}

    `):i.name&&n.push(`

    ${i.name}

    `);if(n.length>0)return{content:n.join(` -`),qualityScore:"low"}}return{content:"",qualityScore:"low"}}function BG(e){let t=new Set,r=/https?:\/\/[a-z0-9.-]*(?:wixstatic\.com|wixmp\.com)\/media\/[^\s"'()<>\\]+/gi;for(let h of e.match(r)||[])t.add(h);let n=/[a-z0-9]{4,}_[a-f0-9]{32}~mv2\.(?:jpe?g|png|gif|webp|avif)/gi;for(let h of e.match(n)||[])t.add(`https://static.wixstatic.com/media/${h}`);let i=new Map;for(let h of t){let A=h.match(/\/media\/([a-z0-9]{4,}_[a-f0-9]{32}~mv2\.[a-z0-9]+)/i)?.[1],g=A??h;i.get(g)?A&&h.endsWith(A)&&i.set(g,`https://static.wixstatic.com/media/${A}`):i.set(g,h)}let s=[...i.values()],o=e.match(/]+property=["']og:title["'][^>]+content=["']([^"']+)["']/i)?.[1],a=e.match(/]*>([\s\S]*?)<\/title>/i)?.[1]?.trim(),c=(o||a||"").trim(),u=c.lastIndexOf(" | "),l=u>0?c.slice(0,u).trim():c,d=[],f=e.match(/]+property=["']og:description["'][^>]+content=["']([^"']*)["']/i)?.[1]?.trim();for(let h of e.match(/]*>([\s\S]*?)<\/h[1-3]>/gi)||[]){let A=h.replace(/<[^>]+>/g,"").trim(),g=h.match(/<(h[1-3])/i)?.[1]?.toLowerCase()||"h2";if(A&&A.length<200&&d.push(`<${g}>${A}`),d.length>=12)break}f&&f.length>0&&d.unshift(`

    ${f}

    `);let p=d.join(` -`);return{title:l,content:p,mediaUrls:s}}qi();async function qRe(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(2e4),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});return t.ok?await t.text():(await t.body?.cancel(),"")}catch{return""}}async function zRe(e,t){let r=e,n=async(m,b)=>{try{await r.waitForLoadState("networkidle",{timeout:m})}catch{}await r.waitForTimeout(b)},i=async m=>{try{return await r.evaluate(m)}catch(b){if(!SG(b))throw b;return await n(8e3,1500),await r.evaluate(m)}},s={apiCalls:[]},o=async m=>{let b=m,E=b.url();if(!(!(b.headers()["content-type"]||"").includes("application/json")||!(E.includes("/_api/")||E.includes("wixapis.com")||E.includes("wix.com/_api"))))try{let T=await b.json();s.apiCalls.push({url:E,data:T})}catch{}};r.on("response",o);try{await r.addInitScript(vG)}catch{}try{await r.goto(t,{waitUntil:"domcontentloaded",timeout:3e4}),await n(6e3,4e3);try{await r.evaluate(async()=>{let b=document.documentElement.scrollHeight;for(let E=0;EsetTimeout(C,120));window.scrollTo(0,0)}),await n(3e3,500)}catch{}}catch{}r.off("response",o);let a=!1,c;try{c=await i(()=>{let m={},b=["__WIX_DATA__","__SITE_DATA__","wixBiSession","__wixInjectedPageData"],E=window;for(let T of b)E[T]&&(m[T]=E[T]);for(let T of Object.keys(window))if((T.startsWith("__WIX")||T.startsWith("_wix"))&&!m[T])try{m[T]=E[T]}catch{}let C=Array.from(document.querySelectorAll('script[type="application/ld+json"]')).map(T=>{try{return JSON.parse(T.textContent||"")}catch{return null}}).filter(Boolean),w={title:document.title,description:document.querySelector('meta[name="description"]')?.content||"",ogTitle:document.querySelector('meta[property="og:title"]')?.content||"",ogDescription:document.querySelector('meta[property="og:description"]')?.content||"",ogImage:document.querySelector('meta[property="og:image"]')?.content||"",canonical:document.querySelector('link[rel="canonical"]')?.href||""};return{globals:m,jsonLd:C,meta:w}})}catch{c={globals:{},jsonLd:[],meta:URe()},a=!0}let u=null;try{u=await i(()=>{let m=document.querySelector("main")||document.querySelector("#PAGES_CONTAINER")||document.querySelector("#SITE_PAGES");if(!m)return null;let b=m.querySelectorAll('[data-testid="richTextElement"]');if(b.length===0)return null;let E=[],C=new Set;return b.forEach(T=>{let _=T.querySelectorAll("h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote");if(_.length>0)_.forEach(N=>{let k=N.innerText?.trim();if(!k||C.has(k))return;C.add(k);let v=N.tagName.toLowerCase();v.startsWith("h")?E.push(`<${v}>${k}`):v==="ul"||v==="ol"?E.push(N.outerHTML):v==="blockquote"?E.push(`
    ${k}
    `):E.push(`

    ${k}

    `)});else{let N=T.innerText?.trim();N&&!C.has(N)&&(C.add(N),E.push(`

    ${N}

    `))}}),m.querySelectorAll('img[src*="wixstatic"], img[src*="wixmp"], [data-testid="image"] img').forEach(T=>{let _=T.src,N=T.alt||"";_&&!C.has(_)&&(C.add(_),E.push(`${N}`))}),E.length>0?E.join(` -`):null})}catch{}let l=null;try{await i(()=>!!document.querySelector('[data-hook="feed-page-root"]'))&&(l="blog_archive")}catch{}let d=null;try{let m=await r.context().newCDPSession(e);d=((await m.send("Accessibility.getFullAXTree",{depth:10})).nodes||[]).filter(C=>["heading","paragraph","StaticText","link","img","list","listitem","article","main","section"].includes(C.role?.value||"")).map(C=>({role:C.role?.value||"",name:C.name?.value||"",description:C.description?.value})).filter(C=>C.name),await m.detach()}catch{}let f="";try{f=await r.content()}catch{f=await qRe(t)||""}a&&f.length<2e3&&(f=await qRe(t)||f);let p=$Re({apiCalls:s.apiCalls,globals:c.globals,jsonLd:c.jsonLd,meta:c.meta,accessibility:d,pageHtml:f}),{content:h,qualityScore:A}=jRe({apiCalls:s.apiCalls,jsonLd:c.jsonLd,renderedContent:u,accessibility:d,meta:c.meta});if(f){let m=BG(f);if(p.length===0&&m.mediaUrls.length>0)p.push(...m.mediaUrls);else{let b=new Set(p);for(let E of m.mediaUrls)b.has(E)||p.push(E)}(!h||h.length<30)&&m.content&&(h=m.content,A="low"),!c.meta.title&&!c.meta.ogTitle&&m.title&&(c.meta.ogTitle=m.title)}let g=HRe(c.jsonLd);return{sourceUrl:t,slug:er(t),extractedAt:new Date().toISOString(),apiCalls:s.apiCalls,globals:c.globals,jsonLd:c.jsonLd,meta:c.meta,accessibility:d,mediaUrls:p,content:h,qualityScore:A,pageHtml:f,...l?{pageType:l}:{},...g?{featuredImage:g}:{}}}function VRe(e){for(let t of e.jsonLd){let r=t;if(r["@type"]==="Product"&&typeof r.name=="string"){let n=r.offers||r.Offers,s=(Array.isArray(n)?n:n?[n]:[])[0]||{},o=s.price?String(s.price):"",a=[];if(typeof r.image=="string")a.push(r.image);else if(Array.isArray(r.image)){for(let u of r.image)if(typeof u=="string")a.push(u);else if(typeof u=="object"&&u){let l=u.url||u.contentUrl;typeof l=="string"&&a.push(l)}}let c=s.availability||s.Availability;return{name:r.name,description:typeof r.description=="string"?r.description:"",regularPrice:o,sku:typeof r.sku=="string"?r.sku:"",images:a,inStock:typeof c=="string"?c.includes("InStock"):!0,sourceUrl:e.sourceUrl}}}for(let t of e.apiCalls){let r=t.data,n=r.product||r.catalog?.product;if(n&&typeof n.name=="string"){let i=n.price,s=n.media?.items,o=[];if(s)for(let a of s){let c=a.image?.url;c&&o.push(c)}return{name:n.name,description:typeof n.description=="string"?n.description:"",regularPrice:i?.formatted?String(i.formatted).replace(/[^0-9.]/g,""):"",sku:typeof n.sku=="string"?n.sku:"",images:o,inStock:n.stock?.inventoryStatus?n.stock.inventoryStatus!=="OUT_OF_STOCK":void 0,sourceUrl:e.sourceUrl}}}if(e.pageHtml){let t=e.pageHtml,r=i=>{let s=new RegExp(`data-hook=["']${i}["'][^>]*>([\\s\\S]*?)]+>/g,"").trim()||""},n=r("product-title");if(n){let i=r("formatted-primary-price").replace(/[^0-9.,]/g,""),s=r("product-description"),o=/data-hook=["'](?:main-media-image-wrapper|thumbnail-image)["'][^>]*>[\s\S]*?]+src=["']([^"']+)["']/gi,a=[],c;for(;(c=o.exec(t))!==null;)a.includes(c[1])||a.push(c[1]);return{name:n,description:s,regularPrice:i,sku:"",images:a,inStock:!0}}}return null}async function GRe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:500,a=s.outputDir||"",c=new ei,u=!1;a&&!s.dryRun&&c.openStream(a);let l=new Set(i.urls.filter(p=>p.type==="product").map(p=>p.url)),{page:d,close:f}=await Ic({cdpPort:s.cdpPort});try{let p=await mi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,extractPage:async h=>{let A=await zRe(d,h);if(l.has(h)||/\/product-page\//.test(h)||/\/store\//.test(h)){let w=VRe(A);w&&(c.addProduct(w),u=!0)}let m=A.meta.ogTitle||A.meta.title||A.slug,b=m.lastIndexOf(" | "),E=b>0?m.slice(0,b).trim():m,C;for(let w of A.jsonLd){let _=w.author;if(typeof _=="string"&&_){C=_;break}if(_&&typeof _=="object"&&typeof _.name=="string"){C=_.name;break}}return{title:E||A.slug,slug:A.slug,content:A.content,excerpt:A.meta.ogDescription||A.meta.description||"",date:A.extractedAt,seoTitle:A.meta.title,seoDescription:A.meta.description,mediaUrls:A.mediaUrls,qualityScore:A.qualityScore,author:C,jsonLd:A.jsonLd}}});return u&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),p}finally{await f()}}function UNt(e){return/wixsite\.com|wix\.com/i.test(e)}var WRe={id:"wix",detect:UNt,discover:ORe,extract:GRe};function YRe(e,t){return e.find(r=>r.id===t)??e.find(r=>r.id==="default")??null}var JRe=[x2e,M2e,V2e,sRe,pRe,IRe,xRe,FRe,WRe];function $Nt(e){return YRe(JRe,e)}function HNt(e){return{content:[{type:"text",text:JSON.stringify(e,null,2)}]}}function ZRe(e){return{content:[{type:"text",text:JSON.stringify({error:e})}],isError:!0}}var a1=new bB({name:"data-liberation",version:"0.1.0"},{capabilities:{tools:{}}});a1.setRequestHandler(wP,async()=>({tools:[{name:"liberate_detect",description:"Detect the platform of a website (GoDaddy Websites & Marketing, Hostinger, HubSpot, Shopify, Squarespace, Webflow, Weebly, Wix, or unknown)",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to detect"}},required:["url"]}},{name:"liberate_discover",description:"Inventory a website: fetch sitemap, categorize URLs, extract navigation structure",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to inventory"},token:{type:"string",description:"API token for platforms requiring auth"},cdpPort:{type:"number",description:"CDP port for browser-based extraction"},verbose:{type:"boolean",description:"Enable detailed logging"}},required:["url"]}},{name:"liberate_inspect",description:"Probe a site to assess extractability: detect platform, check sitemap, probe sample pages",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to inspect"},token:{type:"string",description:"API token if needed"},cdpPort:{type:"number",description:"CDP port for browser-based inspection"}},required:["url"]}},{name:"liberate_extract",description:"Extract all content from a website. Produces WXR file + media directory + redirect map.",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to extract"},outputDir:{type:"string",description:"Directory to write WXR, media, and logs"},token:{type:"string",description:"API token for platforms requiring auth (e.g. Webflow)"},cdpPort:{type:"number",description:"CDP port for browser-based extraction"},adminToken:{type:"string",description:"Shopify Admin API access token. When set, products are fetched via the Shopify Admin GraphQL API for richer data (compareAtPrice, inventoryPolicy, unitCost, collections, SEO metafields, variant images). Falls back to the public JSON API on failure."},shopDomain:{type:"string",description:"Shopify *.myshopify.com hostname. Usually auto-detected by liberate_discover from the storefront HTML; only pass explicitly if detection failed (e.g. Cloudflare-protected site)."},delay:{type:"number",description:"Delay between requests in ms (default: 500)"},resume:{type:"boolean",description:"Resume a previous extraction"},dryRun:{type:"boolean",description:"Extract 2-3 pages and report without writing WXR"},limit:{type:"number",description:"Cap extraction to the first N URLs and write a real WXR for them"},verbose:{type:"boolean",description:"Enable detailed per-page logging"},screenshots:{type:"boolean",description:"After extract completes, capture screenshots (desktop + mobile) for every processed URL. Results are written to output//screenshots/ with a manifest.json keyed by URL."},captureDesign:{type:"boolean",description:"Enable html-first design replication: carry source HTML+CSS as the page/post design. Note: full html-first design capture (site.css aggregation, blank theme install) runs via the CLI (`data-liberation --html-first`); this flag is reserved for future MCP support."},contentStatus:{type:"string",enum:["draft","publish"],description:'WXR post status for extracted pages/posts. Default "draft" \u2014 the documented "import as drafts; the user reviews and publishes manually" convention for a production import. The replica/preview flow (e.g. building a Studio replica) passes "publish" so imported nav targets resolve. Attachments always use "inherit".'}},required:["url","outputDir"]}},{name:"liberate_extract_one",description:"Extract a single URL through the streaming pipeline. Used by the watch loop and agent-driven streaming. Each call runs adapter discovery to set up state, then narrows to the target URL. Append-mode WXR \u2014 results accumulate in output.wxr across calls.",inputSchema:{type:"object",properties:{url:{type:"string",description:"The single URL to extract."},outputDir:{type:"string",description:"Liberation output directory. WXR + media + logs are appended here."},siteUrl:{type:"string",description:"Origin of the source site, used for adapter discovery. Defaults to the origin parsed from `url`."},token:{type:"string",description:"API token for platforms requiring auth (e.g. Webflow)."},cdpPort:{type:"number",description:"CDP port for browser-based extraction."},adminToken:{type:"string",description:"Shopify Admin API token (see liberate_extract)."},shopDomain:{type:"string",description:"Shopify *.myshopify.com hostname (see liberate_extract)."},delay:{type:"number",description:"Delay floor in ms."},verbose:{type:"boolean",description:"Per-step logging."},contentStatus:{type:"string",enum:["draft","publish"],description:'WXR post status for extracted pages/posts. Default "draft" (import-as-drafts convention); the replica/preview flow passes "publish". Attachments always use "inherit".'}},required:["url","outputDir"]}},{name:"liberate_paths",description:"Resolve where liberation output lives. Returns { base, siteDir }. base = the default output base (DLA_OUTPUT_DIR or /_liberations). siteDir = base/ when a url is given. Skills MUST use this instead of assuming output// relative to cwd.",inputSchema:{type:"object",properties:{url:{type:"string",description:"Optional source URL; when present, siteDir is returned."}}}},{name:"liberate_status",description:"Check progress of a running or completed extraction",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"The output directory of the extraction"}},required:["outputDir"]}},{name:"liberate_map_apis",description:"Map all API endpoints used by a website by navigating pages via CDP and capturing JSON network traffic. Produces a categorized endpoint catalog with sample responses and auth headers. Use during /adapt reconnaissance to reverse-engineer a new platform.",inputSchema:{type:"object",properties:{cdpPort:{type:"number",description:"Chrome DevTools Protocol port (e.g. 9222)"},url:{type:"string",description:"The URL of the site to map"},crawlUrls:{type:"array",items:{type:"string"},description:"Additional URLs to navigate (e.g. admin dashboard sections)"},followLinks:{type:"boolean",description:"Follow same-origin links from the main page (up to 20, default: false)"}},required:["cdpPort","url"]}},{name:"liberate_probe",description:"Probe a browser page via CDP for extraction-relevant data: window globals, JSON-LD, cookies, localStorage, network entries, and platform identity fields. Requires a running Chrome with --remote-debugging-port. Use for debugging extraction failures.",inputSchema:{type:"object",properties:{cdpPort:{type:"number",description:"Chrome DevTools Protocol port (e.g. 9222)"},url:{type:"string",description:"Only probe pages on this domain (optional \u2014 probes all tabs if omitted)"}},required:["cdpPort"]}},{name:"liberate_qa",description:"Compare extracted WXR content against the original source site page by page. Reports text similarity, missing headings/images/links, and grades each page (pass/warn/fail). Optionally patches fixable issues like missing alt text.",inputSchema:{type:"object",properties:{wxrFile:{type:"string",description:"Path to the WXR file to QA"},fix:{type:"boolean",description:"Patch fixable issues in the WXR (default: false)"}},required:["wxrFile"]}},{name:"liberate_verify",description:"Verify a completed extraction: check for stale CDN URLs, failed pages, missing media, and items needing manual attention",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"The output directory of the extraction to verify"}},required:["outputDir"]}},{name:"liberate_setup",description:"Validate WordPress connection: check site reachability, REST API, and authentication. Returns guidance if anything fails. Pass delegate: true to skip validation and receive a structured manifest describing what the import target needs \u2014 useful when the calling environment handles site setup itself.",inputSchema:{type:"object",properties:{site:{type:"string",description:"WordPress site domain (e.g. mysite.com or localhost:8881)"},username:{type:"string",description:"WordPress username"},token:{type:"string",description:"WordPress application password"},delegate:{type:"boolean",description:"Skip validation and return a setup manifest for the calling environment to handle. Use when the environment has its own site management (e.g. local dev tools)."}},required:[]}},{name:"liberate_import",description:"Import a WXR file into a WordPress site. Pass delegate: true to skip REST import and receive a structured import manifest \u2014 useful when the calling environment handles imports itself (e.g. local dev tools with direct database/CLI access).",inputSchema:{type:"object",properties:{wxrFile:{type:"string",description:"Path to the WXR file to import"},site:{type:"string",description:"WordPress site domain (e.g. example.com)"},username:{type:"string",description:"WordPress username"},token:{type:"string",description:"WordPress application password"},dryRun:{type:"boolean",description:"Preview without importing"},delay:{type:"number",description:"Delay between requests in ms (default: 500)"},only:{type:"string",description:"Only import specific type (categories, tags, media, pages, posts, comments, menus)"},verbose:{type:"boolean",description:"Enable detailed logging"},resume:{type:"boolean",description:"(deprecated \u2014 import is always idempotent, this flag has no effect)"},importAuthors:{type:"boolean",description:"Create WordPress users for each author in the WXR (default: false \u2014 all content owned by authenticated user)"},woocommerceKey:{type:"string",description:"WooCommerce consumer key for product import"},woocommerceSecret:{type:"string",description:"WooCommerce consumer secret for product import"},delegate:{type:"boolean",description:"Skip REST import and return a structured import manifest for the calling environment to handle."}},required:["wxrFile"]}},{name:"liberate_preview",description:"Spawn a local Studio preview of an extraction output. Returns { url, port, status, warnings }. Kills any existing preview on the same outputDir before starting. Optionally installs a generated replica theme + block plugins via themeFiles[] + blockPlugins[]; the theme is activated after content import. Used by the replicate skill in Step 5 (Install).",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Path to the extraction output directory (contains output.wxr)."},open:{type:"boolean",description:"If true, open the URL in the default browser after readiness."},port:{type:"number",description:"Override the auto-picked port (default range: 9400-9499)."},themeFiles:{type:"array",description:'Generated replica theme files. Each entry is { relativePath, content } rooted at the theme directory (e.g. relativePath: "templates/index.html"). Theme is written to wp-content/themes// and activated after content import.',items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}},blockPlugins:{type:"array",description:"DEPRECATED \u2014 embed custom blocks inside the theme at blocks//{src,build}/ via themeFiles[] instead (Telex blocks-inside-themes pattern, registered from functions.php). Kept for backwards compatibility. Each entry is { slug, files: [{relativePath, content}] }; plugin is written to wp-content/plugins// and activated.",items:{type:"object",properties:{slug:{type:"string"},files:{type:"array",items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}}},required:["slug","files"]}},themeSlug:{type:"string",description:"Theme directory name (kebab-case). Required when themeFiles is non-empty. Conventionally -replica."}},required:["outputDir"]}},{name:"liberate_install_theme",description:"Install replica theme files + block plugins into an ALREADY-RUNNING Studio site (no site creation, no content import). Use this from the streaming watch loop's theme-piece / archetype-template judgments \u2014 `liberate_preview` would create a `-2` duplicate Studio site and re-import content over the streamed posts. Writes to /wordpress/wp-content/{themes,plugins}/, then runs `studio wp plugin activate` and `studio wp theme activate`. Returns warnings[] for non-fatal activate failures.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Path to the extraction output directory (used for log routing only \u2014 files are written to studioSitePath, not outputDir)."},studioSitePath:{type:"string",description:"On-disk path to the running Studio site (parent dir, NOT the wordpress sub-dir). Streaming watch logs this as `preview-pre-started.sitePath`."},themeFiles:{type:"array",description:"Replica theme files. Same shape as liberate_preview \u2014 { relativePath, content }, rooted at the theme directory. Activated after writing.",items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}},blockPlugins:{type:"array",description:"DEPRECATED \u2014 kept for backwards compatibility. New replica work should embed custom blocks inside the theme at blocks//{src,build}/ via themeFiles[], following the Telex blocks-inside-themes pattern. The skill registers them from functions.php. Each plugin entry is { slug, files: [{relativePath, content}] }, activated after writing.",items:{type:"object",properties:{slug:{type:"string"},files:{type:"array",items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}}},required:["slug","files"]}},themeSlug:{type:"string",description:"Theme directory name (kebab-case). Required when themeFiles is non-empty. Conventionally -replica."}},required:["outputDir","studioSitePath"]}},{name:"liberate_theme_scaffold",description:"Read /design-foundation.json and emit a complete-and-activatable WordPress block theme bundle deterministically: style.css (theme header), theme.json (settings/styles mapped from foundation tokens), functions.php (theme setup + custom-block registration loop), templates/index.html (homepage shell with header part + post-content + footer part), parts/header.html (site-title + page-list nav), parts/footer.html (copyright). No agent reasoning, no vision, no LLM call \u2014 pure deterministic mapping. Pair with `liberate_install_theme` to install the result into a running Studio site. Per-archetype templates (page.html, single.html, etc.) and patterns are NOT emitted here \u2014 they belong to the replicate skill's archetype-template tick.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (must contain design-foundation.json)."},themeSlug:{type:"string",description:"Theme directory slug (kebab-case). Conventionally -replica."},themeName:{type:"string",description:"Display name. Defaults to themeSlug."},siteTitle:{type:"string",description:"Source site title \u2014 used in style.css description and footer copyright."},themeDescription:{type:"string",description:"Override the default style.css Description line."},sourceUrl:{type:"string",description:"The source site origin (e.g. https://www.example.com/). Used to resolve the captured header/footer chrome links to absolute URLs so they remap to local permalinks (without it, nav hrefs are not remapped and point off-site). Defaults to a placeholder origin."},persist:{type:"boolean",description:"When true, also write the emitted text theme files to /theme (alongside the font/logo assets always written there), materializing a complete on-disk theme. Default false: themeFiles[] is returned for the caller to install into a live site."},reconstructedPages:{type:"array",description:"Block-reconstructed content pages. Each entry emits templates/page-.html wiring the page to its reconstructed pattern (and front-page.html for isHome), so the page renders block sections instead of falling through page.html to raw carried post_content. The pattern files (reconstructed block markup) are added to themeFiles[] separately by the replicate skill.",items:{type:"object",properties:{slug:{type:"string",description:'Source-faithful WP page slug (last path segment), e.g. "about-us".'},patternSlug:{type:"string",description:'Fully-qualified theme pattern slug, e.g. "/page-about-us".'},isHome:{type:"boolean",description:"When true, also emit templates/front-page.html for this page (static front page)."}},required:["slug","patternSlug"]}}},required:["outputDir","themeSlug"]}},{name:"liberate_blockify_wxr",description:"BULK blog-body block conversion (blocks reconstruct path ONLY). Rewrites every post/page content:encoded body in output.wxr through the source platform adapter's block recipe (seam 2) so imported posts land as editable Gutenberg blocks instead of one Classic block (e.g. Squarespace sqs-block bodies). Lossless: bodies the recipe can't convert are left verbatim, and all other items (attachments, nav menu items, comments, terms) are preserved unchanged. No-op when the platform adapter has no block recipe. Resolves the platform from session.json (recorded at extraction); pass `platform` to override. Run AFTER extraction and BEFORE liberate_import. The theme/carry path must NOT call this.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory holding output.wxr + session.json."},wxrPath:{type:"string",description:"Override the WXR path. Defaults to /output.wxr."},platform:{type:"string",description:"Override the platform adapter id (else read from session.json)."}},required:["outputDir"]}},{name:"liberate_reconstruct_pages",description:"Deterministically reconstruct EVERY content page from its OWN captured section specs. For each page: capture specs, install section media, reconstruct verbatim block markup, GATE through validate_artifacts, write the pattern + reconstructed post_content. Page TEMPLATES are collapsed to a small set of variant templates (templates/page-replica[-].html) registered in theme.json customTemplates and assigned per page via _wp_page_template; output.wxr is patched to match. Set collapseTemplates:false to fall back to one templates/page-.html per page. The theme shell must already be installed via liberate_theme_scaffold/install.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (holds media/ + media-stubs.json)."},studioSitePath:{type:"string",description:"On-disk path to the running Studio site (e.g. ~/Studio/example-com)."},themeSlug:{type:"string",description:"Installed theme slug. Defaults to -replica derived from outputDir."},collapseTemplates:{type:"boolean",description:"Collapse per-page templates into variant-keyed templates + _wp_page_template assignments (default true). false = one template per page (legacy)."},variationHoist:{type:"boolean",description:"Hoist recurring instance-style constellations into theme block-style variations (default true). Set false to disable (escape hatch)."},editableIslands:{type:"boolean",description:"Convert the coverage-gated core/html fallback islands into in-canvas dla/editable-html blocks (visible + styled + text/image-editable in the block editor; ships + activates the block plugin). Default true. Set false to keep plain core/html."},pages:{type:"array",description:"Content pages to reconstruct. Reconstruct every page (not just cluster reps).",items:{type:"object",properties:{slug:{type:"string",description:'Source-faithful WP page slug (sanitize_title-shaped), e.g. "about-us".'},sourceUrl:{type:"string",description:"The page's source URL to capture + reconstruct."},title:{type:"string",description:"Human-readable page title (pattern doc-comment)."},isHome:{type:"boolean",description:"When true, also emit front-page.html."}},required:["slug","sourceUrl","title"]}}},required:["outputDir","studioSitePath","pages"]}},{name:"liberate_reconstruct_pages_carry",description:"Carry-and-scope parity path: for each page, load cached body HTML (or fetch live), collect CSS, carry the sanitized HTML + scoped CSS into core/html block islands, self-host the run media (rewriting /srcset/url() to the local WP library) + localize internal links, write a carry FSE block theme under wp-content/themes/-carry (incl. WooCommerce single-product/archive-product templates wrapping the carried header/footer when the run has products), and return per-page islands for building output-carry.wxr. Requires liberate_screenshot (html/ cache); falls back to live fetch. Pass islandsOutDir to write islands to disk and return paths instead of inline content (avoids the MCP response-size cap on large sites).",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (holds html/ cache from liberate_screenshot)."},studioSitePath:{type:"string",description:"On-disk path to the running Studio site (e.g. ~/Studio/example-com)."},themeName:{type:"string",description:'Display name for the carry theme (default: "Liberated (Carry)").'},islandsOutDir:{type:"string",description:"When set, write each carried island to /.html and return its path + byte count instead of inline postContent. Use this from MCP to avoid the response-size cap (islands are whole page bodies). Omit to get postContent inline (the tsx driver default)."},editableIslands:{type:"boolean",description:"Emit carried bodies as in-canvas dla/editable-html blocks (visible + styled + text/image-editable in the block editor) instead of sandboxed core/html islands. Front-end output is byte-identical (static save). Ships + activates the block plugin. Default true; set false to force plain core/html."},pages:{type:"array",description:"Content pages to carry and scope. Pass every page in the site for full coverage.",items:{type:"object",properties:{slug:{type:"string",description:'URL-safe page slug (sanitize_title-shaped), e.g. "about-us". Must match the WP post_name so the island-swap finds the post and functions.php body-class scoping targets it.'},sourceUrl:{type:"string",description:"The page's source URL (used as base for CSS resolution and live HTML fallback)."},title:{type:"string",description:"Human-readable page title."},isHome:{type:"boolean",description:"When true, emits front-page.html template and uses is_front_page() body-class condition."},postType:{type:"string",enum:["page","post"],description:'Post type (default "page"). "post" scopes via is_single() and renders through single.html; also selects the functions.php body-class condition.'},htmlSlug:{type:"string",description:'Override the cached-HTML filename stem loaded as html/.html when it differs from the WP slug \u2014 e.g. posts captured as "blogs--snoozweek--" or pages as "pages--". Falls back to slug; without it the tool live-fetches sourceUrl.'}},required:["slug","sourceUrl","title"]}}},required:["outputDir","studioSitePath","pages"]}},{name:"liberate_screenshot",description:"Capture full-page + scrolled screenshots (desktop + mobile) and rendered HTML for every URL on a site. Writes to /screenshots/ and /html/, plus palette.json, typography.json, breakpoints.json, and computed-styles.json via DOM/CSS site-analysis. Reuses sitemap discovery or accepts explicit urls[].",inputSchema:{type:"object",properties:{url:{type:"string",description:"Site URL (used for sitemap discovery and same-origin enforcement)"},outputDir:{type:"string",description:"Output directory"},urls:{type:"array",items:{type:"string"},description:"Explicit URL list (skips sitemap fetch; all must share origin with `url` if both provided)"},types:{type:"array",items:{type:"string"},description:"Filter by URL type: page, post, product, homepage, gallery, event"},limit:{type:"number",description:"Cap to first N URLs"},concurrency:{type:"number",description:"Parallel URL captures (default 3, max 10)"},browserRestartEvery:{type:"number",description:"Close and relaunch browser every N URLs (default 100)"},cdpPort:{type:"number",description:"Connect to existing Chrome via CDP"},force:{type:"boolean",description:"Re-capture even if output files already exist"},verbose:{type:"boolean",description:"Per-URL progress logging"}},required:["url","outputDir"]}},{name:"liberate_data_model_scaffold",description:"Deterministic pre-pass for the JS-data path: reads an owned local site dir, discovers record arrays / mount containers / id-lookups by AST (resilient to malformed/vendored JS files), infers field roles, and writes a PARTIAL data-model.draft.json. Returns { model, skillTodos, discovered, validation }. The model-local-data skill fills only the skillTodos (card.template, ambiguous ordering, low-confidence role guesses), then writes the final data-model.json. Run before liberate_convert_local_site when the source renders content from a JS data array.",inputSchema:{type:"object",properties:{dir:{type:"string",description:"Absolute path to the local static-site directory."},outputDir:{type:"string",description:"Where data-model.draft.json is written. Defaults to dir."}},required:["dir"]}},{name:"liberate_design_foundation_scaffold",description:"Runs the deterministic scaffold on a liberation output directory: reads palette.json / typography.json / breakpoints.json / screenshots/manifest.json from SP1 output, applies pure rules (darkest high-frequency \u2192 text.default, lightest \u2192 surface.base, breakpoint tier mapping, gradient regex extraction from html/*.html), and returns a PartialDesignFoundation. Empty role slots are left for the design-foundations skill to assign. Emits skillTodos listing every path the skill must fill. The design-foundations skill may additionally read computed-styles.json for HTML/CSS role assignment.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (must contain SP1 files)."},origin:{type:"string",description:"Origin URL (e.g. https://example.com). Stored in the foundation `origin` field."}},required:["outputDir","origin"]}},{name:"liberate_design_foundation_validate",description:"Validates a design-foundation JSON blob against the schema. Returns { ok: true } or { ok: false, errors: [...] }. Used by the design-foundations skill after filling role slots to catch structural mistakes and unfilled skillTodos before saving to disk.",inputSchema:{type:"object",properties:{foundation:{type:"object",description:"JSON blob to validate (not a path)."}},required:["foundation"]}},{name:"liberate_design_foundation_save",description:"Persists a validated design-foundation JSON to disk and generates the human-readable design-foundation.md companion. Writes both files atomically to outputDir. Skips write when inputsDigest matches prior file (unless force=true).",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Destination directory."},foundation:{type:"object",description:"Complete design foundation JSON blob."},force:{type:"boolean",description:"Overwrite even if inputsDigest matches prior file."}},required:["outputDir","foundation"]}},{name:"liberate_media_install",description:"Install one URL's pending media into the running replica WP site. Idempotent: skips media already registered as attachments (tracked via MediaStubStore.wpPostId). Uses `studio wp eval-file` to run a vendored PHP installer script.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (contains media-stubs.json + media/)."},url:{type:"string",description:"Source URL whose media we are installing (used for logging; the install acts on all pending media in MediaStubStore)."},target:{type:"object",description:'Where to install the media. Studio: { kind: "studio", sitePath: "/Users/.../Studio/site-name" }.',properties:{kind:{type:"string",enum:["studio"]},sitePath:{type:"string"},siteUrl:{type:"string",description:"Optional site URL used to compute browser-visible upload URLs."}},required:["kind","sitePath"]}},required:["outputDir","url","target"]}},{name:"liberate_replicate_tick",description:"Run one tick of the replicate streaming scheduler. Reads replicate-state.json, computes deltas (new archetypes since last tick, foundation drift), returns judgmentNeeded[] markers describing what skills the calling agent should invoke (replicate, design-foundations, compose-page-blocks). The MCP tool is deterministic \u2014 it does not invoke skills directly.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory."},reason:{type:"string",description:"Optional reason override (manual / new-archetype / periodic / foundation-drift). Defaults to inferred."}},required:["outputDir"]}},{name:"liberate_block_transform_apply",description:"Apply composed block markup to a post in the running replica site. Validates: parse_blocks roundtrip + output-verify text-substring check + post-existence poll (3 retries with backoff). Idempotent via block-transform-log.jsonl (same source+output hashes skip re-apply). Studio path uses `wp post update` via studio CLI.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (block-transform-log.jsonl lives here)."},url:{type:"string",description:"Source URL (post is matched via _source_url meta in the replica)."},blocks:{type:"string",description:"Composed block markup to apply as post_content."},sourceHtml:{type:"string",description:"Original sanitized source HTML \u2014 passed to output-verify for text-substring validation."},target:{type:"object",description:'Replica site target. Studio: { kind: "studio", sitePath: "..." }.',properties:{kind:{type:"string",enum:["studio"]},sitePath:{type:"string"},siteUrl:{type:"string"}},required:["kind"]},composedBy:{type:"string",description:'Provenance string for the log entry (e.g. "compose-page-blocks@v1.0" or "heuristic@v1.0").'}},required:["outputDir","url","blocks","sourceHtml","target"]}},{name:"liberate_block_compose",description:"Validate composed block markup and write it to a sidecar file (/composed/.blocks.html) for the streaming watch loop to install as post_content. Compose-then-install counterpart to liberate_block_transform_apply: same parse_blocks roundtrip + output-verify validation, same block-transform-log.jsonl idempotency, but NO database write. The runner reads the sidecar after the agent returns and passes the contents to wp_insert_post via contentOverride, so the very first DB write of each post carries block markup (not raw HTML that gets transformed afterward). Use this in the streaming watch loop's compose-page-blocks judgment; reach for liberate_block_transform_apply only for re-composing already-imported posts.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (sidecar lives at /composed/, log is block-transform-log.jsonl)."},url:{type:"string",description:"Source URL \u2014 used for log entries and as the manifest lookup key when sourceHtml is omitted."},slug:{type:"string",description:"Post slug \u2014 determines the sidecar filename (composed/.blocks.html). Must match the WxrItem.slug the runner buffered."},blocks:{type:"string",description:"Composed block markup. Validated for parse_blocks roundtrip and against sourceHtml for text-substring containment."},sourceHtml:{type:"string",description:"Sanitized source HTML used for anti-hallucination output-verify. Optional \u2014 falls back to /screenshots/manifest.json lookup."},composedBy:{type:"string",description:'Provenance string for the log entry (default "compose-page-blocks@v1.0").'},source:{type:"string",enum:["heuristic","ai"],description:'Compose source flavour for the log entry (default "ai").'}},required:["outputDir","url","slug","blocks"]}},{name:"liberate_replicate_inventory",description:"Read a liberation outputDir and return a structured archetype inventory: counts per archetype (homepage/page/post/product/gallery/event), up to 3 representative URLs per archetype with their screenshot+html paths (selected by largest HTML \u2014 proxy for section count), product count from products.jsonl, and presence of design-foundation.json. Used by the replicate skill in Step 1 (Inventory). Throws when output.wxr is missing.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (must contain output.wxr)."}},required:["outputDir"]}},{name:"liberate_replicate_verify",description:"Capture replica screenshots at given URLs (desktop + mobile by default) against a running replica WP install and pair each viewport with the matching source screenshot from screenshots/manifest.json. Returns a structured pairing manifest the calling agent (vision-capable) uses for side-by-side comparison. Used by the replicate skill in Step 6 (Verify). Replica screenshots are written to ///.png \u2014 same shape as the source layout.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (contains screenshots/manifest.json and the source screenshots/)."},replicaBaseUrl:{type:"string",description:"Base URL of the running replica (e.g. https://my-site-replica.wp.local or http://localhost:8881). No trailing slash."},urls:{type:"array",items:{type:"string"},description:'Path-only URLs to verify (e.g. ["/", "/blog/post-1"]).'},viewports:{type:"array",items:{type:"string",enum:["desktop","mobile"]},description:'Viewports to capture. Default: ["desktop", "mobile"].'},outputSubdir:{type:"string",description:'Where in outputDir to write replica screenshots. Default: "replica-screenshots". Files land at //.png.'},cdpPort:{type:"number",description:"Connect to existing Chrome via CDP (otherwise launches a new browser)."}},required:["outputDir","replicaBaseUrl","urls"]}},{name:"liberate_refine_report",description:"Validate refine coverage for one page: reads /refine//*.json (one file per section, written by match-section) and enforces that EVERY finding id appears in exactly one of applied[]/skipped[]. Fails loudly, naming unaccounted IDs. match-page must not mark a page done until this passes.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (contains refine// written by match-section)."},slug:{type:"string",description:"Page slug whose refine// directory to validate."}},required:["outputDir","slug"]}},{name:"liberate_compare",description:"Pixel-parity scorer (fixed viewport). Joins an origin screenshots dir to a replica screenshots dir by URL pathname, crops both full-page PNGs to the top 1440\xD7900 / 390\xD7844 region, and returns per-pathname desktop/mobile similarity scores (1 \u2212 diffPixels/total). Writes comparison.json (v2 with originHeight/replicaHeight/heightMismatchRatio per viewport) + diff PNGs into the replica dir. Writes magenta-padded .padded.png diff when height mismatch exceeds 2%. Both dirs must have the standard layout: manifest.json + desktop/.png + mobile/.png.",inputSchema:{type:"object",properties:{originDir:{type:"string",description:"Origin screenshots dir (manifest.json + desktop/ mobile/)."},replicaDir:{type:"string",description:"Replica screenshots dir, same layout. comparison.json + diff/ are written here."},viewports:{type:"array",items:{type:"string",enum:["desktop","mobile"]},description:"Viewports to score. Default: both."},diffOutputDir:{type:"string",description:"Where to write diff PNGs. Default: /diff."},floor:{type:"number",description:"Pass/fail score floor used for repair-tasks.json records. Default 0.99."},maxHeightDelta:{type:"number",description:"Height-gate tolerance in capture px (pre-crop |originH - replicaH|). Default 8."}},required:["originDir","replicaDir"]}},{name:"liberate_ingest_local_site",description:"Stage 1a of the owned-source path: ingest a local static-site directory (HTML/CSS/JS) and normalize each page into validated native Gutenberg block markup. Writes /composed/.blocks.html sidecars + /normalize-report.json. No Playwright/Studio. Downstream theme-scaffold/install/compare stages consume the sidecars.",inputSchema:{type:"object",properties:{dir:{type:"string",description:"Absolute path to the local static-site directory to ingest."},outputDir:{type:"string",description:"Liberation output directory for composed sidecars + normalize-report.json. Defaults to `dir`."},nativeBehaviors:{type:"boolean",description:"Detect catalog behaviors in the source css/js and emit dla/* Interactivity wrappers in the sidecars instead of core/group: uniform dla/reveal plus per-section DOM patterns (dla/tabs, dla/slider, dla/modal \u2014 verbatim inner markup). liberate_convert_local_site threads its own flag through here."}},required:["dir"]}},{name:"liberate_convert_local_site",description:"Stage 1b+1c of the owned-source path: full local-static-site \u2192 live Studio site. Reuses liberate_ingest_local_site (sidecars + normalize-report), optionally captures the source design (palette/typography/screenshots) and self-hosts Google Fonts, assembles the local block theme (core/navigation header from the nav graph, foundation-styled footer, no-title page templates), writes + activates it, creates WP Pages from the sidecars (idempotent via _source_url), sets the front page, assigns the page-local template, and optionally captures the WP replica + scores parity.",inputSchema:{type:"object",properties:{dir:{type:"string",description:"Absolute path to the local static-site directory."},studioSitePath:{type:"string",description:"Studio site path on host (e.g. ~/Studio/my-site \u2014 the dir studio site list prints, not wp-root)."},createSite:{type:"boolean",description:"Provision the Studio site via `studio site create` when none exists at studioSitePath (idempotent \u2014 an existing site is reused). Default false (errors if the site is absent). Admin creds via env WP_ADMIN_USER/WP_ADMIN_PASS; omitted \u2192 Studio auto-generates."},outputDir:{type:"string",description:"Liberation output dir for sidecars + reports. Defaults to `dir`."},themeSlug:{type:"string",description:"Theme slug (kebab-case). Default: local-site-theme."},siteTitle:{type:"string",description:"Site title for header/footer. Default: home page ."},skipDesign:{type:"boolean",description:"Skip source design capture (tokens/fonts) and compare; theme uses default styling."},skipCompare:{type:"boolean",description:"Skip the WP-replica screenshot + parity compare stage."},wpUrl:{type:"string",description:"Base URL for replica capture. Default: auto-resolved via wp option get siteurl (Studio assigns random ports); explicit value overrides."},carryCss:{type:"boolean",description:"Carry the source stylesheet into the theme (adapted for the block DOM). Default true \u2014 the stage-1d parity mechanism; tokens-only theming when false."},carryJs:{type:"boolean",description:"Carry the source scripts into the theme (enqueued footer, html.js gate added). Default true for identical replication."},nativeBehaviors:{type:"boolean",description:"Replace carried source JS with native Interactivity blocks (reveal, sticky, plus per-section tabs/slider/modal with verbatim inner markup); unmapped behaviors land in behavior-gaps.json. Forces carryJs off."},editableIslands:{type:"boolean",description:"Convert carried core/html islands into editable dla/editable-html blocks (text+image bindable, static-save, render-anywhere). Default true; set false to force plain core/html."},dataModel:{type:"boolean",description:"WordPress-driven data path: when a data-model.json (from the model-local-data skill) is present in outputDir/dir, register a CPT+taxonomy via generated mu-plugins, insert items idempotently, and replace empty JS-mount grids with native core/query loops (dla/data-card cards) while neutralizing the JS data-mounts and rebinding modal lookups to per-card DOM islands. Default on when the file exists; pass false to force off."},repair:{type:"boolean",description:"Deterministic parity repair loop: diff regions \u2192 computed-style probe \u2192 generated parity-patch.css \u2192 re-compare, bounded. Default true. No AI involved."},maxRepairRounds:{type:"number",description:"Max repair rounds (0-5). Default 2. Loop also stops early on allPass or an unchanged divergence fingerprint."},failOnConservationRailDrop:{type:"boolean",description:"Opt-in hard fail for local region-audit conservation: when true, unassigned nav/complementary rails with at least two links set isError. Default false (warn-only)."}},required:["dir","studioSitePath"]}},...JSON.parse(JSON.stringify(Object.entries(f2e).map(([e,t])=>({name:e,...t}))))]}));var jNt={liberate_compare:f_e,liberate_data_model_scaffold:wke,liberate_design_foundation_save:Fke,liberate_design_foundation_scaffold:Ike,liberate_design_foundation_validate:_ke,liberate_detect:Jee,liberate_discover:ete,liberate_block_transform_apply:eCe,liberate_block_compose:rCe,liberate_extract:hEe,liberate_extract_one:AEe,liberate_media_install:TEe,liberate_replicate_tick:HEe,liberate_import:qCe,liberate_inspect:tte,liberate_map_apis:ACe,liberate_preview:wwe,liberate_install_theme:Swe,liberate_theme_scaffold:ZIe,liberate_probe:yCe,liberate_qa:fCe,liberate_replicate_inventory:qke,liberate_replicate_verify:Zke,liberate_refine_report:d2e,liberate_screenshot:aBe,liberate_setup:vCe,liberate_paths:YCe,liberate_status:zCe,liberate_verify:CCe,liberate_cluster_pages:A_e,liberate_section_extract:g_e,liberate_compose_instantiate:m_e,liberate_ingest_local_site:xD,liberate_convert_local_site:a2e,liberate_validate_artifacts:c2e,liberate_reconstruct_pages:G1e,liberate_reconstruct_pages_carry:iBe,liberate_blockify_wxr:oBe};function qNt(){return{adapters:JRe,findAdapter:$Nt,textResult:HNt,errorResult:ZRe,server:a1}}a1.setRequestHandler(gb,async e=>{let{name:t,arguments:r}=e.params,n=jNt[t];return n?n(r??{},qNt()):ZRe(`Unknown tool: ${t}`)});async function zNt(){let e=new CB,t=async()=>{await a1.close(),process.exit(0)};process.on("SIGINT",t),process.on("SIGTERM",t),await a1.connect(e)}zNt().catch(e=>{console.error(e),process.exit(1)}); +`;function YRe(){return{title:"",description:"",ogTitle:"",ogDescription:"",ogImage:"",canonical:""}}function JRe(e){let t=new Set,n=JSON.stringify({apiCalls:e.apiCalls,globals:e.globals,jsonLd:e.jsonLd}).match(/https?:\/\/[^"'\s]*(?:wixstatic\.com|wixmp\.com)[^"'\s]*/g)||[];for(let o of n)t.add(o);for(let o of e.jsonLd){let a=o;if(typeof a.image=="string"&&t.add(a.image),Array.isArray(a.image))for(let c of a.image)typeof c=="string"&&t.add(c),typeof c=="object"&&c&&typeof c.url=="string"&&t.add(c.url);typeof a.thumbnailUrl=="string"&&t.add(a.thumbnailUrl)}if(e.meta.ogImage&&t.add(e.meta.ogImage),e.pageHtml){let o=e.pageHtml.match(/<img[^>]+src=["']([^"']+)["']/gi)||[];for(let c of o){let u=c.match(/src=["']([^"']+)["']/i);u?.[1]&&u[1].startsWith("http")&&t.add(u[1])}let a=e.pageHtml.match(/url\(["']?(https?:\/\/[^"')]+)["']?\)/gi)||[];for(let c of a){let u=c.match(/url\(["']?(https?:\/\/[^"')]+)["']?\)/i);u?.[1]&&t.add(u[1])}}let i=Mr,s=/wixstatic\.com|wixmp\.com|parastorage\.com|images\.unsplash\.com|cdn\.shopify\.com/i;return[...t].filter(o=>{try{let a=new URL(o);return i.test(a.pathname)||s.test(a.hostname)}catch{return!1}})}function ZRe(e){for(let t of e){let r=t,n=r["@type"];if(!(n==="BlogPosting"||n==="Article"||n==="NewsArticle"||Array.isArray(n)&&n.some(o=>o==="BlogPosting"||o==="Article"||o==="NewsArticle")))continue;let s=r.image;if(typeof s=="string")return s;if(s&&typeof s=="object"&&!Array.isArray(s)){let o=s.url;if(typeof o=="string")return o}if(Array.isArray(s))for(let o of s){if(typeof o=="string")return o;if(o&&typeof o=="object"){let a=o.url;if(typeof a=="string")return a}}}return null}function MG(e,t=0){if(t>8||e==null||typeof e=="string"||typeof e!="object")return null;let r=e,n=["html","richText","body","content","text","plainText"];for(let i of n){let s=r[i];if(typeof s=="string"&&s.length>50&&s.includes("<"))return s}if(Array.isArray(e))for(let i of e){let s=MG(i,t+1);if(s)return s}else for(let i of Object.values(r)){let s=MG(i,t+1);if(s)return s}return null}function KRe(e){for(let n of e.apiCalls){let i=MG(n.data);if(i&&i.length>50){let s=i.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<noscript[\s\S]*?<\/noscript>/gi,"").replace(/<link\b[^>]*\/?>/gi,"").replace(/<meta\b[^>]*\/?>/gi,"").trim();if(s.length>50&&/<[a-z][\s\S]*>/i.test(s))return{content:i,qualityScore:"high"}}}if(e.renderedContent&&e.renderedContent.length>30)return{content:e.renderedContent,qualityScore:"high"};let t=new Set(["Article","BlogPosting","NewsArticle","SocialMediaPosting","Product","ItemPage","Event","Recipe","Course","Book","Movie"]);for(let n of e.jsonLd){let i=n;if(typeof i.articleBody=="string"&&i.articleBody.length>50)return{content:`<p>${i.articleBody}</p>`,qualityScore:"medium"};let s=i["@type"];if(typeof s=="string"&&t.has(s)&&typeof i.description=="string"&&i.description.length>50)return{content:`<p>${i.description}</p>`,qualityScore:"medium"}}let r=e.meta.ogDescription||e.meta.description||"";if(r.length>50)return{content:`<p>${r}</p>`,qualityScore:"medium"};if(e.accessibility&&e.accessibility.length>0){let n=[];for(let i of e.accessibility)i.role==="heading"?n.push(`<h2>${i.name}</h2>`):i.name&&n.push(`<p>${i.name}</p>`);if(n.length>0)return{content:n.join(` +`),qualityScore:"low"}}return{content:"",qualityScore:"low"}}function PG(e){let t=new Set,r=/https?:\/\/[a-z0-9.-]*(?:wixstatic\.com|wixmp\.com)\/media\/[^\s"'()<>\\]+/gi;for(let h of e.match(r)||[])t.add(h);let n=/[a-z0-9]{4,}_[a-f0-9]{32}~mv2\.(?:jpe?g|png|gif|webp|avif)/gi;for(let h of e.match(n)||[])t.add(`https://static.wixstatic.com/media/${h}`);let i=new Map;for(let h of t){let A=h.match(/\/media\/([a-z0-9]{4,}_[a-f0-9]{32}~mv2\.[a-z0-9]+)/i)?.[1],g=A??h;i.get(g)?A&&h.endsWith(A)&&i.set(g,`https://static.wixstatic.com/media/${A}`):i.set(g,h)}let s=[...i.values()],o=e.match(/<meta[^>]+property=["']og:title["'][^>]+content=["']([^"']+)["']/i)?.[1],a=e.match(/<title[^>]*>([\s\S]*?)<\/title>/i)?.[1]?.trim(),c=(o||a||"").trim(),u=c.lastIndexOf(" | "),l=u>0?c.slice(0,u).trim():c,d=[],f=e.match(/<meta[^>]+property=["']og:description["'][^>]+content=["']([^"']*)["']/i)?.[1]?.trim();for(let h of e.match(/<h[1-3][^>]*>([\s\S]*?)<\/h[1-3]>/gi)||[]){let A=h.replace(/<[^>]+>/g,"").trim(),g=h.match(/<(h[1-3])/i)?.[1]?.toLowerCase()||"h2";if(A&&A.length<200&&d.push(`<${g}>${A}</${g}>`),d.length>=12)break}f&&f.length>0&&d.unshift(`<p>${f}</p>`);let p=d.join(` +`);return{title:l,content:p,mediaUrls:s}}zi();Su();var ka=3e4;async function XRe(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(2e4),headers:{"User-Agent":"Mozilla/5.0 (compatible; DataLiberation/1.0)"}});return t.ok?await t.text():(await t.body?.cancel(),"")}catch{return""}}async function eQe(e,t){let r=e,n=async(b,C)=>{try{await r.waitForLoadState("networkidle",{timeout:b})}catch{}await r.waitForTimeout(C)},i=async b=>{try{return await dr(r.evaluate(b),ka,"wix evaluate")}catch(C){if(!DG(C))throw C;return await n(8e3,1500),await dr(r.evaluate(b),ka,"wix evaluate")}},s={apiCalls:[]},o=async b=>{let C=b,E=C.url();if(!(!(C.headers()["content-type"]||"").includes("application/json")||!(E.includes("/_api/")||E.includes("wixapis.com")||E.includes("wix.com/_api"))))try{let _=await C.json();s.apiCalls.push({url:E,data:_})}catch{}};r.on("response",o);try{try{await dr(r.addInitScript(NG),ka,"wix addInitScript")}catch{}try{await r.goto(t,{waitUntil:"domcontentloaded",timeout:3e4}),await n(6e3,4e3);try{await dr(r.evaluate(async()=>{let C=document.documentElement.scrollHeight;for(let E=0;E<C;E+=800)window.scrollTo(0,E),await new Promise(w=>setTimeout(w,120));window.scrollTo(0,0)}),6e4,"wix lazy-load scroll"),await n(3e3,500)}catch{}}catch{}}finally{r.off("response",o)}let a=!1,c;try{c=await i(()=>{let b={},C=["__WIX_DATA__","__SITE_DATA__","wixBiSession","__wixInjectedPageData"],E=window;for(let _ of C)E[_]&&(b[_]=E[_]);for(let _ of Object.keys(window))if((_.startsWith("__WIX")||_.startsWith("_wix"))&&!b[_])try{b[_]=E[_]}catch{}let w=Array.from(document.querySelectorAll('script[type="application/ld+json"]')).map(_=>{try{return JSON.parse(_.textContent||"")}catch{return null}}).filter(Boolean),T={title:document.title,description:document.querySelector('meta[name="description"]')?.content||"",ogTitle:document.querySelector('meta[property="og:title"]')?.content||"",ogDescription:document.querySelector('meta[property="og:description"]')?.content||"",ogImage:document.querySelector('meta[property="og:image"]')?.content||"",canonical:document.querySelector('link[rel="canonical"]')?.href||""};return{globals:b,jsonLd:w,meta:T}})}catch{c={globals:{},jsonLd:[],meta:YRe()},a=!0}let u=null;try{u=await i(()=>{let b=document.querySelector("main")||document.querySelector("#PAGES_CONTAINER")||document.querySelector("#SITE_PAGES");if(!b)return null;let C=b.querySelectorAll('[data-testid="richTextElement"]');if(C.length===0)return null;let E=[],w=new Set;return C.forEach(_=>{let D=_.querySelectorAll("h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote");if(D.length>0)D.forEach(k=>{let v=k.innerText?.trim();if(!v||w.has(v))return;w.add(v);let M=k.tagName.toLowerCase();M.startsWith("h")?E.push(`<${M}>${v}</${M}>`):M==="ul"||M==="ol"?E.push(k.outerHTML):M==="blockquote"?E.push(`<blockquote>${v}</blockquote>`):E.push(`<p>${v}</p>`)});else{let k=_.innerText?.trim();k&&!w.has(k)&&(w.add(k),E.push(`<p>${k}</p>`))}}),b.querySelectorAll('img[src*="wixstatic"], img[src*="wixmp"], [data-testid="image"] img').forEach(_=>{let D=_.src,k=_.alt||"";D&&!w.has(D)&&(w.add(D),E.push(`<img src="${D}" alt="${k}" />`))}),E.length>0?E.join(` +`):null})}catch{}let l=null;try{await i(()=>!!document.querySelector('[data-hook="feed-page-root"]'))&&(l="blog_archive")}catch{}let d=null,f=null;try{f=await dr(r.context().newCDPSession(e),ka,"wix CDP session",E=>{E.detach().catch(()=>{})}),d=((await dr(f.send("Accessibility.getFullAXTree",{depth:10}),ka,"wix AX tree")).nodes||[]).filter(E=>["heading","paragraph","StaticText","link","img","list","listitem","article","main","section"].includes(E.role?.value||"")).map(E=>({role:E.role?.value||"",name:E.name?.value||"",description:E.description?.value})).filter(E=>E.name)}catch{}finally{f&&await dr(f.detach(),ka,"wix CDP detach").catch(()=>{})}let p="";try{p=await dr(r.content(),ka,"wix page content")}catch{p=await XRe(t)||""}a&&p.length<2e3&&(p=await XRe(t)||p);let h=JRe({apiCalls:s.apiCalls,globals:c.globals,jsonLd:c.jsonLd,meta:c.meta,accessibility:d,pageHtml:p}),{content:A,qualityScore:g}=KRe({apiCalls:s.apiCalls,jsonLd:c.jsonLd,renderedContent:u,accessibility:d,meta:c.meta});if(p){let b=PG(p);if(h.length===0&&b.mediaUrls.length>0)h.push(...b.mediaUrls);else{let C=new Set(h);for(let E of b.mediaUrls)C.has(E)||h.push(E)}(!A||A.length<30)&&b.content&&(A=b.content,g="low"),!c.meta.title&&!c.meta.ogTitle&&b.title&&(c.meta.ogTitle=b.title)}let m=ZRe(c.jsonLd);return{sourceUrl:t,slug:Xt(t),extractedAt:new Date().toISOString(),apiCalls:s.apiCalls,globals:c.globals,jsonLd:c.jsonLd,meta:c.meta,accessibility:d,mediaUrls:h,content:A,qualityScore:g,pageHtml:p,...l?{pageType:l}:{},...m?{featuredImage:m}:{}}}async function tQe(e,t){let r=t;e=JB(e);let{browser:n,page:i,close:s}=await Jl({cdpPort:r.cdpPort});try{let o=i,a=(()=>{let b=new URL(e);return b.origin+b.pathname.replace(/\/$/,"")})(),c=[],u=new Set,l=new Set,d=[];async function f(b,C=0,E=!1){if(C>3||l.has(b))return;l.add(b);let w=D=>{if(E){r.verbose&&console.warn(`[wix:discover] optional sub-sitemap not present: ${b} (${D})`);return}console.warn(`[wix:discover] sitemap fetch failed after ${T} attempts: ${b} (${D})`),d.push({url:b,reason:D})},T=3,_=null;for(let D=1;D<=T;D++)try{let k=await o.goto(b,{timeout:15e3});if(!k||!k.ok()){if(_=k?`HTTP ${k.ok()?"ok=false":"status-not-ok"}`:"no response",D<T){await new Promise(F=>setTimeout(F,500*D));continue}w(_??"unknown");return}let v=await dr(o.content(),ka,"wix discover sitemap content"),M=eE(v);for(let F of M)F.endsWith(".xml")?await f(F,C+1):u.has(F)||(u.add(F),c.push(F));return}catch(k){if(_=k instanceof Error?k.message:String(k),D<T){await new Promise(v=>setTimeout(v,500*D));continue}w(_??"unknown")}}await f(`${a}/sitemap.xml`),d.length>0&&console.warn(`[wix:discover] ${d.length} sitemap fetch(es) failed \u2014 inventory may be incomplete`);for(let b of["blog-posts-sitemap.xml","store-products-sitemap.xml","forum-posts-sitemap.xml"])await f(`${a}/${b}`,0,!0);let p=c;if(p.length===0)try{await o.goto(e,{waitUntil:"domcontentloaded",timeout:3e4}),await o.waitForTimeout(4e3);let b=new URL(e).origin;p=await dr(o.evaluate(C=>{let E=C;return[...new Set([...document.querySelectorAll("a[href]")].map(w=>w.href).filter(w=>w.startsWith(E)&&!w.includes("#")))]},b),ka,"wix discover homepage links")}catch{}let h=[];try{await o.goto(e,{waitUntil:"domcontentloaded",timeout:3e4}).catch(()=>{}),await o.waitForTimeout(4e3),h=await dr(o.evaluate(()=>{let b=[];return document.querySelectorAll('nav a, header a, [role="navigation"] a').forEach(C=>{let E=C,w=E.textContent?.trim()||"",T=E.href;w&&T&&!T.includes("#")&&!b.find(_=>_.href===T)&&b.push({text:w,href:T})}),b}),ka,"wix discover nav")}catch{}let A="";try{A=await dr(o.evaluate(()=>{let b=document.title,C=b.lastIndexOf(" | ");return(C>0?b.slice(C+3).trim():b).replace(/ Main$/,"").trim()}),ka,"wix discover title")}catch{}let g={},m=[];for(let b of p){let C=lr(b);m.push({url:b,type:C}),g[C]=(g[C]||0)+1}return{siteUrl:e,discoveredAt:new Date().toISOString(),siteMeta:{title:A||"Imported Site",tagline:"",language:"en-US"},navigation:h,counts:g,urls:m}}finally{await s()}}Vi();function rQe(e){for(let t of e.jsonLd){let r=t;if(r["@type"]==="Product"&&typeof r.name=="string"){let n=r.offers||r.Offers,s=(Array.isArray(n)?n:n?[n]:[])[0]||{},o=s.price?String(s.price):"",a=[];if(typeof r.image=="string")a.push(r.image);else if(Array.isArray(r.image)){for(let u of r.image)if(typeof u=="string")a.push(u);else if(typeof u=="object"&&u){let l=u.url||u.contentUrl;typeof l=="string"&&a.push(l)}}let c=s.availability||s.Availability;return{name:r.name,description:typeof r.description=="string"?r.description:"",regularPrice:o,sku:typeof r.sku=="string"?r.sku:"",images:a,inStock:typeof c=="string"?c.includes("InStock"):!0,sourceUrl:e.sourceUrl}}}for(let t of e.apiCalls){let r=t.data,n=r.product||r.catalog?.product;if(n&&typeof n.name=="string"){let i=n.price,s=n.media?.items,o=[];if(s)for(let a of s){let c=a.image?.url;c&&o.push(c)}return{name:n.name,description:typeof n.description=="string"?n.description:"",regularPrice:i?.formatted?String(i.formatted).replace(/[^0-9.]/g,""):"",sku:typeof n.sku=="string"?n.sku:"",images:o,inStock:n.stock?.inventoryStatus?n.stock.inventoryStatus!=="OUT_OF_STOCK":void 0,sourceUrl:e.sourceUrl}}}if(e.pageHtml){let t=e.pageHtml,r=i=>{let s=new RegExp(`data-hook=["']${i}["'][^>]*>([\\s\\S]*?)</`,"i");return t.match(s)?.[1]?.replace(/<[^>]+>/g,"").trim()||""},n=r("product-title");if(n){let i=r("formatted-primary-price").replace(/[^0-9.,]/g,""),s=r("product-description"),o=/data-hook=["'](?:main-media-image-wrapper|thumbnail-image)["'][^>]*>[\s\S]*?<img[^>]+src=["']([^"']+)["']/gi,a=[],c;for(;(c=o.exec(t))!==null;)a.includes(c[1])||a.push(c[1]);return{name:n,description:s,regularPrice:i,sku:"",images:a,inStock:!0}}}return null}async function nQe(e,t,r,n){let i=e,s=r,o=s.delay!=null?s.delay:500,a=s.outputDir||"",c=new ri,u=!1;a&&!s.dryRun&&c.openStream(a);let l=new Set(i.urls.filter(f=>f.type==="product").map(f=>f.url)),d=Zl({cdpPort:s.cdpPort});try{await d.openLease().acquire();let f=await yi({urls:i.urls,navigation:i.navigation,wxr:t,log:n.log,outputDir:a,delay:o,dryRun:!!s.dryRun,resume:!!s.resume,verbose:s.verbose,limit:s.limit,server:n.server,csvBuilder:c,onPageExtracted:s.onPageExtracted,maxPageConcurrency:1,onExtractTimeout:()=>d.reset(),extractPage:async p=>{let h=d.openLease(),{page:A}=await h.acquire(),g=await eQe(A,p);if(!h.isValid())throw new Error(`extraction abandoned by watchdog: ${p}`);if(l.has(p)||/\/product-page\//.test(p)||/\/store\//.test(p)){let T=rQe(g);T&&(c.addProduct(T),u=!0)}let b=g.meta.ogTitle||g.meta.title||g.slug,C=b.lastIndexOf(" | "),E=C>0?b.slice(0,C).trim():b,w;for(let T of g.jsonLd){let D=T.author;if(typeof D=="string"&&D){w=D;break}if(D&&typeof D=="object"&&typeof D.name=="string"){w=D.name;break}}return{title:E||g.slug,slug:g.slug,content:g.content,excerpt:g.meta.ogDescription||g.meta.description||"",date:g.extractedAt,seoTitle:g.meta.title,seoDescription:g.meta.description,mediaUrls:g.mediaUrls,qualityScore:g.qualityScore,author:w,jsonLd:g.jsonLd}}});return u&&a&&!s.dryRun&&(c.isStreaming?c.closeStream():c.serialize(`${a}/products.csv`)),f}finally{await d.end()}}function sMt(e){return/wixsite\.com|wix\.com/i.test(e)}var iQe={id:"wix",detect:sMt,discover:tQe,extract:nQe};function sQe(e,t){return e.find(r=>r.id===t)??e.find(r=>r.id==="default")??null}var oQe=[P2e,z2e,rRe,ARe,IRe,DRe,PRe,WRe,iQe];function oMt(e){return sQe(oQe,e)}function aMt(e){return{content:[{type:"text",text:JSON.stringify(e,null,2)}]}}function aQe(e){return{content:[{type:"text",text:JSON.stringify({error:e})}],isError:!0}}var f1=new SB({name:"data-liberation",version:"0.1.0"},{capabilities:{tools:{}}});f1.setRequestHandler(kP,async()=>({tools:[{name:"liberate_detect",description:"Detect the platform of a website (GoDaddy Websites & Marketing, Hostinger, HubSpot, Shopify, Squarespace, Webflow, Weebly, Wix, or unknown)",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to detect"}},required:["url"]}},{name:"liberate_discover",description:"Inventory a website: fetch sitemap, categorize URLs, extract navigation structure",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to inventory"},token:{type:"string",description:"API token for platforms requiring auth"},cdpPort:{type:"number",description:"CDP port for browser-based extraction"},verbose:{type:"boolean",description:"Enable detailed logging"}},required:["url"]}},{name:"liberate_inspect",description:"Probe a site to assess extractability: detect platform, check sitemap, probe sample pages",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to inspect"},token:{type:"string",description:"API token if needed"},cdpPort:{type:"number",description:"CDP port for browser-based inspection"}},required:["url"]}},{name:"liberate_extract",description:"Extract all content from a website. Produces WXR file + media directory + redirect map.",inputSchema:{type:"object",properties:{url:{type:"string",description:"The URL of the website to extract"},outputDir:{type:"string",description:"Directory to write WXR, media, and logs"},token:{type:"string",description:"API token for platforms requiring auth (e.g. Webflow)"},cdpPort:{type:"number",description:"CDP port for browser-based extraction"},adminToken:{type:"string",description:"Shopify Admin API access token. When set, products are fetched via the Shopify Admin GraphQL API for richer data (compareAtPrice, inventoryPolicy, unitCost, collections, SEO metafields, variant images). Falls back to the public JSON API on failure."},shopDomain:{type:"string",description:"Shopify *.myshopify.com hostname. Usually auto-detected by liberate_discover from the storefront HTML; only pass explicitly if detection failed (e.g. Cloudflare-protected site)."},delay:{type:"number",description:"Delay between requests in ms (default: 500)"},resume:{type:"boolean",description:"Resume a previous extraction"},dryRun:{type:"boolean",description:"Extract 2-3 pages and report without writing WXR"},limit:{type:"number",description:"Cap extraction to the first N URLs and write a real WXR for them"},verbose:{type:"boolean",description:"Enable detailed per-page logging"},screenshots:{type:"boolean",description:"After extract completes, capture screenshots (desktop + mobile) for every processed URL. Results are written to output/<site>/screenshots/ with a manifest.json keyed by URL."},captureDesign:{type:"boolean",description:"Enable html-first design replication: carry source HTML+CSS as the page/post design. Note: full html-first design capture (site.css aggregation, blank theme install) runs via the CLI (`data-liberation --html-first`); this flag is reserved for future MCP support."},contentStatus:{type:"string",enum:["draft","publish"],description:'WXR post status for extracted pages/posts. Default "draft" \u2014 the documented "import as drafts; the user reviews and publishes manually" convention for a production import. The replica/preview flow (e.g. building a Studio replica) passes "publish" so imported nav targets resolve. Attachments always use "inherit".'}},required:["url","outputDir"]}},{name:"liberate_extract_one",description:"Extract a single URL through the streaming pipeline. Used by the watch loop and agent-driven streaming. Each call runs adapter discovery to set up state, then narrows to the target URL. Append-mode WXR \u2014 results accumulate in output.wxr across calls.",inputSchema:{type:"object",properties:{url:{type:"string",description:"The single URL to extract."},outputDir:{type:"string",description:"Liberation output directory. WXR + media + logs are appended here."},siteUrl:{type:"string",description:"Origin of the source site, used for adapter discovery. Defaults to the origin parsed from `url`."},token:{type:"string",description:"API token for platforms requiring auth (e.g. Webflow)."},cdpPort:{type:"number",description:"CDP port for browser-based extraction."},adminToken:{type:"string",description:"Shopify Admin API token (see liberate_extract)."},shopDomain:{type:"string",description:"Shopify *.myshopify.com hostname (see liberate_extract)."},delay:{type:"number",description:"Delay floor in ms."},verbose:{type:"boolean",description:"Per-step logging."},contentStatus:{type:"string",enum:["draft","publish"],description:'WXR post status for extracted pages/posts. Default "draft" (import-as-drafts convention); the replica/preview flow passes "publish". Attachments always use "inherit".'}},required:["url","outputDir"]}},{name:"liberate_paths",description:"Resolve where liberation output lives. Returns { base, siteDir }. base = the default output base (DLA_OUTPUT_DIR or <Studio root>/_liberations). siteDir = base/<sanitized host+path> when a url is given. Skills MUST use this instead of assuming output/<site>/ relative to cwd.",inputSchema:{type:"object",properties:{url:{type:"string",description:"Optional source URL; when present, siteDir is returned."}}}},{name:"liberate_status",description:"Check progress of a running or completed extraction",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"The output directory of the extraction"}},required:["outputDir"]}},{name:"liberate_map_apis",description:"Map all API endpoints used by a website by navigating pages via CDP and capturing JSON network traffic. Produces a categorized endpoint catalog with sample responses and auth headers. Use during /adapt reconnaissance to reverse-engineer a new platform.",inputSchema:{type:"object",properties:{cdpPort:{type:"number",description:"Chrome DevTools Protocol port (e.g. 9222)"},url:{type:"string",description:"The URL of the site to map"},crawlUrls:{type:"array",items:{type:"string"},description:"Additional URLs to navigate (e.g. admin dashboard sections)"},followLinks:{type:"boolean",description:"Follow same-origin links from the main page (up to 20, default: false)"}},required:["cdpPort","url"]}},{name:"liberate_probe",description:"Probe a browser page via CDP for extraction-relevant data: window globals, JSON-LD, cookies, localStorage, network entries, and platform identity fields. Requires a running Chrome with --remote-debugging-port. Use for debugging extraction failures.",inputSchema:{type:"object",properties:{cdpPort:{type:"number",description:"Chrome DevTools Protocol port (e.g. 9222)"},url:{type:"string",description:"Only probe pages on this domain (optional \u2014 probes all tabs if omitted)"}},required:["cdpPort"]}},{name:"liberate_qa",description:"Compare extracted WXR content against the original source site page by page. Reports text similarity, missing headings/images/links, and grades each page (pass/warn/fail). Optionally patches fixable issues like missing alt text.",inputSchema:{type:"object",properties:{wxrFile:{type:"string",description:"Path to the WXR file to QA"},fix:{type:"boolean",description:"Patch fixable issues in the WXR (default: false)"}},required:["wxrFile"]}},{name:"liberate_verify",description:"Verify a completed extraction: check for stale CDN URLs, failed pages, missing media, and items needing manual attention",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"The output directory of the extraction to verify"}},required:["outputDir"]}},{name:"liberate_setup",description:"Validate WordPress connection: check site reachability, REST API, and authentication. Returns guidance if anything fails. Pass delegate: true to skip validation and receive a structured manifest describing what the import target needs \u2014 useful when the calling environment handles site setup itself.",inputSchema:{type:"object",properties:{site:{type:"string",description:"WordPress site domain (e.g. mysite.com or localhost:8881)"},username:{type:"string",description:"WordPress username"},token:{type:"string",description:"WordPress application password"},delegate:{type:"boolean",description:"Skip validation and return a setup manifest for the calling environment to handle. Use when the environment has its own site management (e.g. local dev tools)."}},required:[]}},{name:"liberate_import",description:"Import a WXR file into a WordPress site. Pass delegate: true to skip REST import and receive a structured import manifest \u2014 useful when the calling environment handles imports itself (e.g. local dev tools with direct database/CLI access).",inputSchema:{type:"object",properties:{wxrFile:{type:"string",description:"Path to the WXR file to import"},site:{type:"string",description:"WordPress site domain (e.g. example.com)"},username:{type:"string",description:"WordPress username"},token:{type:"string",description:"WordPress application password"},dryRun:{type:"boolean",description:"Preview without importing"},delay:{type:"number",description:"Delay between requests in ms (default: 500)"},only:{type:"string",description:"Only import specific type (categories, tags, media, pages, posts, comments, menus)"},verbose:{type:"boolean",description:"Enable detailed logging"},resume:{type:"boolean",description:"(deprecated \u2014 import is always idempotent, this flag has no effect)"},importAuthors:{type:"boolean",description:"Create WordPress users for each author in the WXR (default: false \u2014 all content owned by authenticated user)"},woocommerceKey:{type:"string",description:"WooCommerce consumer key for product import"},woocommerceSecret:{type:"string",description:"WooCommerce consumer secret for product import"},delegate:{type:"boolean",description:"Skip REST import and return a structured import manifest for the calling environment to handle."}},required:["wxrFile"]}},{name:"liberate_preview",description:"Spawn a local Studio preview of an extraction output. Returns { url, port, status, warnings }. Kills any existing preview on the same outputDir before starting. Optionally installs a generated replica theme + block plugins via themeFiles[] + blockPlugins[]; the theme is activated after content import. Used by the replicate skill in Step 5 (Install).",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Path to the extraction output directory (contains output.wxr)."},open:{type:"boolean",description:"If true, open the URL in the default browser after readiness."},port:{type:"number",description:"Override the auto-picked port (default range: 9400-9499)."},themeFiles:{type:"array",description:'Generated replica theme files. Each entry is { relativePath, content } rooted at the theme directory (e.g. relativePath: "templates/index.html"). Theme is written to wp-content/themes/<themeSlug>/ and activated after content import.',items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}},blockPlugins:{type:"array",description:"DEPRECATED \u2014 embed custom blocks inside the theme at blocks/<slug>/{src,build}/ via themeFiles[] instead (Telex blocks-inside-themes pattern, registered from functions.php). Kept for backwards compatibility. Each entry is { slug, files: [{relativePath, content}] }; plugin is written to wp-content/plugins/<slug>/ and activated.",items:{type:"object",properties:{slug:{type:"string"},files:{type:"array",items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}}},required:["slug","files"]}},themeSlug:{type:"string",description:"Theme directory name (kebab-case). Required when themeFiles is non-empty. Conventionally <siteSlug>-replica."}},required:["outputDir"]}},{name:"liberate_install_theme",description:"Install replica theme files + block plugins into an ALREADY-RUNNING Studio site (no site creation, no content import). Use this from the streaming watch loop's theme-piece / archetype-template judgments \u2014 `liberate_preview` would create a `-2` duplicate Studio site and re-import content over the streamed posts. Writes to <studioSitePath>/wordpress/wp-content/{themes,plugins}/, then runs `studio wp plugin activate` and `studio wp theme activate`. Returns warnings[] for non-fatal activate failures.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Path to the extraction output directory (used for log routing only \u2014 files are written to studioSitePath, not outputDir)."},studioSitePath:{type:"string",description:"On-disk path to the running Studio site (parent dir, NOT the wordpress sub-dir). Streaming watch logs this as `preview-pre-started.sitePath`."},themeFiles:{type:"array",description:"Replica theme files. Same shape as liberate_preview \u2014 { relativePath, content }, rooted at the theme directory. Activated after writing.",items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}},blockPlugins:{type:"array",description:"DEPRECATED \u2014 kept for backwards compatibility. New replica work should embed custom blocks inside the theme at blocks/<slug>/{src,build}/ via themeFiles[], following the Telex blocks-inside-themes pattern. The skill registers them from functions.php. Each plugin entry is { slug, files: [{relativePath, content}] }, activated after writing.",items:{type:"object",properties:{slug:{type:"string"},files:{type:"array",items:{type:"object",properties:{relativePath:{type:"string"},content:{type:"string"}},required:["relativePath","content"]}}},required:["slug","files"]}},themeSlug:{type:"string",description:"Theme directory name (kebab-case). Required when themeFiles is non-empty. Conventionally <siteSlug>-replica."}},required:["outputDir","studioSitePath"]}},{name:"liberate_theme_scaffold",description:"Read <outputDir>/design-foundation.json and emit a complete-and-activatable WordPress block theme bundle deterministically: style.css (theme header), theme.json (settings/styles mapped from foundation tokens), functions.php (theme setup + custom-block registration loop), templates/index.html (homepage shell with header part + post-content + footer part), parts/header.html (site-title + page-list nav), parts/footer.html (copyright). No agent reasoning, no vision, no LLM call \u2014 pure deterministic mapping. Pair with `liberate_install_theme` to install the result into a running Studio site. Per-archetype templates (page.html, single.html, etc.) and patterns are NOT emitted here \u2014 they belong to the replicate skill's archetype-template tick.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (must contain design-foundation.json)."},themeSlug:{type:"string",description:"Theme directory slug (kebab-case). Conventionally <siteSlug>-replica."},themeName:{type:"string",description:"Display name. Defaults to themeSlug."},siteTitle:{type:"string",description:"Source site title \u2014 used in style.css description and footer copyright."},themeDescription:{type:"string",description:"Override the default style.css Description line."},sourceUrl:{type:"string",description:"The source site origin (e.g. https://www.example.com/). Used to resolve the captured header/footer chrome links to absolute URLs so they remap to local permalinks (without it, nav hrefs are not remapped and point off-site). Defaults to a placeholder origin."},persist:{type:"boolean",description:"When true, also write the emitted text theme files to <outputDir>/theme (alongside the font/logo assets always written there), materializing a complete on-disk theme. Default false: themeFiles[] is returned for the caller to install into a live site."},reconstructedPages:{type:"array",description:"Block-reconstructed content pages. Each entry emits templates/page-<slug>.html wiring the page to its reconstructed pattern (and front-page.html for isHome), so the page renders block sections instead of falling through page.html to raw carried post_content. The pattern files (reconstructed block markup) are added to themeFiles[] separately by the replicate skill.",items:{type:"object",properties:{slug:{type:"string",description:'Source-faithful WP page slug (last path segment), e.g. "about-us".'},patternSlug:{type:"string",description:'Fully-qualified theme pattern slug, e.g. "<themeSlug>/page-about-us".'},isHome:{type:"boolean",description:"When true, also emit templates/front-page.html for this page (static front page)."}},required:["slug","patternSlug"]}}},required:["outputDir","themeSlug"]}},{name:"liberate_blockify_wxr",description:"BULK blog-body block conversion (blocks reconstruct path ONLY). Rewrites every post/page content:encoded body in output.wxr through the source platform adapter's block recipe (seam 2) so imported posts land as editable Gutenberg blocks instead of one Classic block (e.g. Squarespace sqs-block bodies). Lossless: bodies the recipe can't convert are left verbatim, and all other items (attachments, nav menu items, comments, terms) are preserved unchanged. No-op when the platform adapter has no block recipe. Resolves the platform from session.json (recorded at extraction); pass `platform` to override. Run AFTER extraction and BEFORE liberate_import. The theme/carry path must NOT call this.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory holding output.wxr + session.json."},wxrPath:{type:"string",description:"Override the WXR path. Defaults to <outputDir>/output.wxr."},platform:{type:"string",description:"Override the platform adapter id (else read from session.json)."}},required:["outputDir"]}},{name:"liberate_reconstruct_pages",description:"Deterministically reconstruct EVERY content page from its OWN captured section specs. For each page: capture specs, install section media, reconstruct verbatim block markup, GATE through validate_artifacts, write the pattern + reconstructed post_content. Page TEMPLATES are collapsed to a small set of variant templates (templates/page-replica[-<key>].html) registered in theme.json customTemplates and assigned per page via _wp_page_template; output.wxr is patched to match. Set collapseTemplates:false to fall back to one templates/page-<slug>.html per page. The theme shell must already be installed via liberate_theme_scaffold/install.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (holds media/ + media-stubs.json)."},studioSitePath:{type:"string",description:"On-disk path to the running Studio site (e.g. ~/Studio/example-com)."},themeSlug:{type:"string",description:"Installed theme slug. Defaults to <siteSlug>-replica derived from outputDir."},collapseTemplates:{type:"boolean",description:"Collapse per-page templates into variant-keyed templates + _wp_page_template assignments (default true). false = one template per page (legacy)."},variationHoist:{type:"boolean",description:"Hoist recurring instance-style constellations into theme block-style variations (default true). Set false to disable (escape hatch)."},editableIslands:{type:"boolean",description:"Convert the coverage-gated core/html fallback islands into in-canvas dla/editable-html blocks (visible + styled + text/image-editable in the block editor; ships + activates the block plugin). Default true. Set false to keep plain core/html."},pages:{type:"array",description:"Content pages to reconstruct. Reconstruct every page (not just cluster reps).",items:{type:"object",properties:{slug:{type:"string",description:'Source-faithful WP page slug (sanitize_title-shaped), e.g. "about-us".'},sourceUrl:{type:"string",description:"The page's source URL to capture + reconstruct."},title:{type:"string",description:"Human-readable page title (pattern doc-comment)."},isHome:{type:"boolean",description:"When true, also emit front-page.html."}},required:["slug","sourceUrl","title"]}}},required:["outputDir","studioSitePath","pages"]}},{name:"liberate_reconstruct_pages_carry",description:"Carry-and-scope parity path: for each page, load cached body HTML (or fetch live), collect CSS, carry the sanitized HTML + scoped CSS into core/html block islands, self-host the run media (rewriting <img>/srcset/url() to the local WP library) + localize internal links, write a carry FSE block theme under wp-content/themes/<siteSlug>-carry (incl. WooCommerce single-product/archive-product templates wrapping the carried header/footer when the run has products), and return per-page islands for building output-carry.wxr. Requires liberate_screenshot (html/ cache); falls back to live fetch. Pass islandsOutDir to write islands to disk and return paths instead of inline content (avoids the MCP response-size cap on large sites).",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (holds html/ cache from liberate_screenshot)."},studioSitePath:{type:"string",description:"On-disk path to the running Studio site (e.g. ~/Studio/example-com)."},themeName:{type:"string",description:'Display name for the carry theme (default: "Liberated (Carry)").'},islandsOutDir:{type:"string",description:"When set, write each carried island to <islandsOutDir>/<slug>.html and return its path + byte count instead of inline postContent. Use this from MCP to avoid the response-size cap (islands are whole page bodies). Omit to get postContent inline (the tsx driver default)."},editableIslands:{type:"boolean",description:"Emit carried bodies as in-canvas dla/editable-html blocks (visible + styled + text/image-editable in the block editor) instead of sandboxed core/html islands. Front-end output is byte-identical (static save). Ships + activates the block plugin. Default true; set false to force plain core/html."},pages:{type:"array",description:"Content pages to carry and scope. Pass every page in the site for full coverage.",items:{type:"object",properties:{slug:{type:"string",description:'URL-safe page slug (sanitize_title-shaped), e.g. "about-us". Must match the WP post_name so the island-swap finds the post and functions.php body-class scoping targets it.'},sourceUrl:{type:"string",description:"The page's source URL (used as base for CSS resolution and live HTML fallback)."},title:{type:"string",description:"Human-readable page title."},isHome:{type:"boolean",description:"When true, emits front-page.html template and uses is_front_page() body-class condition."},postType:{type:"string",enum:["page","post"],description:'Post type (default "page"). "post" scopes via is_single() and renders through single.html; also selects the functions.php body-class condition.'},htmlSlug:{type:"string",description:'Override the cached-HTML filename stem loaded as html/<htmlSlug>.html when it differs from the WP slug \u2014 e.g. posts captured as "blogs--snoozweek--<name>" or pages as "pages--<name>". Falls back to slug; without it the tool live-fetches sourceUrl.'}},required:["slug","sourceUrl","title"]}}},required:["outputDir","studioSitePath","pages"]}},{name:"liberate_screenshot",description:"Capture full-page + scrolled screenshots (desktop + mobile) and rendered HTML for every URL on a site. Writes to <outputDir>/screenshots/ and <outputDir>/html/, plus palette.json, typography.json, breakpoints.json, and computed-styles.json via DOM/CSS site-analysis. Reuses sitemap discovery or accepts explicit urls[].",inputSchema:{type:"object",properties:{url:{type:"string",description:"Site URL (used for sitemap discovery and same-origin enforcement)"},outputDir:{type:"string",description:"Output directory"},urls:{type:"array",items:{type:"string"},description:"Explicit URL list (skips sitemap fetch; all must share origin with `url` if both provided)"},types:{type:"array",items:{type:"string"},description:"Filter by URL type: page, post, product, homepage, gallery, event"},limit:{type:"number",description:"Cap to first N URLs"},concurrency:{type:"number",description:"Parallel URL captures (default 3, max 10)"},browserRestartEvery:{type:"number",description:"Close and relaunch browser every N URLs (default 100)"},cdpPort:{type:"number",description:"Connect to existing Chrome via CDP"},force:{type:"boolean",description:"Re-capture even if output files already exist"},verbose:{type:"boolean",description:"Per-URL progress logging"}},required:["url","outputDir"]}},{name:"liberate_data_model_scaffold",description:"Deterministic pre-pass for the JS-data path: reads an owned local site dir, discovers record arrays / mount containers / id-lookups by AST (resilient to malformed/vendored JS files), infers field roles, and writes a PARTIAL data-model.draft.json. Returns { model, skillTodos, discovered, validation }. The model-local-data skill fills only the skillTodos (card.template, ambiguous ordering, low-confidence role guesses), then writes the final data-model.json. Run before liberate_convert_local_site when the source renders content from a JS data array.",inputSchema:{type:"object",properties:{dir:{type:"string",description:"Absolute path to the local static-site directory."},outputDir:{type:"string",description:"Where data-model.draft.json is written. Defaults to dir."}},required:["dir"]}},{name:"liberate_design_foundation_scaffold",description:"Runs the deterministic scaffold on a liberation output directory: reads palette.json / typography.json / breakpoints.json / screenshots/manifest.json from SP1 output, applies pure rules (darkest high-frequency \u2192 text.default, lightest \u2192 surface.base, breakpoint tier mapping, gradient regex extraction from html/*.html), and returns a PartialDesignFoundation. Empty role slots are left for the design-foundations skill to assign. Emits skillTodos listing every path the skill must fill. The design-foundations skill may additionally read computed-styles.json for HTML/CSS role assignment.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (must contain SP1 files)."},origin:{type:"string",description:"Origin URL (e.g. https://example.com). Stored in the foundation `origin` field."}},required:["outputDir","origin"]}},{name:"liberate_design_foundation_validate",description:"Validates a design-foundation JSON blob against the schema. Returns { ok: true } or { ok: false, errors: [...] }. Used by the design-foundations skill after filling role slots to catch structural mistakes and unfilled skillTodos before saving to disk.",inputSchema:{type:"object",properties:{foundation:{type:"object",description:"JSON blob to validate (not a path)."}},required:["foundation"]}},{name:"liberate_design_foundation_save",description:"Persists a validated design-foundation JSON to disk and generates the human-readable design-foundation.md companion. Writes both files atomically to outputDir. Skips write when inputsDigest matches prior file (unless force=true).",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Destination directory."},foundation:{type:"object",description:"Complete design foundation JSON blob."},force:{type:"boolean",description:"Overwrite even if inputsDigest matches prior file."}},required:["outputDir","foundation"]}},{name:"liberate_media_install",description:"Install one URL's pending media into the running replica WP site. Idempotent: skips media already registered as attachments (tracked via MediaStubStore.wpPostId). Uses `studio wp eval-file` to run a vendored PHP installer script.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (contains media-stubs.json + media/)."},url:{type:"string",description:"Source URL whose media we are installing (used for logging; the install acts on all pending media in MediaStubStore)."},target:{type:"object",description:'Where to install the media. Studio: { kind: "studio", sitePath: "/Users/.../Studio/site-name" }.',properties:{kind:{type:"string",enum:["studio"]},sitePath:{type:"string"},siteUrl:{type:"string",description:"Optional site URL used to compute browser-visible upload URLs."}},required:["kind","sitePath"]}},required:["outputDir","url","target"]}},{name:"liberate_replicate_tick",description:"Run one tick of the replicate streaming scheduler. Reads replicate-state.json, computes deltas (new archetypes since last tick, foundation drift), returns judgmentNeeded[] markers describing what skills the calling agent should invoke (replicate, design-foundations, compose-page-blocks). The MCP tool is deterministic \u2014 it does not invoke skills directly.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory."},reason:{type:"string",description:"Optional reason override (manual / new-archetype / periodic / foundation-drift). Defaults to inferred."}},required:["outputDir"]}},{name:"liberate_block_transform_apply",description:"Apply composed block markup to a post in the running replica site. Validates: parse_blocks roundtrip + output-verify text-substring check + post-existence poll (3 retries with backoff). Idempotent via block-transform-log.jsonl (same source+output hashes skip re-apply). Studio path uses `wp post update` via studio CLI.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (block-transform-log.jsonl lives here)."},url:{type:"string",description:"Source URL (post is matched via _source_url meta in the replica)."},blocks:{type:"string",description:"Composed block markup to apply as post_content."},sourceHtml:{type:"string",description:"Original sanitized source HTML \u2014 passed to output-verify for text-substring validation."},target:{type:"object",description:'Replica site target. Studio: { kind: "studio", sitePath: "..." }.',properties:{kind:{type:"string",enum:["studio"]},sitePath:{type:"string"},siteUrl:{type:"string"}},required:["kind"]},composedBy:{type:"string",description:'Provenance string for the log entry (e.g. "compose-page-blocks@v1.0" or "heuristic@v1.0").'}},required:["outputDir","url","blocks","sourceHtml","target"]}},{name:"liberate_block_compose",description:"Validate composed block markup and write it to a sidecar file (<outputDir>/composed/<slug>.blocks.html) for the streaming watch loop to install as post_content. Compose-then-install counterpart to liberate_block_transform_apply: same parse_blocks roundtrip + output-verify validation, same block-transform-log.jsonl idempotency, but NO database write. The runner reads the sidecar after the agent returns and passes the contents to wp_insert_post via contentOverride, so the very first DB write of each post carries block markup (not raw HTML that gets transformed afterward). Use this in the streaming watch loop's compose-page-blocks judgment; reach for liberate_block_transform_apply only for re-composing already-imported posts.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (sidecar lives at <outputDir>/composed/, log is block-transform-log.jsonl)."},url:{type:"string",description:"Source URL \u2014 used for log entries and as the manifest lookup key when sourceHtml is omitted."},slug:{type:"string",description:"Post slug \u2014 determines the sidecar filename (composed/<slug>.blocks.html). Must match the WxrItem.slug the runner buffered."},blocks:{type:"string",description:"Composed block markup. Validated for parse_blocks roundtrip and against sourceHtml for text-substring containment."},sourceHtml:{type:"string",description:"Sanitized source HTML used for anti-hallucination output-verify. Optional \u2014 falls back to <outputDir>/screenshots/manifest.json lookup."},composedBy:{type:"string",description:'Provenance string for the log entry (default "compose-page-blocks@v1.0").'},source:{type:"string",enum:["heuristic","ai"],description:'Compose source flavour for the log entry (default "ai").'}},required:["outputDir","url","slug","blocks"]}},{name:"liberate_replicate_inventory",description:"Read a liberation outputDir and return a structured archetype inventory: counts per archetype (homepage/page/post/product/gallery/event), up to 3 representative URLs per archetype with their screenshot+html paths (selected by largest HTML \u2014 proxy for section count), product count from products.jsonl, and presence of design-foundation.json. Used by the replicate skill in Step 1 (Inventory). Throws when output.wxr is missing.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (must contain output.wxr)."}},required:["outputDir"]}},{name:"liberate_replicate_verify",description:"Capture replica screenshots at given URLs (desktop + mobile by default) against a running replica WP install and pair each viewport with the matching source screenshot from screenshots/manifest.json. Returns a structured pairing manifest the calling agent (vision-capable) uses for side-by-side comparison. Used by the replicate skill in Step 6 (Verify). Replica screenshots are written to <outputDir>/<outputSubdir>/<viewport>/<slug>.png \u2014 same shape as the source layout.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (contains screenshots/manifest.json and the source screenshots/)."},replicaBaseUrl:{type:"string",description:"Base URL of the running replica (e.g. https://my-site-replica.wp.local or http://localhost:8881). No trailing slash."},urls:{type:"array",items:{type:"string"},description:'Path-only URLs to verify (e.g. ["/", "/blog/post-1"]).'},viewports:{type:"array",items:{type:"string",enum:["desktop","mobile"]},description:'Viewports to capture. Default: ["desktop", "mobile"].'},outputSubdir:{type:"string",description:'Where in outputDir to write replica screenshots. Default: "replica-screenshots". Files land at <subdir>/<viewport>/<slug>.png.'},cdpPort:{type:"number",description:"Connect to existing Chrome via CDP (otherwise launches a new browser)."}},required:["outputDir","replicaBaseUrl","urls"]}},{name:"liberate_refine_report",description:"Validate refine coverage for one page: reads <outputDir>/refine/<slug>/*.json (one file per section, written by match-section) and enforces that EVERY finding id appears in exactly one of applied[]/skipped[]. Fails loudly, naming unaccounted IDs. match-page must not mark a page done until this passes.",inputSchema:{type:"object",properties:{outputDir:{type:"string",description:"Liberation output directory (contains refine/<slug>/ written by match-section)."},slug:{type:"string",description:"Page slug whose refine/<slug>/ directory to validate."}},required:["outputDir","slug"]}},{name:"liberate_compare",description:"Pixel-parity scorer (fixed viewport). Joins an origin screenshots dir to a replica screenshots dir by URL pathname, crops both full-page PNGs to the top 1440\xD7900 / 390\xD7844 region, and returns per-pathname desktop/mobile similarity scores (1 \u2212 diffPixels/total). Writes comparison.json (v2 with originHeight/replicaHeight/heightMismatchRatio per viewport) + diff PNGs into the replica dir. Writes magenta-padded .padded.png diff when height mismatch exceeds 2%. Both dirs must have the standard layout: manifest.json + desktop/<slug>.png + mobile/<slug>.png.",inputSchema:{type:"object",properties:{originDir:{type:"string",description:"Origin screenshots dir (manifest.json + desktop/ mobile/)."},replicaDir:{type:"string",description:"Replica screenshots dir, same layout. comparison.json + diff/ are written here."},viewports:{type:"array",items:{type:"string",enum:["desktop","mobile"]},description:"Viewports to score. Default: both."},diffOutputDir:{type:"string",description:"Where to write diff PNGs. Default: <replicaDir>/diff."},floor:{type:"number",description:"Pass/fail score floor used for repair-tasks.json records. Default 0.99."},maxHeightDelta:{type:"number",description:"Height-gate tolerance in capture px (pre-crop |originH - replicaH|). Default 8."}},required:["originDir","replicaDir"]}},{name:"liberate_ingest_local_site",description:"Stage 1a of the owned-source path: ingest a local static-site directory (HTML/CSS/JS) and normalize each page into validated native Gutenberg block markup. Writes <outputDir>/composed/<slug>.blocks.html sidecars + <outputDir>/normalize-report.json. No Playwright/Studio. Downstream theme-scaffold/install/compare stages consume the sidecars.",inputSchema:{type:"object",properties:{dir:{type:"string",description:"Absolute path to the local static-site directory to ingest."},outputDir:{type:"string",description:"Liberation output directory for composed sidecars + normalize-report.json. Defaults to `dir`."},nativeBehaviors:{type:"boolean",description:"Detect catalog behaviors in the source css/js and emit dla/* Interactivity wrappers in the sidecars instead of core/group: uniform dla/reveal plus per-section DOM patterns (dla/tabs, dla/slider, dla/modal \u2014 verbatim inner markup). liberate_convert_local_site threads its own flag through here."}},required:["dir"]}},{name:"liberate_convert_local_site",description:"Stage 1b+1c of the owned-source path: full local-static-site \u2192 live Studio site. Reuses liberate_ingest_local_site (sidecars + normalize-report), optionally captures the source design (palette/typography/screenshots) and self-hosts Google Fonts, assembles the local block theme (core/navigation header from the nav graph, foundation-styled footer, no-title page templates), writes + activates it, creates WP Pages from the sidecars (idempotent via _source_url), sets the front page, assigns the page-local template, and optionally captures the WP replica + scores parity.",inputSchema:{type:"object",properties:{dir:{type:"string",description:"Absolute path to the local static-site directory."},studioSitePath:{type:"string",description:"Studio site path on host (e.g. ~/Studio/my-site \u2014 the dir studio site list prints, not wp-root)."},createSite:{type:"boolean",description:"Provision the Studio site via `studio site create` when none exists at studioSitePath (idempotent \u2014 an existing site is reused). Default false (errors if the site is absent). Admin creds via env WP_ADMIN_USER/WP_ADMIN_PASS; omitted \u2192 Studio auto-generates."},outputDir:{type:"string",description:"Liberation output dir for sidecars + reports. Defaults to `dir`."},themeSlug:{type:"string",description:"Theme slug (kebab-case). Default: local-site-theme."},siteTitle:{type:"string",description:"Site title for header/footer. Default: home page <title>."},skipDesign:{type:"boolean",description:"Skip source design capture (tokens/fonts) and compare; theme uses default styling."},skipCompare:{type:"boolean",description:"Skip the WP-replica screenshot + parity compare stage."},wpUrl:{type:"string",description:"Base URL for replica capture. Default: auto-resolved via wp option get siteurl (Studio assigns random ports); explicit value overrides."},carryCss:{type:"boolean",description:"Carry the source stylesheet into the theme (adapted for the block DOM). Default true \u2014 the stage-1d parity mechanism; tokens-only theming when false."},carryJs:{type:"boolean",description:"Carry the source scripts into the theme (enqueued footer, html.js gate added). Default true for identical replication."},nativeBehaviors:{type:"boolean",description:"Replace carried source JS with native Interactivity blocks (reveal, sticky, plus per-section tabs/slider/modal with verbatim inner markup); unmapped behaviors land in behavior-gaps.json. Forces carryJs off."},editableIslands:{type:"boolean",description:"Convert carried core/html islands into editable dla/editable-html blocks (text+image bindable, static-save, render-anywhere). Default true; set false to force plain core/html."},dataModel:{type:"boolean",description:"WordPress-driven data path: when a data-model.json (from the model-local-data skill) is present in outputDir/dir, register a CPT+taxonomy via generated mu-plugins, insert items idempotently, and replace empty JS-mount grids with native core/query loops (dla/data-card cards) while neutralizing the JS data-mounts and rebinding modal lookups to per-card DOM islands. Default on when the file exists; pass false to force off."},repair:{type:"boolean",description:"Deterministic parity repair loop: diff regions \u2192 computed-style probe \u2192 generated parity-patch.css \u2192 re-compare, bounded. Default true. No AI involved."},maxRepairRounds:{type:"number",description:"Max repair rounds (0-5). Default 2. Loop also stops early on allPass or an unchanged divergence fingerprint."},failOnConservationRailDrop:{type:"boolean",description:"Opt-in hard fail for local region-audit conservation: when true, unassigned nav/complementary rails with at least two links set isError. Default false (warn-only)."}},required:["dir","studioSitePath"]}},...JSON.parse(JSON.stringify(Object.entries(w2e).map(([e,t])=>({name:e,...t}))))]}));var cMt={liberate_compare:w_e,liberate_data_model_scaffold:Nke,liberate_design_foundation_save:Jke,liberate_design_foundation_scaffold:Mke,liberate_design_foundation_validate:$ke,liberate_detect:ste,liberate_discover:ute,liberate_block_transform_apply:fCe,liberate_block_compose:hCe,liberate_extract:xEe,liberate_extract_one:BEe,liberate_media_install:HEe,liberate_replicate_tick:eCe,liberate_import:rwe,liberate_inspect:lte,liberate_map_apis:BCe,liberate_preview:Nwe,liberate_install_theme:Pwe,liberate_theme_scaffold:u1e,liberate_probe:TCe,liberate_qa:SCe,liberate_replicate_inventory:r_e,liberate_replicate_verify:a_e,liberate_refine_report:C2e,liberate_screenshot:bBe,liberate_setup:LCe,liberate_paths:awe,liberate_status:nwe,liberate_verify:DCe,liberate_cluster_pages:v_e,liberate_section_extract:x_e,liberate_compose_instantiate:B_e,liberate_ingest_local_site:QD,liberate_convert_local_site:m2e,liberate_validate_artifacts:y2e,liberate_reconstruct_pages:sSe,liberate_reconstruct_pages_carry:gBe,liberate_blockify_wxr:yBe};function uMt(){return{adapters:oQe,findAdapter:oMt,textResult:aMt,errorResult:aQe,server:f1}}f1.setRequestHandler(Eb,async e=>{let{name:t,arguments:r}=e.params,n=cMt[t];return n?n(r??{},uMt()):aQe(`Unknown tool: ${t}`)});async function lMt(){let e=new xB,t=async()=>{await f1.close(),process.exit(0)};process.on("SIGINT",t),process.on("SIGTERM",t),await f1.connect(e)}lMt().catch(e=>{console.error(e),process.exit(1)}); /*! Bundled license information: undici/lib/web/fetch/body.js: diff --git a/packages/data-liberation-agent/dist/scripts/carry-reconstruct-drive.mjs b/packages/data-liberation-agent/dist/scripts/carry-reconstruct-drive.mjs index e0ea152a80..66aa00be71 100644 --- a/packages/data-liberation-agent/dist/scripts/carry-reconstruct-drive.mjs +++ b/packages/data-liberation-agent/dist/scripts/carry-reconstruct-drive.mjs @@ -3,7 +3,7 @@ const require = __bundleCreateRequire(import.meta.url); import{a as $,b as y,c as w,d as S}from"./chunk-ENWLFTGA.mjs";import"./chunk-4TKBPMF4.mjs";import{writeFileSync as g,existsSync as P,mkdirSync as O,copyFileSync as D}from"node:fs";import{join as r}from"node:path";function N(s){console.log(`pages: ${s.pages.length} (${s.pages.filter(o=>o.postType==="post").length} posts, home=${s.pages.some(o=>o.isHome)})`),s.excluded.length&&console.log(`excluded (${s.excluded.length}): ${s.excluded.map(o=>o.slug).join(", ")}`),s.skipped.length&&console.log(`skipped \u2014 no captured html (${s.skipped.length}): ${s.skipped.map(o=>`${o.postType}:${o.postName}`).join(", ")}`)}async function k(){let s=process.argv.slice(2),o=s.includes("--list"),m=s.includes("--slim"),[n,d,_="Liberated (Carry)"]=s.filter(t=>t!=="--list"&&t!=="--slim");if((!n||!o&&!m&&!d)&&(console.error(`usage: node scripts/run.mjs carry-reconstruct-drive <outputDir> --slim # slim output.wxr for provisioning (run BEFORE liberate_preview) node scripts/run.mjs carry-reconstruct-drive <outputDir> --list # inspect the carry page list (no handler) - node scripts/run.mjs carry-reconstruct-drive <outputDir> <studioSitePath> "<Theme Name>"`),process.exit(2)),m){let{dropped:t,flipped:C}=S(n);console.log(`slimmed: dropped ${t} attachment items, flipped ${C} draft->publish; full WXR preserved at output.wxr.full`);return}let b=(process.env.EXCLUDE??"").split(",").map(t=>t.trim()).filter(Boolean),c=$(n,{exclude:b});if(g(r(n,"carry-pages.json"),JSON.stringify(c.pages,null,2)),N(c),o){console.log(`wrote ${r(n,"carry-pages.json")}`);return}let{reconstructPagesCarryHandler:x}=await import("./chunk-RH45CRZA.mjs"),E={textResult:t=>({_data:t}),errorResult:t=>{throw new Error(`handler error: ${t}`)}},f=!/^(0|false)$/i.test(process.env.EDITABLE_ISLANDS??""),e=(await x({outputDir:n,studioSitePath:d,themeName:_,pages:c.pages,editableIslands:f},E))._data;console.log(`theme: ${e.themeSlug} media: ${e.mediaInstalled} mediaErrors: ${e.mediaErrors.length} fetchErrors: ${e.fetchErrors.length} missingMediaDownloaded: ${e.missingMediaDownloaded??0} fontsLocalized: ${e.fontsLocalized??0}`),e.missingMediaFailed?.length&&console.log(" missingMediaFailed:",JSON.stringify(e.missingMediaFailed)),e.fontsFailed?.length&&console.log(" fontsFailed:",JSON.stringify(e.fontsFailed)),f&&console.log(`editable islands: converted=${e.islandsConverted??0} plugin=${e.editableHtmlPluginSlug??"(none)"}`);let p=e.residualCdnAssets??0;console.log(`self-host audit: residualCdnAssets=${p}${p?` byHost=${JSON.stringify(e.residualCdnByHost)}`:" \u2713"}`),p&&console.log(" residualCdnSamples:",JSON.stringify(e.residualCdnSamples)),e.mediaErrors.length&&console.log(" mediaErrors sample:",JSON.stringify(e.mediaErrors.slice(0,3))),e.fetchErrors.length&&console.log(" fetchErrors:",JSON.stringify(e.fetchErrors));let i=r(d,"wp-content/uploads/_carry-islands");O(i,{recursive:!0});let u=e.pages.map(t=>t.slug),l=w(i,u);l.length&&console.log(` removed ${l.length} stale island(s): ${l.slice(0,8).join(", ")}${l.length>8?" \u2026":""}`);for(let t of e.pages)g(r(i,`${t.slug}.html`),t.postContent);let v=`<?php + node scripts/run.mjs carry-reconstruct-drive <outputDir> <studioSitePath> "<Theme Name>"`),process.exit(2)),m){let{dropped:t,flipped:C}=S(n);console.log(`slimmed: dropped ${t} attachment items, flipped ${C} draft->publish; full WXR preserved at output.wxr.full`);return}let b=(process.env.EXCLUDE??"").split(",").map(t=>t.trim()).filter(Boolean),c=$(n,{exclude:b});if(g(r(n,"carry-pages.json"),JSON.stringify(c.pages,null,2)),N(c),o){console.log(`wrote ${r(n,"carry-pages.json")}`);return}let{reconstructPagesCarryHandler:x}=await import("./chunk-Q5FWHB6M.mjs"),E={textResult:t=>({_data:t}),errorResult:t=>{throw new Error(`handler error: ${t}`)}},f=!/^(0|false)$/i.test(process.env.EDITABLE_ISLANDS??""),e=(await x({outputDir:n,studioSitePath:d,themeName:_,pages:c.pages,editableIslands:f},E))._data;console.log(`theme: ${e.themeSlug} media: ${e.mediaInstalled} mediaErrors: ${e.mediaErrors.length} fetchErrors: ${e.fetchErrors.length} missingMediaDownloaded: ${e.missingMediaDownloaded??0} fontsLocalized: ${e.fontsLocalized??0}`),e.missingMediaFailed?.length&&console.log(" missingMediaFailed:",JSON.stringify(e.missingMediaFailed)),e.fontsFailed?.length&&console.log(" fontsFailed:",JSON.stringify(e.fontsFailed)),f&&console.log(`editable islands: converted=${e.islandsConverted??0} plugin=${e.editableHtmlPluginSlug??"(none)"}`);let p=e.residualCdnAssets??0;console.log(`self-host audit: residualCdnAssets=${p}${p?` byHost=${JSON.stringify(e.residualCdnByHost)}`:" \u2713"}`),p&&console.log(" residualCdnSamples:",JSON.stringify(e.residualCdnSamples)),e.mediaErrors.length&&console.log(" mediaErrors sample:",JSON.stringify(e.mediaErrors.slice(0,3))),e.fetchErrors.length&&console.log(" fetchErrors:",JSON.stringify(e.fetchErrors));let i=r(d,"wp-content/uploads/_carry-islands");O(i,{recursive:!0});let u=e.pages.map(t=>t.slug),l=w(i,u);l.length&&console.log(` removed ${l.length} stale island(s): ${l.slice(0,8).join(", ")}${l.length>8?" \u2026":""}`);for(let t of e.pages)g(r(i,`${t.slug}.html`),t.postContent);let v=`<?php $dir = '/wordpress/wp-content/uploads/_carry-islands'; $slugs = ${JSON.stringify(u)}; foreach ($slugs as $slug) { diff --git a/packages/data-liberation-agent/dist/scripts/carry-replica-shots.mjs b/packages/data-liberation-agent/dist/scripts/carry-replica-shots.mjs index c5859dd89b..fa2b79d636 100644 --- a/packages/data-liberation-agent/dist/scripts/carry-replica-shots.mjs +++ b/packages/data-liberation-agent/dist/scripts/carry-replica-shots.mjs @@ -1,3 +1,3 @@ import { createRequire as __bundleCreateRequire } from 'node:module'; const require = __bundleCreateRequire(import.meta.url); -import{b as y}from"./chunk-6FIZQDM2.mjs";import"./chunk-4TKBPMF4.mjs";import{chromium as A}from"playwright";async function b(r,o,n){let s=new Array(r.length),i=0,t=async()=>{for(let e=i++;e<r.length;e=i++)s[e]=await n(r[e],e)},u=Math.max(1,Math.min(Math.floor(o)||1,r.length||1));return await Promise.all(Array.from({length:u},()=>t())),s}import{readFileSync as d,writeFileSync as N,mkdirSync as R,existsSync as T}from"node:fs";import{join as a}from"node:path";var[f,O,m]=process.argv.slice(2);(!f||!O||!m)&&(console.error("usage: node scripts/run.mjs carry-replica-shots <originDir> <carryBaseUrl> <replicaDir>"),process.exit(2));var v=JSON.parse(d(a(f,"screenshots/manifest.json"),"utf8")),x=v.entries||v,w=null,P=a(f,"carry-pages.json");if(T(P)){let r=JSON.parse(d(P,"utf8"));w=new Set(r.map(o=>o.htmlSlug).filter(o=>!!o))}var $=new Map,S=a(f,"redirect-map.json");if(T(S)){let r=JSON.parse(d(S,"utf8"));for(let o of r)$.set(o.from.replace(/\/$/,""),o.to)}var C=r=>$.get(r.replace(/\/$/,""))??r;R(a(m,"desktop"),{recursive:!0});R(a(m,"mobile"),{recursive:!0});async function U(r){await r.evaluate(async()=>{let n=Math.min(document.body.scrollHeight,window.innerHeight*2);for(let t=0;t<n;t+=600)window.scrollTo(0,t),await new Promise(u=>setTimeout(u,60));window.scrollTo(0,0);let s=Array.from(document.images).filter(t=>t.getBoundingClientRect().top<window.innerHeight*2),i=Promise.all(s.map(t=>t.complete?Promise.resolve():t.decode().catch(()=>{})));await Promise.race([i,new Promise(t=>setTimeout(t,4e3))])});let o=await r.evaluate(()=>!!document.querySelector(".lib-carry-mobile-frame"));await r.waitForTimeout(o?2500:400)}var M=Math.max(1,Math.min(12,Number(process.argv[5]??process.env.CONCURRENCY??6)||6)),j="Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",F=[{vp:{width:1440,height:900},scale:.7,dir:"desktop",mobile:!1},{vp:{width:390,height:844},scale:1,dir:"mobile",mobile:!0}];async function E(){let r=O.replace(/\/$/,""),o=await A.launch(),n=Object.entries(x).filter(([,e])=>e.slug&&(!w||w.has(e.slug))),s=new Map;for(let[e,c]of n)s.set(e,{slug:c.slug});let i=[];for(let[e,c]of n)for(let g of F)i.push({url:e,slug:c.slug,...g});let t=0;await b(i,M,async e=>{let c=new URL(e.url).pathname,g=await o.newContext(e.mobile?{viewport:e.vp,deviceScaleFactor:e.scale,isMobile:!0,hasTouch:!0,userAgent:j}:{viewport:e.vp,deviceScaleFactor:e.scale}),l=await g.newPage();await y(l);try{for(let h=1;;h++)try{await l.goto(r+C(c),{waitUntil:"load",timeout:45e3});break}catch(k){if(h>=3)throw k;await l.waitForTimeout(1500*h)}await U(l);let p=`${e.dir}/${e.slug}.png`;await l.screenshot({path:a(m,p),fullPage:!1}),s.get(e.url)[e.dir]=p}catch(p){t++,console.warn(` fail ${e.dir} ${c}: ${p.message.slice(0,60)}`)}await l.close(),await g.close()});let u={version:1,entries:Object.fromEntries(s)};N(a(m,"manifest.json"),JSON.stringify(u,null,2)),console.log(`captured ${s.size} urls (${t} viewport failures, concurrency ${M}) -> ${m}`),await o.close()}E().catch(r=>{console.error(r),process.exit(1)}); +import{b as y}from"./chunk-6FIZQDM2.mjs";import{a as b}from"./chunk-6FA2POBN.mjs";import"./chunk-4TKBPMF4.mjs";import{chromium as R}from"playwright";import{readFileSync as w,writeFileSync as U,mkdirSync as O,existsSync as $}from"node:fs";import{join as s}from"node:path";var[p,N,c]=process.argv.slice(2);(!p||!N||!c)&&(console.error("usage: node scripts/run.mjs carry-replica-shots <originDir> <carryBaseUrl> <replicaDir>"),process.exit(2));var v=JSON.parse(w(s(p,"screenshots/manifest.json"),"utf8")),j=v.entries||v,d=null,S=s(p,"carry-pages.json");if($(S)){let r=JSON.parse(w(S,"utf8"));d=new Set(r.map(i=>i.htmlSlug).filter(i=>!!i))}var T=new Map,P=s(p,"redirect-map.json");if($(P)){let r=JSON.parse(w(P,"utf8"));for(let i of r)T.set(i.from.replace(/\/$/,""),i.to)}var k=r=>T.get(r.replace(/\/$/,""))??r;O(s(c,"desktop"),{recursive:!0});O(s(c,"mobile"),{recursive:!0});async function A(r){await r.evaluate(async()=>{let l=Math.min(document.body.scrollHeight,window.innerHeight*2);for(let t=0;t<l;t+=600)window.scrollTo(0,t),await new Promise(f=>setTimeout(f,60));window.scrollTo(0,0);let o=Array.from(document.images).filter(t=>t.getBoundingClientRect().top<window.innerHeight*2),m=Promise.all(o.map(t=>t.complete?Promise.resolve():t.decode().catch(()=>{})));await Promise.race([m,new Promise(t=>setTimeout(t,4e3))])});let i=await r.evaluate(()=>!!document.querySelector(".lib-carry-mobile-frame"));await r.waitForTimeout(i?2500:400)}var M=Math.max(1,Math.min(12,Number(process.argv[5]??process.env.CONCURRENCY??6)||6)),F="Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",E=[{vp:{width:1440,height:900},scale:.7,dir:"desktop",mobile:!1},{vp:{width:390,height:844},scale:1,dir:"mobile",mobile:!0}];async function x(){let r=N.replace(/\/$/,""),i=await R.launch(),l=Object.entries(j).filter(([,e])=>e.slug&&(!d||d.has(e.slug))),o=new Map;for(let[e,a]of l)o.set(e,{slug:a.slug});let m=[];for(let[e,a]of l)for(let u of E)m.push({url:e,slug:a.slug,...u});let t=0;await b(m,M,async e=>{let a=new URL(e.url).pathname,u=await i.newContext(e.mobile?{viewport:e.vp,deviceScaleFactor:e.scale,isMobile:!0,hasTouch:!0,userAgent:F}:{viewport:e.vp,deviceScaleFactor:e.scale}),n=await u.newPage();await y(n);try{for(let h=1;;h++)try{await n.goto(r+k(a),{waitUntil:"load",timeout:45e3});break}catch(C){if(h>=3)throw C;await n.waitForTimeout(1500*h)}await A(n);let g=`${e.dir}/${e.slug}.png`;await n.screenshot({path:s(c,g),fullPage:!1}),o.get(e.url)[e.dir]=g}catch(g){t++,console.warn(` fail ${e.dir} ${a}: ${g.message.slice(0,60)}`)}await n.close(),await u.close()});let f={version:1,entries:Object.fromEntries(o)};U(s(c,"manifest.json"),JSON.stringify(f,null,2)),console.log(`captured ${o.size} urls (${t} viewport failures, concurrency ${M}) -> ${c}`),await i.close()}x().catch(r=>{console.error(r),process.exit(1)}); diff --git a/packages/data-liberation-agent/dist/scripts/chunk-4VYPWNND.mjs b/packages/data-liberation-agent/dist/scripts/chunk-4VYPWNND.mjs deleted file mode 100644 index a2e7dede5c..0000000000 --- a/packages/data-liberation-agent/dist/scripts/chunk-4VYPWNND.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import { createRequire as __bundleCreateRequire } from 'node:module'; -const require = __bundleCreateRequire(import.meta.url); -import{c as h}from"./chunk-LFW5THTQ.mjs";import{readFileSync as x}from"node:fs";var w=[{name:"loox",selector:'#looxReviews, .loox-reviews, [id^="looxReviews"], [data-loox]'},{name:"yotpo",selector:'.yotpo, [class*="yotpo-"]'},{name:"judgeme",selector:".jdgm-widget, .jdgm-rev-widg, [data-jdgm-widget]"},{name:"okendo",selector:"[data-oke-widget], .okeReviews"},{name:"stamped",selector:"#stamped-main-widget, .stamped-main-widget"},{name:"reviews-io",selector:"#reviewsio-carousel-widget, .ruk_rating_snippet"},{name:"zendesk",selector:'iframe[src*="zendesk"], [id*="zendesk"]'},{name:"gorgias",selector:'iframe[src*="gorgias"]'},{name:"elfsight",selector:'[class*="elfsight-app"]'}],R=w.map(t=>t.selector).join(", ");function C(t,n){let o=h(t);o("script, style, noscript, template, svg").remove();let i=o("body"),e=w.find(c=>i.find(c.selector).length>0)?.name??null,s=i.find("iframe[src]").toArray().some(c=>{let r=o(c).attr("src")||"";if(!/^https?:\/\//i.test(r))return!1;try{return!n||new URL(r).origin!==n}catch{return!0}}),p=i.clone();p.find('header, nav, footer, [role="banner"], [role="contentinfo"], [role="navigation"]').remove();let l=p.text().replace(/\s+/g," ").trim().length,g=l<200,u=s?"iframe":e?"app-widget":g?"thin":"ok",a=s?"cross-origin <iframe> body":e||`${l} chars of body text`;return{empty:g,reason:u,detail:a,widget:e,crossOriginIframe:s,mainTextLen:l}}function S(t){try{let n=x(t);if(n.length<24||n.readUInt32BE(0)!==2303741511||n.toString("latin1",12,16)!=="IHDR")return null;let o=n.readUInt32BE(20);return o>0&&o<=2e5?o:null}catch{return null}}var P=1e3,k=.5;function F(t){let n=t.map(e=>e.height).filter(e=>e!==null).sort((e,s)=>e-s),o=n.length?n[Math.floor(n.length/2)]:0,i=[];for(let e of t){let s=o>0&&e.height!==null&&e.height<o*k;if(!(e.height!==null?s&&e.assess.mainTextLen<P:e.assess.empty))continue;let l=e.assess.crossOriginIframe?"iframe":e.assess.widget?"app-widget":e.height!==null?"short-render":"thin",m=e.assess.crossOriginIframe?e.assess.detail:e.assess.widget?e.assess.widget:e.height!==null?`rendered ${e.height}px vs median ${o}px`:e.assess.detail;i.push({slug:e.slug,reason:l,detail:m})}return i}import{readFileSync as T}from"node:fs";import{join as f}from"node:path";function y(t){try{return JSON.parse(T(t,"utf8"))}catch{return null}}function b(t){return(t.split(",")[0]||"").trim().replace(/["']/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"font"}function E(t){return(t.split(",")[0]||"").trim().replace(/["']/g,"")||t}function L(t,n=8){let o=y(f(t,"palette.json")),i=Array.isArray(o?.colors)?o.colors:[],e=[],s=[];for(let a of i){if(!a?.hex||!/^#?(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(a.hex))continue;let c=`c${e.length+1}`,r=a.hex.startsWith("#")?a.hex:`#${a.hex}`;if(e.push({slug:c,hex:r}),s.push({slug:c,name:`Replica ${e.length}`,color:r}),e.length>=n)break}let l=y(f(t,"typography.json"))?.bySelector??{},m=new Set,g=[],u=[];for(let a of Object.values(l))for(let c of a??[]){let r=(c?.fontFamily||"").trim();if(!r)continue;let d=b(r);m.has(d)||(m.add(d),g.push({slug:d,family:r}),u.push({slug:d,name:E(r),fontFamily:r}))}return{paletteTokens:e,fontFamilies:g,themeJsonPalette:s,themeJsonFontFamilies:u}}async function B(){try{return await import("playwright")}catch{throw new Error("Playwright is required but is not installed. Run `npm install playwright` and `npx playwright install chromium` to set it up.")}}export{B as a,C as b,S as c,F as d,L as e}; diff --git a/packages/data-liberation-agent/dist/scripts/chunk-6FA2POBN.mjs b/packages/data-liberation-agent/dist/scripts/chunk-6FA2POBN.mjs new file mode 100644 index 0000000000..1d5874d69b --- /dev/null +++ b/packages/data-liberation-agent/dist/scripts/chunk-6FA2POBN.mjs @@ -0,0 +1,3 @@ +import { createRequire as __bundleCreateRequire } from 'node:module'; +const require = __bundleCreateRequire(import.meta.url); +async function u(e,r,n){let i=new Array(e.length),t=0,a=async()=>{for(let o=t++;o<e.length;o=t++)i[o]=await n(e[o],o)},s=Math.max(1,Math.min(Math.floor(r)||1,e.length||1));return await Promise.all(Array.from({length:s},()=>a())),i}var m=class extends Error{label;constructor(r,n){super(`${r} timed out after ${n}ms`),this.name="TimeoutError",this.label=r}};async function c(e,r,n,i){let t,a=!1,s=new Promise((o,l)=>{t=setTimeout(()=>{a=!0,l(new m(n,r))},r)});try{return await Promise.race([e,s])}finally{t&&clearTimeout(t),a&&i&&e.then(i).catch(()=>{})}}export{u as a,c as b}; diff --git a/packages/data-liberation-agent/dist/scripts/chunk-RH45CRZA.mjs b/packages/data-liberation-agent/dist/scripts/chunk-Q5FWHB6M.mjs similarity index 66% rename from packages/data-liberation-agent/dist/scripts/chunk-RH45CRZA.mjs rename to packages/data-liberation-agent/dist/scripts/chunk-Q5FWHB6M.mjs index 5bc52b7dac..6a9ae8e721 100644 --- a/packages/data-liberation-agent/dist/scripts/chunk-RH45CRZA.mjs +++ b/packages/data-liberation-agent/dist/scripts/chunk-Q5FWHB6M.mjs @@ -1,84 +1,84 @@ import { createRequire as __bundleCreateRequire } from 'node:module'; const require = __bundleCreateRequire(import.meta.url); -import{a as Vs,b as Js,c as Ys,e as Qs,f as Ks,g as Xs}from"./chunk-5TGR3JN3.mjs";import{c as ti}from"./chunk-ENWLFTGA.mjs";import{a as ri,b as ni,c as si,d as ii,e as oi}from"./chunk-4VYPWNND.mjs";import"./chunk-2JVHGDER.mjs";import{a as lr,b as ur,c as ee,d as nn,e as sn,l as Zs,m as ei}from"./chunk-LFW5THTQ.mjs";import{a as cr}from"./chunk-Z226PWLO.mjs";import{b as bt}from"./chunk-Y7SDG6HL.mjs";import{a as Me,b as _,d as ar}from"./chunk-4TKBPMF4.mjs";var ln=_((Tm,an)=>{var dr=process||{},mi=dr.argv||[],hr=dr.env||{},xu=!(hr.NO_COLOR||mi.includes("--no-color"))&&(!!hr.FORCE_COLOR||mi.includes("--color")||dr.platform==="win32"||(dr.stdout||{}).isTTY&&hr.TERM!=="dumb"||!!hr.CI),Eu=(n,e,t=n)=>r=>{let s=""+r,i=s.indexOf(e,n.length);return~i?n+Ou(s,e,t,i)+e:n+s+e},Ou=(n,e,t,r)=>{let s="",i=0;do s+=n.substring(i,r)+t,i=r+e.length,r=n.indexOf(e,i);while(~r);return s+n.substring(i)},yi=(n=xu)=>{let e=n?Eu:()=>String;return{isColorSupported:n,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};an.exports=yi();an.exports.createColors=yi});var un=_((Im,wi)=>{"use strict";var gr=/[\t\n\f\r "#'()/;[\\\]{}]/g,mr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cu=/.[\r\n"'(/\\]/,vi=/[\da-f]/i;wi.exports=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,i,o,l,a,u,c,f,p,g,h,y=r.length,d=0,m=[],w=[],C=-1;function I(){return d}function T(Q){throw e.error("Unclosed "+Q,d)}function R(){return w.length===0&&d>=y}function G(Q){if(w.length)return w.pop();if(d>=y)return;let P=Q?Q.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{a=d;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);c=["space",r.slice(d,a)],d=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let B=String.fromCharCode(i);c=[B,B,d];break}case 40:{if(h=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),h==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){a=d;do{if(f=!1,a=r.indexOf(")",a+1),a===-1)if(s||P){a=d;break}else T("bracket");for(p=a;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);c=["brackets",r.slice(d,a+1),d,a],d=a}else d<=C?c=["(","(",d]:(a=r.indexOf(")",d+1),o=r.slice(d,a+1),a===-1||Cu.test(o)?(C=a===-1?y:a,c=["(","(",d]):(c=["brackets",o,d,a],d=a));break}case 39:case 34:{u=i===39?"'":'"',a=d;do{if(f=!1,a=r.indexOf(u,a+1),a===-1)if(s||P){a=d+1;break}else T("string");for(p=a;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);c=["string",r.slice(d,a+1),d,a],d=a;break}case 64:{gr.lastIndex=d+1,gr.test(r),gr.lastIndex===0?a=r.length-1:a=gr.lastIndex-2,c=["at-word",r.slice(d,a+1),d,a],d=a;break}case 92:{for(a=d,l=!0;r.charCodeAt(a+1)===92;)a+=1,l=!l;if(i=r.charCodeAt(a+1),l&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,vi.test(r.charAt(a)))){for(;vi.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}c=["word",r.slice(d,a+1),d,a],d=a;break}default:{i===47&&r.charCodeAt(d+1)===42?(a=r.indexOf("*/",d+2)+1,a===0&&(s||P?a=r.length:T("comment")),c=["comment",r.slice(d,a+1),d,a],d=a):(mr.lastIndex=d+1,mr.test(r),mr.lastIndex===0?a=r.length-1:a=mr.lastIndex-2,c=["word",r.slice(d,a+1),d,a],m.push(c),d=a);break}}return d++,c}function q(Q){w.push(Q)}return{back:q,endOfFile:R,nextToken:G,position:I}}});var cn=_((Am,Si)=>{"use strict";var Z=ln(),Pu=un(),bi;function Tu(n){bi=n}var Iu={";":Z.yellow,":":Z.yellow,"(":Z.cyan,")":Z.cyan,"[":Z.yellow,"]":Z.yellow,"{":Z.yellow,"}":Z.yellow,"at-word":Z.cyan,brackets:Z.cyan,call:Z.cyan,class:Z.yellow,comment:Z.gray,hash:Z.magenta,string:Z.green};function Au([n,e],t){if(n==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!t.endOfFile()){let r=t.nextToken();if(t.back(r),r[0]==="brackets"||r[0]==="(")return"call"}return n}function _i(n){let e=Pu(new bi(n),{ignoreErrors:!0}),t="";for(;!e.endOfFile();){let r=e.nextToken(),s=Iu[Au(r,e)];s?t+=r[1].split(/\r?\n/).map(i=>s(i)).join(` -`):t+=r[1]}return t}_i.registerInput=Tu;Si.exports=_i});var yr=_((Rm,Oi)=>{"use strict";var xi=ln(),Ei=cn(),St=class n extends Error{constructor(e,t,r,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=xi.isColorSupported);let r=c=>c,s=c=>c,i=c=>c;if(e){let{bold:c,gray:f,red:p}=xi.createColors(!0);s=g=>c(p(g)),r=g=>f(g),Ei&&(i=g=>Ei(g))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),u=String(a).length;return o.slice(l,a).map((c,f)=>{let p=l+1+f,g=" "+(" "+p).slice(-u)+" | ";if(p===this.line){if(c.length>160){let y=20,d=Math.max(0,this.column-y),m=Math.max(this.column+y,this.endColumn+y),w=c.slice(d,m),C=r(g.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return s(">")+r(g)+i(w)+` +import{a as Ys,b as Qs,c as Ks,e as Xs,f as Zs,g as ei}from"./chunk-5TGR3JN3.mjs";import{c as ni}from"./chunk-ENWLFTGA.mjs";import{a as si,b as ii,c as oi,d as ai,e as li}from"./chunk-V2C54GCK.mjs";import"./chunk-2JVHGDER.mjs";import{a as cr,b as fr,c as ee,d as sn,e as on,l as ti,m as ri}from"./chunk-LFW5THTQ.mjs";import{b as St}from"./chunk-6FA2POBN.mjs";import{a as pr}from"./chunk-Z226PWLO.mjs";import{b as _t}from"./chunk-Y7SDG6HL.mjs";import{a as Me,b as _,d as ur}from"./chunk-4TKBPMF4.mjs";var un=_((Dm,ln)=>{var mr=process||{},vi=mr.argv||[],gr=mr.env||{},Cu=!(gr.NO_COLOR||vi.includes("--no-color"))&&(!!gr.FORCE_COLOR||vi.includes("--color")||mr.platform==="win32"||(mr.stdout||{}).isTTY&&gr.TERM!=="dumb"||!!gr.CI),Pu=(n,e,t=n)=>r=>{let s=""+r,i=s.indexOf(e,n.length);return~i?n+Tu(s,e,t,i)+e:n+s+e},Tu=(n,e,t,r)=>{let s="",i=0;do s+=n.substring(i,r)+t,i=r+e.length,r=n.indexOf(e,i);while(~r);return s+n.substring(i)},wi=(n=Cu)=>{let e=n?Pu:()=>String;return{isColorSupported:n,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ln.exports=wi();ln.exports.createColors=wi});var cn=_((Fm,_i)=>{"use strict";var yr=/[\t\n\f\r "#'()/;[\\\]{}]/g,vr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Iu=/.[\r\n"'(/\\]/,bi=/[\da-f]/i;_i.exports=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,i,o,l,a,u,c,f,p,g,h,y=r.length,d=0,m=[],w=[],C=-1;function I(){return d}function T(Q){throw e.error("Unclosed "+Q,d)}function A(){return w.length===0&&d>=y}function G(Q){if(w.length)return w.pop();if(d>=y)return;let P=Q?Q.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{a=d;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);c=["space",r.slice(d,a)],d=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let B=String.fromCharCode(i);c=[B,B,d];break}case 40:{if(h=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),h==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){a=d;do{if(f=!1,a=r.indexOf(")",a+1),a===-1)if(s||P){a=d;break}else T("bracket");for(p=a;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);c=["brackets",r.slice(d,a+1),d,a],d=a}else d<=C?c=["(","(",d]:(a=r.indexOf(")",d+1),o=r.slice(d,a+1),a===-1||Iu.test(o)?(C=a===-1?y:a,c=["(","(",d]):(c=["brackets",o,d,a],d=a));break}case 39:case 34:{u=i===39?"'":'"',a=d;do{if(f=!1,a=r.indexOf(u,a+1),a===-1)if(s||P){a=d+1;break}else T("string");for(p=a;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);c=["string",r.slice(d,a+1),d,a],d=a;break}case 64:{yr.lastIndex=d+1,yr.test(r),yr.lastIndex===0?a=r.length-1:a=yr.lastIndex-2,c=["at-word",r.slice(d,a+1),d,a],d=a;break}case 92:{for(a=d,l=!0;r.charCodeAt(a+1)===92;)a+=1,l=!l;if(i=r.charCodeAt(a+1),l&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,bi.test(r.charAt(a)))){for(;bi.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}c=["word",r.slice(d,a+1),d,a],d=a;break}default:{i===47&&r.charCodeAt(d+1)===42?(a=r.indexOf("*/",d+2)+1,a===0&&(s||P?a=r.length:T("comment")),c=["comment",r.slice(d,a+1),d,a],d=a):(vr.lastIndex=d+1,vr.test(r),vr.lastIndex===0?a=r.length-1:a=vr.lastIndex-2,c=["word",r.slice(d,a+1),d,a],m.push(c),d=a);break}}return d++,c}function q(Q){w.push(Q)}return{back:q,endOfFile:A,nextToken:G,position:I}}});var fn=_((Um,Ei)=>{"use strict";var Z=un(),Ru=cn(),Si;function Au(n){Si=n}var ku={";":Z.yellow,":":Z.yellow,"(":Z.cyan,")":Z.cyan,"[":Z.yellow,"]":Z.yellow,"{":Z.yellow,"}":Z.yellow,"at-word":Z.cyan,brackets:Z.cyan,call:Z.cyan,class:Z.yellow,comment:Z.gray,hash:Z.magenta,string:Z.green};function Mu([n,e],t){if(n==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!t.endOfFile()){let r=t.nextToken();if(t.back(r),r[0]==="brackets"||r[0]==="(")return"call"}return n}function xi(n){let e=Ru(new Si(n),{ignoreErrors:!0}),t="";for(;!e.endOfFile();){let r=e.nextToken(),s=ku[Mu(r,e)];s?t+=r[1].split(/\r?\n/).map(i=>s(i)).join(` +`):t+=r[1]}return t}xi.registerInput=Au;Ei.exports=xi});var wr=_((jm,Pi)=>{"use strict";var Oi=un(),Ci=fn(),Et=class n extends Error{constructor(e,t,r,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Oi.isColorSupported);let r=c=>c,s=c=>c,i=c=>c;if(e){let{bold:c,gray:f,red:p}=Oi.createColors(!0);s=g=>c(p(g)),r=g=>f(g),Ci&&(i=g=>Ci(g))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),u=String(a).length;return o.slice(l,a).map((c,f)=>{let p=l+1+f,g=" "+(" "+p).slice(-u)+" | ";if(p===this.line){if(c.length>160){let y=20,d=Math.max(0,this.column-y),m=Math.max(this.column+y,this.endColumn+y),w=c.slice(d,m),C=r(g.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return s(">")+r(g)+i(w)+` `+C+s("^")}let h=r(g.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(g)+i(c)+` `+h+s("^")}return" "+r(g)+i(c)}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` -`),this.name+": "+this.message+e}};Oi.exports=St;St.default=St});var fn=_((km,Ai)=>{"use strict";var Ru=/(<)(\/?style\b)/gi,ku=/(<)(!--)/g,Mu=/[\t\n\f\r "#'()/;[\\\]{}]/;function ue(n){return typeof n!="string"||!n.includes("<")?n:n.replace(Ru,"\\3c $2").replace(ku,"\\3c $2")}var Ci={after:` +`),this.name+": "+this.message+e}};Pi.exports=Et;Et.default=Et});var pn=_(($m,ki)=>{"use strict";var Lu=/(<)(\/?style\b)/gi,Nu=/(<)(!--)/g,Du=/[\t\n\f\r "#'()/;[\\\]{}]/;function ue(n){return typeof n!="string"||!n.includes("<")?n:n.replace(Lu,"\\3c $2").replace(Nu,"\\3c $2")}var Ti={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` -`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Lu(n){return n[0].toUpperCase()+n.slice(1)}function Pi(n,e){let t="@"+e.name,r=e.params?n.rawValue(e,"params"):"",s=e.raws.afterName;return typeof s>"u"?s=r?" ":"":s===""&&r&&!Mu.test(r[0])&&(s=" "),t+s+r}function Ii(n,e,t){let r=t.nodes,s=r.length-1;for(;s>0&&r[s].type==="comment";)s-=1;let i=n.raw(t,"semicolon"),o=t.type==="document";for(let l=r.length-1;l>=0;l--){let a=r[l],u=s!==l||i;!u&&l<r.length-1&&(a.type==="atrule"&&!a.nodes||a.type==="decl"&&a.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:a,semicolon:u})}}function Ti(n,e,t,r){let s=n.raw(t,"between","beforeOpen");n.builder(ue(r+s)+"{",t,"start");let i=t.nodes&&t.nodes.length,o=()=>{let l=i?n.raw(t,"after"):n.raw(t,"after","emptyBody");l&&n.builder(ue(l)),n.builder("}",t,"end"),t.type==="rule"&&t.raws.ownSemicolon&&n.builder(ue(t.raws.ownSemicolon),t,"end")};i?(e.push(o),Ii(n,e,t)):o()}var xt=class n{constructor(e){this.builder=e}atrule(e,t){let r=Pi(this,e);if(e.nodes)this.block(e,r);else{let s=(e.raws.between||"")+(t?";":"");this.builder(ue(r+s),e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(r.includes(` -`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(ue(t+r)+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(ue(s)),this.builder("}",e,"end")}body(e){let t=n.prototype,r=["atrule","block","body","rule","stringify"].every(i=>this[i]===t[i]),s=[];for(Ii(this,s,e);s.length>0;){let i=s.pop();if(typeof i=="function"){i();continue}let o=i.node,l=this.raw(o,"before");l&&this.builder(i.document?l:ue(l)),r&&o.type==="rule"?Ti(this,s,o,this.rawValue(o,"selector")):r&&o.type==="atrule"&&o.nodes?Ti(this,s,o,Pi(this,o)):this.stringify(o,i.semicolon)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(ue("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,s=this.raw(e,"between","colon"),i=e.prop+s+this.rawValue(e,"value");e.important&&(i+=r.important||" !important"),t&&(i+=";"),this.builder(ue(i),e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s<"u"))return s;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Ci[r];let o=e.root(),l=o.rawCache||(o.rawCache={});if(typeof l[r]<"u")return l[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Lu(r);this[a]?s=this[a](o,e):o.walk(u=>{if(s=u.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Ci[r]),l[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(` +`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Fu(n){return n[0].toUpperCase()+n.slice(1)}function Ii(n,e){let t="@"+e.name,r=e.params?n.rawValue(e,"params"):"",s=e.raws.afterName;return typeof s>"u"?s=r?" ":"":s===""&&r&&!Du.test(r[0])&&(s=" "),t+s+r}function Ai(n,e,t){let r=t.nodes,s=r.length-1;for(;s>0&&r[s].type==="comment";)s-=1;let i=n.raw(t,"semicolon"),o=t.type==="document";for(let l=r.length-1;l>=0;l--){let a=r[l],u=s!==l||i;!u&&l<r.length-1&&(a.type==="atrule"&&!a.nodes||a.type==="decl"&&a.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:a,semicolon:u})}}function Ri(n,e,t,r){let s=n.raw(t,"between","beforeOpen");n.builder(ue(r+s)+"{",t,"start");let i=t.nodes&&t.nodes.length,o=()=>{let l=i?n.raw(t,"after"):n.raw(t,"after","emptyBody");l&&n.builder(ue(l)),n.builder("}",t,"end"),t.type==="rule"&&t.raws.ownSemicolon&&n.builder(ue(t.raws.ownSemicolon),t,"end")};i?(e.push(o),Ai(n,e,t)):o()}var Ot=class n{constructor(e){this.builder=e}atrule(e,t){let r=Ii(this,e);if(e.nodes)this.block(e,r);else{let s=(e.raws.between||"")+(t?";":"");this.builder(ue(r+s),e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(r.includes(` +`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(ue(t+r)+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(ue(s)),this.builder("}",e,"end")}body(e){let t=n.prototype,r=["atrule","block","body","rule","stringify"].every(i=>this[i]===t[i]),s=[];for(Ai(this,s,e);s.length>0;){let i=s.pop();if(typeof i=="function"){i();continue}let o=i.node,l=this.raw(o,"before");l&&this.builder(i.document?l:ue(l)),r&&o.type==="rule"?Ri(this,s,o,this.rawValue(o,"selector")):r&&o.type==="atrule"&&o.nodes?Ri(this,s,o,Ii(this,o)):this.stringify(o,i.semicolon)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(ue("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,s=this.raw(e,"between","colon"),i=e.prop+s+this.rawValue(e,"value");e.important&&(i+=r.important||" !important"),t&&(i+=";"),this.builder(ue(i),e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s<"u"))return s;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Ti[r];let o=e.root(),l=o.rawCache||(o.rawCache={});if(typeof l[r]<"u")return l[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Fu(r);this[a]?s=this[a](o,e):o.walk(u=>{if(s=u.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=Ti[r]),l[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(` `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(` `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` -`);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){if(e.source&&e.source.input.hasBOM&&this.builder("\uFEFF",e,"start"),this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?t:ue(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(ue(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};Ai.exports=xt;xt.default=xt});var Et=_((Mm,Ri)=>{"use strict";var Nu=fn();function pn(n,e){new Nu(e).stringify(n)}Ri.exports=pn;pn.default=pn});var Ot=_((Lm,hn)=>{"use strict";hn.exports.isClean=Symbol("isClean");hn.exports.my=Symbol("my")});var Tt=_((Nm,ki)=>{"use strict";var Du=yr(),Fu=fn(),Uu=Et(),{isClean:Ct,my:ju}=Ot();function $u(n,e){let t=new n.constructor,r=[[n,t,e]];for(;r.length>0;){let[s,i,o]=r.pop();for(let l in s){if(!Object.prototype.hasOwnProperty.call(s,l)||l==="proxyCache")continue;let a=s[l],u=typeof a;if(l==="parent"&&u==="object")o&&(i[l]=o);else if(l==="source")i[l]=a;else if(Array.isArray(a)){let c=[];i[l]=c;for(let f of a){let p=new f.constructor;c.push(p),r.push([f,p,i])}}else{if(u==="object"&&a!==null){let c=new a.constructor;r.push([a,c,void 0]),a=c}i[l]=a}}}return t}function he(n,e){if(e&&typeof e.offset<"u")return e.offset;let t=1,r=1,s=0;for(let i=0;i<n.length;i++){if(r===e.line&&t===e.column){s=i;break}n[i]===` -`?(t=1,r+=1):t+=1}return s}var Pt=class n{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ct]=!1,this[ju]=!0;for(let t of Object.keys(e))if(t!=="__proto__")if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=$u(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Du(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ct]=!0}markDirty(){if(this[Ct]){this[Ct]=!1;let e=this;for(;e=e.parent;)e[Ct]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(e){let t=this.source.start.column,r=this.source.start.line,s="document"in this.source.input?this.source.input.document:this.source.input.css,i=he(s,this.source.start),o=i+e;for(let l=i;l<o;l++)s[l]===` -`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:he(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),s=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:he(t,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line,offset:he(t,e.end)}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):typeof e.index=="number"&&(s=this.positionInside(e.index+1));return(s.line<r.line||s.line===r.line&&s.column<=r.column)&&(s={column:r.column+1,line:r.line,offset:r.offset+1}),{end:s,start:r}}raw(e,t){return new Fu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r=t==null;t=t||new Map;let s=[],i=[[this,s,0]];for(let l=0;l<i.length;l++){let[a,u,c]=i[l],f={};u[c]=f;for(let p in a){if(!Object.prototype.hasOwnProperty.call(a,p)||p==="parent"||p==="proxyCache")continue;let g=a[p];if(Array.isArray(g)){let h=[];f[p]=h;for(let y=0;y<g.length;y++){let d=g[y];typeof d=="object"&&d.toJSON?d.toJSON===n.prototype.toJSON?i.push([d,h,y]):h[y]=d.toJSON(null,t):h[y]=d}}else if(typeof g=="object"&&g.toJSON)g.toJSON===n.prototype.toJSON?i.push([g,f,p]):f[p]=g.toJSON(null,t);else if(p==="source"){if(g==null)continue;let h=t.get(g.input);h==null&&(h=t.size,t.set(g.input,h)),f[p]={end:g.end,inputId:h,start:g.start}}else f[p]=g}}let o=s[0];return r&&(o.inputs=[...t.keys()].map(l=>l.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Uu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let s={node:this};for(let i in r)s[i]=r[i];return e.warn(t,s)}};ki.exports=Pt;Pt.default=Pt});var At=_((Dm,Mi)=>{"use strict";var qu=Tt(),It=class extends qu{constructor(e){super(e),this.type="comment"}};Mi.exports=It;It.default=It});var kt=_((Fm,Li)=>{"use strict";var Bu=Tt(),Rt=class extends Bu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Li.exports=Rt;Rt.default=Rt});var be=_((Um,Bi)=>{"use strict";var Di=At(),Fi=kt(),Ni=Tt(),{isClean:Ui,my:ji}=Ot(),dn,$i,qi,gn;function Hu(n){let e=n.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let r of t.nodes)e.push(r)}}return n.slice()}function zu(n){let e=[n];for(;e.length>0;){let t=e.pop();if(t[Ui]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e.push(r)}}var de=class n extends Ni{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){let t=[this];for(;t.length>0;){let r=t.pop();if(r!==this&&r.cleanRaws!==n.prototype.cleanRaws){r.cleanRaws(e);continue}if(Ni.prototype.cleanRaws.call(r,e),r.nodes)for(let s of r.nodes)t.push(s)}}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...i)=>r(s.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,i=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Hu($i(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Fi(e)]}else if(e.selector||e.selectors)e=[new gn(e)];else if(e.name)e=[new dn(e)];else if(e.text)e=[new Di(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[ji]||n.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Ui]&&zu(s),s.raws||(s.raws={}),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){if(!this.proxyOf.nodes)return;let t=[{iterator:this.getIterator(),node:this.proxyOf}];for(;t.length>0;){let{iterator:r,node:s}=t[t.length-1],i=s.indexes[r];if(i>=s.proxyOf.nodes.length){delete s.indexes[r],t.pop();let a=t[t.length-1];a&&(a.node.indexes[a.iterator]+=1);continue}let o=s.proxyOf.nodes[i],l;try{l=e(o,i)}catch(a){throw o.addToError(a)}if(l===!1){for(let a of t)delete a.node.indexes[a.iterator];return!1}o.walk&&o.proxyOf.nodes?t.push({iterator:o.getIterator(),node:o}):s.indexes[r]+=1}}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}};de.registerParse=n=>{$i=n};de.registerRule=n=>{gn=n};de.registerAtRule=n=>{dn=n};de.registerRoot=n=>{qi=n};Bi.exports=de;de.default=de;de.rebuild=n=>{let e=[n];for(;e.length>0;){let t=e.pop();if(t.type==="atrule"?Object.setPrototypeOf(t,dn.prototype):t.type==="rule"?Object.setPrototypeOf(t,gn.prototype):t.type==="decl"?Object.setPrototypeOf(t,Fi.prototype):t.type==="comment"?Object.setPrototypeOf(t,Di.prototype):t.type==="root"&&Object.setPrototypeOf(t,qi.prototype),t[ji]=!0,t.nodes)for(let r of t.nodes)e.push(r)}}});var vr=_((jm,zi)=>{"use strict";var Hi=be(),tt=class extends Hi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};zi.exports=tt;tt.default=tt;Hi.registerAtRule(tt)});var wr=_(($m,Vi)=>{"use strict";var Wu=be(),Wi,Gi,Le=class extends Wu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Wi(new Gi,this,e).stringify()}};Le.registerLazyResult=n=>{Wi=n};Le.registerProcessor=n=>{Gi=n};Vi.exports=Le;Le.default=Le});var Yi=_((qm,Ji)=>{var Gu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Vu=(n,e=21)=>(t=e)=>{let r="",s=t|0;for(;s-- >0;)r+=n[Math.random()*n.length|0];return r},Ju=(n=21)=>{let e="",t=n|0;for(;t-- >0;)e+=Gu[Math.random()*64|0];return e};Ji.exports={nanoid:Ju,customAlphabet:Vu}});var Ki=_(mn=>{var Qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");mn.encode=function(n){if(0<=n&&n<Qi.length)return Qi[n];throw new TypeError("Must be between 0 and 63: "+n)};mn.decode=function(n){var e=65,t=90,r=97,s=122,i=48,o=57,l=43,a=47,u=26,c=52;return e<=n&&n<=t?n-e:r<=n&&n<=s?n-r+u:i<=n&&n<=o?n-i+c:n==l?62:n==a?63:-1}});var wn=_(vn=>{var Xi=Ki(),yn=5,Zi=1<<yn,eo=Zi-1,to=Zi;function Yu(n){return n<0?(-n<<1)+1:(n<<1)+0}function Qu(n){var e=(n&1)===1,t=n>>1;return e?-t:t}vn.encode=function(e){var t="",r,s=Yu(e);do r=s&eo,s>>>=yn,s>0&&(r|=to),t+=Xi.encode(r);while(s>0);return t};vn.decode=function(e,t,r){var s=e.length,i=0,o=0,l,a;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(a=Xi.decode(e.charCodeAt(t++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));l=!!(a&to),a&=eo,i=i+(a<<o),o+=yn}while(l);r.value=Qu(i),r.rest=t}});var nt=_(W=>{function Ku(n,e,t){if(e in n)return n[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}W.getArg=Ku;var ro=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Xu=/^data:.+\,.+$/;function Mt(n){var e=n.match(ro);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}W.urlParse=Mt;function rt(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}W.urlGenerate=rt;var Zu=32;function ec(n){var e=[];return function(t){for(var r=0;r<e.length;r++)if(e[r].input===t){var s=e[0];return e[0]=e[r],e[r]=s,e[0].result}var i=n(t);return e.unshift({input:t,result:i}),e.length>Zu&&e.pop(),i}}var bn=ec(function(e){var t=e,r=Mt(e);if(r){if(!r.path)return e;t=r.path}for(var s=W.isAbsolute(t),i=[],o=0,l=0;;)if(o=l,l=t.indexOf("/",o),l===-1){i.push(t.slice(o));break}else for(i.push(t.slice(o,l));l<t.length&&t[l]==="/";)l++;for(var a,u=0,l=i.length-1;l>=0;l--)a=i[l],a==="."?i.splice(l,1):a===".."?u++:u>0&&(a===""?(i.splice(l+1,u),u=0):(i.splice(l,2),u--));return t=i.join("/"),t===""&&(t=s?"/":"."),r?(r.path=t,rt(r)):t});W.normalize=bn;function no(n,e){n===""&&(n="."),e===""&&(e=".");var t=Mt(e),r=Mt(n);if(r&&(n=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),rt(t);if(t||e.match(Xu))return e;if(r&&!r.host&&!r.path)return r.host=e,rt(r);var s=e.charAt(0)==="/"?e:bn(n.replace(/\/+$/,"")+"/"+e);return r?(r.path=s,rt(r)):s}W.join=no;W.isAbsolute=function(n){return n.charAt(0)==="/"||ro.test(n)};function tc(n,e){n===""&&(n="."),n=n.replace(/\/$/,"");for(var t=0;e.indexOf(n+"/")!==0;){var r=n.lastIndexOf("/");if(r<0||(n=n.slice(0,r),n.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)}W.relative=tc;var so=(function(){var n=Object.create(null);return!("__proto__"in n)})();function io(n){return n}function rc(n){return oo(n)?"$"+n:n}W.toSetString=so?io:rc;function nc(n){return oo(n)?n.slice(1):n}W.fromSetString=so?io:nc;function oo(n){if(!n)return!1;var e=n.length;if(e<9||n.charCodeAt(e-1)!==95||n.charCodeAt(e-2)!==95||n.charCodeAt(e-3)!==111||n.charCodeAt(e-4)!==116||n.charCodeAt(e-5)!==111||n.charCodeAt(e-6)!==114||n.charCodeAt(e-7)!==112||n.charCodeAt(e-8)!==95||n.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(n.charCodeAt(t)!==36)return!1;return!0}function sc(n,e,t){var r=_e(n.source,e.source);return r!==0||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:_e(n.name,e.name)}W.compareByOriginalPositions=sc;function ic(n,e,t){var r;return r=n.originalLine-e.originalLine,r!==0||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:_e(n.name,e.name)}W.compareByOriginalPositionsNoSource=ic;function oc(n,e,t){var r=n.generatedLine-e.generatedLine;return r!==0||(r=n.generatedColumn-e.generatedColumn,r!==0||t)||(r=_e(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:_e(n.name,e.name)}W.compareByGeneratedPositionsDeflated=oc;function ac(n,e,t){var r=n.generatedColumn-e.generatedColumn;return r!==0||t||(r=_e(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:_e(n.name,e.name)}W.compareByGeneratedPositionsDeflatedNoLine=ac;function _e(n,e){return n===e?0:n===null?1:e===null?-1:n>e?1:-1}function lc(n,e){var t=n.generatedLine-e.generatedLine;return t!==0||(t=n.generatedColumn-e.generatedColumn,t!==0)||(t=_e(n.source,e.source),t!==0)||(t=n.originalLine-e.originalLine,t!==0)||(t=n.originalColumn-e.originalColumn,t!==0)?t:_e(n.name,e.name)}W.compareByGeneratedPositionsInflated=lc;function uc(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}W.parseSourceMapInput=uc;function cc(n,e,t){if(e=e||"",n&&(n[n.length-1]!=="/"&&e[0]!=="/"&&(n+="/"),e=n+e),t){var r=Mt(t);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var s=r.path.lastIndexOf("/");s>=0&&(r.path=r.path.substring(0,s+1))}e=no(rt(r),e)}return bn(e)}W.computeSourceURL=cc});var xn=_(ao=>{var _n=nt(),Sn=Object.prototype.hasOwnProperty,Ne=typeof Map<"u";function Se(){this._array=[],this._set=Ne?new Map:Object.create(null)}Se.fromArray=function(e,t){for(var r=new Se,s=0,i=e.length;s<i;s++)r.add(e[s],t);return r};Se.prototype.size=function(){return Ne?this._set.size:Object.getOwnPropertyNames(this._set).length};Se.prototype.add=function(e,t){var r=Ne?e:_n.toSetString(e),s=Ne?this.has(e):Sn.call(this._set,r),i=this._array.length;(!s||t)&&this._array.push(e),s||(Ne?this._set.set(e,i):this._set[r]=i)};Se.prototype.has=function(e){if(Ne)return this._set.has(e);var t=_n.toSetString(e);return Sn.call(this._set,t)};Se.prototype.indexOf=function(e){if(Ne){var t=this._set.get(e);if(t>=0)return t}else{var r=_n.toSetString(e);if(Sn.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Se.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Se.prototype.toArray=function(){return this._array.slice()};ao.ArraySet=Se});var co=_(uo=>{var lo=nt();function fc(n,e){var t=n.generatedLine,r=e.generatedLine,s=n.generatedColumn,i=e.generatedColumn;return r>t||r==t&&i>=s||lo.compareByGeneratedPositionsInflated(n,e)<=0}function br(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}br.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};br.prototype.add=function(e){fc(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};br.prototype.toArray=function(){return this._sorted||(this._array.sort(lo.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};uo.MappingList=br});var En=_(fo=>{var Lt=wn(),H=nt(),_r=xn().ArraySet,pc=co().MappingList;function ie(n){n||(n={}),this._file=H.getArg(n,"file",null),this._sourceRoot=H.getArg(n,"sourceRoot",null),this._skipValidation=H.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=H.getArg(n,"ignoreInvalidMapping",!1),this._sources=new _r,this._names=new _r,this._mappings=new pc,this._sourcesContents=null}ie.prototype._version=3;ie.fromSourceMap=function(e,t){var r=e.sourceRoot,s=new ie(Object.assign(t||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=H.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),s.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=H.relative(r,i)),s._sources.has(o)||s._sources.add(o);var l=e.sourceContentFor(i);l!=null&&s.setSourceContent(i,l)}),s};ie.prototype.addMapping=function(e){var t=H.getArg(e,"generated"),r=H.getArg(e,"original",null),s=H.getArg(e,"source",null),i=H.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(t,r,s,i)===!1||(s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:s,name:i}))};ie.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=H.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[H.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[H.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ie.prototype.applySourceMap=function(e,t,r){var s=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=e.file}var i=this._sourceRoot;i!=null&&(s=H.relative(i,s));var o=new _r,l=new _r;this._mappings.unsortedForEach(function(a){if(a.source===s&&a.originalLine!=null){var u=e.originalPositionFor({line:a.originalLine,column:a.originalColumn});u.source!=null&&(a.source=u.source,r!=null&&(a.source=H.join(r,a.source)),i!=null&&(a.source=H.relative(i,a.source)),a.originalLine=u.line,a.originalColumn=u.column,u.name!=null&&(a.name=u.name))}var c=a.source;c!=null&&!o.has(c)&&o.add(c);var f=a.name;f!=null&&!l.has(f)&&l.add(f)},this),this._sources=o,this._names=l,e.sources.forEach(function(a){var u=e.sourceContentFor(a);u!=null&&(r!=null&&(a=H.join(r,a)),i!=null&&(a=H.relative(i,a)),this.setSourceContent(a,u))},this)};ie.prototype._validateMapping=function(e,t,r,s){if(t&&typeof t.line!="number"&&typeof t.column!="number"){var i="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!s)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;var i="Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:s});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};ie.prototype._serializeMappings=function(){for(var e=0,t=1,r=0,s=0,i=0,o=0,l="",a,u,c,f,p=this._mappings.toArray(),g=0,h=p.length;g<h;g++){if(u=p[g],a="",u.generatedLine!==t)for(e=0;u.generatedLine!==t;)a+=";",t++;else if(g>0){if(!H.compareByGeneratedPositionsInflated(u,p[g-1]))continue;a+=","}a+=Lt.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),a+=Lt.encode(f-o),o=f,a+=Lt.encode(u.originalLine-1-s),s=u.originalLine-1,a+=Lt.encode(u.originalColumn-r),r=u.originalColumn,u.name!=null&&(c=this._names.indexOf(u.name),a+=Lt.encode(c-i),i=c)),l+=a}return l};ie.prototype._generateSourcesContent=function(e,t){return e.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=H.relative(t,r));var s=H.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};ie.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ie.prototype.toString=function(){return JSON.stringify(this.toJSON())};fo.SourceMapGenerator=ie});var po=_(De=>{De.GREATEST_LOWER_BOUND=1;De.LEAST_UPPER_BOUND=2;function On(n,e,t,r,s,i){var o=Math.floor((e-n)/2)+n,l=s(t,r[o],!0);return l===0?o:l>0?e-o>1?On(o,e,t,r,s,i):i==De.LEAST_UPPER_BOUND?e<r.length?e:-1:o:o-n>1?On(n,o,t,r,s,i):i==De.LEAST_UPPER_BOUND?o:n<0?-1:n}De.search=function(e,t,r,s){if(t.length===0)return-1;var i=On(-1,t.length,e,t,r,s||De.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&r(t[i],t[i-1],!0)===0;)--i;return i}});var mo=_(go=>{function hc(n){function e(s,i,o){var l=s[i];s[i]=s[o],s[o]=l}function t(s,i){return Math.round(s+Math.random()*(i-s))}function r(s,i,o,l){if(o<l){var a=t(o,l),u=o-1;e(s,a,l);for(var c=s[l],f=o;f<l;f++)i(s[f],c,!1)<=0&&(u+=1,e(s,u,f));e(s,u+1,f);var p=u+1;r(s,i,o,p-1),r(s,i,p+1,l)}}return r}function dc(n){let e=hc.toString();return new Function(`return ${e}`)()(n)}var ho=new WeakMap;go.quickSort=function(n,e,t=0){let r=ho.get(e);r===void 0&&(r=dc(e),ho.set(e,r)),r(n,e,t,n.length-1)}});var wo=_(Sr=>{var O=nt(),Pn=po(),st=xn().ArraySet,gc=wn(),Nt=mo().quickSort;function U(n,e){var t=n;return typeof n=="string"&&(t=O.parseSourceMapInput(n)),t.sections!=null?new ce(t,e):new V(t,e)}U.fromSourceMap=function(n,e){return V.fromSourceMap(n,e)};U.prototype._version=3;U.prototype.__generatedMappings=null;Object.defineProperty(U.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});U.prototype.__originalMappings=null;Object.defineProperty(U.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});U.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return r===";"||r===","};U.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};U.GENERATED_ORDER=1;U.ORIGINAL_ORDER=2;U.GREATEST_LOWER_BOUND=1;U.LEAST_UPPER_BOUND=2;U.prototype.eachMapping=function(e,t,r){var s=t||null,i=r||U.GENERATED_ORDER,o;switch(i){case U.GENERATED_ORDER:o=this._generatedMappings;break;case U.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var l=this.sourceRoot,a=e.bind(s),u=this._names,c=this._sources,f=this._sourceMapURL,p=0,g=o.length;p<g;p++){var h=o[p],y=h.source===null?null:c.at(h.source);y!==null&&(y=O.computeSourceURL(l,y,f)),a({source:y,generatedLine:h.generatedLine,generatedColumn:h.generatedColumn,originalLine:h.originalLine,originalColumn:h.originalColumn,name:h.name===null?null:u.at(h.name)})}};U.prototype.allGeneratedPositionsFor=function(e){var t=O.getArg(e,"line"),r={source:O.getArg(e,"source"),originalLine:t,originalColumn:O.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var s=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",O.compareByOriginalPositions,Pn.LEAST_UPPER_BOUND);if(i>=0){var o=this._originalMappings[i];if(e.column===void 0)for(var l=o.originalLine;o&&o.originalLine===l;)s.push({line:O.getArg(o,"generatedLine",null),column:O.getArg(o,"generatedColumn",null),lastColumn:O.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i];else for(var a=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==a;)s.push({line:O.getArg(o,"generatedLine",null),column:O.getArg(o,"generatedColumn",null),lastColumn:O.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i]}return s};Sr.SourceMapConsumer=U;function V(n,e){var t=n;typeof n=="string"&&(t=O.parseSourceMapInput(n));var r=O.getArg(t,"version"),s=O.getArg(t,"sources"),i=O.getArg(t,"names",[]),o=O.getArg(t,"sourceRoot",null),l=O.getArg(t,"sourcesContent",null),a=O.getArg(t,"mappings"),u=O.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);o&&(o=O.normalize(o)),s=s.map(String).map(O.normalize).map(function(c){return o&&O.isAbsolute(o)&&O.isAbsolute(c)?O.relative(o,c):c}),this._names=st.fromArray(i.map(String),!0),this._sources=st.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(c){return O.computeSourceURL(o,c,e)}),this.sourceRoot=o,this.sourcesContent=l,this._mappings=a,this._sourceMapURL=e,this.file=u}V.prototype=Object.create(U.prototype);V.prototype.consumer=U;V.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=O.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==n)return t;return-1};V.fromSourceMap=function(e,t){var r=Object.create(V.prototype),s=r._names=st.fromArray(e._names.toArray(),!0),i=r._sources=st.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(g){return O.computeSourceURL(r.sourceRoot,g,t)});for(var o=e._mappings.toArray().slice(),l=r.__generatedMappings=[],a=r.__originalMappings=[],u=0,c=o.length;u<c;u++){var f=o[u],p=new vo;p.generatedLine=f.generatedLine,p.generatedColumn=f.generatedColumn,f.source&&(p.source=i.indexOf(f.source),p.originalLine=f.originalLine,p.originalColumn=f.originalColumn,f.name&&(p.name=s.indexOf(f.name)),a.push(p)),l.push(p)}return Nt(r.__originalMappings,O.compareByOriginalPositions),r};V.prototype._version=3;Object.defineProperty(V.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function vo(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Cn=O.compareByGeneratedPositionsDeflatedNoLine;function yo(n,e){let t=n.length,r=n.length-e;if(!(r<=1))if(r==2){let s=n[e],i=n[e+1];Cn(s,i)>0&&(n[e]=i,n[e+1]=s)}else if(r<20)for(let s=e;s<t;s++)for(let i=s;i>e;i--){let o=n[i-1],l=n[i];if(Cn(o,l)<=0)break;n[i-1]=l,n[i]=o}else Nt(n,Cn,e)}V.prototype._parseMappings=function(e,t){var r=1,s=0,i=0,o=0,l=0,a=0,u=e.length,c=0,f={},p={},g=[],h=[],y,d,m,w,C;let I=0;for(;c<u;)if(e.charAt(c)===";")r++,c++,s=0,yo(h,I),I=h.length;else if(e.charAt(c)===",")c++;else{for(y=new vo,y.generatedLine=r,w=c;w<u&&!this._charIsMappingSeparator(e,w);w++);for(d=e.slice(c,w),m=[];c<w;)gc.decode(e,c,p),C=p.value,c=p.rest,m.push(C);if(m.length===2)throw new Error("Found a source, but no line and column");if(m.length===3)throw new Error("Found a source and line, but no column");if(y.generatedColumn=s+m[0],s=y.generatedColumn,m.length>1&&(y.source=l+m[1],l+=m[1],y.originalLine=i+m[2],i=y.originalLine,y.originalLine+=1,y.originalColumn=o+m[3],o=y.originalColumn,m.length>4&&(y.name=a+m[4],a+=m[4])),h.push(y),typeof y.originalLine=="number"){let R=y.source;for(;g.length<=R;)g.push(null);g[R]===null&&(g[R]=[]),g[R].push(y)}}yo(h,I),this.__generatedMappings=h;for(var T=0;T<g.length;T++)g[T]!=null&&Nt(g[T],O.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g)};V.prototype._findMapping=function(e,t,r,s,i,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[s]);return Pn.search(e,t,i,o)};V.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};V.prototype.originalPositionFor=function(e){var t={generatedLine:O.getArg(e,"line"),generatedColumn:O.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",O.compareByGeneratedPositionsDeflated,O.getArg(e,"bias",U.GREATEST_LOWER_BOUND));if(r>=0){var s=this._generatedMappings[r];if(s.generatedLine===t.generatedLine){var i=O.getArg(s,"source",null);i!==null&&(i=this._sources.at(i),i=O.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var o=O.getArg(s,"name",null);return o!==null&&(o=this._names.at(o)),{source:i,line:O.getArg(s,"originalLine",null),column:O.getArg(s,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};V.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};V.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var s=e;this.sourceRoot!=null&&(s=O.relative(this.sourceRoot,s));var i;if(this.sourceRoot!=null&&(i=O.urlParse(this.sourceRoot))){var o=s.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||i.path=="/")&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(t)return null;throw new Error('"'+s+'" is not in the SourceMap.')};V.prototype.generatedPositionFor=function(e){var t=O.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:O.getArg(e,"line"),originalColumn:O.getArg(e,"column")},s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",O.compareByOriginalPositions,O.getArg(e,"bias",U.GREATEST_LOWER_BOUND));if(s>=0){var i=this._originalMappings[s];if(i.source===r.source)return{line:O.getArg(i,"generatedLine",null),column:O.getArg(i,"generatedColumn",null),lastColumn:O.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Sr.BasicSourceMapConsumer=V;function ce(n,e){var t=n;typeof n=="string"&&(t=O.parseSourceMapInput(n));var r=O.getArg(t,"version"),s=O.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new st,this._names=new st;var i={line:-1,column:0};this._sections=s.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var l=O.getArg(o,"offset"),a=O.getArg(l,"line"),u=O.getArg(l,"column");if(a<i.line||a===i.line&&u<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=l,{generatedOffset:{generatedLine:a+1,generatedColumn:u+1},consumer:new U(O.getArg(o,"map"),e)}})}ce.prototype=Object.create(U.prototype);ce.prototype.constructor=U;ce.prototype._version=3;Object.defineProperty(ce.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)n.push(this._sections[e].consumer.sources[t]);return n}});ce.prototype.originalPositionFor=function(e){var t={generatedLine:O.getArg(e,"line"),generatedColumn:O.getArg(e,"column")},r=Pn.search(t,this._sections,function(i,o){var l=i.generatedLine-o.generatedOffset.generatedLine;return l||i.generatedColumn-o.generatedOffset.generatedColumn}),s=this._sections[r];return s?s.consumer.originalPositionFor({line:t.generatedLine-(s.generatedOffset.generatedLine-1),column:t.generatedColumn-(s.generatedOffset.generatedLine===t.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};ce.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};ce.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var s=this._sections[r],i=s.consumer.sourceContentFor(e,!0);if(i||i==="")return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};ce.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(O.getArg(e,"source"))!==-1){var s=r.consumer.generatedPositionFor(e);if(s){var i={line:s.line+(r.generatedOffset.generatedLine-1),column:s.column+(r.generatedOffset.generatedLine===s.line?r.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};ce.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var s=this._sections[r],i=s.consumer._generatedMappings,o=0;o<i.length;o++){var l=i[o],a=s.consumer._sources.at(l.source);a!==null&&(a=O.computeSourceURL(s.consumer.sourceRoot,a,this._sourceMapURL)),this._sources.add(a),a=this._sources.indexOf(a);var u=null;l.name&&(u=s.consumer._names.at(l.name),this._names.add(u),u=this._names.indexOf(u));var c={source:a,generatedLine:l.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(s.generatedOffset.generatedLine===l.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:u};this.__generatedMappings.push(c),typeof c.originalLine=="number"&&this.__originalMappings.push(c)}Nt(this.__generatedMappings,O.compareByGeneratedPositionsDeflated),Nt(this.__originalMappings,O.compareByOriginalPositions)};Sr.IndexedSourceMapConsumer=ce});var _o=_(bo=>{var mc=En().SourceMapGenerator,xr=nt(),yc=/(\r?\n)/,vc=10,it="$$$isSourceNode$$$";function ne(n,e,t,r,s){this.children=[],this.sourceContents={},this.line=n??null,this.column=e??null,this.source=t??null,this.name=s??null,this[it]=!0,r!=null&&this.add(r)}ne.fromStringWithSourceMap=function(e,t,r){var s=new ne,i=e.split(yc),o=0,l=function(){var p=h(),g=h()||"";return p+g;function h(){return o<i.length?i[o++]:void 0}},a=1,u=0,c=null;return t.eachMapping(function(p){if(c!==null)if(a<p.generatedLine)f(c,l()),a++,u=0;else{var g=i[o]||"",h=g.substr(0,p.generatedColumn-u);i[o]=g.substr(p.generatedColumn-u),u=p.generatedColumn,f(c,h),c=p;return}for(;a<p.generatedLine;)s.add(l()),a++;if(u<p.generatedColumn){var g=i[o]||"";s.add(g.substr(0,p.generatedColumn)),i[o]=g.substr(p.generatedColumn),u=p.generatedColumn}c=p},this),o<i.length&&(c&&f(c,l()),s.add(i.splice(o).join(""))),t.sources.forEach(function(p){var g=t.sourceContentFor(p);g!=null&&(r!=null&&(p=xr.join(r,p)),s.setSourceContent(p,g))}),s;function f(p,g){if(p===null||p.source===void 0)s.add(g);else{var h=r?xr.join(r,p.source):p.source;s.add(new ne(p.originalLine,p.originalColumn,h,g,p.name))}}};ne.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[it]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ne.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[it]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ne.prototype.walk=function(e){for(var t,r=0,s=this.children.length;r<s;r++)t=this.children[r],t[it]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};ne.prototype.join=function(e){var t,r,s=this.children.length;if(s>0){for(t=[],r=0;r<s-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this};ne.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[it]?r.replaceRight(e,t):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this};ne.prototype.setSourceContent=function(e,t){this.sourceContents[xr.toSetString(e)]=t};ne.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][it]&&this.children[t].walkSourceContents(e);for(var s=Object.keys(this.sourceContents),t=0,r=s.length;t<r;t++)e(xr.fromSetString(s[t]),this.sourceContents[s[t]])};ne.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};ne.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new mc(e),s=!1,i=null,o=null,l=null,a=null;return this.walk(function(u,c){t.code+=u,c.source!==null&&c.line!==null&&c.column!==null?((i!==c.source||o!==c.line||l!==c.column||a!==c.name)&&r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name}),i=c.source,o=c.line,l=c.column,a=c.name,s=!0):s&&(r.addMapping({generated:{line:t.line,column:t.column}}),i=null,s=!1);for(var f=0,p=u.length;f<p;f++)u.charCodeAt(f)===vc?(t.line++,t.column=0,f+1===p?(i=null,s=!1):s&&r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name})):t.column++}),this.walkSourceContents(function(u,c){r.setSourceContent(u,c)}),{code:t.code,map:r}};bo.SourceNode=ne});var Or=_(Er=>{Er.SourceMapGenerator=En().SourceMapGenerator;Er.SourceMapConsumer=wo().SourceMapConsumer;Er.SourceNode=_o().SourceNode});var Tn=_((Zm,Oo)=>{"use strict";var{existsSync:wc,readFileSync:bc,realpathSync:_c}=Me("fs"),{dirname:Cr,isAbsolute:Sc,join:xc,relative:Ec,sep:Oc}=Me("path"),{SourceMapConsumer:So,SourceMapGenerator:xo}=Or();function Eo(n){try{return _c(n)}catch{return n}}function Cc(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}var Dt=class{constructor(e,t){if(t.map===!1)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Cr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new So(this.json||this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=e.match(s)||e.match(i);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return Cc(e.substr(l[0].length));let a=e.slice(22);throw a=a.slice(0,a.indexOf(",")),new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e,t,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(e)||!t)return;let s=Ec(Eo(Cr(t)),Eo(e));if(s===".."||s.startsWith(".."+Oc)||Sc(s))return}if(this.root=Cr(e),wc(e))return this.mapFile=e,bc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r,e,!0);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof So)return xo.fromSourceMap(t).toString();if(t instanceof xo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;e&&(r=xc(Cr(e),r));let s=this.loadFile(r,e,!1);if(s)try{this.json=JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return s}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Oo.exports=Dt;Dt.default=Dt});var Ft=_((ey,Ao)=>{"use strict";var{nanoid:Pc}=Yi(),{isAbsolute:Rn,resolve:kn}=Me("path"),{SourceMapConsumer:Tc,SourceMapGenerator:Ic}=Or(),{fileURLToPath:Co,pathToFileURL:Pr}=Me("url"),Po=yr(),Ac=Tn(),In=cn(),An=Symbol("lineToIndexCache"),Rc=!!(Tc&&Ic),To=!!(kn&&Rn);function Io(n){if(n[An])return n[An];let e=n.css.split(` -`),t=new Array(e.length),r=0;for(let s=0,i=e.length;s<i;s++)t[s]=r,r+=e[s].length+1;return n[An]=t,t}var ot=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!To||/^\w+:\/\//.test(t.from)||Rn(t.from)?this.file=t.from:this.file=kn(t.from)),To&&Rc){let r=new Ac(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Pc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let i,o,l,a,u;if(t&&typeof t=="object"){let f=t,p=r;if(typeof f.offset=="number"){a=f.offset;let g=this.fromOffset(a);t=g.line,r=g.col}else t=f.line,r=f.column,a=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){l=p.offset;let g=this.fromOffset(l);o=g.line,i=g.col}else o=p.line,i=p.column,l=this.fromLineAndColumn(p.line,p.column)}else if(r)a=this.fromLineAndColumn(t,r);else{a=t;let f=this.fromOffset(a);t=f.line,r=f.col}let c=this.origin(t,r,o,i);return c?u=new Po(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):u=new Po(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:i,line:o},this.css,this.file,s.plugin),u.input={column:r,endColumn:i,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(Pr&&(u.input.url=Pr(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return Io(this)[e-1]+t-1}fromOffset(e){let t=Io(this),r=t[t.length-1],s=0;if(e>=r)s=t.length-1;else{let i=t.length-2,o;for(;s<i;)if(o=s+(i-s>>1),e<t[o])i=o-1;else if(e>=t[o+1])s=o+1;else{s=o;break}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:kn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:t-1,line:e});if(!o.source)return!1;let l;if(typeof r=="number"){let f=i.originalPositionFor({column:s-1,line:r});f.source&&(l=f)}let a;Rn(o.source)?a=Pr(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Pr(this.map.mapFile));let u={column:o.column+1,endColumn:l&&l.column+1,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Co)u.file=Co(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=i.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};Ao.exports=ot;ot.default=ot;In&&In.registerInput&&In.registerInput(ot)});var at=_((ty,Lo)=>{"use strict";var Ro=be(),ko,Mo,Te=class extends Ro{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=new Set;for(let o of Array.isArray(e)?e:[e])o&&typeof o=="object"&&!o.parent&&o.raws&&typeof o.raws.before<"u"&&s.add(o.raws);let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)s.has(o.raws)||(o.raws.before=t.raws.before)}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ko(new Mo,this,e).stringify()}};Te.registerLazyResult=n=>{ko=n};Te.registerProcessor=n=>{Mo=n};Lo.exports=Te;Te.default=Te;Ro.registerRoot(Te)});var Mn=_((ry,No)=>{"use strict";var Ut={comma(n){return Ut.split(n,[","],!0)},space(n){let e=[" ",` -`," "];return Ut.split(n,e)},split(n,e,t){if(typeof n!="string")return[];let r=[],s="",i=!1,o=0,l=!1,a="",u=!1;for(let c of n)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(i=!0),i?(s!==""&&r.push(s.trim()),s="",i=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};No.exports=Ut;Ut.default=Ut});var Tr=_((ny,Fo)=>{"use strict";var Do=be(),kc=Mn(),lt=class extends Do{get selectors(){return kc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};Fo.exports=lt;lt.default=lt;Do.registerRule(lt)});var $o=_((sy,jo)=>{"use strict";var Mc=vr(),Lc=At(),Nc=kt(),Dc=Ft(),Fc=Tn(),Uc=at(),jc=Tr();function Uo(n,e){return n.inputs?n.inputs.map(t=>{let r={...t,__proto__:Dc.prototype};return r.map&&(r.map={...r.map,__proto__:Fc.prototype}),r}):e}function $c(n,e,t){let r={...n};if(delete r.inputs,delete r.nodes,r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}let s;if(r.type==="root")s=new Uc(r);else if(r.type==="decl")s=new Nc(r);else if(r.type==="rule")s=new jc(r);else if(r.type==="comment")s=new Lc(r);else if(r.type==="atrule")s=new Mc(r);else throw new Error("Unknown node type: "+n.type);if(t){s.nodes=t;for(let i of t)i.parent=s}return s}function Ir(n,e){if(Array.isArray(n))return n.map(s=>Ir(s));let t,r=[{childIndex:0,children:[],inputs:Uo(n,e),json:n}];for(;r.length>0;){let s=r[r.length-1],i=s.json.nodes;if(i&&s.childIndex<i.length){let l=i[s.childIndex];s.childIndex+=1,r.push({childIndex:0,children:[],inputs:Uo(l,s.inputs),json:l});continue}r.pop();let o=$c(s.json,s.inputs,i?s.children:void 0);r.length>0?r[r.length-1].children.push(o):t=o}return t}jo.exports=Ir;Ir.default=Ir});var Nn=_((iy,Go)=>{"use strict";var{dirname:Ar,relative:Bo,resolve:Ho,sep:zo}=Me("path"),{SourceMapConsumer:Wo,SourceMapGenerator:Rr}=Or(),{pathToFileURL:qo}=Me("url"),qc=Ft(),Bc=!!(Wo&&Rr),Hc=!!(Ar&&Ho&&Bo&&zo),Ln=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` +`);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){if(e.source&&e.source.input.hasBOM&&this.builder("\uFEFF",e,"start"),this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?t:ue(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(ue(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};ki.exports=Ot;Ot.default=Ot});var Ct=_((qm,Mi)=>{"use strict";var Uu=pn();function hn(n,e){new Uu(e).stringify(n)}Mi.exports=hn;hn.default=hn});var Pt=_((Bm,dn)=>{"use strict";dn.exports.isClean=Symbol("isClean");dn.exports.my=Symbol("my")});var Rt=_((Hm,Li)=>{"use strict";var ju=wr(),$u=pn(),qu=Ct(),{isClean:Tt,my:Bu}=Pt();function Hu(n,e){let t=new n.constructor,r=[[n,t,e]];for(;r.length>0;){let[s,i,o]=r.pop();for(let l in s){if(!Object.prototype.hasOwnProperty.call(s,l)||l==="proxyCache")continue;let a=s[l],u=typeof a;if(l==="parent"&&u==="object")o&&(i[l]=o);else if(l==="source")i[l]=a;else if(Array.isArray(a)){let c=[];i[l]=c;for(let f of a){let p=new f.constructor;c.push(p),r.push([f,p,i])}}else{if(u==="object"&&a!==null){let c=new a.constructor;r.push([a,c,void 0]),a=c}i[l]=a}}}return t}function he(n,e){if(e&&typeof e.offset<"u")return e.offset;let t=1,r=1,s=0;for(let i=0;i<n.length;i++){if(r===e.line&&t===e.column){s=i;break}n[i]===` +`?(t=1,r+=1):t+=1}return s}var It=class n{get proxyOf(){return this}constructor(e={}){this.raws={},this[Tt]=!1,this[Bu]=!0;for(let t of Object.keys(e))if(t!=="__proto__")if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Hu(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new ju(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Tt]=!0}markDirty(){if(this[Tt]){this[Tt]=!1;let e=this;for(;e=e.parent;)e[Tt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(e){let t=this.source.start.column,r=this.source.start.line,s="document"in this.source.input?this.source.input.document:this.source.input.css,i=he(s,this.source.start),o=i+e;for(let l=i;l<o;l++)s[l]===` +`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:he(t,this.source.start)},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:he(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(he(t,this.source.start),he(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),s=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:he(t,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line,offset:he(t,e.end)}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):typeof e.index=="number"&&(s=this.positionInside(e.index+1));return(s.line<r.line||s.line===r.line&&s.column<=r.column)&&(s={column:r.column+1,line:r.line,offset:r.offset+1}),{end:s,start:r}}raw(e,t){return new $u().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r=t==null;t=t||new Map;let s=[],i=[[this,s,0]];for(let l=0;l<i.length;l++){let[a,u,c]=i[l],f={};u[c]=f;for(let p in a){if(!Object.prototype.hasOwnProperty.call(a,p)||p==="parent"||p==="proxyCache")continue;let g=a[p];if(Array.isArray(g)){let h=[];f[p]=h;for(let y=0;y<g.length;y++){let d=g[y];typeof d=="object"&&d.toJSON?d.toJSON===n.prototype.toJSON?i.push([d,h,y]):h[y]=d.toJSON(null,t):h[y]=d}}else if(typeof g=="object"&&g.toJSON)g.toJSON===n.prototype.toJSON?i.push([g,f,p]):f[p]=g.toJSON(null,t);else if(p==="source"){if(g==null)continue;let h=t.get(g.input);h==null&&(h=t.size,t.set(g.input,h)),f[p]={end:g.end,inputId:h,start:g.start}}else f[p]=g}}let o=s[0];return r&&(o.inputs=[...t.keys()].map(l=>l.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=qu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let s={node:this};for(let i in r)s[i]=r[i];return e.warn(t,s)}};Li.exports=It;It.default=It});var kt=_((zm,Ni)=>{"use strict";var zu=Rt(),At=class extends zu{constructor(e){super(e),this.type="comment"}};Ni.exports=At;At.default=At});var Lt=_((Wm,Di)=>{"use strict";var Wu=Rt(),Mt=class extends Wu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Di.exports=Mt;Mt.default=Mt});var be=_((Gm,zi)=>{"use strict";var Ui=kt(),ji=Lt(),Fi=Rt(),{isClean:$i,my:qi}=Pt(),gn,Bi,Hi,mn;function Gu(n){let e=n.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let r of t.nodes)e.push(r)}}return n.slice()}function Vu(n){let e=[n];for(;e.length>0;){let t=e.pop();if(t[$i]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e.push(r)}}var de=class n extends Fi{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){let t=[this];for(;t.length>0;){let r=t.pop();if(r!==this&&r.cleanRaws!==n.prototype.cleanRaws){r.cleanRaws(e);continue}if(Fi.prototype.cleanRaws.call(r,e),r.nodes)for(let s of r.nodes)t.push(s)}}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...i)=>r(s.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,i=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Gu(Bi(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ji(e)]}else if(e.selector||e.selectors)e=[new mn(e)];else if(e.name)e=[new gn(e)];else if(e.text)e=[new Ui(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[qi]||n.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[$i]&&Vu(s),s.raws||(s.raws={}),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){if(!this.proxyOf.nodes)return;let t=[{iterator:this.getIterator(),node:this.proxyOf}];for(;t.length>0;){let{iterator:r,node:s}=t[t.length-1],i=s.indexes[r];if(i>=s.proxyOf.nodes.length){delete s.indexes[r],t.pop();let a=t[t.length-1];a&&(a.node.indexes[a.iterator]+=1);continue}let o=s.proxyOf.nodes[i],l;try{l=e(o,i)}catch(a){throw o.addToError(a)}if(l===!1){for(let a of t)delete a.node.indexes[a.iterator];return!1}o.walk&&o.proxyOf.nodes?t.push({iterator:o.getIterator(),node:o}):s.indexes[r]+=1}}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}};de.registerParse=n=>{Bi=n};de.registerRule=n=>{mn=n};de.registerAtRule=n=>{gn=n};de.registerRoot=n=>{Hi=n};zi.exports=de;de.default=de;de.rebuild=n=>{let e=[n];for(;e.length>0;){let t=e.pop();if(t.type==="atrule"?Object.setPrototypeOf(t,gn.prototype):t.type==="rule"?Object.setPrototypeOf(t,mn.prototype):t.type==="decl"?Object.setPrototypeOf(t,ji.prototype):t.type==="comment"?Object.setPrototypeOf(t,Ui.prototype):t.type==="root"&&Object.setPrototypeOf(t,Hi.prototype),t[qi]=!0,t.nodes)for(let r of t.nodes)e.push(r)}}});var br=_((Vm,Gi)=>{"use strict";var Wi=be(),rt=class extends Wi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Gi.exports=rt;rt.default=rt;Wi.registerAtRule(rt)});var _r=_((Jm,Yi)=>{"use strict";var Ju=be(),Vi,Ji,Le=class extends Ju{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Vi(new Ji,this,e).stringify()}};Le.registerLazyResult=n=>{Vi=n};Le.registerProcessor=n=>{Ji=n};Yi.exports=Le;Le.default=Le});var Ki=_((Ym,Qi)=>{var Yu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Qu=(n,e=21)=>(t=e)=>{let r="",s=t|0;for(;s-- >0;)r+=n[Math.random()*n.length|0];return r},Ku=(n=21)=>{let e="",t=n|0;for(;t-- >0;)e+=Yu[Math.random()*64|0];return e};Qi.exports={nanoid:Ku,customAlphabet:Qu}});var Zi=_(yn=>{var Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");yn.encode=function(n){if(0<=n&&n<Xi.length)return Xi[n];throw new TypeError("Must be between 0 and 63: "+n)};yn.decode=function(n){var e=65,t=90,r=97,s=122,i=48,o=57,l=43,a=47,u=26,c=52;return e<=n&&n<=t?n-e:r<=n&&n<=s?n-r+u:i<=n&&n<=o?n-i+c:n==l?62:n==a?63:-1}});var bn=_(wn=>{var eo=Zi(),vn=5,to=1<<vn,ro=to-1,no=to;function Xu(n){return n<0?(-n<<1)+1:(n<<1)+0}function Zu(n){var e=(n&1)===1,t=n>>1;return e?-t:t}wn.encode=function(e){var t="",r,s=Xu(e);do r=s&ro,s>>>=vn,s>0&&(r|=no),t+=eo.encode(r);while(s>0);return t};wn.decode=function(e,t,r){var s=e.length,i=0,o=0,l,a;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(a=eo.decode(e.charCodeAt(t++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));l=!!(a&no),a&=ro,i=i+(a<<o),o+=vn}while(l);r.value=Zu(i),r.rest=t}});var st=_(W=>{function ec(n,e,t){if(e in n)return n[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}W.getArg=ec;var so=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,tc=/^data:.+\,.+$/;function Nt(n){var e=n.match(so);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}W.urlParse=Nt;function nt(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}W.urlGenerate=nt;var rc=32;function nc(n){var e=[];return function(t){for(var r=0;r<e.length;r++)if(e[r].input===t){var s=e[0];return e[0]=e[r],e[r]=s,e[0].result}var i=n(t);return e.unshift({input:t,result:i}),e.length>rc&&e.pop(),i}}var _n=nc(function(e){var t=e,r=Nt(e);if(r){if(!r.path)return e;t=r.path}for(var s=W.isAbsolute(t),i=[],o=0,l=0;;)if(o=l,l=t.indexOf("/",o),l===-1){i.push(t.slice(o));break}else for(i.push(t.slice(o,l));l<t.length&&t[l]==="/";)l++;for(var a,u=0,l=i.length-1;l>=0;l--)a=i[l],a==="."?i.splice(l,1):a===".."?u++:u>0&&(a===""?(i.splice(l+1,u),u=0):(i.splice(l,2),u--));return t=i.join("/"),t===""&&(t=s?"/":"."),r?(r.path=t,nt(r)):t});W.normalize=_n;function io(n,e){n===""&&(n="."),e===""&&(e=".");var t=Nt(e),r=Nt(n);if(r&&(n=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),nt(t);if(t||e.match(tc))return e;if(r&&!r.host&&!r.path)return r.host=e,nt(r);var s=e.charAt(0)==="/"?e:_n(n.replace(/\/+$/,"")+"/"+e);return r?(r.path=s,nt(r)):s}W.join=io;W.isAbsolute=function(n){return n.charAt(0)==="/"||so.test(n)};function sc(n,e){n===""&&(n="."),n=n.replace(/\/$/,"");for(var t=0;e.indexOf(n+"/")!==0;){var r=n.lastIndexOf("/");if(r<0||(n=n.slice(0,r),n.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)}W.relative=sc;var oo=(function(){var n=Object.create(null);return!("__proto__"in n)})();function ao(n){return n}function ic(n){return lo(n)?"$"+n:n}W.toSetString=oo?ao:ic;function oc(n){return lo(n)?n.slice(1):n}W.fromSetString=oo?ao:oc;function lo(n){if(!n)return!1;var e=n.length;if(e<9||n.charCodeAt(e-1)!==95||n.charCodeAt(e-2)!==95||n.charCodeAt(e-3)!==111||n.charCodeAt(e-4)!==116||n.charCodeAt(e-5)!==111||n.charCodeAt(e-6)!==114||n.charCodeAt(e-7)!==112||n.charCodeAt(e-8)!==95||n.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(n.charCodeAt(t)!==36)return!1;return!0}function ac(n,e,t){var r=_e(n.source,e.source);return r!==0||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:_e(n.name,e.name)}W.compareByOriginalPositions=ac;function lc(n,e,t){var r;return r=n.originalLine-e.originalLine,r!==0||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:_e(n.name,e.name)}W.compareByOriginalPositionsNoSource=lc;function uc(n,e,t){var r=n.generatedLine-e.generatedLine;return r!==0||(r=n.generatedColumn-e.generatedColumn,r!==0||t)||(r=_e(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:_e(n.name,e.name)}W.compareByGeneratedPositionsDeflated=uc;function cc(n,e,t){var r=n.generatedColumn-e.generatedColumn;return r!==0||t||(r=_e(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:_e(n.name,e.name)}W.compareByGeneratedPositionsDeflatedNoLine=cc;function _e(n,e){return n===e?0:n===null?1:e===null?-1:n>e?1:-1}function fc(n,e){var t=n.generatedLine-e.generatedLine;return t!==0||(t=n.generatedColumn-e.generatedColumn,t!==0)||(t=_e(n.source,e.source),t!==0)||(t=n.originalLine-e.originalLine,t!==0)||(t=n.originalColumn-e.originalColumn,t!==0)?t:_e(n.name,e.name)}W.compareByGeneratedPositionsInflated=fc;function pc(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}W.parseSourceMapInput=pc;function hc(n,e,t){if(e=e||"",n&&(n[n.length-1]!=="/"&&e[0]!=="/"&&(n+="/"),e=n+e),t){var r=Nt(t);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var s=r.path.lastIndexOf("/");s>=0&&(r.path=r.path.substring(0,s+1))}e=io(nt(r),e)}return _n(e)}W.computeSourceURL=hc});var En=_(uo=>{var Sn=st(),xn=Object.prototype.hasOwnProperty,Ne=typeof Map<"u";function Se(){this._array=[],this._set=Ne?new Map:Object.create(null)}Se.fromArray=function(e,t){for(var r=new Se,s=0,i=e.length;s<i;s++)r.add(e[s],t);return r};Se.prototype.size=function(){return Ne?this._set.size:Object.getOwnPropertyNames(this._set).length};Se.prototype.add=function(e,t){var r=Ne?e:Sn.toSetString(e),s=Ne?this.has(e):xn.call(this._set,r),i=this._array.length;(!s||t)&&this._array.push(e),s||(Ne?this._set.set(e,i):this._set[r]=i)};Se.prototype.has=function(e){if(Ne)return this._set.has(e);var t=Sn.toSetString(e);return xn.call(this._set,t)};Se.prototype.indexOf=function(e){if(Ne){var t=this._set.get(e);if(t>=0)return t}else{var r=Sn.toSetString(e);if(xn.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};Se.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Se.prototype.toArray=function(){return this._array.slice()};uo.ArraySet=Se});var po=_(fo=>{var co=st();function dc(n,e){var t=n.generatedLine,r=e.generatedLine,s=n.generatedColumn,i=e.generatedColumn;return r>t||r==t&&i>=s||co.compareByGeneratedPositionsInflated(n,e)<=0}function Sr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Sr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};Sr.prototype.add=function(e){dc(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Sr.prototype.toArray=function(){return this._sorted||(this._array.sort(co.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};fo.MappingList=Sr});var On=_(ho=>{var Dt=bn(),H=st(),xr=En().ArraySet,gc=po().MappingList;function ie(n){n||(n={}),this._file=H.getArg(n,"file",null),this._sourceRoot=H.getArg(n,"sourceRoot",null),this._skipValidation=H.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=H.getArg(n,"ignoreInvalidMapping",!1),this._sources=new xr,this._names=new xr,this._mappings=new gc,this._sourcesContents=null}ie.prototype._version=3;ie.fromSourceMap=function(e,t){var r=e.sourceRoot,s=new ie(Object.assign(t||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=H.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),s.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=H.relative(r,i)),s._sources.has(o)||s._sources.add(o);var l=e.sourceContentFor(i);l!=null&&s.setSourceContent(i,l)}),s};ie.prototype.addMapping=function(e){var t=H.getArg(e,"generated"),r=H.getArg(e,"original",null),s=H.getArg(e,"source",null),i=H.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(t,r,s,i)===!1||(s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:s,name:i}))};ie.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=H.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[H.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[H.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ie.prototype.applySourceMap=function(e,t,r){var s=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=e.file}var i=this._sourceRoot;i!=null&&(s=H.relative(i,s));var o=new xr,l=new xr;this._mappings.unsortedForEach(function(a){if(a.source===s&&a.originalLine!=null){var u=e.originalPositionFor({line:a.originalLine,column:a.originalColumn});u.source!=null&&(a.source=u.source,r!=null&&(a.source=H.join(r,a.source)),i!=null&&(a.source=H.relative(i,a.source)),a.originalLine=u.line,a.originalColumn=u.column,u.name!=null&&(a.name=u.name))}var c=a.source;c!=null&&!o.has(c)&&o.add(c);var f=a.name;f!=null&&!l.has(f)&&l.add(f)},this),this._sources=o,this._names=l,e.sources.forEach(function(a){var u=e.sourceContentFor(a);u!=null&&(r!=null&&(a=H.join(r,a)),i!=null&&(a=H.relative(i,a)),this.setSourceContent(a,u))},this)};ie.prototype._validateMapping=function(e,t,r,s){if(t&&typeof t.line!="number"&&typeof t.column!="number"){var i="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!s)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;var i="Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:s});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};ie.prototype._serializeMappings=function(){for(var e=0,t=1,r=0,s=0,i=0,o=0,l="",a,u,c,f,p=this._mappings.toArray(),g=0,h=p.length;g<h;g++){if(u=p[g],a="",u.generatedLine!==t)for(e=0;u.generatedLine!==t;)a+=";",t++;else if(g>0){if(!H.compareByGeneratedPositionsInflated(u,p[g-1]))continue;a+=","}a+=Dt.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),a+=Dt.encode(f-o),o=f,a+=Dt.encode(u.originalLine-1-s),s=u.originalLine-1,a+=Dt.encode(u.originalColumn-r),r=u.originalColumn,u.name!=null&&(c=this._names.indexOf(u.name),a+=Dt.encode(c-i),i=c)),l+=a}return l};ie.prototype._generateSourcesContent=function(e,t){return e.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=H.relative(t,r));var s=H.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)};ie.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ie.prototype.toString=function(){return JSON.stringify(this.toJSON())};ho.SourceMapGenerator=ie});var go=_(De=>{De.GREATEST_LOWER_BOUND=1;De.LEAST_UPPER_BOUND=2;function Cn(n,e,t,r,s,i){var o=Math.floor((e-n)/2)+n,l=s(t,r[o],!0);return l===0?o:l>0?e-o>1?Cn(o,e,t,r,s,i):i==De.LEAST_UPPER_BOUND?e<r.length?e:-1:o:o-n>1?Cn(n,o,t,r,s,i):i==De.LEAST_UPPER_BOUND?o:n<0?-1:n}De.search=function(e,t,r,s){if(t.length===0)return-1;var i=Cn(-1,t.length,e,t,r,s||De.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&r(t[i],t[i-1],!0)===0;)--i;return i}});var vo=_(yo=>{function mc(n){function e(s,i,o){var l=s[i];s[i]=s[o],s[o]=l}function t(s,i){return Math.round(s+Math.random()*(i-s))}function r(s,i,o,l){if(o<l){var a=t(o,l),u=o-1;e(s,a,l);for(var c=s[l],f=o;f<l;f++)i(s[f],c,!1)<=0&&(u+=1,e(s,u,f));e(s,u+1,f);var p=u+1;r(s,i,o,p-1),r(s,i,p+1,l)}}return r}function yc(n){let e=mc.toString();return new Function(`return ${e}`)()(n)}var mo=new WeakMap;yo.quickSort=function(n,e,t=0){let r=mo.get(e);r===void 0&&(r=yc(e),mo.set(e,r)),r(n,e,t,n.length-1)}});var _o=_(Er=>{var O=st(),Tn=go(),it=En().ArraySet,vc=bn(),Ft=vo().quickSort;function U(n,e){var t=n;return typeof n=="string"&&(t=O.parseSourceMapInput(n)),t.sections!=null?new ce(t,e):new V(t,e)}U.fromSourceMap=function(n,e){return V.fromSourceMap(n,e)};U.prototype._version=3;U.prototype.__generatedMappings=null;Object.defineProperty(U.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});U.prototype.__originalMappings=null;Object.defineProperty(U.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});U.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return r===";"||r===","};U.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};U.GENERATED_ORDER=1;U.ORIGINAL_ORDER=2;U.GREATEST_LOWER_BOUND=1;U.LEAST_UPPER_BOUND=2;U.prototype.eachMapping=function(e,t,r){var s=t||null,i=r||U.GENERATED_ORDER,o;switch(i){case U.GENERATED_ORDER:o=this._generatedMappings;break;case U.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var l=this.sourceRoot,a=e.bind(s),u=this._names,c=this._sources,f=this._sourceMapURL,p=0,g=o.length;p<g;p++){var h=o[p],y=h.source===null?null:c.at(h.source);y!==null&&(y=O.computeSourceURL(l,y,f)),a({source:y,generatedLine:h.generatedLine,generatedColumn:h.generatedColumn,originalLine:h.originalLine,originalColumn:h.originalColumn,name:h.name===null?null:u.at(h.name)})}};U.prototype.allGeneratedPositionsFor=function(e){var t=O.getArg(e,"line"),r={source:O.getArg(e,"source"),originalLine:t,originalColumn:O.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var s=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",O.compareByOriginalPositions,Tn.LEAST_UPPER_BOUND);if(i>=0){var o=this._originalMappings[i];if(e.column===void 0)for(var l=o.originalLine;o&&o.originalLine===l;)s.push({line:O.getArg(o,"generatedLine",null),column:O.getArg(o,"generatedColumn",null),lastColumn:O.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i];else for(var a=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==a;)s.push({line:O.getArg(o,"generatedLine",null),column:O.getArg(o,"generatedColumn",null),lastColumn:O.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++i]}return s};Er.SourceMapConsumer=U;function V(n,e){var t=n;typeof n=="string"&&(t=O.parseSourceMapInput(n));var r=O.getArg(t,"version"),s=O.getArg(t,"sources"),i=O.getArg(t,"names",[]),o=O.getArg(t,"sourceRoot",null),l=O.getArg(t,"sourcesContent",null),a=O.getArg(t,"mappings"),u=O.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);o&&(o=O.normalize(o)),s=s.map(String).map(O.normalize).map(function(c){return o&&O.isAbsolute(o)&&O.isAbsolute(c)?O.relative(o,c):c}),this._names=it.fromArray(i.map(String),!0),this._sources=it.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(c){return O.computeSourceURL(o,c,e)}),this.sourceRoot=o,this.sourcesContent=l,this._mappings=a,this._sourceMapURL=e,this.file=u}V.prototype=Object.create(U.prototype);V.prototype.consumer=U;V.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=O.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==n)return t;return-1};V.fromSourceMap=function(e,t){var r=Object.create(V.prototype),s=r._names=it.fromArray(e._names.toArray(),!0),i=r._sources=it.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(g){return O.computeSourceURL(r.sourceRoot,g,t)});for(var o=e._mappings.toArray().slice(),l=r.__generatedMappings=[],a=r.__originalMappings=[],u=0,c=o.length;u<c;u++){var f=o[u],p=new bo;p.generatedLine=f.generatedLine,p.generatedColumn=f.generatedColumn,f.source&&(p.source=i.indexOf(f.source),p.originalLine=f.originalLine,p.originalColumn=f.originalColumn,f.name&&(p.name=s.indexOf(f.name)),a.push(p)),l.push(p)}return Ft(r.__originalMappings,O.compareByOriginalPositions),r};V.prototype._version=3;Object.defineProperty(V.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function bo(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Pn=O.compareByGeneratedPositionsDeflatedNoLine;function wo(n,e){let t=n.length,r=n.length-e;if(!(r<=1))if(r==2){let s=n[e],i=n[e+1];Pn(s,i)>0&&(n[e]=i,n[e+1]=s)}else if(r<20)for(let s=e;s<t;s++)for(let i=s;i>e;i--){let o=n[i-1],l=n[i];if(Pn(o,l)<=0)break;n[i-1]=l,n[i]=o}else Ft(n,Pn,e)}V.prototype._parseMappings=function(e,t){var r=1,s=0,i=0,o=0,l=0,a=0,u=e.length,c=0,f={},p={},g=[],h=[],y,d,m,w,C;let I=0;for(;c<u;)if(e.charAt(c)===";")r++,c++,s=0,wo(h,I),I=h.length;else if(e.charAt(c)===",")c++;else{for(y=new bo,y.generatedLine=r,w=c;w<u&&!this._charIsMappingSeparator(e,w);w++);for(d=e.slice(c,w),m=[];c<w;)vc.decode(e,c,p),C=p.value,c=p.rest,m.push(C);if(m.length===2)throw new Error("Found a source, but no line and column");if(m.length===3)throw new Error("Found a source and line, but no column");if(y.generatedColumn=s+m[0],s=y.generatedColumn,m.length>1&&(y.source=l+m[1],l+=m[1],y.originalLine=i+m[2],i=y.originalLine,y.originalLine+=1,y.originalColumn=o+m[3],o=y.originalColumn,m.length>4&&(y.name=a+m[4],a+=m[4])),h.push(y),typeof y.originalLine=="number"){let A=y.source;for(;g.length<=A;)g.push(null);g[A]===null&&(g[A]=[]),g[A].push(y)}}wo(h,I),this.__generatedMappings=h;for(var T=0;T<g.length;T++)g[T]!=null&&Ft(g[T],O.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g)};V.prototype._findMapping=function(e,t,r,s,i,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[s]);return Tn.search(e,t,i,o)};V.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};V.prototype.originalPositionFor=function(e){var t={generatedLine:O.getArg(e,"line"),generatedColumn:O.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",O.compareByGeneratedPositionsDeflated,O.getArg(e,"bias",U.GREATEST_LOWER_BOUND));if(r>=0){var s=this._generatedMappings[r];if(s.generatedLine===t.generatedLine){var i=O.getArg(s,"source",null);i!==null&&(i=this._sources.at(i),i=O.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var o=O.getArg(s,"name",null);return o!==null&&(o=this._names.at(o)),{source:i,line:O.getArg(s,"originalLine",null),column:O.getArg(s,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};V.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};V.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var s=e;this.sourceRoot!=null&&(s=O.relative(this.sourceRoot,s));var i;if(this.sourceRoot!=null&&(i=O.urlParse(this.sourceRoot))){var o=s.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||i.path=="/")&&this._sources.has("/"+s))return this.sourcesContent[this._sources.indexOf("/"+s)]}if(t)return null;throw new Error('"'+s+'" is not in the SourceMap.')};V.prototype.generatedPositionFor=function(e){var t=O.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:O.getArg(e,"line"),originalColumn:O.getArg(e,"column")},s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",O.compareByOriginalPositions,O.getArg(e,"bias",U.GREATEST_LOWER_BOUND));if(s>=0){var i=this._originalMappings[s];if(i.source===r.source)return{line:O.getArg(i,"generatedLine",null),column:O.getArg(i,"generatedColumn",null),lastColumn:O.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Er.BasicSourceMapConsumer=V;function ce(n,e){var t=n;typeof n=="string"&&(t=O.parseSourceMapInput(n));var r=O.getArg(t,"version"),s=O.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new it,this._names=new it;var i={line:-1,column:0};this._sections=s.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var l=O.getArg(o,"offset"),a=O.getArg(l,"line"),u=O.getArg(l,"column");if(a<i.line||a===i.line&&u<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=l,{generatedOffset:{generatedLine:a+1,generatedColumn:u+1},consumer:new U(O.getArg(o,"map"),e)}})}ce.prototype=Object.create(U.prototype);ce.prototype.constructor=U;ce.prototype._version=3;Object.defineProperty(ce.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)n.push(this._sections[e].consumer.sources[t]);return n}});ce.prototype.originalPositionFor=function(e){var t={generatedLine:O.getArg(e,"line"),generatedColumn:O.getArg(e,"column")},r=Tn.search(t,this._sections,function(i,o){var l=i.generatedLine-o.generatedOffset.generatedLine;return l||i.generatedColumn-o.generatedOffset.generatedColumn}),s=this._sections[r];return s?s.consumer.originalPositionFor({line:t.generatedLine-(s.generatedOffset.generatedLine-1),column:t.generatedColumn-(s.generatedOffset.generatedLine===t.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};ce.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};ce.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var s=this._sections[r],i=s.consumer.sourceContentFor(e,!0);if(i||i==="")return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};ce.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(O.getArg(e,"source"))!==-1){var s=r.consumer.generatedPositionFor(e);if(s){var i={line:s.line+(r.generatedOffset.generatedLine-1),column:s.column+(r.generatedOffset.generatedLine===s.line?r.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};ce.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var s=this._sections[r],i=s.consumer._generatedMappings,o=0;o<i.length;o++){var l=i[o],a=s.consumer._sources.at(l.source);a!==null&&(a=O.computeSourceURL(s.consumer.sourceRoot,a,this._sourceMapURL)),this._sources.add(a),a=this._sources.indexOf(a);var u=null;l.name&&(u=s.consumer._names.at(l.name),this._names.add(u),u=this._names.indexOf(u));var c={source:a,generatedLine:l.generatedLine+(s.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(s.generatedOffset.generatedLine===l.generatedLine?s.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:u};this.__generatedMappings.push(c),typeof c.originalLine=="number"&&this.__originalMappings.push(c)}Ft(this.__generatedMappings,O.compareByGeneratedPositionsDeflated),Ft(this.__originalMappings,O.compareByOriginalPositions)};Er.IndexedSourceMapConsumer=ce});var xo=_(So=>{var wc=On().SourceMapGenerator,Or=st(),bc=/(\r?\n)/,_c=10,ot="$$$isSourceNode$$$";function ne(n,e,t,r,s){this.children=[],this.sourceContents={},this.line=n??null,this.column=e??null,this.source=t??null,this.name=s??null,this[ot]=!0,r!=null&&this.add(r)}ne.fromStringWithSourceMap=function(e,t,r){var s=new ne,i=e.split(bc),o=0,l=function(){var p=h(),g=h()||"";return p+g;function h(){return o<i.length?i[o++]:void 0}},a=1,u=0,c=null;return t.eachMapping(function(p){if(c!==null)if(a<p.generatedLine)f(c,l()),a++,u=0;else{var g=i[o]||"",h=g.substr(0,p.generatedColumn-u);i[o]=g.substr(p.generatedColumn-u),u=p.generatedColumn,f(c,h),c=p;return}for(;a<p.generatedLine;)s.add(l()),a++;if(u<p.generatedColumn){var g=i[o]||"";s.add(g.substr(0,p.generatedColumn)),i[o]=g.substr(p.generatedColumn),u=p.generatedColumn}c=p},this),o<i.length&&(c&&f(c,l()),s.add(i.splice(o).join(""))),t.sources.forEach(function(p){var g=t.sourceContentFor(p);g!=null&&(r!=null&&(p=Or.join(r,p)),s.setSourceContent(p,g))}),s;function f(p,g){if(p===null||p.source===void 0)s.add(g);else{var h=r?Or.join(r,p.source):p.source;s.add(new ne(p.originalLine,p.originalColumn,h,g,p.name))}}};ne.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[ot]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ne.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[ot]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};ne.prototype.walk=function(e){for(var t,r=0,s=this.children.length;r<s;r++)t=this.children[r],t[ot]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};ne.prototype.join=function(e){var t,r,s=this.children.length;if(s>0){for(t=[],r=0;r<s-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this};ne.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[ot]?r.replaceRight(e,t):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this};ne.prototype.setSourceContent=function(e,t){this.sourceContents[Or.toSetString(e)]=t};ne.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][ot]&&this.children[t].walkSourceContents(e);for(var s=Object.keys(this.sourceContents),t=0,r=s.length;t<r;t++)e(Or.fromSetString(s[t]),this.sourceContents[s[t]])};ne.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};ne.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new wc(e),s=!1,i=null,o=null,l=null,a=null;return this.walk(function(u,c){t.code+=u,c.source!==null&&c.line!==null&&c.column!==null?((i!==c.source||o!==c.line||l!==c.column||a!==c.name)&&r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name}),i=c.source,o=c.line,l=c.column,a=c.name,s=!0):s&&(r.addMapping({generated:{line:t.line,column:t.column}}),i=null,s=!1);for(var f=0,p=u.length;f<p;f++)u.charCodeAt(f)===_c?(t.line++,t.column=0,f+1===p?(i=null,s=!1):s&&r.addMapping({source:c.source,original:{line:c.line,column:c.column},generated:{line:t.line,column:t.column},name:c.name})):t.column++}),this.walkSourceContents(function(u,c){r.setSourceContent(u,c)}),{code:t.code,map:r}};So.SourceNode=ne});var Pr=_(Cr=>{Cr.SourceMapGenerator=On().SourceMapGenerator;Cr.SourceMapConsumer=_o().SourceMapConsumer;Cr.SourceNode=xo().SourceNode});var In=_((ay,Po)=>{"use strict";var{existsSync:Sc,readFileSync:xc,realpathSync:Ec}=Me("fs"),{dirname:Tr,isAbsolute:Oc,join:Cc,relative:Pc,sep:Tc}=Me("path"),{SourceMapConsumer:Eo,SourceMapGenerator:Oo}=Pr();function Co(n){try{return Ec(n)}catch{return n}}function Ic(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}var Ut=class{constructor(e,t){if(t.map===!1)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Tr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Eo(this.json||this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=e.match(s)||e.match(i);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return Ic(e.substr(l[0].length));let a=e.slice(22);throw a=a.slice(0,a.indexOf(",")),new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e,t,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(e)||!t)return;let s=Pc(Co(Tr(t)),Co(e));if(s===".."||s.startsWith(".."+Tc)||Oc(s))return}if(this.root=Tr(e),Sc(e))return this.mapFile=e,xc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r,e,!0);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Eo)return Oo.fromSourceMap(t).toString();if(t instanceof Oo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;e&&(r=Cc(Tr(e),r));let s=this.loadFile(r,e,!1);if(s)try{this.json=JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return s}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Po.exports=Ut;Ut.default=Ut});var jt=_((ly,ko)=>{"use strict";var{nanoid:Rc}=Ki(),{isAbsolute:kn,resolve:Mn}=Me("path"),{SourceMapConsumer:Ac,SourceMapGenerator:kc}=Pr(),{fileURLToPath:To,pathToFileURL:Ir}=Me("url"),Io=wr(),Mc=In(),Rn=fn(),An=Symbol("lineToIndexCache"),Lc=!!(Ac&&kc),Ro=!!(Mn&&kn);function Ao(n){if(n[An])return n[An];let e=n.css.split(` +`),t=new Array(e.length),r=0;for(let s=0,i=e.length;s<i;s++)t[s]=r,r+=e[s].length+1;return n[An]=t,t}var at=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Ro||/^\w+:\/\//.test(t.from)||kn(t.from)?this.file=t.from:this.file=Mn(t.from)),Ro&&Lc){let r=new Mc(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Rc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let i,o,l,a,u;if(t&&typeof t=="object"){let f=t,p=r;if(typeof f.offset=="number"){a=f.offset;let g=this.fromOffset(a);t=g.line,r=g.col}else t=f.line,r=f.column,a=this.fromLineAndColumn(t,r);if(typeof p.offset=="number"){l=p.offset;let g=this.fromOffset(l);o=g.line,i=g.col}else o=p.line,i=p.column,l=this.fromLineAndColumn(p.line,p.column)}else if(r)a=this.fromLineAndColumn(t,r);else{a=t;let f=this.fromOffset(a);t=f.line,r=f.col}let c=this.origin(t,r,o,i);return c?u=new Io(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):u=new Io(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:i,line:o},this.css,this.file,s.plugin),u.input={column:r,endColumn:i,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(Ir&&(u.input.url=Ir(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return Ao(this)[e-1]+t-1}fromOffset(e){let t=Ao(this),r=t[t.length-1],s=0;if(e>=r)s=t.length-1;else{let i=t.length-2,o;for(;s<i;)if(o=s+(i-s>>1),e<t[o])i=o-1;else if(e>=t[o+1])s=o+1;else{s=o;break}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Mn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:t-1,line:e});if(!o.source)return!1;let l;if(typeof r=="number"){let f=i.originalPositionFor({column:s-1,line:r});f.source&&(l=f)}let a;kn(o.source)?a=Ir(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ir(this.map.mapFile));let u={column:o.column+1,endColumn:l&&l.column+1,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(To)u.file=To(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=i.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};ko.exports=at;at.default=at;Rn&&Rn.registerInput&&Rn.registerInput(at)});var lt=_((uy,Do)=>{"use strict";var Mo=be(),Lo,No,Te=class extends Mo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=new Set;for(let o of Array.isArray(e)?e:[e])o&&typeof o=="object"&&!o.parent&&o.raws&&typeof o.raws.before<"u"&&s.add(o.raws);let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)s.has(o.raws)||(o.raws.before=t.raws.before)}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Lo(new No,this,e).stringify()}};Te.registerLazyResult=n=>{Lo=n};Te.registerProcessor=n=>{No=n};Do.exports=Te;Te.default=Te;Mo.registerRoot(Te)});var Ln=_((cy,Fo)=>{"use strict";var $t={comma(n){return $t.split(n,[","],!0)},space(n){let e=[" ",` +`," "];return $t.split(n,e)},split(n,e,t){if(typeof n!="string")return[];let r=[],s="",i=!1,o=0,l=!1,a="",u=!1;for(let c of n)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(i=!0),i?(s!==""&&r.push(s.trim()),s="",i=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};Fo.exports=$t;$t.default=$t});var Rr=_((fy,jo)=>{"use strict";var Uo=be(),Nc=Ln(),ut=class extends Uo{get selectors(){return Nc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};jo.exports=ut;ut.default=ut;Uo.registerRule(ut)});var Bo=_((py,qo)=>{"use strict";var Dc=br(),Fc=kt(),Uc=Lt(),jc=jt(),$c=In(),qc=lt(),Bc=Rr();function $o(n,e){return n.inputs?n.inputs.map(t=>{let r={...t,__proto__:jc.prototype};return r.map&&(r.map={...r.map,__proto__:$c.prototype}),r}):e}function Hc(n,e,t){let r={...n};if(delete r.inputs,delete r.nodes,r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}let s;if(r.type==="root")s=new qc(r);else if(r.type==="decl")s=new Uc(r);else if(r.type==="rule")s=new Bc(r);else if(r.type==="comment")s=new Fc(r);else if(r.type==="atrule")s=new Dc(r);else throw new Error("Unknown node type: "+n.type);if(t){s.nodes=t;for(let i of t)i.parent=s}return s}function Ar(n,e){if(Array.isArray(n))return n.map(s=>Ar(s));let t,r=[{childIndex:0,children:[],inputs:$o(n,e),json:n}];for(;r.length>0;){let s=r[r.length-1],i=s.json.nodes;if(i&&s.childIndex<i.length){let l=i[s.childIndex];s.childIndex+=1,r.push({childIndex:0,children:[],inputs:$o(l,s.inputs),json:l});continue}r.pop();let o=Hc(s.json,s.inputs,i?s.children:void 0);r.length>0?r[r.length-1].children.push(o):t=o}return t}qo.exports=Ar;Ar.default=Ar});var Dn=_((hy,Jo)=>{"use strict";var{dirname:kr,relative:zo,resolve:Wo,sep:Go}=Me("path"),{SourceMapConsumer:Vo,SourceMapGenerator:Mr}=Pr(),{pathToFileURL:Ho}=Me("url"),zc=jt(),Wc=!!(Vo&&Mr),Gc=!!(kr&&Wo&&zo&&Go),Nn=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` `;this.css.includes(`\r `)&&(t=`\r -`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Ar(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Wo(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;(e=this.css.lastIndexOf("/*#"))!==-1;){let t=this.css.indexOf("*/",e+3);if(t===-1)break;for(;e>0&&this.css[e-1]===` -`;)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}}generate(){if(this.clearAnnotation(),Hc&&Bc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Rr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Rr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Rr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=l.match(/\n/g),o?(e+=o.length,i=l.lastIndexOf(` -`),t=l.length-i):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ar(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ar(Ho(r,this.mapOpts.annotation)));let s=Bo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new qc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(qo){let r=qo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;zo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};Go.exports=Ln});var Qo=_((oy,Yo)=>{"use strict";var zc=vr(),Wc=At(),Gc=kt(),Vc=at(),Vo=Tr(),Jc=un(),Jo={empty:!0,space:!0};function Yc(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}function Dn(n,e,t){let r="";for(let s=e;s<t;s++)r+=n[s][1];return r}var Fn=class{constructor(e){this.input=e,this.root=new Vc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new zc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,i,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,s=a[i];s&&s[0]==="space";)s=a[--i];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let i=t-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,i;for(let[o,l]of e.entries()){if(s=l,i=s[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!r)this.doubleColon(s);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=s}return!1}comment(e){let t=new Wc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Jc(this.input)}decl(e,t){let r=new Gc;this.init(r,e[0][2]);let s=e[e.length-1];s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Yc(e)),r.source.end.offset++;let i=0;for(;e[i][0]!=="word";)i===e.length-1&&this.unknownWord([e[i]]),i++;r.raws.before+=Dn(e,0,i),r.source.start=this.getPosition(e[i][2]);let o=i;for(;i<e.length;){let p=e[i][0];if(p===":"||p==="space"||p==="comment")break;i++}r.prop=Dn(e,o,i);let l=i,a;for(;i<e.length&&(a=e[i],i++,a[0]!==":");)a[0]==="word"&&/\w/.test(a[1])&&this.unknownWord([a]);r.raws.between=Dn(e,l,i),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let u=i;for(;i<e.length;){let p=e[i][0];if(p!=="space"&&p!=="comment")break;i++}let c=e.slice(u,i);e=e.slice(i),this.precheckMissedSemicolon(e);for(let p=e.length-1;p>=0;p--){if(a=e[p],a[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(e,p);g=this.spacesFromEnd(e)+g,g!==" !important"&&(r.raws.important=g);break}else if(a[1].toLowerCase()==="important"){let g=e.slice(0),h="";for(let y=p;y>0;y--){let d=g[y][0];if(h.trim().startsWith("!")&&d!=="space")break;h=g.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=g)}if(a[0]!=="space"&&a[0]!=="comment")break}e.some(p=>p[0]!=="space"&&p[0]!=="comment")&&(r.raws.between+=c.map(p=>p[1]).join(""),c=[]),this.raw(r,"value",c.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Vo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,i=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")i||(i=u),o.push(r==="("?")":"]");else if(l&&s&&r==="{")i||(i=u),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let i,o,l=r.length,a="",u=!0,c,f;for(let p=0;p<l;p+=1)i=r[p],o=i[0],o==="space"&&p===l-1&&!s?u=!1:o==="comment"?(f=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!Jo[f]&&!Jo[c]?a.slice(-1)===","?u=!1:a+=i[1]:u=!1):a+=i[1];if(!u){let p=r.reduce((g,h)=>g+h[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Vo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};Yo.exports=Fn});var Mr=_((ay,Ko)=>{"use strict";var Qc=be(),Kc=Ft(),Xc=Qo();function kr(n,e){let t=new Kc(n,e),r=new Xc(t);try{r.parse()}catch(s){throw process.env.NODE_ENV!=="production"&&s.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?s.message+=` +`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||kr(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Vo(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;(e=this.css.lastIndexOf("/*#"))!==-1;){let t=this.css.indexOf("*/",e+3);if(t===-1)break;for(;e>0&&this.css[e-1]===` +`;)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}}generate(){if(this.clearAnnotation(),Gc&&Wc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Mr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Mr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Mr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=l.match(/\n/g),o?(e+=o.length,i=l.lastIndexOf(` +`),t=l.length-i):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?kr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=kr(Wo(r,this.mapOpts.annotation)));let s=zo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new zc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ho){let r=Ho(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Go==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};Jo.exports=Nn});var Xo=_((dy,Ko)=>{"use strict";var Vc=br(),Jc=kt(),Yc=Lt(),Qc=lt(),Yo=Rr(),Kc=cn(),Qo={empty:!0,space:!0};function Xc(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}function Fn(n,e,t){let r="";for(let s=e;s<t;s++)r+=n[s][1];return r}var Un=class{constructor(e){this.input=e,this.root=new Qc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Vc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,i,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,s=a[i];s&&s[0]==="space";)s=a[--i];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let i=t-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,i;for(let[o,l]of e.entries()){if(s=l,i=s[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!r)this.doubleColon(s);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=s}return!1}comment(e){let t=new Jc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Kc(this.input)}decl(e,t){let r=new Yc;this.init(r,e[0][2]);let s=e[e.length-1];s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Xc(e)),r.source.end.offset++;let i=0;for(;e[i][0]!=="word";)i===e.length-1&&this.unknownWord([e[i]]),i++;r.raws.before+=Fn(e,0,i),r.source.start=this.getPosition(e[i][2]);let o=i;for(;i<e.length;){let p=e[i][0];if(p===":"||p==="space"||p==="comment")break;i++}r.prop=Fn(e,o,i);let l=i,a;for(;i<e.length&&(a=e[i],i++,a[0]!==":");)a[0]==="word"&&/\w/.test(a[1])&&this.unknownWord([a]);r.raws.between=Fn(e,l,i),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let u=i;for(;i<e.length;){let p=e[i][0];if(p!=="space"&&p!=="comment")break;i++}let c=e.slice(u,i);e=e.slice(i),this.precheckMissedSemicolon(e);for(let p=e.length-1;p>=0;p--){if(a=e[p],a[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(e,p);g=this.spacesFromEnd(e)+g,g!==" !important"&&(r.raws.important=g);break}else if(a[1].toLowerCase()==="important"){let g=e.slice(0),h="";for(let y=p;y>0;y--){let d=g[y][0];if(h.trim().startsWith("!")&&d!=="space")break;h=g.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=g)}if(a[0]!=="space"&&a[0]!=="comment")break}e.some(p=>p[0]!=="space"&&p[0]!=="comment")&&(r.raws.between+=c.map(p=>p[1]).join(""),c=[]),this.raw(r,"value",c.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Yo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,i=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")i||(i=u),o.push(r==="("?")":"]");else if(l&&s&&r==="{")i||(i=u),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&s){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let i,o,l=r.length,a="",u=!0,c,f;for(let p=0;p<l;p+=1)i=r[p],o=i[0],o==="space"&&p===l-1&&!s?u=!1:o==="comment"?(f=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!Qo[f]&&!Qo[c]?a.slice(-1)===","?u=!1:a+=i[1]:u=!1):a+=i[1];if(!u){let p=r.reduce((g,h)=>g+h[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Yo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};Ko.exports=Un});var Nr=_((gy,Zo)=>{"use strict";var Zc=be(),ef=jt(),tf=Xo();function Lr(n,e){let t=new ef(n,e),r=new tf(t);try{r.parse()}catch(s){throw process.env.NODE_ENV!=="production"&&s.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?s.message+=` You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?s.message+=` You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(s.message+=` -You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),s}return r.root}Ko.exports=kr;kr.default=kr;Qc.registerParse(kr)});var Un=_((ly,Xo)=>{"use strict";var Zc=be(),{my:ef}=Ot(),jt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){t.node[ef]||Zc.rebuild(t.node);let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Xo.exports=jt;jt.default=jt});var Lr=_((uy,Zo)=>{"use strict";var tf=Un(),$t=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new tf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};Zo.exports=$t;$t.default=$t});var jn=_((cy,ta)=>{"use strict";var ea={};ta.exports=function(e){ea[e]||(ea[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var Bn=_((fy,ia)=>{"use strict";var rf=be(),nf=wr(),sf=Nn(),of=Mr(),ra=Lr(),af=at(),lf=Et(),{isClean:fe,my:uf}=Ot(),cf=jn(),ff={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},hf={Once:!0,postcssPlugin:!0,prepare:!0},ut=0;function qt(n){return typeof n=="object"&&typeof n.then=="function"}function $n(n){let e=!1,t=ff[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,ut,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,ut,t+"Exit"]:[t,t+"Exit"]}function na(n){let e;return n.type==="document"?e=["Document",ut,"DocumentExit"]:n.type==="root"?e=["Root",ut,"RootExit"]:e=$n(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function sa(n){let e=[n];for(;e.length>0;){let t=e.pop();if(t[fe]=!1,t.nodes)for(let r of t.nodes)e.push(r)}return n}var qn={},Ie=class n{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=sa(t);else if(t instanceof n||t instanceof ra)s=sa(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let i=of;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{s=i(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[uf]&&rf.rebuild(s)}this.result=new ra(e,s,r),this.helpers={...qn,postcss:qn,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let s=r.postcssPlugin,i=r.postcssVersion,o=this.result.processor.version,l=i.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+i+". Perhaps this is the source of the error below.")}}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!pf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!hf[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(qt(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[na(e)];for(;t.length>0;){let r=this.visitTick(t);if(qt(r))try{await r}catch(s){let i=t[t.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(i=>r(i,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return qt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=lf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(e.map===void 0&&!(r&&r.input&&r.input.map)){let o="";return t(this.result.root,l=>{o+=l}),this.result.css=o,this.result}let i=new sf(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(qt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||cf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let i;try{i=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(qt(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator;t.descending&&(t.descending=!1,r.indexes[o]+=1);let l;for(;l=r.nodes[r.indexes[o]];){if(!l[fe]){l[fe]=!0,t.descending=!0,e.push(na(l));return}r.indexes[o]+=1}t.iterator=0,delete r.indexes[o]}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===ut){r.nodes&&r.nodes.length&&(r[fe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[fe]=!0;let t=[{eventIndex:0,events:$n(e),iterator:0,node:e}];for(;t.length>0;){let r=t[t.length-1],s=r.node;if(r.iterator!==0){let i=r.iterator;r.descending&&(r.descending=!1,s.indexes[i]+=1);let o,l=!1;for(;o=s.nodes[s.indexes[i]];){if(!o[fe]){o[fe]=!0,r.descending=!0,t.push({eventIndex:0,events:$n(o),iterator:0,node:o}),l=!0;break}s.indexes[i]+=1}if(l)continue;r.iterator=0,delete s.indexes[i]}if(r.eventIndex<r.events.length){let i=r.events[r.eventIndex];if(r.eventIndex+=1,i===ut)s.nodes&&s.nodes.length&&(r.iterator=s.getIterator());else{let o=this.listeners[i];o&&this.visitSync(o,s.toProxy())&&t.pop()}continue}t.pop()}}warnings(){return this.sync().warnings()}};Ie.registerPostcss=n=>{qn=n};ia.exports=Ie;Ie.default=Ie;af.registerLazyResult(Ie);nf.registerLazyResult(Ie)});var aa=_((py,oa)=>{"use strict";var df=Nn(),gf=Mr(),mf=Lr(),yf=Et(),vf=jn(),Bt=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=gf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=yf;this.result=new mf(this._processor,void 0,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let o=new df(s,void 0,this._opts,t);if(o.isMap()){let[l,a]=o.generate();l&&(this.result.css=l),a&&(this.result.map=a)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||vf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};oa.exports=Bt;Bt.default=Bt});var ua=_((hy,la)=>{"use strict";var wf=wr(),bf=Bn(),_f=aa(),Sf=at(),Fe=class{constructor(e=[]){this.version="8.5.26",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new _f(this,e,t):new bf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};la.exports=Fe;Fe.default=Fe;Sf.registerProcessor(Fe);wf.registerProcessor(Fe)});var ya=_((dy,ma)=>{"use strict";var ca=vr(),fa=At(),xf=be(),Ef=yr(),pa=kt(),ha=wr(),Of=$o(),Cf=Ft(),Pf=Bn(),Tf=Mn(),If=Tt(),Af=Mr(),Hn=ua(),Rf=Lr(),da=at(),ga=Tr(),kf=Et(),Mf=Un();function k(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new Hn(n)}k.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),s}return r.root}Zo.exports=Lr;Lr.default=Lr;Zc.registerParse(Lr)});var jn=_((my,ea)=>{"use strict";var rf=be(),{my:nf}=Pt(),qt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){t.node[nf]||rf.rebuild(t.node);let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ea.exports=qt;qt.default=qt});var Dr=_((yy,ta)=>{"use strict";var sf=jn(),Bt=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new sf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};ta.exports=Bt;Bt.default=Bt});var $n=_((vy,na)=>{"use strict";var ra={};na.exports=function(e){ra[e]||(ra[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var Hn=_((wy,aa)=>{"use strict";var of=be(),af=_r(),lf=Dn(),uf=Nr(),sa=Dr(),cf=lt(),ff=Ct(),{isClean:fe,my:pf}=Pt(),hf=$n(),df={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},mf={Once:!0,postcssPlugin:!0,prepare:!0},ct=0;function Ht(n){return typeof n=="object"&&typeof n.then=="function"}function qn(n){let e=!1,t=df[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,ct,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,ct,t+"Exit"]:[t,t+"Exit"]}function ia(n){let e;return n.type==="document"?e=["Document",ct,"DocumentExit"]:n.type==="root"?e=["Root",ct,"RootExit"]:e=qn(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function oa(n){let e=[n];for(;e.length>0;){let t=e.pop();if(t[fe]=!1,t.nodes)for(let r of t.nodes)e.push(r)}return n}var Bn={},Ie=class n{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=oa(t);else if(t instanceof n||t instanceof sa)s=oa(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let i=uf;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{s=i(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[pf]&&of.rebuild(s)}this.result=new sa(e,s,r),this.helpers={...Bn,postcss:Bn,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let s=r.postcssPlugin,i=r.postcssVersion,o=this.result.processor.version,l=i.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+s+" uses "+i+". Perhaps this is the source of the error below.")}}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!gf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!mf[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ht(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[ia(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ht(r))try{await r}catch(s){let i=t[t.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(i=>r(i,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ht(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ff;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(e.map===void 0&&!(r&&r.input&&r.input.map)){let o="";return t(this.result.root,l=>{o+=l}),this.result.css=o,this.result}let i=new lf(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ht(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||hf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let i;try{i=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ht(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator;t.descending&&(t.descending=!1,r.indexes[o]+=1);let l;for(;l=r.nodes[r.indexes[o]];){if(!l[fe]){l[fe]=!0,t.descending=!0,e.push(ia(l));return}r.indexes[o]+=1}t.iterator=0,delete r.indexes[o]}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===ct){r.nodes&&r.nodes.length&&(r[fe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[fe]=!0;let t=[{eventIndex:0,events:qn(e),iterator:0,node:e}];for(;t.length>0;){let r=t[t.length-1],s=r.node;if(r.iterator!==0){let i=r.iterator;r.descending&&(r.descending=!1,s.indexes[i]+=1);let o,l=!1;for(;o=s.nodes[s.indexes[i]];){if(!o[fe]){o[fe]=!0,r.descending=!0,t.push({eventIndex:0,events:qn(o),iterator:0,node:o}),l=!0;break}s.indexes[i]+=1}if(l)continue;r.iterator=0,delete s.indexes[i]}if(r.eventIndex<r.events.length){let i=r.events[r.eventIndex];if(r.eventIndex+=1,i===ct)s.nodes&&s.nodes.length&&(r.iterator=s.getIterator());else{let o=this.listeners[i];o&&this.visitSync(o,s.toProxy())&&t.pop()}continue}t.pop()}}warnings(){return this.sync().warnings()}};Ie.registerPostcss=n=>{Bn=n};aa.exports=Ie;Ie.default=Ie;cf.registerLazyResult(Ie);af.registerLazyResult(Ie)});var ua=_((by,la)=>{"use strict";var yf=Dn(),vf=Nr(),wf=Dr(),bf=Ct(),_f=$n(),zt=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=vf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=bf;this.result=new wf(this._processor,void 0,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let o=new yf(s,void 0,this._opts,t);if(o.isMap()){let[l,a]=o.generate();l&&(this.result.css=l),a&&(this.result.map=a)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||_f("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};la.exports=zt;zt.default=zt});var fa=_((_y,ca)=>{"use strict";var Sf=_r(),xf=Hn(),Ef=ua(),Of=lt(),Fe=class{constructor(e=[]){this.version="8.5.26",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ef(this,e,t):new xf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};ca.exports=Fe;Fe.default=Fe;Of.registerProcessor(Fe);Sf.registerProcessor(Fe)});var wa=_((Sy,va)=>{"use strict";var pa=br(),ha=kt(),Cf=be(),Pf=wr(),da=Lt(),ga=_r(),Tf=Bo(),If=jt(),Rf=Hn(),Af=Ln(),kf=Rt(),Mf=Nr(),zn=fa(),Lf=Dr(),ma=lt(),ya=Rr(),Nf=Ct(),Df=jn();function k(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new zn(n)}k.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: -https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Hn().version,l}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,l,a){return k([s(a)]).process(o,l)},s};k.stringify=kf;k.parse=Af;k.fromJSON=Of;k.list=Tf;k.comment=n=>new fa(n);k.atRule=n=>new ca(n);k.decl=n=>new pa(n);k.rule=n=>new ga(n);k.root=n=>new da(n);k.document=n=>new ha(n);k.CssSyntaxError=Ef;k.Declaration=pa;k.Container=xf;k.Processor=Hn;k.Document=ha;k.Comment=fa;k.Warning=Mf;k.AtRule=ca;k.Result=Rf;k.Input=Cf;k.Rule=ga;k.Root=da;k.Node=If;Pf.registerPostcss(k);ma.exports=k;k.default=k});var Wn=_(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.default=Df;function Lf(n){for(var e=n.toLowerCase(),t="",r=!1,s=0;s<6&&e[s]!==void 0;s++){var i=e.charCodeAt(s),o=i>=97&&i<=102||i>=48&&i<=57;if(r=i===32,!o)break;t+=e[s]}if(t.length!==0){var l=parseInt(t,16),a=l>=55296&&l<=57343;return a||l===0||l>1114111?["\uFFFD",t.length+(r?1:0)]:[String.fromCodePoint(l),t.length+(r?1:0)]}}var Nf=/\\/;function Df(n){var e=Nf.test(n);if(!e)return n;for(var t="",r=0;r<n.length;r++){if(n[r]==="\\"){var s=Lf(n.slice(r+1,r+7));if(s!==void 0){t+=s[0],r+=s[1];continue}if(n[r+1]==="\\"){t+="\\",r++;continue}n.length===r+1&&(t+=n[r]);continue}t+=n[r]}return t}});var va=_(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.default=Ff;function Ff(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(;e.length>0;){var r=e.shift();if(!n[r])return;n=n[r]}return n}});var wa=_(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=Uf;function Uf(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(;e.length>0;){var r=e.shift();n[r]||(n[r]={}),n=n[r]}}});var ba=_(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.default=jf;function jf(n){for(var e="",t=n.indexOf("/*"),r=0;t>=0;){e=e+n.slice(r,t);var s=n.indexOf("*/",t+2);if(s<0)return e;r=s+2,t=n.indexOf("/*",r)}return e=e+n.slice(r),e}});var _a=_(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.MAX_NESTING_DEPTH=void 0;ft.default=$f;ft.MAX_NESTING_DEPTH=256;function $f(n){return Number.isSafeInteger(n)&&n>=0?n:ft.MAX_NESTING_DEPTH}});var pt=_(X=>{"use strict";var Ht=X&&X.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(X,"__esModule",{value:!0});X.MAX_NESTING_DEPTH=X.resolveMaxNestingDepth=X.stripComments=X.ensureObject=X.getProp=X.unesc=void 0;var qf=Wn();Object.defineProperty(X,"unesc",{enumerable:!0,get:function(){return Ht(qf).default}});var Bf=va();Object.defineProperty(X,"getProp",{enumerable:!0,get:function(){return Ht(Bf).default}});var Hf=wa();Object.defineProperty(X,"ensureObject",{enumerable:!0,get:function(){return Ht(Hf).default}});var zf=ba();Object.defineProperty(X,"stripComments",{enumerable:!0,get:function(){return Ht(zf).default}});var Sa=_a();Object.defineProperty(X,"resolveMaxNestingDepth",{enumerable:!0,get:function(){return Ht(Sa).default}});Object.defineProperty(X,"MAX_NESTING_DEPTH",{enumerable:!0,get:function(){return Sa.MAX_NESTING_DEPTH}})});var xe=_(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});var Nr=pt(),Yn=function(n,e,t){if(t===void 0&&(t=0),t>Nr.MAX_NESTING_DEPTH)throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(Nr.MAX_NESTING_DEPTH,"."));if(typeof n!="object"||n===null)return n;var r=new n.constructor;for(var s in n)if(n.hasOwnProperty(s)){var i=n[s],o=typeof i;s==="parent"&&o==="object"?e&&(r[s]=e):i instanceof Array?r[s]=i.map(function(l){return Yn(l,r,t+1)}):r[s]=Yn(i,r,t+1)}return r},Wf=(function(){function n(e){e===void 0&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}return n.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},n.prototype.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},n.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},n.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},n.prototype.clone=function(e){e===void 0&&(e={});var t=Yn(this);for(var r in e)t[r]=e[r];return t},n.prototype.appendToPropertyAndEscape=function(e,t,r){this.raws||(this.raws={});var s=this[e],i=this.raws[e];this[e]=s+t,i||r!==t?this.raws[e]=(i||s)+r:delete this.raws[e]},n.prototype.setPropertyAndEscape=function(e,t,r){this.raws||(this.raws={}),this[e]=t,this.raws[e]=r},n.prototype.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},n.prototype.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e||this.source.end.line<e||this.source.start.line===e&&this.source.start.column>t||this.source.end.line===e&&this.source.end.column<t)},n.prototype.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},Object.defineProperty(n.prototype,"rawSpaceBefore",{get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return e===void 0&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,Nr.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"rawSpaceAfter",{get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return e===void 0&&(e=this.spaces.after),e||""},set:function(e){(0,Nr.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e},enumerable:!1,configurable:!0}),n.prototype.valueToString=function(){return String(this.stringifyProperty("value"))},n.prototype.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},n.prototype._stringify=function(){return this.toString()},n})();Qn.default=Wf});var J=_(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.UNIVERSAL=D.ATTRIBUTE=D.CLASS=D.COMBINATOR=D.COMMENT=D.ID=D.NESTING=D.PSEUDO=D.ROOT=D.SELECTOR=D.STRING=D.TAG=void 0;D.TAG="tag";D.STRING="string";D.SELECTOR="selector";D.ROOT="root";D.PSEUDO="pseudo";D.NESTING="nesting";D.ID="id";D.COMMENT="comment";D.COMBINATOR="combinator";D.CLASS="class";D.ATTRIBUTE="attribute";D.UNIVERSAL="universal"});var Dr=_(z=>{"use strict";var Gf=z&&z.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Vf=z&&z.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Jf=z&&z.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Yf=z&&z.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&Vf(t,e,r[s]);return Jf(t,e),t}})(),Qf=z&&z.__values||function(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],r=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=z&&z.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(l){o={error:l}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return i},Ea=z&&z.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return n.concat(i||Array.prototype.slice.call(e))},Kf=z&&z.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(z,"__esModule",{value:!0});var Kn=pt(),Xf=Kf(xe()),Ee=Yf(J()),Zf=(function(n){Gf(e,n);function e(t){var r=n.call(this,t)||this;return r.nodes||(r.nodes=[]),r}return e.prototype.append=function(t){return t.parent=this,this.nodes.push(t),this},e.prototype.prepend=function(t){t.parent=this,this.nodes.unshift(t);for(var r in this.indexes)this.indexes[r]++;return this},e.prototype.at=function(t){return this.nodes[t]},e.prototype.index=function(t){return typeof t=="number"?t:this.nodes.indexOf(t)},Object.defineProperty(e.prototype,"first",{get:function(){return this.at(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this.at(this.length-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length},enumerable:!1,configurable:!0}),e.prototype.removeChild=function(t){t=this.index(t),this.at(t).parent=void 0,this.nodes.splice(t,1);var r;for(var s in this.indexes)r=this.indexes[s],r>=t&&(this.indexes[s]=r-1);return this},e.prototype.removeAll=function(){var t,r;try{for(var s=Qf(this.nodes),i=s.next();!i.done;i=s.next()){var o=i.value;o.parent=void 0}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(t,r){var s;r.parent=this;for(var i=this.index(t),o=[],l=2;l<arguments.length;l++)o.push(arguments[l]);(s=this.nodes).splice.apply(s,Ea([i+1,0,r],xa(o),!1)),r.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],i<a&&(this.indexes[u]=a+arguments.length-1);return this},e.prototype.insertBefore=function(t,r){var s;r.parent=this;for(var i=this.index(t),o=[],l=2;l<arguments.length;l++)o.push(arguments[l]);(s=this.nodes).splice.apply(s,Ea([i,0,r],xa(o),!1)),r.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],a>=i&&(this.indexes[u]=a+arguments.length-1);return this},e.prototype._findChildAtPosition=function(t,r){var s=void 0;return this.each(function(i){if(i.atPosition){var o=i.atPosition(t,r);if(o)return s=o,!1}else if(i.isAtPosition(t,r))return s=i,!1}),s},e.prototype.atPosition=function(t,r){if(this.isAtPosition(t,r))return this._findChildAtPosition(t,r)||this},e.prototype._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},e.prototype.each=function(t){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var r=this.lastEach;if(this.indexes[r]=0,!!this.length){for(var s,i;this.indexes[r]<this.length&&(s=this.indexes[r],i=t(this.at(s),s),i!==!1);)this.indexes[r]+=1;if(delete this.indexes[r],i===!1)return!1}},e.prototype.walk=function(t,r){if(r===void 0&&(r=0),r>Kn.MAX_NESTING_DEPTH)throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(Kn.MAX_NESTING_DEPTH,"."));return this.each(function(s,i){var o=t(s,i);if(o!==!1&&s.length&&(o=s.walk(t,r+1)),o===!1)return!1})},e.prototype.walkAttributes=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.ATTRIBUTE)return t.call(r,s)})},e.prototype.walkClasses=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.CLASS)return t.call(r,s)})},e.prototype.walkCombinators=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.COMBINATOR)return t.call(r,s)})},e.prototype.walkComments=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.COMMENT)return t.call(r,s)})},e.prototype.walkIds=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.ID)return t.call(r,s)})},e.prototype.walkNesting=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.NESTING)return t.call(r,s)})},e.prototype.walkPseudos=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.PSEUDO)return t.call(r,s)})},e.prototype.walkTags=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.TAG)return t.call(r,s)})},e.prototype.walkUniversals=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.UNIVERSAL)return t.call(r,s)})},e.prototype.split=function(t){var r=this,s=[];return this.reduce(function(i,o,l){var a=t.call(r,o);return s.push(o),a?(i.push(s),s=[]):l===r.length-1&&i.push(s),i},[])},e.prototype.map=function(t){return this.nodes.map(t)},e.prototype.reduce=function(t,r){return this.nodes.reduce(t,r)},e.prototype.every=function(t){return this.nodes.every(t)},e.prototype.some=function(t){return this.nodes.some(t)},e.prototype.filter=function(t){return this.nodes.filter(t)},e.prototype.sort=function(t){return this.nodes.sort(t)},e.prototype.toString=function(t){return t===void 0&&(t={}),this._stringify(t,0,(0,Kn.resolveMaxNestingDepth)(t.maxNestingDepth))},e.prototype._stringify=function(t,r,s){var i=this;return this.map(function(o){return i._stringifyChild(o,t,r,s)}).join("")},e.prototype._stringifyChild=function(t,r,s,i){return typeof t._stringify=="function"?t._stringify(r,s,i):String(t)},e})(Xf.default);z.default=Zf});var Xn=_(Ue=>{"use strict";var ep=Ue&&Ue.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),tp=Ue&&Ue.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ue,"__esModule",{value:!0});var rp=tp(Dr()),np=J(),sp=(function(n){ep(e,n);function e(t){var r=n.call(this,t)||this;return r.type=np.ROOT,r}return e.prototype._stringify=function(t,r,s){var i=this,o=this.reduce(function(l,a){return l.push(i._stringifyChild(a,t,r,s)),l},[]).join(",");return this.trailingComma?o+",":o},e.prototype.error=function(t,r){return this._error?this._error(t,r):new Error(t)},Object.defineProperty(e.prototype,"errorGenerator",{set:function(t){this._error=t},enumerable:!1,configurable:!0}),e})(rp.default);Ue.default=sp});var Zn=_(je=>{"use strict";var ip=je&&je.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),op=je&&je.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(je,"__esModule",{value:!0});var ap=op(Dr()),lp=J(),up=(function(n){ip(e,n);function e(t){var r=n.call(this,t)||this;return r.type=lp.SELECTOR,r}return e})(ap.default);je.default=up});var Fr=_((Ky,Oa)=>{"use strict";var cp={},fp=cp.hasOwnProperty,pp=function(e,t){if(!e)return t;var r={};for(var s in t)r[s]=fp.call(e,s)?e[s]:t[s];return r},hp=/[ -,\.\/:-@\[-\^`\{-~]/,dp=/[ -,\.\/:-@\[\]\^`\{-~]/,gp=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,es=function n(e,t){t=pp(t,n.options),t.quotes!="single"&&t.quotes!="double"&&(t.quotes="single");for(var r=t.quotes=="double"?'"':"'",s=t.isIdentifier,i=e.charAt(0),o="",l=0,a=e.length;l<a;){var u=e.charAt(l++),c=u.charCodeAt(),f=void 0;if(c<32||c>126){if(c>=55296&&c<=56319&&l<a){var p=e.charCodeAt(l++);(p&64512)==56320?c=((c&1023)<<10)+(p&1023)+65536:l--}f="\\"+c.toString(16).toUpperCase()+" "}else t.escapeEverything?hp.test(u)?f="\\"+u:f="\\"+c.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(u)?f="\\"+c.toString(16).toUpperCase()+" ":u=="\\"||!s&&(u=='"'&&r==u||u=="'"&&r==u)||s&&dp.test(u)?f="\\"+u:f=u;o+=f}return s&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(i)&&(o="\\3"+i+" "+o.slice(1))),o=o.replace(gp,function(g,h,y){return h&&h.length%2?g:(h||"")+y}),!s&&t.wrap?r+o+r:o};es.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};es.version="3.0.0";Oa.exports=es});var ts=_($e=>{"use strict";var mp=$e&&$e.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Ca=$e&&$e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($e,"__esModule",{value:!0});var yp=Ca(Fr()),vp=pt(),wp=Ca(xe()),bp=J(),_p=(function(n){mp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=bp.CLASS,r._constructed=!0,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){if(this._constructed){var r=(0,yp.default)(t,{isIdentifier:!0});r!==t?((0,vp.ensureObject)(this,"raws"),this.raws.value=r):this.raws&&delete this.raws.value}this._value=t},enumerable:!1,configurable:!0}),e.prototype.valueToString=function(){return"."+n.prototype.valueToString.call(this)},e})(wp.default);$e.default=_p});var rs=_(qe=>{"use strict";var Sp=qe&&qe.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),xp=qe&&qe.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(qe,"__esModule",{value:!0});var Ep=xp(xe()),Op=J(),Cp=(function(n){Sp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Op.COMMENT,r}return e})(Ep.default);qe.default=Cp});var ns=_(Be=>{"use strict";var Pp=Be&&Be.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Tp=Be&&Be.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Be,"__esModule",{value:!0});var Ip=Tp(xe()),Ap=J(),Rp=(function(n){Pp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Ap.ID,r}return e.prototype.valueToString=function(){return"#"+n.prototype.valueToString.call(this)},e})(Ip.default);Be.default=Rp});var Ur=_(He=>{"use strict";var kp=He&&He.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Pa=He&&He.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(He,"__esModule",{value:!0});var Mp=Pa(Fr()),Lp=pt(),Np=Pa(xe()),Dp=(function(n){kp(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this._namespace},set:function(t){if(t===!0||t==="*"||t==="&"){this._namespace=t,this.raws&&delete this.raws.namespace;return}var r=(0,Mp.default)(t,{isIdentifier:!0});this._namespace=t,r!==t?((0,Lp.ensureObject)(this,"raws"),this.raws.namespace=r):this.raws&&delete this.raws.namespace},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ns",{get:function(){return this._namespace},set:function(t){this.namespace=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"namespaceString",{get:function(){if(this.namespace){var t=this.stringifyProperty("namespace");return t===!0?"":t}else return""},enumerable:!1,configurable:!0}),e.prototype.qualifiedName=function(t){return this.namespace?"".concat(this.namespaceString,"|").concat(t):t},e.prototype.valueToString=function(){return this.qualifiedName(n.prototype.valueToString.call(this))},e})(Np.default);He.default=Dp});var ss=_(ze=>{"use strict";var Fp=ze&&ze.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Up=ze&&ze.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ze,"__esModule",{value:!0});var jp=Up(Ur()),$p=J(),qp=(function(n){Fp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=$p.TAG,r}return e})(jp.default);ze.default=qp});var is=_(We=>{"use strict";var Bp=We&&We.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+Ta(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Hp=We&&We.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(We,"__esModule",{value:!0});var zp=Hp(xe()),Wp=J(),Ta=(function(n){Bp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Wp.STRING,r}return e})(zp.default);We.default=Ta});var os=_(Ge=>{"use strict";var Gp=Ge&&Ge.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Vp=Ge&&Ge.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ge,"__esModule",{value:!0});var Jp=Vp(Dr()),Yp=J(),Qp=(function(n){Gp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Yp.PSEUDO,r}return e.prototype._stringify=function(t,r,s){var i=this;if(r>=s)throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(s,"."));var o=this.length?"("+this.map(function(l){return i._stringifyChild(l,t,r+1,s)}).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),o,this.rawSpaceAfter].join("")},e})(Jp.default);Ge.default=Qp});var Aa=_((iv,Ia)=>{Ia.exports=Me("util").deprecate});var fs=_(Ae=>{"use strict";var Kp=Ae&&Ae.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),us=Ae&&Ae.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},as;Object.defineProperty(Ae,"__esModule",{value:!0});Ae.unescapeValue=cs;var zt=us(Fr()),Xp=us(Wn()),Zp=us(Ur()),eh=J(),Wt=Aa(),th=/^('|")([^]*)\1$/,rh=Wt(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),nh=Wt(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),sh=Wt(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function cs(n){var e=!1,t=null,r=n,s=r.match(th);return s&&(t=s[1],r=s[2]),r=(0,Xp.default)(r),r!==n&&(e=!0),{deprecatedUsage:e,unescaped:r,quoteMark:t}}function ih(n){if(n.quoteMark!==void 0||n.value===void 0)return n;sh();var e=cs(n.value),t=e.quoteMark,r=e.unescaped;return n.raws||(n.raws={}),n.raws.value===void 0&&(n.raws.value=n.value),n.value=r,n.quoteMark=t,n}var oh=(function(n){Kp(e,n);function e(t){t===void 0&&(t={});var r=n.call(this,ih(t))||this;return r.type=eh.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,"unquoted",{get:Wt(function(){return r.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Wt(function(){return r.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),r._constructed=!0,r}return e.prototype.getQuotedValue=function(t){t===void 0&&(t={});var r=this._determineQuoteMark(t),s=ls[r],i=(0,zt.default)(this._value,s);return i},e.prototype._determineQuoteMark=function(t){return t.smart?this.smartQuoteMark(t):this.preferredQuoteMark(t)},e.prototype.setValue=function(t,r){r===void 0&&(r={}),this._value=t,this._quoteMark=this._determineQuoteMark(r),this._syncRawValue()},e.prototype.smartQuoteMark=function(t){var r=this.value,s=r.replace(/[^']/g,"").length,i=r.replace(/[^"]/g,"").length;if(s+i===0){var o=(0,zt.default)(r,{isIdentifier:!0});if(o===r)return e.NO_QUOTE;var l=this.preferredQuoteMark(t);if(l===e.NO_QUOTE){var a=this.quoteMark||t.quoteMark||e.DOUBLE_QUOTE,u=ls[a],c=(0,zt.default)(r,u);if(c.length<o.length)return a}return l}else return i===s?this.preferredQuoteMark(t):i<s?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},e.prototype.preferredQuoteMark=function(t){var r=t.preferCurrentQuoteMark?this.quoteMark:t.quoteMark;return r===void 0&&(r=t.preferCurrentQuoteMark?t.quoteMark:this.quoteMark),r===void 0&&(r=e.DOUBLE_QUOTE),r},Object.defineProperty(e.prototype,"quoted",{get:function(){var t=this.quoteMark;return t==="'"||t==='"'},set:function(t){nh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quoteMark",{get:function(){return this._quoteMark},set:function(t){if(!this._constructed){this._quoteMark=t;return}this._quoteMark!==t&&(this._quoteMark=t,this._syncRawValue())},enumerable:!1,configurable:!0}),e.prototype._syncRawValue=function(){var t=(0,zt.default)(this._value,ls[this.quoteMark]);t===this._value?this.raws&&delete this.raws.value:this.raws.value=t},Object.defineProperty(e.prototype,"qualifiedAttribute",{get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insensitiveFlag",{get:function(){return this.insensitive?"i":""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){if(this._constructed){var r=cs(t),s=r.deprecatedUsage,i=r.unescaped,o=r.quoteMark;if(s&&rh(),i===this._value&&o===this._quoteMark)return;this._value=i,this._quoteMark=o,this._syncRawValue()}else this._value=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insensitive",{get:function(){return this._insensitive},set:function(t){t||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attribute",{get:function(){return this._attribute},set:function(t){this._handleEscapes("attribute",t),this._attribute=t},enumerable:!1,configurable:!0}),e.prototype._handleEscapes=function(t,r){if(this._constructed){var s=(0,zt.default)(r,{isIdentifier:!0});s!==r?this.raws[t]=s:delete this.raws[t]}},e.prototype._spacesFor=function(t){var r={before:"",after:""},s=this.spaces[t]||{},i=this.raws.spaces&&this.raws.spaces[t]||{};return Object.assign(r,s,i)},e.prototype._stringFor=function(t,r,s){r===void 0&&(r=t),s===void 0&&(s=Ra);var i=this._spacesFor(r);return s(this.stringifyProperty(t),i)},e.prototype.offsetOf=function(t){var r=1,s=this._spacesFor("attribute");if(r+=s.before.length,t==="namespace"||t==="ns")return this.namespace?r:-1;if(t==="attributeNS"||(r+=this.namespaceString.length,this.namespace&&(r+=1),t==="attribute"))return r;r+=this.stringifyProperty("attribute").length,r+=s.after.length;var i=this._spacesFor("operator");r+=i.before.length;var o=this.stringifyProperty("operator");if(t==="operator")return o?r:-1;r+=o.length,r+=i.after.length;var l=this._spacesFor("value");r+=l.before.length;var a=this.stringifyProperty("value");if(t==="value")return a?r:-1;r+=a.length,r+=l.after.length;var u=this._spacesFor("insensitive");return r+=u.before.length,t==="insensitive"&&this.insensitive?r:-1},e.prototype.toString=function(){var t=this,r=[this.rawSpaceBefore,"["];return r.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(r.push(this._stringFor("operator")),r.push(this._stringFor("value")),r.push(this._stringFor("insensitiveFlag","insensitive",function(s,i){return s.length>0&&!t.quoted&&i.before.length===0&&!(t.spaces.value&&t.spaces.value.after)&&(i.before=" "),Ra(s,i)}))),r.push("]"),r.push(this.rawSpaceAfter),r.join("")},e.NO_QUOTE=null,e.SINGLE_QUOTE="'",e.DOUBLE_QUOTE='"',e})(Zp.default);Ae.default=oh;var ls=(as={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},as[null]={isIdentifier:!0},as);function Ra(n,e){return"".concat(e.before).concat(n).concat(e.after)}});var ps=_(Ve=>{"use strict";var ah=Ve&&Ve.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),lh=Ve&&Ve.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ve,"__esModule",{value:!0});var uh=lh(Ur()),ch=J(),fh=(function(n){ah(e,n);function e(t){var r=n.call(this,t)||this;return r.type=ch.UNIVERSAL,r.value="*",r}return e})(uh.default);Ve.default=fh});var hs=_(Je=>{"use strict";var ph=Je&&Je.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),hh=Je&&Je.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Je,"__esModule",{value:!0});var dh=hh(xe()),gh=J(),mh=(function(n){ph(e,n);function e(t){var r=n.call(this,t)||this;return r.type=gh.COMBINATOR,r}return e})(dh.default);Je.default=mh});var ds=_(Ye=>{"use strict";var yh=Ye&&Ye.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),vh=Ye&&Ye.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ye,"__esModule",{value:!0});var wh=vh(xe()),bh=J(),_h=(function(n){yh(e,n);function e(t){var r=n.call(this,t)||this;return r.type=bh.NESTING,r.value="&",r}return e})(wh.default);Ye.default=_h});var ka=_(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.default=Sh;function Sh(n){return n.sort(function(e,t){return e-t})}});var ms=_(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.combinator=E.word=E.comment=E.str=E.tab=E.newline=E.feed=E.cr=E.backslash=E.bang=E.slash=E.doubleQuote=E.singleQuote=E.space=E.greaterThan=E.pipe=E.equals=E.plus=E.caret=E.tilde=E.dollar=E.closeSquare=E.openSquare=E.closeParenthesis=E.openParenthesis=E.semicolon=E.colon=E.comma=E.at=E.asterisk=E.ampersand=void 0;E.ampersand=38;E.asterisk=42;E.at=64;E.comma=44;E.colon=58;E.semicolon=59;E.openParenthesis=40;E.closeParenthesis=41;E.openSquare=91;E.closeSquare=93;E.dollar=36;E.tilde=126;E.caret=94;E.plus=43;E.equals=61;E.pipe=124;E.greaterThan=62;E.space=32;E.singleQuote=39;E.doubleQuote=34;E.slash=47;E.bang=33;E.backslash=92;E.cr=13;E.feed=12;E.newline=10;E.tab=9;E.str=E.singleQuote;E.comment=-1;E.word=-2;E.combinator=-3});var La=_(pe=>{"use strict";var xh=pe&&pe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Eh=pe&&pe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Oh=pe&&pe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&xh(t,e,r[s]);return Eh(t,e),t}})(),ht,L;Object.defineProperty(pe,"__esModule",{value:!0});pe.FIELDS=void 0;pe.default=Ah;var b=Oh(ms()),Ch=(ht={},ht[b.tab]=!0,ht[b.newline]=!0,ht[b.cr]=!0,ht[b.feed]=!0,ht),Ph=(L={},L[b.space]=!0,L[b.tab]=!0,L[b.newline]=!0,L[b.cr]=!0,L[b.feed]=!0,L[b.ampersand]=!0,L[b.asterisk]=!0,L[b.bang]=!0,L[b.comma]=!0,L[b.colon]=!0,L[b.semicolon]=!0,L[b.openParenthesis]=!0,L[b.closeParenthesis]=!0,L[b.openSquare]=!0,L[b.closeSquare]=!0,L[b.singleQuote]=!0,L[b.doubleQuote]=!0,L[b.plus]=!0,L[b.pipe]=!0,L[b.tilde]=!0,L[b.greaterThan]=!0,L[b.equals]=!0,L[b.dollar]=!0,L[b.caret]=!0,L[b.slash]=!0,L),ys={},Ma="0123456789abcdefABCDEF";for(jr=0;jr<Ma.length;jr++)ys[Ma.charCodeAt(jr)]=!0;var jr;function Th(n,e){var t=e,r;do{if(r=n.charCodeAt(t),Ph[r])return t-1;r===b.backslash?t=Ih(n,t)+1:t++}while(t<n.length);return t-1}function Ih(n,e){var t=e,r=n.charCodeAt(t+1);if(!Ch[r])if(ys[r]){var s=0;do t++,s++,r=n.charCodeAt(t+1);while(ys[r]&&s<6);s<6&&r===b.space&&t++}else t++;return t}pe.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};function Ah(n){var e=[],t=n.css.valueOf(),r=t.length,s=-1,i=1,o=0,l=0,a,u,c,f,p,g,h,y,d,m,w,C,I;function T(R,G){if(n.safe)t+=G,d=t.length-1;else throw n.error("Unclosed "+R,i,o-s,o)}for(;o<r;){switch(a=t.charCodeAt(o),a===b.newline&&(s=o,i+=1),a){case b.space:case b.tab:case b.newline:case b.cr:case b.feed:d=o;do d+=1,a=t.charCodeAt(d),a===b.newline&&(s=d,i+=1);while(a===b.space||a===b.newline||a===b.tab||a===b.cr||a===b.feed);I=b.space,f=i,c=d-s-1,l=d;break;case b.plus:case b.greaterThan:case b.tilde:case b.pipe:d=o;do d+=1,a=t.charCodeAt(d);while(a===b.plus||a===b.greaterThan||a===b.tilde||a===b.pipe);I=b.combinator,f=i,c=o-s,l=d;break;case b.asterisk:case b.ampersand:case b.bang:case b.comma:case b.equals:case b.dollar:case b.caret:case b.openSquare:case b.closeSquare:case b.colon:case b.semicolon:case b.openParenthesis:case b.closeParenthesis:d=o,I=a,f=i,c=o-s,l=d+1;break;case b.singleQuote:case b.doubleQuote:C=a===b.singleQuote?"'":'"',d=o;do for(p=!1,d=t.indexOf(C,d+1),d===-1&&T("quote",C),g=d;t.charCodeAt(g-1)===b.backslash;)g-=1,p=!p;while(p);I=b.str,f=i,c=o-s,l=d+1;break;default:a===b.slash&&t.charCodeAt(o+1)===b.asterisk?(d=t.indexOf("*/",o+2)+1,d===0&&T("comment","*/"),u=t.slice(o,d+1),y=u.split(` -`),h=y.length-1,h>0?(m=i+h,w=d-y[h].length):(m=i,w=s),I=b.comment,i=m,f=m,c=d-w):a===b.slash?(d=o,I=a,f=i,c=o-s,l=d+1):(d=Th(t,o),I=b.word,f=i,c=d-s),l=d+1;break}e.push([I,i,o-s,f,c,o,l]),w&&(s=w,w=null),o=l}return e}});var qa=_(Y=>{"use strict";var $r=Y&&Y.__assign||function(){return $r=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s])}return n},$r.apply(this,arguments)},Rh=Y&&Y.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),kh=Y&&Y.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),qr=Y&&Y.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&Rh(t,e,r[s]);return kh(t,e),t}})(),Na=Y&&Y.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(l){o={error:l}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return i},Da=Y&&Y.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return n.concat(i||Array.prototype.slice.call(e))},oe=Y&&Y.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},Qe,vs;Object.defineProperty(Y,"__esModule",{value:!0});var Mh=oe(Xn()),ws=oe(Zn()),Lh=oe(ts()),Fa=oe(rs()),Nh=oe(ns()),Dh=oe(ss()),bs=oe(is()),Fh=oe(os()),Ua=qr(fs()),Uh=oe(ps()),_s=oe(hs()),jh=oe(ds()),$h=oe(ka()),v=qr(La()),S=qr(ms()),qh=qr(J()),j=pt(),Es=(Qe={},Qe[S.space]=!0,Qe[S.cr]=!0,Qe[S.feed]=!0,Qe[S.newline]=!0,Qe[S.tab]=!0,Qe),Bh=$r($r({},Es),(vs={},vs[S.comment]=!0,vs));function ja(n){return{line:n[v.FIELDS.START_LINE],column:n[v.FIELDS.START_COL]}}function $a(n){return{line:n[v.FIELDS.END_LINE],column:n[v.FIELDS.END_COL]}}function Ke(n,e,t,r){return{start:{line:n,column:e},end:{line:t,column:r}}}function dt(n){return Ke(n[v.FIELDS.START_LINE],n[v.FIELDS.START_COL],n[v.FIELDS.END_LINE],n[v.FIELDS.END_COL])}function Ss(n,e){if(n)return Ke(n[v.FIELDS.START_LINE],n[v.FIELDS.START_COL],e[v.FIELDS.END_LINE],e[v.FIELDS.END_COL])}function gt(n,e){var t=n[e];if(typeof t=="string")return t.indexOf("\\")!==-1&&((0,j.ensureObject)(n,"raws"),n[e]=(0,j.unesc)(t),n.raws[e]===void 0&&(n.raws[e]=t)),n}function xs(n,e){for(var t=-1,r=[];(t=n.indexOf(e,t+1))!==-1;)r.push(t);return r}function Hh(){var n=Array.prototype.concat.apply([],arguments);return n.filter(function(e,t){return t===n.indexOf(e)})}var zh=(function(){function n(e,t){t===void 0&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,j.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,v.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=Ss(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new Mh.default({source:r}),this.root.errorGenerator=this._errorGenerator();var s=new ws.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(s),this.current=s,this.loop()}return n.prototype._errorGenerator=function(){var e=this;return function(t,r){return typeof e.rule=="string"?new Error(t):e.rule.error(t,r)}},n.prototype.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[v.FIELDS.TYPE]!==S.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[v.FIELDS.TYPE]!==S.closeSquare)return this.expected("closing square bracket",this.currToken[v.FIELDS.START_POS]);var r=e.length,s={source:Ke(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[v.FIELDS.START_POS]};if(r===1&&!~[S.word].indexOf(e[0][v.FIELDS.TYPE]))return this.expected("attribute",e[0][v.FIELDS.START_POS]);for(var i=0,o="",l="",a=null,u=!1;i<r;){var c=e[i],f=this.content(c),p=e[i+1];switch(c[v.FIELDS.TYPE]){case S.space:if(u=!0,this.options.lossy)break;if(a){(0,j.ensureObject)(s,"spaces",a);var g=s.spaces[a].after||"";s.spaces[a].after=g+f;var h=(0,j.getProp)(s,"raws","spaces",a,"after")||null;h&&(s.raws.spaces[a].after=h+f)}else o=o+f,l=l+f;break;case S.asterisk:if(p[v.FIELDS.TYPE]===S.equals)s.operator=f,a="operator";else if((!s.namespace||a==="namespace"&&!u)&&p){o&&((0,j.ensureObject)(s,"spaces","attribute"),s.spaces.attribute.before=o,o=""),l&&((0,j.ensureObject)(s,"raws","spaces","attribute"),s.raws.spaces.attribute.before=o,l=""),s.namespace=(s.namespace||"")+f;var y=(0,j.getProp)(s,"raws","namespace")||null;y&&(s.raws.namespace+=f),a="namespace"}u=!1;break;case S.dollar:if(a==="value"){var d=(0,j.getProp)(s,"raws","value");s.value+="$",d&&(s.raws.value=d+"$");break}case S.caret:p[v.FIELDS.TYPE]===S.equals&&(s.operator=f,a="operator"),u=!1;break;case S.combinator:if(f==="~"&&p[v.FIELDS.TYPE]===S.equals&&(s.operator=f,a="operator"),f!=="|"){u=!1;break}p[v.FIELDS.TYPE]===S.equals?(s.operator=f,a="operator"):!s.namespace&&!s.attribute&&(s.namespace=!0),u=!1;break;case S.word:if(p&&this.content(p)==="|"&&e[i+2]&&e[i+2][v.FIELDS.TYPE]!==S.equals&&!s.operator&&!s.namespace)s.namespace=f,a="namespace";else if(!s.attribute||a==="attribute"&&!u){o&&((0,j.ensureObject)(s,"spaces","attribute"),s.spaces.attribute.before=o,o=""),l&&((0,j.ensureObject)(s,"raws","spaces","attribute"),s.raws.spaces.attribute.before=l,l=""),s.attribute=(s.attribute||"")+f;var y=(0,j.getProp)(s,"raws","attribute")||null;y&&(s.raws.attribute+=f),a="attribute"}else if(!s.value&&s.value!==""||a==="value"&&!(u||s.quoteMark)){var m=(0,j.unesc)(f),d=(0,j.getProp)(s,"raws","value")||"",w=s.value||"";s.value=w+m,s.quoteMark=null,(m!==f||d)&&((0,j.ensureObject)(s,"raws"),s.raws.value=(d||w)+f),a="value"}else{var C=f==="i"||f==="I";(s.value||s.value==="")&&(s.quoteMark||u)?(s.insensitive=C,(!C||f==="I")&&((0,j.ensureObject)(s,"raws"),s.raws.insensitiveFlag=f),a="insensitive",o&&((0,j.ensureObject)(s,"spaces","insensitive"),s.spaces.insensitive.before=o,o=""),l&&((0,j.ensureObject)(s,"raws","spaces","insensitive"),s.raws.spaces.insensitive.before=l,l="")):(s.value||s.value==="")&&(a="value",s.value+=f,s.raws.value&&(s.raws.value+=f))}u=!1;break;case S.str:if(!s.attribute||!s.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:c[v.FIELDS.START_POS]});var I=(0,Ua.unescapeValue)(f),T=I.unescaped,R=I.quoteMark;s.value=T,s.quoteMark=R,a="value",(0,j.ensureObject)(s,"raws"),s.raws.value=f,u=!1;break;case S.equals:if(!s.attribute)return this.expected("attribute",c[v.FIELDS.START_POS],f);if(s.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:c[v.FIELDS.START_POS]});s.operator=s.operator?s.operator+f:f,a="operator",u=!1;break;case S.comment:if(a)if(u||p&&p[v.FIELDS.TYPE]===S.space||a==="insensitive"){var G=(0,j.getProp)(s,"spaces",a,"after")||"",q=(0,j.getProp)(s,"raws","spaces",a,"after")||G;(0,j.ensureObject)(s,"raws","spaces",a),s.raws.spaces[a].after=q+f}else{var Q=s[a]||"",P=(0,j.getProp)(s,"raws",a)||Q;(0,j.ensureObject)(s,"raws"),s.raws[a]=P+f}else l=l+f;break;default:return this.error('Unexpected "'.concat(f,'" found.'),{index:c[v.FIELDS.START_POS]})}i++}gt(s,"attribute"),gt(s,"namespace"),this.newNode(new Ua.default(s)),this.position++},n.prototype.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,r=[],s="",i=void 0;do if(Es[this.currToken[v.FIELDS.TYPE]])this.options.lossy||(s+=this.content());else if(this.currToken[v.FIELDS.TYPE]===S.comment){var o={};s&&(o.before=s,s=""),i=new Fa.default({value:this.content(),source:dt(this.currToken),sourceIndex:this.currToken[v.FIELDS.START_POS],spaces:o}),r.push(i)}while(++this.position<e);if(s){if(i)i.spaces.after=s;else if(!this.options.lossy){var l=this.tokens[t],a=this.tokens[this.position-1];r.push(new bs.default({value:"",source:Ke(l[v.FIELDS.START_LINE],l[v.FIELDS.START_COL],a[v.FIELDS.END_LINE],a[v.FIELDS.END_COL]),sourceIndex:l[v.FIELDS.START_POS],spaces:{before:s,after:""}}))}}return r},n.prototype.convertWhitespaceNodesToSpace=function(e,t){var r=this;t===void 0&&(t=!1);var s="",i="";e.forEach(function(l){var a=r.lossySpace(l.spaces.before,t),u=r.lossySpace(l.rawSpaceBefore,t);s+=a+r.lossySpace(l.spaces.after,t&&a.length===0),i+=a+l.value+r.lossySpace(l.rawSpaceAfter,t&&u.length===0)}),i===s&&(i=void 0);var o={space:s,rawSpace:i};return o},n.prototype.isNamedCombinator=function(e){return e===void 0&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][v.FIELDS.TYPE]===S.slash&&this.tokens[e+1]&&this.tokens[e+1][v.FIELDS.TYPE]===S.word&&this.tokens[e+2]&&this.tokens[e+2][v.FIELDS.TYPE]===S.slash},n.prototype.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,j.unesc)(e).toLowerCase(),r={};t!==e&&(r.value="/".concat(e,"/"));var s=new _s.default({value:"/".concat(t,"/"),source:Ke(this.currToken[v.FIELDS.START_LINE],this.currToken[v.FIELDS.START_COL],this.tokens[this.position+2][v.FIELDS.END_LINE],this.tokens[this.position+2][v.FIELDS.END_COL]),sourceIndex:this.currToken[v.FIELDS.START_POS],raws:r});return this.position=this.position+3,s}else this.unexpected()},n.prototype.combinator=function(){var e=this;if(this.content()==="|")return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(t<0||this.tokens[t][v.FIELDS.TYPE]===S.comma||this.tokens[t][v.FIELDS.TYPE]===S.closeParenthesis){var r=this.parseWhitespaceEquivalentTokens(t);if(r.length>0){var s=this.current.last;if(s){var i=this.convertWhitespaceNodesToSpace(r),o=i.space,l=i.rawSpace;l!==void 0&&(s.rawSpaceAfter+=l),s.spaces.after+=o}else r.forEach(function(y){return e.newNode(y)})}return}var a=this.currToken,u=void 0;t>this.position&&(u=this.parseWhitespaceEquivalentTokens(t));var c;if(this.isNamedCombinator()?c=this.namedCombinator():this.currToken[v.FIELDS.TYPE]===S.combinator?(c=new _s.default({value:this.content(),source:dt(this.currToken),sourceIndex:this.currToken[v.FIELDS.START_POS]}),this.position++):Es[this.currToken[v.FIELDS.TYPE]]||u||this.unexpected(),c){if(u){var f=this.convertWhitespaceNodesToSpace(u),o=f.space,l=f.rawSpace;c.spaces.before=o,c.rawSpaceBefore=l}}else{var p=this.convertWhitespaceNodesToSpace(u,!0),o=p.space,l=p.rawSpace;l||(l=o);var g={},h={spaces:{}};o.endsWith(" ")&&l.endsWith(" ")?(g.before=o.slice(0,o.length-1),h.spaces.before=l.slice(0,l.length-1)):o[0]===" "&&l[0]===" "?(g.after=o.slice(1),h.spaces.after=l.slice(1)):h.value=l,c=new _s.default({value:" ",source:Ss(a,this.tokens[this.position-1]),sourceIndex:a[v.FIELDS.START_POS],spaces:g,raws:h})}return this.currToken&&this.currToken[v.FIELDS.TYPE]===S.space&&(c.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(c)},n.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var e=new ws.default({source:{start:ja(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][v.FIELDS.START_POS]});this.current.parent.append(e),this.current=e,this.position++},n.prototype.comment=function(){var e=this.currToken;this.newNode(new Fa.default({value:this.content(),source:dt(e),sourceIndex:e[v.FIELDS.START_POS]})),this.position++},n.prototype.error=function(e,t){throw this.root.error(e,t)},n.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[v.FIELDS.START_POS]})},n.prototype.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[v.FIELDS.START_POS])},n.prototype.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[v.FIELDS.START_POS])},n.prototype.unexpected=function(){return this.error("Unexpected '".concat(this.content(),"'. Escaping special characters with \\ may help."),this.currToken[v.FIELDS.START_POS])},n.prototype.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[v.FIELDS.START_POS])},n.prototype.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[v.FIELDS.TYPE]===S.word)return this.position++,this.word(e);if(this.nextToken[v.FIELDS.TYPE]===S.asterisk)return this.position++,this.universal(e);this.unexpectedPipe()},n.prototype.nesting=function(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var t=this.currToken;this.newNode(new jh.default({value:this.content(),source:dt(t),sourceIndex:t[v.FIELDS.START_POS]})),this.position++},n.prototype.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===qh.PSEUDO){var r=new ws.default({source:{start:ja(this.tokens[this.position])},sourceIndex:this.tokens[this.position][v.FIELDS.START_POS]}),s=this.current;e.append(r),this.current=r,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth,"."),{index:this.currToken[v.FIELDS.START_POS]});this.position<this.tokens.length&&t;)this.currToken[v.FIELDS.TYPE]===S.openParenthesis&&t++,this.currToken[v.FIELDS.TYPE]===S.closeParenthesis&&t--,t?this.parse():(this.current.source.end=$a(this.currToken),this.current.parent.source.end=$a(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=s}else{for(var i=this.currToken,o="(",l=void 0;this.position<this.tokens.length&&t;)this.currToken[v.FIELDS.TYPE]===S.openParenthesis&&t++,this.currToken[v.FIELDS.TYPE]===S.closeParenthesis&&t--,l=this.currToken,o+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",o,o):this.newNode(new bs.default({value:o,source:Ke(i[v.FIELDS.START_LINE],i[v.FIELDS.START_COL],l[v.FIELDS.END_LINE],l[v.FIELDS.END_COL]),sourceIndex:i[v.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[v.FIELDS.START_POS])},n.prototype.pseudo=function(){for(var e=this,t="",r=this.currToken;this.currToken&&this.currToken[v.FIELDS.TYPE]===S.colon;)t+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[v.FIELDS.TYPE]===S.word)this.splitWord(!1,function(s,i){t+=s,e.newNode(new Fh.default({value:t,source:Ss(r,e.currToken),sourceIndex:r[v.FIELDS.START_POS]})),i>1&&e.nextToken&&e.nextToken[v.FIELDS.TYPE]===S.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[v.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[v.FIELDS.START_POS])},n.prototype.space=function(){var e=this.content();this.position===0||this.prevToken[v.FIELDS.TYPE]===S.comma||this.prevToken[v.FIELDS.TYPE]===S.openParenthesis||this.current.nodes.every(function(t){return t.type==="comment"})?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[v.FIELDS.TYPE]===S.comma||this.nextToken[v.FIELDS.TYPE]===S.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},n.prototype.string=function(){var e=this.currToken;this.newNode(new bs.default({value:this.content(),source:dt(e),sourceIndex:e[v.FIELDS.START_POS]})),this.position++},n.prototype.universal=function(e){var t=this.nextToken;if(t&&this.content(t)==="|")return this.position++,this.namespace();var r=this.currToken;this.newNode(new Uh.default({value:this.content(),source:dt(r),sourceIndex:r[v.FIELDS.START_POS]}),e),this.position++},n.prototype.splitWord=function(e,t){for(var r=this,s=this.nextToken,i=this.content();s&&~[S.dollar,S.caret,S.equals,S.word].indexOf(s[v.FIELDS.TYPE]);){this.position++;var o=this.content();if(i+=o,o.lastIndexOf("\\")===o.length-1){var l=this.nextToken;l&&l[v.FIELDS.TYPE]===S.space&&(i+=this.requiredSpace(this.content(l)),this.position++)}s=this.nextToken}var a=xs(i,".").filter(function(p){var g=i[p-1]==="\\",h=/^\d+\.\d+%$/.test(i);return!g&&!h}),u=xs(i,"#").filter(function(p){return i[p-1]!=="\\"}),c=xs(i,"#{");c.length&&(u=u.filter(function(p){return!~c.indexOf(p)}));var f=(0,$h.default)(Hh(Da(Da([0],Na(a),!1),Na(u),!1)));f.forEach(function(p,g){var h=f[g+1]||i.length,y=i.slice(p,h);if(g===0&&t)return t.call(r,y,f.length);var d,m=r.currToken,w=m[v.FIELDS.START_POS]+f[g],C=Ke(m[1],m[2]+p,m[3],m[2]+(h-1));if(~a.indexOf(p)){var I={value:y.slice(1),source:C,sourceIndex:w};d=new Lh.default(gt(I,"value"))}else if(~u.indexOf(p)){var T={value:y.slice(1),source:C,sourceIndex:w};d=new Nh.default(gt(T,"value"))}else{var R={value:y,source:C,sourceIndex:w};gt(R,"value"),d=new Dh.default(R)}r.newNode(d,e),e=null}),this.position++},n.prototype.word=function(e){var t=this.nextToken;return t&&this.content(t)==="|"?(this.position++,this.namespace()):this.splitWord(e)},n.prototype.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},n.prototype.parse=function(e){switch(this.currToken[v.FIELDS.TYPE]){case S.space:this.space();break;case S.comment:this.comment();break;case S.openParenthesis:this.parentheses();break;case S.closeParenthesis:e&&this.missingParenthesis();break;case S.openSquare:this.attribute();break;case S.dollar:case S.caret:case S.equals:case S.word:this.word();break;case S.colon:this.pseudo();break;case S.comma:this.comma();break;case S.asterisk:this.universal();break;case S.ampersand:this.nesting();break;case S.slash:case S.combinator:this.combinator();break;case S.str:this.string();break;case S.closeSquare:this.missingSquareBracket();case S.semicolon:this.missingBackslash();default:this.unexpected()}},n.prototype.expected=function(e,t,r){if(Array.isArray(e)){var s=e.pop();e="".concat(e.join(", ")," or ").concat(s)}var i=/^[aeiou]/.test(e[0])?"an":"a";return r?this.error("Expected ".concat(i," ").concat(e,', found "').concat(r,'" instead.'),{index:t}):this.error("Expected ".concat(i," ").concat(e,"."),{index:t})},n.prototype.requiredSpace=function(e){return this.options.lossy?" ":e},n.prototype.optionalSpace=function(e){return this.options.lossy?"":e},n.prototype.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},n.prototype.parseParenthesisToken=function(e){var t=this.content(e);return e[v.FIELDS.TYPE]===S.space?this.requiredSpace(t):t},n.prototype.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,gt(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},n.prototype.content=function(e){return e===void 0&&(e=this.currToken),this.css.slice(e[v.FIELDS.START_POS],e[v.FIELDS.END_POS])},Object.defineProperty(n.prototype,"currToken",{get:function(){return this.tokens[this.position]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextToken",{get:function(){return this.tokens[this.position+1]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prevToken",{get:function(){return this.tokens[this.position-1]},enumerable:!1,configurable:!0}),n.prototype.locateNextMeaningfulToken=function(e){e===void 0&&(e=this.position+1);for(var t=e;t<this.tokens.length;)if(Bh[this.tokens[t][v.FIELDS.TYPE]]){t++;continue}else return t;return-1},n})();Y.default=zh});var Ba=_(Gt=>{"use strict";var Wh=Gt&&Gt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Gt,"__esModule",{value:!0});var Gh=Wh(qa()),Vh=(function(){function n(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}return n.prototype._shouldUpdateSelector=function(e,t){t===void 0&&(t={});var r=Object.assign({},this.options,t);return r.updateSelector===!1?!1:typeof e!="string"},n.prototype._isLossy=function(e){e===void 0&&(e={});var t=Object.assign({},this.options,e);return t.lossless===!1},n.prototype._root=function(e,t){t===void 0&&(t={});var r=new Gh.default(e,this._parseOptions(t));return r.root},n.prototype._parseOptions=function(e){var t=Object.assign({},this.options,e);return{lossy:this._isLossy(t),maxNestingDepth:t.maxNestingDepth}},n.prototype._stringifyOptions=function(e){var t=Object.assign({},this.options,e);return{maxNestingDepth:t.maxNestingDepth}},n.prototype._run=function(e,t){var r=this;return t===void 0&&(t={}),new Promise(function(s,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(l){var a=void 0;return r._shouldUpdateSelector(e,t)&&(a=o.toString(r._stringifyOptions(t)),e.selector=a),{transform:l,root:o,string:a}}).then(s,i)}catch(l){i(l);return}})},n.prototype._runSync=function(e,t){t===void 0&&(t={});var r=this._root(e,t),s=this.func(r);if(s&&typeof s.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var i=void 0;return t.updateSelector&&typeof e!="string"&&(i=r.toString(this._stringifyOptions(t)),e.selector=i),{transform:s,root:r,string:i}},n.prototype.ast=function(e,t){return this._run(e,t).then(function(r){return r.root})},n.prototype.astSync=function(e,t){return this._runSync(e,t).root},n.prototype.transform=function(e,t){return this._run(e,t).then(function(r){return r.transform})},n.prototype.transformSync=function(e,t){return this._runSync(e,t).transform},n.prototype.process=function(e,t){var r=this;return this._run(e,t).then(function(s){return s.string||s.root.toString(r._stringifyOptions(t))})},n.prototype.processSync=function(e,t){var r=this._runSync(e,t);return r.string||r.root.toString(this._stringifyOptions(t))},n})();Gt.default=Vh});var Ha=_(M=>{"use strict";var ae=M&&M.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(M,"__esModule",{value:!0});M.universal=M.tag=M.string=M.selector=M.root=M.pseudo=M.nesting=M.id=M.comment=M.combinator=M.className=M.attribute=void 0;var Jh=ae(fs()),Yh=ae(ts()),Qh=ae(hs()),Kh=ae(rs()),Xh=ae(ns()),Zh=ae(ds()),ed=ae(os()),td=ae(Xn()),rd=ae(Zn()),nd=ae(is()),sd=ae(ss()),id=ae(ps()),od=function(n){return new Jh.default(n)};M.attribute=od;var ad=function(n){return new Yh.default(n)};M.className=ad;var ld=function(n){return new Qh.default(n)};M.combinator=ld;var ud=function(n){return new Kh.default(n)};M.comment=ud;var cd=function(n){return new Xh.default(n)};M.id=cd;var fd=function(n){return new Zh.default(n)};M.nesting=fd;var pd=function(n){return new ed.default(n)};M.pseudo=pd;var hd=function(n){return new td.default(n)};M.root=hd;var dd=function(n){return new rd.default(n)};M.selector=dd;var gd=function(n){return new nd.default(n)};M.string=gd;var md=function(n){return new sd.default(n)};M.tag=md;var yd=function(n){return new id.default(n)};M.universal=yd});var Wa=_(A=>{"use strict";var te;Object.defineProperty(A,"__esModule",{value:!0});A.isUniversal=A.isTag=A.isString=A.isSelector=A.isRoot=A.isPseudo=A.isNesting=A.isIdentifier=A.isComment=A.isCombinator=A.isClassName=A.isAttribute=void 0;A.isNode=Os;A.isPseudoElement=za;A.isPseudoClass=wd;A.isContainer=bd;A.isNamespace=_d;var $=J(),vd=(te={},te[$.ATTRIBUTE]=!0,te[$.CLASS]=!0,te[$.COMBINATOR]=!0,te[$.COMMENT]=!0,te[$.ID]=!0,te[$.NESTING]=!0,te[$.PSEUDO]=!0,te[$.ROOT]=!0,te[$.SELECTOR]=!0,te[$.STRING]=!0,te[$.TAG]=!0,te[$.UNIVERSAL]=!0,te);function Os(n){return typeof n=="object"&&vd[n.type]}function le(n,e){return Os(e)&&e.type===n}A.isAttribute=le.bind(null,$.ATTRIBUTE);A.isClassName=le.bind(null,$.CLASS);A.isCombinator=le.bind(null,$.COMBINATOR);A.isComment=le.bind(null,$.COMMENT);A.isIdentifier=le.bind(null,$.ID);A.isNesting=le.bind(null,$.NESTING);A.isPseudo=le.bind(null,$.PSEUDO);A.isRoot=le.bind(null,$.ROOT);A.isSelector=le.bind(null,$.SELECTOR);A.isString=le.bind(null,$.STRING);A.isTag=le.bind(null,$.TAG);A.isUniversal=le.bind(null,$.UNIVERSAL);function za(n){return(0,A.isPseudo)(n)&&n.value&&(n.value.startsWith("::")||n.value.toLowerCase()===":before"||n.value.toLowerCase()===":after"||n.value.toLowerCase()===":first-letter"||n.value.toLowerCase()===":first-line")}function wd(n){return(0,A.isPseudo)(n)&&!za(n)}function bd(n){return!!(Os(n)&&n.walk)}function _d(n){return(0,A.isAttribute)(n)||(0,A.isTag)(n)}});var Ga=_(Oe=>{"use strict";var Sd=Oe&&Oe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Cs=Oe&&Oe.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Sd(e,n,t)};Object.defineProperty(Oe,"__esModule",{value:!0});Cs(J(),Oe);Cs(Ha(),Oe);Cs(Wa(),Oe)});var Br=_((Ce,Va)=>{"use strict";var xd=Ce&&Ce.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Ed=Ce&&Ce.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Od=Ce&&Ce.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&xd(t,e,r[s]);return Ed(t,e),t}})(),Cd=Ce&&Ce.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},Pd=Cd(Ba()),Td=Od(Ga()),Ps=function(n){return new Pd.default(n)};Object.assign(Ps,Td);delete Ps.__esModule;Va.exports=Ps});import{existsSync as wt,mkdirSync as Kr,writeFileSync as Xr,readFileSync as Zr}from"node:fs";import{dirname as mm,join as re,resolve as ye}from"node:path";async function fr(n,e,t){try{let r=!0;try{await t(n,["plugin","is-installed",e])}catch{r=!1}if(!r)return await t(n,["plugin","install",e,"--activate"]),{ok:!0,action:"installed"};let s=!0;try{await t(n,["plugin","is-active",e])}catch{s=!1}return s?{ok:!0,action:"none"}:(await t(n,["plugin","activate",e]),{ok:!0,action:"activated"})}catch(r){return{ok:!1,error:r.message}}}function ai(n,e){let t=ee(n,null,!1),r=t.root(),s=r.children('header, [role="banner"]').first(),i=r.children('footer, [role="contentinfo"]').last(),o=s.length?t.html(s):"",l=i.length?t.html(i):"";s.length&&s.remove(),i.length&&i.remove();let a=t.html(r).trim();return{headerHtml:o,mainHtml:a,footerHtml:l}}function li(n,e,t){let r=new RegExp(`<${e}(?![\\w-])[^>]*>`,"gi"),s=new RegExp(`</${e}\\s*>`,"gi"),i=[],o;for(;o=r.exec(n);)i.push({i:o.index,end:o.index+o[0].length,open:!0});for(;o=s.exec(n);)i.push({i:o.index,end:o.index+o[0].length,open:!1});i.sort((c,f)=>c.i-f.i);let l=[],a=0,u=-1;for(let c of i)c.open?(a===0&&(u=c.i),a++):a>0&&(a--,a===0&&u>=0&&l.push([u,c.end]));return l.length===0?null:t==="first"?l[0]:l[l.length-1]}function lu(n,e){let t=new RegExp(`<[a-zA-Z][^>]*\\bid="${e}"`,"i").exec(n);return t?t.index:-1}function ui(n,e){let t=lu(n,e.id);if(t>=0){let r=li(n.slice(t),e.tag,"first");if(r)return[t+r[0],t+r[1]]}return li(n,e.tag,e.which)}function uu(n,e){let t=/<div(?![\w-])|<\/div\s*>/gi;t.lastIndex=e;let r=0,s;for(;s=t.exec(n);)if(s[0][1]==="/"){if(--r===0)return s.index+s[0].length}else r++;return n.length}function cu(n,e){let t="shopify-section-group-header-group",r=-1,s=-1,i=0;for(;;){let o=n.indexOf(t,i);if(o<0)break;let l=n.lastIndexOf("<",o);if(l<0)break;let a=uu(n,l);if(r<0)r=l;else if(n.slice(s,l).trim()!=="")break;s=a,i=a}return r>=0&&r<=e[0]&&s>=e[1]?[r,s]:e}function fu(n){let e=/<\/?section\b[^>]*>/gi,t=[],r=0,s=-1,i;for(;i=e.exec(n);)i[0].startsWith("</")?r>0&&(r--,r===0&&s>=0&&t.push([s,i.index+i[0].length])):(r===0&&(s=i.index),r++);return t}function ci(n){let e={found:!1,openWrap:"",headerHtml:"",midBefore:"",sectionsHtml:[],midAfter:"",footerHtml:"",closeWrap:""},t=ui(n,{tag:"header",id:"SITE_HEADER",which:"first"}),r=t?cu(n,t):null,s=ui(n,{tag:"footer",id:"SITE_FOOTER",which:"last"});if(!r&&!s)return e;let i=r?r[0]:0,o=r?r[1]:0,l=s?s[0]:n.length,a=s?s[1]:n.length;if(l<o)return e;let u=n.slice(0,i),c=r?n.slice(i,o):"",f=n.slice(o,l),p=s?n.slice(l,a):"",g=n.slice(a),h=fu(f);if(h.length===0)return{found:!0,openWrap:u,headerHtml:c,midBefore:"",sectionsHtml:f?[f]:[],midAfter:"",footerHtml:p,closeWrap:g};let y=f.slice(0,h[0][0]),d=f.slice(h[h.length-1][1]),m=[];for(let w=0;w<h.length;w++){let C=w+1<h.length?h[w+1][0]:h[w][1];m.push(f.slice(h[w][0],C))}return{found:!0,openWrap:u,headerHtml:c,midBefore:y,sectionsHtml:m,midAfter:d,footerHtml:p,closeWrap:g}}function pr(n,e,t={}){if(!n||e.size===0)return n;let r=hu(e),s=new Map(e),i=new Set,o=pu(n);for(let u of o){if(i.has(u))continue;i.add(u);let c=du(u,e,r);c?s.set(u,c):t.onMissing&&t.onMissing(u)}let l=n,a=[...s.entries()].filter(([u])=>u).sort((u,c)=>c[0].length-u[0].length);for(let[u,c]of a){let f=vu(u);l=l.replace(new RegExp(f,"g"),()=>c)}return l}var fi=/https?:\/\/[^\s"'<>\\]+/g;function pu(n){let e=[],t=[/<img[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi,/<a[^>]*\bhref\s*=\s*["']([^"']+\.(?:jpe?g|png|gif|webp|svg|avif|mp4|webm|pdf))["']/gi,/\bsrcset\s*=\s*["']([^"']+)["']/gi,/"src"\s*:\s*"([^"]+)"/g,/"url"\s*:\s*"([^"]+)"/g];for(let r of t){let s;for(;(s=r.exec(n))!==null;){let i=s[1];if(r.source.includes("srcset")){let o,l=new RegExp(fi.source,"g");for(;(o=l.exec(i))!==null;)e.push(o[0])}else e.push(i)}}return e.map(r=>r.match(fi)?.[0]??r).filter(r=>/^https?:\/\//i.test(r))}function hu(n){let e=new Map;for(let[t,r]of n.entries()){let s=mu(t);for(let i of pi(t)){let o=e.get(i);(!o||s>o.score)&&e.set(i,{local:r,score:s})}}return e}function du(n,e,t){let r=e.get(n);if(r)return r;for(let s of pi(n)){let i=t.get(s);if(i)return i.local}}function pi(n){let e=[],t=yu(n);if(!t)return e;if(t.hostname==="static.wixstatic.com"){let r=gu(t);r&&e.push(`wix:${r}`)}return e}function gu(n){let e=n.pathname.split("/").filter(Boolean),t=e.indexOf("media");if(!(t===-1||t+1>=e.length))return decodeURIComponent(e[t+1])}function mu(n){let e=n.match(/\bw_(\d+),h_(\d+)/i);return e?Number(e[1])*Number(e[2]):0}function yu(n){try{let e=new URL(n);return/^https?:$/i.test(e.protocol)?e:void 0}catch{return}}function vu(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function on(n){let e=n;try{e=decodeURIComponent(e)}catch{}return e=e.replace(/\.html?$/i,""),e.startsWith("/")||(e="/"+e),e!=="/"&&(e=e.replace(/\/+$/,"")),e===""&&(e="/"),e.toLowerCase()}function hi(n){return n.toLowerCase().replace(/^www\./,"")}function di(n,e={}){let t=new Map,r=(e.siteOrigins??[]).map(hi).filter(Boolean),s=(i,o)=>{let l=on(i);t.set(l,o);for(let a of r)t.set(`${a}${l}`,o)};s("/","/");for(let i of n??[])!i?.from||!i?.to||s(i.from,i.to);return t}var wu=/^(?:mailto:|tel:|javascript:|data:|sms:|geo:|callto:)/i;function bu(n){let e=n.trim(),t={key:null,fragment:"",internalRelative:!1};if(!e||wu.test(e)||e.startsWith("#"))return t;if(/^https?:\/\//i.test(e)||e.startsWith("//")){let l;try{l=new URL(e.startsWith("//")?`https:${e}`:e)}catch{return t}return{key:`${hi(l.hostname)}${on(l.pathname)}`,fragment:l.hash,internalRelative:!1}}let r=e.indexOf("#"),s=r>=0?e.slice(r):"",i=r>=0?e.slice(0,r):e,o=i.indexOf("?");return o>=0&&(i=i.slice(0,o)),i=i.replace(/^(?:\.\.?\/)+/,""),{key:on(i),fragment:s,internalRelative:!0}}function gi(n,e,t={}){if(!n||e.size===0)return n;let r=new Set;return n.replace(/\bhref\s*=\s*(["'])([^"']*)\1/gi,(s,i,o)=>{let{key:l,fragment:a,internalRelative:u}=bu(o);if(l===null)return s;let c=e.get(l);return c?`href=${i}${c}${a}${i}`:(u&&t.onMissing&&!r.has(o)&&(r.add(o),t.onMissing(o)),s)})}var _u=[/(^|\.)youtube\.com$/i,/(^|\.)youtube-nocookie\.com$/i,/(^|\.)vimeo\.com$/i,/(^|\.)google\.com$/i];function Su(n){try{let{hostname:e}=new URL(n);return _u.some(t=>t.test(e))}catch{return!1}}function _t(n,e){let t=n;e.mediaUrlMap&&e.mediaUrlMap.size>0&&(t=pr(t,e.mediaUrlMap)),e.linkMap&&e.linkMap.size>0&&(t=gi(t,e.linkMap));let r=ee(t,null,!1),s=[];r("style").each((l,a)=>{s.push(r(a).html()??""),r(a).remove()}),r("script, noscript, base").remove(),r("link").each((l,a)=>{let u=(r(a).attr("rel")??"").toLowerCase(),c=r(a).attr("href")??"",f=/\b(preload|prefetch|modulepreload|preconnect|dns-prefetch|prerender)\b/.test(u),p=/(?:parastorage|wixstatic)\.com|\.wix\.com/i.test(c);(f||p)&&r(a).remove()}),r("*").each((l,a)=>{let u=a.attribs??{};for(let c of Object.keys(u))/^on/i.test(c)&&r(a).removeAttr(c)}),r('[class*="scroll-trigger"]').each((l,a)=>{let c=(r(a).attr("class")??"").split(/\s+/).filter(f=>f&&f!=="scroll-trigger"&&!f.startsWith("scroll-trigger--")).join(" ");c?r(a).attr("class",c):r(a).removeAttr("class")}),r("a[href]").each((l,a)=>{let u=r(a).attr("href")??"";/^\s*(?:javascript|vbscript):/i.test(u)&&r(a).removeAttr("href")}),r("iframe").each((l,a)=>{let u=r(a).attr("src")??"";Su(u)||r(a).remove()}),r("img[style]").each((l,a)=>{let u=r(a).attr("style")??"";if(!/object-fit\s*:\s*cover/i.test(u))return;let c=u.split(";").map(f=>f.trim()).filter(f=>f&&!/^(width|height)\s*:/i.test(f)).join("; ");c?r(a).attr("style",c+";"):r(a).removeAttr("style"),r(a).removeAttr("width"),r(a).removeAttr("height")});let i=r.html().replace(/<!--[\s\S]*?-->/g,""),o=Ys(i);if(o.length>0)throw new Error(`html-carry left injection vectors: ${o.join("; ")}`);return{html:i.trim(),styleText:s.join(` -`)}}var N=ar(ya(),1),ct=N.default,gy=N.default.stringify,my=N.default.fromJSON,yy=N.default.plugin,vy=N.default.parse,wy=N.default.list,by=N.default.document,_y=N.default.comment,Sy=N.default.atRule,xy=N.default.rule,Ey=N.default.decl,Oy=N.default.root,Cy=N.default.CssSyntaxError,Py=N.default.Declaration,Ty=N.default.Container,Iy=N.default.Processor,Ay=N.default.Document,Ry=N.default.Comment,ky=N.default.Warning,My=N.default.AtRule,Ly=N.default.Result,Ny=N.default.Input,Dy=N.default.Rule,Fy=N.default.Root,Uy=N.default.Node;var Vt=ar(Br(),1),Id=new Set(["html","body",":root"]),Ad=new Set(["html",":root"]);function Rd(n,e){let t=`:where(${e})`;return(0,Vt.default)(r=>{r.each(s=>{let i=s.first;if(i&&(i.type==="tag"||i.type==="pseudo")&&Id.has(i.toString())){i.replaceWith(Vt.default.string({value:t}));return}s.prepend(Vt.default.combinator({value:" "})),s.prepend(Vt.default.string({value:t}))})}).processSync(n)}function Jt(n,e){let t=ct.parse(n),r=[];if(t.walkRules(i=>{i.parent?.type!=="root"||!i.selectors.some(l=>Ad.has(l.trim()))||(i.walkDecls(/^font-size$/i,l=>{r.push(l.value.trim()),l.remove()}),i.nodes.length===0&&i.remove())}),t.walkRules(i=>{i.parent&&i.parent.type==="atrule"&&/keyframes$/i.test(i.parent.name??"")||(i.selector=i.selectors.map(o=>Rd(o,e.scope)).join(", "))}),e.scopeId){let i=new Map;t.walkAtRules(/^keyframes$/i,o=>{let l=o.params.trim(),a=`${l}__${e.scopeId}`;i.set(l,a),o.params=a}),i.size>0&&t.walkDecls(/^(animation|animation-name)$/i,o=>{for(let[l,a]of i)o.value=o.value.replace(new RegExp(`\\b${l}\\b`,"g"),a)})}return e.rewriteUrl&&t.walkDecls(i=>{i.value=i.value.replace(/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi,(o,l,a)=>{let u=e.rewriteUrl(a);return u?`url(${l}${u}${l})`:o})}),(r.length?`:root{font-size:${r[r.length-1]}} -`:"")+t.toString()}var Ja=ar(Br(),1);function kd(n){try{let e="";return(0,Ja.default)(t=>{let s=t.first.nodes,i="";for(let o=s.length-1;o>=0&&s[o].type!=="combinator";o--)i=s[o].toString()+i;e=i.trim()}).processSync(n),e||null}catch{return null}}function Yt(n,e){let t=ee(e),r=ct.parse(n);return r.walkRules(s=>{if(s.parent&&s.parent.type==="atrule")return;s.selectors.some(o=>{let l=kd(o);if(!l||/^(html|body|:root)(\b|$)/i.test(l))return!0;let a=l.replace(/:{1,2}[\w-]+(\([^)]*\))?/g,"").trim();if(!a)return!0;try{return t(a).length>0}catch{return!0}})||s.remove()}),r.toString()}var Md='nav[data-hook="menu-root"].wixui-horizontal-menu',Ld="menu-root",Nd="wixui-horizontal-menu";function Qt(n,e,t){if(!e.includes(Ld)||!e.includes(Nd))return n;let r=` +https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new zn().version,l}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,l,a){return k([s(a)]).process(o,l)},s};k.stringify=Nf;k.parse=Mf;k.fromJSON=Tf;k.list=Af;k.comment=n=>new ha(n);k.atRule=n=>new pa(n);k.decl=n=>new da(n);k.rule=n=>new ya(n);k.root=n=>new ma(n);k.document=n=>new ga(n);k.CssSyntaxError=Pf;k.Declaration=da;k.Container=Cf;k.Processor=zn;k.Document=ga;k.Comment=ha;k.Warning=Df;k.AtRule=pa;k.Result=Lf;k.Input=If;k.Rule=ya;k.Root=ma;k.Node=kf;Rf.registerPostcss(k);va.exports=k;k.default=k});var Gn=_(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.default=jf;function Ff(n){for(var e=n.toLowerCase(),t="",r=!1,s=0;s<6&&e[s]!==void 0;s++){var i=e.charCodeAt(s),o=i>=97&&i<=102||i>=48&&i<=57;if(r=i===32,!o)break;t+=e[s]}if(t.length!==0){var l=parseInt(t,16),a=l>=55296&&l<=57343;return a||l===0||l>1114111?["\uFFFD",t.length+(r?1:0)]:[String.fromCodePoint(l),t.length+(r?1:0)]}}var Uf=/\\/;function jf(n){var e=Uf.test(n);if(!e)return n;for(var t="",r=0;r<n.length;r++){if(n[r]==="\\"){var s=Ff(n.slice(r+1,r+7));if(s!==void 0){t+=s[0],r+=s[1];continue}if(n[r+1]==="\\"){t+="\\",r++;continue}n.length===r+1&&(t+=n[r]);continue}t+=n[r]}return t}});var ba=_(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=$f;function $f(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(;e.length>0;){var r=e.shift();if(!n[r])return;n=n[r]}return n}});var _a=_(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.default=qf;function qf(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(;e.length>0;){var r=e.shift();n[r]||(n[r]={}),n=n[r]}}});var Sa=_(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.default=Bf;function Bf(n){for(var e="",t=n.indexOf("/*"),r=0;t>=0;){e=e+n.slice(r,t);var s=n.indexOf("*/",t+2);if(s<0)return e;r=s+2,t=n.indexOf("/*",r)}return e=e+n.slice(r),e}});var xa=_(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.MAX_NESTING_DEPTH=void 0;pt.default=Hf;pt.MAX_NESTING_DEPTH=256;function Hf(n){return Number.isSafeInteger(n)&&n>=0?n:pt.MAX_NESTING_DEPTH}});var ht=_(X=>{"use strict";var Wt=X&&X.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(X,"__esModule",{value:!0});X.MAX_NESTING_DEPTH=X.resolveMaxNestingDepth=X.stripComments=X.ensureObject=X.getProp=X.unesc=void 0;var zf=Gn();Object.defineProperty(X,"unesc",{enumerable:!0,get:function(){return Wt(zf).default}});var Wf=ba();Object.defineProperty(X,"getProp",{enumerable:!0,get:function(){return Wt(Wf).default}});var Gf=_a();Object.defineProperty(X,"ensureObject",{enumerable:!0,get:function(){return Wt(Gf).default}});var Vf=Sa();Object.defineProperty(X,"stripComments",{enumerable:!0,get:function(){return Wt(Vf).default}});var Ea=xa();Object.defineProperty(X,"resolveMaxNestingDepth",{enumerable:!0,get:function(){return Wt(Ea).default}});Object.defineProperty(X,"MAX_NESTING_DEPTH",{enumerable:!0,get:function(){return Ea.MAX_NESTING_DEPTH}})});var xe=_(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});var Fr=ht(),Qn=function(n,e,t){if(t===void 0&&(t=0),t>Fr.MAX_NESTING_DEPTH)throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(Fr.MAX_NESTING_DEPTH,"."));if(typeof n!="object"||n===null)return n;var r=new n.constructor;for(var s in n)if(n.hasOwnProperty(s)){var i=n[s],o=typeof i;s==="parent"&&o==="object"?e&&(r[s]=e):i instanceof Array?r[s]=i.map(function(l){return Qn(l,r,t+1)}):r[s]=Qn(i,r,t+1)}return r},Jf=(function(){function n(e){e===void 0&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}return n.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},n.prototype.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},n.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},n.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},n.prototype.clone=function(e){e===void 0&&(e={});var t=Qn(this);for(var r in e)t[r]=e[r];return t},n.prototype.appendToPropertyAndEscape=function(e,t,r){this.raws||(this.raws={});var s=this[e],i=this.raws[e];this[e]=s+t,i||r!==t?this.raws[e]=(i||s)+r:delete this.raws[e]},n.prototype.setPropertyAndEscape=function(e,t,r){this.raws||(this.raws={}),this[e]=t,this.raws[e]=r},n.prototype.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},n.prototype.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e||this.source.end.line<e||this.source.start.line===e&&this.source.start.column>t||this.source.end.line===e&&this.source.end.column<t)},n.prototype.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},Object.defineProperty(n.prototype,"rawSpaceBefore",{get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return e===void 0&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,Fr.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"rawSpaceAfter",{get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return e===void 0&&(e=this.spaces.after),e||""},set:function(e){(0,Fr.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e},enumerable:!1,configurable:!0}),n.prototype.valueToString=function(){return String(this.stringifyProperty("value"))},n.prototype.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},n.prototype._stringify=function(){return this.toString()},n})();Kn.default=Jf});var J=_(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.UNIVERSAL=D.ATTRIBUTE=D.CLASS=D.COMBINATOR=D.COMMENT=D.ID=D.NESTING=D.PSEUDO=D.ROOT=D.SELECTOR=D.STRING=D.TAG=void 0;D.TAG="tag";D.STRING="string";D.SELECTOR="selector";D.ROOT="root";D.PSEUDO="pseudo";D.NESTING="nesting";D.ID="id";D.COMMENT="comment";D.COMBINATOR="combinator";D.CLASS="class";D.ATTRIBUTE="attribute";D.UNIVERSAL="universal"});var Ur=_(z=>{"use strict";var Yf=z&&z.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Qf=z&&z.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Kf=z&&z.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Xf=z&&z.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&Qf(t,e,r[s]);return Kf(t,e),t}})(),Zf=z&&z.__values||function(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],r=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oa=z&&z.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(l){o={error:l}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return i},Ca=z&&z.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return n.concat(i||Array.prototype.slice.call(e))},ep=z&&z.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(z,"__esModule",{value:!0});var Xn=ht(),tp=ep(xe()),Ee=Xf(J()),rp=(function(n){Yf(e,n);function e(t){var r=n.call(this,t)||this;return r.nodes||(r.nodes=[]),r}return e.prototype.append=function(t){return t.parent=this,this.nodes.push(t),this},e.prototype.prepend=function(t){t.parent=this,this.nodes.unshift(t);for(var r in this.indexes)this.indexes[r]++;return this},e.prototype.at=function(t){return this.nodes[t]},e.prototype.index=function(t){return typeof t=="number"?t:this.nodes.indexOf(t)},Object.defineProperty(e.prototype,"first",{get:function(){return this.at(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this.at(this.length-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length},enumerable:!1,configurable:!0}),e.prototype.removeChild=function(t){t=this.index(t),this.at(t).parent=void 0,this.nodes.splice(t,1);var r;for(var s in this.indexes)r=this.indexes[s],r>=t&&(this.indexes[s]=r-1);return this},e.prototype.removeAll=function(){var t,r;try{for(var s=Zf(this.nodes),i=s.next();!i.done;i=s.next()){var o=i.value;o.parent=void 0}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(t,r){var s;r.parent=this;for(var i=this.index(t),o=[],l=2;l<arguments.length;l++)o.push(arguments[l]);(s=this.nodes).splice.apply(s,Ca([i+1,0,r],Oa(o),!1)),r.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],i<a&&(this.indexes[u]=a+arguments.length-1);return this},e.prototype.insertBefore=function(t,r){var s;r.parent=this;for(var i=this.index(t),o=[],l=2;l<arguments.length;l++)o.push(arguments[l]);(s=this.nodes).splice.apply(s,Ca([i,0,r],Oa(o),!1)),r.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],a>=i&&(this.indexes[u]=a+arguments.length-1);return this},e.prototype._findChildAtPosition=function(t,r){var s=void 0;return this.each(function(i){if(i.atPosition){var o=i.atPosition(t,r);if(o)return s=o,!1}else if(i.isAtPosition(t,r))return s=i,!1}),s},e.prototype.atPosition=function(t,r){if(this.isAtPosition(t,r))return this._findChildAtPosition(t,r)||this},e.prototype._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},e.prototype.each=function(t){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var r=this.lastEach;if(this.indexes[r]=0,!!this.length){for(var s,i;this.indexes[r]<this.length&&(s=this.indexes[r],i=t(this.at(s),s),i!==!1);)this.indexes[r]+=1;if(delete this.indexes[r],i===!1)return!1}},e.prototype.walk=function(t,r){if(r===void 0&&(r=0),r>Xn.MAX_NESTING_DEPTH)throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(Xn.MAX_NESTING_DEPTH,"."));return this.each(function(s,i){var o=t(s,i);if(o!==!1&&s.length&&(o=s.walk(t,r+1)),o===!1)return!1})},e.prototype.walkAttributes=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.ATTRIBUTE)return t.call(r,s)})},e.prototype.walkClasses=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.CLASS)return t.call(r,s)})},e.prototype.walkCombinators=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.COMBINATOR)return t.call(r,s)})},e.prototype.walkComments=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.COMMENT)return t.call(r,s)})},e.prototype.walkIds=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.ID)return t.call(r,s)})},e.prototype.walkNesting=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.NESTING)return t.call(r,s)})},e.prototype.walkPseudos=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.PSEUDO)return t.call(r,s)})},e.prototype.walkTags=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.TAG)return t.call(r,s)})},e.prototype.walkUniversals=function(t){var r=this;return this.walk(function(s){if(s.type===Ee.UNIVERSAL)return t.call(r,s)})},e.prototype.split=function(t){var r=this,s=[];return this.reduce(function(i,o,l){var a=t.call(r,o);return s.push(o),a?(i.push(s),s=[]):l===r.length-1&&i.push(s),i},[])},e.prototype.map=function(t){return this.nodes.map(t)},e.prototype.reduce=function(t,r){return this.nodes.reduce(t,r)},e.prototype.every=function(t){return this.nodes.every(t)},e.prototype.some=function(t){return this.nodes.some(t)},e.prototype.filter=function(t){return this.nodes.filter(t)},e.prototype.sort=function(t){return this.nodes.sort(t)},e.prototype.toString=function(t){return t===void 0&&(t={}),this._stringify(t,0,(0,Xn.resolveMaxNestingDepth)(t.maxNestingDepth))},e.prototype._stringify=function(t,r,s){var i=this;return this.map(function(o){return i._stringifyChild(o,t,r,s)}).join("")},e.prototype._stringifyChild=function(t,r,s,i){return typeof t._stringify=="function"?t._stringify(r,s,i):String(t)},e})(tp.default);z.default=rp});var Zn=_(Ue=>{"use strict";var np=Ue&&Ue.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),sp=Ue&&Ue.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ue,"__esModule",{value:!0});var ip=sp(Ur()),op=J(),ap=(function(n){np(e,n);function e(t){var r=n.call(this,t)||this;return r.type=op.ROOT,r}return e.prototype._stringify=function(t,r,s){var i=this,o=this.reduce(function(l,a){return l.push(i._stringifyChild(a,t,r,s)),l},[]).join(",");return this.trailingComma?o+",":o},e.prototype.error=function(t,r){return this._error?this._error(t,r):new Error(t)},Object.defineProperty(e.prototype,"errorGenerator",{set:function(t){this._error=t},enumerable:!1,configurable:!0}),e})(ip.default);Ue.default=ap});var es=_(je=>{"use strict";var lp=je&&je.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),up=je&&je.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(je,"__esModule",{value:!0});var cp=up(Ur()),fp=J(),pp=(function(n){lp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=fp.SELECTOR,r}return e})(cp.default);je.default=pp});var jr=_((iv,Pa)=>{"use strict";var hp={},dp=hp.hasOwnProperty,gp=function(e,t){if(!e)return t;var r={};for(var s in t)r[s]=dp.call(e,s)?e[s]:t[s];return r},mp=/[ -,\.\/:-@\[-\^`\{-~]/,yp=/[ -,\.\/:-@\[\]\^`\{-~]/,vp=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,ts=function n(e,t){t=gp(t,n.options),t.quotes!="single"&&t.quotes!="double"&&(t.quotes="single");for(var r=t.quotes=="double"?'"':"'",s=t.isIdentifier,i=e.charAt(0),o="",l=0,a=e.length;l<a;){var u=e.charAt(l++),c=u.charCodeAt(),f=void 0;if(c<32||c>126){if(c>=55296&&c<=56319&&l<a){var p=e.charCodeAt(l++);(p&64512)==56320?c=((c&1023)<<10)+(p&1023)+65536:l--}f="\\"+c.toString(16).toUpperCase()+" "}else t.escapeEverything?mp.test(u)?f="\\"+u:f="\\"+c.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(u)?f="\\"+c.toString(16).toUpperCase()+" ":u=="\\"||!s&&(u=='"'&&r==u||u=="'"&&r==u)||s&&yp.test(u)?f="\\"+u:f=u;o+=f}return s&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(i)&&(o="\\3"+i+" "+o.slice(1))),o=o.replace(vp,function(g,h,y){return h&&h.length%2?g:(h||"")+y}),!s&&t.wrap?r+o+r:o};ts.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};ts.version="3.0.0";Pa.exports=ts});var rs=_($e=>{"use strict";var wp=$e&&$e.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Ta=$e&&$e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($e,"__esModule",{value:!0});var bp=Ta(jr()),_p=ht(),Sp=Ta(xe()),xp=J(),Ep=(function(n){wp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=xp.CLASS,r._constructed=!0,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){if(this._constructed){var r=(0,bp.default)(t,{isIdentifier:!0});r!==t?((0,_p.ensureObject)(this,"raws"),this.raws.value=r):this.raws&&delete this.raws.value}this._value=t},enumerable:!1,configurable:!0}),e.prototype.valueToString=function(){return"."+n.prototype.valueToString.call(this)},e})(Sp.default);$e.default=Ep});var ns=_(qe=>{"use strict";var Op=qe&&qe.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Cp=qe&&qe.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(qe,"__esModule",{value:!0});var Pp=Cp(xe()),Tp=J(),Ip=(function(n){Op(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Tp.COMMENT,r}return e})(Pp.default);qe.default=Ip});var ss=_(Be=>{"use strict";var Rp=Be&&Be.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Ap=Be&&Be.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Be,"__esModule",{value:!0});var kp=Ap(xe()),Mp=J(),Lp=(function(n){Rp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Mp.ID,r}return e.prototype.valueToString=function(){return"#"+n.prototype.valueToString.call(this)},e})(kp.default);Be.default=Lp});var $r=_(He=>{"use strict";var Np=He&&He.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Ia=He&&He.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(He,"__esModule",{value:!0});var Dp=Ia(jr()),Fp=ht(),Up=Ia(xe()),jp=(function(n){Np(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this._namespace},set:function(t){if(t===!0||t==="*"||t==="&"){this._namespace=t,this.raws&&delete this.raws.namespace;return}var r=(0,Dp.default)(t,{isIdentifier:!0});this._namespace=t,r!==t?((0,Fp.ensureObject)(this,"raws"),this.raws.namespace=r):this.raws&&delete this.raws.namespace},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ns",{get:function(){return this._namespace},set:function(t){this.namespace=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"namespaceString",{get:function(){if(this.namespace){var t=this.stringifyProperty("namespace");return t===!0?"":t}else return""},enumerable:!1,configurable:!0}),e.prototype.qualifiedName=function(t){return this.namespace?"".concat(this.namespaceString,"|").concat(t):t},e.prototype.valueToString=function(){return this.qualifiedName(n.prototype.valueToString.call(this))},e})(Up.default);He.default=jp});var is=_(ze=>{"use strict";var $p=ze&&ze.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),qp=ze&&ze.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ze,"__esModule",{value:!0});var Bp=qp($r()),Hp=J(),zp=(function(n){$p(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Hp.TAG,r}return e})(Bp.default);ze.default=zp});var os=_(We=>{"use strict";var Wp=We&&We.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+Ra(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Gp=We&&We.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(We,"__esModule",{value:!0});var Vp=Gp(xe()),Jp=J(),Ra=(function(n){Wp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Jp.STRING,r}return e})(Vp.default);We.default=Ra});var as=_(Ge=>{"use strict";var Yp=Ge&&Ge.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Qp=Ge&&Ge.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ge,"__esModule",{value:!0});var Kp=Qp(Ur()),Xp=J(),Zp=(function(n){Yp(e,n);function e(t){var r=n.call(this,t)||this;return r.type=Xp.PSEUDO,r}return e.prototype._stringify=function(t,r,s){var i=this;if(r>=s)throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(s,"."));var o=this.length?"("+this.map(function(l){return i._stringifyChild(l,t,r+1,s)}).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),o,this.rawSpaceAfter].join("")},e})(Kp.default);Ge.default=Zp});var ka=_((hv,Aa)=>{Aa.exports=Me("util").deprecate});var ps=_(Re=>{"use strict";var eh=Re&&Re.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),cs=Re&&Re.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},ls;Object.defineProperty(Re,"__esModule",{value:!0});Re.unescapeValue=fs;var Gt=cs(jr()),th=cs(Gn()),rh=cs($r()),nh=J(),Vt=ka(),sh=/^('|")([^]*)\1$/,ih=Vt(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),oh=Vt(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),ah=Vt(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function fs(n){var e=!1,t=null,r=n,s=r.match(sh);return s&&(t=s[1],r=s[2]),r=(0,th.default)(r),r!==n&&(e=!0),{deprecatedUsage:e,unescaped:r,quoteMark:t}}function lh(n){if(n.quoteMark!==void 0||n.value===void 0)return n;ah();var e=fs(n.value),t=e.quoteMark,r=e.unescaped;return n.raws||(n.raws={}),n.raws.value===void 0&&(n.raws.value=n.value),n.value=r,n.quoteMark=t,n}var uh=(function(n){eh(e,n);function e(t){t===void 0&&(t={});var r=n.call(this,lh(t))||this;return r.type=nh.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,"unquoted",{get:Vt(function(){return r.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Vt(function(){return r.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),r._constructed=!0,r}return e.prototype.getQuotedValue=function(t){t===void 0&&(t={});var r=this._determineQuoteMark(t),s=us[r],i=(0,Gt.default)(this._value,s);return i},e.prototype._determineQuoteMark=function(t){return t.smart?this.smartQuoteMark(t):this.preferredQuoteMark(t)},e.prototype.setValue=function(t,r){r===void 0&&(r={}),this._value=t,this._quoteMark=this._determineQuoteMark(r),this._syncRawValue()},e.prototype.smartQuoteMark=function(t){var r=this.value,s=r.replace(/[^']/g,"").length,i=r.replace(/[^"]/g,"").length;if(s+i===0){var o=(0,Gt.default)(r,{isIdentifier:!0});if(o===r)return e.NO_QUOTE;var l=this.preferredQuoteMark(t);if(l===e.NO_QUOTE){var a=this.quoteMark||t.quoteMark||e.DOUBLE_QUOTE,u=us[a],c=(0,Gt.default)(r,u);if(c.length<o.length)return a}return l}else return i===s?this.preferredQuoteMark(t):i<s?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},e.prototype.preferredQuoteMark=function(t){var r=t.preferCurrentQuoteMark?this.quoteMark:t.quoteMark;return r===void 0&&(r=t.preferCurrentQuoteMark?t.quoteMark:this.quoteMark),r===void 0&&(r=e.DOUBLE_QUOTE),r},Object.defineProperty(e.prototype,"quoted",{get:function(){var t=this.quoteMark;return t==="'"||t==='"'},set:function(t){oh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quoteMark",{get:function(){return this._quoteMark},set:function(t){if(!this._constructed){this._quoteMark=t;return}this._quoteMark!==t&&(this._quoteMark=t,this._syncRawValue())},enumerable:!1,configurable:!0}),e.prototype._syncRawValue=function(){var t=(0,Gt.default)(this._value,us[this.quoteMark]);t===this._value?this.raws&&delete this.raws.value:this.raws.value=t},Object.defineProperty(e.prototype,"qualifiedAttribute",{get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insensitiveFlag",{get:function(){return this.insensitive?"i":""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){if(this._constructed){var r=fs(t),s=r.deprecatedUsage,i=r.unescaped,o=r.quoteMark;if(s&&ih(),i===this._value&&o===this._quoteMark)return;this._value=i,this._quoteMark=o,this._syncRawValue()}else this._value=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"insensitive",{get:function(){return this._insensitive},set:function(t){t||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attribute",{get:function(){return this._attribute},set:function(t){this._handleEscapes("attribute",t),this._attribute=t},enumerable:!1,configurable:!0}),e.prototype._handleEscapes=function(t,r){if(this._constructed){var s=(0,Gt.default)(r,{isIdentifier:!0});s!==r?this.raws[t]=s:delete this.raws[t]}},e.prototype._spacesFor=function(t){var r={before:"",after:""},s=this.spaces[t]||{},i=this.raws.spaces&&this.raws.spaces[t]||{};return Object.assign(r,s,i)},e.prototype._stringFor=function(t,r,s){r===void 0&&(r=t),s===void 0&&(s=Ma);var i=this._spacesFor(r);return s(this.stringifyProperty(t),i)},e.prototype.offsetOf=function(t){var r=1,s=this._spacesFor("attribute");if(r+=s.before.length,t==="namespace"||t==="ns")return this.namespace?r:-1;if(t==="attributeNS"||(r+=this.namespaceString.length,this.namespace&&(r+=1),t==="attribute"))return r;r+=this.stringifyProperty("attribute").length,r+=s.after.length;var i=this._spacesFor("operator");r+=i.before.length;var o=this.stringifyProperty("operator");if(t==="operator")return o?r:-1;r+=o.length,r+=i.after.length;var l=this._spacesFor("value");r+=l.before.length;var a=this.stringifyProperty("value");if(t==="value")return a?r:-1;r+=a.length,r+=l.after.length;var u=this._spacesFor("insensitive");return r+=u.before.length,t==="insensitive"&&this.insensitive?r:-1},e.prototype.toString=function(){var t=this,r=[this.rawSpaceBefore,"["];return r.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(r.push(this._stringFor("operator")),r.push(this._stringFor("value")),r.push(this._stringFor("insensitiveFlag","insensitive",function(s,i){return s.length>0&&!t.quoted&&i.before.length===0&&!(t.spaces.value&&t.spaces.value.after)&&(i.before=" "),Ma(s,i)}))),r.push("]"),r.push(this.rawSpaceAfter),r.join("")},e.NO_QUOTE=null,e.SINGLE_QUOTE="'",e.DOUBLE_QUOTE='"',e})(rh.default);Re.default=uh;var us=(ls={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},ls[null]={isIdentifier:!0},ls);function Ma(n,e){return"".concat(e.before).concat(n).concat(e.after)}});var hs=_(Ve=>{"use strict";var ch=Ve&&Ve.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),fh=Ve&&Ve.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ve,"__esModule",{value:!0});var ph=fh($r()),hh=J(),dh=(function(n){ch(e,n);function e(t){var r=n.call(this,t)||this;return r.type=hh.UNIVERSAL,r.value="*",r}return e})(ph.default);Ve.default=dh});var ds=_(Je=>{"use strict";var gh=Je&&Je.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),mh=Je&&Je.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Je,"__esModule",{value:!0});var yh=mh(xe()),vh=J(),wh=(function(n){gh(e,n);function e(t){var r=n.call(this,t)||this;return r.type=vh.COMBINATOR,r}return e})(yh.default);Je.default=wh});var gs=_(Ye=>{"use strict";var bh=Ye&&Ye.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),_h=Ye&&Ye.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ye,"__esModule",{value:!0});var Sh=_h(xe()),xh=J(),Eh=(function(n){bh(e,n);function e(t){var r=n.call(this,t)||this;return r.type=xh.NESTING,r.value="&",r}return e})(Sh.default);Ye.default=Eh});var La=_(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.default=Oh;function Oh(n){return n.sort(function(e,t){return e-t})}});var ys=_(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.combinator=E.word=E.comment=E.str=E.tab=E.newline=E.feed=E.cr=E.backslash=E.bang=E.slash=E.doubleQuote=E.singleQuote=E.space=E.greaterThan=E.pipe=E.equals=E.plus=E.caret=E.tilde=E.dollar=E.closeSquare=E.openSquare=E.closeParenthesis=E.openParenthesis=E.semicolon=E.colon=E.comma=E.at=E.asterisk=E.ampersand=void 0;E.ampersand=38;E.asterisk=42;E.at=64;E.comma=44;E.colon=58;E.semicolon=59;E.openParenthesis=40;E.closeParenthesis=41;E.openSquare=91;E.closeSquare=93;E.dollar=36;E.tilde=126;E.caret=94;E.plus=43;E.equals=61;E.pipe=124;E.greaterThan=62;E.space=32;E.singleQuote=39;E.doubleQuote=34;E.slash=47;E.bang=33;E.backslash=92;E.cr=13;E.feed=12;E.newline=10;E.tab=9;E.str=E.singleQuote;E.comment=-1;E.word=-2;E.combinator=-3});var Da=_(pe=>{"use strict";var Ch=pe&&pe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Ph=pe&&pe.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Th=pe&&pe.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&Ch(t,e,r[s]);return Ph(t,e),t}})(),dt,L;Object.defineProperty(pe,"__esModule",{value:!0});pe.FIELDS=void 0;pe.default=Mh;var b=Th(ys()),Ih=(dt={},dt[b.tab]=!0,dt[b.newline]=!0,dt[b.cr]=!0,dt[b.feed]=!0,dt),Rh=(L={},L[b.space]=!0,L[b.tab]=!0,L[b.newline]=!0,L[b.cr]=!0,L[b.feed]=!0,L[b.ampersand]=!0,L[b.asterisk]=!0,L[b.bang]=!0,L[b.comma]=!0,L[b.colon]=!0,L[b.semicolon]=!0,L[b.openParenthesis]=!0,L[b.closeParenthesis]=!0,L[b.openSquare]=!0,L[b.closeSquare]=!0,L[b.singleQuote]=!0,L[b.doubleQuote]=!0,L[b.plus]=!0,L[b.pipe]=!0,L[b.tilde]=!0,L[b.greaterThan]=!0,L[b.equals]=!0,L[b.dollar]=!0,L[b.caret]=!0,L[b.slash]=!0,L),vs={},Na="0123456789abcdefABCDEF";for(qr=0;qr<Na.length;qr++)vs[Na.charCodeAt(qr)]=!0;var qr;function Ah(n,e){var t=e,r;do{if(r=n.charCodeAt(t),Rh[r])return t-1;r===b.backslash?t=kh(n,t)+1:t++}while(t<n.length);return t-1}function kh(n,e){var t=e,r=n.charCodeAt(t+1);if(!Ih[r])if(vs[r]){var s=0;do t++,s++,r=n.charCodeAt(t+1);while(vs[r]&&s<6);s<6&&r===b.space&&t++}else t++;return t}pe.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};function Mh(n){var e=[],t=n.css.valueOf(),r=t.length,s=-1,i=1,o=0,l=0,a,u,c,f,p,g,h,y,d,m,w,C,I;function T(A,G){if(n.safe)t+=G,d=t.length-1;else throw n.error("Unclosed "+A,i,o-s,o)}for(;o<r;){switch(a=t.charCodeAt(o),a===b.newline&&(s=o,i+=1),a){case b.space:case b.tab:case b.newline:case b.cr:case b.feed:d=o;do d+=1,a=t.charCodeAt(d),a===b.newline&&(s=d,i+=1);while(a===b.space||a===b.newline||a===b.tab||a===b.cr||a===b.feed);I=b.space,f=i,c=d-s-1,l=d;break;case b.plus:case b.greaterThan:case b.tilde:case b.pipe:d=o;do d+=1,a=t.charCodeAt(d);while(a===b.plus||a===b.greaterThan||a===b.tilde||a===b.pipe);I=b.combinator,f=i,c=o-s,l=d;break;case b.asterisk:case b.ampersand:case b.bang:case b.comma:case b.equals:case b.dollar:case b.caret:case b.openSquare:case b.closeSquare:case b.colon:case b.semicolon:case b.openParenthesis:case b.closeParenthesis:d=o,I=a,f=i,c=o-s,l=d+1;break;case b.singleQuote:case b.doubleQuote:C=a===b.singleQuote?"'":'"',d=o;do for(p=!1,d=t.indexOf(C,d+1),d===-1&&T("quote",C),g=d;t.charCodeAt(g-1)===b.backslash;)g-=1,p=!p;while(p);I=b.str,f=i,c=o-s,l=d+1;break;default:a===b.slash&&t.charCodeAt(o+1)===b.asterisk?(d=t.indexOf("*/",o+2)+1,d===0&&T("comment","*/"),u=t.slice(o,d+1),y=u.split(` +`),h=y.length-1,h>0?(m=i+h,w=d-y[h].length):(m=i,w=s),I=b.comment,i=m,f=m,c=d-w):a===b.slash?(d=o,I=a,f=i,c=o-s,l=d+1):(d=Ah(t,o),I=b.word,f=i,c=d-s),l=d+1;break}e.push([I,i,o-s,f,c,o,l]),w&&(s=w,w=null),o=l}return e}});var Ha=_(Y=>{"use strict";var Br=Y&&Y.__assign||function(){return Br=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s])}return n},Br.apply(this,arguments)},Lh=Y&&Y.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Nh=Y&&Y.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Hr=Y&&Y.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&Lh(t,e,r[s]);return Nh(t,e),t}})(),Fa=Y&&Y.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)i.push(s.value)}catch(l){o={error:l}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return i},Ua=Y&&Y.__spreadArray||function(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return n.concat(i||Array.prototype.slice.call(e))},oe=Y&&Y.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},Qe,ws;Object.defineProperty(Y,"__esModule",{value:!0});var Dh=oe(Zn()),bs=oe(es()),Fh=oe(rs()),ja=oe(ns()),Uh=oe(ss()),jh=oe(is()),_s=oe(os()),$h=oe(as()),$a=Hr(ps()),qh=oe(hs()),Ss=oe(ds()),Bh=oe(gs()),Hh=oe(La()),v=Hr(Da()),S=Hr(ys()),zh=Hr(J()),j=ht(),Os=(Qe={},Qe[S.space]=!0,Qe[S.cr]=!0,Qe[S.feed]=!0,Qe[S.newline]=!0,Qe[S.tab]=!0,Qe),Wh=Br(Br({},Os),(ws={},ws[S.comment]=!0,ws));function qa(n){return{line:n[v.FIELDS.START_LINE],column:n[v.FIELDS.START_COL]}}function Ba(n){return{line:n[v.FIELDS.END_LINE],column:n[v.FIELDS.END_COL]}}function Ke(n,e,t,r){return{start:{line:n,column:e},end:{line:t,column:r}}}function gt(n){return Ke(n[v.FIELDS.START_LINE],n[v.FIELDS.START_COL],n[v.FIELDS.END_LINE],n[v.FIELDS.END_COL])}function xs(n,e){if(n)return Ke(n[v.FIELDS.START_LINE],n[v.FIELDS.START_COL],e[v.FIELDS.END_LINE],e[v.FIELDS.END_COL])}function mt(n,e){var t=n[e];if(typeof t=="string")return t.indexOf("\\")!==-1&&((0,j.ensureObject)(n,"raws"),n[e]=(0,j.unesc)(t),n.raws[e]===void 0&&(n.raws[e]=t)),n}function Es(n,e){for(var t=-1,r=[];(t=n.indexOf(e,t+1))!==-1;)r.push(t);return r}function Gh(){var n=Array.prototype.concat.apply([],arguments);return n.filter(function(e,t){return t===n.indexOf(e)})}var Vh=(function(){function n(e,t){t===void 0&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,j.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,v.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=xs(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new Dh.default({source:r}),this.root.errorGenerator=this._errorGenerator();var s=new bs.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(s),this.current=s,this.loop()}return n.prototype._errorGenerator=function(){var e=this;return function(t,r){return typeof e.rule=="string"?new Error(t):e.rule.error(t,r)}},n.prototype.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[v.FIELDS.TYPE]!==S.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[v.FIELDS.TYPE]!==S.closeSquare)return this.expected("closing square bracket",this.currToken[v.FIELDS.START_POS]);var r=e.length,s={source:Ke(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[v.FIELDS.START_POS]};if(r===1&&!~[S.word].indexOf(e[0][v.FIELDS.TYPE]))return this.expected("attribute",e[0][v.FIELDS.START_POS]);for(var i=0,o="",l="",a=null,u=!1;i<r;){var c=e[i],f=this.content(c),p=e[i+1];switch(c[v.FIELDS.TYPE]){case S.space:if(u=!0,this.options.lossy)break;if(a){(0,j.ensureObject)(s,"spaces",a);var g=s.spaces[a].after||"";s.spaces[a].after=g+f;var h=(0,j.getProp)(s,"raws","spaces",a,"after")||null;h&&(s.raws.spaces[a].after=h+f)}else o=o+f,l=l+f;break;case S.asterisk:if(p[v.FIELDS.TYPE]===S.equals)s.operator=f,a="operator";else if((!s.namespace||a==="namespace"&&!u)&&p){o&&((0,j.ensureObject)(s,"spaces","attribute"),s.spaces.attribute.before=o,o=""),l&&((0,j.ensureObject)(s,"raws","spaces","attribute"),s.raws.spaces.attribute.before=o,l=""),s.namespace=(s.namespace||"")+f;var y=(0,j.getProp)(s,"raws","namespace")||null;y&&(s.raws.namespace+=f),a="namespace"}u=!1;break;case S.dollar:if(a==="value"){var d=(0,j.getProp)(s,"raws","value");s.value+="$",d&&(s.raws.value=d+"$");break}case S.caret:p[v.FIELDS.TYPE]===S.equals&&(s.operator=f,a="operator"),u=!1;break;case S.combinator:if(f==="~"&&p[v.FIELDS.TYPE]===S.equals&&(s.operator=f,a="operator"),f!=="|"){u=!1;break}p[v.FIELDS.TYPE]===S.equals?(s.operator=f,a="operator"):!s.namespace&&!s.attribute&&(s.namespace=!0),u=!1;break;case S.word:if(p&&this.content(p)==="|"&&e[i+2]&&e[i+2][v.FIELDS.TYPE]!==S.equals&&!s.operator&&!s.namespace)s.namespace=f,a="namespace";else if(!s.attribute||a==="attribute"&&!u){o&&((0,j.ensureObject)(s,"spaces","attribute"),s.spaces.attribute.before=o,o=""),l&&((0,j.ensureObject)(s,"raws","spaces","attribute"),s.raws.spaces.attribute.before=l,l=""),s.attribute=(s.attribute||"")+f;var y=(0,j.getProp)(s,"raws","attribute")||null;y&&(s.raws.attribute+=f),a="attribute"}else if(!s.value&&s.value!==""||a==="value"&&!(u||s.quoteMark)){var m=(0,j.unesc)(f),d=(0,j.getProp)(s,"raws","value")||"",w=s.value||"";s.value=w+m,s.quoteMark=null,(m!==f||d)&&((0,j.ensureObject)(s,"raws"),s.raws.value=(d||w)+f),a="value"}else{var C=f==="i"||f==="I";(s.value||s.value==="")&&(s.quoteMark||u)?(s.insensitive=C,(!C||f==="I")&&((0,j.ensureObject)(s,"raws"),s.raws.insensitiveFlag=f),a="insensitive",o&&((0,j.ensureObject)(s,"spaces","insensitive"),s.spaces.insensitive.before=o,o=""),l&&((0,j.ensureObject)(s,"raws","spaces","insensitive"),s.raws.spaces.insensitive.before=l,l="")):(s.value||s.value==="")&&(a="value",s.value+=f,s.raws.value&&(s.raws.value+=f))}u=!1;break;case S.str:if(!s.attribute||!s.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:c[v.FIELDS.START_POS]});var I=(0,$a.unescapeValue)(f),T=I.unescaped,A=I.quoteMark;s.value=T,s.quoteMark=A,a="value",(0,j.ensureObject)(s,"raws"),s.raws.value=f,u=!1;break;case S.equals:if(!s.attribute)return this.expected("attribute",c[v.FIELDS.START_POS],f);if(s.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:c[v.FIELDS.START_POS]});s.operator=s.operator?s.operator+f:f,a="operator",u=!1;break;case S.comment:if(a)if(u||p&&p[v.FIELDS.TYPE]===S.space||a==="insensitive"){var G=(0,j.getProp)(s,"spaces",a,"after")||"",q=(0,j.getProp)(s,"raws","spaces",a,"after")||G;(0,j.ensureObject)(s,"raws","spaces",a),s.raws.spaces[a].after=q+f}else{var Q=s[a]||"",P=(0,j.getProp)(s,"raws",a)||Q;(0,j.ensureObject)(s,"raws"),s.raws[a]=P+f}else l=l+f;break;default:return this.error('Unexpected "'.concat(f,'" found.'),{index:c[v.FIELDS.START_POS]})}i++}mt(s,"attribute"),mt(s,"namespace"),this.newNode(new $a.default(s)),this.position++},n.prototype.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,r=[],s="",i=void 0;do if(Os[this.currToken[v.FIELDS.TYPE]])this.options.lossy||(s+=this.content());else if(this.currToken[v.FIELDS.TYPE]===S.comment){var o={};s&&(o.before=s,s=""),i=new ja.default({value:this.content(),source:gt(this.currToken),sourceIndex:this.currToken[v.FIELDS.START_POS],spaces:o}),r.push(i)}while(++this.position<e);if(s){if(i)i.spaces.after=s;else if(!this.options.lossy){var l=this.tokens[t],a=this.tokens[this.position-1];r.push(new _s.default({value:"",source:Ke(l[v.FIELDS.START_LINE],l[v.FIELDS.START_COL],a[v.FIELDS.END_LINE],a[v.FIELDS.END_COL]),sourceIndex:l[v.FIELDS.START_POS],spaces:{before:s,after:""}}))}}return r},n.prototype.convertWhitespaceNodesToSpace=function(e,t){var r=this;t===void 0&&(t=!1);var s="",i="";e.forEach(function(l){var a=r.lossySpace(l.spaces.before,t),u=r.lossySpace(l.rawSpaceBefore,t);s+=a+r.lossySpace(l.spaces.after,t&&a.length===0),i+=a+l.value+r.lossySpace(l.rawSpaceAfter,t&&u.length===0)}),i===s&&(i=void 0);var o={space:s,rawSpace:i};return o},n.prototype.isNamedCombinator=function(e){return e===void 0&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][v.FIELDS.TYPE]===S.slash&&this.tokens[e+1]&&this.tokens[e+1][v.FIELDS.TYPE]===S.word&&this.tokens[e+2]&&this.tokens[e+2][v.FIELDS.TYPE]===S.slash},n.prototype.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,j.unesc)(e).toLowerCase(),r={};t!==e&&(r.value="/".concat(e,"/"));var s=new Ss.default({value:"/".concat(t,"/"),source:Ke(this.currToken[v.FIELDS.START_LINE],this.currToken[v.FIELDS.START_COL],this.tokens[this.position+2][v.FIELDS.END_LINE],this.tokens[this.position+2][v.FIELDS.END_COL]),sourceIndex:this.currToken[v.FIELDS.START_POS],raws:r});return this.position=this.position+3,s}else this.unexpected()},n.prototype.combinator=function(){var e=this;if(this.content()==="|")return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(t<0||this.tokens[t][v.FIELDS.TYPE]===S.comma||this.tokens[t][v.FIELDS.TYPE]===S.closeParenthesis){var r=this.parseWhitespaceEquivalentTokens(t);if(r.length>0){var s=this.current.last;if(s){var i=this.convertWhitespaceNodesToSpace(r),o=i.space,l=i.rawSpace;l!==void 0&&(s.rawSpaceAfter+=l),s.spaces.after+=o}else r.forEach(function(y){return e.newNode(y)})}return}var a=this.currToken,u=void 0;t>this.position&&(u=this.parseWhitespaceEquivalentTokens(t));var c;if(this.isNamedCombinator()?c=this.namedCombinator():this.currToken[v.FIELDS.TYPE]===S.combinator?(c=new Ss.default({value:this.content(),source:gt(this.currToken),sourceIndex:this.currToken[v.FIELDS.START_POS]}),this.position++):Os[this.currToken[v.FIELDS.TYPE]]||u||this.unexpected(),c){if(u){var f=this.convertWhitespaceNodesToSpace(u),o=f.space,l=f.rawSpace;c.spaces.before=o,c.rawSpaceBefore=l}}else{var p=this.convertWhitespaceNodesToSpace(u,!0),o=p.space,l=p.rawSpace;l||(l=o);var g={},h={spaces:{}};o.endsWith(" ")&&l.endsWith(" ")?(g.before=o.slice(0,o.length-1),h.spaces.before=l.slice(0,l.length-1)):o[0]===" "&&l[0]===" "?(g.after=o.slice(1),h.spaces.after=l.slice(1)):h.value=l,c=new Ss.default({value:" ",source:xs(a,this.tokens[this.position-1]),sourceIndex:a[v.FIELDS.START_POS],spaces:g,raws:h})}return this.currToken&&this.currToken[v.FIELDS.TYPE]===S.space&&(c.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(c)},n.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var e=new bs.default({source:{start:qa(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][v.FIELDS.START_POS]});this.current.parent.append(e),this.current=e,this.position++},n.prototype.comment=function(){var e=this.currToken;this.newNode(new ja.default({value:this.content(),source:gt(e),sourceIndex:e[v.FIELDS.START_POS]})),this.position++},n.prototype.error=function(e,t){throw this.root.error(e,t)},n.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[v.FIELDS.START_POS]})},n.prototype.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[v.FIELDS.START_POS])},n.prototype.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[v.FIELDS.START_POS])},n.prototype.unexpected=function(){return this.error("Unexpected '".concat(this.content(),"'. Escaping special characters with \\ may help."),this.currToken[v.FIELDS.START_POS])},n.prototype.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[v.FIELDS.START_POS])},n.prototype.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[v.FIELDS.TYPE]===S.word)return this.position++,this.word(e);if(this.nextToken[v.FIELDS.TYPE]===S.asterisk)return this.position++,this.universal(e);this.unexpectedPipe()},n.prototype.nesting=function(){if(this.nextToken){var e=this.content(this.nextToken);if(e==="|"){this.position++;return}}var t=this.currToken;this.newNode(new Bh.default({value:this.content(),source:gt(t),sourceIndex:t[v.FIELDS.START_POS]})),this.position++},n.prototype.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===zh.PSEUDO){var r=new bs.default({source:{start:qa(this.tokens[this.position])},sourceIndex:this.tokens[this.position][v.FIELDS.START_POS]}),s=this.current;e.append(r),this.current=r,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth,"."),{index:this.currToken[v.FIELDS.START_POS]});this.position<this.tokens.length&&t;)this.currToken[v.FIELDS.TYPE]===S.openParenthesis&&t++,this.currToken[v.FIELDS.TYPE]===S.closeParenthesis&&t--,t?this.parse():(this.current.source.end=Ba(this.currToken),this.current.parent.source.end=Ba(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=s}else{for(var i=this.currToken,o="(",l=void 0;this.position<this.tokens.length&&t;)this.currToken[v.FIELDS.TYPE]===S.openParenthesis&&t++,this.currToken[v.FIELDS.TYPE]===S.closeParenthesis&&t--,l=this.currToken,o+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",o,o):this.newNode(new _s.default({value:o,source:Ke(i[v.FIELDS.START_LINE],i[v.FIELDS.START_COL],l[v.FIELDS.END_LINE],l[v.FIELDS.END_COL]),sourceIndex:i[v.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[v.FIELDS.START_POS])},n.prototype.pseudo=function(){for(var e=this,t="",r=this.currToken;this.currToken&&this.currToken[v.FIELDS.TYPE]===S.colon;)t+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[v.FIELDS.TYPE]===S.word)this.splitWord(!1,function(s,i){t+=s,e.newNode(new $h.default({value:t,source:xs(r,e.currToken),sourceIndex:r[v.FIELDS.START_POS]})),i>1&&e.nextToken&&e.nextToken[v.FIELDS.TYPE]===S.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[v.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[v.FIELDS.START_POS])},n.prototype.space=function(){var e=this.content();this.position===0||this.prevToken[v.FIELDS.TYPE]===S.comma||this.prevToken[v.FIELDS.TYPE]===S.openParenthesis||this.current.nodes.every(function(t){return t.type==="comment"})?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[v.FIELDS.TYPE]===S.comma||this.nextToken[v.FIELDS.TYPE]===S.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},n.prototype.string=function(){var e=this.currToken;this.newNode(new _s.default({value:this.content(),source:gt(e),sourceIndex:e[v.FIELDS.START_POS]})),this.position++},n.prototype.universal=function(e){var t=this.nextToken;if(t&&this.content(t)==="|")return this.position++,this.namespace();var r=this.currToken;this.newNode(new qh.default({value:this.content(),source:gt(r),sourceIndex:r[v.FIELDS.START_POS]}),e),this.position++},n.prototype.splitWord=function(e,t){for(var r=this,s=this.nextToken,i=this.content();s&&~[S.dollar,S.caret,S.equals,S.word].indexOf(s[v.FIELDS.TYPE]);){this.position++;var o=this.content();if(i+=o,o.lastIndexOf("\\")===o.length-1){var l=this.nextToken;l&&l[v.FIELDS.TYPE]===S.space&&(i+=this.requiredSpace(this.content(l)),this.position++)}s=this.nextToken}var a=Es(i,".").filter(function(p){var g=i[p-1]==="\\",h=/^\d+\.\d+%$/.test(i);return!g&&!h}),u=Es(i,"#").filter(function(p){return i[p-1]!=="\\"}),c=Es(i,"#{");c.length&&(u=u.filter(function(p){return!~c.indexOf(p)}));var f=(0,Hh.default)(Gh(Ua(Ua([0],Fa(a),!1),Fa(u),!1)));f.forEach(function(p,g){var h=f[g+1]||i.length,y=i.slice(p,h);if(g===0&&t)return t.call(r,y,f.length);var d,m=r.currToken,w=m[v.FIELDS.START_POS]+f[g],C=Ke(m[1],m[2]+p,m[3],m[2]+(h-1));if(~a.indexOf(p)){var I={value:y.slice(1),source:C,sourceIndex:w};d=new Fh.default(mt(I,"value"))}else if(~u.indexOf(p)){var T={value:y.slice(1),source:C,sourceIndex:w};d=new Uh.default(mt(T,"value"))}else{var A={value:y,source:C,sourceIndex:w};mt(A,"value"),d=new jh.default(A)}r.newNode(d,e),e=null}),this.position++},n.prototype.word=function(e){var t=this.nextToken;return t&&this.content(t)==="|"?(this.position++,this.namespace()):this.splitWord(e)},n.prototype.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},n.prototype.parse=function(e){switch(this.currToken[v.FIELDS.TYPE]){case S.space:this.space();break;case S.comment:this.comment();break;case S.openParenthesis:this.parentheses();break;case S.closeParenthesis:e&&this.missingParenthesis();break;case S.openSquare:this.attribute();break;case S.dollar:case S.caret:case S.equals:case S.word:this.word();break;case S.colon:this.pseudo();break;case S.comma:this.comma();break;case S.asterisk:this.universal();break;case S.ampersand:this.nesting();break;case S.slash:case S.combinator:this.combinator();break;case S.str:this.string();break;case S.closeSquare:this.missingSquareBracket();case S.semicolon:this.missingBackslash();default:this.unexpected()}},n.prototype.expected=function(e,t,r){if(Array.isArray(e)){var s=e.pop();e="".concat(e.join(", ")," or ").concat(s)}var i=/^[aeiou]/.test(e[0])?"an":"a";return r?this.error("Expected ".concat(i," ").concat(e,', found "').concat(r,'" instead.'),{index:t}):this.error("Expected ".concat(i," ").concat(e,"."),{index:t})},n.prototype.requiredSpace=function(e){return this.options.lossy?" ":e},n.prototype.optionalSpace=function(e){return this.options.lossy?"":e},n.prototype.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},n.prototype.parseParenthesisToken=function(e){var t=this.content(e);return e[v.FIELDS.TYPE]===S.space?this.requiredSpace(t):t},n.prototype.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,mt(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},n.prototype.content=function(e){return e===void 0&&(e=this.currToken),this.css.slice(e[v.FIELDS.START_POS],e[v.FIELDS.END_POS])},Object.defineProperty(n.prototype,"currToken",{get:function(){return this.tokens[this.position]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextToken",{get:function(){return this.tokens[this.position+1]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prevToken",{get:function(){return this.tokens[this.position-1]},enumerable:!1,configurable:!0}),n.prototype.locateNextMeaningfulToken=function(e){e===void 0&&(e=this.position+1);for(var t=e;t<this.tokens.length;)if(Wh[this.tokens[t][v.FIELDS.TYPE]]){t++;continue}else return t;return-1},n})();Y.default=Vh});var za=_(Jt=>{"use strict";var Jh=Jt&&Jt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Jt,"__esModule",{value:!0});var Yh=Jh(Ha()),Qh=(function(){function n(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}return n.prototype._shouldUpdateSelector=function(e,t){t===void 0&&(t={});var r=Object.assign({},this.options,t);return r.updateSelector===!1?!1:typeof e!="string"},n.prototype._isLossy=function(e){e===void 0&&(e={});var t=Object.assign({},this.options,e);return t.lossless===!1},n.prototype._root=function(e,t){t===void 0&&(t={});var r=new Yh.default(e,this._parseOptions(t));return r.root},n.prototype._parseOptions=function(e){var t=Object.assign({},this.options,e);return{lossy:this._isLossy(t),maxNestingDepth:t.maxNestingDepth}},n.prototype._stringifyOptions=function(e){var t=Object.assign({},this.options,e);return{maxNestingDepth:t.maxNestingDepth}},n.prototype._run=function(e,t){var r=this;return t===void 0&&(t={}),new Promise(function(s,i){try{var o=r._root(e,t);Promise.resolve(r.func(o)).then(function(l){var a=void 0;return r._shouldUpdateSelector(e,t)&&(a=o.toString(r._stringifyOptions(t)),e.selector=a),{transform:l,root:o,string:a}}).then(s,i)}catch(l){i(l);return}})},n.prototype._runSync=function(e,t){t===void 0&&(t={});var r=this._root(e,t),s=this.func(r);if(s&&typeof s.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var i=void 0;return t.updateSelector&&typeof e!="string"&&(i=r.toString(this._stringifyOptions(t)),e.selector=i),{transform:s,root:r,string:i}},n.prototype.ast=function(e,t){return this._run(e,t).then(function(r){return r.root})},n.prototype.astSync=function(e,t){return this._runSync(e,t).root},n.prototype.transform=function(e,t){return this._run(e,t).then(function(r){return r.transform})},n.prototype.transformSync=function(e,t){return this._runSync(e,t).transform},n.prototype.process=function(e,t){var r=this;return this._run(e,t).then(function(s){return s.string||s.root.toString(r._stringifyOptions(t))})},n.prototype.processSync=function(e,t){var r=this._runSync(e,t);return r.string||r.root.toString(this._stringifyOptions(t))},n})();Jt.default=Qh});var Wa=_(M=>{"use strict";var ae=M&&M.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(M,"__esModule",{value:!0});M.universal=M.tag=M.string=M.selector=M.root=M.pseudo=M.nesting=M.id=M.comment=M.combinator=M.className=M.attribute=void 0;var Kh=ae(ps()),Xh=ae(rs()),Zh=ae(ds()),ed=ae(ns()),td=ae(ss()),rd=ae(gs()),nd=ae(as()),sd=ae(Zn()),id=ae(es()),od=ae(os()),ad=ae(is()),ld=ae(hs()),ud=function(n){return new Kh.default(n)};M.attribute=ud;var cd=function(n){return new Xh.default(n)};M.className=cd;var fd=function(n){return new Zh.default(n)};M.combinator=fd;var pd=function(n){return new ed.default(n)};M.comment=pd;var hd=function(n){return new td.default(n)};M.id=hd;var dd=function(n){return new rd.default(n)};M.nesting=dd;var gd=function(n){return new nd.default(n)};M.pseudo=gd;var md=function(n){return new sd.default(n)};M.root=md;var yd=function(n){return new id.default(n)};M.selector=yd;var vd=function(n){return new od.default(n)};M.string=vd;var wd=function(n){return new ad.default(n)};M.tag=wd;var bd=function(n){return new ld.default(n)};M.universal=bd});var Va=_(R=>{"use strict";var te;Object.defineProperty(R,"__esModule",{value:!0});R.isUniversal=R.isTag=R.isString=R.isSelector=R.isRoot=R.isPseudo=R.isNesting=R.isIdentifier=R.isComment=R.isCombinator=R.isClassName=R.isAttribute=void 0;R.isNode=Cs;R.isPseudoElement=Ga;R.isPseudoClass=Sd;R.isContainer=xd;R.isNamespace=Ed;var $=J(),_d=(te={},te[$.ATTRIBUTE]=!0,te[$.CLASS]=!0,te[$.COMBINATOR]=!0,te[$.COMMENT]=!0,te[$.ID]=!0,te[$.NESTING]=!0,te[$.PSEUDO]=!0,te[$.ROOT]=!0,te[$.SELECTOR]=!0,te[$.STRING]=!0,te[$.TAG]=!0,te[$.UNIVERSAL]=!0,te);function Cs(n){return typeof n=="object"&&_d[n.type]}function le(n,e){return Cs(e)&&e.type===n}R.isAttribute=le.bind(null,$.ATTRIBUTE);R.isClassName=le.bind(null,$.CLASS);R.isCombinator=le.bind(null,$.COMBINATOR);R.isComment=le.bind(null,$.COMMENT);R.isIdentifier=le.bind(null,$.ID);R.isNesting=le.bind(null,$.NESTING);R.isPseudo=le.bind(null,$.PSEUDO);R.isRoot=le.bind(null,$.ROOT);R.isSelector=le.bind(null,$.SELECTOR);R.isString=le.bind(null,$.STRING);R.isTag=le.bind(null,$.TAG);R.isUniversal=le.bind(null,$.UNIVERSAL);function Ga(n){return(0,R.isPseudo)(n)&&n.value&&(n.value.startsWith("::")||n.value.toLowerCase()===":before"||n.value.toLowerCase()===":after"||n.value.toLowerCase()===":first-letter"||n.value.toLowerCase()===":first-line")}function Sd(n){return(0,R.isPseudo)(n)&&!Ga(n)}function xd(n){return!!(Cs(n)&&n.walk)}function Ed(n){return(0,R.isAttribute)(n)||(0,R.isTag)(n)}});var Ja=_(Oe=>{"use strict";var Od=Oe&&Oe.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Ps=Oe&&Oe.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Od(e,n,t)};Object.defineProperty(Oe,"__esModule",{value:!0});Ps(J(),Oe);Ps(Wa(),Oe);Ps(Va(),Oe)});var zr=_((Ce,Ya)=>{"use strict";var Cd=Ce&&Ce.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,s)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Pd=Ce&&Ce.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Td=Ce&&Ce.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[r.length]=s);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),s=0;s<r.length;s++)r[s]!=="default"&&Cd(t,e,r[s]);return Pd(t,e),t}})(),Id=Ce&&Ce.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},Rd=Id(za()),Ad=Td(Ja()),Ts=function(n){return new Rd.default(n)};Object.assign(Ts,Ad);delete Ts.__esModule;Ya.exports=Ts});import{existsSync as bt,mkdirSync as Xr,writeFileSync as Zr,readFileSync as en}from"node:fs";import{dirname as Em,join as re,resolve as ye}from"node:path";async function hr(n,e,t){try{let r=!0;try{await t(n,["plugin","is-installed",e])}catch{r=!1}if(!r)return await t(n,["plugin","install",e,"--activate"]),{ok:!0,action:"installed"};let s=!0;try{await t(n,["plugin","is-active",e])}catch{s=!1}return s?{ok:!0,action:"none"}:(await t(n,["plugin","activate",e]),{ok:!0,action:"activated"})}catch(r){return{ok:!1,error:r.message}}}function ui(n,e){let t=ee(n,null,!1),r=t.root(),s=r.children('header, [role="banner"]').first(),i=r.children('footer, [role="contentinfo"]').last(),o=s.length?t.html(s):"",l=i.length?t.html(i):"";s.length&&s.remove(),i.length&&i.remove();let a=t.html(r).trim();return{headerHtml:o,mainHtml:a,footerHtml:l}}function ci(n,e,t){let r=new RegExp(`<${e}(?![\\w-])[^>]*>`,"gi"),s=new RegExp(`</${e}\\s*>`,"gi"),i=[],o;for(;o=r.exec(n);)i.push({i:o.index,end:o.index+o[0].length,open:!0});for(;o=s.exec(n);)i.push({i:o.index,end:o.index+o[0].length,open:!1});i.sort((c,f)=>c.i-f.i);let l=[],a=0,u=-1;for(let c of i)c.open?(a===0&&(u=c.i),a++):a>0&&(a--,a===0&&u>=0&&l.push([u,c.end]));return l.length===0?null:t==="first"?l[0]:l[l.length-1]}function fu(n,e){let t=new RegExp(`<[a-zA-Z][^>]*\\bid="${e}"`,"i").exec(n);return t?t.index:-1}function fi(n,e){let t=fu(n,e.id);if(t>=0){let r=ci(n.slice(t),e.tag,"first");if(r)return[t+r[0],t+r[1]]}return ci(n,e.tag,e.which)}function pu(n,e){let t=/<div(?![\w-])|<\/div\s*>/gi;t.lastIndex=e;let r=0,s;for(;s=t.exec(n);)if(s[0][1]==="/"){if(--r===0)return s.index+s[0].length}else r++;return n.length}function hu(n,e){let t="shopify-section-group-header-group",r=-1,s=-1,i=0;for(;;){let o=n.indexOf(t,i);if(o<0)break;let l=n.lastIndexOf("<",o);if(l<0)break;let a=pu(n,l);if(r<0)r=l;else if(n.slice(s,l).trim()!=="")break;s=a,i=a}return r>=0&&r<=e[0]&&s>=e[1]?[r,s]:e}function du(n){let e=/<\/?section\b[^>]*>/gi,t=[],r=0,s=-1,i;for(;i=e.exec(n);)i[0].startsWith("</")?r>0&&(r--,r===0&&s>=0&&t.push([s,i.index+i[0].length])):(r===0&&(s=i.index),r++);return t}function pi(n){let e={found:!1,openWrap:"",headerHtml:"",midBefore:"",sectionsHtml:[],midAfter:"",footerHtml:"",closeWrap:""},t=fi(n,{tag:"header",id:"SITE_HEADER",which:"first"}),r=t?hu(n,t):null,s=fi(n,{tag:"footer",id:"SITE_FOOTER",which:"last"});if(!r&&!s)return e;let i=r?r[0]:0,o=r?r[1]:0,l=s?s[0]:n.length,a=s?s[1]:n.length;if(l<o)return e;let u=n.slice(0,i),c=r?n.slice(i,o):"",f=n.slice(o,l),p=s?n.slice(l,a):"",g=n.slice(a),h=du(f);if(h.length===0)return{found:!0,openWrap:u,headerHtml:c,midBefore:"",sectionsHtml:f?[f]:[],midAfter:"",footerHtml:p,closeWrap:g};let y=f.slice(0,h[0][0]),d=f.slice(h[h.length-1][1]),m=[];for(let w=0;w<h.length;w++){let C=w+1<h.length?h[w+1][0]:h[w][1];m.push(f.slice(h[w][0],C))}return{found:!0,openWrap:u,headerHtml:c,midBefore:y,sectionsHtml:m,midAfter:d,footerHtml:p,closeWrap:g}}function dr(n,e,t={}){if(!n||e.size===0)return n;let r=mu(e),s=new Map(e),i=new Set,o=gu(n);for(let u of o){if(i.has(u))continue;i.add(u);let c=yu(u,e,r);c?s.set(u,c):t.onMissing&&t.onMissing(u)}let l=n,a=[...s.entries()].filter(([u])=>u).sort((u,c)=>c[0].length-u[0].length);for(let[u,c]of a){let f=_u(u);l=l.replace(new RegExp(f,"g"),()=>c)}return l}var hi=/https?:\/\/[^\s"'<>\\]+/g;function gu(n){let e=[],t=[/<img[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi,/<a[^>]*\bhref\s*=\s*["']([^"']+\.(?:jpe?g|png|gif|webp|svg|avif|mp4|webm|pdf))["']/gi,/\bsrcset\s*=\s*["']([^"']+)["']/gi,/"src"\s*:\s*"([^"]+)"/g,/"url"\s*:\s*"([^"]+)"/g];for(let r of t){let s;for(;(s=r.exec(n))!==null;){let i=s[1];if(r.source.includes("srcset")){let o,l=new RegExp(hi.source,"g");for(;(o=l.exec(i))!==null;)e.push(o[0])}else e.push(i)}}return e.map(r=>r.match(hi)?.[0]??r).filter(r=>/^https?:\/\//i.test(r))}function mu(n){let e=new Map;for(let[t,r]of n.entries()){let s=wu(t);for(let i of di(t)){let o=e.get(i);(!o||s>o.score)&&e.set(i,{local:r,score:s})}}return e}function yu(n,e,t){let r=e.get(n);if(r)return r;for(let s of di(n)){let i=t.get(s);if(i)return i.local}}function di(n){let e=[],t=bu(n);if(!t)return e;if(t.hostname==="static.wixstatic.com"){let r=vu(t);r&&e.push(`wix:${r}`)}return e}function vu(n){let e=n.pathname.split("/").filter(Boolean),t=e.indexOf("media");if(!(t===-1||t+1>=e.length))return decodeURIComponent(e[t+1])}function wu(n){let e=n.match(/\bw_(\d+),h_(\d+)/i);return e?Number(e[1])*Number(e[2]):0}function bu(n){try{let e=new URL(n);return/^https?:$/i.test(e.protocol)?e:void 0}catch{return}}function _u(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function an(n){let e=n;try{e=decodeURIComponent(e)}catch{}return e=e.replace(/\.html?$/i,""),e.startsWith("/")||(e="/"+e),e!=="/"&&(e=e.replace(/\/+$/,"")),e===""&&(e="/"),e.toLowerCase()}function gi(n){return n.toLowerCase().replace(/^www\./,"")}function mi(n,e={}){let t=new Map,r=(e.siteOrigins??[]).map(gi).filter(Boolean),s=(i,o)=>{let l=an(i);t.set(l,o);for(let a of r)t.set(`${a}${l}`,o)};s("/","/");for(let i of n??[])!i?.from||!i?.to||s(i.from,i.to);return t}var Su=/^(?:mailto:|tel:|javascript:|data:|sms:|geo:|callto:)/i;function xu(n){let e=n.trim(),t={key:null,fragment:"",internalRelative:!1};if(!e||Su.test(e)||e.startsWith("#"))return t;if(/^https?:\/\//i.test(e)||e.startsWith("//")){let l;try{l=new URL(e.startsWith("//")?`https:${e}`:e)}catch{return t}return{key:`${gi(l.hostname)}${an(l.pathname)}`,fragment:l.hash,internalRelative:!1}}let r=e.indexOf("#"),s=r>=0?e.slice(r):"",i=r>=0?e.slice(0,r):e,o=i.indexOf("?");return o>=0&&(i=i.slice(0,o)),i=i.replace(/^(?:\.\.?\/)+/,""),{key:an(i),fragment:s,internalRelative:!0}}function yi(n,e,t={}){if(!n||e.size===0)return n;let r=new Set;return n.replace(/\bhref\s*=\s*(["'])([^"']*)\1/gi,(s,i,o)=>{let{key:l,fragment:a,internalRelative:u}=xu(o);if(l===null)return s;let c=e.get(l);return c?`href=${i}${c}${a}${i}`:(u&&t.onMissing&&!r.has(o)&&(r.add(o),t.onMissing(o)),s)})}var Eu=[/(^|\.)youtube\.com$/i,/(^|\.)youtube-nocookie\.com$/i,/(^|\.)vimeo\.com$/i,/(^|\.)google\.com$/i];function Ou(n){try{let{hostname:e}=new URL(n);return Eu.some(t=>t.test(e))}catch{return!1}}function xt(n,e){let t=n;e.mediaUrlMap&&e.mediaUrlMap.size>0&&(t=dr(t,e.mediaUrlMap)),e.linkMap&&e.linkMap.size>0&&(t=yi(t,e.linkMap));let r=ee(t,null,!1),s=[];r("style").each((l,a)=>{s.push(r(a).html()??""),r(a).remove()}),r("script, noscript, base").remove(),r("link").each((l,a)=>{let u=(r(a).attr("rel")??"").toLowerCase(),c=r(a).attr("href")??"",f=/\b(preload|prefetch|modulepreload|preconnect|dns-prefetch|prerender)\b/.test(u),p=/(?:parastorage|wixstatic)\.com|\.wix\.com/i.test(c);(f||p)&&r(a).remove()}),r("*").each((l,a)=>{let u=a.attribs??{};for(let c of Object.keys(u))/^on/i.test(c)&&r(a).removeAttr(c)}),r('[class*="scroll-trigger"]').each((l,a)=>{let c=(r(a).attr("class")??"").split(/\s+/).filter(f=>f&&f!=="scroll-trigger"&&!f.startsWith("scroll-trigger--")).join(" ");c?r(a).attr("class",c):r(a).removeAttr("class")}),r("a[href]").each((l,a)=>{let u=r(a).attr("href")??"";/^\s*(?:javascript|vbscript):/i.test(u)&&r(a).removeAttr("href")}),r("iframe").each((l,a)=>{let u=r(a).attr("src")??"";Ou(u)||r(a).remove()}),r("img[style]").each((l,a)=>{let u=r(a).attr("style")??"";if(!/object-fit\s*:\s*cover/i.test(u))return;let c=u.split(";").map(f=>f.trim()).filter(f=>f&&!/^(width|height)\s*:/i.test(f)).join("; ");c?r(a).attr("style",c+";"):r(a).removeAttr("style"),r(a).removeAttr("width"),r(a).removeAttr("height")});let i=r.html().replace(/<!--[\s\S]*?-->/g,""),o=Ks(i);if(o.length>0)throw new Error(`html-carry left injection vectors: ${o.join("; ")}`);return{html:i.trim(),styleText:s.join(` +`)}}var N=ur(wa(),1),ft=N.default,xy=N.default.stringify,Ey=N.default.fromJSON,Oy=N.default.plugin,Cy=N.default.parse,Py=N.default.list,Ty=N.default.document,Iy=N.default.comment,Ry=N.default.atRule,Ay=N.default.rule,ky=N.default.decl,My=N.default.root,Ly=N.default.CssSyntaxError,Ny=N.default.Declaration,Dy=N.default.Container,Fy=N.default.Processor,Uy=N.default.Document,jy=N.default.Comment,$y=N.default.Warning,qy=N.default.AtRule,By=N.default.Result,Hy=N.default.Input,zy=N.default.Rule,Wy=N.default.Root,Gy=N.default.Node;var Yt=ur(zr(),1),kd=new Set(["html","body",":root"]),Md=new Set(["html",":root"]);function Ld(n,e){let t=`:where(${e})`;return(0,Yt.default)(r=>{r.each(s=>{let i=s.first;if(i&&(i.type==="tag"||i.type==="pseudo")&&kd.has(i.toString())){i.replaceWith(Yt.default.string({value:t}));return}s.prepend(Yt.default.combinator({value:" "})),s.prepend(Yt.default.string({value:t}))})}).processSync(n)}function Qt(n,e){let t=ft.parse(n),r=[];if(t.walkRules(i=>{i.parent?.type!=="root"||!i.selectors.some(l=>Md.has(l.trim()))||(i.walkDecls(/^font-size$/i,l=>{r.push(l.value.trim()),l.remove()}),i.nodes.length===0&&i.remove())}),t.walkRules(i=>{i.parent&&i.parent.type==="atrule"&&/keyframes$/i.test(i.parent.name??"")||(i.selector=i.selectors.map(o=>Ld(o,e.scope)).join(", "))}),e.scopeId){let i=new Map;t.walkAtRules(/^keyframes$/i,o=>{let l=o.params.trim(),a=`${l}__${e.scopeId}`;i.set(l,a),o.params=a}),i.size>0&&t.walkDecls(/^(animation|animation-name)$/i,o=>{for(let[l,a]of i)o.value=o.value.replace(new RegExp(`\\b${l}\\b`,"g"),a)})}return e.rewriteUrl&&t.walkDecls(i=>{i.value=i.value.replace(/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi,(o,l,a)=>{let u=e.rewriteUrl(a);return u?`url(${l}${u}${l})`:o})}),(r.length?`:root{font-size:${r[r.length-1]}} +`:"")+t.toString()}var Qa=ur(zr(),1);function Nd(n){try{let e="";return(0,Qa.default)(t=>{let s=t.first.nodes,i="";for(let o=s.length-1;o>=0&&s[o].type!=="combinator";o--)i=s[o].toString()+i;e=i.trim()}).processSync(n),e||null}catch{return null}}function Kt(n,e){let t=ee(e),r=ft.parse(n);return r.walkRules(s=>{if(s.parent&&s.parent.type==="atrule")return;s.selectors.some(o=>{let l=Nd(o);if(!l||/^(html|body|:root)(\b|$)/i.test(l))return!0;let a=l.replace(/:{1,2}[\w-]+(\([^)]*\))?/g,"").trim();if(!a)return!0;try{return t(a).length>0}catch{return!0}})||s.remove()}),r.toString()}var Dd='nav[data-hook="menu-root"].wixui-horizontal-menu',Fd="menu-root",Ud="wixui-horizontal-menu";function Xt(n,e,t){if(!e.includes(Fd)||!e.includes(Ud))return n;let r=` /* carry: un-freeze the stripped entrance-animation reveal on the main nav. :has() targets the horizontal menu's ANCESTORS only \u2014 leaves the header's solid-bg sibling and the hamburger overlay untouched. */ -${t} *:has(${Md}){visibility:visible!important;opacity:1!important} -`;return n+r}var Ya=ar(Br(),1),Dd=/opacity\s*:\s*(?:0?\.0\d*|0(?:\.0+)?)(?![.0-9])/i;function Fd(n){let e=[],t;try{t=ct.parse(n)}catch{return[]}return t.walkRules(r=>{let s=(r.nodes??[]).filter(u=>u.type==="decl"),i=s.map(u=>`${u.prop}:${u.value}`).join(";");if(!(Dd.test(i)||/visibility\s*:\s*hidden/i.test(i)||/display\s*:\s*none/i.test(i)))return;let l=s.some(u=>/^(?:transition|animation|transform)/i.test(u.prop)),a=/--offscreen|:not\(/i.test(r.selector);if(!(!l&&!a)&&!/:hover|:focus/i.test(r.selector))for(let u of r.selectors){let c=[];try{(0,Ya.default)(f=>{f.walkClasses(p=>{c.push(p.value)})}).processSync(u)}catch{continue}c.length!==0&&e.push({selector:u.trim(),classes:c})}}),e}function Kt(n,e,t,r){let s=a=>new RegExp(`(?:^|[\\s"'])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[\\s"'>])`).test(t),i=new Set,o=[];for(let a of Fd(e))a.classes.every(s)&&(i.has(a.selector)||(i.add(a.selector),o.push(`:where(${r}) ${a.selector}`)));if(o.length===0)return n;let l=` +${t} *:has(${Dd}){visibility:visible!important;opacity:1!important} +`;return n+r}var Ka=ur(zr(),1),jd=/opacity\s*:\s*(?:0?\.0\d*|0(?:\.0+)?)(?![.0-9])/i;function $d(n){let e=[],t;try{t=ft.parse(n)}catch{return[]}return t.walkRules(r=>{let s=(r.nodes??[]).filter(u=>u.type==="decl"),i=s.map(u=>`${u.prop}:${u.value}`).join(";");if(!(jd.test(i)||/visibility\s*:\s*hidden/i.test(i)||/display\s*:\s*none/i.test(i)))return;let l=s.some(u=>/^(?:transition|animation|transform)/i.test(u.prop)),a=/--offscreen|:not\(/i.test(r.selector);if(!(!l&&!a)&&!/:hover|:focus/i.test(r.selector))for(let u of r.selectors){let c=[];try{(0,Ka.default)(f=>{f.walkClasses(p=>{c.push(p.value)})}).processSync(u)}catch{continue}c.length!==0&&e.push({selector:u.trim(),classes:c})}}),e}function Zt(n,e,t,r){let s=a=>new RegExp(`(?:^|[\\s"'])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[\\s"'>])`).test(t),i=new Set,o=[];for(let a of $d(e))a.classes.every(s)&&(i.has(a.selector)||(i.add(a.selector),o.push(`:where(${r}) ${a.selector}`)));if(o.length===0)return n;let l=` /* carry: un-freeze stripped JS-reveal entrance gates (opacity/visibility/transform initial state). */ ${o.join(`, `)}{opacity:1!important;visibility:visible!important;transform:none!important} -`;return n+l}function Ts(n){return`<iframe class="lib-carry-mobile-frame" src="${n.docUrl.replace(/&/g,"&").replace(/"/g,""")}" width="320" height="${n.height}" scrolling="no" title="mobile"></iframe>`}function Ud(n,e){return mt(`<div class="lib-carry-vp-desktop">${n}</div><div class="lib-carry-vp-mobile">${Ts(e)}</div>`)}function mt(n){return n?`<!-- wp:html --> +`;return n+l}function Is(n){return`<iframe class="lib-carry-mobile-frame" src="${n.docUrl.replace(/&/g,"&").replace(/"/g,""")}" width="320" height="${n.height}" scrolling="no" title="mobile"></iframe>`}function qd(n,e){return yt(`<div class="lib-carry-vp-desktop">${n}</div><div class="lib-carry-vp-mobile">${Is(e)}</div>`)}function yt(n){return n?`<!-- wp:html --> ${n} -<!-- /wp:html -->`:""}function jd(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�?39;|'|'/gi,"'").replace(/ | /gi," ").replace(/’|’/gi,"\u2019").replace(/‘|‘/gi,"\u2018").replace(/…|…/gi,"\u2026")}function $d(n,e){let t=n.match(/<h[1-6][^>]*>([\s\S]*?)<\/h[1-6]>/i),r=t&&t[1].replace(/<[^>]+>/g,"").trim()?t[1]:n;return jd(r.replace(/<[^>]+>/g," ")).replace(/\s+/g," ").trim().slice(0,48).trim()||`Section ${e+1}`}function qd(n,e){return n?`<!-- wp:html ${JSON.stringify({metadata:{name:e}})} --> +<!-- /wp:html -->`:""}function Bd(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�?39;|'|'/gi,"'").replace(/ | /gi," ").replace(/’|’/gi,"\u2019").replace(/‘|‘/gi,"\u2018").replace(/…|…/gi,"\u2026")}function Hd(n,e){let t=n.match(/<h[1-6][^>]*>([\s\S]*?)<\/h[1-6]>/i),r=t&&t[1].replace(/<[^>]+>/g,"").trim()?t[1]:n;return Bd(r.replace(/<[^>]+>/g," ")).replace(/\s+/g," ").trim().slice(0,48).trim()||`Section ${e+1}`}function zd(n,e){return n?`<!-- wp:html ${JSON.stringify({metadata:{name:e}})} --> ${n} -<!-- /wp:html -->`:""}function Qa(n){let e={mediaUrlMap:n.mediaUrlMap,linkMap:n.linkMap},t="body.lib-carry-site",r=`body.lib-carry-site.lib-carry-page-${n.slug}`,s=m=>n.mediaUrlMap.get(m)??null,i=_t(n.bodyHtml,e),o=ci(i.html);if(o.found){let m=`${o.headerHtml}${o.footerHtml}`,w=[n.css,i.styleText].filter(Boolean).join(` -`),C=m?Kt(Qt(Yt(Jt(w,{scope:t,scopeId:"site",rewriteUrl:s}),m),m,t),w,m,t):"",I=o.openWrap+o.midBefore+o.sectionsHtml.join("")+o.midAfter+o.closeWrap,T=Kt(Qt(Yt(Jt(w,{scope:r,scopeId:n.slug,rewriteUrl:s}),I),I,r),w,I,r),R=o.sectionsHtml.map((G,q)=>qd(G,$d(G,q)));return{mainIsland:R.join(` -`),postContentBlocks:R,headerIsland:mt(o.headerHtml),footerIsland:mt(o.footerHtml),splitChrome:!0,scaffold:{openWrap:o.openWrap,midBefore:o.midBefore,midAfter:o.midAfter,closeWrap:o.closeWrap},chromeCss:C,mainCss:T}}let l=ai(n.bodyHtml,n.specs),a=_t(l.mainHtml,e),u=l.headerHtml?_t(l.headerHtml,e):{html:"",styleText:""},c=l.footerHtml?_t(l.footerHtml,e):{html:"",styleText:""},f=`${u.html}${c.html}`,p=[n.css,u.styleText,c.styleText].filter(Boolean).join(` -`),g=f?Kt(Qt(Yt(Jt(p,{scope:t,scopeId:"site",rewriteUrl:s}),f),f,t),p,f,t):"",h=[n.css,a.styleText].filter(Boolean).join(` -`),y=Kt(Qt(Yt(Jt(h,{scope:r,scopeId:n.slug,rewriteUrl:s}),a.html),a.html,r),h,a.html,r),d=n.mobile?Ud(a.html,n.mobile):mt(a.html);return{mainIsland:d,postContentBlocks:d?[d]:[],headerIsland:mt(u.html),footerIsland:mt(c.html),splitChrome:!1,chromeCss:g,mainCss:y}}var Bd=/([a-z0-9]{4,12}_[a-z0-9]{24,48})/i;function yt(n){let e=Bd.exec(n);return e?e[1].toLowerCase():null}function Ka(n,e){return!n||Object.keys(e).length===0?n:n.replace(/<img\b[^>]*>/gi,(t,r,s)=>{let i=s.slice(Math.max(0,r-220),r);if(/<picture\b[^>]*>\s*(?:<source\b[^>]*>\s*)*$/i.test(i))return t;let o=/\bsrc\s*=\s*["']([^"']*)["']/i.exec(t);if(!o)return t;let l=yt(o[1]);if(!l)return t;let a=e[l];return a?`<picture><source media="(max-width:750px)" srcset="${a.replace(/"/g,""")}"/>${t}</picture>`:t})}var Za=`.lib-carry-gallery-mobile{display:none} +<!-- /wp:html -->`:""}function Xa(n){let e={mediaUrlMap:n.mediaUrlMap,linkMap:n.linkMap},t="body.lib-carry-site",r=`body.lib-carry-site.lib-carry-page-${n.slug}`,s=m=>n.mediaUrlMap.get(m)??null,i=xt(n.bodyHtml,e),o=pi(i.html);if(o.found){let m=`${o.headerHtml}${o.footerHtml}`,w=[n.css,i.styleText].filter(Boolean).join(` +`),C=m?Zt(Xt(Kt(Qt(w,{scope:t,scopeId:"site",rewriteUrl:s}),m),m,t),w,m,t):"",I=o.openWrap+o.midBefore+o.sectionsHtml.join("")+o.midAfter+o.closeWrap,T=Zt(Xt(Kt(Qt(w,{scope:r,scopeId:n.slug,rewriteUrl:s}),I),I,r),w,I,r),A=o.sectionsHtml.map((G,q)=>zd(G,Hd(G,q)));return{mainIsland:A.join(` +`),postContentBlocks:A,headerIsland:yt(o.headerHtml),footerIsland:yt(o.footerHtml),splitChrome:!0,scaffold:{openWrap:o.openWrap,midBefore:o.midBefore,midAfter:o.midAfter,closeWrap:o.closeWrap},chromeCss:C,mainCss:T}}let l=ui(n.bodyHtml,n.specs),a=xt(l.mainHtml,e),u=l.headerHtml?xt(l.headerHtml,e):{html:"",styleText:""},c=l.footerHtml?xt(l.footerHtml,e):{html:"",styleText:""},f=`${u.html}${c.html}`,p=[n.css,u.styleText,c.styleText].filter(Boolean).join(` +`),g=f?Zt(Xt(Kt(Qt(p,{scope:t,scopeId:"site",rewriteUrl:s}),f),f,t),p,f,t):"",h=[n.css,a.styleText].filter(Boolean).join(` +`),y=Zt(Xt(Kt(Qt(h,{scope:r,scopeId:n.slug,rewriteUrl:s}),a.html),a.html,r),h,a.html,r),d=n.mobile?qd(a.html,n.mobile):yt(a.html);return{mainIsland:d,postContentBlocks:d?[d]:[],headerIsland:yt(u.html),footerIsland:yt(c.html),splitChrome:!1,chromeCss:g,mainCss:y}}var Wd=/([a-z0-9]{4,12}_[a-z0-9]{24,48})/i;function vt(n){let e=Wd.exec(n);return e?e[1].toLowerCase():null}function Za(n,e){return!n||Object.keys(e).length===0?n:n.replace(/<img\b[^>]*>/gi,(t,r,s)=>{let i=s.slice(Math.max(0,r-220),r);if(/<picture\b[^>]*>\s*(?:<source\b[^>]*>\s*)*$/i.test(i))return t;let o=/\bsrc\s*=\s*["']([^"']*)["']/i.exec(t);if(!o)return t;let l=vt(o[1]);if(!l)return t;let a=e[l];return a?`<picture><source media="(max-width:750px)" srcset="${a.replace(/"/g,""")}"/>${t}</picture>`:t})}var tl=`.lib-carry-gallery-mobile{display:none} @media screen and (max-width:750px){body.lib-carry-site div.pro-gallery:has(+ .lib-carry-gallery-mobile){display:none!important}body.lib-carry-site .lib-carry-gallery-mobile{display:grid!important;grid-template-columns:1fr;gap:4px;width:350px;max-width:100%;margin:0 auto;box-sizing:border-box}body.lib-carry-site .lib-carry-gallery-mobile img{width:100%;aspect-ratio:350/281;object-fit:cover;display:block}} -`;function Xa(n){return n.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function el(n,e={}){if(!n||!/pro-gallery/.test(n))return n;let t=ee(n,null,!1),r=!1;return t("div.pro-gallery").filter((s,i)=>t(i).parents("div.pro-gallery").length===0).each((s,i)=>{let o=t(i);if(o.next(".lib-carry-gallery-mobile").length)return;let l=[];if(o.find('img[data-hook="gallery-item-image-img"]').each((u,c)=>{let f=t(c).attr("src")||"";if(!f)return;let p=yt(f),g=p?e[p]:void 0;l.push({src:g||f,alt:t(c).attr("alt")||""})}),!l.length)return;let a='<div class="lib-carry-gallery-mobile">'+l.map(u=>`<img src="${Xa(u.src)}" alt="${Xa(u.alt)}" loading="lazy"/>`).join("")+"</div>";o.after(a),r=!0}),r?t.html():n}function Is(n){return n.isHome?"is_front_page()":n.postType==="post"?`is_single( '${n.slug}' )`:`is_page( '${n.slug}' )`}function Hr(n){let e=n===0?"":`-${n+1}`;return{header:`header${e}`,footer:`footer${e}`}}function Hd(n){let e=n.toLowerCase().replace(/\s+/g,"-");return`/* +`;function el(n){return n.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function rl(n,e={}){if(!n||!/pro-gallery/.test(n))return n;let t=ee(n,null,!1),r=!1;return t("div.pro-gallery").filter((s,i)=>t(i).parents("div.pro-gallery").length===0).each((s,i)=>{let o=t(i);if(o.next(".lib-carry-gallery-mobile").length)return;let l=[];if(o.find('img[data-hook="gallery-item-image-img"]').each((u,c)=>{let f=t(c).attr("src")||"";if(!f)return;let p=vt(f),g=p?e[p]:void 0;l.push({src:g||f,alt:t(c).attr("alt")||""})}),!l.length)return;let a='<div class="lib-carry-gallery-mobile">'+l.map(u=>`<img src="${el(u.src)}" alt="${el(u.alt)}" loading="lazy"/>`).join("")+"</div>";o.after(a),r=!0}),r?t.html():n}function Rs(n){return n.isHome?"is_front_page()":n.postType==="post"?`is_single( '${n.slug}' )`:`is_page( '${n.slug}' )`}function Wr(n){let e=n===0?"":`-${n+1}`;return{header:`header${e}`,footer:`footer${e}`}}function Gd(n){let e=n.toLowerCase().replace(/\s+/g,"-");return`/* Theme Name: ${n} Version: 1.0.0 Text Domain: ${e} */ -`}function nl(n){return[`<!-- wp:template-part {"slug":"${n.header}","tagName":"header"} /-->`,'<!-- wp:group {"tagName":"main"} -->','<main class="wp-block-group"><!-- wp:post-content /--></main>',"<!-- /wp:group -->",`<!-- wp:template-part {"slug":"${n.footer}","tagName":"footer"} /-->`,""].join(` +`}function il(n){return[`<!-- wp:template-part {"slug":"${n.header}","tagName":"header"} /-->`,'<!-- wp:group {"tagName":"main"} -->','<main class="wp-block-group"><!-- wp:post-content /--></main>',"<!-- /wp:group -->",`<!-- wp:template-part {"slug":"${n.footer}","tagName":"footer"} /-->`,""].join(` `)}function ge(n){return n?`<!-- wp:html --> ${n} -<!-- /wp:html -->`:""}var Xt="header-store";function zd(){return[`<!-- wp:template-part {"slug":"${Xt}","tagName":"header"} /-->`,"",'<!-- wp:group {"tagName":"main","layout":{"type":"constrained"},"style":{"spacing":{"padding":{"top":"40px","bottom":"64px"}}}} -->','<main class="wp-block-group" style="padding-top:40px;padding-bottom:64px">',"<!-- wp:woocommerce/breadcrumbs /-->","",'<!-- wp:woocommerce/legacy-template {"template":"archive-product"} /-->',"</main>","<!-- /wp:group -->","",'<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->',""].join(` -`)}function Wd(){return[`<!-- wp:template-part {"slug":"${Xt}","tagName":"header"} /-->`,"",'<!-- wp:group {"tagName":"main","layout":{"type":"constrained","contentSize":"1200px"},"style":{"spacing":{"padding":{"top":"32px","bottom":"24px","left":"24px","right":"24px"}}}} -->','<main class="wp-block-group" style="padding-top:32px;padding-bottom:24px;padding-left:24px;padding-right:24px">',"<!-- wp:woocommerce/breadcrumbs /-->","",'<!-- wp:columns {"style":{"spacing":{"blockGap":{"left":"48px"}}}} -->','<div class="wp-block-columns">','<!-- wp:column {"width":"52%"} -->','<div class="wp-block-column" style="flex-basis:52%">',"<!-- wp:woocommerce/product-image-gallery /-->","</div>","<!-- /wp:column -->","",'<!-- wp:column {"width":"48%"} -->','<div class="wp-block-column" style="flex-basis:48%">','<!-- wp:post-title {"level":1} /-->',"","<!-- wp:woocommerce/product-rating /-->","","<!-- wp:woocommerce/product-price /-->","","<!-- wp:woocommerce/product-summary /-->","","<!-- wp:woocommerce/add-to-cart-form /-->","","<!-- wp:woocommerce/product-meta /-->","</div>","<!-- /wp:column -->","</div>","<!-- /wp:columns -->","</main>","<!-- /wp:group -->","",'<!-- wp:group {"tagName":"section","align":"full","style":{"spacing":{"padding":{"bottom":"64px"}}},"layout":{"type":"constrained","contentSize":"1100px"}} -->','<section class="wp-block-group alignfull" style="padding-bottom:64px">',"<!-- wp:post-content /-->","</section>","<!-- /wp:group -->","",'<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->',""].join(` -`)}function sl(n,e,t){let r=t?[ge('<div class="lib-carry-vp-desktop">'),"<!-- wp:post-content /-->",ge(`</div> -<div class="lib-carry-vp-mobile">${Ts(t)}</div>`)].join(` +<!-- /wp:html -->`:""}var er="header-store";function Vd(){return[`<!-- wp:template-part {"slug":"${er}","tagName":"header"} /-->`,"",'<!-- wp:group {"tagName":"main","layout":{"type":"constrained"},"style":{"spacing":{"padding":{"top":"40px","bottom":"64px"}}}} -->','<main class="wp-block-group" style="padding-top:40px;padding-bottom:64px">',"<!-- wp:woocommerce/breadcrumbs /-->","",'<!-- wp:woocommerce/legacy-template {"template":"archive-product"} /-->',"</main>","<!-- /wp:group -->","",'<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->',""].join(` +`)}function Jd(){return[`<!-- wp:template-part {"slug":"${er}","tagName":"header"} /-->`,"",'<!-- wp:group {"tagName":"main","layout":{"type":"constrained","contentSize":"1200px"},"style":{"spacing":{"padding":{"top":"32px","bottom":"24px","left":"24px","right":"24px"}}}} -->','<main class="wp-block-group" style="padding-top:32px;padding-bottom:24px;padding-left:24px;padding-right:24px">',"<!-- wp:woocommerce/breadcrumbs /-->","",'<!-- wp:columns {"style":{"spacing":{"blockGap":{"left":"48px"}}}} -->','<div class="wp-block-columns">','<!-- wp:column {"width":"52%"} -->','<div class="wp-block-column" style="flex-basis:52%">',"<!-- wp:woocommerce/product-image-gallery /-->","</div>","<!-- /wp:column -->","",'<!-- wp:column {"width":"48%"} -->','<div class="wp-block-column" style="flex-basis:48%">','<!-- wp:post-title {"level":1} /-->',"","<!-- wp:woocommerce/product-rating /-->","","<!-- wp:woocommerce/product-price /-->","","<!-- wp:woocommerce/product-summary /-->","","<!-- wp:woocommerce/add-to-cart-form /-->","","<!-- wp:woocommerce/product-meta /-->","</div>","<!-- /wp:column -->","</div>","<!-- /wp:columns -->","</main>","<!-- /wp:group -->","",'<!-- wp:group {"tagName":"section","align":"full","style":{"spacing":{"padding":{"bottom":"64px"}}},"layout":{"type":"constrained","contentSize":"1100px"}} -->','<section class="wp-block-group alignfull" style="padding-bottom:64px">',"<!-- wp:post-content /-->","</section>","<!-- /wp:group -->","",'<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->',""].join(` +`)}function ol(n,e,t){let r=t?[ge('<div class="lib-carry-vp-desktop">'),"<!-- wp:post-content /-->",ge(`</div> +<div class="lib-carry-vp-mobile">${Is(t)}</div>`)].join(` `):"<!-- wp:post-content /-->";return[ge(n.openWrap),`<!-- wp:template-part {"slug":"${e.header}","tagName":"div"} /-->`,ge(n.midBefore),r,ge(n.midAfter),`<!-- wp:template-part {"slug":"${e.footer}","tagName":"div"} /-->`,ge(n.closeWrap)].filter(Boolean).join(` -`)}function As(n,e){return n.scaffold?sl(n.scaffold,e,n.mobile):nl(e)}var Gd=['<!-- wp:group {"tagName":"div","layout":{"type":"constrained","contentSize":"760px"},"style":{"spacing":{"padding":{"top":"48px","bottom":"72px","left":"20px","right":"20px"}}}} -->','<div class="wp-block-group" style="padding:48px 20px 72px">','<!-- wp:group {"style":{"color":{"background":"#ffffff"},"spacing":{"padding":{"top":"44px","bottom":"56px","left":"clamp(20px,4vw,56px)","right":"clamp(20px,4vw,56px)"}},"border":{"radius":"10px"}},"layout":{"type":"constrained"}} -->','<div class="wp-block-group has-background" style="border-radius:10px;background-color:#ffffff;padding:44px clamp(20px,4vw,56px) 56px">','<!-- wp:post-title {"level":1} /-->',"<!-- wp:post-date /-->",'<!-- wp:spacer {"height":"24px"} --><div style="height:24px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer -->','<!-- wp:post-featured-image {"isLink":false,"style":{"border":{"radius":"8px"}}} /-->','<!-- wp:spacer {"height":"24px"} --><div style="height:24px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer -->','<!-- wp:post-content {"layout":{"type":"constrained"}} /-->',"</div>","<!-- /wp:group -->",'<!-- wp:spacer {"height":"40px"} --><div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer -->','<!-- wp:post-navigation-link {"type":"previous","label":"Previous post","showTitle":true} /-->','<!-- wp:post-navigation-link {"label":"Next post","showTitle":true} /-->',"</div>","<!-- /wp:group -->"].join(` -`),tl=`<!-- wp:heading {"level":1} --> +`)}function As(n,e){return n.scaffold?ol(n.scaffold,e,n.mobile):il(e)}var Yd=['<!-- wp:group {"tagName":"div","layout":{"type":"constrained","contentSize":"760px"},"style":{"spacing":{"padding":{"top":"48px","bottom":"72px","left":"20px","right":"20px"}}}} -->','<div class="wp-block-group" style="padding:48px 20px 72px">','<!-- wp:group {"style":{"color":{"background":"#ffffff"},"spacing":{"padding":{"top":"44px","bottom":"56px","left":"clamp(20px,4vw,56px)","right":"clamp(20px,4vw,56px)"}},"border":{"radius":"10px"}},"layout":{"type":"constrained"}} -->','<div class="wp-block-group has-background" style="border-radius:10px;background-color:#ffffff;padding:44px clamp(20px,4vw,56px) 56px">','<!-- wp:post-title {"level":1} /-->',"<!-- wp:post-date /-->",'<!-- wp:spacer {"height":"24px"} --><div style="height:24px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer -->','<!-- wp:post-featured-image {"isLink":false,"style":{"border":{"radius":"8px"}}} /-->','<!-- wp:spacer {"height":"24px"} --><div style="height:24px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer -->','<!-- wp:post-content {"layout":{"type":"constrained"}} /-->',"</div>","<!-- /wp:group -->",'<!-- wp:spacer {"height":"40px"} --><div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer -->','<!-- wp:post-navigation-link {"type":"previous","label":"Previous post","showTitle":true} /-->','<!-- wp:post-navigation-link {"label":"Next post","showTitle":true} /-->',"</div>","<!-- /wp:group -->"].join(` +`),nl=`<!-- wp:heading {"level":1} --> <h1 class="wp-block-heading">Blog</h1> -<!-- /wp:heading -->`,Vd='<!-- wp:query-title {"type":"archive"} /-->';function Rs(n){return['<!-- wp:group {"tagName":"div","layout":{"type":"constrained","contentSize":"880px"},"style":{"spacing":{"padding":{"top":"48px","bottom":"72px","left":"20px","right":"20px"}}}} -->','<div class="wp-block-group" style="padding:48px 20px 72px">',n,'<!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","inherit":true},"layout":{"type":"default"}} -->','<div class="wp-block-query">','<!-- wp:post-template {"style":{"spacing":{"blockGap":"40px"}},"layout":{"type":"default"}} -->','<!-- wp:group {"style":{"color":{"background":"#ffffff"},"spacing":{"padding":{"top":"30px","bottom":"30px","left":"32px","right":"32px"}},"border":{"radius":"10px"}},"layout":{"type":"constrained"}} -->','<div class="wp-block-group has-background" style="border-radius:10px;background-color:#ffffff;padding:30px 32px">','<!-- wp:post-title {"isLink":true,"level":2} /-->',"<!-- wp:post-date /-->",'<!-- wp:post-excerpt {"moreText":"Read more \u2192"} /-->',"</div>","<!-- /wp:group -->","<!-- /wp:post-template -->",'<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->',"<!-- wp:query-pagination-previous /--><!-- wp:query-pagination-numbers /--><!-- wp:query-pagination-next /-->","<!-- /wp:query-pagination -->","<!-- wp:query-no-results --><!-- wp:paragraph --><p>No posts yet.</p><!-- /wp:paragraph --><!-- /wp:query-no-results -->","</div>","<!-- /wp:query -->","</div>","<!-- /wp:group -->"].join(` -`)}function zr(n,e,t){return t?[ge(t.openWrap),`<!-- wp:template-part {"slug":"${e.header}","tagName":"div"} /-->`,ge(t.midBefore),n,ge(t.midAfter),`<!-- wp:template-part {"slug":"${e.footer}","tagName":"div"} /-->`,ge(t.closeWrap)].filter(Boolean).join(` +<!-- /wp:heading -->`,Qd='<!-- wp:query-title {"type":"archive"} /-->';function ks(n){return['<!-- wp:group {"tagName":"div","layout":{"type":"constrained","contentSize":"880px"},"style":{"spacing":{"padding":{"top":"48px","bottom":"72px","left":"20px","right":"20px"}}}} -->','<div class="wp-block-group" style="padding:48px 20px 72px">',n,'<!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","inherit":true},"layout":{"type":"default"}} -->','<div class="wp-block-query">','<!-- wp:post-template {"style":{"spacing":{"blockGap":"40px"}},"layout":{"type":"default"}} -->','<!-- wp:group {"style":{"color":{"background":"#ffffff"},"spacing":{"padding":{"top":"30px","bottom":"30px","left":"32px","right":"32px"}},"border":{"radius":"10px"}},"layout":{"type":"constrained"}} -->','<div class="wp-block-group has-background" style="border-radius:10px;background-color:#ffffff;padding:30px 32px">','<!-- wp:post-title {"isLink":true,"level":2} /-->',"<!-- wp:post-date /-->",'<!-- wp:post-excerpt {"moreText":"Read more \u2192"} /-->',"</div>","<!-- /wp:group -->","<!-- /wp:post-template -->",'<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->',"<!-- wp:query-pagination-previous /--><!-- wp:query-pagination-numbers /--><!-- wp:query-pagination-next /-->","<!-- /wp:query-pagination -->","<!-- wp:query-no-results --><!-- wp:paragraph --><p>No posts yet.</p><!-- /wp:paragraph --><!-- /wp:query-no-results -->","</div>","<!-- /wp:query -->","</div>","<!-- /wp:group -->"].join(` +`)}function Gr(n,e,t){return t?[ge(t.openWrap),`<!-- wp:template-part {"slug":"${e.header}","tagName":"div"} /-->`,ge(t.midBefore),n,ge(t.midAfter),`<!-- wp:template-part {"slug":"${e.footer}","tagName":"div"} /-->`,ge(t.closeWrap)].filter(Boolean).join(` `):[`<!-- wp:template-part {"slug":"${e.header}","tagName":"header"} /-->`,'<!-- wp:group {"tagName":"main"} -->',`<main class="wp-block-group">${n}</main>`,"<!-- /wp:group -->",`<!-- wp:template-part {"slug":"${e.footer}","tagName":"footer"} /-->`].join(` -`)}function Jd(n){return/^[a-zA-Z][\w-]{0,60}$/.test(n)?n:null}function Yd(n){return n.replace(/<meta\b[^>]*\bname=["']viewport["'][^>]*>\s*/gi,"")}function rl(n){return n.replace(/:where\(\s*body\.lib-carry-site\s*\)/g,"body").replace(/:where\(\s*body\.lib-carry-page-[\w-]+\s*\)/g,"body").replace(/body\.lib-carry-site\b/g,"body").replace(/body\.lib-carry-page-[\w-]+/g,"body")}function Qd(n,e,t){let r=e.map(Jd).filter(c=>c!==null).map(c=>` $classes[] = '${c}';`).join(` -`),s=n.map(c=>` if ( ${Is(c)} ) { $classes[] = 'lib-carry-page-${c.slug}'; }`).join(` -`),i=n.map(c=>` if ( ${Is(c)} ) { wp_enqueue_style( 'lib-carry-page-${c.slug}', get_stylesheet_directory_uri() . '/assets/css/page-${c.slug}.css', array( 'lib-carry-site' ), '1.0.0' ); }`).join(` -`),o=n.filter(c=>c.mobile).map(Is).join(" || "),l=t?` +`)}function Kd(n){return/^[a-zA-Z][\w-]{0,60}$/.test(n)?n:null}function Xd(n){return n.replace(/<meta\b[^>]*\bname=["']viewport["'][^>]*>\s*/gi,"")}function sl(n){return n.replace(/:where\(\s*body\.lib-carry-site\s*\)/g,"body").replace(/:where\(\s*body\.lib-carry-page-[\w-]+\s*\)/g,"body").replace(/body\.lib-carry-site\b/g,"body").replace(/body\.lib-carry-page-[\w-]+/g,"body")}function Zd(n,e,t){let r=e.map(Kd).filter(c=>c!==null).map(c=>` $classes[] = '${c}';`).join(` +`),s=n.map(c=>` if ( ${Rs(c)} ) { $classes[] = 'lib-carry-page-${c.slug}'; }`).join(` +`),i=n.map(c=>` if ( ${Rs(c)} ) { wp_enqueue_style( 'lib-carry-page-${c.slug}', get_stylesheet_directory_uri() . '/assets/css/page-${c.slug}.css', array( 'lib-carry-site' ), '1.0.0' ); }`).join(` +`),o=n.filter(c=>c.mobile).map(Rs).join(" || "),l=t?` add_action( 'wp_head', function () { remove_action( 'wp_head', '_block_template_viewport_meta_tag', 0 ); }, -1 ); @@ -138,11 +138,11 @@ add_filter( 'wp_kses_allowed_html', function( $tags, $context ) { } return $tags; }, 10, 2 ); -${u}${l}`}function il(n){let e=n.pages.some(P=>P.mobile),t=e?n.pages.map(P=>P.scaffold?{...P,scaffold:{...P.scaffold,openWrap:Yd(P.scaffold.openWrap)}}:P):n.pages,r=`body.lib-carry-site{all:revert;margin:0;padding:0} +${u}${l}`}function al(n){let e=n.pages.some(P=>P.mobile),t=e?n.pages.map(P=>P.scaffold?{...P,scaffold:{...P.scaffold,openWrap:Xd(P.scaffold.openWrap)}}:P):n.pages,r=`body.lib-carry-site{all:revert;margin:0;padding:0} body.lib-carry-site *{box-sizing:border-box} `,i=t.some(P=>P.scaffold)?`.wp-block-template-part{display:contents} `:"",o=`body.lib-carry-site [data-hook="bgLayers"],body.lib-carry-site [data-testid="colorUnderlay"],body.lib-carry-site [data-motion-part^="BG_LAYER"]{pointer-events:none!important} -`,l=Za,a=["body.lib-carry-site .lib-carry-vp-desktop","body.lib-carry-site .wp-block-template-part"],u=(...P)=>P.flatMap(B=>a.map(ve=>`${ve} ${B}`)).join(","),c=`body.lib-carry-site header.wp-block-template-part{display:block!important} +`,l=tl,a=["body.lib-carry-site .lib-carry-vp-desktop","body.lib-carry-site .wp-block-template-part"],u=(...P)=>P.flatMap(B=>a.map(ve=>`${ve} ${B}`)).join(","),c=`body.lib-carry-site header.wp-block-template-part{display:block!important} ${u("sticky-header",".header-wrapper",".shopify-section-group-header-group")}{display:block!important} ${u(".announcement-bar svg",".announcement-bar__message svg",".announcement-bar__link svg")}{width:1.2rem;height:auto;display:inline-block;vertical-align:middle} ${u(".header.header--top-left",".header.header--top-center",".header.header--middle-left",".header.header--middle-center",".header.header--mobile-center",".header.header--mobile-left")}{display:grid!important} @@ -153,28 +153,28 @@ ${u(".header__inline-menu .list-menu__item")}{text-decoration:none} .lib-carry-vp-mobile{display:none} .lib-carry-mobile-frame{border:0;display:block;width:320px;max-width:320px;margin:0} @media screen and (max-width:750px){html:has(.lib-carry-vp-mobile),body.lib-carry-site:has(.lib-carry-vp-mobile){width:320px!important;min-width:0!important;max-width:320px!important;overflow-x:hidden!important}body.lib-carry-site:has(.lib-carry-vp-mobile) .lib-carry-vp-desktop{display:none!important}body.lib-carry-site:has(.lib-carry-vp-mobile) .wp-block-template-part{display:none!important}body.lib-carry-site:has(.lib-carry-vp-mobile) #masterPage,body.lib-carry-site:has(.lib-carry-vp-mobile) #SITE_CONTAINER,body.lib-carry-site:has(.lib-carry-vp-mobile) #site-root,body.lib-carry-site:has(.lib-carry-vp-mobile) [id^="SITE_PAGES"],body.lib-carry-site:has(.lib-carry-vp-mobile) #pagesContainer,body.lib-carry-site:has(.lib-carry-vp-mobile) [id^="pageBackground"],body.lib-carry-site:has(.lib-carry-vp-mobile) [id^="bgLayers_pageBackground"]{display:contents!important}body.lib-carry-site .lib-carry-vp-mobile{display:block!important}} -`,p=new Map;n.chromeVariants.forEach((P,B)=>p.set(P.key,Hr(B)));let g=P=>p.get(P)??Hr(0),h={layout:{contentSize:"100%",wideSize:"100%"}};n.themeJsonPalette?.length&&(h.color={palette:n.themeJsonPalette}),n.themeJsonFontFamilies?.length&&(h.typography={fontFamilies:n.themeJsonFontFamilies});let y={$schema:"https://schemas.wp.org/trunk/theme.json",version:3,settings:h};if(n.chromeVariants.some(P=>P.headerIsland||P.footerIsland)&&(y.templateParts=n.chromeVariants.flatMap((P,B)=>{let ve=Hr(B),sr=B===0?"":` ${B+1}`;return[{name:ve.header,title:`Header${sr}`,area:"header"},{name:ve.footer,title:`Footer${sr}`,area:"footer"}]})),n.hasProducts&&n.storeHeaderIsland){let P=y.templateParts??[];P.push({name:Xt,title:"Header (Store)",area:"header"}),y.templateParts=P}let m=t.find(P=>P.isHome),w=g(m?.chromeKey??n.chromeVariants[0]?.key??""),C=n.nativeBlog??!t.some(P=>P.postType==="post"),I=(n.hasProducts??!1)&&!!n.storeHeaderIsland,T={header:Xt,footer:w.footer},R=I?zr(Rs(tl),T):m?.scaffold?sl(m.scaffold,w,m.mobile):nl(w),G=r+i+o+l+c+f+n.siteCss+Kd({hasProducts:n.hasProducts??!1,rootFontSizeApplied:/:root\s*\{[^}]*font-size/i.test(n.siteCss)}),q=[{path:"style.css",content:Hd(n.themeName)},{path:"theme.json",content:JSON.stringify(y,null,2)},{path:"functions.php",content:Qd(t,n.bodyClasses??[],e)},{path:"assets/css/site.css",content:G},{path:"assets/css/editor-site.css",content:rl(G)},{path:"templates/index.html",content:R}];n.chromeVariants.forEach((P,B)=>{let ve=Hr(B);q.push({path:`parts/${ve.header}.html`,content:P.headerIsland+` +`,p=new Map;n.chromeVariants.forEach((P,B)=>p.set(P.key,Wr(B)));let g=P=>p.get(P)??Wr(0),h={layout:{contentSize:"100%",wideSize:"100%"}};n.themeJsonPalette?.length&&(h.color={palette:n.themeJsonPalette}),n.themeJsonFontFamilies?.length&&(h.typography={fontFamilies:n.themeJsonFontFamilies});let y={$schema:"https://schemas.wp.org/trunk/theme.json",version:3,settings:h};if(n.chromeVariants.some(P=>P.headerIsland||P.footerIsland)&&(y.templateParts=n.chromeVariants.flatMap((P,B)=>{let ve=Wr(B),or=B===0?"":` ${B+1}`;return[{name:ve.header,title:`Header${or}`,area:"header"},{name:ve.footer,title:`Footer${or}`,area:"footer"}]})),n.hasProducts&&n.storeHeaderIsland){let P=y.templateParts??[];P.push({name:er,title:"Header (Store)",area:"header"}),y.templateParts=P}let m=t.find(P=>P.isHome),w=g(m?.chromeKey??n.chromeVariants[0]?.key??""),C=n.nativeBlog??!t.some(P=>P.postType==="post"),I=(n.hasProducts??!1)&&!!n.storeHeaderIsland,T={header:er,footer:w.footer},A=I?Gr(ks(nl),T):m?.scaffold?ol(m.scaffold,w,m.mobile):il(w),G=r+i+o+l+c+f+n.siteCss+eg({hasProducts:n.hasProducts??!1,rootFontSizeApplied:/:root\s*\{[^}]*font-size/i.test(n.siteCss)}),q=[{path:"style.css",content:Gd(n.themeName)},{path:"theme.json",content:JSON.stringify(y,null,2)},{path:"functions.php",content:Zd(t,n.bodyClasses??[],e)},{path:"assets/css/site.css",content:G},{path:"assets/css/editor-site.css",content:sl(G)},{path:"templates/index.html",content:A}];n.chromeVariants.forEach((P,B)=>{let ve=Wr(B);q.push({path:`parts/${ve.header}.html`,content:P.headerIsland+` `}),q.push({path:`parts/${ve.footer}.html`,content:P.footerIsland+` -`})});let Q=!1;for(let P of t){q.push({path:`assets/css/page-${P.slug}.css`,content:P.pageCss}),q.push({path:`assets/css/editor-page-${P.slug}.css`,content:rl(P.pageCss)});let B=g(P.chromeKey);P.isHome?q.push({path:"templates/front-page.html",content:As(P,B)}):P.postType==="post"?Q||(q.push({path:"templates/single.html",content:As(P,B)}),Q=!0):q.push({path:`templates/page-${P.slug}.html`,content:As(P,B)})}if(C){let P=I?T:w,B=I?void 0:m?.scaffold;q.push({path:"templates/single.html",content:zr(Gd,P,B)}),q.push({path:"templates/home.html",content:zr(Rs(tl),P,B)}),q.push({path:"templates/archive.html",content:zr(Rs(Vd),P,B)})}if(n.hasProducts&&n.storeHeaderIsland){let P=n.storeHeaderIsland.endsWith(` +`})});let Q=!1;for(let P of t){q.push({path:`assets/css/page-${P.slug}.css`,content:P.pageCss}),q.push({path:`assets/css/editor-page-${P.slug}.css`,content:sl(P.pageCss)});let B=g(P.chromeKey);P.isHome?q.push({path:"templates/front-page.html",content:As(P,B)}):P.postType==="post"?Q||(q.push({path:"templates/single.html",content:As(P,B)}),Q=!0):q.push({path:`templates/page-${P.slug}.html`,content:As(P,B)})}if(C){let P=I?T:w,B=I?void 0:m?.scaffold;q.push({path:"templates/single.html",content:Gr(Yd,P,B)}),q.push({path:"templates/home.html",content:Gr(ks(nl),P,B)}),q.push({path:"templates/archive.html",content:Gr(ks(Qd),P,B)})}if(n.hasProducts&&n.storeHeaderIsland){let P=n.storeHeaderIsland.endsWith(` `)?n.storeHeaderIsland:`${n.storeHeaderIsland} -`;q.push({path:`parts/${Xt}.html`,content:P}),q.push({path:"templates/single-product.html",content:Wd()}),q.push({path:"templates/archive-product.html",content:zd()})}return q}function Kd(n){return!n.hasProducts||!n.rootFontSizeApplied?"":` +`;q.push({path:`parts/${er}.html`,content:P}),q.push({path:"templates/single-product.html",content:Jd()}),q.push({path:"templates/archive-product.html",content:Vd()})}return q}function eg(n){return!n.hasProducts||!n.rootFontSizeApplied?"":` /* carry: keep WooCommerce buy-box legible under the source non-default root */ body.single-product .wp-block-woocommerce-product-price, body.single-product .price{font-size:1.8rem!important} body.single-product .wc-block-components-product-summary, body.single-product .wc-block-components-product-summary p, body.single-product .wp-block-woocommerce-product-summary{font-size:1.6rem!important} -`}function ol(n,e,t){let r=el(Ka(n,e),e);return t.size>0?pr(r,t):r}import{join as dg,resolve as gg}from"node:path";import{createWriteStream as og,mkdirSync as ag,readFileSync as ll,statSync as lg,unlinkSync as ul}from"fs";import{createHash as ug}from"crypto";import{basename as fl,extname as tr,resolve as Ns}from"path";import{pipeline as cg}from"stream/promises";var me=class extends Error{constructor(e){super(e),this.name="SsrfBlockedError"}},Pe=class extends Error{constructor(e){super(e),this.name="BodyTooLargeError"}};function Xd(n){let e=n;e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1));let t=e.indexOf("%");return t>=0&&(e=e.slice(0,t)),/^\d{1,3}(\.\d{1,3}){3}$/.test(e)&&e.split(".").map(s=>Number(s)).every(s=>s>=0&&s<=255)?{kind:"ipv4",value:e}:e.includes(":")&&/^[0-9a-fA-F:]+$/.test(e)?{kind:"ipv6",value:e.toLowerCase()}:null}function al(n){let[e,t]=n.split(".").map(r=>Number(r));return e===0||e===127||e===10||e===172&&t>=16&&t<=31||e===192&&t===168||e===169&&t===254||e===100&&t>=64&&t<=127||e>=224}function Zd(n){let e=n.toLowerCase();if(e==="::1"||e==="::"||e==="0:0:0:0:0:0:0:0"||e.startsWith("fc")||e.startsWith("fd")||e.startsWith("fe8")||e.startsWith("fe9")||e.startsWith("fea")||e.startsWith("feb"))return!0;let t=e.match(/::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);return t?al(t[1]):!1}function Xe(n){let e;try{e=new URL(n)}catch{throw new me(`unparseable URL: ${String(n).slice(0,200)}`)}if(e.protocol!=="http:"&&e.protocol!=="https:")throw new me(`disallowed URL scheme "${e.protocol}" (only http/https)`);let t=e.hostname.toLowerCase();if(!t)throw new me("URL has no host");let r=Xd(t);if(r){if(r.kind==="ipv4"?al(r.value):Zd(r.value))throw new me(`internal/loopback IP address not allowed: ${t}`);return e}if(t==="localhost"||t.endsWith(".localhost"))throw new me(`loopback hostname not allowed: ${t}`);if(t.endsWith(".local"))throw new me(`mDNS/.local hostname not allowed: ${t}`);if(!t.includes("."))throw new me(`bare single-label hostname not allowed: ${t}`);return e}async function ks(n,e={}){let t=e.timeoutMs??3e4,r=e.maxBytes??26214400,s=e.maxRedirects??5,i=e.fetchImpl??fetch,o=Xe(n).toString();for(let l=0;l<=s;l++){let a=await i(o,{signal:AbortSignal.timeout(t),redirect:"manual",headers:e.headers}),u=p=>{try{return a.headers?.get?.(p)??null}catch{return null}};if(a.status>=300&&a.status<400){let p=u("location");try{await a.body?.cancel()}catch{}if(!p)throw new Error(`redirect ${a.status} with no Location header`);if(l===s)throw new Error(`too many redirects (> ${s})`);let g=new URL(p,o).toString();o=Xe(g).toString();continue}let c=u("content-length");if(c){let p=Number(c);if(Number.isFinite(p)&&p>r){try{await a.body?.cancel()}catch{}throw new Pe(`response body ${p} bytes exceeds max ${r} (Content-Length)`)}}let f=await eg(a,r);return{finalUrl:o,status:a.status,headers:a.headers,body:f}}throw new Error(`too many redirects (> ${s})`)}async function eg(n,e){let t=n.body;if(t&&typeof t.getReader=="function"){let s=t.getReader(),i=[],o=0;try{for(;;){let{done:l,value:a}=await s.read();if(l)break;if(a){if(o+=a.byteLength,o>e){try{await s.cancel()}catch{}throw new Pe(`response body exceeds max ${e} bytes (streamed)`)}i.push(a)}}}finally{try{s.releaseLock()}catch{}}return Buffer.concat(i.map(l=>Buffer.from(l)))}let r=Buffer.from(await n.arrayBuffer());if(r.length>e)throw new Pe(`response body ${r.length} bytes exceeds max ${e}`);return r}import{Transform as fg}from"stream";import{readFileSync as tg,renameSync as rg,unlinkSync as ng}from"fs";function Ms(n){let e=Buffer.isBuffer(n)?n.toString("utf8"):n;return/<\s*(use|defs)[\s>/]/i.test(e)}var Wr=null;async function sg(){return Wr||(Wr=(async()=>(await ri()).chromium.launch({headless:!0}))().catch(n=>{throw Wr=null,n})),Wr}var ig=1e4;async function Ls(n,e,t=1024){let r=null,s=`${e}.tmp-${process.pid}-${Date.now()}`;try{let o=`data:image/svg+xml;base64,${tg(n).toString("base64")}`;r=await(await sg()).newContext({viewport:{width:t,height:t}}),await r.addInitScript(` +`}function ll(n,e,t){let r=rl(Za(n,e),e);return t.size>0?dr(r,t):r}import{join as Sg,resolve as xg}from"node:path";import{createWriteStream as dg,mkdirSync as gg,readFileSync as fl,statSync as mg,unlinkSync as pl}from"fs";import{createHash as yg}from"crypto";import{basename as dl,extname as nr,resolve as Fs}from"path";import{pipeline as vg}from"stream/promises";var me=class extends Error{constructor(e){super(e),this.name="SsrfBlockedError"}},Pe=class extends Error{constructor(e){super(e),this.name="BodyTooLargeError"}};function tg(n){let e=n;e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1));let t=e.indexOf("%");return t>=0&&(e=e.slice(0,t)),/^\d{1,3}(\.\d{1,3}){3}$/.test(e)&&e.split(".").map(s=>Number(s)).every(s=>s>=0&&s<=255)?{kind:"ipv4",value:e}:e.includes(":")&&/^[0-9a-fA-F:]+$/.test(e)?{kind:"ipv6",value:e.toLowerCase()}:null}function ul(n){let[e,t]=n.split(".").map(r=>Number(r));return e===0||e===127||e===10||e===172&&t>=16&&t<=31||e===192&&t===168||e===169&&t===254||e===100&&t>=64&&t<=127||e>=224}function rg(n){let e=n.toLowerCase();if(e==="::1"||e==="::"||e==="0:0:0:0:0:0:0:0"||e.startsWith("fc")||e.startsWith("fd")||e.startsWith("fe8")||e.startsWith("fe9")||e.startsWith("fea")||e.startsWith("feb"))return!0;let t=e.match(/::ffff:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);return t?ul(t[1]):!1}function Xe(n){let e;try{e=new URL(n)}catch{throw new me(`unparseable URL: ${String(n).slice(0,200)}`)}if(e.protocol!=="http:"&&e.protocol!=="https:")throw new me(`disallowed URL scheme "${e.protocol}" (only http/https)`);let t=e.hostname.toLowerCase();if(!t)throw new me("URL has no host");let r=tg(t);if(r){if(r.kind==="ipv4"?ul(r.value):rg(r.value))throw new me(`internal/loopback IP address not allowed: ${t}`);return e}if(t==="localhost"||t.endsWith(".localhost"))throw new me(`loopback hostname not allowed: ${t}`);if(t.endsWith(".local"))throw new me(`mDNS/.local hostname not allowed: ${t}`);if(!t.includes("."))throw new me(`bare single-label hostname not allowed: ${t}`);return e}async function Ms(n,e={}){let t=e.timeoutMs??3e4,r=e.maxBytes??26214400,s=e.maxRedirects??5,i=e.fetchImpl??fetch,o=Xe(n).toString();for(let l=0;l<=s;l++){let a=await i(o,{signal:AbortSignal.timeout(t),redirect:"manual",headers:e.headers}),u=p=>{try{return a.headers?.get?.(p)??null}catch{return null}};if(a.status>=300&&a.status<400){let p=u("location");try{await a.body?.cancel()}catch{}if(!p)throw new Error(`redirect ${a.status} with no Location header`);if(l===s)throw new Error(`too many redirects (> ${s})`);let g=new URL(p,o).toString();o=Xe(g).toString();continue}let c=u("content-length");if(c){let p=Number(c);if(Number.isFinite(p)&&p>r){try{await a.body?.cancel()}catch{}throw new Pe(`response body ${p} bytes exceeds max ${r} (Content-Length)`)}}let f=await ng(a,r);return{finalUrl:o,status:a.status,headers:a.headers,body:f}}throw new Error(`too many redirects (> ${s})`)}async function ng(n,e){let t=n.body;if(t&&typeof t.getReader=="function"){let s=t.getReader(),i=[],o=0;try{for(;;){let{done:l,value:a}=await s.read();if(l)break;if(a){if(o+=a.byteLength,o>e){try{await s.cancel()}catch{}throw new Pe(`response body exceeds max ${e} bytes (streamed)`)}i.push(a)}}}finally{try{s.releaseLock()}catch{}}return Buffer.concat(i.map(l=>Buffer.from(l)))}let r=Buffer.from(await n.arrayBuffer());if(r.length>e)throw new Pe(`response body ${r.length} bytes exceeds max ${e}`);return r}import{Transform as wg}from"stream";import{readFileSync as sg,renameSync as ig,unlinkSync as og}from"fs";import{basename as ag}from"path";function Ns(n){let e=Buffer.isBuffer(n)?n.toString("utf8"):n;return/<\s*(use|defs)[\s>/]/i.test(e)}var lg=3e4,ug=6e4,cl=1e4,Ze=null;function cg(){if(!Ze){let n=(async()=>(await si()).chromium.launch({headless:!0}))().catch(e=>{throw Ze===n&&(Ze=null),e});Ze=n}return Ze}var fg=n=>St(n.close(),cl,"svg raster browser close").catch(()=>{});function Ls(n){Ze===n&&(Ze=null,n.then(fg).catch(()=>{}))}var pg=1e4;async function Ds(n,e,t=1024){let r=cg(),s;try{s=await St(r,lg,"svg raster launch")}catch(i){return Ls(r),{ok:!1,error:i.message}}try{let i=await St(hg(s,n,e,t),ug,`svg raster ${ag(n)}`);return!i.ok&&!s.isConnected()&&Ls(r),i}catch(i){return Ls(r),{ok:!1,error:i.message}}}async function hg(n,e,t,r){let s=null,i=`${t}.tmp-${process.pid}-${Date.now()}`;try{let l=`data:image/svg+xml;base64,${sg(e).toString("base64")}`;s=await n.newContext({viewport:{width:r,height:r}}),await s.addInitScript(` if (typeof globalThis.__name === 'undefined') { globalThis.__name = function (fn) { return fn; }; } - `);let a=await r.newPage(),u=await a.evaluate(({src:y,timeoutMs:d})=>new Promise(m=>{let w=new Image,C=setTimeout(()=>m({loaded:!1,w:0,h:0}),d);w.onload=()=>{clearTimeout(C),m({loaded:!0,w:w.naturalWidth,h:w.naturalHeight})},w.onerror=()=>{clearTimeout(C),m({loaded:!1,w:0,h:0})},w.src=y}),{src:o,timeoutMs:ig});if(!u.loaded)return{ok:!1,error:"SVG failed to decode in Chromium (malformed or unsupported)"};let c=u.w>0?u.w:t,f=u.h>0?u.h:t,p=t/Math.max(c,f),g=Math.max(1,Math.round(c*p)),h=Math.max(1,Math.round(f*p));return await a.setViewportSize({width:g,height:h}),await a.setContent(`<!doctype html><html><body style="margin:0;padding:0"><img id="raster" src="${o}" style="display:block;width:${g}px;height:${h}px"></body></html>`,{waitUntil:"load"}),await a.locator("#raster").screenshot({path:s,type:"png",omitBackground:!0}),rg(s,e),{ok:!0,width:g,height:h}}catch(i){try{ng(s)}catch{}return{ok:!1,error:i.message}}finally{try{await r?.close()}catch{}}}function Ds(n,e){if(n||(n=`image-${Date.now()}`),!e.has(n))return e.set(n,1),n;let t=tr(n),r=t?n.slice(0,-t.length):n,s=e.get(n)+1,i=t?`${r}-${s}${t}`:`${r}-${s}`;for(;e.has(i);)s++,i=t?`${r}-${s}${t}`:`${r}-${s}`;return e.set(n,s),e.set(i,1),i}function Fs(n,e){let t=Ns(e)+"/",r=Ns(e,n);if(!r.startsWith(t)&&r!==Ns(e))throw new Error(`Path traversal detected: ${n}`);return r}function pl(n){if(!n)return n;let e=n;try{e=decodeURIComponent(n)}catch{}let t=tr(e),s=(t?e.slice(0,-t.length):e).normalize("NFKD").replace(/[^a-zA-Z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^[-.]+|[-.]+$/g,"")||"image",i=t.replace(/[^a-zA-Z0-9.]/g,"");return`${s}${i}`}function hl(n){let e=n.pathname,t=e.indexOf("/:/"),r=t>=0?e.slice(0,t):e;return pl(fl(r))}var pg=2e3;function dl(n){try{let e=new URL(n);if(!e.hostname.endsWith("wixstatic.com"))return n;let t=[...e.pathname.matchAll(/\bw_(\d+)/g)],r=[...e.pathname.matchAll(/\bh_(\d+)/g)];if(t.length===0&&r.length===0)return n;let s=t.length?Number(t[t.length-1][1]):0,i=r.length?Number(r[r.length-1][1]):0,o=Math.max(s,i);if(!o)return n;let l=Math.min(2,pg/o);return l<=1?n:(e.pathname=e.pathname.replace(/^(.*)\bw_(\d+)/,(a,u,c)=>`${u}w_${Math.round(Number(c)*l)}`).replace(/^(.*)\bh_(\d+)/,(a,u,c)=>`${u}h_${Math.round(Number(c)*l)}`),e.toString())}catch{return n}}function gl(n){switch(n.toLowerCase().split(";")[0].trim()){case"image/jpeg":case"image/jpg":return".jpg";case"image/png":return".png";case"image/gif":return".gif";case"image/webp":return".webp";case"image/avif":return".avif";case"image/svg+xml":return".svg";case"image/bmp":return".bmp";case"image/tiff":return".tiff";case"image/x-icon":case"image/vnd.microsoft.icon":return".ico";default:return""}}async function hg(n){let e=Xe(n).toString();for(let t=0;t<=5;t++){let r=await fetch(e,{signal:AbortSignal.timeout(3e4),redirect:"manual"});if(r.status>=300&&r.status<400){let s=r.headers.get("location");try{await r.body?.cancel()}catch{}if(!s)throw new Error(`redirect ${r.status} with no Location header`);if(t===5)throw new Error(`too many redirects (> ${5})`);e=Xe(new URL(s,e).toString()).toString();continue}return r}throw new Error(`too many redirects (> ${5})`)}var cl=new Map;async function Us(n,e,t,r,s){try{let i=Xe(n),o=hl(i)||`image-${Date.now()}.jpg`;ag(e,{recursive:!0});let l=await hg(dl(n));if(!l.ok)throw new Error(`HTTP ${l.status}`);let a=l.headers.get("content-length");if(a){let m=Number(a);if(Number.isFinite(m)&&m>26214400){try{await l.body?.cancel()}catch{}throw new Pe(`media body ${m} bytes exceeds max ${26214400} (Content-Length)`)}}if(!tr(o)){let m=l.headers.get("content-type")||"",w=gl(m);if(!w)throw await l.body?.cancel(),new Error(`non-image content-type "${m||"unknown"}" for extension-less URL`);o=`${o}${w}`}let u=Ds(o,t),c=Fs(u,e),f=0,p=new fg({transform(m,w,C){if(f+=m.length,f>26214400){C(new Pe(`media body exceeds max ${26214400} bytes (streamed)`));return}C(null,m)}}),g=og(c);try{await cg(l.body,p,g)}catch(m){try{ul(c)}catch{}throw m}let h=null;if(r){h=ll(c);let m=ug("sha256").update(h).digest("hex"),w=r.get(m);if(w){try{ul(c)}catch{}let C=cl.get(w);return{url:n,localPath:w,filename:fl(w),error:null,bytes:0,...C}}r.set(m,c)}let y;if(s?.svgRaster&&tr(u).toLowerCase()===".svg"){try{let m=h??ll(c),w=Ms(m),C=tr(u),I=Ds(`${u.slice(0,-C.length)}.png`,t),T=Fs(I,e),R=await Ls(c,T);y=R.ok?{svgRisky:w,rasterPath:T}:{svgRisky:w,rasterError:R.error}}catch(m){y={rasterError:m.message}}y&&cl.set(c,y)}let d=lg(c).size;return{url:n,localPath:c,filename:u,error:null,bytes:d,...y}}catch(i){return{url:n,localPath:null,filename:null,error:i.message,bytes:0}}}var mg=/^https?:\/\//i,ml=/<img\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi,yl=/\bsrcset\s*=\s*["']([^"']+)["']/gi,yg=/https?:\/\/[^\s"'<>\\]+/g;function vg(n){let e=new Set,t;for(ml.lastIndex=0;(t=ml.exec(n))!==null;)mg.test(t[1])&&e.add(t[1]);for(yl.lastIndex=0;(t=yl.exec(n))!==null;){let r,s=new RegExp(yg.source,"g");for(;(r=s.exec(t[1]))!==null;)e.add(r[0])}return[...e]}function wg(n,e,t){let r=[],s=new Set,i=new Set;for(let o of n)for(let l of vg(o)){if(t.has(l)||i.has(l))continue;let a=yt(l);if(a){if(e.has(a)||s.has(a))continue;s.add(a)}i.add(l),r.push(l)}return r}async function vl(n,e){let t=cr.load(n),r=new Set,s=new Set;for(let[f,p]of t.list()){if(p.status!=="success")continue;s.add(f);let g=yt(f);g&&r.add(g)}let i=wg(e,r,s);if(i.length===0)return{downloaded:0,failed:[]};let o=dg(gg(n),"media"),l=new Map,a=new Map,u=0,c=[];for(let f of i){let p=await Us(f,o,l,a);if(!p.error&&p.localPath)t.markSuccess(f,p.localPath),u++;else{let g=p.error??"unknown download error";t.markFailure(f,g),c.push({url:f,error:g})}}return t.flush(),{downloaded:u,failed:c}}import{mkdirSync as bg,writeFileSync as _g,existsSync as wl,copyFileSync as Sg}from"node:fs";import{join as Gr,relative as xg,dirname as Eg}from"node:path";var Og=/@font-face\s*\{[^{}]*\}/gi;function Cg(n){let e;try{e=new URL(n.startsWith("//")?`https:${n}`:n).pathname}catch{e=n}return e.replace(/^\/+/,"").replace(/[^a-zA-Z0-9._-]/g,"_")||"font"}function Pg(n,e){if(!e)return null;let t=/\/wp-content\/uploads\/(.+)$/.exec(n);return t?Gr(e,"wp-content","uploads",t[1]):null}async function bl(n,e,t={}){let r=e.filter(h=>h.path.endsWith(".css"));if(r.length===0)return{files:e,downloaded:0,failed:[],fontFacesStripped:0};let s=r.map(h=>h.content.replace(Og," ")).join(` + `);let a=await s.newPage(),u=await a.evaluate(({src:y,timeoutMs:d})=>new Promise(m=>{let w=new Image,C=setTimeout(()=>m({loaded:!1,w:0,h:0}),d);w.onload=()=>{clearTimeout(C),m({loaded:!0,w:w.naturalWidth,h:w.naturalHeight})},w.onerror=()=>{clearTimeout(C),m({loaded:!1,w:0,h:0})},w.src=y}),{src:l,timeoutMs:pg});if(!u.loaded)return{ok:!1,error:"SVG failed to decode in Chromium (malformed or unsupported)"};let c=u.w>0?u.w:r,f=u.h>0?u.h:r,p=r/Math.max(c,f),g=Math.max(1,Math.round(c*p)),h=Math.max(1,Math.round(f*p));return await a.setViewportSize({width:g,height:h}),await a.setContent(`<!doctype html><html><body style="margin:0;padding:0"><img id="raster" src="${l}" style="display:block;width:${g}px;height:${h}px"></body></html>`,{waitUntil:"load"}),await a.locator("#raster").screenshot({path:i,type:"png",omitBackground:!0}),ig(i,t),{ok:!0,width:g,height:h}}catch(o){try{og(i)}catch{}return{ok:!1,error:o.message}}finally{s&&await St(s.close(),cl,"svg raster context close").catch(()=>{})}}function Us(n,e){if(n||(n=`image-${Date.now()}`),!e.has(n))return e.set(n,1),n;let t=nr(n),r=t?n.slice(0,-t.length):n,s=e.get(n)+1,i=t?`${r}-${s}${t}`:`${r}-${s}`;for(;e.has(i);)s++,i=t?`${r}-${s}${t}`:`${r}-${s}`;return e.set(n,s),e.set(i,1),i}function js(n,e){let t=Fs(e)+"/",r=Fs(e,n);if(!r.startsWith(t)&&r!==Fs(e))throw new Error(`Path traversal detected: ${n}`);return r}function gl(n){if(!n)return n;let e=n;try{e=decodeURIComponent(n)}catch{}let t=nr(e),s=(t?e.slice(0,-t.length):e).normalize("NFKD").replace(/[^a-zA-Z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^[-.]+|[-.]+$/g,"")||"image",i=t.replace(/[^a-zA-Z0-9.]/g,"");return`${s}${i}`}function ml(n){let e=n.pathname,t=e.indexOf("/:/"),r=t>=0?e.slice(0,t):e;return gl(dl(r))}var bg=2e3;function yl(n){try{let e=new URL(n);if(!e.hostname.endsWith("wixstatic.com"))return n;let t=[...e.pathname.matchAll(/\bw_(\d+)/g)],r=[...e.pathname.matchAll(/\bh_(\d+)/g)];if(t.length===0&&r.length===0)return n;let s=t.length?Number(t[t.length-1][1]):0,i=r.length?Number(r[r.length-1][1]):0,o=Math.max(s,i);if(!o)return n;let l=Math.min(2,bg/o);return l<=1?n:(e.pathname=e.pathname.replace(/^(.*)\bw_(\d+)/,(a,u,c)=>`${u}w_${Math.round(Number(c)*l)}`).replace(/^(.*)\bh_(\d+)/,(a,u,c)=>`${u}h_${Math.round(Number(c)*l)}`),e.toString())}catch{return n}}function vl(n){switch(n.toLowerCase().split(";")[0].trim()){case"image/jpeg":case"image/jpg":return".jpg";case"image/png":return".png";case"image/gif":return".gif";case"image/webp":return".webp";case"image/avif":return".avif";case"image/svg+xml":return".svg";case"image/bmp":return".bmp";case"image/tiff":return".tiff";case"image/x-icon":case"image/vnd.microsoft.icon":return".ico";default:return""}}async function _g(n){let e=Xe(n).toString();for(let t=0;t<=5;t++){let r=await fetch(e,{signal:AbortSignal.timeout(3e4),redirect:"manual"});if(r.status>=300&&r.status<400){let s=r.headers.get("location");try{await r.body?.cancel()}catch{}if(!s)throw new Error(`redirect ${r.status} with no Location header`);if(t===5)throw new Error(`too many redirects (> ${5})`);e=Xe(new URL(s,e).toString()).toString();continue}return r}throw new Error(`too many redirects (> ${5})`)}var hl=new Map;async function $s(n,e,t,r,s){try{let i=Xe(n),o=ml(i)||`image-${Date.now()}.jpg`;gg(e,{recursive:!0});let l=await _g(yl(n));if(!l.ok)throw new Error(`HTTP ${l.status}`);let a=l.headers.get("content-length");if(a){let m=Number(a);if(Number.isFinite(m)&&m>26214400){try{await l.body?.cancel()}catch{}throw new Pe(`media body ${m} bytes exceeds max ${26214400} (Content-Length)`)}}if(!nr(o)){let m=l.headers.get("content-type")||"",w=vl(m);if(!w)throw await l.body?.cancel(),new Error(`non-image content-type "${m||"unknown"}" for extension-less URL`);o=`${o}${w}`}let u=Us(o,t),c=js(u,e),f=0,p=new wg({transform(m,w,C){if(f+=m.length,f>26214400){C(new Pe(`media body exceeds max ${26214400} bytes (streamed)`));return}C(null,m)}}),g=dg(c);try{await vg(l.body,p,g)}catch(m){try{pl(c)}catch{}throw m}let h=null;if(r){h=fl(c);let m=yg("sha256").update(h).digest("hex"),w=r.get(m);if(w){try{pl(c)}catch{}let C=hl.get(w);return{url:n,localPath:w,filename:dl(w),error:null,bytes:0,...C}}r.set(m,c)}let y;if(s?.svgRaster&&nr(u).toLowerCase()===".svg"){try{let m=h??fl(c),w=Ns(m),C=nr(u),I=Us(`${u.slice(0,-C.length)}.png`,t),T=js(I,e),A=await Ds(c,T);y=A.ok?{svgRisky:w,rasterPath:T}:{svgRisky:w,rasterError:A.error}}catch(m){y={rasterError:m.message}}y&&hl.set(c,y)}let d=mg(c).size;return{url:n,localPath:c,filename:u,error:null,bytes:d,...y}}catch(i){return{url:n,localPath:null,filename:null,error:i.message,bytes:0}}}var Eg=/^https?:\/\//i,wl=/<img\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi,bl=/\bsrcset\s*=\s*["']([^"']+)["']/gi,Og=/https?:\/\/[^\s"'<>\\]+/g;function Cg(n){let e=new Set,t;for(wl.lastIndex=0;(t=wl.exec(n))!==null;)Eg.test(t[1])&&e.add(t[1]);for(bl.lastIndex=0;(t=bl.exec(n))!==null;){let r,s=new RegExp(Og.source,"g");for(;(r=s.exec(t[1]))!==null;)e.add(r[0])}return[...e]}function Pg(n,e,t){let r=[],s=new Set,i=new Set;for(let o of n)for(let l of Cg(o)){if(t.has(l)||i.has(l))continue;let a=vt(l);if(a){if(e.has(a)||s.has(a))continue;s.add(a)}i.add(l),r.push(l)}return r}async function _l(n,e){let t=pr.load(n),r=new Set,s=new Set;for(let[f,p]of t.list()){if(p.status!=="success")continue;s.add(f);let g=vt(f);g&&r.add(g)}let i=Pg(e,r,s);if(i.length===0)return{downloaded:0,failed:[]};let o=Sg(xg(n),"media"),l=new Map,a=new Map,u=0,c=[];for(let f of i){let p=await $s(f,o,l,a);if(!p.error&&p.localPath)t.markSuccess(f,p.localPath),u++;else{let g=p.error??"unknown download error";t.markFailure(f,g),c.push({url:f,error:g})}}return t.flush(),{downloaded:u,failed:c}}import{mkdirSync as Tg,writeFileSync as Ig,existsSync as Sl,copyFileSync as Rg}from"node:fs";import{join as Vr,relative as Ag,dirname as kg}from"node:path";var Mg=/@font-face\s*\{[^{}]*\}/gi;function Lg(n){let e;try{e=new URL(n.startsWith("//")?`https:${n}`:n).pathname}catch{e=n}return e.replace(/^\/+/,"").replace(/[^a-zA-Z0-9._-]/g,"_")||"font"}function Ng(n,e){if(!e)return null;let t=/\/wp-content\/uploads\/(.+)$/.exec(n);return t?Vr(e,"wp-content","uploads",t[1]):null}async function xl(n,e,t={}){let r=e.filter(h=>h.path.endsWith(".css"));if(r.length===0)return{files:e,downloaded:0,failed:[],fontFacesStripped:0};let s=r.map(h=>h.content.replace(Mg," ")).join(` `)+(t.usageExtra?` `+t.usageExtra.join(` -`):""),i=new Map,o=new Set,l=0;for(let h of r){let y=Zs(h.content,s);i.set(h.path,ei(y.css)),y.keptUrls.forEach(d=>o.add(d)),l+=y.stripped}let a=()=>e.map(h=>i.has(h.path)?{...h,content:i.get(h.path)}:h);if(o.size===0)return{files:a(),downloaded:0,failed:[],fontFacesStripped:l};let u=Gr(n,"assets","fonts"),c=new Map,f=[],p=0;for(let h of o){let y=Cg(h),d=Gr(u,y);try{if(wl(d)){c.set(h,y);continue}bg(u,{recursive:!0});let m=Pg(h,t.wpRoot);if(m){if(!wl(m))throw new Error(`local uploads file missing: ${m}`);Sg(m,d)}else{let w=h.startsWith("//")?`https:${h}`:h,C=await ks(w,{timeoutMs:t.timeoutMs??3e4,fetchImpl:t.fetchImpl});if(C.status<200||C.status>=300)throw new Error(`HTTP ${C.status}`);if(!C.body||C.body.length===0)throw new Error("empty response body");_g(d,C.body)}c.set(h,y),p++}catch(m){f.push({url:h,error:m.message})}}return{files:e.map(h=>{if(!i.has(h.path))return h;let y=i.get(h.path),d=xg(Eg(h.path),Gr("assets","fonts")).split(/[\\/]/).join("/");for(let[m,w]of c)y=y.split(m).join(`${d}/${w}`);return{...h,content:y}}),downloaded:p,failed:f,fontFacesStripped:l}}var _l=/<img\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi,Sl=/\bsrcset\s*=\s*["']([^"']+)["']/gi,xl=/url\(\s*['"]?([^'")]+?)['"]?\s*\)/gi,Tg=/(?:https?:)?\/\/[^\s"'<>\\]+/g;function Ig(n){let e=n.startsWith("//")?`https:${n}`:n;try{let t=new URL(e);return/^https?:$/i.test(t.protocol)?t.hostname.toLowerCase():null}catch{return null}}function Ag(n){return n==="localhost"||n==="127.0.0.1"||n==="[::1]"}function El(n){let e=new Set,t=[],r=i=>{let o=i.trim();if(!/^(?:https?:)?\/\//i.test(o))return;let l=Ig(o);!l||Ag(l)||e.has(o)||(e.add(o),t.push({url:o,host:l}))};for(let i of n){if(!i)continue;let o;for(_l.lastIndex=0;(o=_l.exec(i))!==null;)r(o[1]);for(Sl.lastIndex=0;(o=Sl.exec(i))!==null;){let l=new RegExp(Tg.source,"g"),a;for(;(a=l.exec(o[1]))!==null;)r(a[0])}for(xl.lastIndex=0;(o=xl.exec(i))!==null;)r(o[1])}let s={};for(let i of t)s[i.host]=(s[i.host]??0)+1;return{refs:t,byHost:s,samples:t.slice(0,10).map(i=>i.url)}}var Rg=async n=>{let e=await fetch(n);if(!e.ok)throw new Error(`${e.status} ${n}`);let t=e.headers.get("content-type")??"";if(t&&!/css|text\/plain/i.test(t))throw new Error(`non-CSS content-type (${t}) for ${n}`);return e.text()};async function Ol(n){let e=n.fetcher??Rg,t=ee(n.html),r=new Set,s=[];t('link[rel="stylesheet"]').each((l,a)=>{let u=t(a).attr("href");if(u)try{let c=new URL(u,n.baseUrl).toString();r.has(c)||(r.add(c),s.push(c))}catch{}});let i=[];return n.inlineStyleText.trim()&&i.push(n.inlineStyleText),(await Promise.allSettled(s.map(l=>e(l)))).forEach((l,a)=>{l.status==="fulfilled"?i.push(l.value):n.onError?.(s[a],l.reason)}),i.join(` +`):""),i=new Map,o=new Set,l=0;for(let h of r){let y=ti(h.content,s);i.set(h.path,ri(y.css)),y.keptUrls.forEach(d=>o.add(d)),l+=y.stripped}let a=()=>e.map(h=>i.has(h.path)?{...h,content:i.get(h.path)}:h);if(o.size===0)return{files:a(),downloaded:0,failed:[],fontFacesStripped:l};let u=Vr(n,"assets","fonts"),c=new Map,f=[],p=0;for(let h of o){let y=Lg(h),d=Vr(u,y);try{if(Sl(d)){c.set(h,y);continue}Tg(u,{recursive:!0});let m=Ng(h,t.wpRoot);if(m){if(!Sl(m))throw new Error(`local uploads file missing: ${m}`);Rg(m,d)}else{let w=h.startsWith("//")?`https:${h}`:h,C=await Ms(w,{timeoutMs:t.timeoutMs??3e4,fetchImpl:t.fetchImpl});if(C.status<200||C.status>=300)throw new Error(`HTTP ${C.status}`);if(!C.body||C.body.length===0)throw new Error("empty response body");Ig(d,C.body)}c.set(h,y),p++}catch(m){f.push({url:h,error:m.message})}}return{files:e.map(h=>{if(!i.has(h.path))return h;let y=i.get(h.path),d=Ag(kg(h.path),Vr("assets","fonts")).split(/[\\/]/).join("/");for(let[m,w]of c)y=y.split(m).join(`${d}/${w}`);return{...h,content:y}}),downloaded:p,failed:f,fontFacesStripped:l}}var El=/<img\b[^>]*\bsrc\s*=\s*["']([^"']+)["']/gi,Ol=/\bsrcset\s*=\s*["']([^"']+)["']/gi,Cl=/url\(\s*['"]?([^'")]+?)['"]?\s*\)/gi,Dg=/(?:https?:)?\/\/[^\s"'<>\\]+/g;function Fg(n){let e=n.startsWith("//")?`https:${n}`:n;try{let t=new URL(e);return/^https?:$/i.test(t.protocol)?t.hostname.toLowerCase():null}catch{return null}}function Ug(n){return n==="localhost"||n==="127.0.0.1"||n==="[::1]"}function Pl(n){let e=new Set,t=[],r=i=>{let o=i.trim();if(!/^(?:https?:)?\/\//i.test(o))return;let l=Fg(o);!l||Ug(l)||e.has(o)||(e.add(o),t.push({url:o,host:l}))};for(let i of n){if(!i)continue;let o;for(El.lastIndex=0;(o=El.exec(i))!==null;)r(o[1]);for(Ol.lastIndex=0;(o=Ol.exec(i))!==null;){let l=new RegExp(Dg.source,"g"),a;for(;(a=l.exec(o[1]))!==null;)r(a[0])}for(Cl.lastIndex=0;(o=Cl.exec(i))!==null;)r(o[1])}let s={};for(let i of t)s[i.host]=(s[i.host]??0)+1;return{refs:t,byHost:s,samples:t.slice(0,10).map(i=>i.url)}}var jg=async n=>{let e=await fetch(n);if(!e.ok)throw new Error(`${e.status} ${n}`);let t=e.headers.get("content-type")??"";if(t&&!/css|text\/plain/i.test(t))throw new Error(`non-CSS content-type (${t}) for ${n}`);return e.text()};async function Tl(n){let e=n.fetcher??jg,t=ee(n.html),r=new Set,s=[];t('link[rel="stylesheet"]').each((l,a)=>{let u=t(a).attr("href");if(u)try{let c=new URL(u,n.baseUrl).toString();r.has(c)||(r.add(c),s.push(c))}catch{}});let i=[];return n.inlineStyleText.trim()&&i.push(n.inlineStyleText),(await Promise.allSettled(s.map(l=>e(l)))).forEach((l,a)=>{l.status==="fulfilled"?i.push(l.value):n.onError?.(s[a],l.reason)}),i.join(` -`)}import{existsSync as Cl,readFileSync as Pl}from"node:fs";import{join as Tl,resolve as Il}from"node:path";function Al(n,e){let t=[];try{let s=Tl(Il(n),"redirect-map.json");if(Cl(s)){let i=JSON.parse(Pl(s,"utf8"));Array.isArray(i)&&(t=i)}}catch{}t=t.concat(kg(n));let r=new Set;for(let s of e)try{r.add(new URL(s).hostname)}catch{}return di(t,{siteOrigins:[...r]})}function kg(n){let e=[];try{let t=Tl(Il(n),"products.jsonl");if(!Cl(t))return e;let r=new Set;for(let s of Pl(t,"utf8").split(` -`)){if(!s.trim())continue;let i;try{i=JSON.parse(s)}catch{continue}if(!i.sourceUrl||!i.name)continue;let o;try{o=new URL(i.sourceUrl).pathname}catch{continue}let l=Mg(i.name);!l||r.has(o)||(r.add(o),e.push({from:o,to:`/product/${l}/`}))}}catch{}return e}function Mg(n){return n.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/['"‘’“”]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}import{copyFileSync as $s,existsSync as vt,mkdirSync as Vr,readFileSync as Lg,statSync as Ng,writeFileSync as Dg}from"node:fs";import{dirname as Fl,join as se,resolve as Jr}from"node:path";import{execFile as Fg}from"node:child_process";import{promisify as Ug}from"node:util";import{fileURLToPath as jg}from"node:url";var $g=Ug(Fg),qg=Jr(Fl(jg(new URL("../../src/lib/streaming/media-install.ts",import.meta.url).href)),"..","preview","scripts","install-media.php"),Rl="/wordpress",kl=".dla-scripts",Ml=".dla-scripts/payloads",Bg=0;async function Ul(n){let e={installed:[],skipped:[],errors:[],svg:{svgUploaded:0,svgSubstituted:0,svgFailed:0,safeSvgEnsured:!1}},t=cr.load(n.outputDir),r=se(Jr(n.outputDir),"media"),s=[];for(let[h,y]of t.list()){if(y.status!=="success"||!y.localPath){e.skipped.push({sourceUrl:h,reason:"no-local-file"});continue}if(typeof y.wpPostId=="number"){y.localUrl?e.installed.push({sourceUrl:h,postId:y.wpPostId,localUrl:y.localUrl,localPath:y.localPath??""}):e.skipped.push({sourceUrl:h,reason:"already-installed"});continue}let d=nr(y.localPath),m=se(r,d);if(!vt(m)){e.skipped.push({sourceUrl:h,reason:"no-local-file"});continue}let w;try{w=Ng(m).mtime}catch{e.skipped.push({sourceUrl:h,reason:"no-local-file"});continue}let C=String(w.getFullYear()).padStart(4,"0"),I=String(w.getMonth()+1).padStart(2,"0");s.push({url:h,stub:y,entry:{filename:d,year:C,month:I,sourceUrl:h},absPath:m})}if(s.length===0)return e;let i=s.filter(h=>/\.svg$/i.test(h.entry.filename));for(let h of i)h.svgOrigin=!0,h.rasterAbs=Hg(h.stub,r),h.stub.svgRisky===!0&&h.rasterAbs&&js(h);let o=i.filter(h=>!h.substituted);if(o.length>0){let h=await fr(jl(n.wpRoot),"safe-svg",zg(n));if(h.ok)e.svg.safeSvgEnsured=!0;else for(let y of o)y.rasterAbs?js(y):(y.dropped=!0,e.errors.push({sourceUrl:y.url,error:`safe-svg unavailable and no raster fallback (${h.error})`}))}let l=s.filter(h=>!h.dropped);if(l.length===0)return rr(e,i),e;let a=se(Jr(n.wpRoot),"wp-content","uploads");for(let h of l){let y=se(a,h.entry.year,h.entry.month),d=se(y,h.entry.filename);try{Vr(y,{recursive:!0}),vt(d)||$s(h.absPath,d)}catch(m){e.errors.push({sourceUrl:h.url,error:`copy: ${m.message}`})}}let u=l.filter(h=>!e.errors.find(y=>y.sourceUrl===h.url));if(u.length===0)return rr(e,i),e;let c;try{c=await Ll(n,u.map(h=>h.entry))}catch(h){for(let y of u)e.errors.push({sourceUrl:y.url,error:`wp eval-file install-media.php failed: ${Nl(h)}`});return rr(e,i),e}let f=Dl(c.stdout,c.resultHostPath);if(!f){for(let h of u)e.errors.push({sourceUrl:h.url,error:"install-media.php produced no parseable JSON response"});return rr(e,i),e}let p=[...f.results],g=[];for(let h of f.errors){let y=u.find(d=>d.url===h.sourceUrl);y?.svgOrigin&&!y.substituted&&y.rasterAbs?g.push(y):e.errors.push({sourceUrl:h.sourceUrl,error:h.error})}if(g.length>0){let h=[];for(let y of g){js(y);try{let d=se(a,y.entry.year,y.entry.month);Vr(d,{recursive:!0});let m=se(d,y.entry.filename);vt(m)||$s(y.absPath,m),h.push(y)}catch(d){e.errors.push({sourceUrl:y.url,error:`svg png retry copy: ${d.message}`})}}if(h.length>0)try{let y=await Ll(n,h.map(m=>m.entry)),d=Dl(y.stdout,y.resultHostPath);if(d){p.push(...d.results);for(let m of d.errors)e.errors.push({sourceUrl:m.sourceUrl,error:`svg png retry: ${m.error}`})}else for(let m of h)e.errors.push({sourceUrl:m.url,error:"svg png retry: install-media.php produced no parseable JSON response"})}catch(y){for(let d of h)e.errors.push({sourceUrl:d.url,error:`svg png retry failed: ${Nl(y)}`})}}for(let h of p){typeof h.postId=="number"&&h.postId>0&&t.recordWpPostId(h.sourceUrl,h.postId),h.localUrl&&t.recordLocalUrl(h.sourceUrl,h.localUrl);let y=t.get(h.sourceUrl);e.installed.push({sourceUrl:h.sourceUrl,postId:h.postId,localUrl:y?.localUrl??h.localUrl,localPath:y?.localPath??""})}return rr(e,i),e}function Hg(n,e){if(n.rasterPath){let t=se(e,nr(n.rasterPath));return vt(t)?t:vt(n.rasterPath)?n.rasterPath:null}if(n.localPath&&/\.svg$/i.test(n.localPath)){let t=se(e,nr(n.localPath).replace(/\.svg$/i,".png"));return vt(t)?t:null}return null}function js(n){n.entry.filename=nr(n.rasterAbs),n.absPath=n.rasterAbs,n.substituted=!0}function rr(n,e){for(let t of e)n.installed.some(s=>s.sourceUrl===t.url)?t.substituted?n.svg.svgSubstituted+=1:n.svg.svgUploaded+=1:n.svg.svgFailed+=1}function zg(n){let e=n._studioBin??"studio",t=n._execFile??$l;return(r,s)=>t(e,["wp","--path",r,...s]).then(i=>i.stdout)}async function Ll(n,e){let t=jl(n.wpRoot),r=se(t,kl),s=se(t,Ml);Vr(r,{recursive:!0}),Vr(s,{recursive:!0});let i=se(r,"install-media.php");$s(qg,i);let o=`install-media-${Date.now()}-${process.pid}-${++Bg}.json`,l=se(s,o);Dg(l,JSON.stringify(e),"utf8");let a=`${Rl}/${kl}/install-media.php`,u=`${Rl}/${Ml}/${o}`,c=n._studioBin??"studio";return{stdout:(await(n._execFile??$l)(c,["wp","--path",t,"eval-file",a,u])).stdout,resultHostPath:`${l}.result.json`}}function jl(n){let e=Jr(n);return nr(e)==="wordpress"?Fl(e):e}function $l(n,e){let t={timeout:3e5,maxBuffer:52428800};return(n==="studio"?bt(e,t):$g(n,e,t)).then(({stdout:s,stderr:i})=>({stdout:String(s),stderr:String(i)}))}function Nl(n){let e=n,t=[e?.message?e.message.trim():String(n)];return e?.stderr?.trim()&&t.push(`stderr: ${e.stderr.trim().slice(-1e3)}`),e?.stdout?.trim()&&t.push(`stdout: ${e.stdout.trim().slice(-1e3)}`),t.join(" | ")}function Dl(n,e){let t="DLA_INSTALL_MEDIA_JSON_BEGIN",r="DLA_INSTALL_MEDIA_JSON_END",s=n.indexOf(t),i=n.indexOf(r);if(s<0||i<0||i<=s)return null;let o=n.slice(s+t.length,i).trim(),l=o;try{let a=JSON.parse(o);if(a&&typeof a.resultFile=="string"){let u=e??a.resultFile;try{l=Lg(u,"utf8")}catch{return null}}}catch{}try{let a=JSON.parse(l);return!a||!Array.isArray(a.results)||!Array.isArray(a.errors)?null:a}catch{return null}}function nr(n){let e=n.replace(/[\\/]+$/,""),t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>=0?e.slice(t+1):e}async function ql(n){let e=await Ul(n),t=new Map;for(let r of e.installed)t.set(r.sourceUrl,r.localUrl);return{mediaUrlMap:t,result:e}}var Wg=new Set(["a","strong","em","b","i","br","span"]),Gg=new Set(["button","input","select","textarea","svg"]),zl=new Set([...Gg,"script","style","noscript"]);function Vg(n){let e={};for(let[t,r]of Object.entries(n.attribs??{}))e[t]=r;return e}function Yr(n){return n.sourceCodeLocation}function Wl(n,e){return n.html(e)??""}function Bl(n,e,t){let r=Yr(t);if(r)return e.slice(r.startOffset,r.endOffset);let s=t.startIndex,i=t.endIndex;return typeof s!="number"||typeof i!="number"?Wl(n,t):e.slice(s,i+1)}function Jg(n,e,t){let r=Yr(t);if(r?.startTag&&r.endTag)return e.slice(r.startTag.endOffset,r.endTag.startOffset);let s=t.children[0],i=t.children[t.children.length-1];if(!s||!i)return"";let o=Yr(s),l=Yr(i);if(o&&l)return e.slice(o.startOffset,l.endOffset);let a=s.startIndex,u=i.endIndex;return typeof a!="number"||typeof u!="number"?t.children.map(c=>Wl(n,c)).join(""):e.slice(a,u+1)}function Gl(n){return(n.tagName||n.name||"").toLowerCase()}function Vl(n){if(ur(n))return!0;if(!lr(n))return!1;let e=Gl(n);return!Wg.has(e)||zl.has(e)||e==="img"?!1:n.children.every(Vl)}function Jl(n){return ur(n)?/\S/.test(n.data):lr(n)?n.children.some(Jl):!1}function Yg(n){return n.children.every(Vl)?n.children.some(Jl):!1}function Hl(n){let e=`b${n.nextId}`;return n.nextId+=1,n.bindingCount+=1,e}function Yl(n,e,t,r){if(ur(t))return{kind:"text",text:t.data};if(t.type==="comment")return{kind:"raw",html:Bl(n,e,t)};if(!lr(t))return null;let s=Gl(t);if(zl.has(s))return{kind:"raw",html:Bl(n,e,t)};let i=Vg(t);if(s==="img")return{kind:"bindImage",id:Hl(r),attrs:i};if(Yg(t))return{kind:"bindText",id:Hl(r),tag:s,attrs:i,html:Jg(n,e,t)};let o=t.children.map(l=>Yl(n,e,l,r)).filter(l=>l!==null);return{kind:"element",tag:s,attrs:i,children:o}}function Ql(n){let e=ee(n,{sourceCodeLocationInfo:!0},!1),t={nextId:0,bindingCount:0};return{frame:e.root().contents().get().map(s=>Yl(e,n,s,t)).filter(s=>s!==null),bindingCount:t.bindingCount}}var Qg=String.raw`function analyzeHtmlToFrame(html) { +`)}import{existsSync as Il,readFileSync as Rl}from"node:fs";import{join as Al,resolve as kl}from"node:path";function Ml(n,e){let t=[];try{let s=Al(kl(n),"redirect-map.json");if(Il(s)){let i=JSON.parse(Rl(s,"utf8"));Array.isArray(i)&&(t=i)}}catch{}t=t.concat($g(n));let r=new Set;for(let s of e)try{r.add(new URL(s).hostname)}catch{}return mi(t,{siteOrigins:[...r]})}function $g(n){let e=[];try{let t=Al(kl(n),"products.jsonl");if(!Il(t))return e;let r=new Set;for(let s of Rl(t,"utf8").split(` +`)){if(!s.trim())continue;let i;try{i=JSON.parse(s)}catch{continue}if(!i.sourceUrl||!i.name)continue;let o;try{o=new URL(i.sourceUrl).pathname}catch{continue}let l=qg(i.name);!l||r.has(o)||(r.add(o),e.push({from:o,to:`/product/${l}/`}))}}catch{}return e}function qg(n){return n.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/['"‘’“”]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}import{copyFileSync as Bs,existsSync as wt,mkdirSync as Jr,readFileSync as Bg,statSync as Hg,writeFileSync as zg}from"node:fs";import{dirname as $l,join as se,resolve as Yr}from"node:path";import{execFile as Wg}from"node:child_process";import{promisify as Gg}from"node:util";import{fileURLToPath as Vg}from"node:url";var Jg=Gg(Wg),Yg=Yr($l(Vg(new URL("../../src/lib/streaming/media-install.ts",import.meta.url).href)),"..","preview","scripts","install-media.php"),Ll="/wordpress",Nl=".dla-scripts",Dl=".dla-scripts/payloads",Qg=0;async function ql(n){let e={installed:[],skipped:[],errors:[],svg:{svgUploaded:0,svgSubstituted:0,svgFailed:0,safeSvgEnsured:!1}},t=pr.load(n.outputDir),r=se(Yr(n.outputDir),"media"),s=[];for(let[h,y]of t.list()){if(y.status!=="success"||!y.localPath){e.skipped.push({sourceUrl:h,reason:"no-local-file"});continue}if(typeof y.wpPostId=="number"){y.localUrl?e.installed.push({sourceUrl:h,postId:y.wpPostId,localUrl:y.localUrl,localPath:y.localPath??""}):e.skipped.push({sourceUrl:h,reason:"already-installed"});continue}let d=ir(y.localPath),m=se(r,d);if(!wt(m)){e.skipped.push({sourceUrl:h,reason:"no-local-file"});continue}let w;try{w=Hg(m).mtime}catch{e.skipped.push({sourceUrl:h,reason:"no-local-file"});continue}let C=String(w.getFullYear()).padStart(4,"0"),I=String(w.getMonth()+1).padStart(2,"0");s.push({url:h,stub:y,entry:{filename:d,year:C,month:I,sourceUrl:h},absPath:m})}if(s.length===0)return e;let i=s.filter(h=>/\.svg$/i.test(h.entry.filename));for(let h of i)h.svgOrigin=!0,h.rasterAbs=Kg(h.stub,r),h.stub.svgRisky===!0&&h.rasterAbs&&qs(h);let o=i.filter(h=>!h.substituted);if(o.length>0){let h=await hr(Bl(n.wpRoot),"safe-svg",Xg(n));if(h.ok)e.svg.safeSvgEnsured=!0;else for(let y of o)y.rasterAbs?qs(y):(y.dropped=!0,e.errors.push({sourceUrl:y.url,error:`safe-svg unavailable and no raster fallback (${h.error})`}))}let l=s.filter(h=>!h.dropped);if(l.length===0)return sr(e,i),e;let a=se(Yr(n.wpRoot),"wp-content","uploads");for(let h of l){let y=se(a,h.entry.year,h.entry.month),d=se(y,h.entry.filename);try{Jr(y,{recursive:!0}),wt(d)||Bs(h.absPath,d)}catch(m){e.errors.push({sourceUrl:h.url,error:`copy: ${m.message}`})}}let u=l.filter(h=>!e.errors.find(y=>y.sourceUrl===h.url));if(u.length===0)return sr(e,i),e;let c;try{c=await Fl(n,u.map(h=>h.entry))}catch(h){for(let y of u)e.errors.push({sourceUrl:y.url,error:`wp eval-file install-media.php failed: ${Ul(h)}`});return sr(e,i),e}let f=jl(c.stdout,c.resultHostPath);if(!f){for(let h of u)e.errors.push({sourceUrl:h.url,error:"install-media.php produced no parseable JSON response"});return sr(e,i),e}let p=[...f.results],g=[];for(let h of f.errors){let y=u.find(d=>d.url===h.sourceUrl);y?.svgOrigin&&!y.substituted&&y.rasterAbs?g.push(y):e.errors.push({sourceUrl:h.sourceUrl,error:h.error})}if(g.length>0){let h=[];for(let y of g){qs(y);try{let d=se(a,y.entry.year,y.entry.month);Jr(d,{recursive:!0});let m=se(d,y.entry.filename);wt(m)||Bs(y.absPath,m),h.push(y)}catch(d){e.errors.push({sourceUrl:y.url,error:`svg png retry copy: ${d.message}`})}}if(h.length>0)try{let y=await Fl(n,h.map(m=>m.entry)),d=jl(y.stdout,y.resultHostPath);if(d){p.push(...d.results);for(let m of d.errors)e.errors.push({sourceUrl:m.sourceUrl,error:`svg png retry: ${m.error}`})}else for(let m of h)e.errors.push({sourceUrl:m.url,error:"svg png retry: install-media.php produced no parseable JSON response"})}catch(y){for(let d of h)e.errors.push({sourceUrl:d.url,error:`svg png retry failed: ${Ul(y)}`})}}for(let h of p){typeof h.postId=="number"&&h.postId>0&&t.recordWpPostId(h.sourceUrl,h.postId),h.localUrl&&t.recordLocalUrl(h.sourceUrl,h.localUrl);let y=t.get(h.sourceUrl);e.installed.push({sourceUrl:h.sourceUrl,postId:h.postId,localUrl:y?.localUrl??h.localUrl,localPath:y?.localPath??""})}return sr(e,i),e}function Kg(n,e){if(n.rasterPath){let t=se(e,ir(n.rasterPath));return wt(t)?t:wt(n.rasterPath)?n.rasterPath:null}if(n.localPath&&/\.svg$/i.test(n.localPath)){let t=se(e,ir(n.localPath).replace(/\.svg$/i,".png"));return wt(t)?t:null}return null}function qs(n){n.entry.filename=ir(n.rasterAbs),n.absPath=n.rasterAbs,n.substituted=!0}function sr(n,e){for(let t of e)n.installed.some(s=>s.sourceUrl===t.url)?t.substituted?n.svg.svgSubstituted+=1:n.svg.svgUploaded+=1:n.svg.svgFailed+=1}function Xg(n){let e=n._studioBin??"studio",t=n._execFile??Hl;return(r,s)=>t(e,["wp","--path",r,...s]).then(i=>i.stdout)}async function Fl(n,e){let t=Bl(n.wpRoot),r=se(t,Nl),s=se(t,Dl);Jr(r,{recursive:!0}),Jr(s,{recursive:!0});let i=se(r,"install-media.php");Bs(Yg,i);let o=`install-media-${Date.now()}-${process.pid}-${++Qg}.json`,l=se(s,o);zg(l,JSON.stringify(e),"utf8");let a=`${Ll}/${Nl}/install-media.php`,u=`${Ll}/${Dl}/${o}`,c=n._studioBin??"studio";return{stdout:(await(n._execFile??Hl)(c,["wp","--path",t,"eval-file",a,u])).stdout,resultHostPath:`${l}.result.json`}}function Bl(n){let e=Yr(n);return ir(e)==="wordpress"?$l(e):e}function Hl(n,e){let t={timeout:3e5,maxBuffer:52428800};return(n==="studio"?_t(e,t):Jg(n,e,t)).then(({stdout:s,stderr:i})=>({stdout:String(s),stderr:String(i)}))}function Ul(n){let e=n,t=[e?.message?e.message.trim():String(n)];return e?.stderr?.trim()&&t.push(`stderr: ${e.stderr.trim().slice(-1e3)}`),e?.stdout?.trim()&&t.push(`stdout: ${e.stdout.trim().slice(-1e3)}`),t.join(" | ")}function jl(n,e){let t="DLA_INSTALL_MEDIA_JSON_BEGIN",r="DLA_INSTALL_MEDIA_JSON_END",s=n.indexOf(t),i=n.indexOf(r);if(s<0||i<0||i<=s)return null;let o=n.slice(s+t.length,i).trim(),l=o;try{let a=JSON.parse(o);if(a&&typeof a.resultFile=="string"){let u=e??a.resultFile;try{l=Bg(u,"utf8")}catch{return null}}}catch{}try{let a=JSON.parse(l);return!a||!Array.isArray(a.results)||!Array.isArray(a.errors)?null:a}catch{return null}}function ir(n){let e=n.replace(/[\\/]+$/,""),t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>=0?e.slice(t+1):e}async function zl(n){let e=await ql(n),t=new Map;for(let r of e.installed)t.set(r.sourceUrl,r.localUrl);return{mediaUrlMap:t,result:e}}var Zg=new Set(["a","strong","em","b","i","br","span"]),em=new Set(["button","input","select","textarea","svg"]),Vl=new Set([...em,"script","style","noscript"]);function tm(n){let e={};for(let[t,r]of Object.entries(n.attribs??{}))e[t]=r;return e}function Qr(n){return n.sourceCodeLocation}function Jl(n,e){return n.html(e)??""}function Wl(n,e,t){let r=Qr(t);if(r)return e.slice(r.startOffset,r.endOffset);let s=t.startIndex,i=t.endIndex;return typeof s!="number"||typeof i!="number"?Jl(n,t):e.slice(s,i+1)}function rm(n,e,t){let r=Qr(t);if(r?.startTag&&r.endTag)return e.slice(r.startTag.endOffset,r.endTag.startOffset);let s=t.children[0],i=t.children[t.children.length-1];if(!s||!i)return"";let o=Qr(s),l=Qr(i);if(o&&l)return e.slice(o.startOffset,l.endOffset);let a=s.startIndex,u=i.endIndex;return typeof a!="number"||typeof u!="number"?t.children.map(c=>Jl(n,c)).join(""):e.slice(a,u+1)}function Yl(n){return(n.tagName||n.name||"").toLowerCase()}function Ql(n){if(fr(n))return!0;if(!cr(n))return!1;let e=Yl(n);return!Zg.has(e)||Vl.has(e)||e==="img"?!1:n.children.every(Ql)}function Kl(n){return fr(n)?/\S/.test(n.data):cr(n)?n.children.some(Kl):!1}function nm(n){return n.children.every(Ql)?n.children.some(Kl):!1}function Gl(n){let e=`b${n.nextId}`;return n.nextId+=1,n.bindingCount+=1,e}function Xl(n,e,t,r){if(fr(t))return{kind:"text",text:t.data};if(t.type==="comment")return{kind:"raw",html:Wl(n,e,t)};if(!cr(t))return null;let s=Yl(t);if(Vl.has(s))return{kind:"raw",html:Wl(n,e,t)};let i=tm(t);if(s==="img")return{kind:"bindImage",id:Gl(r),attrs:i};if(nm(t))return{kind:"bindText",id:Gl(r),tag:s,attrs:i,html:rm(n,e,t)};let o=t.children.map(l=>Xl(n,e,l,r)).filter(l=>l!==null);return{kind:"element",tag:s,attrs:i,children:o}}function Zl(n){let e=ee(n,{sourceCodeLocationInfo:!0},!1),t={nextId:0,bindingCount:0};return{frame:e.root().contents().get().map(s=>Xl(e,n,s,t)).filter(s=>s!==null),bindingCount:t.bindingCount}}var sm=String.raw`function analyzeHtmlToFrame(html) { var INLINE_ALLOWED = new Set(['a', 'strong', 'em', 'b', 'i', 'br', 'span']); var RAW_TAGS = new Set(['button', 'input', 'select', 'textarea', 'svg', 'script', 'style', 'noscript']); @@ -291,7 +291,7 @@ body.single-product .wp-block-woocommerce-product-summary{font-size:1.6rem!impor return node !== null; }); return { frame: frame, bindingCount: state.bindingCount }; -}`;function Kl(){return Qg}var Xl=String.raw`function serializeFrameShared(frame) { +}`;function eu(){return sm}var tu=String.raw`function serializeFrameShared(frame) { var VOID_TAGS = new Set([ 'area', 'base', @@ -343,9 +343,9 @@ body.single-product .wp-block-woocommerce-product-summary{font-size:1.6rem!impor } return serializeNodes(frame); -}`,Kg=(0,eval)(`(${Xl})`);function Zl(){return Xl}function Xg(n){return Kg(n)}function Zg(n){return JSON.stringify(n).replace(/--/g,"\\u002d\\u002d")}function eu(n,e){let t={frame:n.frame};return e&&Object.keys(e).length>0&&(t.metadata=e),`<!-- wp:dla/editable-html ${Zg(t)} --> -${Xg(n.frame)} -<!-- /wp:dla/editable-html -->`}function em(n){return`<!-- wp:html${n.attrs&&Object.keys(n.attrs).length>0?` ${JSON.stringify(n.attrs)}`:""} -->${n.innerHTML}<!-- /wp:html -->`}function tm(n){return/<!--\s*\/?wp:/.test(n)}function tu(n){let e=[];Js(Vs(n),s=>{if(s.blockName!=="core/html"||tm(s.innerHTML))return;let i=Ql(s.innerHTML),o=s.attrs?.metadata,l=o&&typeof o=="object"?o:void 0;e.push({from:em(s),to:eu(i,l)})});let t=n,r=0;for(let s of e)t.includes(s.from)&&(t=t.replace(s.from,()=>s.to),r+=1);return{content:t,converted:r}}var rm="dla-editable-html",nm=`<?php +}`,im=(0,eval)(`(${tu})`);function ru(){return tu}function om(n){return im(n)}function am(n){return JSON.stringify(n).replace(/--/g,"\\u002d\\u002d")}function nu(n,e){let t={frame:n.frame};return e&&Object.keys(e).length>0&&(t.metadata=e),`<!-- wp:dla/editable-html ${am(t)} --> +${om(n.frame)} +<!-- /wp:dla/editable-html -->`}function lm(n){return`<!-- wp:html${n.attrs&&Object.keys(n.attrs).length>0?` ${JSON.stringify(n.attrs)}`:""} -->${n.innerHTML}<!-- /wp:html -->`}function um(n){return/<!--\s*\/?wp:/.test(n)}function su(n){let e=[];Qs(Ys(n),s=>{if(s.blockName!=="core/html"||um(s.innerHTML))return;let i=Zl(s.innerHTML),o=s.attrs?.metadata,l=o&&typeof o=="object"?o:void 0;e.push({from:lm(s),to:nu(i,l)})});let t=n,r=0;for(let s of e)t.includes(s.from)&&(t=t.replace(s.from,()=>s.to),r+=1);return{content:t,converted:r}}var cm="dla-editable-html",fm=`<?php /** * Plugin Name: DLA Editable HTML Block * Description: Editable HTML island block emitted by the data-liberation local-site converter. @@ -358,9 +358,9 @@ defined( 'ABSPATH' ) || exit; add_action( 'init', function () { register_block_type( __DIR__ . '/blocks/editable-html' ); } ); -`,sm=`<?php return array( 'dependencies' => array( 'wp-blocks', 'wp-block-editor', 'wp-element', 'wp-components' ), 'version' => '1.0.0' ); -`,im=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/editable-html",title:"Editable HTML",category:"design",description:"Editable carried HTML island with source-faithful static save output.",supports:{html:!1,customClassName:!1},attributes:{frame:{type:"array",default:[]}},editorScript:"file:./editor.js"},null," ")+` -`;function om(){return`( function ( blocks, blockEditor, element, components ) { +`,pm=`<?php return array( 'dependencies' => array( 'wp-blocks', 'wp-block-editor', 'wp-element', 'wp-components' ), 'version' => '1.0.0' ); +`,hm=JSON.stringify({$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"dla/editable-html",title:"Editable HTML",category:"design",description:"Editable carried HTML island with source-faithful static save output.",supports:{html:!1,customClassName:!1},attributes:{frame:{type:"array",default:[]}},editorScript:"file:./editor.js"},null," ")+` +`;function dm(){return`( function ( blocks, blockEditor, element, components ) { var el = element.createElement; var RawHTML = element.RawHTML; var Fragment = element.Fragment; @@ -371,8 +371,8 @@ add_action( 'init', function () { var PanelBody = components.PanelBody; var TextareaControl = components.TextareaControl; var Button = components.Button; - var serializeFrame = ${Zl()}; - var analyzeHtmlToFrame = ${Kl()}; + var serializeFrame = ${ru()}; + var analyzeHtmlToFrame = ${eu()}; function parseStyle( style ) { if ( ! style ) return undefined; @@ -520,15 +520,15 @@ add_action( 'init', function () { }, } ); } )( window.wp.blocks, window.wp.blockEditor, window.wp.element, window.wp.components ); -`}function ru(){return{slug:rm,files:[{relativePath:"plugin.php",content:nm},{relativePath:"blocks/editable-html/block.json",content:im},{relativePath:"blocks/editable-html/editor.js",content:om()},{relativePath:"blocks/editable-html/editor.asset.php",content:sm}]}}import{spawn as am,spawnSync as lm}from"node:child_process";import{existsSync as um}from"node:fs";import*as qs from"node:http";import{createRequire as cm}from"node:module";import{dirname as nu,join as Bs}from"node:path";import{fileURLToPath as fm}from"node:url";function su(n){try{let e=cm(Bs(n,"package.json"));return e.resolve("@wordpress/block-library/package.json"),e.resolve("jsdom/package.json"),!0}catch{return!1}}var iu=3201,pm=3e4,hm=500,dm=1e4,gm=1e4,Qr=class{child=null;port=iu;ready=!1;startPromise=null;log;constructor(e){this.log=e??(()=>{})}get isReady(){return this.ready}async start(e={}){if(!this.ready)return this.startPromise?this.startPromise:(this.port=e.port??iu,e.log&&(this.log=e.log),this.startPromise=this.startInner(e),this.startPromise)}async startInner(e){let t=fm(new URL("../../src/lib/streaming/block-fixer-client.ts",import.meta.url).href),r=Bs(t,"..","..","..",".."),s=Bs(r,"scripts","block-fixer","fix-server.js"),i=nu(s);if(!um(s)){this.log(`[block-fixer] server script missing at ${s} \u2014 fix() will passthrough`);return}if(!su(i)&&!this.installSidecarDeps(i))return;let o={...process.env,BLOCK_FIXER_PORT:String(this.port),BLOCK_FIXER_HOST:"127.0.0.1"};e.workers!==void 0&&(o.BLOCK_FIXER_WORKERS=String(e.workers)),this.child=am(process.execPath,[s],{cwd:nu(s),env:o,stdio:["ignore","ignore","pipe"],detached:!1}),this.child.stderr?.on("data",a=>{let u=a.toString("utf8");for(let c of u.split(` -`)){let f=c.trim();f&&f!=="Could not parse CSS stylesheet"&&this.log(f)}}),this.child.on("exit",(a,u)=>{this.ready=!1,this.log(`[block-fixer] subprocess exited (code=${a}, signal=${u})`)}),this.child.on("error",a=>{this.log(`[block-fixer] subprocess error: ${a.message}`)});let l=Date.now()+(e.healthTimeoutMs??pm);for(;Date.now()<l;){if(await this.healthOk()){this.ready=!0,this.log(`[block-fixer] ready on 127.0.0.1:${this.port}`);return}await new Promise(a=>setTimeout(a,hm))}this.log("[block-fixer] /health did not respond within timeout \u2014 fix() will passthrough")}installSidecarDeps(e){this.log(`[block-fixer] sidecar deps missing \u2014 running npm ci in ${e}`);let t=lm("npm",["ci","--ignore-scripts","--no-audit","--no-fund"],{cwd:e,stdio:["ignore","pipe","pipe"],encoding:"utf8",timeout:3e5,shell:process.platform==="win32"});if(t.status!==0||!su(e)){let r=(t.stderr||t.error?.message||"").trim().split(` -`).slice(-3).join(" ");return this.log(`[block-fixer] npm ci failed (${r||"unknown error"}) \u2014 fix() will passthrough. Retry manually: cd "${e}" && npm ci`),!1}return this.log("[block-fixer] sidecar deps installed"),!0}async stop(){let e=this.child;if(!e||e.exitCode!==null){this.child=null,this.ready=!1;return}return this.ready=!1,new Promise(t=>{let r=()=>{clearTimeout(s),this.child=null,t()};e.once("exit",r);try{e.kill("SIGTERM")}catch{}let s=setTimeout(()=>{try{e.kill("SIGKILL")}catch{}},gm);s.unref()})}async fix(e){if(e.length===0)return[];if(!this.ready)return e.map(t=>({html:t,changed:!1,fixedIssues:[]}));try{let t=JSON.stringify({items:e}),r=await this.postJson("/fix",t);if(r.status!==200)return this.log(`[block-fixer] /fix returned ${r.status}: ${r.body.slice(0,200)}`),e.map(i=>({html:i,changed:!1,fixedIssues:[]}));let s=JSON.parse(r.body);return!Array.isArray(s.results)||s.results.length!==e.length?(this.log("[block-fixer] /fix returned malformed body \u2014 falling back to passthrough"),e.map(i=>({html:i,changed:!1,fixedIssues:[]}))):s.results}catch(t){return this.log(`[block-fixer] /fix request failed: ${t.message}`),e.map(r=>({html:r,changed:!1,fixedIssues:[]}))}}async rawConvert(e){if(e.length===0)return[];let t=()=>({html:null,wpHtmlResidue:1/0});if(!this.ready)return e.map(t);try{let r=await this.postJson("/raw",JSON.stringify({items:e}));if(r.status!==200)return this.log(`[block-fixer] /raw returned ${r.status}: ${r.body.slice(0,200)}`),e.map(t);let s=JSON.parse(r.body);return!Array.isArray(s.results)||s.results.length!==e.length?(this.log("[block-fixer] /raw returned malformed body \u2014 passthrough"),e.map(t)):s.results}catch(r){return this.log(`[block-fixer] /raw request failed: ${r.message}`),e.map(t)}}async healthOk(){try{return(await this.getJson("/health")).status===200}catch{return!1}}getJson(e){return new Promise((t,r)=>{let s=qs.request({host:"127.0.0.1",port:this.port,method:"GET",path:e,timeout:2e3},i=>{let o=[];i.on("data",l=>o.push(l)),i.on("end",()=>t({status:i.statusCode??0,body:Buffer.concat(o).toString("utf8")}))});s.on("error",r),s.on("timeout",()=>{s.destroy(new Error("health request timed out"))}),s.end()})}postJson(e,t){return new Promise((r,s)=>{let i=Buffer.from(t,"utf8"),o=qs.request({host:"127.0.0.1",port:this.port,method:"POST",path:e,headers:{"Content-Type":"application/json","Content-Length":i.length},timeout:dm},l=>{let a=[];l.on("data",u=>a.push(u)),l.on("end",()=>r({status:l.statusCode??0,body:Buffer.concat(a).toString("utf8")}))});o.on("error",s),o.on("timeout",()=>{o.destroy(new Error("fix request timed out"))}),o.write(i),o.end()})}};function ym(n){let e=/<body[^>]*\bclass\s*=\s*["']([^"']*)["']/i.exec(n);return e?e[1].split(/\s+/).filter(Boolean):[]}function ou(n){if(!n.trim())return"";let e=ee(n),t="",r=e(".shopify-section-group-header-group");if(r.length)t=r.toArray().map(s=>e.html(s)).join(` +`}function iu(){return{slug:cm,files:[{relativePath:"plugin.php",content:fm},{relativePath:"blocks/editable-html/block.json",content:hm},{relativePath:"blocks/editable-html/editor.js",content:dm()},{relativePath:"blocks/editable-html/editor.asset.php",content:pm}]}}import{spawn as gm,spawnSync as mm}from"node:child_process";import{existsSync as ym}from"node:fs";import*as Hs from"node:http";import{createRequire as vm}from"node:module";import{dirname as ou,join as zs}from"node:path";import{fileURLToPath as wm}from"node:url";function au(n){try{let e=vm(zs(n,"package.json"));return e.resolve("@wordpress/block-library/package.json"),e.resolve("jsdom/package.json"),!0}catch{return!1}}var lu=3201,bm=3e4,_m=500,Sm=1e4,xm=1e4,Kr=class{child=null;port=lu;ready=!1;startPromise=null;log;constructor(e){this.log=e??(()=>{})}get isReady(){return this.ready}async start(e={}){if(!this.ready)return this.startPromise?this.startPromise:(this.port=e.port??lu,e.log&&(this.log=e.log),this.startPromise=this.startInner(e),this.startPromise)}async startInner(e){let t=wm(new URL("../../src/lib/streaming/block-fixer-client.ts",import.meta.url).href),r=zs(t,"..","..","..",".."),s=zs(r,"scripts","block-fixer","fix-server.js"),i=ou(s);if(!ym(s)){this.log(`[block-fixer] server script missing at ${s} \u2014 fix() will passthrough`);return}if(!au(i)&&!this.installSidecarDeps(i))return;let o={...process.env,BLOCK_FIXER_PORT:String(this.port),BLOCK_FIXER_HOST:"127.0.0.1"};e.workers!==void 0&&(o.BLOCK_FIXER_WORKERS=String(e.workers)),this.child=gm(process.execPath,[s],{cwd:ou(s),env:o,stdio:["ignore","ignore","pipe"],detached:!1}),this.child.stderr?.on("data",a=>{let u=a.toString("utf8");for(let c of u.split(` +`)){let f=c.trim();f&&f!=="Could not parse CSS stylesheet"&&this.log(f)}}),this.child.on("exit",(a,u)=>{this.ready=!1,this.log(`[block-fixer] subprocess exited (code=${a}, signal=${u})`)}),this.child.on("error",a=>{this.log(`[block-fixer] subprocess error: ${a.message}`)});let l=Date.now()+(e.healthTimeoutMs??bm);for(;Date.now()<l;){if(await this.healthOk()){this.ready=!0,this.log(`[block-fixer] ready on 127.0.0.1:${this.port}`);return}await new Promise(a=>setTimeout(a,_m))}this.log("[block-fixer] /health did not respond within timeout \u2014 fix() will passthrough")}installSidecarDeps(e){this.log(`[block-fixer] sidecar deps missing \u2014 running npm ci in ${e}`);let t=mm("npm",["ci","--ignore-scripts","--no-audit","--no-fund"],{cwd:e,stdio:["ignore","pipe","pipe"],encoding:"utf8",timeout:3e5,shell:process.platform==="win32"});if(t.status!==0||!au(e)){let r=(t.stderr||t.error?.message||"").trim().split(` +`).slice(-3).join(" ");return this.log(`[block-fixer] npm ci failed (${r||"unknown error"}) \u2014 fix() will passthrough. Retry manually: cd "${e}" && npm ci`),!1}return this.log("[block-fixer] sidecar deps installed"),!0}async stop(){let e=this.child;if(!e||e.exitCode!==null){this.child=null,this.ready=!1;return}return this.ready=!1,new Promise(t=>{let r=()=>{clearTimeout(s),this.child=null,t()};e.once("exit",r);try{e.kill("SIGTERM")}catch{}let s=setTimeout(()=>{try{e.kill("SIGKILL")}catch{}},xm);s.unref()})}async fix(e){if(e.length===0)return[];if(!this.ready)return e.map(t=>({html:t,changed:!1,fixedIssues:[]}));try{let t=JSON.stringify({items:e}),r=await this.postJson("/fix",t);if(r.status!==200)return this.log(`[block-fixer] /fix returned ${r.status}: ${r.body.slice(0,200)}`),e.map(i=>({html:i,changed:!1,fixedIssues:[]}));let s=JSON.parse(r.body);return!Array.isArray(s.results)||s.results.length!==e.length?(this.log("[block-fixer] /fix returned malformed body \u2014 falling back to passthrough"),e.map(i=>({html:i,changed:!1,fixedIssues:[]}))):s.results}catch(t){return this.log(`[block-fixer] /fix request failed: ${t.message}`),e.map(r=>({html:r,changed:!1,fixedIssues:[]}))}}async rawConvert(e){if(e.length===0)return[];let t=()=>({html:null,wpHtmlResidue:1/0});if(!this.ready)return e.map(t);try{let r=await this.postJson("/raw",JSON.stringify({items:e}));if(r.status!==200)return this.log(`[block-fixer] /raw returned ${r.status}: ${r.body.slice(0,200)}`),e.map(t);let s=JSON.parse(r.body);return!Array.isArray(s.results)||s.results.length!==e.length?(this.log("[block-fixer] /raw returned malformed body \u2014 passthrough"),e.map(t)):s.results}catch(r){return this.log(`[block-fixer] /raw request failed: ${r.message}`),e.map(t)}}async healthOk(){try{return(await this.getJson("/health")).status===200}catch{return!1}}getJson(e){return new Promise((t,r)=>{let s=Hs.request({host:"127.0.0.1",port:this.port,method:"GET",path:e,timeout:2e3},i=>{let o=[];i.on("data",l=>o.push(l)),i.on("end",()=>t({status:i.statusCode??0,body:Buffer.concat(o).toString("utf8")}))});s.on("error",r),s.on("timeout",()=>{s.destroy(new Error("health request timed out"))}),s.end()})}postJson(e,t){return new Promise((r,s)=>{let i=Buffer.from(t,"utf8"),o=Hs.request({host:"127.0.0.1",port:this.port,method:"POST",path:e,headers:{"Content-Type":"application/json","Content-Length":i.length},timeout:Sm},l=>{let a=[];l.on("data",u=>a.push(u)),l.on("end",()=>r({status:l.statusCode??0,body:Buffer.concat(a).toString("utf8")}))});o.on("error",s),o.on("timeout",()=>{o.destroy(new Error("fix request timed out"))}),o.write(i),o.end()})}};function Om(n){let e=/<body[^>]*\bclass\s*=\s*["']([^"']*)["']/i.exec(n);return e?e[1].split(/\s+/).filter(Boolean):[]}function uu(n){if(!n.trim())return"";let e=ee(n),t="",r=e(".shopify-section-group-header-group");if(r.length)t=r.toArray().map(s=>e.html(s)).join(` `);else{let s=e("header").first();s.length&&(t=e.html(s))}return t.trim()?`<!-- wp:html --> <div class="lib-carry-vp-desktop"> ${t} </div> -<!-- /wp:html -->`:""}function vm(n){let e=[],t=n.pages.flatMap(m=>{try{return[{p:m,r:Qa({slug:m.slug,isHome:m.isHome,bodyHtml:m.bodyHtml,css:m.css,specs:m.specs??[],mediaUrlMap:n.mediaUrlMap,linkMap:n.linkMap,mobile:m.mobile})}]}catch{return e.push(m.slug),[]}}),r=new Map,s=[],i=new Map,o=m=>{let w=nn(m.headerIsland,m.footerIsland),C=r.get(w);return C||(C=`c${s.length}`,r.set(w,C),s.push(C),i.set(C,{headerIsland:m.headerIsland,footerIsland:m.footerIsland,chromeCss:m.chromeCss})),C},l=t.find(m=>m.p.isHome)??t[0];l&&o(l.r);let a=new Map,u=[],c=[];for(let{p:m,r:w}of t){let C=o(w);a.set(C,(a.get(C)??0)+1),u.push({slug:m.slug,isHome:m.isHome,postType:m.postType,pageCss:w.mainCss,scaffold:w.scaffold,mobile:m.mobile,chromeKey:C}),c.push({slug:m.slug,title:m.title,isHome:m.isHome,postType:m.postType,postContent:w.mainIsland})}let f=s.map(m=>{let w=i.get(m),C=(a.get(m)??0)>1;return{key:m,headerIsland:C?sn(w.headerIsland):w.headerIsland,footerIsland:C?sn(w.footerIsland):w.footerIsland}}),p=f.map(m=>i.get(m.key)?.chromeCss??"").filter(Boolean).join(` -`),g=ym(l?.p.bodyHtml??""),h="";if(n.hasProducts){let m=new Map;for(let T of t)T.r.headerIsland&&m.set(T,nn(T.r.headerIsland,""));let w=new Map;for(let T of m.values())w.set(T,(w.get(T)??0)+1);let C=T=>{let R=m.get(T);return R?w.get(R)??0:0},I=[...t].sort((T,R)=>{let G=Number(T.p.isHome??!1)-Number(R.p.isHome??!1);return G!==0?G:C(R)-C(T)});for(let T of I)if(h=ou(T.r.headerIsland)||ou(T.r.mainIsland),h)break}let y=il({themeName:n.themeName,chromeVariants:f,siteCss:p,bodyClasses:g,pages:u,storeHeaderIsland:h,hasProducts:n.hasProducts,themeJsonPalette:n.themeJsonPalette,themeJsonFontFamilies:n.themeJsonFontFamilies}),d=[];return n.hasProducts&&!h&&d.push("Store pages (single-product / archive-product) will render WITHOUT site chrome: no <header> could be isolated from any carried page island, so WooCommerce defaults are used. Capture an interior page with a header, or add a header part manually."),{themeFiles:y,wxrPages:c,skipped:e,warnings:d}}var vb=async(n,e)=>{let t=n.outputDir,r=n.studioSitePath,s=n.pages,i=n.editableIslands!==!1;if(!t)return e.errorResult("liberate_reconstruct_pages_carry requires `outputDir`.");if(!r)return e.errorResult("liberate_reconstruct_pages_carry requires `studioSitePath`.");if(!Array.isArray(s)||s.length===0)return e.errorResult("liberate_reconstruct_pages_carry requires a non-empty `pages` array ({slug, sourceUrl, title, isHome?}).");let o=Ks(r);if(!o)return e.errorResult(`studioSitePath has no wp-content: ${r}`);let l=n.themeName??"Liberated (Carry)",u=Xs(t).replace(/-replica$/,"")+"-carry",c=re(o,"wp-content","themes",u),f=[],p=[],g=[],h=[],y=(()=>{try{return new URL(s[0].sourceUrl).origin}catch{return}})(),d={};try{let x=re(ye(t),"responsive-images.json");wt(x)&&(d=JSON.parse(Zr(x,"utf8")))}catch{}let m={};try{let x=re(ye(t),"html-mobile","heights.json");wt(x)&&(m=JSON.parse(Zr(x,"utf8")))}catch{}let w=re(o,"wp-content","uploads","_carry-mobile");for(let x of s){let F=re(ye(t),"html",`${x.htmlSlug??x.slug}.html`),K="";if(wt(F))try{K=Zr(F,"utf8")}catch{}if(!K)try{K=await(await fetch(x.sourceUrl)).text()}catch(we){p.push({slug:x.slug,error:we instanceof Error?we.message:String(we)});continue}let Re=re(ye(t),"screenshots","desktop",`${x.htmlSlug??x.slug}.png`);h.push({slug:x.slug,height:si(Re),assess:ni(K,y)});let ke="";try{ke=await Ol({html:K,inlineStyleText:"",baseUrl:x.sourceUrl,onError:()=>{}})}catch{}try{let we=re(ye(t),"css");Kr(we,{recursive:!0}),Xr(re(we,`${x.slug}.css`),ke)}catch{}let Ws,Gs=re(ye(t),"html-mobile",`${x.htmlSlug??x.slug}.html`);if(wt(Gs))try{Kr(w,{recursive:!0});let we=Zr(Gs,"utf8");Xr(re(w,`${x.slug}.html`),we),Ws={docUrl:`/wp-content/uploads/_carry-mobile/${x.slug}.html`,height:m[x.htmlSlug??x.slug]??6e3}}catch{}f.push({slug:x.slug,title:x.title,isHome:x.isHome,postType:x.postType,bodyHtml:K,css:ke,mobile:Ws})}if(f.length===0)return e.errorResult(`liberate_reconstruct_pages_carry: no pages could be loaded. fetchErrors: ${JSON.stringify(p)}`);g.push(...ii(h));let C=Al(t,s.map(x=>x.sourceUrl)),I=await vl(t,f.map(x=>x.bodyHtml)),T=new Map,R=[];try{let x=await ql({outputDir:t,url:s[0].sourceUrl,wpRoot:o});T=x.mediaUrlMap,R.push(...x.result.errors)}catch(x){R.push({sourceUrl:"*",error:x instanceof Error?x.message:String(x)})}let G=wt(re(ye(t),"products.csv"))||wt(re(ye(t),"products.jsonl")),q=!1,Q;if(G){let F=await fr(r,"woocommerce",(K,Re)=>bt(["wp","--path",K,...Re],{timeout:3e5,maxBuffer:16777216}).then(ke=>ke.stdout));F.ok?q=!0:(Q=`WooCommerce auto-install failed (store templates will not render until WooCommerce is installed): ${F.error}`,console.error(`[reconstruct-carry] ${Q}`))}let P=oi(t),{themeFiles:B,wxrPages:ve,skipped:sr,warnings:au}=vm({themeName:l,pages:f,mediaUrlMap:T,linkMap:C,hasProducts:G,themeJsonPalette:P.themeJsonPalette,themeJsonFontFamilies:P.themeJsonFontFamilies}),ir=await bl(c,B,{wpRoot:o});for(let x of ir.files){let F=re(c,x.path);Kr(mm(F),{recursive:!0}),Xr(F,x.content)}let Ze=ve.map(x=>({slug:x.slug,title:x.title,isHome:x.isHome,postType:x.postType,postContent:ol(x.postContent,d,T)})),en=0,Hs;if(i){let x=new Qr;await x.start().catch(()=>{});try{let F=[];for(let K of Ze){let Re=tu(K.postContent);en+=Re.converted;let ke=(await x.fix([Re.content]))[0];F.push({...K,postContent:ke?.html??Re.content})}Ze=F}finally{await x.stop().catch(()=>{})}if(en>0){let F=ru();Qs({wpRoot:o,blockPlugins:[F]}),Hs=F.slug;try{await bt(["wp","--path",r,"plugin","activate",F.slug],{timeout:12e4,maxBuffer:16*1024*1024})}catch(K){console.error(`[reconstruct-carry] editable-html plugin activate failed: ${K.message}`)}}}let tn=El([...Ze.map(x=>x.postContent),...ir.files.filter(x=>x.path.endsWith(".css")||x.path.endsWith(".html")).map(x=>x.content)]),or=n.islandsOutDir,rn;if(or){let x=ye(or);Kr(x,{recursive:!0}),ti(x,Ze.map(F=>F.slug)),rn=Ze.map(F=>{let K=re(x,`${F.slug}.html`);return Xr(K,F.postContent),{slug:F.slug,title:F.title,isHome:F.isHome,postType:F.postType,islandPath:K,bytes:F.postContent.length}})}else rn=Ze;let zs=[...au];return g.length&&zs.push(`${g.length} page(s) captured with an empty body (JS-app content that didn't render \u2192 carried blank). Re-capture with the dynamic-content waits, or use a WP-native equivalent: `+g.map(x=>`${x.slug} [${x.reason}${x.detail?": "+x.detail:""}]`).join(", ")),e.textResult({ok:p.length===0,themeRoot:c,themeSlug:u,themeFilesWritten:B.length,fetchErrors:p,skipped:sr,warnings:zs,...Q?{wooWarning:Q}:{},wooEnsured:q,emptyBodies:g,mediaInstalled:T.size,mediaErrors:R,missingMediaDownloaded:I.downloaded,missingMediaFailed:I.failed,fontsLocalized:ir.downloaded,fontsFailed:ir.failed,residualCdnAssets:tn.refs.length,residualCdnByHost:tn.byHost,residualCdnSamples:tn.samples,islandsConverted:en,editableHtmlPluginSlug:Hs,islandsDir:or?ye(or):void 0,pages:rn})};export{vm as assembleCarryTheme,ou as extractStoreHeaderIsland,vb as reconstructPagesCarryHandler}; +<!-- /wp:html -->`:""}function Cm(n){let e=[],t=n.pages.flatMap(m=>{try{return[{p:m,r:Xa({slug:m.slug,isHome:m.isHome,bodyHtml:m.bodyHtml,css:m.css,specs:m.specs??[],mediaUrlMap:n.mediaUrlMap,linkMap:n.linkMap,mobile:m.mobile})}]}catch{return e.push(m.slug),[]}}),r=new Map,s=[],i=new Map,o=m=>{let w=sn(m.headerIsland,m.footerIsland),C=r.get(w);return C||(C=`c${s.length}`,r.set(w,C),s.push(C),i.set(C,{headerIsland:m.headerIsland,footerIsland:m.footerIsland,chromeCss:m.chromeCss})),C},l=t.find(m=>m.p.isHome)??t[0];l&&o(l.r);let a=new Map,u=[],c=[];for(let{p:m,r:w}of t){let C=o(w);a.set(C,(a.get(C)??0)+1),u.push({slug:m.slug,isHome:m.isHome,postType:m.postType,pageCss:w.mainCss,scaffold:w.scaffold,mobile:m.mobile,chromeKey:C}),c.push({slug:m.slug,title:m.title,isHome:m.isHome,postType:m.postType,postContent:w.mainIsland})}let f=s.map(m=>{let w=i.get(m),C=(a.get(m)??0)>1;return{key:m,headerIsland:C?on(w.headerIsland):w.headerIsland,footerIsland:C?on(w.footerIsland):w.footerIsland}}),p=f.map(m=>i.get(m.key)?.chromeCss??"").filter(Boolean).join(` +`),g=Om(l?.p.bodyHtml??""),h="";if(n.hasProducts){let m=new Map;for(let T of t)T.r.headerIsland&&m.set(T,sn(T.r.headerIsland,""));let w=new Map;for(let T of m.values())w.set(T,(w.get(T)??0)+1);let C=T=>{let A=m.get(T);return A?w.get(A)??0:0},I=[...t].sort((T,A)=>{let G=Number(T.p.isHome??!1)-Number(A.p.isHome??!1);return G!==0?G:C(A)-C(T)});for(let T of I)if(h=uu(T.r.headerIsland)||uu(T.r.mainIsland),h)break}let y=al({themeName:n.themeName,chromeVariants:f,siteCss:p,bodyClasses:g,pages:u,storeHeaderIsland:h,hasProducts:n.hasProducts,themeJsonPalette:n.themeJsonPalette,themeJsonFontFamilies:n.themeJsonFontFamilies}),d=[];return n.hasProducts&&!h&&d.push("Store pages (single-product / archive-product) will render WITHOUT site chrome: no <header> could be isolated from any carried page island, so WooCommerce defaults are used. Capture an interior page with a header, or add a header part manually."),{themeFiles:y,wxrPages:c,skipped:e,warnings:d}}var Tb=async(n,e)=>{let t=n.outputDir,r=n.studioSitePath,s=n.pages,i=n.editableIslands!==!1;if(!t)return e.errorResult("liberate_reconstruct_pages_carry requires `outputDir`.");if(!r)return e.errorResult("liberate_reconstruct_pages_carry requires `studioSitePath`.");if(!Array.isArray(s)||s.length===0)return e.errorResult("liberate_reconstruct_pages_carry requires a non-empty `pages` array ({slug, sourceUrl, title, isHome?}).");let o=Zs(r);if(!o)return e.errorResult(`studioSitePath has no wp-content: ${r}`);let l=n.themeName??"Liberated (Carry)",u=ei(t).replace(/-replica$/,"")+"-carry",c=re(o,"wp-content","themes",u),f=[],p=[],g=[],h=[],y=(()=>{try{return new URL(s[0].sourceUrl).origin}catch{return}})(),d={};try{let x=re(ye(t),"responsive-images.json");bt(x)&&(d=JSON.parse(en(x,"utf8")))}catch{}let m={};try{let x=re(ye(t),"html-mobile","heights.json");bt(x)&&(m=JSON.parse(en(x,"utf8")))}catch{}let w=re(o,"wp-content","uploads","_carry-mobile");for(let x of s){let F=re(ye(t),"html",`${x.htmlSlug??x.slug}.html`),K="";if(bt(F))try{K=en(F,"utf8")}catch{}if(!K)try{K=await(await fetch(x.sourceUrl)).text()}catch(we){p.push({slug:x.slug,error:we instanceof Error?we.message:String(we)});continue}let Ae=re(ye(t),"screenshots","desktop",`${x.htmlSlug??x.slug}.png`);h.push({slug:x.slug,height:oi(Ae),assess:ii(K,y)});let ke="";try{ke=await Tl({html:K,inlineStyleText:"",baseUrl:x.sourceUrl,onError:()=>{}})}catch{}try{let we=re(ye(t),"css");Xr(we,{recursive:!0}),Zr(re(we,`${x.slug}.css`),ke)}catch{}let Vs,Js=re(ye(t),"html-mobile",`${x.htmlSlug??x.slug}.html`);if(bt(Js))try{Xr(w,{recursive:!0});let we=en(Js,"utf8");Zr(re(w,`${x.slug}.html`),we),Vs={docUrl:`/wp-content/uploads/_carry-mobile/${x.slug}.html`,height:m[x.htmlSlug??x.slug]??6e3}}catch{}f.push({slug:x.slug,title:x.title,isHome:x.isHome,postType:x.postType,bodyHtml:K,css:ke,mobile:Vs})}if(f.length===0)return e.errorResult(`liberate_reconstruct_pages_carry: no pages could be loaded. fetchErrors: ${JSON.stringify(p)}`);g.push(...ai(h));let C=Ml(t,s.map(x=>x.sourceUrl)),I=await _l(t,f.map(x=>x.bodyHtml)),T=new Map,A=[];try{let x=await zl({outputDir:t,url:s[0].sourceUrl,wpRoot:o});T=x.mediaUrlMap,A.push(...x.result.errors)}catch(x){A.push({sourceUrl:"*",error:x instanceof Error?x.message:String(x)})}let G=bt(re(ye(t),"products.csv"))||bt(re(ye(t),"products.jsonl")),q=!1,Q;if(G){let F=await hr(r,"woocommerce",(K,Ae)=>_t(["wp","--path",K,...Ae],{timeout:3e5,maxBuffer:16777216}).then(ke=>ke.stdout));F.ok?q=!0:(Q=`WooCommerce auto-install failed (store templates will not render until WooCommerce is installed): ${F.error}`,console.error(`[reconstruct-carry] ${Q}`))}let P=li(t),{themeFiles:B,wxrPages:ve,skipped:or,warnings:cu}=Cm({themeName:l,pages:f,mediaUrlMap:T,linkMap:C,hasProducts:G,themeJsonPalette:P.themeJsonPalette,themeJsonFontFamilies:P.themeJsonFontFamilies}),ar=await xl(c,B,{wpRoot:o});for(let x of ar.files){let F=re(c,x.path);Xr(Em(F),{recursive:!0}),Zr(F,x.content)}let et=ve.map(x=>({slug:x.slug,title:x.title,isHome:x.isHome,postType:x.postType,postContent:ll(x.postContent,d,T)})),tn=0,Ws;if(i){let x=new Kr;await x.start().catch(()=>{});try{let F=[];for(let K of et){let Ae=su(K.postContent);tn+=Ae.converted;let ke=(await x.fix([Ae.content]))[0];F.push({...K,postContent:ke?.html??Ae.content})}et=F}finally{await x.stop().catch(()=>{})}if(tn>0){let F=iu();Xs({wpRoot:o,blockPlugins:[F]}),Ws=F.slug;try{await _t(["wp","--path",r,"plugin","activate",F.slug],{timeout:12e4,maxBuffer:16*1024*1024})}catch(K){console.error(`[reconstruct-carry] editable-html plugin activate failed: ${K.message}`)}}}let rn=Pl([...et.map(x=>x.postContent),...ar.files.filter(x=>x.path.endsWith(".css")||x.path.endsWith(".html")).map(x=>x.content)]),lr=n.islandsOutDir,nn;if(lr){let x=ye(lr);Xr(x,{recursive:!0}),ni(x,et.map(F=>F.slug)),nn=et.map(F=>{let K=re(x,`${F.slug}.html`);return Zr(K,F.postContent),{slug:F.slug,title:F.title,isHome:F.isHome,postType:F.postType,islandPath:K,bytes:F.postContent.length}})}else nn=et;let Gs=[...cu];return g.length&&Gs.push(`${g.length} page(s) captured with an empty body (JS-app content that didn't render \u2192 carried blank). Re-capture with the dynamic-content waits, or use a WP-native equivalent: `+g.map(x=>`${x.slug} [${x.reason}${x.detail?": "+x.detail:""}]`).join(", ")),e.textResult({ok:p.length===0,themeRoot:c,themeSlug:u,themeFilesWritten:B.length,fetchErrors:p,skipped:or,warnings:Gs,...Q?{wooWarning:Q}:{},wooEnsured:q,emptyBodies:g,mediaInstalled:T.size,mediaErrors:A,missingMediaDownloaded:I.downloaded,missingMediaFailed:I.failed,fontsLocalized:ar.downloaded,fontsFailed:ar.failed,residualCdnAssets:rn.refs.length,residualCdnByHost:rn.byHost,residualCdnSamples:rn.samples,islandsConverted:tn,editableHtmlPluginSlug:Ws,islandsDir:lr?ye(lr):void 0,pages:nn})};export{Cm as assembleCarryTheme,uu as extractStoreHeaderIsland,Tb as reconstructPagesCarryHandler}; /*! Bundled license information: cssesc/cssesc.js: diff --git a/packages/data-liberation-agent/dist/scripts/chunk-V2C54GCK.mjs b/packages/data-liberation-agent/dist/scripts/chunk-V2C54GCK.mjs new file mode 100644 index 0000000000..45e55fc862 --- /dev/null +++ b/packages/data-liberation-agent/dist/scripts/chunk-V2C54GCK.mjs @@ -0,0 +1,3 @@ +import { createRequire as __bundleCreateRequire } from 'node:module'; +const require = __bundleCreateRequire(import.meta.url); +import{c as p}from"./chunk-LFW5THTQ.mjs";import{readFileSync as P}from"node:fs";var h=[{name:"loox",selector:'#looxReviews, .loox-reviews, [id^="looxReviews"], [data-loox]'},{name:"yotpo",selector:'.yotpo, [class*="yotpo-"]'},{name:"judgeme",selector:".jdgm-widget, .jdgm-rev-widg, [data-jdgm-widget]"},{name:"okendo",selector:"[data-oke-widget], .okeReviews"},{name:"stamped",selector:"#stamped-main-widget, .stamped-main-widget"},{name:"reviews-io",selector:"#reviewsio-carousel-widget, .ruk_rating_snippet"},{name:"zendesk",selector:'iframe[src*="zendesk"], [id*="zendesk"]'},{name:"gorgias",selector:'iframe[src*="gorgias"]'},{name:"elfsight",selector:'[class*="elfsight-app"]'}],A=h.map(t=>t.selector).join(", ");function O(t,r){let o=p(t);o("script, style, noscript, template, svg").remove();let i=o("body"),e=h.find(c=>i.find(c.selector).length>0)?.name??null,s=i.find("iframe[src]").toArray().some(c=>{let n=o(c).attr("src")||"";if(!/^https?:\/\//i.test(n))return!1;try{return!r||new URL(n).origin!==r}catch{return!0}}),g=i.clone();g.find('header, nav, footer, [role="banner"], [role="contentinfo"], [role="navigation"]').remove();let l=g.text().replace(/\s+/g," ").trim().length,d=l<200,w=s?"iframe":e?"app-widget":d?"thin":"ok",a=s?"cross-origin <iframe> body":e||`${l} chars of body text`;return{empty:d,reason:w,detail:a,widget:e,crossOriginIframe:s,mainTextLen:l}}function R(t){try{let r=P(t);if(r.length<24||r.readUInt32BE(0)!==2303741511||r.toString("latin1",12,16)!=="IHDR")return null;let o=r.readUInt32BE(20);return o>0&&o<=2e5?o:null}catch{return null}}var x=1e3,b=.5;function L(t){let r=t.map(e=>e.height).filter(e=>e!==null).sort((e,s)=>e-s),o=r.length?r[Math.floor(r.length/2)]:0,i=[];for(let e of t){let s=o>0&&e.height!==null&&e.height<o*b;if(!(e.height!==null?s&&e.assess.mainTextLen<x:e.assess.empty))continue;let l=e.assess.crossOriginIframe?"iframe":e.assess.widget?"app-widget":e.height!==null?"short-render":"thin",m=e.assess.crossOriginIframe?e.assess.detail:e.assess.widget?e.assess.widget:e.height!==null?`rendered ${e.height}px vs median ${o}px`:e.assess.detail;i.push({slug:e.slug,reason:l,detail:m})}return i}import{readFileSync as T}from"node:fs";import{join as f}from"node:path";function y(t){try{return JSON.parse(T(t,"utf8"))}catch{return null}}function E(t){return(t.split(",")[0]||"").trim().replace(/["']/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"font"}function B(t){return(t.split(",")[0]||"").trim().replace(/["']/g,"")||t}function H(t,r=8){let o=y(f(t,"palette.json")),i=Array.isArray(o?.colors)?o.colors:[],e=[],s=[];for(let a of i){if(!a?.hex||!/^#?(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(a.hex))continue;let c=`c${e.length+1}`,n=a.hex.startsWith("#")?a.hex:`#${a.hex}`;if(e.push({slug:c,hex:n}),s.push({slug:c,name:`Replica ${e.length}`,color:n}),e.length>=r)break}let l=y(f(t,"typography.json"))?.bySelector??{},m=new Set,d=[],w=[];for(let a of Object.values(l))for(let c of a??[]){let n=(c?.fontFamily||"").trim();if(!n)continue;let u=E(n);m.has(u)||(m.add(u),d.push({slug:u,family:n}),w.push({slug:u,name:B(n),fontFamily:n}))}return{paletteTokens:e,fontFamilies:d,themeJsonPalette:s,themeJsonFontFamilies:w}}async function v(){try{return await import("playwright")}catch{throw new Error("Playwright is required but is not installed. Run `npm install playwright` and `npx playwright install chromium` to set it up.")}}export{v as a,O as b,R as c,L as d,H as e}; diff --git a/packages/data-liberation-agent/dist/scripts/enrich-product-marketing.mjs b/packages/data-liberation-agent/dist/scripts/enrich-product-marketing.mjs index 9b2ba51a0d..88b412d2ed 100644 --- a/packages/data-liberation-agent/dist/scripts/enrich-product-marketing.mjs +++ b/packages/data-liberation-agent/dist/scripts/enrich-product-marketing.mjs @@ -1,6 +1,6 @@ import { createRequire as __bundleCreateRequire } from 'node:module'; const require = __bundleCreateRequire(import.meta.url); -import{e as W}from"./chunk-4VYPWNND.mjs";import{b as A}from"./chunk-2JVHGDER.mjs";import{c as b,g as z,h as k,i as I,j,k as U}from"./chunk-LFW5THTQ.mjs";import{a as D}from"./chunk-Y7SDG6HL.mjs";import"./chunk-4TKBPMF4.mjs";import{readFileSync as L,writeFileSync as B,mkdirSync as dt,existsSync as gt,readdirSync as jt,rmSync as Ut}from"node:fs";import{join as g,resolve as P}from"node:path";var Jt=['[class*="faq-question"]','[class*="faq__question"]','[class*="accordion-trigger"]','[class*="accordion__trigger"]','[class*="accordion-header"]','[class*="accordion__header"]',"button[aria-expanded]",'[role="button"][aria-expanded]'].join(",");var xe=256*1024,Ce=8*1024;function Y(t){return(t.replace(/[?#].*$/,"").split("/").filter(Boolean).pop()??"").toLowerCase()}var G=new WeakMap;function pt(t){let e=G.get(t);if(!e){e=new Map;for(let[n,o]of Object.entries(t)){let i=Y(n);i&&!e.has(i)&&e.set(i,o)}G.set(t,e)}return e}function V(t,e){if(e[t])return e[t];let n=t.replace(/([?&])(w|h|q|quality|fit|crop)_[^&]+/g,"$1");if(e[n])return e[n];for(let[i,r]of Object.entries(e))if(i.replace(/([?&])(w|h|q|quality|fit|crop)_[^&]+/g,"$1")===n)return r;let o=Y(t);if(o){let i=pt(e).get(o);if(i)return i}return t}var bt=[{slug:"youtube",type:"video",match:/youtube\.com|youtu\.be/i},{slug:"vimeo",type:"video",match:/vimeo\.com/i},{slug:"dailymotion",type:"video",match:/dailymotion\.com|dai\.ly/i},{slug:"twitter",type:"rich",match:/twitter\.com|x\.com/i},{slug:"instagram",type:"rich",match:/instagram\.com/i},{slug:"facebook",type:"rich",match:/facebook\.com|fb\.watch/i},{slug:"tiktok",type:"rich",match:/tiktok\.com/i},{slug:"soundcloud",type:"rich",match:/soundcloud\.com/i},{slug:"spotify",type:"rich",match:/spotify\.com/i}];function Q(t){for(let e of bt)if(e.match.test(t))return e;return null}function X(t){return Q(t)?.slug??null}function K(t){let e=Q(t),n=e?.type==="video",o=[`"url":${JSON.stringify(t)}`];e&&o.push(`"type":"${e.type}"`),e&&o.push(`"providerNameSlug":"${e.slug}"`),o.push('"responsive":true');let i=`{${o.join(",")}}`,r=e?` is-provider-${e.slug} wp-block-embed-${e.slug}`:"";return`<!-- wp:embed ${i} --> +import{e as W}from"./chunk-V2C54GCK.mjs";import{b as A}from"./chunk-2JVHGDER.mjs";import{c as b,g as z,h as k,i as I,j,k as U}from"./chunk-LFW5THTQ.mjs";import"./chunk-6FA2POBN.mjs";import{a as D}from"./chunk-Y7SDG6HL.mjs";import"./chunk-4TKBPMF4.mjs";import{readFileSync as L,writeFileSync as B,mkdirSync as dt,existsSync as gt,readdirSync as jt,rmSync as Ut}from"node:fs";import{join as g,resolve as P}from"node:path";var Jt=['[class*="faq-question"]','[class*="faq__question"]','[class*="accordion-trigger"]','[class*="accordion__trigger"]','[class*="accordion-header"]','[class*="accordion__header"]',"button[aria-expanded]",'[role="button"][aria-expanded]'].join(",");var xe=256*1024,Ce=8*1024;function Y(t){return(t.replace(/[?#].*$/,"").split("/").filter(Boolean).pop()??"").toLowerCase()}var G=new WeakMap;function pt(t){let e=G.get(t);if(!e){e=new Map;for(let[n,o]of Object.entries(t)){let i=Y(n);i&&!e.has(i)&&e.set(i,o)}G.set(t,e)}return e}function V(t,e){if(e[t])return e[t];let n=t.replace(/([?&])(w|h|q|quality|fit|crop)_[^&]+/g,"$1");if(e[n])return e[n];for(let[i,r]of Object.entries(e))if(i.replace(/([?&])(w|h|q|quality|fit|crop)_[^&]+/g,"$1")===n)return r;let o=Y(t);if(o){let i=pt(e).get(o);if(i)return i}return t}var bt=[{slug:"youtube",type:"video",match:/youtube\.com|youtu\.be/i},{slug:"vimeo",type:"video",match:/vimeo\.com/i},{slug:"dailymotion",type:"video",match:/dailymotion\.com|dai\.ly/i},{slug:"twitter",type:"rich",match:/twitter\.com|x\.com/i},{slug:"instagram",type:"rich",match:/instagram\.com/i},{slug:"facebook",type:"rich",match:/facebook\.com|fb\.watch/i},{slug:"tiktok",type:"rich",match:/tiktok\.com/i},{slug:"soundcloud",type:"rich",match:/soundcloud\.com/i},{slug:"spotify",type:"rich",match:/spotify\.com/i}];function Q(t){for(let e of bt)if(e.match.test(t))return e;return null}function X(t){return Q(t)?.slug??null}function K(t){let e=Q(t),n=e?.type==="video",o=[`"url":${JSON.stringify(t)}`];e&&o.push(`"type":"${e.type}"`),e&&o.push(`"providerNameSlug":"${e.slug}"`),o.push('"responsive":true');let i=`{${o.join(",")}}`,r=e?` is-provider-${e.slug} wp-block-embed-${e.slug}`:"";return`<!-- wp:embed ${i} --> <figure class="wp-block-embed${r}${n?" wp-embed-aspect-16-9 wp-has-aspect-ratio":""}"><div class="wp-block-embed__wrapper"> ${t} </div></figure> diff --git a/packages/data-liberation-agent/src/adapters/default/extract.ts b/packages/data-liberation-agent/src/adapters/default/extract.ts index c9565c8edc..9f5c05e013 100644 --- a/packages/data-liberation-agent/src/adapters/default/extract.ts +++ b/packages/data-liberation-agent/src/adapters/default/extract.ts @@ -2,6 +2,7 @@ import type { WxrBuilder } from '../../lib/wxr/index.js'; import type { ExtractionLog } from '../../lib/resume-state/index.js'; import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import type { Browser, BrowserContext, Page } from 'playwright'; +import { withTimeout } from '../../lib/concurrency.js'; import { runExtractionLoop } from '../shared.js'; import { slugify } from '../../lib/url/index.js'; import { extractMeta, extractTitle, extractHeading } from '../../lib/html-extract/index.js'; @@ -133,12 +134,15 @@ export async function extractDefault( // closed after use, so concurrent batch fetches stay isolated and memory // stays bounded across long runs. let browser: Browser | null = null; + let closeBrowser: (() => Promise<void>) | null = null; let pwContext: BrowserContext | null = null; if (useRender) { try { const launched = await launchBrowser({ cdpPort: o.cdpPort }); browser = launched.browser as unknown as Browser; - pwContext = browser.contexts()[0] || (await browser.newContext()); + closeBrowser = launched.close; + pwContext = browser.contexts()[0] + || (await withTimeout(browser.newContext(), 30_000, 'context create')); } catch { browser = null; pwContext = null; @@ -177,6 +181,6 @@ export async function extractDefault( return result; } finally { - await browser?.close().catch(() => {}); + await closeBrowser?.().catch(() => {}); } } diff --git a/packages/data-liberation-agent/src/adapters/shared.test.ts b/packages/data-liberation-agent/src/adapters/shared.test.ts index 6b50bdd583..d95003c817 100644 --- a/packages/data-liberation-agent/src/adapters/shared.test.ts +++ b/packages/data-liberation-agent/src/adapters/shared.test.ts @@ -200,6 +200,161 @@ describe('runExtractionLoop streaming callback', () => { }); }); +describe('runExtractionLoop watchdog cleanup', () => { + it('lets onExtractTimeout swap shared state so a late mutation cannot touch the next URL', async () => { + const outputDir = mkdtempSync(join(FIXTURE_TMP, 'shared-watchdog-')); + try { + const wxr = makeWxr(); + const log = new ExtractionLog(outputDir); + + // Stands in for the Playwright page adapters reuse across URLs. + let resource = { writes: [] as string[] }; + const abandonedResource = resource; + + let lateMutate!: () => void; + const extractPage = (url: string) => { + const mine = resource; // captured like the wix extractPage closure captures the page + if (url.endsWith('/a')) { + // Never settles — the watchdog abandons it, then it "completes" late. + return new Promise<ExtractedPage>(() => { + lateMutate = () => { mine.writes.push('late write from a'); }; + }); + } + mine.writes.push(`extract ${url}`); + return Promise.resolve(makePage(url)); + }; + + const onExtractTimeout = vi.fn(async () => { + resource = { writes: [] }; + }); + + const result = await runExtractionLoop({ + urls: [ + { url: 'https://example.com/a', type: 'page' }, + { url: 'https://example.com/b', type: 'page' }, + ], + navigation: [], + wxr, + log, + outputDir, + // delay 500 keeps page concurrency at 1 so /a and /b are separate + // batches; the max cap keeps the post-error inter-batch sleep short. + delay: 500, + tunerConfig: { pageDelayMax: 500 }, + dryRun: false, + resume: false, + extractPage, + extractTimeoutMs: 50, + onExtractTimeout, + }); + + // Simulate the abandoned extraction finishing after the loop moved on. + lateMutate(); + + expect(result.failed).toBe(1); + expect(result.pagesExtracted).toBe(1); + expect(onExtractTimeout).toHaveBeenCalledTimes(1); + // The late write landed only on the abandoned resource... + expect(abandonedResource.writes).toEqual(['late write from a']); + // ...and /b ran against the fresh resource, untouched by /a. + expect(resource.writes).toEqual(['extract https://example.com/b']); + } finally { + rmSync(outputDir, { recursive: true, force: true }); + } + }); + + it('does not call onExtractTimeout for an ordinary extractPage failure', async () => { + const outputDir = mkdtempSync(join(FIXTURE_TMP, 'shared-watchdog-err-')); + try { + const wxr = makeWxr(); + const log = new ExtractionLog(outputDir); + const onExtractTimeout = vi.fn(async () => {}); + + const result = await runExtractionLoop({ + urls: [{ url: 'https://example.com/broken', type: 'page' }], + navigation: [], + wxr, + log, + outputDir, + delay: 0, + dryRun: false, + resume: false, + extractPage: () => Promise.reject(new Error('adapter blew up')), + extractTimeoutMs: 50, + onExtractTimeout, + }); + + expect(result.failed).toBe(1); + expect(onExtractTimeout).not.toHaveBeenCalled(); + } finally { + rmSync(outputDir, { recursive: true, force: true }); + } + }); +}); + +describe('runExtractionLoop page concurrency cap', () => { + function makeTrackingExtractPage() { + let inFlight = 0; + let peak = 0; + const extractPage = async (url: string) => { + inFlight++; + peak = Math.max(peak, inFlight); + await new Promise((r) => setTimeout(r, 5)); + inFlight--; + return makePage(url); + }; + return { extractPage, getPeak: () => peak }; + } + + const urls = Array.from({ length: 6 }, (_, i) => ({ + url: `https://example.com/p${i}`, + type: 'page', + })); + + it('batches more than 1 when the tuner delay is low and no cap is set', async () => { + const outputDir = mkdtempSync(join(FIXTURE_TMP, 'shared-nocap-')); + try { + const { extractPage, getPeak } = makeTrackingExtractPage(); + await runExtractionLoop({ + urls, + navigation: [], + wxr: makeWxr(), + log: new ExtractionLog(outputDir), + outputDir, + delay: 0, + dryRun: false, + resume: false, + extractPage, + }); + expect(getPeak()).toBeGreaterThan(1); + } finally { + rmSync(outputDir, { recursive: true, force: true }); + } + }); + + it('keeps batches at 1 with maxPageConcurrency: 1 even when the tuner would batch more', async () => { + const outputDir = mkdtempSync(join(FIXTURE_TMP, 'shared-cap-')); + try { + const { extractPage, getPeak } = makeTrackingExtractPage(); + await runExtractionLoop({ + urls, + navigation: [], + wxr: makeWxr(), + log: new ExtractionLog(outputDir), + outputDir, + delay: 0, + dryRun: false, + resume: false, + maxPageConcurrency: 1, + extractPage, + }); + expect(getPeak()).toBe(1); + } finally { + rmSync(outputDir, { recursive: true, force: true }); + } + }); +}); + describe('runExtractionLoop source-faithful slugs + redirect map', () => { it('uses the LAST path segment for the WXR post_name and a /slug/ redirect target', async () => { const outputDir = mkdtempSync(join(FIXTURE_TMP, 'shared-slug-')); diff --git a/packages/data-liberation-agent/src/adapters/shared.ts b/packages/data-liberation-agent/src/adapters/shared.ts index 59b5da4093..06a2e2c8bc 100644 --- a/packages/data-liberation-agent/src/adapters/shared.ts +++ b/packages/data-liberation-agent/src/adapters/shared.ts @@ -11,6 +11,13 @@ import type { WooProductCsvBuilder, WooProduct } from '../lib/woo-csv/index.js'; import { AdaptiveTuner, TUNER_DEFAULTS } from '../lib/extraction/adaptive-tuner.js'; import type { AdaptiveTunerConfig, TunerState } from '../lib/extraction/adaptive-tuner.js'; import { claimSlug, pageSlugFromUrl } from '../lib/url/index.js'; +import { withTimeout, TimeoutError } from '../lib/concurrency.js'; + +/** Default time limit for one extractPage call (see extractTimeoutMs). An + * adapter await that never settles (a frozen browser, a dead socket) would + * otherwise block the whole loop; when the time is up the URL is logged as + * failed and the run continues. */ +const PAGE_EXTRACT_TIMEOUT_MS = 5 * 60_000; // --------------------------------------------------------------------------- // Strip non-content tags from HTML @@ -285,6 +292,14 @@ export interface ExtractionLoopOpts { * implicit 3-URL cap. */ limit?: number; + /** Watchdog budget for one extractPage call. Defaults to 5 minutes. */ + extractTimeoutMs?: number; + /** Called after an extractPage watchdog timeout. The abandoned call can still + * touch shared adapter state — dispose/recreate it here. Errors are logged and swallowed. */ + onExtractTimeout?: () => Promise<void>; + /** Hard cap on the tuner's page-fetch batch size. Adapters whose extractPage + * shares one browser page must pass 1. */ + maxPageConcurrency?: number; /** Optional per-adapter tuner configuration overrides */ tunerConfig?: AdaptiveTunerConfig; } @@ -331,8 +346,12 @@ async function runExtractionLoopInner(opts: ExtractionLoopOpts): Promise<Extract extractProduct, onPageExtracted, limit, + extractTimeoutMs, + onExtractTimeout, + maxPageConcurrency, tunerConfig, } = opts; + const pageExtractTimeoutMs = extractTimeoutMs ?? PAGE_EXTRACT_TIMEOUT_MS; // Seed discovered counts from the inventory so the session reflects // what the adapter found before extraction began. @@ -451,11 +470,12 @@ async function runExtractionLoopInner(opts: ExtractionLoopOpts): Promise<Extract pageData: ExtractedPage | null; elapsedMs: number; error: string | null; + timedOut: boolean; } let cursor = 0; while (cursor < urls.length) { - const batchSize = tuner.getPageConcurrency(); + const batchSize = Math.max(1, Math.min(tuner.getPageConcurrency(), maxPageConcurrency ?? Infinity)); const batch = urls.slice(cursor, cursor + batchSize); // Phase 1: Log what we're about to fetch @@ -467,15 +487,26 @@ async function runExtractionLoopInner(opts: ExtractionLoopOpts): Promise<Extract const fetchResults: FetchResult[] = await Promise.all( batch.map(async (url): Promise<FetchResult> => { const pageStart = Date.now(); + const watchdogLabel = `extractPage ${url}`; try { - const pageData = await extractPage(url); - return { url, pageData, elapsedMs: Date.now() - pageStart, error: null }; + const pageData = await withTimeout( + extractPage(url), pageExtractTimeoutMs, watchdogLabel); + return { url, pageData, elapsedMs: Date.now() - pageStart, error: null, timedOut: false }; } catch (err) { - return { url, pageData: null, elapsedMs: Date.now() - pageStart, error: err instanceof Error ? err.message : String(err) }; + const timedOut = err instanceof TimeoutError && err.label === watchdogLabel; + return { url, pageData: null, elapsedMs: Date.now() - pageStart, error: err instanceof Error ? err.message : String(err), timedOut }; } }) ); + if (onExtractTimeout && fetchResults.some((r) => r.timedOut)) { + try { + await onExtractTimeout(); + } catch (err) { + sendLog(` [warn] onExtractTimeout failed: ${err instanceof Error ? err.message : String(err)}`); + } + } + // Phase 3: Feed timing to tuner — treat batch errors as a single // compound event to avoid multiplicative backoff (N errors in one // batch would otherwise multiply the delay by 2^N). diff --git a/packages/data-liberation-agent/src/adapters/shopify/extract.ts b/packages/data-liberation-agent/src/adapters/shopify/extract.ts index f6c42265c8..035c69382e 100644 --- a/packages/data-liberation-agent/src/adapters/shopify/extract.ts +++ b/packages/data-liberation-agent/src/adapters/shopify/extract.ts @@ -8,9 +8,11 @@ import { } from '../../lib/extraction/shopify-graphql.js'; import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { runExtractionLoop } from '../shared.js'; +import { createManagedBrowser } from '../../lib/browser-kit/index.js'; import { slugify } from '../../lib/url/index.js'; import { extractMeta, extractHeading, IMAGE_EXTENSIONS } from '../../lib/html-extract/index.js'; import { WooProductCsvBuilder } from '../../lib/woo-csv/index.js'; +import type { WooProduct } from '../../lib/woo-csv/index.js'; import type { ShopifyAdapterOpts, ShopifyInventory, ShopifyArticle, ShopifyPage, ShopifyProductJson } from './types.js'; import { fetchShopifyJson } from './http.js'; import { @@ -204,20 +206,12 @@ export async function extract( inv.urls.filter((u) => u.type === 'product').map((u) => u.url) ); - // Lazy-init browser session for CDP/headed fallback on 403s - let browserSession: { page: unknown; close: () => Promise<void> } | null = null; - async function getBrowserPage(): Promise<unknown> { - if (!browserSession) { - const { launchBrowser } = await import('../../lib/browser-kit/index.js'); - // Prefer user-provided CDP port; otherwise auto-launch headed Chromium - // (headed bypasses Cloudflare bot detection that blocks headless) - const session = await launchBrowser( - shopifyOpts.cdpPort ? { cdpPort: shopifyOpts.cdpPort } : { headed: true } - ); - browserSession = { page: session.page, close: () => session.close() }; - } - return browserSession.page; - } + // Lazy browser for the CDP/headed fallback on 403s. Prefer a user-provided + // CDP port; otherwise auto-launch headed Chromium (headed bypasses + // Cloudflare bot detection that blocks headless). + const managedBrowser = createManagedBrowser( + shopifyOpts.cdpPort ? { cdpPort: shopifyOpts.cdpPort } : { headed: true } + ); let result; try { @@ -236,7 +230,13 @@ export async function extract( csvBuilder, session, onPageExtracted: shopifyOpts.onPageExtracted as never, + maxPageConcurrency: 1, + onExtractTimeout: () => managedBrowser.reset(), extractPage: async (url: string) => { + const lease = managedBrowser.openLease(); + // Buffered until the end of this call: a watchdog-abandoned extraction + // must not leave rows in the shared CSV builder. + const pendingProducts: WooProduct[] = []; // Tier 1: Try JSON API — append .json to URL let title = ''; let content = ''; @@ -266,11 +266,7 @@ export async function extract( // Product JSON found — add to CSV builder for WooCommerce export detectedType = 'product'; const { parent, variations } = shopifyProductToWoo(product, url); - csvBuilder.addProduct(parent); - for (const variation of variations) { - csvBuilder.addProduct(variation); - } - hasProducts = true; + pendingProducts.push(parent, ...variations); productHandled = true; // Collect JSON metadata — but DON'T set jsonSuccess so we @@ -349,7 +345,7 @@ export async function extract( // Uses CDP if cdpPort provided, otherwise auto-launches headed Chromium if (needsBrowser && !html) { try { - const page = await getBrowserPage() as import('playwright').Page; + const page = (await lease.acquire()).page as import('playwright').Page; await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 }); html = await page.content(); } catch { @@ -365,8 +361,7 @@ export async function extract( const wooProduct = extractProductFromHtml(html, url); if (wooProduct) { detectedType = 'product'; - csvBuilder.addProduct(wooProduct); - hasProducts = true; + pendingProducts.push(wooProduct); } } @@ -421,6 +416,14 @@ export async function extract( // isProduct is computed above but TypeScript needs the variable used to avoid unused-var warnings void isProduct; + if (!lease.isValid()) { + throw new Error(`extraction abandoned by watchdog: ${url}`); + } + if (pendingProducts.length > 0) { + for (const p of pendingProducts) csvBuilder.addProduct(p); + hasProducts = true; + } + return { title, slug: slugify(url), @@ -460,6 +463,6 @@ export async function extract( } throw err; } finally { - if (browserSession) await (browserSession as { close: () => Promise<void> }).close(); + await managedBrowser.end(); } } diff --git a/packages/data-liberation-agent/src/adapters/squarespace/extract.ts b/packages/data-liberation-agent/src/adapters/squarespace/extract.ts index 8d7ddecace..02cfdcc1ae 100644 --- a/packages/data-liberation-agent/src/adapters/squarespace/extract.ts +++ b/packages/data-liberation-agent/src/adapters/squarespace/extract.ts @@ -4,7 +4,7 @@ import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { classifyUrl } from '../../lib/extraction/sitemap.js'; import { runExtractionLoop } from '../shared.js'; import { slugify } from '../../lib/url/index.js'; -import { launchBrowser } from '../../lib/browser-kit/index.js'; +import { createManagedBrowser } from '../../lib/browser-kit/index.js'; import { WooProductCsvBuilder } from '../../lib/woo-csv/index.js'; import type { WooProduct } from '../../lib/woo-csv/index.js'; import type { SquarespaceInventory, SquarespaceAdapterOpts } from './types.js'; @@ -101,16 +101,8 @@ export async function extract( const sqOpts = opts as SquarespaceAdapterOpts; const delayMs = sqOpts.delay != null ? sqOpts.delay : 300; - // Launch browser lazily — only if a page needs DOM fallback - let browserSession: { page: unknown; close: () => Promise<void> } | null = null; - - async function getBrowserPage(): Promise<unknown> { - if (!browserSession) { - const session = await launchBrowser({ cdpPort: sqOpts.cdpPort }); - browserSession = { page: session.page, close: () => session.close() }; - } - return browserSession.page; - } + // Lazy browser — launched only if a page needs DOM fallback. + const managedBrowser = createManagedBrowser({ cdpPort: sqOpts.cdpPort }); const outputDir = sqOpts.outputDir || ''; const csvBuilder = new WooProductCsvBuilder(); @@ -133,7 +125,10 @@ export async function extract( server: context.server, csvBuilder, onPageExtracted: sqOpts.onPageExtracted as never, + maxPageConcurrency: 1, + onExtractTimeout: () => managedBrowser.reset(), extractPage: async (url: string) => { + const lease = managedBrowser.openLease(); const json = await fetchSqsJson(url); const item = json?.item; @@ -158,7 +153,7 @@ export async function extract( if (isEmptyContent) { // Fall back to Playwright DOM extraction try { - const page = await getBrowserPage(); + const { page } = await lease.acquire(); const domResult = await extractDomContent(page, url); if (domResult.content) { body = domResult.content; @@ -231,6 +226,6 @@ export async function extract( return result; } finally { - if (browserSession) await (browserSession as NonNullable<typeof browserSession>).close(); + await managedBrowser.end(); } } diff --git a/packages/data-liberation-agent/src/adapters/wix/discover.ts b/packages/data-liberation-agent/src/adapters/wix/discover.ts index 6acf190c5a..73c3bf087e 100644 --- a/packages/data-liberation-agent/src/adapters/wix/discover.ts +++ b/packages/data-liberation-agent/src/adapters/wix/discover.ts @@ -1,6 +1,8 @@ import { classifyUrl, parseSitemapXml } from '../../lib/extraction/sitemap.js'; import { ensureUrlScheme } from '../../lib/url/index.js'; import { launchBrowser } from '../../lib/browser-kit/index.js'; +import { withTimeout } from '../../lib/concurrency.js'; +import { RENDERER_CALL_TIMEOUT_MS } from './page.js'; import type { InventoryUrl } from '../shared.js'; import type { NavLink } from '../../lib/html-extract/index.js'; import type { WixAdapterOpts, Inventory } from './types.js'; @@ -76,7 +78,7 @@ export async function discover(url: string, opts: Record<string, unknown>): Prom fail(lastErr ?? 'unknown'); return; } - const text = await p.content(); + const text = await withTimeout(p.content(), RENDERER_CALL_TIMEOUT_MS, 'wix discover sitemap content'); const locs = parseSitemapXml(text); for (const loc of locs) { if (loc.endsWith('.xml')) { @@ -126,7 +128,7 @@ export async function discover(url: string, opts: Record<string, unknown>): Prom await p.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }); await p.waitForTimeout(4000); const origin = new URL(url).origin; - allUrls = (await p.evaluate((orig: unknown) => { + allUrls = (await withTimeout(p.evaluate((orig: unknown) => { const o = orig as string; return [ ...new Set( @@ -135,7 +137,7 @@ export async function discover(url: string, opts: Record<string, unknown>): Prom .filter((h) => h.startsWith(o) && !h.includes('#')) ), ]; - }, origin)) as string[]; + }, origin), RENDERER_CALL_TIMEOUT_MS, 'wix discover homepage links')) as string[]; } catch { // crawl failed } @@ -150,7 +152,7 @@ export async function discover(url: string, opts: Record<string, unknown>): Prom .goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }) .catch(() => {}); await p.waitForTimeout(4000); - navigation = (await p.evaluate(() => { + navigation = (await withTimeout(p.evaluate(() => { const navLinks: Array<{ text: string; href: string }> = []; document .querySelectorAll('nav a, header a, [role="navigation"] a') @@ -163,7 +165,7 @@ export async function discover(url: string, opts: Record<string, unknown>): Prom } }); return navLinks; - })) as NavLink[]; + }), RENDERER_CALL_TIMEOUT_MS, 'wix discover nav')) as NavLink[]; } catch { // nav extraction failed } @@ -176,12 +178,12 @@ export async function discover(url: string, opts: Record<string, unknown>): Prom // like "Home | Gilded Carat Main" instead of "Gilded Carat". let siteTitle = ''; try { - siteTitle = (await p.evaluate(() => { + siteTitle = (await withTimeout(p.evaluate(() => { const t = document.title; const pipeIdx = t.lastIndexOf(' | '); const sitePart = pipeIdx > 0 ? t.slice(pipeIdx + 3).trim() : t; return sitePart.replace(/ Main$/, '').trim(); - })) as string; + }), RENDERER_CALL_TIMEOUT_MS, 'wix discover title')) as string; } catch { // title extraction failed } diff --git a/packages/data-liberation-agent/src/adapters/wix/extract.ts b/packages/data-liberation-agent/src/adapters/wix/extract.ts index 6a0d5501ac..450c8e9cc0 100644 --- a/packages/data-liberation-agent/src/adapters/wix/extract.ts +++ b/packages/data-liberation-agent/src/adapters/wix/extract.ts @@ -2,7 +2,7 @@ import type { WxrBuilder } from '../../lib/wxr/index.js'; import type { ExtractionLog } from '../../lib/resume-state/index.js'; import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { runExtractionLoop } from '../shared.js'; -import { launchBrowser } from '../../lib/browser-kit/index.js'; +import { createManagedBrowser } from '../../lib/browser-kit/index.js'; import { WooProductCsvBuilder } from '../../lib/woo-csv/index.js'; import type { WixAdapterOpts, Inventory } from './types.js'; import { extractWixPage } from './page.js'; @@ -36,10 +36,11 @@ export async function extract( inv.urls.filter((u) => u.type === 'product').map((u) => u.url) ); - // Launch browser for Wix-specific page extraction - const { page, close } = await launchBrowser({ cdpPort: wixOpts.cdpPort }); + const managedBrowser = createManagedBrowser({ cdpPort: wixOpts.cdpPort }); try { + // Fail fast on a broken browser setup before the loop starts. + await managedBrowser.openLease().acquire(); const result = await runExtractionLoop({ urls: inv.urls, navigation: inv.navigation, @@ -54,8 +55,15 @@ export async function extract( server: context.server, csvBuilder, onPageExtracted: wixOpts.onPageExtracted as never, + maxPageConcurrency: 1, + onExtractTimeout: () => managedBrowser.reset(), extractPage: async (url: string) => { + const lease = managedBrowser.openLease(); + const { page } = await lease.acquire(); const pageData = await extractWixPage(page, url); + if (!lease.isValid()) { + throw new Error(`extraction abandoned by watchdog: ${url}`); + } // Check if this is a product page and try to extract product data const isProduct = productUrls.has(url) || /\/product-page\//.test(url) || /\/store\//.test(url); @@ -114,6 +122,6 @@ export async function extract( return result; } finally { - await close(); + await managedBrowser.end(); } } diff --git a/packages/data-liberation-agent/src/adapters/wix/page.ts b/packages/data-liberation-agent/src/adapters/wix/page.ts index 50a5422564..20714205e1 100644 --- a/packages/data-liberation-agent/src/adapters/wix/page.ts +++ b/packages/data-liberation-agent/src/adapters/wix/page.ts @@ -3,6 +3,12 @@ import { isExecutionContextDestroyed, ROUTE_PIN_INIT_SCRIPT } from './runtime.js import { emptyMeta, extractImageUrls, deriveContent, extractFeaturedImageFromJsonLd } from './content.js'; import { extractGalleryFromHtml } from './gallery.js'; import { slugify } from '../../lib/url/index.js'; +import { withTimeout } from '../../lib/concurrency.js'; + +/** Hard deadline for renderer-bound Playwright calls (evaluate/content/CDP). + * Playwright gives them NO default timeout, so a frozen renderer would + * otherwise leave the await pending forever and block the extraction loop. */ +export const RENDERER_CALL_TIMEOUT_MS = 30_000; /** * Plain GET of a page's served HTML. Used as the last-resort fallback when @@ -73,11 +79,11 @@ export async function extractWixPage( // (already swallowed) call sites' own try/catch — kept for symmetry. const evaluateWithRetry = async <T>(fn: (arg?: unknown) => unknown): Promise<T> => { try { - return (await p.evaluate(fn)) as T; + return (await withTimeout(p.evaluate(fn), RENDERER_CALL_TIMEOUT_MS, 'wix evaluate')) as T; } catch (err) { if (!isExecutionContextDestroyed(err)) throw err; await settle(8_000, 1_500); - return (await p.evaluate(fn)) as T; + return (await withTimeout(p.evaluate(fn), RENDERER_CALL_TIMEOUT_MS, 'wix evaluate')) as T; } }; @@ -110,53 +116,58 @@ export async function extractWixPage( }; p.on('response', responseHandler); - - // Pin the route before navigation so Wix's Pro Gallery can't fire the - // hydration-time client-side navigation that destroys our execution - // context mid-evaluate. Best-effort — `addInitScript` may be unavailable - // on some Page shapes, and the script can't always override the native - // `location` setter; the retry + HTML-fallback layers below are the real - // safety net. try { - await p.addInitScript(ROUTE_PIN_INIT_SCRIPT); - } catch { - // older/foreign page shape — proceed without route pinning - } + // Pin the route before navigation so Wix's Pro Gallery can't fire the + // hydration-time client-side navigation that destroys our execution + // context mid-evaluate. Best-effort — `addInitScript` may be unavailable + // on some Page shapes, and the script can't always override the native + // `location` setter; the retry + HTML-fallback layers below are the real + // safety net. + try { + await withTimeout( + p.addInitScript(ROUTE_PIN_INIT_SCRIPT), RENDERER_CALL_TIMEOUT_MS, 'wix addInitScript'); + } catch { + // older/foreign page shape — proceed without route pinning + } - try { - // Wix's analytics, chat widgets, and tracking pixels keep firing - // requests indefinitely, so `networkidle` never resolves on many - // pages — especially product pages — and the 30s budget is - // exhausted by background telemetry. `domcontentloaded` + a bounded - // networkidle (best-effort) + a short fixed delay catches Wix's lazy - // hydration without hanging. The networkidle attempt also lets the Pro - // Gallery finish its hydration navigation *before* we evaluate, instead - // of having it fire mid-extract. - await p.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }); - await settle(6_000, 4000); - // Scroll through the page to trigger lazy-loaded gallery thumbnails so - // images below the fold make it into the live DOM read. Best-effort. try { - await p.evaluate(async () => { - const step = 800; - const total = document.documentElement.scrollHeight; - for (let y = 0; y < total; y += step) { - window.scrollTo(0, y); - await new Promise((r) => setTimeout(r, 120)); - } - window.scrollTo(0, 0); - }); - await settle(3_000, 500); + // Wix's analytics, chat widgets, and tracking pixels keep firing + // requests indefinitely, so `networkidle` never resolves on many + // pages — especially product pages — and the 30s budget is + // exhausted by background telemetry. `domcontentloaded` + a bounded + // networkidle (best-effort) + a short fixed delay catches Wix's lazy + // hydration without hanging. The networkidle attempt also lets the Pro + // Gallery finish its hydration navigation *before* we evaluate, instead + // of having it fire mid-extract. + await p.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }); + await settle(6_000, 4000); + // Scroll through the page to trigger lazy-loaded gallery thumbnails so + // images below the fold make it into the live DOM read. Best-effort. + try { + await withTimeout(p.evaluate(async () => { + const step = 800; + const total = document.documentElement.scrollHeight; + for (let y = 0; y < total; y += step) { + window.scrollTo(0, y); + await new Promise((r) => setTimeout(r, 120)); + } + window.scrollTo(0, 0); + }), 60_000, 'wix lazy-load scroll'); + await settle(3_000, 500); + } catch { + // scroll failed (e.g. context destroyed) — non-fatal; the DOM read and + // HTML fallback still recover what's already present. + } } catch { - // scroll failed (e.g. context destroyed) — non-fatal; the DOM read and - // HTML fallback still recover what's already present. + // Navigation may timeout on heavy Wix pages } - } catch { - // Navigation may timeout on heavy Wix pages + } finally { + // Never leave the capture listener attached to the shared page — an + // unexpected throw above would otherwise keep it running for every + // later URL extracted on this page. + p.off('response', responseHandler); } - p.off('response', responseHandler); - // Tracks whether the live in-page evaluate path failed (context destroyed // even after one retry). When true we lean on the served-HTML fallback. let liveEvaluateFailed = false; @@ -322,11 +333,16 @@ export async function extractWixPage( let accessibility: Array<{ role: string; name: string; description?: string }> | null = null; + let client: Awaited<ReturnType<ReturnType<(typeof p)['context']>['newCDPSession']>> | null = null; try { - const client = await p.context().newCDPSession(page); - const axResult = (await client.send('Accessibility.getFullAXTree', { + // A session that resolves after the deadline never reaches `client`, so + // the finally below can't see it — detach it via the late-resolve hook. + client = await withTimeout( + p.context().newCDPSession(page), RENDERER_CALL_TIMEOUT_MS, 'wix CDP session', + (c) => { void c.detach().catch(() => {}); }); + const axResult = (await withTimeout(client.send('Accessibility.getFullAXTree', { depth: 10, - })) as { nodes?: Array<{ role?: { value: string }; name?: { value: string }; description?: { value: string } }> }; + }), RENDERER_CALL_TIMEOUT_MS, 'wix AX tree')) as { nodes?: Array<{ role?: { value: string }; name?: { value: string }; description?: { value: string } }> }; const textNodes = (axResult.nodes || []) .filter((n) => [ @@ -349,14 +365,21 @@ export async function extractWixPage( })) .filter((n) => n.name); accessibility = textNodes; - await client.detach(); } catch { // CDP session failed + } finally { + // Detach even when send() timed out or threw, so failed AX reads don't + // pile up attached sessions on the shared browser. + if (client) { + await withTimeout(client.detach(), RENDERER_CALL_TIMEOUT_MS, 'wix CDP detach').catch( + () => {} + ); + } } let pageHtml = ''; try { - pageHtml = await p.content(); + pageHtml = await withTimeout(p.content(), RENDERER_CALL_TIMEOUT_MS, 'wix page content'); } catch { // content() failed (e.g. context destroyed). Fall back to a plain GET of // the served HTML — Wix server-renders the page (and the Pro Gallery's diff --git a/packages/data-liberation-agent/src/lib/browser-kit/browser-kit.ts b/packages/data-liberation-agent/src/lib/browser-kit/browser-kit.ts index e4ab0262df..ce6eb85c96 100644 --- a/packages/data-liberation-agent/src/lib/browser-kit/browser-kit.ts +++ b/packages/data-liberation-agent/src/lib/browser-kit/browser-kit.ts @@ -1,7 +1,16 @@ +import { withTimeout } from '../concurrency.js'; + +type PwPage = { close(): Promise<void> }; + +const CLOSE_TIMEOUT_MS = 3_000; +const CREATE_TIMEOUT_MS = 30_000; +const CONNECT_TIMEOUT_MS = 60_000; + type PwBrowser = { - contexts(): Array<{ newPage(): Promise<unknown> }>; - newContext(opts?: Record<string, unknown>): Promise<{ newPage(): Promise<unknown> }>; + contexts(): Array<{ newPage(): Promise<PwPage> }>; + newContext(opts?: Record<string, unknown>): Promise<{ newPage(): Promise<PwPage> }>; close(): Promise<void>; + isConnected(): boolean; }; export async function getPlaywright(): Promise<typeof import('playwright')> { @@ -40,28 +49,42 @@ export async function launchBrowser(opts: { cdpPort?: number; headed?: boolean } page: unknown; close: () => Promise<void>; }> { - const pw = await getPlaywright(); + const raw = await withTimeout( + connectBrowser(opts), + CONNECT_TIMEOUT_MS, + 'browser connect', + (late) => { + void withTimeout(late.close(), CLOSE_TIMEOUT_MS, 'late browser close').catch(() => {}); + } + ); + const browser = raw as unknown as PwBrowser; - let browser: PwBrowser; - let page: unknown; - - if (opts.cdpPort) { - const raw = await pw.chromium.connectOverCDP( - `http://127.0.0.1:${opts.cdpPort}` - ); - browser = raw as unknown as PwBrowser; - const ctx = browser.contexts()[0] || (await browser.newContext()); - page = await ctx.newPage(); - } else { - const raw = await pw.chromium.launch({ headless: !opts.headed }); - browser = raw as unknown as PwBrowser; - const ctx = await browser.newContext(); - page = await ctx.newPage(); + const newContext = () => + withTimeout(browser.newContext(), CREATE_TIMEOUT_MS, 'context create'); + let page: PwPage; + try { + const ctx = opts.cdpPort + ? browser.contexts()[0] || (await newContext()) + : await newContext(); + // A page that materializes after the deadline must be closed before we + // disconnect, or under CDP it survives as an orphan tab in the user's + // real browser. + const pending = ctx.newPage(); + page = await withTimeout(pending, CREATE_TIMEOUT_MS, 'page create', (late) => { + void late.close().catch(() => {}); + }); + } catch (err) { + await withTimeout(browser.close(), CLOSE_TIMEOUT_MS, 'browser close').catch(() => {}); + throw err; } return { browser, page, - close: () => browser.close(), + close: async () => { + // Under CDP, browser.close() only disconnects — close our tab first. + await withTimeout(page.close(), CLOSE_TIMEOUT_MS, 'page close').catch(() => {}); + await withTimeout(browser.close(), CLOSE_TIMEOUT_MS, 'browser close').catch(() => {}); + }, }; } diff --git a/packages/data-liberation-agent/src/lib/browser-kit/index.ts b/packages/data-liberation-agent/src/lib/browser-kit/index.ts index 0fac218eb9..3de9ce31f4 100644 --- a/packages/data-liberation-agent/src/lib/browser-kit/index.ts +++ b/packages/data-liberation-agent/src/lib/browser-kit/index.ts @@ -1,2 +1,4 @@ export { getPlaywright, connectBrowser, launchBrowser } from './browser-kit.js'; export type { ConnectBrowserOpts } from './browser-kit.js'; +export { createManagedBrowser } from './managed-browser.js'; +export type { ManagedBrowser, BrowserLease } from './managed-browser.js'; diff --git a/packages/data-liberation-agent/src/lib/browser-kit/managed-browser.test.ts b/packages/data-liberation-agent/src/lib/browser-kit/managed-browser.test.ts new file mode 100644 index 0000000000..c8f3436177 --- /dev/null +++ b/packages/data-liberation-agent/src/lib/browser-kit/managed-browser.test.ts @@ -0,0 +1,482 @@ +import { describe, it, expect, vi, beforeEach } from 'vitest'; +import { createManagedBrowser } from './managed-browser.js'; + +const { mockLaunch, mockPwLaunch } = vi.hoisted(() => ({ + mockLaunch: vi.fn(), + mockPwLaunch: vi.fn(), +})); +vi.mock('./browser-kit.js', async (importOriginal) => { + const mod = await importOriginal<typeof import('./browser-kit.js')>(); + return { ...mod, launchBrowser: mockLaunch }; +}); +vi.mock('playwright', () => ({ + chromium: { launch: mockPwLaunch, connectOverCDP: vi.fn() }, +})); + +function fakeSession() { + let connected = true; + let pageClosed = false; + return { + browser: { isConnected: () => connected }, + page: { id: Symbol('page'), isClosed: () => pageClosed }, + close: vi.fn(async () => { + connected = false; + }), + disconnect: () => { + connected = false; + }, + closePage: () => { + pageClosed = true; + }, + }; +} + +beforeEach(() => { + mockLaunch.mockReset(); + mockPwLaunch.mockReset(); +}); + +describe('createManagedBrowser', () => { + it('concurrent acquires share one launch', async () => { + const session = fakeSession(); + let resolveLaunch!: (s: unknown) => void; + mockLaunch.mockReturnValueOnce(new Promise((r) => { resolveLaunch = r; })); + const managed = createManagedBrowser({}); + + const a = managed.openLease().acquire(); + const b = managed.openLease().acquire(); + resolveLaunch(session); + const [ra, rb] = await Promise.all([a, b]); + + expect(mockLaunch).toHaveBeenCalledTimes(1); + expect(ra.page).toBe(session.page); + expect(rb.page).toBe(session.page); + }); + + it('relaunches on the next acquire after the browser disconnects', async () => { + const s1 = fakeSession(); + const s2 = fakeSession(); + mockLaunch.mockResolvedValueOnce(s1).mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + expect((await managed.openLease().acquire()).page).toBe(s1.page); + s1.disconnect(); + expect((await managed.openLease().acquire()).page).toBe(s2.page); + expect(mockLaunch).toHaveBeenCalledTimes(2); + expect(s1.close).toHaveBeenCalledTimes(1); + }); + + it('relaunches on the next acquire after the page is closed', async () => { + const s1 = fakeSession(); + const s2 = fakeSession(); + mockLaunch.mockResolvedValueOnce(s1).mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + expect((await managed.openLease().acquire()).page).toBe(s1.page); + s1.closePage(); + expect((await managed.openLease().acquire()).page).toBe(s2.page); + expect(mockLaunch).toHaveBeenCalledTimes(2); + expect(s1.close).toHaveBeenCalledTimes(1); + }); + + it('rejects acquire after end() without relaunching', async () => { + const s1 = fakeSession(); + mockLaunch.mockResolvedValueOnce(s1); + const managed = createManagedBrowser({}); + + await managed.openLease().acquire(); + await managed.end(); + expect(s1.close).toHaveBeenCalledTimes(1); + await expect(managed.openLease().acquire()).rejects.toThrow('after end()'); + expect(mockLaunch).toHaveBeenCalledTimes(1); + }); + + it('never launches when end() comes before any acquire', async () => { + const managed = createManagedBrowser({}); + await managed.end(); + await expect(managed.openLease().acquire()).rejects.toThrow('after end()'); + expect(mockLaunch).not.toHaveBeenCalled(); + }); + + it('reset() closes the session and a fresh lease gets a fresh one', async () => { + const s1 = fakeSession(); + const s2 = fakeSession(); + mockLaunch.mockResolvedValueOnce(s1).mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + await managed.openLease().acquire(); + await managed.reset(); + expect(s1.close).toHaveBeenCalledTimes(1); + expect((await managed.openLease().acquire()).page).toBe(s2.page); + }); + + it('a lease opened before reset() cannot acquire after it while a fresh lease can', async () => { + const s1 = fakeSession(); + const s2 = fakeSession(); + mockLaunch.mockResolvedValueOnce(s1).mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + const stale = managed.openLease(); + expect((await stale.acquire()).page).toBe(s1.page); + await managed.reset(); + + await expect(stale.acquire()).rejects.toThrow('lease invalidated'); + expect(mockLaunch).toHaveBeenCalledTimes(1); + expect((await managed.openLease().acquire()).page).toBe(s2.page); + expect(mockLaunch).toHaveBeenCalledTimes(2); + }); + + it('isValid() flips false after reset() and end() so late results can fence themselves', async () => { + mockLaunch.mockResolvedValueOnce(fakeSession()); + const managed = createManagedBrowser({}); + + const lease = managed.openLease(); + await lease.acquire(); + expect(lease.isValid()).toBe(true); + + await managed.reset(); + expect(lease.isValid()).toBe(false); + + const fresh = managed.openLease(); + expect(fresh.isValid()).toBe(true); + await managed.end(); + expect(fresh.isValid()).toBe(false); + }); + + it('surfaces a launch failure from acquire, then retries on the next acquire', async () => { + const s2 = fakeSession(); + mockLaunch.mockRejectedValueOnce(new Error('no chrome')).mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + await expect(managed.openLease().acquire()).rejects.toThrow('no chrome'); + expect((await managed.openLease().acquire()).page).toBe(s2.page); + }); + + it('reset() during a pending launch closes its session and invalidates the lease', async () => { + const s1 = fakeSession(); + let resolveLaunch!: (s: unknown) => void; + mockLaunch.mockReturnValueOnce(new Promise((r) => { resolveLaunch = r; })); + const managed = createManagedBrowser({}); + + const pending = managed.openLease().acquire(); + const pendingRejects = expect(pending).rejects.toThrow('lease invalidated'); + const resetDone = managed.reset(); + resolveLaunch(s1); + await resetDone; + + expect(s1.close).toHaveBeenCalledTimes(1); + await pendingRejects; + expect(mockLaunch).toHaveBeenCalledTimes(1); + }); + + it('reset() settles within its bound while a launch hangs, then closes the late session', async () => { + vi.useFakeTimers(); + try { + let resolveLaunch!: (s: unknown) => void; + mockLaunch.mockReturnValueOnce(new Promise((r) => { resolveLaunch = r; })); + const managed = createManagedBrowser({}); + + const pending = managed.openLease().acquire(); + const pendingRejects = expect(pending).rejects.toThrow('lease invalidated'); + const resetDone = managed.reset(); + await vi.advanceTimersByTimeAsync(5_000); + await expect(resetDone).resolves.toBeUndefined(); + + const s1 = fakeSession(); + resolveLaunch(s1); + await vi.advanceTimersByTimeAsync(0); + expect(s1.close).toHaveBeenCalledTimes(1); + await pendingRejects; + } finally { + vi.useRealTimers(); + } + }); + + it('an acquire that joined a dead launch retries instead of failing fresh-launch style', async () => { + const s1 = fakeSession(); + s1.disconnect(); + const s2 = fakeSession(); + let resolveLaunch!: (s: unknown) => void; + mockLaunch + .mockReturnValueOnce(new Promise((r) => { resolveLaunch = r; })) + .mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + const first = managed.openLease().acquire(); + const joiner = managed.openLease().acquire(); + const firstRejects = expect(first).rejects.toThrow('disconnected right after launch'); + resolveLaunch(s1); + + await firstRejects; + expect((await joiner).page).toBe(s2.page); + expect(mockLaunch).toHaveBeenCalledTimes(2); + expect(s1.close).toHaveBeenCalledTimes(1); + }); + + it('acquire rejects when the launch hangs, closes the late session once, and relaunches next time', async () => { + vi.useFakeTimers(); + try { + let resolveLaunch!: (s: unknown) => void; + const s2 = fakeSession(); + mockLaunch + .mockReturnValueOnce(new Promise((r) => { resolveLaunch = r; })) + .mockResolvedValueOnce(s2); + const managed = createManagedBrowser({}); + + const pending = managed.openLease().acquire(); + const pendingRejects = expect(pending).rejects.toThrow('timed out'); + await vi.advanceTimersByTimeAsync(60_000); + await pendingRejects; + + const s1 = fakeSession(); + resolveLaunch(s1); + await vi.advanceTimersByTimeAsync(0); + expect(s1.close).toHaveBeenCalledTimes(1); + + expect((await managed.openLease().acquire()).page).toBe(s2.page); + expect(mockLaunch).toHaveBeenCalledTimes(2); + expect(s1.close).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('reset() during a hung launch plus the launch timeout close the late session exactly once', async () => { + vi.useFakeTimers(); + try { + let resolveLaunch!: (s: unknown) => void; + mockLaunch.mockReturnValueOnce(new Promise((r) => { resolveLaunch = r; })); + const managed = createManagedBrowser({}); + + const pending = managed.openLease().acquire(); + const pendingRejects = expect(pending).rejects.toThrow('timed out'); + const resetDone = managed.reset(); + await vi.advanceTimersByTimeAsync(5_000); + await expect(resetDone).resolves.toBeUndefined(); + await vi.advanceTimersByTimeAsync(60_000); + await pendingRejects; + + const s1 = fakeSession(); + resolveLaunch(s1); + await vi.advanceTimersByTimeAsync(0); + expect(s1.close).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('end() resolves even when the close hangs', async () => { + vi.useFakeTimers(); + try { + const s1 = fakeSession(); + s1.close.mockReturnValue(new Promise(() => {})); + mockLaunch.mockResolvedValueOnce(s1); + const managed = createManagedBrowser({}); + + await managed.openLease().acquire(); + const done = managed.end(); + await vi.advanceTimersByTimeAsync(10_000); + await expect(done).resolves.toBeUndefined(); + } finally { + vi.useRealTimers(); + } + }); +}); + +describe('launchBrowser close()', () => { + it('closes a browser that connects after the deadline', async () => { + vi.useFakeTimers(); + try { + let resolveLaunch!: (browser: unknown) => void; + const browserClose = vi.fn(async () => {}); + mockPwLaunch.mockReturnValueOnce(new Promise((resolve) => { resolveLaunch = resolve; })); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const pendingRejects = expect(launchBrowser({})).rejects.toThrow('browser connect timed out'); + await vi.advanceTimersByTimeAsync(60_000); + await pendingRejects; + + resolveLaunch({ + contexts: () => [], + newContext: vi.fn(), + close: browserClose, + isConnected: () => true, + }); + await vi.advanceTimersByTimeAsync(0); + expect(browserClose).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('still closes the browser when page.close() hangs', async () => { + vi.useFakeTimers(); + try { + const page = { close: vi.fn(() => new Promise<void>(() => {})) }; + const ctx = { newPage: vi.fn(async () => page) }; + const browserClose = vi.fn(async () => {}); + mockPwLaunch.mockResolvedValueOnce({ + contexts: () => [], + newContext: vi.fn(async () => ctx), + close: browserClose, + isConnected: () => true, + }); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const session = await launchBrowser({}); + const closing = session.close(); + await vi.advanceTimersByTimeAsync(3_000); + await closing; + + expect(page.close).toHaveBeenCalledTimes(1); + expect(browserClose).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('rejects within the bound and closes the browser when newContext() hangs', async () => { + vi.useFakeTimers(); + try { + const browserClose = vi.fn(async () => {}); + mockPwLaunch.mockResolvedValueOnce({ + contexts: () => [], + newContext: vi.fn(() => new Promise(() => {})), + close: browserClose, + isConnected: () => true, + }); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const pendingRejects = expect(launchBrowser({})).rejects.toThrow('timed out'); + await vi.advanceTimersByTimeAsync(30_000); + await pendingRejects; + expect(browserClose).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('rejects within the bound and closes the browser when newPage() hangs', async () => { + vi.useFakeTimers(); + try { + const ctx = { newPage: vi.fn(() => new Promise(() => {})) }; + const browserClose = vi.fn(async () => {}); + mockPwLaunch.mockResolvedValueOnce({ + contexts: () => [], + newContext: vi.fn(async () => ctx), + close: browserClose, + isConnected: () => true, + }); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const pendingRejects = expect(launchBrowser({})).rejects.toThrow('timed out'); + await vi.advanceTimersByTimeAsync(30_000); + await pendingRejects; + expect(browserClose).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('under cdp, a page that arrives after the deadline is closed instead of orphaned', async () => { + vi.useFakeTimers(); + try { + let resolvePage!: (p: unknown) => void; + const latePage = { close: vi.fn(async () => {}) }; + const ctx = { newPage: vi.fn(() => new Promise((r) => { resolvePage = r; })) }; + const browserClose = vi.fn(async () => {}); + const pw = await import('playwright'); + vi.mocked(pw.chromium.connectOverCDP).mockResolvedValueOnce({ + contexts: () => [ctx], + newContext: vi.fn(), + close: browserClose, + isConnected: () => true, + } as never); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const pendingRejects = expect(launchBrowser({ cdpPort: 9222 })).rejects.toThrow('page create timed out'); + await vi.advanceTimersByTimeAsync(30_000); + await pendingRejects; + expect(browserClose).toHaveBeenCalledTimes(1); + + resolvePage(latePage); + await vi.advanceTimersByTimeAsync(0); + expect(latePage.close).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('under cdp with no existing context, a hanging newContext() rejects and disconnects', async () => { + vi.useFakeTimers(); + try { + const browserClose = vi.fn(async () => {}); + const pw = await import('playwright'); + vi.mocked(pw.chromium.connectOverCDP).mockResolvedValueOnce({ + contexts: () => [], + newContext: vi.fn(() => new Promise(() => {})), + close: browserClose, + isConnected: () => true, + } as never); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const pendingRejects = expect(launchBrowser({ cdpPort: 9222 })).rejects.toThrow('context create timed out'); + await vi.advanceTimersByTimeAsync(30_000); + await pendingRejects; + expect(browserClose).toHaveBeenCalledTimes(1); + } finally { + vi.useRealTimers(); + } + }); + + it('resolves with a page when context and page creation settle promptly', async () => { + const page = { close: vi.fn(async () => {}) }; + const ctx = { newPage: vi.fn(async () => page) }; + const browserClose = vi.fn(async () => {}); + mockPwLaunch.mockResolvedValueOnce({ + contexts: () => [], + newContext: vi.fn(async () => ctx), + close: browserClose, + isConnected: () => true, + }); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + const session = await launchBrowser({}); + expect(session.page).toBe(page); + expect(browserClose).not.toHaveBeenCalled(); + await session.close(); + expect(browserClose).toHaveBeenCalledTimes(1); + }); + + it('closes the browser when page creation fails after launch', async () => { + const browserClose = vi.fn(async () => {}); + mockPwLaunch.mockResolvedValueOnce({ + contexts: () => [], + newContext: vi.fn(async () => { + throw new Error('no context'); + }), + close: browserClose, + isConnected: () => true, + }); + + const { launchBrowser } = await vi.importActual<typeof import('./browser-kit.js')>( + './browser-kit.js' + ); + await expect(launchBrowser({})).rejects.toThrow('no context'); + expect(browserClose).toHaveBeenCalledTimes(1); + }); +}); diff --git a/packages/data-liberation-agent/src/lib/browser-kit/managed-browser.ts b/packages/data-liberation-agent/src/lib/browser-kit/managed-browser.ts new file mode 100644 index 0000000000..f35170c316 --- /dev/null +++ b/packages/data-liberation-agent/src/lib/browser-kit/managed-browser.ts @@ -0,0 +1,125 @@ +import { launchBrowser } from './browser-kit.js'; +import { withTimeout } from '../concurrency.js'; + +type BrowserSession = Awaited<ReturnType<typeof launchBrowser>>; + +const CLOSE_TIMEOUT_MS = 10_000; +const LAUNCH_SETTLE_TIMEOUT_MS = 5_000; +const LAUNCH_TIMEOUT_MS = 60_000; + +export interface BrowserLease { + acquire(): Promise<{ page: unknown }>; + /** False once reset()/end() invalidated this lease — late results must not + * touch shared state after that. */ + isValid(): boolean; +} + +export interface ManagedBrowser { + /** Fencing token: reset()/end() invalidate every lease opened before them. */ + openLease(): BrowserLease; + reset(): Promise<void>; + end(): Promise<void>; +} + +/** + * One lazily launched browser shared by many callers. Concurrent acquires + * share a single launch; a crashed browser or closed page is relaunched on + * the next acquire; reset() drops the session so the next acquire starts + * fresh; end() closes it for good. All acquiring goes through leases — + * reset()/end() invalidate previously opened leases, so a caller abandoned + * by a watchdog can never touch the replacement session. All closes are + * bounded and swallowed; launch failures reject the acquire that hit them. + */ +export function createManagedBrowser(opts: { + cdpPort?: number; + headed?: boolean; +}): ManagedBrowser { + let launching: Promise<BrowserSession> | null = null; + let ended = false; + let epoch = 0; + + const boundedClose = (session: BrowserSession): Promise<void> => + withTimeout(session.close(), CLOSE_TIMEOUT_MS, 'managed browser close').catch(() => {}); + + // A late session from a hung launch can get a close scheduled by several + // paths (timed-out acquires, reset()/end()'s settle) — close it exactly once. + const disposed = new WeakSet<BrowserSession>(); + const disposeOnce = (session: BrowserSession): Promise<void> => { + if (disposed.has(session)) return Promise.resolve(); + disposed.add(session); + return boundedClose(session); + }; + + // Bounded even when the launch itself hangs: after the deadline the pending + // session is abandoned and closed whenever it eventually arrives. + const closeSession = async (p: Promise<BrowserSession>): Promise<void> => { + const session = await withTimeout( + p, + LAUNCH_SETTLE_TIMEOUT_MS, + 'managed browser launch settle', + disposeOnce + ).catch(() => null); + if (session) await disposeOnce(session); + }; + + const isDead = (session: BrowserSession): boolean => + !session.browser.isConnected() || + (session.page as { isClosed?: () => boolean }).isClosed?.() === true; + + const acquire = async (leaseEpoch: number): Promise<{ page: unknown }> => { + for (;;) { + if (ended) throw new Error('managed browser: acquire() after end()'); + if (leaseEpoch !== epoch) { + throw new Error('managed browser: lease invalidated by reset()'); + } + let launchedFresh = false; + let attempt = launching; + if (!attempt) { + attempt = launching = launchBrowser(opts); + launchedFresh = true; + } + let session: BrowserSession; + try { + session = await withTimeout(attempt, LAUNCH_TIMEOUT_MS, 'managed browser launch', disposeOnce); + } catch (err) { + if (launching === attempt) launching = null; + throw err; + } + if (ended) throw new Error('managed browser: acquire() after end()'); + if (leaseEpoch !== epoch) { + throw new Error('managed browser: lease invalidated by reset()'); + } + if (launching !== attempt) continue; + if (isDead(session)) { + launching = null; + await closeSession(attempt); + if (launchedFresh) throw new Error('managed browser: disconnected right after launch'); + continue; + } + return { page: session.page }; + } + }; + + return { + openLease() { + const leaseEpoch = epoch; + return { + acquire: () => acquire(leaseEpoch), + isValid: () => !ended && leaseEpoch === epoch, + }; + }, + async reset() { + epoch++; + const old = launching; + launching = null; + if (old) await closeSession(old); + }, + async end() { + ended = true; + epoch++; + const old = launching; + launching = null; + if (old) await closeSession(old); + }, + }; +} diff --git a/packages/data-liberation-agent/src/lib/concurrency.test.ts b/packages/data-liberation-agent/src/lib/concurrency.test.ts index f65ca45955..17b26914bd 100644 --- a/packages/data-liberation-agent/src/lib/concurrency.test.ts +++ b/packages/data-liberation-agent/src/lib/concurrency.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect } from 'vitest'; -import { mapPool } from './concurrency.js'; +import { describe, it, expect, vi } from 'vitest'; +import { mapPool, withTimeout, TimeoutError } from './concurrency.js'; const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); @@ -43,3 +43,105 @@ describe('mapPool', () => { expect(await mapPool([1, 2, 3], 0, async (x) => x * 2)).toEqual([2, 4, 6]); }); }); + +describe('withTimeout', () => { + it('resolves with the promise value when it settles in time', async () => { + expect(await withTimeout(Promise.resolve(42), 1000, 'fast')).toBe(42); + }); + + it('propagates the promise rejection when it rejects in time', async () => { + await expect(withTimeout(Promise.reject(new Error('boom')), 1000, 'rejecting')) + .rejects.toThrow('boom'); + }); + + it('rejects with the label when the promise never settles', async () => { + const never = new Promise<void>(() => {}); + await expect(withTimeout(never, 10, 'stuck call')) + .rejects.toThrow('stuck call timed out after 10ms'); + }); + + it('rejects with a TimeoutError carrying the label', async () => { + const err = await withTimeout(new Promise<void>(() => {}), 10, 'watchdog').catch((e) => e); + expect(err).toBeInstanceOf(TimeoutError); + expect((err as TimeoutError).label).toBe('watchdog'); + }); + + it('calls onLateResolve with the value when the promise resolves after the deadline', async () => { + let resolveLate!: (v: number) => void; + const p = new Promise<number>((r) => { resolveLate = r; }); + const onLate = vi.fn(); + await expect(withTimeout(p, 10, 'late', onLate)).rejects.toThrow('late timed out after 10ms'); + expect(onLate).not.toHaveBeenCalled(); + resolveLate(42); + await sleep(0); + expect(onLate).toHaveBeenCalledExactlyOnceWith(42); + }); + + it('does not call onLateResolve when the promise resolves in time', async () => { + const onLate = vi.fn(); + expect(await withTimeout(Promise.resolve(1), 1000, 'in time', onLate)).toBe(1); + await sleep(20); + expect(onLate).not.toHaveBeenCalled(); + }); + + it('swallows a late rejection instead of raising an unhandled rejection', async () => { + let rejectLate!: (e: Error) => void; + const p = new Promise<void>((_, rj) => { rejectLate = rj; }); + const onLate = vi.fn(); + await expect(withTimeout(p, 10, 'late-reject', onLate)).rejects.toThrow('timed out'); + + const unhandled: unknown[] = []; + const capture = (err: unknown) => unhandled.push(err); + process.on('unhandledRejection', capture); + try { + rejectLate(new Error('late boom')); + await sleep(20); + } finally { + process.off('unhandledRejection', capture); + } + expect(unhandled).toEqual([]); + expect(onLate).not.toHaveBeenCalled(); + }); + + it('swallows an onLateResolve error instead of raising an unhandled rejection', async () => { + let resolveLate!: (v: number) => void; + const p = new Promise<number>((r) => { resolveLate = r; }); + await expect( + withTimeout(p, 10, 'late-throw', () => { throw new Error('disposal failed'); }) + ).rejects.toThrow('timed out'); + + const unhandled: unknown[] = []; + const capture = (err: unknown) => unhandled.push(err); + process.on('unhandledRejection', capture); + try { + resolveLate(1); + await sleep(20); + } finally { + process.off('unhandledRejection', capture); + } + expect(unhandled).toEqual([]); + }); + + // Mirrors the wix CDP wiring (adapters/wix/page.ts): a session that resolves + // after the deadline is never assigned to the caller's variable, so its + // finally-detach can't see it — the late-resolve hook must detach it. + it('detaches a CDP session created after the deadline', async () => { + const client = { detach: vi.fn(() => Promise.resolve()) }; + let resolveSession!: (c: typeof client) => void; + const sessionPromise = new Promise<typeof client>((r) => { resolveSession = r; }); + + let assigned: typeof client | null = null; + try { + assigned = await withTimeout( + sessionPromise, 10, 'CDP session', + (c) => { void c.detach().catch(() => {}); }); + } catch { + // timed out — session abandoned + } + resolveSession(client); + await sleep(0); + + expect(assigned).toBeNull(); + expect(client.detach).toHaveBeenCalledTimes(1); + }); +}); diff --git a/packages/data-liberation-agent/src/lib/concurrency.ts b/packages/data-liberation-agent/src/lib/concurrency.ts index 8d25bb33f6..ab0f36fdcd 100644 --- a/packages/data-liberation-agent/src/lib/concurrency.ts +++ b/packages/data-liberation-agent/src/lib/concurrency.ts @@ -29,3 +29,44 @@ export async function mapPool<T, R>( await Promise.all(Array.from({ length: workers }, () => worker())); return results; } + +/** Deadline rejection from withTimeout; `label` tells whose deadline fired. */ +export class TimeoutError extends Error { + readonly label: string; + constructor(label: string, ms: number) { + super(`${label} timed out after ${ms}ms`); + this.name = 'TimeoutError'; + this.label = label; + } +} + +/** + * Race a promise against a hard deadline, rejecting with a labeled TimeoutError. + * The operation is NOT cancelled — the caller abandons it — so use this to bound + * awaits that may never settle (e.g. Playwright calls against a frozen renderer). + * `onLateResolve` disposes a value that resolves after the deadline; its errors + * and late rejections are swallowed. + */ +export async function withTimeout<T>( + p: Promise<T>, + ms: number, + label: string, + onLateResolve?: (value: T) => void | Promise<void>, +): Promise<T> { + let timer: NodeJS.Timeout | undefined; + let timedOut = false; + const timeout = new Promise<never>((_, reject) => { + timer = setTimeout(() => { + timedOut = true; + reject(new TimeoutError(label, ms)); + }, ms); + }); + try { + return await Promise.race([p, timeout]); + } finally { + if (timer) clearTimeout(timer); + if (timedOut && onLateResolve) { + p.then(onLateResolve).catch(() => {}); + } + } +} diff --git a/packages/data-liberation-agent/src/lib/media-fetch/media.ts b/packages/data-liberation-agent/src/lib/media-fetch/media.ts index f369101382..c996272b98 100644 --- a/packages/data-liberation-agent/src/lib/media-fetch/media.ts +++ b/packages/data-liberation-agent/src/lib/media-fetch/media.ts @@ -340,6 +340,8 @@ export async function downloadMedia( const ext = extname(filename); const pngFilename = safeFilename(`${filename.slice(0, -ext.length)}.png`, seenNames); const pngPath = resolveMediaPath(pngFilename, outputDir); + // rasterizeSvg bounds its own browser calls and never throws — a + // frozen raster browser degrades to rasterError, not a hung loop. const raster = await rasterizeSvg(destPath, pngPath); svgExtras = raster.ok ? { svgRisky, rasterPath: pngPath } diff --git a/packages/data-liberation-agent/src/lib/media-fetch/svg-raster-lifecycle.test.ts b/packages/data-liberation-agent/src/lib/media-fetch/svg-raster-lifecycle.test.ts new file mode 100644 index 0000000000..b70e843fc8 --- /dev/null +++ b/packages/data-liberation-agent/src/lib/media-fetch/svg-raster-lifecycle.test.ts @@ -0,0 +1,186 @@ +import { describe, it, expect, vi, beforeEach, afterAll, afterEach } from 'vitest'; +import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; + +// Browser-lifecycle behavior (timeouts, cache invalidation, bounded close) +// tested against fakes — the real-Chromium render path is covered in +// svg-raster.test.ts. +const { mockGetPlaywright } = vi.hoisted(() => ({ mockGetPlaywright: vi.fn() })); +vi.mock('../browser-kit/index.js', async (importOriginal) => { + const mod = await importOriginal<typeof import('../browser-kit/index.js')>(); + return { ...mod, getPlaywright: mockGetPlaywright }; +}); + +// cwd-local tmp dir per repo guidance (no os.tmpdir, no output/ reads). +const TMP_ROOT = join(process.cwd(), '.tmp-test', 'svg-raster-lifecycle'); +const SVG_PATH = join(TMP_ROOT, 'shape.svg'); + +// Fresh module per test — the rasterizer caches its browser at module level. +async function loadModule(): Promise<typeof import('./svg-raster.js')> { + vi.resetModules(); + return await import('./svg-raster.js'); +} + +function fakeBrowser() { + let connected = true; + const page = { + evaluate: vi.fn(async () => ({ loaded: true, w: 200, h: 100 })), + setViewportSize: vi.fn(async () => {}), + setContent: vi.fn(async () => {}), + locator: vi.fn(() => ({ + screenshot: vi.fn(async ({ path }: { path: string }) => { + writeFileSync(path, 'fake-png-bytes'); + }), + })), + }; + const context = { + addInitScript: vi.fn(async () => {}), + newPage: vi.fn(async () => page), + close: vi.fn(async () => {}), + }; + return { + newContext: vi.fn(async () => { + if (!connected) throw new Error('Browser has been closed'); + return context; + }), + close: vi.fn(async () => { + connected = false; + }), + isConnected: () => connected, + disconnect: () => { + connected = false; + }, + page, + context, + }; +} + +function stubLaunches(...browsers: unknown[]) { + const launch = vi.fn(); + for (const b of browsers) { + if (typeof b === 'function') launch.mockImplementationOnce(b as () => unknown); + else launch.mockResolvedValueOnce(b); + } + mockGetPlaywright.mockResolvedValue({ chromium: { launch } }); + return launch; +} + +beforeEach(() => { + mockGetPlaywright.mockReset(); + mkdirSync(TMP_ROOT, { recursive: true }); + writeFileSync(SVG_PATH, '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100"/>'); +}); + +afterEach(() => { + vi.useRealTimers(); +}); + +afterAll(() => { + rmSync(TMP_ROOT, { recursive: true, force: true }); +}); + +describe('rasterizeSvg browser lifecycle', () => { + it('a render timeout drops the cached browser so the next call relaunches', async () => { + vi.useFakeTimers(); + const { rasterizeSvg } = await loadModule(); + const b1 = fakeBrowser(); + b1.page.evaluate.mockReturnValue(new Promise(() => {})); + const b2 = fakeBrowser(); + const launch = stubLaunches(b1, b2); + + const first = rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'a.png')); + await vi.advanceTimersByTimeAsync(60_000); + const r1 = await first; + expect(r1.ok).toBe(false); + if (!r1.ok) expect(r1.error).toContain('timed out'); + await vi.advanceTimersByTimeAsync(0); + expect(b1.close).toHaveBeenCalledTimes(1); + + const r2 = await rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'b.png')); + expect(r2.ok).toBe(true); + expect(existsSync(join(TMP_ROOT, 'b.png'))).toBe(true); + expect(launch).toHaveBeenCalledTimes(2); + expect(b1.close).toHaveBeenCalledTimes(1); + }); + + it('a hung launch times out and the late browser is closed exactly once', async () => { + vi.useFakeTimers(); + const { rasterizeSvg, closeSvgRasterizer } = await loadModule(); + let resolveLaunch!: (b: unknown) => void; + stubLaunches(() => new Promise((r) => { resolveLaunch = r; })); + + const first = rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'c.png')); + await vi.advanceTimersByTimeAsync(30_000); + const r1 = await first; + expect(r1.ok).toBe(false); + if (!r1.ok) expect(r1.error).toContain('timed out'); + + const b1 = fakeBrowser(); + resolveLaunch(b1); + await vi.advanceTimersByTimeAsync(0); + expect(b1.close).toHaveBeenCalledTimes(1); + + await closeSvgRasterizer(); + expect(b1.close).toHaveBeenCalledTimes(1); + }); + + it('a failure that killed the browser drops the cache so the next call relaunches', async () => { + const { rasterizeSvg } = await loadModule(); + const b1 = fakeBrowser(); + b1.newContext.mockImplementation(async () => { + b1.disconnect(); + throw new Error('Target closed'); + }); + const b2 = fakeBrowser(); + const launch = stubLaunches(b1, b2); + + const r1 = await rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'd.png')); + expect(r1.ok).toBe(false); + if (!r1.ok) expect(r1.error).toContain('Target closed'); + await new Promise((r) => setTimeout(r, 0)); + expect(b1.close).toHaveBeenCalledTimes(1); + + const r2 = await rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'e.png')); + expect(r2.ok).toBe(true); + expect(launch).toHaveBeenCalledTimes(2); + }); + + it('closeSvgRasterizer settles when the browser close hangs', async () => { + vi.useFakeTimers(); + const { rasterizeSvg, closeSvgRasterizer } = await loadModule(); + const b1 = fakeBrowser(); + b1.close.mockReturnValue(new Promise(() => {})); + stubLaunches(b1); + + expect((await rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'f.png'))).ok).toBe(true); + + const closing = closeSvgRasterizer(); + await vi.advanceTimersByTimeAsync(10_000); + await expect(closing).resolves.toBeUndefined(); + expect(b1.close).toHaveBeenCalledTimes(1); + }); + + it('closeSvgRasterizer settles while the launch itself hangs, then closes the late browser', async () => { + vi.useFakeTimers(); + const { rasterizeSvg, closeSvgRasterizer } = await loadModule(); + let resolveLaunch!: (b: unknown) => void; + stubLaunches(() => new Promise((r) => { resolveLaunch = r; })); + + const first = rasterizeSvg(SVG_PATH, join(TMP_ROOT, 'g.png')); + const firstSettles = first.then((r) => { + expect(r.ok).toBe(false); + }); + const closing = closeSvgRasterizer(); + await vi.advanceTimersByTimeAsync(10_000); + await expect(closing).resolves.toBeUndefined(); + + const b1 = fakeBrowser(); + resolveLaunch(b1); + await vi.advanceTimersByTimeAsync(0); + expect(b1.close).toHaveBeenCalledTimes(1); + + await vi.advanceTimersByTimeAsync(30_000); + await firstSettles; + expect(b1.close).toHaveBeenCalledTimes(1); + }); +}); diff --git a/packages/data-liberation-agent/src/lib/media-fetch/svg-raster.ts b/packages/data-liberation-agent/src/lib/media-fetch/svg-raster.ts index b43287a52f..4691464a35 100644 --- a/packages/data-liberation-agent/src/lib/media-fetch/svg-raster.ts +++ b/packages/data-liberation-agent/src/lib/media-fetch/svg-raster.ts @@ -1,5 +1,7 @@ import { readFileSync, renameSync, unlinkSync } from 'fs'; +import { basename } from 'path'; import { getPlaywright } from '../browser-kit/index.js'; +import { withTimeout } from '../concurrency.js'; /** * SVG → PNG raster sibling support for fetched media. @@ -26,6 +28,10 @@ export type RasterizeResult = | { ok: true; width: number; height: number } | { ok: false; error: string }; +const LAUNCH_TIMEOUT_MS = 30_000; +const RENDER_TIMEOUT_MS = 60_000; +const CLOSE_TIMEOUT_MS = 10_000; + type CachedBrowser = Awaited<ReturnType<(typeof import('playwright'))['chromium']['launch']>>; /** @@ -39,29 +45,48 @@ type CachedBrowser = Awaited<ReturnType<(typeof import('playwright'))['chromium' */ let browserPromise: Promise<CachedBrowser> | null = null; -async function getRasterBrowser(): Promise<CachedBrowser> { +function getRasterBrowser(): Promise<CachedBrowser> { if (!browserPromise) { - browserPromise = (async () => { + const attempt: Promise<CachedBrowser> = (async () => { const pw = await getPlaywright(); return pw.chromium.launch({ headless: true }); })().catch((err) => { // Failed launch must not poison the cache — let the next call retry. - browserPromise = null; + if (browserPromise === attempt) browserPromise = null; throw err; }); + browserPromise = attempt; } return browserPromise; } -/** Close the shared rasterizer browser (idempotent; safe when never launched). */ +const boundedBrowserClose = (browser: CachedBrowser): Promise<void> => + withTimeout(browser.close(), CLOSE_TIMEOUT_MS, 'svg raster browser close').catch(() => {}); + +/** + * Drop `pending` from the cache (so the next SVG relaunches fresh) and close + * its browser once it exists. Idempotent per attempt: only the call that still + * owns the cache slot closes, so a browser is never disposed twice. + */ +function dropRasterBrowser(pending: Promise<CachedBrowser>): void { + if (browserPromise !== pending) return; + browserPromise = null; + void pending.then(boundedBrowserClose).catch(() => {}); +} + +/** Close the shared rasterizer browser (idempotent; safe when never launched). + * Bounded — a hung launch or close can never stall final cleanup. */ export async function closeSvgRasterizer(): Promise<void> { const pending = browserPromise; browserPromise = null; if (!pending) return; try { - await (await pending).close(); + const browser = await withTimeout( + pending, CLOSE_TIMEOUT_MS, 'svg rasterizer close settle', + (late) => { void boundedBrowserClose(late); }); + await boundedBrowserClose(browser); } catch { - // already closed / launch failed — nothing to do + // launch failed or never settled — nothing to close } } @@ -75,11 +100,43 @@ const SVG_LOAD_TIMEOUT_MS = 10000; * the zero-dimension guard). NEVER throws — failures return `{ok:false}` so a * raster problem can't fail the media fetch that triggered it. The PNG write * is atomic (unique tmp + rename). + * + * Launch and render are each bounded (Playwright's evaluate has no default + * timeout). A timeout — or a failure that left the shared browser dead — + * drops the cached browser so the next SVG relaunches fresh. */ export async function rasterizeSvg( svgPath: string, pngPath: string, maxEdge = 1024, +): Promise<RasterizeResult> { + const pending = getRasterBrowser(); + let browser: CachedBrowser; + try { + browser = await withTimeout(pending, LAUNCH_TIMEOUT_MS, 'svg raster launch'); + } catch (err) { + dropRasterBrowser(pending); + return { ok: false, error: (err as Error).message }; + } + try { + const result = await withTimeout( + renderToPng(browser, svgPath, pngPath, maxEdge), + RENDER_TIMEOUT_MS, + `svg raster ${basename(svgPath)}`, + ); + if (!result.ok && !browser.isConnected()) dropRasterBrowser(pending); + return result; + } catch (err) { + dropRasterBrowser(pending); + return { ok: false, error: (err as Error).message }; + } +} + +async function renderToPng( + browser: CachedBrowser, + svgPath: string, + pngPath: string, + maxEdge: number, ): Promise<RasterizeResult> { let context: Awaited<ReturnType<CachedBrowser['newContext']>> | null = null; const tmpPath = `${pngPath}.tmp-${process.pid}-${Date.now()}`; @@ -89,7 +146,6 @@ export async function rasterizeSvg( const svgBytes = readFileSync(svgPath); const dataUrl = `data:image/svg+xml;base64,${svgBytes.toString('base64')}`; - const browser = await getRasterBrowser(); context = await browser.newContext({ viewport: { width: maxEdge, height: maxEdge } }); // Polyfill tsx/esbuild's __name helper inside the page (mirrors screenshotter) — // page.evaluate closures serialized under tsx carry __name() instrumentation. @@ -147,6 +203,11 @@ export async function rasterizeSvg( try { unlinkSync(tmpPath); } catch { /* no partial tmp to clean */ } return { ok: false, error: (err as Error).message }; } finally { - try { await context?.close(); } catch { /* browser already gone */ } + // Bounded so a hung close can't hold a finished render past the deadline. + if (context) { + await withTimeout(context.close(), CLOSE_TIMEOUT_MS, 'svg raster context close').catch( + () => {} + ); + } } }