@zibby/core 0.1.33 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/base.js +319 -14
- package/dist/backend-client.js +1 -1
- package/dist/constants/tool-names.js +1 -1
- package/dist/constants/zibby-scratch.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/enrichment/base.js +1 -1
- package/dist/enrichment/enrichers/accessibility-enricher.js +1 -1
- package/dist/enrichment/enrichers/dom-enricher.js +1 -1
- package/dist/enrichment/enrichers/page-state-enricher.js +1 -1
- package/dist/enrichment/enrichers/position-enricher.js +1 -1
- package/dist/enrichment/index.js +4 -1
- package/dist/enrichment/mcp-integration.js +4 -1
- package/dist/enrichment/mcp-ref-enricher.js +1 -1
- package/dist/enrichment/pipeline.js +2 -2
- package/dist/enrichment/trace-text-enricher.js +2 -1
- package/dist/framework/agents/assistant-strategy.js +69 -5
- package/dist/framework/agents/base.js +1 -1
- package/dist/framework/agents/claude-strategy.js +107 -4
- package/dist/framework/agents/codex-strategy.js +23 -4
- package/dist/framework/agents/cursor-strategy.js +138 -20
- package/dist/framework/agents/gemini-strategy.js +34 -7
- package/dist/framework/agents/index.js +285 -6
- package/dist/framework/agents/middleware/assistant-round-pipeline.js +2 -2
- package/dist/framework/agents/providers/base.js +1 -1
- package/dist/framework/agents/providers/index.js +4 -1
- package/dist/framework/agents/providers/openai-transport.js +4 -2
- package/dist/framework/agents/providers/openai.js +1 -1
- package/dist/framework/agents/providers/transport-base.js +1 -1
- package/dist/framework/agents/utils/auth-resolver.js +1 -1
- package/dist/framework/agents/utils/cursor-output-formatter.js +25 -1
- package/dist/framework/agents/utils/openai-proxy-formatter.js +75 -5
- package/dist/framework/agents/utils/payload-budget.js +2 -2
- package/dist/framework/agents/utils/structured-output-formatter.js +8 -4
- package/dist/framework/code-generator.js +309 -10
- package/dist/framework/constants.js +1 -1
- package/dist/framework/context-loader.js +2 -2
- package/dist/framework/function-bridge.js +60 -1
- package/dist/framework/function-skill-registry.js +1 -1
- package/dist/framework/graph-compiler.js +314 -1
- package/dist/framework/graph.js +305 -4
- package/dist/framework/index.js +331 -1
- package/dist/framework/mcp-client.js +56 -2
- package/dist/framework/node-registry.js +294 -3
- package/dist/framework/node.js +297 -4
- package/dist/framework/output-parser.js +2 -2
- package/dist/framework/skill-registry.js +1 -1
- package/dist/framework/state-utils.js +5 -1
- package/dist/framework/state.js +1 -1
- package/dist/framework/tool-resolver.js +1 -1
- package/dist/index.js +512 -5
- package/dist/package.json +1 -1
- package/dist/runtime/generation/base.js +1 -1
- package/dist/runtime/generation/index.js +58 -3
- package/dist/runtime/generation/mcp-ref-strategy.js +17 -17
- package/dist/runtime/generation/stable-id-strategy.js +14 -14
- package/dist/runtime/stable-id-runtime.js +1 -1
- package/dist/runtime/verification/base.js +1 -1
- package/dist/runtime/verification/index.js +3 -3
- package/dist/runtime/verification/playwright-json-strategy.js +1 -1
- package/dist/runtime/zibby-runtime.js +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/uploader.js +1 -1
- package/dist/tools/run-playwright-test.js +3 -3
- package/dist/utils/adf-converter.js +1 -1
- package/dist/utils/ast-utils.js +9 -1
- package/dist/utils/ci-setup.js +4 -4
- package/dist/utils/cursor-mcp-isolated-home.js +1 -1
- package/dist/utils/cursor-utils.js +1 -1
- package/dist/utils/live-frame-discovery.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/mcp-config-writer.js +4 -4
- package/dist/utils/mission-control-from-run-states.js +1 -1
- package/dist/utils/node-schema-parser.js +9 -1
- package/dist/utils/parallel-config.js +1 -1
- package/dist/utils/post-process-events.js +2 -1
- package/dist/utils/repo-clone.js +1 -0
- package/dist/utils/result-handler.js +1 -1
- package/dist/utils/ripple-effect.js +1 -1
- package/dist/utils/run-capacity-coordinator.js +3 -1
- package/dist/utils/run-capacity-queue.js +2 -2
- package/dist/utils/run-index-merge.js +1 -1
- package/dist/utils/run-index-post-cli.js +4 -1
- package/dist/utils/run-registry.js +3 -3
- package/dist/utils/run-state-session.js +2 -2
- package/dist/utils/selector-generator.js +4 -4
- package/dist/utils/session-state-constants.js +1 -1
- package/dist/utils/session-state-live-runs.js +1 -1
- package/dist/utils/streaming-parser.js +3 -3
- package/dist/utils/test-post-processor.js +14 -11
- package/dist/utils/timeline.js +6 -6
- package/dist/utils/trace-parser.js +2 -2
- package/dist/utils/video-organizer.js +3 -3
- package/package.json +1 -1
- package/templates/browser-test-automation/result-handler.mjs +4 -39
|
@@ -1,13 +1,292 @@
|
|
|
1
|
-
import{CursorAgentStrategy as u}from"./cursor-strategy.js";import{ClaudeAgentStrategy as f}from"./claude-strategy.js";import{CodexAgentStrategy as E}from"./codex-strategy.js";import{GeminiAgentStrategy as A}from"./gemini-strategy.js";import{AssistantStrategy as I}from"./assistant-strategy.js";import{logger as i}from"../../utils/logger.js";const h=[new I,new u,new f,new E,new A];function T(r={}){const{state:t={},preferredAgent:e=null}=r,n=e||t.agentType||process.env.AGENT_TYPE;if(!n)throw new Error("No agent specified. Set agent.claude, agent.cursor, agent.codex, or agent.gemini in .zibby.config.js");i.debug(`Agent selection: requested=${n}`);const o=h.find(a=>a.getName()===n);if(!o)throw new Error(`Unknown agent '${n}'. Available: ${h.map(a=>a.getName()).join(", ")}`);if(i.debug(`Checking if ${n} can handle this environment...`),!o.canHandle(r)){const s={assistant:"Run `zibby login` to authenticate",claude:"Set ANTHROPIC_API_KEY in .env",cursor:"Install cursor-agent CLI or set CURSOR_API_KEY",codex:"Install codex CLI (npm i -g @openai/codex) and set OPENAI_API_KEY in .env",gemini:"Install gemini CLI (npm i -g @google/gemini-cli) and set GEMINI_API_KEY in .env"}[n]||"Check your environment configuration";throw new Error(`Agent '${n}' is not available. ${s}`)}return i.debug(`Using agent: ${o.getName()}`),o}async function _(r,t={},e={}){try{await import("@zibby/skills")}catch{}const n=T(t),o=t.state?.config||e.config||{},a=o.models||{},s=e.nodeName&&a[e.nodeName]||null,p=a.default||null,N=n.name,w=o.agent?.[N]?.model||null,y=s||p||w||e.model||null,l={...e,model:y,workspace:t.state?.workspace||e.workspace,schema:e.schema||t.schema,images:e.images||t.images||[],skills:e.skills||t.skills||[],config:o},c=l.skills||[];if(c.length>0&&!e.skipPromptFragments){const{getSkill:S}=await import("../skill-registry.js"),d=c.map(C=>{const g=S(C)?.promptFragment;return typeof g=="function"?g():g}).filter(Boolean);d.length>0&&(r+=`
|
|
1
|
+
var E3=Object.create;var c_=Object.defineProperty;var P3=Object.getOwnPropertyDescriptor;var T3=Object.getOwnPropertyNames;var z3=Object.getPrototypeOf,O3=Object.prototype.hasOwnProperty;var Tt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ee=(t,e)=>()=>(t&&(e=t(t=0)),e);var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),aa=(t,e)=>{for(var r in e)c_(t,r,{get:e[r],enumerable:!0})},j3=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of T3(e))!O3.call(t,i)&&i!==r&&c_(t,i,{get:()=>e[i],enumerable:!(n=P3(e,i))||n.enumerable});return t};var Yu=(t,e,r)=>(r=t!=null?E3(z3(t)):{},j3(e||!t||!t.__esModule?c_(r,"default",{value:t,enumerable:!0}):r,t));var f1={};aa(f1,{getAllSkills:()=>p_,getSkill:()=>Kr,hasSkill:()=>R3,listSkillIds:()=>C3,registerSkill:()=>N3});function N3(t){if(!t||typeof t.id!="string")throw new Error("Skill definition must include a string id");Xu.set(t.id,Object.freeze({...t}))}function Kr(t){return Xu.get(t)||null}function R3(t){return Xu.has(t)}function p_(){return new Map(Xu)}function C3(){return Array.from(Xu.keys())}var Xu,Eo=Ee(()=>{Xu=new Map});var m_,A3,f_,h_,Zf=Ee(()=>{m_=Symbol("Let zodToJsonSchema decide on which parser to use"),A3=(t,e)=>{if(e.description)try{return{...t,...JSON.parse(e.description)}}catch{}return t},f_={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},h_=t=>typeof t=="string"?{...f_,name:t}:{...f_,...t}});var g_,v_=Ee(()=>{Zf();g_=t=>{let e=h_(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}}});function Lf(t,e,r,n){n?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function lt(t,e,r,n,i){t[e]=r,Lf(t,e,n,i)}var Ua=Ee(()=>{});var el,Ff=Ee(()=>{el=(t,e)=>{let r=0;for(;r<t.length&&r<e.length&&t[r]===e[r];r++);return[(t.length-r).toString(),...e.slice(r)].join("/")}});var dt,m1,le,oa,tl=Ee(()=>{(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let a={};for(let o of i)a[o]=o;return a},t.getValidEnumValues=i=>{let a=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(let s of a)o[s]=i[s];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},t.find=(i,a)=>{for(let o of i)if(a(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(dt||(dt={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(m1||(m1={}));le=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oa=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return Number.isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}}});var Q,zn,Vf=Ee(()=>{tl();Q=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),zn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r=Object.create(null),n=[];for(let i of this.issues)if(i.path.length>0){let a=i.path[0];r[a]=r[a]||[],r[a].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};zn.create=t=>new zn(t)});var U3,Da,y_=Ee(()=>{Vf();tl();U3=(t,e)=>{let r;switch(t.code){case Q.invalid_type:t.received===le.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,dt.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:r=`Unrecognized key(s) in object: ${dt.joinValues(t.keys,", ")}`;break;case Q.invalid_union:r="Invalid input";break;case Q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${dt.joinValues(t.options)}`;break;case Q.invalid_enum_value:r=`Invalid enum value. Expected ${dt.joinValues(t.options)}, received '${t.received}'`;break;case Q.invalid_arguments:r="Invalid function arguments";break;case Q.invalid_return_type:r="Invalid function return type";break;case Q.invalid_date:r="Invalid date";break;case Q.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:dt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Q.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Q.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Q.custom:r="Invalid input";break;case Q.invalid_intersection_types:r="Intersection results could not be merged";break;case Q.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Q.not_finite:r="Number must be finite";break;default:r=e.defaultError,dt.assertNever(t)}return{message:r}},Da=U3});function rl(){return D3}var D3,Wf=Ee(()=>{y_();D3=Da});function oe(t,e){let r=rl(),n=Bf({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Da?void 0:Da].filter(i=>!!i)});t.common.issues.push(n)}var Bf,Ar,Oe,Us,Hr,__,b_,Po,nl,x_=Ee(()=>{Wf();y_();Bf=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(o,{data:e,defaultError:s}).message;return{...i,path:a,message:s}};Ar=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Oe;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let a=await i.key,o=await i.value;n.push({key:a,value:o})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Oe;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}},Oe=Object.freeze({status:"aborted"}),Us=t=>({status:"dirty",value:t}),Hr=t=>({status:"valid",value:t}),__=t=>t.status==="aborted",b_=t=>t.status==="dirty",Po=t=>t.status==="valid",nl=t=>typeof Promise<"u"&&t instanceof Promise});var h1=Ee(()=>{});var ye,g1=Ee(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ye||(ye={}))});function Fe(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,s)=>{let{message:c}=t;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:i}}function _1(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function tB(t){return new RegExp(`^${_1(t)}$`)}function rB(t){let e=`${y1}T${_1(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function nB(t,e){return!!((e==="v4"||!e)&&H3.test(t)||(e==="v6"||!e)&&Q3.test(t))}function iB(t,e){if(!V3.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function aB(t,e){return!!((e==="v4"||!e)&&G3.test(t)||(e==="v6"||!e)&&Y3.test(t))}function oB(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(t.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return a%o/10**i}function Ds(t){if(t instanceof On){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=vi.create(Ds(n))}return new On({...t._def,shape:()=>e})}else return t instanceof qa?new qa({...t._def,type:Ds(t.element)}):t instanceof vi?vi.create(Ds(t.unwrap())):t instanceof ua?ua.create(Ds(t.unwrap())):t instanceof ca?ca.create(t.items.map(e=>Ds(e))):t}function S_(t,e){let r=oa(t),n=oa(e);if(t===e)return{valid:!0,data:t};if(r===le.object&&n===le.object){let i=dt.objectKeys(e),a=dt.objectKeys(t).filter(s=>i.indexOf(s)!==-1),o={...t,...e};for(let s of a){let c=S_(t[s],e[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(r===le.array&&n===le.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let a=0;a<t.length;a++){let o=t[a],s=e[a],c=S_(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===le.date&&n===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function b1(t,e){return new Bs({values:t,typeName:X.ZodEnum,...Fe(e)})}var Bn,v1,Je,M3,q3,Z3,L3,F3,V3,W3,B3,K3,w_,H3,G3,Q3,Y3,J3,X3,y1,eB,Ms,il,al,ol,sl,cl,qs,Zs,ul,Ma,Fi,ll,qa,On,Ls,sa,k_,Fs,ca,$_,dl,pl,I_,Vs,Ws,Bs,Ks,To,yi,vi,ua,Hs,Gs,fl,Kf,Hf,Qs,Bxe,X,Kxe,Hxe,Gxe,Qxe,Yxe,Jxe,Xxe,ewe,twe,rwe,nwe,iwe,awe,owe,sB,swe,cwe,uwe,lwe,dwe,pwe,fwe,mwe,hwe,gwe,vwe,ywe,_we,bwe,xwe,wwe,kwe,Swe,$we,x1=Ee(()=>{Vf();Wf();g1();x_();tl();Bn=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},v1=(t,e)=>{if(Po(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new zn(t.common.issues);return this._error=r,this._error}}};Je=class{get description(){return this._def.description}_getType(e){return oa(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:oa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ar,ctx:{common:e.parent.common,data:e.data,parsedType:oa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(nl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oa(e)},i=this._parseSync({data:e,path:n.path,parent:n});return v1(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oa(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return Po(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>Po(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oa(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(nl(i)?i:Promise.resolve(i));return v1(n,a)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let o=e(i),s=()=>a.addIssue({code:Q.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new yi({schema:this,typeName:X.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return vi.create(this,this._def)}nullable(){return ua.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qa.create(this)}promise(){return To.create(this,this._def)}or(e){return Ls.create([this,e],this._def)}and(e){return Fs.create(this,e,this._def)}transform(e){return new yi({...Fe(this._def),schema:this,typeName:X.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Hs({...Fe(this._def),innerType:this,defaultValue:r,typeName:X.ZodDefault})}brand(){return new Kf({typeName:X.ZodBranded,type:this,...Fe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Gs({...Fe(this._def),innerType:this,catchValue:r,typeName:X.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Hf.create(this,e)}readonly(){return Qs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},M3=/^c[^\s-]{8,}$/i,q3=/^[0-9a-z]+$/,Z3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,L3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,F3=/^[a-z0-9_-]{21}$/i,V3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,W3=/^[-+]?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)?)??$/,B3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,K3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",H3=/^(?:(?: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])$/,G3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Q3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Y3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,J3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,X3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,y1="((\\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])))",eB=new RegExp(`^${y1}$`);Ms=class t extends Je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){let a=this._getOrReturnCtx(e);return oe(a,{code:Q.invalid_type,expected:le.string,received:a.parsedType}),Oe}let n=new Ar,i;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let o=e.data.length>a.value,s=e.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(e,i),o?oe(i,{code:Q.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&oe(i,{code:Q.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")B3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"email",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")w_||(w_=new RegExp(K3,"u")),w_.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"emoji",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")L3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"uuid",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")F3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"nanoid",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")M3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"cuid",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")q3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"cuid2",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")Z3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"ulid",code:Q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),oe(i,{validation:"url",code:Q.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"regex",code:Q.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?rB(a).test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?eB.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?tB(a).test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?W3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"duration",code:Q.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?nB(e.data,a.version)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"ip",code:Q.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?iB(e.data,a.alg)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"jwt",code:Q.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?aB(e.data,a.version)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"cidr",code:Q.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?J3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"base64",code:Q.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?X3.test(e.data)||(i=this._getOrReturnCtx(e,i),oe(i,{validation:"base64url",code:Q.invalid_string,message:a.message}),n.dirty()):dt.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:Q.invalid_string,...ye.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ye.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ye.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ye.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ye.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ye.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ye.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ye.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ye.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ye.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ye.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ye.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ye.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ye.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ye.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ye.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ye.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ye.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ye.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ye.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ye.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ye.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ye.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ye.errToObj(r)})}nonempty(e){return this.min(1,ye.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ms.create=t=>new Ms({checks:[],typeName:X.ZodString,coerce:t?.coerce??!1,...Fe(t)});il=class t extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==le.number){let a=this._getOrReturnCtx(e);return oe(a,{code:Q.invalid_type,expected:le.number,received:a.parsedType}),Oe}let n,i=new Ar;for(let a of this._def.checks)a.kind==="int"?dt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?oB(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.not_finite,message:a.message}),i.dirty()):dt.assertNever(a);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ye.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ye.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ye.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ye.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ye.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ye.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ye.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ye.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ye.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ye.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ye.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ye.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ye.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ye.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&dt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};il.create=t=>new il({checks:[],typeName:X.ZodNumber,coerce:t?.coerce||!1,...Fe(t)});al=class t extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==le.bigint)return this._getInvalidInput(e);let n,i=new Ar;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),oe(n,{code:Q.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):dt.assertNever(a);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return oe(r,{code:Q.invalid_type,expected:le.bigint,received:r.parsedType}),Oe}gte(e,r){return this.setLimit("min",e,!0,ye.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ye.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ye.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ye.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ye.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ye.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ye.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ye.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ye.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ye.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};al.create=t=>new al({checks:[],typeName:X.ZodBigInt,coerce:t?.coerce??!1,...Fe(t)});ol=class extends Je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){let n=this._getOrReturnCtx(e);return oe(n,{code:Q.invalid_type,expected:le.boolean,received:n.parsedType}),Oe}return Hr(e.data)}};ol.create=t=>new ol({typeName:X.ZodBoolean,coerce:t?.coerce||!1,...Fe(t)});sl=class t extends Je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){let a=this._getOrReturnCtx(e);return oe(a,{code:Q.invalid_type,expected:le.date,received:a.parsedType}),Oe}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return oe(a,{code:Q.invalid_date}),Oe}let n=new Ar,i;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(i=this._getOrReturnCtx(e,i),oe(i,{code:Q.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):dt.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ye.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ye.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};sl.create=t=>new sl({checks:[],coerce:t?.coerce||!1,typeName:X.ZodDate,...Fe(t)});cl=class extends Je{_parse(e){if(this._getType(e)!==le.symbol){let n=this._getOrReturnCtx(e);return oe(n,{code:Q.invalid_type,expected:le.symbol,received:n.parsedType}),Oe}return Hr(e.data)}};cl.create=t=>new cl({typeName:X.ZodSymbol,...Fe(t)});qs=class extends Je{_parse(e){if(this._getType(e)!==le.undefined){let n=this._getOrReturnCtx(e);return oe(n,{code:Q.invalid_type,expected:le.undefined,received:n.parsedType}),Oe}return Hr(e.data)}};qs.create=t=>new qs({typeName:X.ZodUndefined,...Fe(t)});Zs=class extends Je{_parse(e){if(this._getType(e)!==le.null){let n=this._getOrReturnCtx(e);return oe(n,{code:Q.invalid_type,expected:le.null,received:n.parsedType}),Oe}return Hr(e.data)}};Zs.create=t=>new Zs({typeName:X.ZodNull,...Fe(t)});ul=class extends Je{constructor(){super(...arguments),this._any=!0}_parse(e){return Hr(e.data)}};ul.create=t=>new ul({typeName:X.ZodAny,...Fe(t)});Ma=class extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Hr(e.data)}};Ma.create=t=>new Ma({typeName:X.ZodUnknown,...Fe(t)});Fi=class extends Je{_parse(e){let r=this._getOrReturnCtx(e);return oe(r,{code:Q.invalid_type,expected:le.never,received:r.parsedType}),Oe}};Fi.create=t=>new Fi({typeName:X.ZodNever,...Fe(t)});ll=class extends Je{_parse(e){if(this._getType(e)!==le.undefined){let n=this._getOrReturnCtx(e);return oe(n,{code:Q.invalid_type,expected:le.void,received:n.parsedType}),Oe}return Hr(e.data)}};ll.create=t=>new ll({typeName:X.ZodVoid,...Fe(t)});qa=class t extends Je{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==le.array)return oe(r,{code:Q.invalid_type,expected:le.array,received:r.parsedType}),Oe;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(oe(r,{code:o?Q.too_big:Q.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(oe(r,{code:Q.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(oe(r,{code:Q.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new Bn(r,o,r.path,s)))).then(o=>Ar.mergeArray(n,o));let a=[...r.data].map((o,s)=>i.type._parseSync(new Bn(r,o,r.path,s)));return Ar.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:ye.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:ye.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:ye.toString(r)}})}nonempty(e){return this.min(1,e)}};qa.create=(t,e)=>new qa({type:t,minLength:null,maxLength:null,exactLength:null,typeName:X.ZodArray,...Fe(e)});On=class t extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=dt.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==le.object){let u=this._getOrReturnCtx(e);return oe(u,{code:Q.invalid_type,expected:le.object,received:u.parsedType}),Oe}let{status:n,ctx:i}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Fi&&this._def.unknownKeys==="strip"))for(let u in i.data)o.includes(u)||s.push(u);let c=[];for(let u of o){let l=a[u],d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Bn(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Fi){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(u==="strict")s.length>0&&(oe(i,{code:Q.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Bn(i,d,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,f=await l.value;u.push({key:d,value:f,alwaysSet:l.alwaysSet})}return u}).then(u=>Ar.mergeObjectSync(n,u)):Ar.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return ye.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:ye.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:X.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of dt.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of dt.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Ds(this)}partial(e){let r={};for(let n of dt.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of dt.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof vi;)a=a._def.innerType;r[n]=a}return new t({...this._def,shape:()=>r})}keyof(){return b1(dt.objectKeys(this.shape))}};On.create=(t,e)=>new On({shape:()=>t,unknownKeys:"strip",catchall:Fi.create(),typeName:X.ZodObject,...Fe(e)});On.strictCreate=(t,e)=>new On({shape:()=>t,unknownKeys:"strict",catchall:Fi.create(),typeName:X.ZodObject,...Fe(e)});On.lazycreate=(t,e)=>new On({shape:t,unknownKeys:"strip",catchall:Fi.create(),typeName:X.ZodObject,...Fe(e)});Ls=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(s=>new zn(s.ctx.common.issues));return oe(r,{code:Q.invalid_union,unionErrors:o}),Oe}if(r.common.async)return Promise.all(n.map(async a=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!a&&(a={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(c=>new zn(c));return oe(r,{code:Q.invalid_union,unionErrors:s}),Oe}}get options(){return this._def.options}};Ls.create=(t,e)=>new Ls({options:t,typeName:X.ZodUnion,...Fe(e)});sa=t=>t instanceof Vs?sa(t.schema):t instanceof yi?sa(t.innerType()):t instanceof Ws?[t.value]:t instanceof Bs?t.options:t instanceof Ks?dt.objectValues(t.enum):t instanceof Hs?sa(t._def.innerType):t instanceof qs?[void 0]:t instanceof Zs?[null]:t instanceof vi?[void 0,...sa(t.unwrap())]:t instanceof ua?[null,...sa(t.unwrap())]:t instanceof Kf||t instanceof Qs?sa(t.unwrap()):t instanceof Gs?sa(t._def.innerType):[],k_=class t extends Je{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.object)return oe(r,{code:Q.invalid_type,expected:le.object,received:r.parsedType}),Oe;let n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(oe(r,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let a of r){let o=sa(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of o){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,a)}}return new t({typeName:X.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Fe(n)})}};Fs=class extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(a,o)=>{if(__(a)||__(o))return Oe;let s=S_(a.value,o.value);return s.valid?((b_(a)||b_(o))&&r.dirty(),{status:r.value,value:s.data}):(oe(n,{code:Q.invalid_intersection_types}),Oe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Fs.create=(t,e,r)=>new Fs({left:t,right:e,typeName:X.ZodIntersection,...Fe(r)});ca=class t extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==le.array)return oe(n,{code:Q.invalid_type,expected:le.array,received:n.parsedType}),Oe;if(n.data.length<this._def.items.length)return oe(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Oe;!this._def.rest&&n.data.length>this._def.items.length&&(oe(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((o,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new Bn(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>Ar.mergeArray(r,o)):Ar.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};ca.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ca({items:t,typeName:X.ZodTuple,rest:null,...Fe(e)})};$_=class t extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return oe(n,{code:Q.invalid_type,expected:le.object,received:n.parsedType}),Oe;let i=[],a=this._def.keyType,o=this._def.valueType;for(let s in n.data)i.push({key:a._parse(new Bn(n,s,n.path,s)),value:o._parse(new Bn(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Ar.mergeObjectAsync(r,i):Ar.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Je?new t({keyType:e,valueType:r,typeName:X.ZodRecord,...Fe(n)}):new t({keyType:Ms.create(),valueType:e,typeName:X.ZodRecord,...Fe(r)})}},dl=class extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==le.map)return oe(n,{code:Q.invalid_type,expected:le.map,received:n.parsedType}),Oe;let i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new Bn(n,s,n.path,[u,"key"])),value:a._parse(new Bn(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Oe;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return Oe;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};dl.create=(t,e,r)=>new dl({valueType:e,keyType:t,typeName:X.ZodMap,...Fe(r)});pl=class t extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==le.set)return oe(n,{code:Q.invalid_type,expected:le.set,received:n.parsedType}),Oe;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(oe(n,{code:Q.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(oe(n,{code:Q.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let a=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Oe;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((c,u)=>a._parse(new Bn(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:ye.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:ye.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};pl.create=(t,e)=>new pl({valueType:t,minSize:null,maxSize:null,typeName:X.ZodSet,...Fe(e)});I_=class t extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.function)return oe(r,{code:Q.invalid_type,expected:le.function,received:r.parsedType}),Oe;function n(s,c){return Bf({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,rl(),Da].filter(u=>!!u),issueData:{code:Q.invalid_arguments,argumentsError:c}})}function i(s,c){return Bf({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,rl(),Da].filter(u=>!!u),issueData:{code:Q.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof To){let s=this;return Hr(async function(...c){let u=new zn([]),l=await s._def.args.parseAsync(c,a).catch(p=>{throw u.addIssue(n(c,p)),u}),d=await Reflect.apply(o,this,l);return await s._def.returns._def.type.parseAsync(d,a).catch(p=>{throw u.addIssue(i(d,p)),u})})}else{let s=this;return Hr(function(...c){let u=s._def.args.safeParse(c,a);if(!u.success)throw new zn([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=s._def.returns.safeParse(l,a);if(!d.success)throw new zn([i(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:ca.create(e).rest(Ma.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||ca.create([]).rest(Ma.create()),returns:r||Ma.create(),typeName:X.ZodFunction,...Fe(n)})}},Vs=class extends Je{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Vs.create=(t,e)=>new Vs({getter:t,typeName:X.ZodLazy,...Fe(e)});Ws=class extends Je{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return oe(r,{received:r.data,code:Q.invalid_literal,expected:this._def.value}),Oe}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ws.create=(t,e)=>new Ws({value:t,typeName:X.ZodLiteral,...Fe(e)});Bs=class t extends Je{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return oe(r,{expected:dt.joinValues(n),received:r.parsedType,code:Q.invalid_type}),Oe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return oe(r,{received:r.data,code:Q.invalid_enum_value,options:n}),Oe}return Hr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Bs.create=b1;Ks=class extends Je{_parse(e){let r=dt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==le.string&&n.parsedType!==le.number){let i=dt.objectValues(r);return oe(n,{expected:dt.joinValues(i),received:n.parsedType,code:Q.invalid_type}),Oe}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=dt.objectValues(r);return oe(n,{received:n.data,code:Q.invalid_enum_value,options:i}),Oe}return Hr(e.data)}get enum(){return this._def.values}};Ks.create=(t,e)=>new Ks({values:t,typeName:X.ZodNativeEnum,...Fe(e)});To=class extends Je{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.promise&&r.common.async===!1)return oe(r,{code:Q.invalid_type,expected:le.promise,received:r.parsedType}),Oe;let n=r.parsedType===le.promise?r.data:Promise.resolve(r.data);return Hr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};To.create=(t,e)=>new To({type:t,typeName:X.ZodPromise,...Fe(e)});yi=class extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===X.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:o=>{oe(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return Oe;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Oe:c.status==="dirty"?Us(c.value):r.value==="dirty"?Us(c.value):c});{if(r.value==="aborted")return Oe;let s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?Oe:s.status==="dirty"?Us(s.value):r.value==="dirty"?Us(s.value):s}}if(i.type==="refinement"){let o=s=>{let c=i.refinement(s,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Oe:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Oe:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Po(o))return Oe;let s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Po(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):Oe);dt.assertNever(i)}};yi.create=(t,e,r)=>new yi({schema:t,typeName:X.ZodEffects,effect:e,...Fe(r)});yi.createWithPreprocess=(t,e,r)=>new yi({schema:e,effect:{type:"preprocess",transform:t},typeName:X.ZodEffects,...Fe(r)});vi=class extends Je{_parse(e){return this._getType(e)===le.undefined?Hr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};vi.create=(t,e)=>new vi({innerType:t,typeName:X.ZodOptional,...Fe(e)});ua=class extends Je{_parse(e){return this._getType(e)===le.null?Hr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ua.create=(t,e)=>new ua({innerType:t,typeName:X.ZodNullable,...Fe(e)});Hs=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===le.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Hs.create=(t,e)=>new Hs({innerType:t,typeName:X.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Fe(e)});Gs=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return nl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zn(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Gs.create=(t,e)=>new Gs({innerType:t,typeName:X.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Fe(e)});fl=class extends Je{_parse(e){if(this._getType(e)!==le.nan){let n=this._getOrReturnCtx(e);return oe(n,{code:Q.invalid_type,expected:le.nan,received:n.parsedType}),Oe}return{status:"valid",value:e.data}}};fl.create=t=>new fl({typeName:X.ZodNaN,...Fe(t)});Kf=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Hf=class t extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Oe:a.status==="dirty"?(r.dirty(),Us(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Oe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:X.ZodPipeline})}},Qs=class extends Je{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Po(i)&&(i.value=Object.freeze(i.value)),i);return nl(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Qs.create=(t,e)=>new Qs({innerType:t,typeName:X.ZodReadonly,...Fe(e)});Bxe={object:On.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(X||(X={}));Kxe=Ms.create,Hxe=il.create,Gxe=fl.create,Qxe=al.create,Yxe=ol.create,Jxe=sl.create,Xxe=cl.create,ewe=qs.create,twe=Zs.create,rwe=ul.create,nwe=Ma.create,iwe=Fi.create,awe=ll.create,owe=qa.create,sB=On.create,swe=On.strictCreate,cwe=Ls.create,uwe=k_.create,lwe=Fs.create,dwe=ca.create,pwe=$_.create,fwe=dl.create,mwe=pl.create,hwe=I_.create,gwe=Vs.create,vwe=Ws.create,ywe=Bs.create,_we=Ks.create,bwe=To.create,xwe=yi.create,wwe=vi.create,kwe=ua.create,Swe=yi.createWithPreprocess,$we=Hf.create});var E_=Ee(()=>{Wf();x_();h1();tl();x1();Vf()});var ml=Ee(()=>{E_();E_()});function Bt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?el(e,t.currentPath):e.join("/")}}var Kn=Ee(()=>{Ff()});function P_(t,e){let r={type:"array"};return t.type?._def&&t.type?._def?.typeName!==X.ZodAny&&(r.items=Pe(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&<(r,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&<(r,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(lt(r,"minItems",t.exactLength.value,t.exactLength.message,e),lt(r,"maxItems",t.exactLength.value,t.exactLength.message,e)),r}var T_=Ee(()=>{ml();Ua();dr()});function z_(t,e){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?lt(r,"minimum",n.value,n.message,e):lt(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),lt(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?lt(r,"maximum",n.value,n.message,e):lt(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),lt(r,"maximum",n.value,n.message,e));break;case"multipleOf":lt(r,"multipleOf",n.value,n.message,e);break}return r}var O_=Ee(()=>{Ua()});function j_(){return{type:"boolean"}}var N_=Ee(()=>{});function hl(t,e){return Pe(t.type._def,e)}var Gf=Ee(()=>{dr()});var R_,C_=Ee(()=>{dr();R_=(t,e)=>Pe(t.innerType._def,e)});function Qf(t,e,r){let n=r??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,a)=>Qf(t,e,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return lB(t,e)}}var lB,A_=Ee(()=>{Ua();lB=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let n of t.checks)switch(n.kind){case"min":lt(r,"minimum",n.value,n.message,e);break;case"max":lt(r,"maximum",n.value,n.message,e);break}return r}});function U_(t,e){return{...Pe(t.innerType._def,e),default:t.defaultValue()}}var D_=Ee(()=>{dr()});function M_(t,e){return e.effectStrategy==="input"?Pe(t.schema._def,e):Bt(e)}var q_=Ee(()=>{dr();Kn()});function Z_(t){return{type:"string",enum:Array.from(t.values)}}var L_=Ee(()=>{});function F_(t,e){let r=[Pe(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),Pe(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(a=>!!a),n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(a=>{if(dB(a))i.push(...a.allOf),a.unevaluatedProperties===void 0&&(n=void 0);else{let o=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:s,...c}=a;o=c}else n=void 0;i.push(o)}}),i.length?{allOf:i,...n}:void 0}var dB,V_=Ee(()=>{dr();dB=t=>"type"in t&&t.type==="string"?!1:"allOf"in t});function W_(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var B_=Ee(()=>{});function gl(t,e){let r={type:"string"};if(t.checks)for(let n of t.checks)switch(n.kind){case"min":lt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e);break;case"max":lt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":_i(r,"email",n.message,e);break;case"format:idn-email":_i(r,"idn-email",n.message,e);break;case"pattern:zod":Gr(r,Hn.email,n.message,e);break}break;case"url":_i(r,"uri",n.message,e);break;case"uuid":_i(r,"uuid",n.message,e);break;case"regex":Gr(r,n.regex,n.message,e);break;case"cuid":Gr(r,Hn.cuid,n.message,e);break;case"cuid2":Gr(r,Hn.cuid2,n.message,e);break;case"startsWith":Gr(r,RegExp(`^${H_(n.value,e)}`),n.message,e);break;case"endsWith":Gr(r,RegExp(`${H_(n.value,e)}$`),n.message,e);break;case"datetime":_i(r,"date-time",n.message,e);break;case"date":_i(r,"date",n.message,e);break;case"time":_i(r,"time",n.message,e);break;case"duration":_i(r,"duration",n.message,e);break;case"length":lt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e),lt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"includes":{Gr(r,RegExp(H_(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&_i(r,"ipv4",n.message,e),n.version!=="v4"&&_i(r,"ipv6",n.message,e);break}case"base64url":Gr(r,Hn.base64url,n.message,e);break;case"jwt":Gr(r,Hn.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&Gr(r,Hn.ipv4Cidr,n.message,e),n.version!=="v4"&&Gr(r,Hn.ipv6Cidr,n.message,e);break}case"emoji":Gr(r,Hn.emoji(),n.message,e);break;case"ulid":{Gr(r,Hn.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{_i(r,"binary",n.message,e);break}case"contentEncoding:base64":{lt(r,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{Gr(r,Hn.base64,n.message,e);break}}break}case"nanoid":Gr(r,Hn.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function H_(t,e){return e.patternStrategy==="escape"?fB(t):t}function fB(t){let e="";for(let r=0;r<t.length;r++)pB.has(t[r])||(e+="\\"),e+=t[r];return e}function _i(t,e,r,n){t.format||t.anyOf?.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&n.errorMessages&&{errorMessage:{format:r}}})):lt(t,"format",e,r,n)}function Gr(t,e,r,n){t.pattern||t.allOf?.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:w1(e,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):lt(t,"pattern",w1(e,n),r,n)}function w1(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source,i="",a=!1,o=!1,s=!1;for(let c=0;c<n.length;c++){if(a){i+=n[c],a=!1;continue}if(r.i){if(o){if(n[c].match(/[a-z]/)){s?(i+=n[c],i+=`${n[c-2]}-${n[c]}`.toUpperCase(),s=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(i+=n[c],s=!0):i+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){i+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){i+=`(^|(?<=[\r
|
|
2
|
+
]))`;continue}else if(n[c]==="$"){i+=`($|(?=[\r
|
|
3
|
+
]))`;continue}}if(r.s&&n[c]==="."){i+=o?`${n[c]}\r
|
|
4
|
+
`:`[${n[c]}\r
|
|
5
|
+
]`;continue}i+=n[c],n[c]==="\\"?a=!0:o&&n[c]==="]"?o=!1:!o&&n[c]==="["&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return i}var K_,Hn,pB,Yf=Ee(()=>{Ua();Hn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(K_===void 0&&(K_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),K_),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};pB=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function vl(t,e){if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&t.keyType?._def.typeName===X.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((n,i)=>({...n,[i]:Pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",i]})??Bt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let r={type:"object",additionalProperties:Pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return r;if(t.keyType?._def.typeName===X.ZodString&&t.keyType._def.checks?.length){let{type:n,...i}=gl(t.keyType._def,e);return{...r,propertyNames:i}}else{if(t.keyType?._def.typeName===X.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(t.keyType?._def.typeName===X.ZodBranded&&t.keyType._def.type._def.typeName===X.ZodString&&t.keyType._def.type._def.checks?.length){let{type:n,...i}=hl(t.keyType._def,e);return{...r,propertyNames:i}}}return r}var Jf=Ee(()=>{ml();dr();Yf();Gf();Kn()});function G_(t,e){if(e.mapStrategy==="record")return vl(t,e);let r=Pe(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Bt(e),n=Pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Bt(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Q_=Ee(()=>{dr();Jf();Kn()});function Y_(t){let e=t.values,n=Object.keys(t.values).filter(a=>typeof e[e[a]]!="number").map(a=>e[a]),i=Array.from(new Set(n.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}var J_=Ee(()=>{});function X_(t){return t.target==="openAi"?void 0:{not:Bt({...t,currentPath:[...t.currentPath,"not"]})}}var eb=Ee(()=>{Kn()});function tb(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var rb=Ee(()=>{});function nb(t,e){if(e.target==="openApi3")return k1(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in Ys&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((i,a)=>{let o=Ys[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((i,a)=>{let o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){let i=n.filter((a,o,s)=>s.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(a=>!n.includes(a))],[])};return k1(t,e)}var Ys,k1,Xf=Ee(()=>{dr();Ys={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};k1=(t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((n,i)=>Pe(n._def,{...e,currentPath:[...e.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!e.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function ib(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:Ys[t.innerType._def.typeName],nullable:!0}:{type:[Ys[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let n=Pe(t.innerType._def,{...e,currentPath:[...e.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=Pe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var ab=Ee(()=>{dr();Xf()});function ob(t,e){let r={type:"number"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"int":r.type="integer",Lf(r,"type",n.message,e);break;case"min":e.target==="jsonSchema7"?n.inclusive?lt(r,"minimum",n.value,n.message,e):lt(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),lt(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?lt(r,"maximum",n.value,n.message,e):lt(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),lt(r,"maximum",n.value,n.message,e));break;case"multipleOf":lt(r,"multipleOf",n.value,n.message,e);break}return r}var sb=Ee(()=>{Ua()});function cb(t,e){let r=e.target==="openAi",n={type:"object",properties:{}},i=[],a=t.shape();for(let s in a){let c=a[s];if(c===void 0||c._def===void 0)continue;let u=hB(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=Pe(c._def,{...e,currentPath:[...e.currentPath,"properties",s],propertyPath:[...e.currentPath,"properties",s]});l!==void 0&&(n.properties[s]=l,u||i.push(s))}i.length&&(n.required=i);let o=mB(t,e);return o!==void 0&&(n.additionalProperties=o),n}function mB(t,e){if(t.catchall._def.typeName!=="ZodNever")return Pe(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function hB(t){try{return t.isOptional()}catch{return!0}}var ub=Ee(()=>{dr()});var lb,db=Ee(()=>{dr();Kn();lb=(t,e)=>{if(e.currentPath.toString()===e.propertyPath?.toString())return Pe(t.innerType._def,e);let r=Pe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Bt(e)},r]}:Bt(e)}});var pb,fb=Ee(()=>{dr();pb=(t,e)=>{if(e.pipeStrategy==="input")return Pe(t.in._def,e);if(e.pipeStrategy==="output")return Pe(t.out._def,e);let r=Pe(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),n=Pe(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}}});function mb(t,e){return Pe(t.type._def,e)}var hb=Ee(()=>{dr()});function gb(t,e){let n={type:"array",uniqueItems:!0,items:Pe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&<(n,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&<(n,"maxItems",t.maxSize.value,t.maxSize.message,e),n}var vb=Ee(()=>{Ua();dr()});function yb(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,n)=>Pe(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Pe(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,n)=>Pe(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var _b=Ee(()=>{dr()});function bb(t){return{not:Bt(t)}}var xb=Ee(()=>{Kn()});function wb(t){return Bt(t)}var kb=Ee(()=>{Kn()});var Sb,$b=Ee(()=>{dr();Sb=(t,e)=>Pe(t.innerType._def,e)});var Ib,Eb=Ee(()=>{ml();Kn();T_();O_();N_();Gf();C_();A_();D_();q_();L_();V_();B_();Q_();J_();eb();rb();ab();sb();ub();db();fb();hb();Jf();vb();Yf();_b();xb();Xf();kb();$b();Ib=(t,e,r)=>{switch(e){case X.ZodString:return gl(t,r);case X.ZodNumber:return ob(t,r);case X.ZodObject:return cb(t,r);case X.ZodBigInt:return z_(t,r);case X.ZodBoolean:return j_();case X.ZodDate:return Qf(t,r);case X.ZodUndefined:return bb(r);case X.ZodNull:return tb(r);case X.ZodArray:return P_(t,r);case X.ZodUnion:case X.ZodDiscriminatedUnion:return nb(t,r);case X.ZodIntersection:return F_(t,r);case X.ZodTuple:return yb(t,r);case X.ZodRecord:return vl(t,r);case X.ZodLiteral:return W_(t,r);case X.ZodEnum:return Z_(t);case X.ZodNativeEnum:return Y_(t);case X.ZodNullable:return ib(t,r);case X.ZodOptional:return lb(t,r);case X.ZodMap:return G_(t,r);case X.ZodSet:return gb(t,r);case X.ZodLazy:return()=>t.getter()._def;case X.ZodPromise:return mb(t,r);case X.ZodNaN:case X.ZodNever:return X_(r);case X.ZodEffects:return M_(t,r);case X.ZodAny:return Bt(r);case X.ZodUnknown:return wb(r);case X.ZodDefault:return U_(t,r);case X.ZodBranded:return hl(t,r);case X.ZodReadonly:return Sb(t,r);case X.ZodCatch:return R_(t,r);case X.ZodPipeline:return pb(t,r);case X.ZodFunction:case X.ZodVoid:case X.ZodSymbol:return;default:return(n=>{})(e)}}});function Pe(t,e,r=!1){let n=e.seen.get(t);if(e.override){let s=e.override?.(t,e,n,r);if(s!==m_)return s}if(n&&!r){let s=gB(n,e);if(s!==void 0)return s}let i={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,i);let a=Ib(t,t.typeName,e),o=typeof a=="function"?Pe(a(),e):a;if(o&&vB(t,e,o),e.postProcess){let s=e.postProcess(o,t,e);return i.jsonSchema=o,s}return i.jsonSchema=o,o}var gB,vB,dr=Ee(()=>{Zf();Eb();Ff();Kn();gB=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:el(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((r,n)=>e.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),Bt(e)):e.$refStrategy==="seen"?Bt(e):void 0}},vB=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r)});var S1=Ee(()=>{});var Gn,Pb=Ee(()=>{dr();v_();Kn();Gn=(t,e)=>{let r=g_(e),n=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[u,l])=>({...c,[u]:Pe(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Bt(r)}),{}):void 0,i=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,a=Pe(t._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??Bt(r),o=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;o!==void 0&&(a.title=o),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let s=i===void 0?n?{...a,[r.definitionPath]:n}:a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:a}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s}});var $1={};aa($1,{addErrorMessage:()=>Lf,default:()=>yB,defaultOptions:()=>f_,getDefaultOptions:()=>h_,getRefs:()=>g_,getRelativePath:()=>el,ignoreOverride:()=>m_,jsonDescription:()=>A3,parseAnyDef:()=>Bt,parseArrayDef:()=>P_,parseBigintDef:()=>z_,parseBooleanDef:()=>j_,parseBrandedDef:()=>hl,parseCatchDef:()=>R_,parseDateDef:()=>Qf,parseDef:()=>Pe,parseDefaultDef:()=>U_,parseEffectsDef:()=>M_,parseEnumDef:()=>Z_,parseIntersectionDef:()=>F_,parseLiteralDef:()=>W_,parseMapDef:()=>G_,parseNativeEnumDef:()=>Y_,parseNeverDef:()=>X_,parseNullDef:()=>tb,parseNullableDef:()=>ib,parseNumberDef:()=>ob,parseObjectDef:()=>cb,parseOptionalDef:()=>lb,parsePipelineDef:()=>pb,parsePromiseDef:()=>mb,parseReadonlyDef:()=>Sb,parseRecordDef:()=>vl,parseSetDef:()=>gb,parseStringDef:()=>gl,parseTupleDef:()=>yb,parseUndefinedDef:()=>bb,parseUnionDef:()=>nb,parseUnknownDef:()=>wb,primitiveMappings:()=>Ys,selectParser:()=>Ib,setResponseValueAndErrors:()=>lt,zodPatterns:()=>Hn,zodToJsonSchema:()=>Gn});var yB,zo=Ee(()=>{Zf();v_();Ua();Ff();dr();S1();Kn();T_();O_();N_();Gf();C_();A_();D_();q_();L_();V_();B_();Q_();J_();eb();rb();ab();sb();ub();db();fb();hb();$b();Jf();vb();Yf();_b();xb();Xf();kb();Eb();Pb();Pb();yB=Gn});var D1=z((ISe,U1)=>{var A1=Tt("stream").Stream,sK=Tt("util");U1.exports=xi;function xi(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}sK.inherits(xi,A1);xi.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var i=t.emit;return t.emit=function(){return r._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(xi.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});xi.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};xi.prototype.resume=function(){this._released||this.release(),this.source.resume()};xi.prototype.pause=function(){this.source.pause()};xi.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};xi.prototype.pipe=function(){var t=A1.prototype.pipe.apply(this,arguments);return this.resume(),t};xi.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};xi.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var L1=z((ESe,Z1)=>{var cK=Tt("util"),q1=Tt("stream").Stream,M1=D1();Z1.exports=rr;function rr(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}cK.inherits(rr,q1);rr.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};rr.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};rr.prototype.append=function(t){var e=rr.isStreamLike(t);if(e){if(!(t instanceof M1)){var r=M1.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};rr.prototype.pipe=function(t,e){return q1.prototype.pipe.call(this,t,e),this.resume(),t};rr.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};rr.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=rr.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};rr.prototype._pipeNext=function(t){this._currentStream=t;var e=rr.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};rr.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};rr.prototype.write=function(t){this.emit("data",t)};rr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};rr.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};rr.prototype.end=function(){this._reset(),this.emit("end")};rr.prototype.destroy=function(){this._reset(),this.emit("close")};rr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};rr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};rr.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};rr.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var F1=z((PSe,uK)=>{uK.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var W1=z((TSe,V1)=>{V1.exports=F1()});var H1=z(pn=>{"use strict";var im=W1(),lK=Tt("path").extname,B1=/^\s*([^;\s]*)(?:;|\s|$)/,dK=/^text\//i;pn.charset=K1;pn.charsets={lookup:K1};pn.contentType=pK;pn.extension=fK;pn.extensions=Object.create(null);pn.lookup=mK;pn.types=Object.create(null);hK(pn.extensions,pn.types);function K1(t){if(!t||typeof t!="string")return!1;var e=B1.exec(t),r=e&&im[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&dK.test(e[1])?"UTF-8":!1}function pK(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?pn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=pn.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}function fK(t){if(!t||typeof t!="string")return!1;var e=B1.exec(t),r=e&&pn.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}function mK(t){if(!t||typeof t!="string")return!1;var e=lK("x."+t).toLowerCase().substr(1);return e&&pn.types[e]||!1}function hK(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(im).forEach(function(i){var a=im[i],o=a.extensions;if(!(!o||!o.length)){t[i]=o;for(var s=0;s<o.length;s++){var c=o[s];if(e[c]){var u=r.indexOf(im[e[c]].source),l=r.indexOf(a.source);if(e[c]!=="application/octet-stream"&&(u>l||u===l&&e[c].substr(0,12)==="application/"))continue}e[c]=i}}})}});var Q1=z((OSe,G1)=>{G1.exports=gK;function gK(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var Ob=z((jSe,J1)=>{var Y1=Q1();J1.exports=vK;function vK(t){var e=!1;return Y1(function(){e=!0}),function(n,i){e?t(n,i):Y1(function(){t(n,i)})}}});var jb=z((NSe,X1)=>{X1.exports=yK;function yK(t){Object.keys(t.jobs).forEach(_K.bind(t)),t.jobs={}}function _K(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var Nb=z((RSe,tj)=>{var ej=Ob(),bK=jb();tj.exports=xK;function xK(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=wK(e,i,t[i],function(a,o){i in r.jobs&&(delete r.jobs[i],a?bK(r):r.results[i]=o,n(a,r.results))})}function wK(t,e,r,n){var i;return t.length==2?i=t(r,ej(n)):i=t(r,e,ej(n)),i}});var Rb=z((CSe,rj)=>{rj.exports=kK;function kK(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(i,a){return e(t[i],t[a])}),n}});var Cb=z((ASe,nj)=>{var SK=jb(),$K=Ob();nj.exports=IK;function IK(t){Object.keys(this.jobs).length&&(this.index=this.size,SK(this),$K(t)(null,this.results))}});var aj=z((USe,ij)=>{var EK=Nb(),PK=Rb(),TK=Cb();ij.exports=zK;function zK(t,e,r){for(var n=PK(t);n.index<(n.keyedList||t).length;)EK(t,e,n,function(i,a){if(i){r(i,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return TK.bind(n,r)}});var Ab=z((DSe,am)=>{var oj=Nb(),OK=Rb(),jK=Cb();am.exports=NK;am.exports.ascending=sj;am.exports.descending=RK;function NK(t,e,r,n){var i=OK(t,r);return oj(t,e,i,function a(o,s){if(o){n(o,s);return}if(i.index++,i.index<(i.keyedList||t).length){oj(t,e,i,a);return}n(null,i.results)}),jK.bind(i,n)}function sj(t,e){return t<e?-1:t>e?1:0}function RK(t,e){return-1*sj(t,e)}});var uj=z((MSe,cj)=>{var CK=Ab();cj.exports=AK;function AK(t,e,r){return CK(t,e,null,r)}});var dj=z((qSe,lj)=>{lj.exports={parallel:aj(),serial:uj(),serialOrdered:Ab()}});var Ub=z((ZSe,pj)=>{"use strict";pj.exports=Object});var mj=z((LSe,fj)=>{"use strict";fj.exports=Error});var gj=z((FSe,hj)=>{"use strict";hj.exports=EvalError});var yj=z((VSe,vj)=>{"use strict";vj.exports=RangeError});var bj=z((WSe,_j)=>{"use strict";_j.exports=ReferenceError});var wj=z((BSe,xj)=>{"use strict";xj.exports=SyntaxError});var om=z((KSe,kj)=>{"use strict";kj.exports=TypeError});var $j=z((HSe,Sj)=>{"use strict";Sj.exports=URIError});var Ej=z((GSe,Ij)=>{"use strict";Ij.exports=Math.abs});var Tj=z((QSe,Pj)=>{"use strict";Pj.exports=Math.floor});var Oj=z((YSe,zj)=>{"use strict";zj.exports=Math.max});var Nj=z((JSe,jj)=>{"use strict";jj.exports=Math.min});var Cj=z((XSe,Rj)=>{"use strict";Rj.exports=Math.pow});var Uj=z((e$e,Aj)=>{"use strict";Aj.exports=Math.round});var Mj=z((t$e,Dj)=>{"use strict";Dj.exports=Number.isNaN||function(e){return e!==e}});var Zj=z((r$e,qj)=>{"use strict";var UK=Mj();qj.exports=function(e){return UK(e)||e===0?e:e<0?-1:1}});var Fj=z((n$e,Lj)=>{"use strict";Lj.exports=Object.getOwnPropertyDescriptor});var Db=z((i$e,Vj)=>{"use strict";var sm=Fj();if(sm)try{sm([],"length")}catch{sm=null}Vj.exports=sm});var Bj=z((a$e,Wj)=>{"use strict";var cm=Object.defineProperty||!1;if(cm)try{cm({},"a",{value:1})}catch{cm=!1}Wj.exports=cm});var Mb=z((o$e,Kj)=>{"use strict";Kj.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Qj=z((s$e,Gj)=>{"use strict";var Hj=typeof Symbol<"u"&&Symbol,DK=Mb();Gj.exports=function(){return typeof Hj!="function"||typeof Symbol!="function"||typeof Hj("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:DK()}});var qb=z((c$e,Yj)=>{"use strict";Yj.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Zb=z((u$e,Jj)=>{"use strict";var MK=Ub();Jj.exports=MK.getPrototypeOf||null});var tN=z((l$e,eN)=>{"use strict";var qK="Function.prototype.bind called on incompatible ",ZK=Object.prototype.toString,LK=Math.max,FK="[object Function]",Xj=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},VK=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},WK=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};eN.exports=function(e){var r=this;if(typeof r!="function"||ZK.apply(r)!==FK)throw new TypeError(qK+r);for(var n=VK(arguments,1),i,a=function(){if(this instanceof i){var l=r.apply(this,Xj(n,arguments));return Object(l)===l?l:this}return r.apply(e,Xj(n,arguments))},o=LK(0,r.length-n.length),s=[],c=0;c<o;c++)s[c]="$"+c;if(i=Function("binder","return function ("+WK(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var wl=z((d$e,rN)=>{"use strict";var BK=tN();rN.exports=Function.prototype.bind||BK});var um=z((p$e,nN)=>{"use strict";nN.exports=Function.prototype.call});var Lb=z((f$e,iN)=>{"use strict";iN.exports=Function.prototype.apply});var oN=z((m$e,aN)=>{"use strict";aN.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var cN=z((h$e,sN)=>{"use strict";var KK=wl(),HK=Lb(),GK=um(),QK=oN();sN.exports=QK||KK.call(GK,HK)});var lN=z((g$e,uN)=>{"use strict";var YK=wl(),JK=om(),XK=um(),eH=cN();uN.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new JK("a function is required");return eH(YK,XK,e)}});var gN=z((v$e,hN)=>{"use strict";var tH=lN(),dN=Db(),fN;try{fN=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Fb=!!fN&&dN&&dN(Object.prototype,"__proto__"),mN=Object,pN=mN.getPrototypeOf;hN.exports=Fb&&typeof Fb.get=="function"?tH([Fb.get]):typeof pN=="function"?function(e){return pN(e==null?e:mN(e))}:!1});var xN=z((y$e,bN)=>{"use strict";var vN=qb(),yN=Zb(),_N=gN();bN.exports=vN?function(e){return vN(e)}:yN?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return yN(e)}:_N?function(e){return _N(e)}:null});var lm=z((_$e,wN)=>{"use strict";var rH=Function.prototype.call,nH=Object.prototype.hasOwnProperty,iH=wl();wN.exports=iH.call(rH,nH)});var TN=z((b$e,PN)=>{"use strict";var ut,aH=Ub(),oH=mj(),sH=gj(),cH=yj(),uH=bj(),ic=wj(),nc=om(),lH=$j(),dH=Ej(),pH=Tj(),fH=Oj(),mH=Nj(),hH=Cj(),gH=Uj(),vH=Zj(),IN=Function,Vb=function(t){try{return IN('"use strict"; return ('+t+").constructor;")()}catch{}},kl=Db(),yH=Bj(),Wb=function(){throw new nc},_H=kl?(function(){try{return arguments.callee,Wb}catch{try{return kl(arguments,"callee").get}catch{return Wb}}})():Wb,tc=Qj()(),xr=xN(),bH=Zb(),xH=qb(),EN=Lb(),Sl=um(),rc={},wH=typeof Uint8Array>"u"||!xr?ut:xr(Uint8Array),jo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ut:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ut:ArrayBuffer,"%ArrayIteratorPrototype%":tc&&xr?xr([][Symbol.iterator]()):ut,"%AsyncFromSyncIteratorPrototype%":ut,"%AsyncFunction%":rc,"%AsyncGenerator%":rc,"%AsyncGeneratorFunction%":rc,"%AsyncIteratorPrototype%":rc,"%Atomics%":typeof Atomics>"u"?ut:Atomics,"%BigInt%":typeof BigInt>"u"?ut:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ut:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ut:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ut:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":oH,"%eval%":eval,"%EvalError%":sH,"%Float16Array%":typeof Float16Array>"u"?ut:Float16Array,"%Float32Array%":typeof Float32Array>"u"?ut:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ut:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ut:FinalizationRegistry,"%Function%":IN,"%GeneratorFunction%":rc,"%Int8Array%":typeof Int8Array>"u"?ut:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ut:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ut:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":tc&&xr?xr(xr([][Symbol.iterator]())):ut,"%JSON%":typeof JSON=="object"?JSON:ut,"%Map%":typeof Map>"u"?ut:Map,"%MapIteratorPrototype%":typeof Map>"u"||!tc||!xr?ut:xr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":aH,"%Object.getOwnPropertyDescriptor%":kl,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ut:Promise,"%Proxy%":typeof Proxy>"u"?ut:Proxy,"%RangeError%":cH,"%ReferenceError%":uH,"%Reflect%":typeof Reflect>"u"?ut:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ut:Set,"%SetIteratorPrototype%":typeof Set>"u"||!tc||!xr?ut:xr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ut:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":tc&&xr?xr(""[Symbol.iterator]()):ut,"%Symbol%":tc?Symbol:ut,"%SyntaxError%":ic,"%ThrowTypeError%":_H,"%TypedArray%":wH,"%TypeError%":nc,"%Uint8Array%":typeof Uint8Array>"u"?ut:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ut:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ut:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ut:Uint32Array,"%URIError%":lH,"%WeakMap%":typeof WeakMap>"u"?ut:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ut:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ut:WeakSet,"%Function.prototype.call%":Sl,"%Function.prototype.apply%":EN,"%Object.defineProperty%":yH,"%Object.getPrototypeOf%":bH,"%Math.abs%":dH,"%Math.floor%":pH,"%Math.max%":fH,"%Math.min%":mH,"%Math.pow%":hH,"%Math.round%":gH,"%Math.sign%":vH,"%Reflect.getPrototypeOf%":xH};if(xr)try{null.error}catch(t){kN=xr(xr(t)),jo["%Error.prototype%"]=kN}var kN,kH=function t(e){var r;if(e==="%AsyncFunction%")r=Vb("async function () {}");else if(e==="%GeneratorFunction%")r=Vb("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Vb("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&xr&&(r=xr(i.prototype))}return jo[e]=r,r},SN={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},$l=wl(),dm=lm(),SH=$l.call(Sl,Array.prototype.concat),$H=$l.call(EN,Array.prototype.splice),$N=$l.call(Sl,String.prototype.replace),pm=$l.call(Sl,String.prototype.slice),IH=$l.call(Sl,RegExp.prototype.exec),EH=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,PH=/\\(\\)?/g,TH=function(e){var r=pm(e,0,1),n=pm(e,-1);if(r==="%"&&n!=="%")throw new ic("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ic("invalid intrinsic syntax, expected opening `%`");var i=[];return $N(e,EH,function(a,o,s,c){i[i.length]=s?$N(c,PH,"$1"):o||a}),i},zH=function(e,r){var n=e,i;if(dm(SN,n)&&(i=SN[n],n="%"+i[0]+"%"),dm(jo,n)){var a=jo[n];if(a===rc&&(a=kH(n)),typeof a>"u"&&!r)throw new nc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ic("intrinsic "+e+" does not exist!")};PN.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new nc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new nc('"allowMissing" argument must be a boolean');if(IH(/^%?[^%]*%?$/,e)===null)throw new ic("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=TH(e),i=n.length>0?n[0]:"",a=zH("%"+i+"%",r),o=a.name,s=a.value,c=!1,u=a.alias;u&&(i=u[0],$H(n,SH([0,1],u)));for(var l=1,d=!0;l<n.length;l+=1){var f=n[l],p=pm(f,0,1),m=pm(f,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new ic("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),i+="."+f,o="%"+i+"%",dm(jo,o))s=jo[o];else if(s!=null){if(!(f in s)){if(!r)throw new nc("base intrinsic for "+e+" exists, but the property is not available.");return}if(kl&&l+1>=n.length){var v=kl(s,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[f]}else d=dm(s,f),s=s[f];d&&!c&&(jo[o]=s)}}return s}});var ON=z((x$e,zN)=>{"use strict";var OH=Mb();zN.exports=function(){return OH()&&!!Symbol.toStringTag}});var RN=z((w$e,NN)=>{"use strict";var jH=TN(),jN=jH("%Object.defineProperty%",!0),NH=ON()(),RH=lm(),CH=om(),fm=NH?Symbol.toStringTag:null;NN.exports=function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new CH("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");fm&&(n||!RH(e,fm))&&(jN?jN(e,fm,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[fm]=r)}});var AN=z((k$e,CN)=>{"use strict";CN.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var DN=z((S$e,UN)=>{"use strict";var Gb=L1(),AH=Tt("util"),Bb=Tt("path"),UH=Tt("http"),DH=Tt("https"),MH=Tt("url").parse,qH=Tt("fs"),ZH=Tt("stream").Stream,LH=Tt("crypto"),Kb=H1(),FH=dj(),VH=RN(),Za=lm(),Hb=AN();function vt(t){if(!(this instanceof vt))return new vt(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Gb.call(this),t=t||{};for(var e in t)this[e]=t[e]}AH.inherits(vt,Gb);vt.LINE_BREAK=`\r
|
|
6
|
+
`;vt.DEFAULT_CONTENT_TYPE="application/octet-stream";vt.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Gb.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,r),a=this._multiPartFooter();n(i),n(e),n(a),this._trackLength(i,e,r)};vt.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+vt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Za(e,"httpVersion"))&&!(e instanceof ZH))&&(r.knownLength||this._valuesToMeasure.push(e))};vt.prototype._lengthRetriever=function(t,e){Za(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):qH.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):Za(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Za(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};vt.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),i=this._getContentType(e,r),a="",o={"Content-Disposition":["form-data",'name="'+t+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Hb(o,r.header);var s;for(var c in o)if(Za(o,c)){if(s=o[c],s==null)continue;Array.isArray(s)||(s=[s]),s.length&&(a+=c+": "+s.join("; ")+vt.LINE_BREAK)}return"--"+this.getBoundary()+vt.LINE_BREAK+a+vt.LINE_BREAK};vt.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=Bb.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Bb.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Za(t,"httpVersion")&&(r=Bb.basename(t.client._httpMessage.path||"")),r)return'filename="'+r+'"'};vt.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=Kb.lookup(t.name)),!r&&t&&t.path&&(r=Kb.lookup(t.path)),!r&&t&&t.readable&&Za(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=Kb.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=vt.DEFAULT_CONTENT_TYPE),r};vt.prototype._multiPartFooter=function(){return function(t){var e=vt.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};vt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+vt.LINE_BREAK};vt.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Za(t,e)&&(r[e.toLowerCase()]=t[e]);return r};vt.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};vt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};vt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(vt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};vt.prototype._generateBoundary=function(){this._boundary="--------------------------"+LH.randomBytes(12).toString("hex")};vt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};vt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};vt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}FH.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};vt.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=MH(t),n=Hb({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=Hb(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=DH.request(n):r=UH.request(n),this.getLength(function(a,o){if(a&&a!=="Unknown stream"){this._error(a);return}if(o&&r.setHeader("Content-Length",o),this.pipe(r),e){var s,c=function(u,l){return r.removeListener("error",c),r.removeListener("response",s),e.call(this,u,l)};s=c.bind(this,null),r.on("error",c),r.on("response",s)}}.bind(this)),r};vt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};vt.prototype.toString=function(){return"[object FormData]"};VH(vt.prototype,"FormData");UN.exports=vt});var eR=z((IIe,XN)=>{var sc=1e3,cc=sc*60,uc=cc*60,Co=uc*24,hG=Co*7,gG=Co*365.25;XN.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return vG(t);if(r==="number"&&isFinite(t))return e.long?_G(t):yG(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function vG(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*gG;case"weeks":case"week":case"w":return r*hG;case"days":case"day":case"d":return r*Co;case"hours":case"hour":case"hrs":case"hr":case"h":return r*uc;case"minutes":case"minute":case"mins":case"min":case"m":return r*cc;case"seconds":case"second":case"secs":case"sec":case"s":return r*sc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function yG(t){var e=Math.abs(t);return e>=Co?Math.round(t/Co)+"d":e>=uc?Math.round(t/uc)+"h":e>=cc?Math.round(t/cc)+"m":e>=sc?Math.round(t/sc)+"s":t+"ms"}function _G(t){var e=Math.abs(t);return e>=Co?vm(t,e,Co,"day"):e>=uc?vm(t,e,uc,"hour"):e>=cc?vm(t,e,cc,"minute"):e>=sc?vm(t,e,sc,"second"):t+" ms"}function vm(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var dx=z((EIe,tR)=>{function bG(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=eR(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let d=0;for(let f=0;f<l.length;f++)d=(d<<5)-d+l.charCodeAt(f),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(l){let d,f=null,p,m;function v(...g){if(!v.enabled)return;let h=v,b=Number(new Date),y=b-(d||b);h.diff=y,h.prev=d,h.curr=b,d=b,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let _=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(w,k)=>{if(w==="%%")return"%";_++;let $=r.formatters[k];if(typeof $=="function"){let P=g[_];w=$.call(h,P),g.splice(_,1),_--}return w}),r.formatArgs.call(h,g),(h.log||r.log).apply(h,g)}return v.namespace=l,v.useColors=r.useColors(),v.color=r.selectColor(l),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(l)),m),set:g=>{f=g}}),typeof r.init=="function"&&r.init(v),v}function n(l,d){let f=r(this.namespace+(typeof d>"u"?":":d)+l);return f.log=this.log,f}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function a(l,d){let f=0,p=0,m=-1,v=0;for(;f<l.length;)if(p<d.length&&(d[p]===l[f]||d[p]==="*"))d[p]==="*"?(m=p,v=f,p++):(f++,p++);else if(m!==-1)p=m+1,v++,f=v;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function o(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function s(l){for(let d of r.skips)if(a(l,d))return!1;for(let d of r.names)if(a(l,d))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}tR.exports=bG});var rR=z((fn,ym)=>{fn.formatArgs=wG;fn.save=kG;fn.load=SG;fn.useColors=xG;fn.storage=$G();fn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();fn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function xG(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function wG(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ym.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}fn.log=console.debug||console.log||(()=>{});function kG(t){try{t?fn.storage.setItem("debug",t):fn.storage.removeItem("debug")}catch{}}function SG(){let t;try{t=fn.storage.getItem("debug")||fn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function $G(){try{return localStorage}catch{}}ym.exports=dx()(fn);var{formatters:IG}=ym.exports;IG.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var iR=z((PIe,nR)=>{"use strict";nR.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var sR=z((TIe,oR)=>{"use strict";var EG=Tt("os"),aR=Tt("tty"),Qn=iR(),{env:wr}=process,Va;Qn("no-color")||Qn("no-colors")||Qn("color=false")||Qn("color=never")?Va=0:(Qn("color")||Qn("colors")||Qn("color=true")||Qn("color=always"))&&(Va=1);"FORCE_COLOR"in wr&&(wr.FORCE_COLOR==="true"?Va=1:wr.FORCE_COLOR==="false"?Va=0:Va=wr.FORCE_COLOR.length===0?1:Math.min(parseInt(wr.FORCE_COLOR,10),3));function px(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function fx(t,e){if(Va===0)return 0;if(Qn("color=16m")||Qn("color=full")||Qn("color=truecolor"))return 3;if(Qn("color=256"))return 2;if(t&&!e&&Va===void 0)return 0;let r=Va||0;if(wr.TERM==="dumb")return r;if(process.platform==="win32"){let n=EG.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in wr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in wr)||wr.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in wr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(wr.TEAMCITY_VERSION)?1:0;if(wr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in wr){let n=parseInt((wr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(wr.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(wr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(wr.TERM)||"COLORTERM"in wr?1:r}function PG(t){let e=fx(t,t&&t.isTTY);return px(e)}oR.exports={supportsColor:PG,stdout:px(fx(!0,aR.isatty(1))),stderr:px(fx(!0,aR.isatty(2)))}});var uR=z((kr,bm)=>{var TG=Tt("tty"),_m=Tt("util");kr.init=AG;kr.log=NG;kr.formatArgs=OG;kr.save=RG;kr.load=CG;kr.useColors=zG;kr.destroy=_m.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");kr.colors=[6,2,3,4,5,1];try{let t=sR();t&&(t.stderr||t).level>=2&&(kr.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}kr.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function zG(){return"colors"in kr.inspectOpts?!!kr.inspectOpts.colors:TG.isatty(process.stderr.fd)}function OG(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),a=` ${i};1m${e} \x1B[0m`;t[0]=a+t[0].split(`
|
|
7
|
+
`).join(`
|
|
8
|
+
`+a),t.push(i+"m+"+bm.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=jG()+e+" "+t[0]}function jG(){return kr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function NG(...t){return process.stderr.write(_m.formatWithOptions(kr.inspectOpts,...t)+`
|
|
9
|
+
`)}function RG(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function CG(){return process.env.DEBUG}function AG(t){t.inspectOpts={};let e=Object.keys(kr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=kr.inspectOpts[e[r]]}bm.exports=dx()(kr);var{formatters:cR}=bm.exports;cR.o=function(t){return this.inspectOpts.colors=this.useColors,_m.inspect(t,this.inspectOpts).split(`
|
|
10
|
+
`).map(e=>e.trim()).join(" ")};cR.O=function(t){return this.inspectOpts.colors=this.useColors,_m.inspect(t,this.inspectOpts)}});var lR=z((zIe,mx)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?mx.exports=rR():mx.exports=uR()});var pR=z((OIe,dR)=>{var Tl;dR.exports=function(){if(!Tl){try{Tl=lR()("follow-redirects")}catch{}typeof Tl!="function"&&(Tl=function(){})}Tl.apply(null,arguments)}});var vR=z((jIe,Ix)=>{var Ol=Tt("url"),zl=Ol.URL,UG=Tt("http"),DG=Tt("https"),_x=Tt("stream").Writable,bx=Tt("assert"),fR=pR();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Uo(Error.captureStackTrace);!e&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var xx=!1;try{bx(new zl(""))}catch(t){xx=t.code==="ERR_INVALID_URL"}var MG=["Authorization","Proxy-Authorization","Cookie"],qG=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],wx=["abort","aborted","connect","error","socket","timeout"],kx=Object.create(null);wx.forEach(function(t){kx[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var gx=jl("ERR_INVALID_URL","Invalid URL",TypeError),vx=jl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),ZG=jl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",vx),LG=jl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),FG=jl("ERR_STREAM_WRITE_AFTER_END","write after end"),VG=_x.prototype.destroy||hR;function mn(t,e){_x.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof vx?i:new vx({cause:i}))}},this._headerFilter=new RegExp("^(?:"+MG.concat(t.sensitiveHeaders).map(QG).join("|")+")$","i"),this._performRequest()}mn.prototype=Object.create(_x.prototype);mn.prototype.abort=function(){$x(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};mn.prototype.destroy=function(t){return $x(this._currentRequest,t),VG.call(this,t),this};mn.prototype.write=function(t,e,r){if(this._ending)throw new FG;if(!Ao(t)&&!HG(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Uo(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new LG),this.abort())};mn.prototype.end=function(t,e,r){if(Uo(t)?(r=t,t=e=null):Uo(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};mn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};mn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};mn.prototype.setTimeout=function(t,e){var r=this;function n(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},t),n(o)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){mn.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(mn.prototype,t,{get:function(){return this._currentRequest[t]}})});mn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),KG(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};mn.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of wx)n.on(i,kx[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ol.format(this._options):this._options.path,this._isRedirect){var a=0,o=this,s=this._requestBodyBuffers;(function c(u){if(n===o._currentRequest)if(u)o.emit("error",u);else if(a<s.length){var l=s[a++];n.finished||n.write(l.data,l.encoding,c)}else o._ended&&n.end()})()}};mn.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if($x(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new ZG;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var a=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],hx(/^content-/i,this._options.headers));var o=hx(/^host$/i,this._options.headers),s=Sx(this._currentUrl),c=o||s.host,u=/^\w+:/.test(r)?this._currentUrl:Ol.format(Object.assign(s,{host:c})),l=WG(r,u);if(fR("redirecting to",l.href),this._isRedirect=!0,yx(l,this._options),(l.protocol!==s.protocol&&l.protocol!=="https:"||l.host!==c&&!BG(l.host,c))&&hx(this._headerFilter,this._options.headers),Uo(i)){var d={headers:t.headers,statusCode:e},f={url:u,method:a,headers:n};i(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function mR(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",a=r[i]=t[n],o=e[n]=Object.create(a);function s(u,l,d){return GG(u)?u=yx(u):Ao(u)?u=yx(Sx(u)):(d=l,l=gR(u),u={protocol:i}),Uo(l)&&(d=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},u,l),l.nativeProtocols=r,!Ao(l.host)&&!Ao(l.hostname)&&(l.hostname="::1"),bx.equal(l.protocol,i,"protocol mismatch"),fR("options",l),new mn(l,d)}function c(u,l,d){var f=o.request(u,l,d);return f.end(),f}Object.defineProperties(o,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function hR(){}function Sx(t){var e;if(xx)e=new zl(t);else if(e=gR(Ol.parse(t)),!Ao(e.protocol))throw new gx({input:t});return e}function WG(t,e){return xx?new zl(t,e):Sx(Ol.resolve(e,t))}function gR(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new gx({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new gx({input:t.href||t});return t}function yx(t,e){var r=e||{};for(var n of qG)r[n]=t[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function hx(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function jl(t,e,r){function n(i){Uo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),n}function $x(t,e){for(var r of wx)t.removeListener(r,kx[r]);t.on("error",hR),t.destroy(e)}function BG(t,e){bx(Ao(t)&&Ao(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function KG(t){return t instanceof Array}function Ao(t){return typeof t=="string"||t instanceof String}function Uo(t){return typeof t=="function"}function HG(t){return typeof t=="object"&&"length"in t}function GG(t){return zl&&t instanceof zl}function QG(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}Ix.exports=mR({http:UG,https:DG});Ix.exports.wrap=mR});var Xq={};aa(Xq,{Codex:()=>ece,Thread:()=>BE});import{promises as WE}from"fs";import qse from"os";import Hq from"path";import{spawn as Vse}from"child_process";import yv from"path";import Wse from"readline";import{createRequire as Yq}from"module";async function Zse(t){if(t===void 0)return{cleanup:async()=>{}};if(!Lse(t))throw new Error("outputSchema must be a plain JSON object");let e=await WE.mkdtemp(Hq.join(qse.tmpdir(),"codex-output-schema-")),r=Hq.join(e,"schema.json"),n=async()=>{try{await WE.rm(e,{recursive:!0,force:!0})}catch{}};try{return await WE.writeFile(r,JSON.stringify(t),"utf8"),{schemaPath:r,cleanup:n}}catch(i){throw await n(),i}}function Lse(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Fse(t){if(typeof t=="string")return{prompt:t,images:[]};let e=[],r=[];for(let n of t)n.type==="text"?e.push(n.text):n.type==="local_image"&&r.push(n.path);return{prompt:e.join(`
|
|
2
11
|
|
|
3
|
-
${d.join(`
|
|
12
|
+
`),images:r}}function Qse(t){let e=[];return Jq(t,"",e),e}function Jq(t,e,r){if(!KE(t))if(e){r.push(`${e}=${Sp(t,e)}`);return}else throw new Error("Codex config overrides must be a plain object");let n=Object.entries(t);if(!(!e&&n.length===0)){if(e&&n.length===0){r.push(`${e}={}`);return}for(let[i,a]of n){if(!i)throw new Error("Codex config override keys must be non-empty strings");if(a===void 0)continue;let o=e?`${e}.${i}`:i;KE(a)?Jq(a,o,r):r.push(`${o}=${Sp(a,o)}`)}}}function Sp(t,e){if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"){if(!Number.isFinite(t))throw new Error(`Codex config override at ${e} must be a finite number`);return`${t}`}else{if(typeof t=="boolean")return t?"true":"false";if(Array.isArray(t))return`[${t.map((n,i)=>Sp(n,`${e}[${i}]`)).join(", ")}]`;if(KE(t)){let r=[];for(let[n,i]of Object.entries(t)){if(!n)throw new Error("Codex config override keys must be non-empty strings");i!==void 0&&r.push(`${Jse(n)} = ${Sp(i,`${e}.${n}`)}`)}return`{${r.join(", ")}}`}else{if(t===null)throw new Error(`Codex config override at ${e} cannot be null`);{let r=typeof t;throw new Error(`Unsupported Codex config override value at ${e}: ${r}`)}}}}function Jse(t){return Yse.test(t)?t:JSON.stringify(t)}function KE(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Xse(){let{platform:t,arch:e}=process,r=null;switch(t){case"linux":case"android":switch(e){case"x64":r="x86_64-unknown-linux-musl";break;case"arm64":r="aarch64-unknown-linux-musl";break;default:break}break;case"darwin":switch(e){case"x64":r="x86_64-apple-darwin";break;case"arm64":r="aarch64-apple-darwin";break;default:break}break;case"win32":switch(e){case"x64":r="x86_64-pc-windows-msvc";break;case"arm64":r="aarch64-pc-windows-msvc";break;default:break}break;default:break}if(!r)throw new Error(`Unsupported platform: ${t} (${e})`);let n=Kse[r];if(!n)throw new Error(`Unsupported target triple: ${r}`);let i;try{let c=Hse.resolve(`${Qq}/package.json`),l=Yq(c).resolve(`${n}/package.json`);i=yv.join(yv.dirname(l),"vendor")}catch{throw new Error(`Unable to locate Codex CLI binaries. Ensure ${Qq} is installed with optional dependencies.`)}let a=yv.join(i,r),o=process.platform==="win32"?"codex.exe":"codex";return yv.join(a,"codex",o)}var BE,Gq,Bse,Qq,Kse,Hse,Gse,Yse,ece,eZ=Ee(()=>{BE=class{_exec;_options;_id;_threadOptions;get id(){return this._id}constructor(t,e,r,n=null){this._exec=t,this._options=e,this._id=n,this._threadOptions=r}async runStreamed(t,e={}){return{events:this.runStreamedInternal(t,e)}}async*runStreamedInternal(t,e={}){let{schemaPath:r,cleanup:n}=await Zse(e.outputSchema),i=this._threadOptions,{prompt:a,images:o}=Fse(t),s=this._exec.run({input:a,baseUrl:this._options.baseUrl,apiKey:this._options.apiKey,threadId:this._id,images:o,model:i?.model,sandboxMode:i?.sandboxMode,workingDirectory:i?.workingDirectory,skipGitRepoCheck:i?.skipGitRepoCheck,outputSchemaFile:r,modelReasoningEffort:i?.modelReasoningEffort,signal:e.signal,networkAccessEnabled:i?.networkAccessEnabled,webSearchMode:i?.webSearchMode,webSearchEnabled:i?.webSearchEnabled,approvalPolicy:i?.approvalPolicy,additionalDirectories:i?.additionalDirectories});try{for await(let c of s){let u;try{u=JSON.parse(c)}catch(l){throw new Error(`Failed to parse item: ${c}`,{cause:l})}u.type==="thread.started"&&(this._id=u.thread_id),yield u}}finally{await n()}}async run(t,e={}){let r=this.runStreamedInternal(t,e),n=[],i="",a=null,o=null;for await(let s of r)if(s.type==="item.completed")s.item.type==="agent_message"&&(i=s.item.text),n.push(s.item);else if(s.type==="turn.completed")a=s.usage;else if(s.type==="turn.failed"){o=s.error;break}if(o)throw new Error(o.message);return{items:n,finalResponse:i,usage:a}}};Gq="CODEX_INTERNAL_ORIGINATOR_OVERRIDE",Bse="codex_sdk_ts",Qq="@openai/codex",Kse={"x86_64-unknown-linux-musl":"@openai/codex-linux-x64","aarch64-unknown-linux-musl":"@openai/codex-linux-arm64","x86_64-apple-darwin":"@openai/codex-darwin-x64","aarch64-apple-darwin":"@openai/codex-darwin-arm64","x86_64-pc-windows-msvc":"@openai/codex-win32-x64","aarch64-pc-windows-msvc":"@openai/codex-win32-arm64"},Hse=Yq(import.meta.url),Gse=class{executablePath;envOverride;configOverrides;constructor(t=null,e,r){this.executablePath=t||Xse(),this.envOverride=e,this.configOverrides=r}async*run(t){let e=["exec","--experimental-json"];if(this.configOverrides)for(let c of Qse(this.configOverrides))e.push("--config",c);if(t.baseUrl&&e.push("--config",`openai_base_url=${Sp(t.baseUrl,"openai_base_url")}`),t.model&&e.push("--model",t.model),t.sandboxMode&&e.push("--sandbox",t.sandboxMode),t.workingDirectory&&e.push("--cd",t.workingDirectory),t.additionalDirectories?.length)for(let c of t.additionalDirectories)e.push("--add-dir",c);if(t.skipGitRepoCheck&&e.push("--skip-git-repo-check"),t.outputSchemaFile&&e.push("--output-schema",t.outputSchemaFile),t.modelReasoningEffort&&e.push("--config",`model_reasoning_effort="${t.modelReasoningEffort}"`),t.networkAccessEnabled!==void 0&&e.push("--config",`sandbox_workspace_write.network_access=${t.networkAccessEnabled}`),t.webSearchMode?e.push("--config",`web_search="${t.webSearchMode}"`):t.webSearchEnabled===!0?e.push("--config",'web_search="live"'):t.webSearchEnabled===!1&&e.push("--config",'web_search="disabled"'),t.approvalPolicy&&e.push("--config",`approval_policy="${t.approvalPolicy}"`),t.threadId&&e.push("resume",t.threadId),t.images?.length)for(let c of t.images)e.push("--image",c);let r={};if(this.envOverride)Object.assign(r,this.envOverride);else for(let[c,u]of Object.entries(process.env))u!==void 0&&(r[c]=u);r[Gq]||(r[Gq]=Bse),t.apiKey&&(r.CODEX_API_KEY=t.apiKey);let n=Vse(this.executablePath,e,{env:r,signal:t.signal}),i=null;if(n.once("error",c=>i=c),!n.stdin)throw n.kill(),new Error("Child process has no stdin");if(n.stdin.write(t.input),n.stdin.end(),!n.stdout)throw n.kill(),new Error("Child process has no stdout");let a=[];n.stderr&&n.stderr.on("data",c=>{a.push(c)});let o=new Promise(c=>{n.once("exit",(u,l)=>{c({code:u,signal:l})})}),s=Wse.createInterface({input:n.stdout,crlfDelay:1/0});try{for await(let l of s)yield l;if(i)throw i;let{code:c,signal:u}=await o;if(c!==0||u){let l=Buffer.concat(a),d=u?`signal ${u}`:`code ${c??1}`;throw new Error(`Codex Exec exited with ${d}: ${l.toString("utf8")}`)}}finally{s.close(),n.removeAllListeners();try{n.killed||n.kill()}catch{}}}};Yse=/^[A-Za-z0-9_-]+$/;ece=class{exec;options;constructor(t={}){let{codexPathOverride:e,env:r,config:n}=t;this.exec=new Gse(e,r,n),this.options=t}startThread(t={}){return new BE(this.exec,this.options,t)}resumeThread(t,e={}){return new BE(this.exec,this.options,e,t)}}});var Up=z(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.regexpCode=St.getEsmExportName=St.getProperty=St.safeStringify=St.stringify=St.strConcat=St.addCodeArg=St.str=St._=St.nil=St._Code=St.Name=St.IDENTIFIER=St._CodeOrName=void 0;var Cp=class{};St._CodeOrName=Cp;St.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ms=class extends Cp{constructor(e){if(super(),!St.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};St.Name=ms;var ui=class extends Cp{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof ms&&(r[n.str]=(r[n.str]||0)+1),r),{})}};St._Code=ui;St.nil=new ui("");function zZ(t,...e){let r=[t[0]],n=0;for(;n<e.length;)EP(r,e[n]),r.push(t[++n]);return new ui(r)}St._=zZ;var IP=new ui("+");function OZ(t,...e){let r=[Ap(t[0])],n=0;for(;n<e.length;)r.push(IP),EP(r,e[n]),r.push(IP,Ap(t[++n]));return que(r),new ui(r)}St.str=OZ;function EP(t,e){e instanceof ui?t.push(...e._items):e instanceof ms?t.push(e):t.push(Fue(e))}St.addCodeArg=EP;function que(t){let e=1;for(;e<t.length-1;){if(t[e]===IP){let r=Zue(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Zue(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ms||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof ms))return`"${t}${e.slice(1)}`}function Lue(t,e){return e.emptyStr()?t:t.emptyStr()?e:OZ`${t}${e}`}St.strConcat=Lue;function Fue(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Ap(Array.isArray(t)?t.join(","):t)}function Vue(t){return new ui(Ap(t))}St.stringify=Vue;function Ap(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}St.safeStringify=Ap;function Wue(t){return typeof t=="string"&&St.IDENTIFIER.test(t)?new ui(`.${t}`):zZ`[${t}]`}St.getProperty=Wue;function Bue(t){if(typeof t=="string"&&St.IDENTIFIER.test(t))return new ui(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}St.getEsmExportName=Bue;function Kue(t){return new ui(t.toString())}St.regexpCode=Kue});var zP=z(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ValueScope=bn.ValueScopeName=bn.Scope=bn.varKinds=bn.UsedValueState=void 0;var _n=Up(),PP=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Uv;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Uv||(bn.UsedValueState=Uv={}));bn.varKinds={const:new _n.Name("const"),let:new _n.Name("let"),var:new _n.Name("var")};var Dv=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof _n.Name?e:this.name(e)}name(e){return new _n.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};bn.Scope=Dv;var Mv=class extends _n.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,_n._)`.${new _n.Name(r)}[${n}]`}};bn.ValueScopeName=Mv;var Hue=(0,_n._)`\n`,TP=class extends Dv{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Hue:_n.nil}}get(){return this._scope}name(e){return new Mv(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:a}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[a];if(s){let l=s.get(o);if(l)return l}else s=this._values[a]=new Map;s.set(o,i);let c=this._scope[a]||(this._scope[a]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:a,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,_n._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let a=_n.nil;for(let o in e){let s=e[o];if(!s)continue;let c=n[o]=n[o]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,Uv.Started);let l=r(u);if(l){let d=this.opts.es5?bn.varKinds.var:bn.varKinds.const;a=(0,_n._)`${a}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))a=(0,_n._)`${a}${l}${this.opts._n}`;else throw new PP(u);c.set(u,Uv.Completed)})}return a}};bn.ValueScope=TP});var at=z(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.or=rt.and=rt.not=rt.CodeGen=rt.operators=rt.varKinds=rt.ValueScopeName=rt.ValueScope=rt.Scope=rt.Name=rt.regexpCode=rt.stringify=rt.getProperty=rt.nil=rt.strConcat=rt.str=rt._=void 0;var ht=Up(),Ni=zP(),po=Up();Object.defineProperty(rt,"_",{enumerable:!0,get:function(){return po._}});Object.defineProperty(rt,"str",{enumerable:!0,get:function(){return po.str}});Object.defineProperty(rt,"strConcat",{enumerable:!0,get:function(){return po.strConcat}});Object.defineProperty(rt,"nil",{enumerable:!0,get:function(){return po.nil}});Object.defineProperty(rt,"getProperty",{enumerable:!0,get:function(){return po.getProperty}});Object.defineProperty(rt,"stringify",{enumerable:!0,get:function(){return po.stringify}});Object.defineProperty(rt,"regexpCode",{enumerable:!0,get:function(){return po.regexpCode}});Object.defineProperty(rt,"Name",{enumerable:!0,get:function(){return po.Name}});var Fv=zP();Object.defineProperty(rt,"Scope",{enumerable:!0,get:function(){return Fv.Scope}});Object.defineProperty(rt,"ValueScope",{enumerable:!0,get:function(){return Fv.ValueScope}});Object.defineProperty(rt,"ValueScopeName",{enumerable:!0,get:function(){return Fv.ValueScopeName}});Object.defineProperty(rt,"varKinds",{enumerable:!0,get:function(){return Fv.varKinds}});rt.operators={GT:new ht._Code(">"),GTE:new ht._Code(">="),LT:new ht._Code("<"),LTE:new ht._Code("<="),EQ:new ht._Code("==="),NEQ:new ht._Code("!=="),NOT:new ht._Code("!"),OR:new ht._Code("||"),AND:new ht._Code("&&"),ADD:new ht._Code("+")};var $a=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},OP=class extends $a{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ni.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=hu(this.rhs,e,r)),this}get names(){return this.rhs instanceof ht._CodeOrName?this.rhs.names:{}}},qv=class extends $a{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ht.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=hu(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ht.Name?{}:{...this.lhs.names};return Lv(e,this.rhs)}},jP=class extends qv{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},NP=class extends $a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},RP=class extends $a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},CP=class extends $a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},AP=class extends $a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=hu(this.code,e,r),this}get names(){return this.code instanceof ht._CodeOrName?this.code.names:{}}},Dp=class extends $a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let a=n[i];a.optimizeNames(e,r)||(Gue(e,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>vs(e,r.names),{})}},Ia=class extends Dp{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},UP=class extends Dp{},mu=class extends Ia{};mu.kind="else";var hs=class t extends Ia{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new mu(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(jZ(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=hu(this.condition,e,r),this}get names(){let e=super.names;return Lv(e,this.condition),this.else&&vs(e,this.else.names),e}};hs.kind="if";var gs=class extends Ia{};gs.kind="for";var DP=class extends gs{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=hu(this.iteration,e,r),this}get names(){return vs(super.names,this.iteration.names)}},MP=class extends gs{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Ni.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${r} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){let e=Lv(super.names,this.from);return Lv(e,this.to)}},Zv=class extends gs{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=hu(this.iterable,e,r),this}get names(){return vs(super.names,this.iterable.names)}},Mp=class extends Ia{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Mp.kind="func";var qp=class extends Dp{render(e){return"return "+super.render(e)}};qp.kind="return";var qP=class extends Ia{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&vs(e,this.catch.names),this.finally&&vs(e,this.finally.names),e}},Zp=class extends Ia{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Zp.kind="catch";var Lp=class extends Ia{render(e){return"finally"+super.render(e)}};Lp.kind="finally";var ZP=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
13
|
+
`:""},this._extScope=e,this._scope=new Ni.Scope({parent:e}),this._nodes=[new UP]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new OP(e,a,n)),a}const(e,r,n){return this._def(Ni.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ni.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ni.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new qv(e,r,n))}add(e,r){return this._leafNode(new jP(e,rt.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ht.nil&&this._leafNode(new AP(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ht.addCodeArg)(r,i));return r.push("}"),new ht._Code(r)}if(e,r,n){if(this._blockNode(new hs(e)),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(e){return this._elseNode(new hs(e))}else(){return this._elseNode(new mu)}endIf(){return this._endBlockNode(hs,mu)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new DP(e),r)}forRange(e,r,n,i,a=this.opts.es5?Ni.varKinds.var:Ni.varKinds.let){let o=this._scope.toName(e);return this._for(new MP(a,o,r,n),()=>i(o))}forOf(e,r,n,i=Ni.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let o=r instanceof ht.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ht._)`${o}.length`,s=>{this.var(a,(0,ht._)`${o}[${s}]`),n(a)})}return this._for(new Zv("of",i,a,r),()=>n(a))}forIn(e,r,n,i=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ht._)`Object.keys(${r})`,n);let a=this._scope.toName(e);return this._for(new Zv("in",i,a,r),()=>n(a))}endFor(){return this._endBlockNode(gs)}label(e){return this._leafNode(new NP(e))}break(e){return this._leafNode(new RP(e))}return(e){let r=new qp;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(qp)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new qP;if(this._blockNode(i),this.code(e),r){let a=this.name("e");this._currNode=i.catch=new Zp(a),r(a)}return n&&(this._currNode=i.finally=new Lp,this.code(n)),this._endBlockNode(Zp,Lp)}throw(e){return this._leafNode(new CP(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){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||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ht.nil,n,i){return this._blockNode(new Mp(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Mp)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof hs))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};rt.CodeGen=ZP;function vs(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Lv(t,e){return e instanceof ht._CodeOrName?vs(t,e.names):t}function hu(t,e,r){if(t instanceof ht.Name)return n(t);if(!i(t))return t;return new ht._Code(t._items.reduce((a,o)=>(o instanceof ht.Name&&(o=n(o)),o instanceof ht._Code?a.push(...o._items):a.push(o),a),[]));function n(a){let o=r[a.str];return o===void 0||e[a.str]!==1?a:(delete e[a.str],o)}function i(a){return a instanceof ht._Code&&a._items.some(o=>o instanceof ht.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function Gue(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function jZ(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ht._)`!${LP(t)}`}rt.not=jZ;var Que=NZ(rt.operators.AND);function Yue(...t){return t.reduce(Que)}rt.and=Yue;var Jue=NZ(rt.operators.OR);function Xue(...t){return t.reduce(Jue)}rt.or=Xue;function NZ(t){return(e,r)=>e===ht.nil?r:r===ht.nil?e:(0,ht._)`${LP(e)} ${t} ${LP(r)}`}function LP(t){return t instanceof ht.Name?t:(0,ht._)`(${t})`}});var yt=z(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.checkStrictMode=ot.getErrorPath=ot.Type=ot.useFunc=ot.setEvaluated=ot.evaluatedPropsToName=ot.mergeEvaluated=ot.eachItem=ot.unescapeJsonPointer=ot.escapeJsonPointer=ot.escapeFragment=ot.unescapeFragment=ot.schemaRefOrVal=ot.schemaHasRulesButRef=ot.schemaHasRules=ot.checkUnknownRules=ot.alwaysValidSchema=ot.toHash=void 0;var Lt=at(),ele=Up();function tle(t){let e={};for(let r of t)e[r]=!0;return e}ot.toHash=tle;function rle(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(AZ(t,e),!UZ(e,t.self.RULES.all))}ot.alwaysValidSchema=rle;function AZ(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let a in e)i[a]||qZ(t,`unknown keyword: "${a}"`)}ot.checkUnknownRules=AZ;function UZ(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ot.schemaHasRules=UZ;function nle(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ot.schemaHasRulesButRef=nle;function ile({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Lt._)`${r}`}return(0,Lt._)`${t}${e}${(0,Lt.getProperty)(n)}`}ot.schemaRefOrVal=ile;function ale(t){return DZ(decodeURIComponent(t))}ot.unescapeFragment=ale;function ole(t){return encodeURIComponent(VP(t))}ot.escapeFragment=ole;function VP(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ot.escapeJsonPointer=VP;function DZ(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ot.unescapeJsonPointer=DZ;function sle(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ot.eachItem=sle;function RZ({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,a,o,s)=>{let c=o===void 0?a:o instanceof Lt.Name?(a instanceof Lt.Name?t(i,a,o):e(i,a,o),o):a instanceof Lt.Name?(e(i,o,a),a):r(a,o);return s===Lt.Name&&!(c instanceof Lt.Name)?n(i,c):c}}ot.mergeEvaluated={props:RZ({mergeNames:(t,e,r)=>t.if((0,Lt._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Lt._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Lt._)`${r} || {}`).code((0,Lt._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Lt._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Lt._)`${r} || {}`),WP(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:MZ}),items:RZ({mergeNames:(t,e,r)=>t.if((0,Lt._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Lt._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Lt._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Lt._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function MZ(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Lt._)`{}`);return e!==void 0&&WP(t,r,e),r}ot.evaluatedPropsToName=MZ;function WP(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Lt._)`${e}${(0,Lt.getProperty)(n)}`,!0))}ot.setEvaluated=WP;var CZ={};function cle(t,e){return t.scopeValue("func",{ref:e,code:CZ[e.code]||(CZ[e.code]=new ele._Code(e.code))})}ot.useFunc=cle;var FP;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(FP||(ot.Type=FP={}));function ule(t,e,r){if(t instanceof Lt.Name){let n=e===FP.Num;return r?n?(0,Lt._)`"[" + ${t} + "]"`:(0,Lt._)`"['" + ${t} + "']"`:n?(0,Lt._)`"/" + ${t}`:(0,Lt._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Lt.getProperty)(t).toString():"/"+VP(t)}ot.getErrorPath=ule;function qZ(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ot.checkStrictMode=qZ});var Ea=z(BP=>{"use strict";Object.defineProperty(BP,"__esModule",{value:!0});var Mr=at(),lle={data:new Mr.Name("data"),valCxt:new Mr.Name("valCxt"),instancePath:new Mr.Name("instancePath"),parentData:new Mr.Name("parentData"),parentDataProperty:new Mr.Name("parentDataProperty"),rootData:new Mr.Name("rootData"),dynamicAnchors:new Mr.Name("dynamicAnchors"),vErrors:new Mr.Name("vErrors"),errors:new Mr.Name("errors"),this:new Mr.Name("this"),self:new Mr.Name("self"),scope:new Mr.Name("scope"),json:new Mr.Name("json"),jsonPos:new Mr.Name("jsonPos"),jsonLen:new Mr.Name("jsonLen"),jsonPart:new Mr.Name("jsonPart")};BP.default=lle});var Fp=z(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.extendErrors=qr.resetErrorsCount=qr.reportExtraError=qr.reportError=qr.keyword$DataError=qr.keywordError=void 0;var _t=at(),Vv=yt(),sn=Ea();qr.keywordError={message:({keyword:t})=>(0,_t.str)`must pass "${t}" keyword validation`};qr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,_t.str)`"${t}" keyword must be ${e} ($data)`:(0,_t.str)`"${t}" keyword is invalid ($data)`};function dle(t,e=qr.keywordError,r,n){let{it:i}=t,{gen:a,compositeRule:o,allErrors:s}=i,c=FZ(t,e,r);n??(o||s)?ZZ(a,c):LZ(i,(0,_t._)`[${c}]`)}qr.reportError=dle;function ple(t,e=qr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:a,allErrors:o}=n,s=FZ(t,e,r);ZZ(i,s),a||o||LZ(n,sn.default.vErrors)}qr.reportExtraError=ple;function fle(t,e){t.assign(sn.default.errors,e),t.if((0,_t._)`${sn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,_t._)`${sn.default.vErrors}.length`,e),()=>t.assign(sn.default.vErrors,null)))}qr.resetErrorsCount=fle;function mle({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",i,sn.default.errors,s=>{t.const(o,(0,_t._)`${sn.default.vErrors}[${s}]`),t.if((0,_t._)`${o}.instancePath === undefined`,()=>t.assign((0,_t._)`${o}.instancePath`,(0,_t.strConcat)(sn.default.instancePath,a.errorPath))),t.assign((0,_t._)`${o}.schemaPath`,(0,_t.str)`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign((0,_t._)`${o}.schema`,r),t.assign((0,_t._)`${o}.data`,n))})}qr.extendErrors=mle;function ZZ(t,e){let r=t.const("err",e);t.if((0,_t._)`${sn.default.vErrors} === null`,()=>t.assign(sn.default.vErrors,(0,_t._)`[${r}]`),(0,_t._)`${sn.default.vErrors}.push(${r})`),t.code((0,_t._)`${sn.default.errors}++`)}function LZ(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,_t._)`new ${t.ValidationError}(${e})`):(r.assign((0,_t._)`${n}.errors`,e),r.return(!1))}var ys={keyword:new _t.Name("keyword"),schemaPath:new _t.Name("schemaPath"),params:new _t.Name("params"),propertyName:new _t.Name("propertyName"),message:new _t.Name("message"),schema:new _t.Name("schema"),parentSchema:new _t.Name("parentSchema")};function FZ(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,_t._)`{}`:hle(t,e,r)}function hle(t,e,r={}){let{gen:n,it:i}=t,a=[gle(i,r),vle(t,r)];return yle(t,e,a),n.object(...a)}function gle({errorPath:t},{instancePath:e}){let r=e?(0,_t.str)`${t}${(0,Vv.getErrorPath)(e,Vv.Type.Str)}`:t;return[sn.default.instancePath,(0,_t.strConcat)(sn.default.instancePath,r)]}function vle({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,_t.str)`${e}/${t}`;return r&&(i=(0,_t.str)`${i}${(0,Vv.getErrorPath)(r,Vv.Type.Str)}`),[ys.schemaPath,i]}function yle(t,{params:e,message:r},n){let{keyword:i,data:a,schemaValue:o,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;n.push([ys.keyword,i],[ys.params,typeof e=="function"?e(t):e||(0,_t._)`{}`]),c.messages&&n.push([ys.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([ys.schema,o],[ys.parentSchema,(0,_t._)`${l}${d}`],[sn.default.data,a]),u&&n.push([ys.propertyName,u])}});var WZ=z(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.boolOrEmptySchema=gu.topBoolOrEmptySchema=void 0;var _le=Fp(),ble=at(),xle=Ea(),wle={message:"boolean schema is false"};function kle(t){let{gen:e,schema:r,validateName:n}=t;r===!1?VZ(t,!1):typeof r=="object"&&r.$async===!0?e.return(xle.default.data):(e.assign((0,ble._)`${n}.errors`,null),e.return(!0))}gu.topBoolOrEmptySchema=kle;function Sle(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),VZ(t)):r.var(e,!0)}gu.boolOrEmptySchema=Sle;function VZ(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,_le.reportError)(i,wle,void 0,e)}});var KP=z(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.getRules=vu.isJSONType=void 0;var $le=["string","number","integer","boolean","null","object","array"],Ile=new Set($le);function Ele(t){return typeof t=="string"&&Ile.has(t)}vu.isJSONType=Ele;function Ple(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}vu.getRules=Ple});var HP=z(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.shouldUseRule=fo.shouldUseGroup=fo.schemaHasRulesForType=void 0;function Tle({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&BZ(t,n)}fo.schemaHasRulesForType=Tle;function BZ(t,e){return e.rules.some(r=>KZ(t,r))}fo.shouldUseGroup=BZ;function KZ(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}fo.shouldUseRule=KZ});var Vp=z(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.reportTypeError=Zr.checkDataTypes=Zr.checkDataType=Zr.coerceAndCheckDataType=Zr.getJSONTypes=Zr.getSchemaTypes=Zr.DataType=void 0;var zle=KP(),Ole=HP(),jle=Fp(),Ge=at(),HZ=yt(),yu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yu||(Zr.DataType=yu={}));function Nle(t){let e=GZ(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Zr.getSchemaTypes=Nle;function GZ(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(zle.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Zr.getJSONTypes=GZ;function Rle(t,e){let{gen:r,data:n,opts:i}=t,a=Cle(e,i.coerceTypes),o=e.length>0&&!(a.length===0&&e.length===1&&(0,Ole.schemaHasRulesForType)(t,e[0]));if(o){let s=QP(e,n,i.strictNumbers,yu.Wrong);r.if(s,()=>{a.length?Ale(t,e,a):YP(t)})}return o}Zr.coerceAndCheckDataType=Rle;var QZ=new Set(["string","number","integer","boolean","null"]);function Cle(t,e){return e?t.filter(r=>QZ.has(r)||e==="array"&&r==="array"):[]}function Ale(t,e,r){let{gen:n,data:i,opts:a}=t,o=n.let("dataType",(0,Ge._)`typeof ${i}`),s=n.let("coerced",(0,Ge._)`undefined`);a.coerceTypes==="array"&&n.if((0,Ge._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ge._)`${i}[0]`).assign(o,(0,Ge._)`typeof ${i}`).if(QP(e,i,a.strictNumbers),()=>n.assign(s,i))),n.if((0,Ge._)`${s} !== undefined`);for(let u of r)(QZ.has(u)||u==="array"&&a.coerceTypes==="array")&&c(u);n.else(),YP(t),n.endIf(),n.if((0,Ge._)`${s} !== undefined`,()=>{n.assign(i,s),Ule(t,s)});function c(u){switch(u){case"string":n.elseIf((0,Ge._)`${o} == "number" || ${o} == "boolean"`).assign(s,(0,Ge._)`"" + ${i}`).elseIf((0,Ge._)`${i} === null`).assign(s,(0,Ge._)`""`);return;case"number":n.elseIf((0,Ge._)`${o} == "boolean" || ${i} === null
|
|
14
|
+
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Ge._)`+${i}`);return;case"integer":n.elseIf((0,Ge._)`${o} === "boolean" || ${i} === null
|
|
15
|
+
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Ge._)`+${i}`);return;case"boolean":n.elseIf((0,Ge._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Ge._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Ge._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Ge._)`${o} === "string" || ${o} === "number"
|
|
16
|
+
|| ${o} === "boolean" || ${i} === null`).assign(s,(0,Ge._)`[${i}]`)}}}function Ule({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Ge._)`${e} !== undefined`,()=>t.assign((0,Ge._)`${e}[${r}]`,n))}function GP(t,e,r,n=yu.Correct){let i=n===yu.Correct?Ge.operators.EQ:Ge.operators.NEQ,a;switch(t){case"null":return(0,Ge._)`${e} ${i} null`;case"array":a=(0,Ge._)`Array.isArray(${e})`;break;case"object":a=(0,Ge._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=o((0,Ge._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=o();break;default:return(0,Ge._)`typeof ${e} ${i} ${t}`}return n===yu.Correct?a:(0,Ge.not)(a);function o(s=Ge.nil){return(0,Ge.and)((0,Ge._)`typeof ${e} == "number"`,s,r?(0,Ge._)`isFinite(${e})`:Ge.nil)}}Zr.checkDataType=GP;function QP(t,e,r,n){if(t.length===1)return GP(t[0],e,r,n);let i,a=(0,HZ.toHash)(t);if(a.array&&a.object){let o=(0,Ge._)`typeof ${e} != "object"`;i=a.null?o:(0,Ge._)`!${e} || ${o}`,delete a.null,delete a.array,delete a.object}else i=Ge.nil;a.number&&delete a.integer;for(let o in a)i=(0,Ge.and)(i,GP(o,e,r,n));return i}Zr.checkDataTypes=QP;var Dle={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ge._)`{type: ${t}}`:(0,Ge._)`{type: ${e}}`};function YP(t){let e=Mle(t);(0,jle.reportError)(e,Dle)}Zr.reportTypeError=YP;function Mle(t){let{gen:e,data:r,schema:n}=t,i=(0,HZ.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var JZ=z(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});Wv.assignDefaults=void 0;var _u=at(),qle=yt();function Zle(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)YZ(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>YZ(t,a,i.default))}Wv.assignDefaults=Zle;function YZ(t,e,r){let{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;let s=(0,_u._)`${a}${(0,_u.getProperty)(e)}`;if(i){(0,qle.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,_u._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,_u._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,_u._)`${s} = ${(0,_u.stringify)(r)}`)}});var li=z(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateUnion=Rt.validateArray=Rt.usePattern=Rt.callValidateCode=Rt.schemaProperties=Rt.allSchemaProperties=Rt.noPropertyInData=Rt.propertyInData=Rt.isOwnProperty=Rt.hasPropFunc=Rt.reportMissingProp=Rt.checkMissingProp=Rt.checkReportMissingProp=void 0;var Gt=at(),JP=yt(),mo=Ea(),Lle=yt();function Fle(t,e){let{gen:r,data:n,it:i}=t;r.if(eT(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Gt._)`${e}`},!0),t.error()})}Rt.checkReportMissingProp=Fle;function Vle({gen:t,data:e,it:{opts:r}},n,i){return(0,Gt.or)(...n.map(a=>(0,Gt.and)(eT(t,e,a,r.ownProperties),(0,Gt._)`${i} = ${a}`)))}Rt.checkMissingProp=Vle;function Wle(t,e){t.setParams({missingProperty:e},!0),t.error()}Rt.reportMissingProp=Wle;function XZ(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Gt._)`Object.prototype.hasOwnProperty`})}Rt.hasPropFunc=XZ;function XP(t,e,r){return(0,Gt._)`${XZ(t)}.call(${e}, ${r})`}Rt.isOwnProperty=XP;function Ble(t,e,r,n){let i=(0,Gt._)`${e}${(0,Gt.getProperty)(r)} !== undefined`;return n?(0,Gt._)`${i} && ${XP(t,e,r)}`:i}Rt.propertyInData=Ble;function eT(t,e,r,n){let i=(0,Gt._)`${e}${(0,Gt.getProperty)(r)} === undefined`;return n?(0,Gt.or)(i,(0,Gt.not)(XP(t,e,r))):i}Rt.noPropertyInData=eT;function eL(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Rt.allSchemaProperties=eL;function Kle(t,e){return eL(e).filter(r=>!(0,JP.alwaysValidSchema)(t,e[r]))}Rt.schemaProperties=Kle;function Hle({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:o},s,c,u){let l=u?(0,Gt._)`${t}, ${e}, ${n}${i}`:e,d=[[mo.default.instancePath,(0,Gt.strConcat)(mo.default.instancePath,a)],[mo.default.parentData,o.parentData],[mo.default.parentDataProperty,o.parentDataProperty],[mo.default.rootData,mo.default.rootData]];o.opts.dynamicRef&&d.push([mo.default.dynamicAnchors,mo.default.dynamicAnchors]);let f=(0,Gt._)`${l}, ${r.object(...d)}`;return c!==Gt.nil?(0,Gt._)`${s}.call(${c}, ${f})`:(0,Gt._)`${s}(${f})`}Rt.callValidateCode=Hle;var Gle=(0,Gt._)`new RegExp`;function Qle({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,a=i(r,n);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Gt._)`${i.code==="new RegExp"?Gle:(0,Lle.useFunc)(t,i)}(${r}, ${n})`})}Rt.usePattern=Qle;function Yle(t){let{gen:e,data:r,keyword:n,it:i}=t,a=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return o(()=>e.assign(s,!1)),s}return e.var(a,!0),o(()=>e.break()),a;function o(s){let c=e.const("len",(0,Gt._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:JP.Type.Num},a),e.if((0,Gt.not)(a),s)})}}Rt.validateArray=Yle;function Jle(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,JP.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},s);e.assign(o,(0,Gt._)`${o} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,Gt.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Rt.validateUnion=Jle});var nL=z(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.validateKeywordUsage=Gi.validSchemaType=Gi.funcKeywordCode=Gi.macroKeywordCode=void 0;var cn=at(),_s=Ea(),Xle=li(),ede=Fp();function tde(t,e){let{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=rL(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:cn.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Gi.macroKeywordCode=tde;function rde(t,e){var r;let{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;ide(c,e);let u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,l=rL(n,i,u),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&tL(t),g(()=>t.error());else{let h=e.async?p():m();e.modifying&&tL(t),g(()=>nde(t,h))}}function p(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,cn._)`await `),b=>n.assign(d,!1).if((0,cn._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,cn._)`${b}.errors`),()=>n.throw(b))),h}function m(){let h=(0,cn._)`${l}.errors`;return n.assign(h,null),v(cn.nil),h}function v(h=e.async?(0,cn._)`await `:cn.nil){let b=c.opts.passContext?_s.default.this:_s.default.self,y=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,cn._)`${h}${(0,Xle.callValidateCode)(t,l,b,y)}`,e.modifying)}function g(h){var b;n.if((0,cn.not)((b=e.valid)!==null&&b!==void 0?b:d),h)}}Gi.funcKeywordCode=rde;function tL(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,cn._)`${n.parentData}[${n.parentDataProperty}]`))}function nde(t,e){let{gen:r}=t;r.if((0,cn._)`Array.isArray(${e})`,()=>{r.assign(_s.default.vErrors,(0,cn._)`${_s.default.vErrors} === null ? ${e} : ${_s.default.vErrors}.concat(${e})`).assign(_s.default.errors,(0,cn._)`${_s.default.vErrors}.length`),(0,ede.extendErrors)(t)},()=>t.error())}function ide({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function rL(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,cn.stringify)(r)})}function ade(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Gi.validSchemaType=ade;function ode({schema:t,opts:e,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[a])){let c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Gi.validateKeywordUsage=ode});var aL=z(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.extendSubschemaMode=ho.extendSubschemaData=ho.getSubschema=void 0;var Qi=at(),iL=yt();function sde(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Qi._)`${t.schemaPath}${(0,Qi.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Qi._)`${t.schemaPath}${(0,Qi.getProperty)(e)}${(0,Qi.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,iL.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}ho.getSubschema=sde;function cde(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,f=s.let("data",(0,Qi._)`${e.data}${(0,Qi.getProperty)(r)}`,!0);c(f),t.errorPath=(0,Qi.str)`${u}${(0,iL.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Qi._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(i!==void 0){let u=i instanceof Qi.Name?i:s.let("data",i,!0);c(u),o!==void 0&&(t.propertyName=o)}a&&(t.dataTypes=a);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}ho.extendSubschemaData=cde;function ude(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}ho.extendSubschemaMode=ude});var Wp=z((LAe,oL)=>{"use strict";oL.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}});var cL=z((FAe,sL)=>{"use strict";var go=sL.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Bv(e,n,i,t,"",t)};go.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};go.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};go.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};go.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 Bv(t,e,r,n,i,a,o,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,a,o,s,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in go.arrayKeywords)for(var f=0;f<d.length;f++)Bv(t,e,r,d[f],i+"/"+l+"/"+f,a,i,l,n,f)}else if(l in go.propsKeywords){if(d&&typeof d=="object")for(var p in d)Bv(t,e,r,d[p],i+"/"+l+"/"+lde(p),a,i,l,n,p)}else(l in go.keywords||t.allKeys&&!(l in go.skipKeywords))&&Bv(t,e,r,d,i+"/"+l,a,i,l,n)}r(n,i,a,o,s,c,u)}}function lde(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Bp=z(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.getSchemaRefs=xn.resolveUrl=xn.normalizeId=xn._getFullPath=xn.getFullPath=xn.inlineRef=void 0;var dde=yt(),pde=Wp(),fde=cL(),mde=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hde(t,e=!0){return typeof t=="boolean"?!0:e===!0?!tT(t):e?uL(t)<=e:!1}xn.inlineRef=hde;var gde=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function tT(t){for(let e in t){if(gde.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(tT)||typeof r=="object"&&tT(r))return!0}return!1}function uL(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!mde.has(r)&&(typeof t[r]=="object"&&(0,dde.eachItem)(t[r],n=>e+=uL(n)),e===1/0))return 1/0}return e}function lL(t,e="",r){r!==!1&&(e=bu(e));let n=t.parse(e);return dL(t,n)}xn.getFullPath=lL;function dL(t,e){return t.serialize(e).split("#")[0]+"#"}xn._getFullPath=dL;var vde=/#\/?$/;function bu(t){return t?t.replace(vde,""):""}xn.normalizeId=bu;function yde(t,e,r){return r=bu(r),t.resolve(e,r)}xn.resolveUrl=yde;var _de=/^[a-z_][-a-z0-9._]*$/i;function bde(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=bu(t[r]||e),a={"":i},o=lL(n,i,!1),s={},c=new Set;return fde(t,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let v=o+f,g=a[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),a[f]=g;function h(y){let _=this.opts.uriResolver.resolve;if(y=bu(g?_(g,y):y),c.has(y))throw l(y);c.add(y);let x=this.refs[y];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(d,x.schema,y):y!==bu(v)&&(y[0]==="#"?(u(d,s[y],y),s[y]=d):this.refs[y]=v),y}function b(y){if(typeof y=="string"){if(!_de.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),s;function u(d,f,p){if(f!==void 0&&!pde(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}xn.getSchemaRefs=bde});var Gp=z(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.getData=vo.KeywordCxt=vo.validateFunctionCode=void 0;var gL=WZ(),pL=Vp(),nT=HP(),Kv=Vp(),xde=JZ(),Hp=nL(),rT=aL(),ke=at(),Ue=Ea(),wde=Bp(),Pa=yt(),Kp=Fp();function kde(t){if(_L(t)&&(bL(t),yL(t))){Ide(t);return}vL(t,()=>(0,gL.topBoolOrEmptySchema)(t))}vo.validateFunctionCode=kde;function vL({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},a){i.code.es5?t.func(e,(0,ke._)`${Ue.default.data}, ${Ue.default.valCxt}`,n.$async,()=>{t.code((0,ke._)`"use strict"; ${fL(r,i)}`),$de(t,i),t.code(a)}):t.func(e,(0,ke._)`${Ue.default.data}, ${Sde(i)}`,n.$async,()=>t.code(fL(r,i)).code(a))}function Sde(t){return(0,ke._)`{${Ue.default.instancePath}="", ${Ue.default.parentData}, ${Ue.default.parentDataProperty}, ${Ue.default.rootData}=${Ue.default.data}${t.dynamicRef?(0,ke._)`, ${Ue.default.dynamicAnchors}={}`:ke.nil}}={}`}function $de(t,e){t.if(Ue.default.valCxt,()=>{t.var(Ue.default.instancePath,(0,ke._)`${Ue.default.valCxt}.${Ue.default.instancePath}`),t.var(Ue.default.parentData,(0,ke._)`${Ue.default.valCxt}.${Ue.default.parentData}`),t.var(Ue.default.parentDataProperty,(0,ke._)`${Ue.default.valCxt}.${Ue.default.parentDataProperty}`),t.var(Ue.default.rootData,(0,ke._)`${Ue.default.valCxt}.${Ue.default.rootData}`),e.dynamicRef&&t.var(Ue.default.dynamicAnchors,(0,ke._)`${Ue.default.valCxt}.${Ue.default.dynamicAnchors}`)},()=>{t.var(Ue.default.instancePath,(0,ke._)`""`),t.var(Ue.default.parentData,(0,ke._)`undefined`),t.var(Ue.default.parentDataProperty,(0,ke._)`undefined`),t.var(Ue.default.rootData,Ue.default.data),e.dynamicRef&&t.var(Ue.default.dynamicAnchors,(0,ke._)`{}`)})}function Ide(t){let{schema:e,opts:r,gen:n}=t;vL(t,()=>{r.$comment&&e.$comment&&wL(t),Ode(t),n.let(Ue.default.vErrors,null),n.let(Ue.default.errors,0),r.unevaluated&&Ede(t),xL(t),Rde(t)})}function Ede(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,ke._)`${r}.evaluated`),e.if((0,ke._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,ke._)`${t.evaluated}.props`,(0,ke._)`undefined`)),e.if((0,ke._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,ke._)`${t.evaluated}.items`,(0,ke._)`undefined`))}function fL(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,ke._)`/*# sourceURL=${r} */`:ke.nil}function Pde(t,e){if(_L(t)&&(bL(t),yL(t))){Tde(t,e);return}(0,gL.boolOrEmptySchema)(t,e)}function yL({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function _L(t){return typeof t.schema!="boolean"}function Tde(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&wL(t),jde(t),Nde(t);let a=n.const("_errs",Ue.default.errors);xL(t,a),n.var(e,(0,ke._)`${a} === ${Ue.default.errors}`)}function bL(t){(0,Pa.checkUnknownRules)(t),zde(t)}function xL(t,e){if(t.opts.jtd)return mL(t,[],!1,e);let r=(0,pL.getSchemaTypes)(t.schema),n=(0,pL.coerceAndCheckDataType)(t,r);mL(t,r,!n,e)}function zde(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Pa.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ode(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Pa.checkStrictMode)(t,"default is ignored in the schema root")}function jde(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,wde.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Nde(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function wL({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let a=r.$comment;if(i.$comment===!0)t.code((0,ke._)`${Ue.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){let o=(0,ke.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,ke._)`${Ue.default.self}.opts.$comment(${a}, ${o}, ${s}.schema)`)}}function Rde(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=t;r.$async?e.if((0,ke._)`${Ue.default.errors} === 0`,()=>e.return(Ue.default.data),()=>e.throw((0,ke._)`new ${i}(${Ue.default.vErrors})`)):(e.assign((0,ke._)`${n}.errors`,Ue.default.vErrors),a.unevaluated&&Cde(t),e.return((0,ke._)`${Ue.default.errors} === 0`))}function Cde({gen:t,evaluated:e,props:r,items:n}){r instanceof ke.Name&&t.assign((0,ke._)`${e}.props`,r),n instanceof ke.Name&&t.assign((0,ke._)`${e}.items`,n)}function mL(t,e,r,n){let{gen:i,schema:a,data:o,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,Pa.schemaHasRulesButRef)(a,l))){i.block(()=>SL(t,"$ref",l.all.$ref.definition));return}c.jtd||Ade(t,e),i.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,nT.shouldUseGroup)(a,f)&&(f.type?(i.if((0,Kv.checkDataType)(f.type,o,c.strictNumbers)),hL(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,Kv.reportTypeError)(t)),i.endIf()):hL(t,f),s||i.if((0,ke._)`${Ue.default.errors} === ${n||0}`))}}function hL(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,xde.assignDefaults)(t,e.type),r.block(()=>{for(let a of e.rules)(0,nT.shouldUseRule)(n,a)&&SL(t,a.keyword,a.definition,e.type)})}function Ade(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Ude(t,e),t.opts.allowUnionTypes||Dde(t,e),Mde(t,t.dataTypes))}function Ude(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{kL(t.dataTypes,r)||iT(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Zde(t,e)}}function Dde(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&iT(t,"use allowUnionTypes to allow union type keyword")}function Mde(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,nT.shouldUseRule)(t.schema,i)){let{type:a}=i.definition;a.length&&!a.some(o=>qde(e,o))&&iT(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function qde(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function kL(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Zde(t,e){let r=[];for(let n of t.dataTypes)kL(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function iT(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Pa.checkStrictMode)(t,e,t.opts.strictTypes)}var Hv=class{constructor(e,r,n){if((0,Hp.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Pa.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",$L(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Hp.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=e.gen.const("_errs",Ue.default.errors))}result(e,r,n){this.failResult((0,ke.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,ke.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,ke._)`${r} !== undefined && (${(0,ke.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Kp.reportExtraError:Kp.reportError)(this,this.def.error,r)}$dataError(){(0,Kp.reportError)(this,this.def.$dataError||Kp.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Kp.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=ke.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=ke.nil,r=ke.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:a,def:o}=this;n.if((0,ke.or)((0,ke._)`${i} === undefined`,r)),e!==ke.nil&&n.assign(e,!0),(a.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==ke.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,ke.or)(o(),s());function o(){if(n.length){if(!(r instanceof ke.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ke._)`${(0,Kv.checkDataTypes)(c,r,a.opts.strictNumbers,Kv.DataType.Wrong)}`}return ke.nil}function s(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,ke._)`!${c}(${r})`}return ke.nil}}subschema(e,r){let n=(0,rT.getSubschema)(this.it,e);(0,rT.extendSubschemaData)(n,this.it,e),(0,rT.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Pde(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Pa.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Pa.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,ke.Name)),!0}};vo.KeywordCxt=Hv;function SL(t,e,r,n){let i=new Hv(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Hp.funcKeywordCode)(i,r):"macro"in r?(0,Hp.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Hp.funcKeywordCode)(i,r)}var Lde=/^\/(?:[^~]|~0|~1)*$/,Fde=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $L(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return Ue.default.rootData;if(t[0]==="/"){if(!Lde.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=Ue.default.rootData}else{let u=Fde.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=e)throw new Error(c("property/index",l));return n[e-l]}if(l>e)throw new Error(c("data",l));if(a=r[e-l],!i)return a}let o=a,s=i.split("/");for(let u of s)u&&(a=(0,ke._)`${a}${(0,ke.getProperty)((0,Pa.unescapeJsonPointer)(u))}`,o=(0,ke._)`${o} && ${a}`);return o;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}vo.getData=$L});var Gv=z(oT=>{"use strict";Object.defineProperty(oT,"__esModule",{value:!0});var aT=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};oT.default=aT});var Qp=z(uT=>{"use strict";Object.defineProperty(uT,"__esModule",{value:!0});var sT=Bp(),cT=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,sT.resolveUrl)(e,r,n),this.missingSchema=(0,sT.normalizeId)((0,sT.getFullPath)(e,this.missingRef))}};uT.default=cT});var Yv=z(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.resolveSchema=di.getCompilingSchema=di.resolveRef=di.compileSchema=di.SchemaEnv=void 0;var Ri=at(),Vde=Gv(),bs=Ea(),Ci=Bp(),IL=yt(),Wde=Gp(),xu=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Ci.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};di.SchemaEnv=xu;function dT(t){let e=EL.call(this,t);if(e)return e;let r=(0,Ci.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new Ri.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),s;t.$async&&(s=o.scopeValue("Error",{ref:Vde.default,code:(0,Ri._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");t.validateName=c;let u={gen:o,allErrors:this.opts.allErrors,data:bs.default.data,parentData:bs.default.parentData,parentDataProperty:bs.default.parentDataProperty,dataNames:[bs.default.data],dataPathArr:[Ri.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Ri.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Ri.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ri._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,Wde.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let d=o.toString();l=`${o.scopeRefs(bs.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let p=new Function(`${bs.default.self}`,`${bs.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:v}=u;p.evaluated={props:m instanceof Ri.Name?void 0:m,items:v instanceof Ri.Name?void 0:v,dynamicProps:m instanceof Ri.Name,dynamicItems:v instanceof Ri.Name},p.source&&(p.source.evaluated=(0,Ri.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}di.compileSchema=dT;function Bde(t,e,r){var n;r=(0,Ci.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let a=Gde.call(this,t,r);if(a===void 0){let o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;o&&(a=new xu({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=Kde.call(this,a)}di.resolveRef=Bde;function Kde(t){return(0,Ci.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:dT.call(this,t)}function EL(t){for(let e of this._compilations)if(Hde(e,t))return e}di.getCompilingSchema=EL;function Hde(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Gde(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Qv.call(this,t,e)}function Qv(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Ci._getFullPath)(this.opts.uriResolver,r),i=(0,Ci.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return lT.call(this,r,t);let a=(0,Ci.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){let s=Qv.call(this,t,o);return typeof s?.schema!="object"?void 0:lT.call(this,r,s)}if(typeof o?.schema=="object"){if(o.validate||dT.call(this,o),a===(0,Ci.normalizeId)(e)){let{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Ci.resolveUrl)(this.opts.uriResolver,i,u)),new xu({schema:s,schemaId:c,root:t,baseId:i})}return lT.call(this,r,o)}}di.resolveSchema=Qv;var Qde=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lT(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,IL.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Qde.has(s)&&u&&(e=(0,Ci.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,IL.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Ci.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=Qv.call(this,n,s)}let{schemaId:o}=this.opts;if(a=a||new xu({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}});var PL=z((GAe,Yde)=>{Yde.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 fT=z((QAe,jL)=>{"use strict";var Jde=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),zL=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);function pT(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var Xde=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function TL(t){return t.length=0,!0}function epe(t,e,r){if(t.length){let n=pT(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function tpe(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],a=!1,o=!1,s=epe;for(let c=0;c<t.length;c++){let u=t[c];if(!(u==="["||u==="]"))if(u===":"){if(a===!0&&(o=!0),!s(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(a=!0),n.push(":");continue}else if(u==="%"){if(!s(i,n,r))break;s=TL}else{i.push(u);continue}}return i.length&&(s===TL?r.zone=i.join(""):o?n.push(i.join("")):n.push(pT(i))),r.address=n.join(""),r}function OL(t){if(rpe(t,":")<2)return{host:t,isIPV6:!1};let e=tpe(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function rpe(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function npe(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}function ipe(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function ape(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!zL(r)){let n=OL(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}jL.exports={nonSimpleDomain:Xde,recomposeAuthority:ape,normalizeComponentEncoding:ipe,removeDotSegments:npe,isIPv4:zL,isUUID:Jde,normalizeIPv6:OL,stringArrayToHexStripped:pT}});var UL=z((YAe,AL)=>{"use strict";var{isUUID:ope}=fT(),spe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,cpe=["http","https","ws","wss","urn","urn:uuid"];function upe(t){return cpe.indexOf(t)!==-1}function mT(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function NL(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function RL(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function lpe(t){return t.secure=mT(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function dpe(t){if((t.port===(mT(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function ppe(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(spe);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,a=hT(i);t.path=void 0,a&&(t=a.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function fpe(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,a=hT(i);a&&(t=a.serialize(t,e));let o=t,s=t.nss;return o.path=`${n||e.nid}:${s}`,e.skipEscape=!0,o}function mpe(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!ope(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function hpe(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var CL={scheme:"http",domainHost:!0,parse:NL,serialize:RL},gpe={scheme:"https",domainHost:CL.domainHost,parse:NL,serialize:RL},Jv={scheme:"ws",domainHost:!0,parse:lpe,serialize:dpe},vpe={scheme:"wss",domainHost:Jv.domainHost,parse:Jv.parse,serialize:Jv.serialize},ype={scheme:"urn",parse:ppe,serialize:fpe,skipNormalize:!0},_pe={scheme:"urn:uuid",parse:mpe,serialize:hpe,skipNormalize:!0},Xv={http:CL,https:gpe,ws:Jv,wss:vpe,urn:ype,"urn:uuid":_pe};Object.setPrototypeOf(Xv,null);function hT(t){return t&&(Xv[t]||Xv[t.toLowerCase()])||void 0}AL.exports={wsIsSecure:mT,SCHEMES:Xv,isValidSchemeName:upe,getSchemeHandler:hT}});var vT=z((JAe,ty)=>{"use strict";var{normalizeIPv6:bpe,removeDotSegments:Yp,recomposeAuthority:xpe,normalizeComponentEncoding:ey,isIPv4:wpe,nonSimpleDomain:kpe}=fT(),{SCHEMES:Spe,getSchemeHandler:DL}=UL();function $pe(t,e){return typeof t=="string"?t=Yi(Ta(t,e),e):typeof t=="object"&&(t=Ta(Yi(t,e),e)),t}function Ipe(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=ML(Ta(t,n),Ta(e,n),n,!0);return n.skipEscape=!0,Yi(i,n)}function ML(t,e,r,n){let i={};return n||(t=Ta(Yi(t,r),r),e=Ta(Yi(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Yp(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Yp(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Yp(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=Yp(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function Epe(t,e,r){return typeof t=="string"?(t=unescape(t),t=Yi(ey(Ta(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Yi(ey(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=Yi(ey(Ta(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Yi(ey(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function Yi(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],a=DL(n.scheme||r.scheme);a&&a.serialize&&a.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let o=xpe(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 s=r.path;!n.absolutePath&&(!a||!a.absolutePath)&&(s=Yp(s)),o===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),i.push(s)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var Ppe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Ta(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let a=t.match(Ppe);if(a){if(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]),n.host)if(wpe(n.host)===!1){let c=bpe(n.host);n.host=c.host.toLowerCase(),i=c.isIPV6}else i=!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 o=DL(r.scheme||n.scheme);if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(r.domainHost||o&&o.domainHost)&&i===!1&&kpe(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII: "+s}(!o||o&&!o.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),o&&o.parse&&o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var gT={SCHEMES:Spe,normalize:$pe,resolve:Ipe,resolveComponent:ML,equal:Epe,serialize:Yi,parse:Ta};ty.exports=gT;ty.exports.default=gT;ty.exports.fastUri=gT});var ZL=z(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});var qL=vT();qL.code='require("ajv/dist/runtime/uri").default';yT.default=qL});var GL=z(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.CodeGen=zr.Name=zr.nil=zr.stringify=zr.str=zr._=zr.KeywordCxt=void 0;var Tpe=Gp();Object.defineProperty(zr,"KeywordCxt",{enumerable:!0,get:function(){return Tpe.KeywordCxt}});var wu=at();Object.defineProperty(zr,"_",{enumerable:!0,get:function(){return wu._}});Object.defineProperty(zr,"str",{enumerable:!0,get:function(){return wu.str}});Object.defineProperty(zr,"stringify",{enumerable:!0,get:function(){return wu.stringify}});Object.defineProperty(zr,"nil",{enumerable:!0,get:function(){return wu.nil}});Object.defineProperty(zr,"Name",{enumerable:!0,get:function(){return wu.Name}});Object.defineProperty(zr,"CodeGen",{enumerable:!0,get:function(){return wu.CodeGen}});var zpe=Gv(),BL=Qp(),Ope=KP(),Jp=Yv(),jpe=at(),Xp=Bp(),ry=Vp(),bT=yt(),LL=PL(),Npe=ZL(),KL=(t,e)=>new RegExp(t,e);KL.code="new RegExp";var Rpe=["removeAdditional","useDefaults","coerceTypes"],Cpe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Ape={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."},Upe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},FL=200;function Dpe(t){var e,r,n,i,a,o,s,c,u,l,d,f,p,m,v,g,h,b,y,_,x,w,k,$,P;let C=t.strict,T=(e=t.code)===null||e===void 0?void 0:e.optimize,D=T===!0||T===void 0?1:T||0,Z=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:KL,N=(i=t.uriResolver)!==null&&i!==void 0?i:Npe.default;return{strictSchema:(o=(a=t.strictSchema)!==null&&a!==void 0?a:C)!==null&&o!==void 0?o:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:C)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:C)!==null&&l!==void 0?l:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:C)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=t.strictRequired)!==null&&p!==void 0?p:C)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:D,regExp:Z}:{optimize:D,regExp:Z},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:FL,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:FL,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(b=t.messages)!==null&&b!==void 0?b:!0,inlineRefs:(y=t.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(_=t.schemaId)!==null&&_!==void 0?_:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(k=t.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:($=t.unicodeRegExp)!==null&&$!==void 0?$:!0,int32range:(P=t.int32range)!==null&&P!==void 0?P:!0,uriResolver:N}}var ef=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Dpe(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new jpe.ValueScope({scope:{},prefixes:Cpe,es5:r,lines:n}),this.logger=Vpe(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Ope.getRules)(),VL.call(this,Ape,e,"NOT SUPPORTED"),VL.call(this,Upe,e,"DEPRECATED","warn"),this._metaOpts=Lpe.call(this),e.formats&&qpe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Zpe.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Mpe.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=LL;n==="id"&&(i={...LL},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,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,e,r);async function i(l,d){await a.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||o.call(this,f)}async function a(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 BL.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),o.call(this,l)}}function s({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 a.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(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,n,i);return this}let a;if(typeof e=="object"){let{schemaId:o}=this.opts;if(a=e[o],a!==void 0&&typeof a!="string")throw new Error(`schema ${o} must be string`)}return r=(0,Xp.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$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,e);if(!i&&r){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}getSchema(e){let r;for(;typeof(r=WL.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Jp.SchemaEnv({schema:{},schemaId:n});if(r=Jp.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=WL.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Xp.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,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(Bpe.call(this,n,r),!r)return(0,bT.eachItem)(n,a=>_T.call(this,a)),this;Hpe.call(this,r);let i={...r,type:(0,ry.getJSONTypes)(r.type),schemaType:(0,ry.getJSONTypes)(r.schemaType)};return(0,bT.eachItem)(n,i.type.length===0?a=>_T.call(this,a,i):a=>i.type.forEach(o=>_T.call(this,a,i,o))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(a=>a.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,a)=>i+r+a)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let a=i.split("/").slice(1),o=e;for(let s of a)o=o[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=o[s];u&&l&&(o[s]=HL(l))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,a=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if(typeof e=="object")o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,Xp.normalizeId)(o||n);let u=Xp.getSchemaRefs.call(this,e,n);return c=new Jp.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),a&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Jp.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Jp.compileSchema.call(this,e)}finally{this.opts=r}}};ef.ValidationError=zpe.default;ef.MissingRefError=BL.default;zr.default=ef;function VL(t,e,r,n="error"){for(let i in t){let a=i;a in e&&this.logger[n](`${r}: option ${i}. ${t[a]}`)}}function WL(t){return t=(0,Xp.normalizeId)(t),this.schemas[t]||this.refs[t]}function Mpe(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function qpe(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Zpe(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Lpe(){let t={...this.opts};for(let e of Rpe)delete t[e];return t}var Fpe={log(){},warn(){},error(){}};function Vpe(t){if(t===!1)return Fpe;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Wpe=/^[a-z_$][a-z0-9_$:-]*$/i;function Bpe(t,e){let{RULES:r}=this;if((0,bT.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Wpe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function _T(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,o=i?a.post:a.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},a.rules.push(o)),a.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,ry.getJSONTypes)(e.type),schemaType:(0,ry.getJSONTypes)(e.schemaType)}};e.before?Kpe.call(this,o,s,e.before):o.rules.push(s),a.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function Kpe(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Hpe(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=HL(e)),t.validateSchema=this.compile(e,!0))}var Gpe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function HL(t){return{anyOf:[t,Gpe]}}});var QL=z(xT=>{"use strict";Object.defineProperty(xT,"__esModule",{value:!0});var Qpe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};xT.default=Qpe});var eF=z(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.callRef=xs.getValidate=void 0;var Ype=Qp(),YL=li(),wn=at(),ku=Ea(),JL=Yv(),ny=yt(),Jpe={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:a,validateName:o,opts:s,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=JL.resolveRef.call(c,u,i,r);if(l===void 0)throw new Ype.default(n.opts.uriResolver,i,r);if(l instanceof JL.SchemaEnv)return f(l);return p(l);function d(){if(a===u)return iy(t,o,a,a.$async);let m=e.scopeValue("root",{ref:u});return iy(t,(0,wn._)`${m}.validate`,u,u.$async)}function f(m){let v=XL(t,m);iy(t,v,m,m.$async)}function p(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,wn.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:wn.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function XL(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,wn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}xs.getValidate=XL;function iy(t,e,r,n){let{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?ku.default.this:wn.nil;n?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,wn._)`await ${(0,YL.callValidateCode)(t,e,u)}`),p(e),o||i.assign(m,!0)},v=>{i.if((0,wn._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),f(v),o||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,YL.callValidateCode)(t,e,u),()=>p(e),()=>f(e))}function f(m){let v=(0,wn._)`${m}.errors`;i.assign(ku.default.vErrors,(0,wn._)`${ku.default.vErrors} === null ? ${v} : ${ku.default.vErrors}.concat(${v})`),i.assign(ku.default.errors,(0,wn._)`${ku.default.vErrors}.length`)}function p(m){var v;if(!a.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(a.props=ny.mergeEvaluated.props(i,g.props,a.props));else{let h=i.var("props",(0,wn._)`${m}.evaluated.props`);a.props=ny.mergeEvaluated.props(i,h,a.props,wn.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=ny.mergeEvaluated.items(i,g.items,a.items));else{let h=i.var("items",(0,wn._)`${m}.evaluated.items`);a.items=ny.mergeEvaluated.items(i,h,a.items,wn.Name)}}}xs.callRef=iy;xs.default=Jpe});var tF=z(wT=>{"use strict";Object.defineProperty(wT,"__esModule",{value:!0});var Xpe=QL(),efe=eF(),tfe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Xpe.default,efe.default];wT.default=tfe});var rF=z(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});var ay=at(),yo=ay.operators,oy={maximum:{okStr:"<=",ok:yo.LTE,fail:yo.GT},minimum:{okStr:">=",ok:yo.GTE,fail:yo.LT},exclusiveMaximum:{okStr:"<",ok:yo.LT,fail:yo.GTE},exclusiveMinimum:{okStr:">",ok:yo.GT,fail:yo.LTE}},rfe={message:({keyword:t,schemaCode:e})=>(0,ay.str)`must be ${oy[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ay._)`{comparison: ${oy[t].okStr}, limit: ${e}}`},nfe={keyword:Object.keys(oy),type:"number",schemaType:"number",$data:!0,error:rfe,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,ay._)`${r} ${oy[e].fail} ${n} || isNaN(${r})`)}};kT.default=nfe});var nF=z(ST=>{"use strict";Object.defineProperty(ST,"__esModule",{value:!0});var tf=at(),ife={message:({schemaCode:t})=>(0,tf.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,tf._)`{multipleOf: ${t}}`},afe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ife,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,tf._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,tf._)`${o} !== parseInt(${o})`;t.fail$data((0,tf._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};ST.default=afe});var aF=z($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});function iF(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}$T.default=iF;iF.code='require("ajv/dist/runtime/ucs2length").default'});var oF=z(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});var ws=at(),ofe=yt(),sfe=aF(),cfe={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,ws.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,ws._)`{limit: ${t}}`},ufe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cfe,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?ws.operators.GT:ws.operators.LT,o=i.opts.unicode===!1?(0,ws._)`${r}.length`:(0,ws._)`${(0,ofe.useFunc)(t.gen,sfe.default)}(${r})`;t.fail$data((0,ws._)`${o} ${a} ${n}`)}};IT.default=ufe});var sF=z(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});var lfe=li(),dfe=yt(),Su=at(),pfe={message:({schemaCode:t})=>(0,Su.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Su._)`{pattern: ${t}}`},ffe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:pfe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t,s=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,u=c.code==="new RegExp"?(0,Su._)`new RegExp`:(0,dfe.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Su._)`${u}(${a}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Su._)`!${l}`)}else{let c=(0,lfe.usePattern)(t,i);t.fail$data((0,Su._)`!${c}.test(${r})`)}}};ET.default=ffe});var cF=z(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});var rf=at(),mfe={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,rf.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,rf._)`{limit: ${t}}`},hfe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:mfe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?rf.operators.GT:rf.operators.LT;t.fail$data((0,rf._)`Object.keys(${r}).length ${i} ${n}`)}};PT.default=hfe});var uF=z(TT=>{"use strict";Object.defineProperty(TT,"__esModule",{value:!0});var nf=li(),af=at(),gfe=yt(),vfe={message:({params:{missingProperty:t}})=>(0,af.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,af._)`{missingProperty: ${t}}`},yfe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:vfe,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:a,it:o}=t,{opts:s}=o;if(!a&&r.length===0)return;let c=r.length>=s.loopRequired;if(o.allErrors?u():l(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(p?.[v]===void 0&&!m.has(v)){let g=o.schemaEnv.baseId+o.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,gfe.checkStrictMode)(o,h,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(af.nil,d);else for(let p of r)(0,nf.checkReportMissingProp)(t,p)}function l(){let p=e.let("missing");if(c||a){let m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,nf.checkMissingProp)(t,r,p)),(0,nf.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,nf.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(m,(0,nf.propertyInData)(e,i,p,s.ownProperties)),e.if((0,af.not)(m),()=>{t.error(),e.break()})},af.nil)}}};TT.default=yfe});var lF=z(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});var of=at(),_fe={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,of.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,of._)`{limit: ${t}}`},bfe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:_fe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?of.operators.GT:of.operators.LT;t.fail$data((0,of._)`${r}.length ${i} ${n}`)}};zT.default=bfe});var sy=z(OT=>{"use strict";Object.defineProperty(OT,"__esModule",{value:!0});var dF=Wp();dF.code='require("ajv/dist/runtime/equal").default';OT.default=dF});var pF=z(NT=>{"use strict";Object.defineProperty(NT,"__esModule",{value:!0});var jT=Vp(),Or=at(),xfe=yt(),wfe=sy(),kfe={message:({params:{i:t,j:e}})=>(0,Or.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Or._)`{i: ${t}, j: ${e}}`},Sfe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:kfe,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:a,schemaCode:o,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),u=a.items?(0,jT.getSchemaTypes)(a.items):[];t.block$data(c,l,(0,Or._)`${o} === false`),t.ok(c);function l(){let m=e.let("i",(0,Or._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Or._)`${m} > 1`,()=>(d()?f:p)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,v){let g=e.name("item"),h=(0,jT.checkDataTypes)(u,g,s.opts.strictNumbers,jT.DataType.Wrong),b=e.const("indices",(0,Or._)`{}`);e.for((0,Or._)`;${m}--;`,()=>{e.let(g,(0,Or._)`${r}[${m}]`),e.if(h,(0,Or._)`continue`),u.length>1&&e.if((0,Or._)`typeof ${g} == "string"`,(0,Or._)`${g} += "_"`),e.if((0,Or._)`typeof ${b}[${g}] == "number"`,()=>{e.assign(v,(0,Or._)`${b}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Or._)`${b}[${g}] = ${m}`)})}function p(m,v){let g=(0,xfe.useFunc)(e,wfe.default),h=e.name("outer");e.label(h).for((0,Or._)`;${m}--;`,()=>e.for((0,Or._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Or._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};NT.default=Sfe});var fF=z(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});var RT=at(),$fe=yt(),Ife=sy(),Efe={message:"must be equal to constant",params:({schemaCode:t})=>(0,RT._)`{allowedValue: ${t}}`},Pfe={keyword:"const",$data:!0,error:Efe,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,RT._)`!${(0,$fe.useFunc)(e,Ife.default)}(${r}, ${i})`):t.fail((0,RT._)`${a} !== ${r}`)}};CT.default=Pfe});var mF=z(AT=>{"use strict";Object.defineProperty(AT,"__esModule",{value:!0});var sf=at(),Tfe=yt(),zfe=sy(),Ofe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,sf._)`{allowedValues: ${t}}`},jfe={keyword:"enum",schemaType:"array",$data:!0,error:Ofe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=o.opts.loopEnum,c,u=()=>c??(c=(0,Tfe.useFunc)(e,zfe.default)),l;if(s||n)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",a);l=(0,sf.or)(...i.map((m,v)=>f(p,v)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",a,p=>e.if((0,sf._)`${u()}(${r}, ${p})`,()=>e.assign(l,!0).break()))}function f(p,m){let v=i[m];return typeof v=="object"&&v!==null?(0,sf._)`${u()}(${r}, ${p}[${m}])`:(0,sf._)`${r} === ${v}`}}};AT.default=jfe});var hF=z(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});var Nfe=rF(),Rfe=nF(),Cfe=oF(),Afe=sF(),Ufe=cF(),Dfe=uF(),Mfe=lF(),qfe=pF(),Zfe=fF(),Lfe=mF(),Ffe=[Nfe.default,Rfe.default,Cfe.default,Afe.default,Ufe.default,Dfe.default,Mfe.default,qfe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Zfe.default,Lfe.default];UT.default=Ffe});var MT=z(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.validateAdditionalItems=void 0;var ks=at(),DT=yt(),Vfe={message:({params:{len:t}})=>(0,ks.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ks._)`{limit: ${t}}`},Wfe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Vfe,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,DT.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}gF(t,n)}};function gF(t,e){let{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;let s=r.const("len",(0,ks._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ks._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,DT.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,ks._)`${s} <= ${e.length}`);r.if((0,ks.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:a,dataProp:l,dataPropType:DT.Type.Num},u),o.allErrors||r.if((0,ks.not)(u),()=>r.break())})}}cf.validateAdditionalItems=gF;cf.default=Wfe});var qT=z(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.validateTuple=void 0;var vF=at(),cy=yt(),Bfe=li(),Kfe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return yF(t,"additionalItems",e);r.items=!0,!(0,cy.alwaysValidSchema)(r,e)&&t.ok((0,Bfe.validateArray)(t))}};function yF(t,e,r=t.schema){let{gen:n,parentSchema:i,data:a,keyword:o,it:s}=t;l(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=cy.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),u=n.const("len",(0,vF._)`${a}.length`);r.forEach((d,f)=>{(0,cy.alwaysValidSchema)(s,d)||(n.if((0,vF._)`${u} > ${f}`,()=>t.subschema({keyword:o,schemaProp:f,dataProp:f},c)),t.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let g=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,cy.checkStrictMode)(s,g,f.strictTuples)}}}uf.validateTuple=yF;uf.default=Kfe});var _F=z(ZT=>{"use strict";Object.defineProperty(ZT,"__esModule",{value:!0});var Hfe=qT(),Gfe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Hfe.validateTuple)(t,"items")};ZT.default=Gfe});var xF=z(LT=>{"use strict";Object.defineProperty(LT,"__esModule",{value:!0});var bF=at(),Qfe=yt(),Yfe=li(),Jfe=MT(),Xfe={message:({params:{len:t}})=>(0,bF.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,bF._)`{limit: ${t}}`},eme={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Xfe,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Qfe.alwaysValidSchema)(n,e)&&(i?(0,Jfe.validateAdditionalItems)(t,i):t.ok((0,Yfe.validateArray)(t)))}};LT.default=eme});var wF=z(FT=>{"use strict";Object.defineProperty(FT,"__esModule",{value:!0});var pi=at(),uy=yt(),tme={message:({params:{min:t,max:e}})=>e===void 0?(0,pi.str)`must contain at least ${t} valid item(s)`:(0,pi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,pi._)`{minContains: ${t}}`:(0,pi._)`{minContains: ${t}, maxContains: ${e}}`},rme={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tme,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t,o,s,{minContains:c,maxContains:u}=n;a.opts.next?(o=c===void 0?1:c,s=u):o=1;let l=e.const("len",(0,pi._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,uy.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,uy.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,uy.alwaysValidSchema)(a,r)){let v=(0,pi._)`${l} >= ${o}`;s!==void 0&&(v=(0,pi._)`${v} && ${l} <= ${s}`),t.pass(v);return}a.items=!0;let d=e.name("valid");s===void 0&&o===1?p(d,()=>e.if(d,()=>e.break())):o===0?(e.let(d,!0),s!==void 0&&e.if((0,pi._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),g=e.let("count",0);p(v,()=>e.if(v,()=>m(g)))}function p(v,g){e.forRange("i",0,l,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:uy.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,pi._)`${v}++`),s===void 0?e.if((0,pi._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,pi._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,pi._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};FT.default=rme});var $F=z(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.validateSchemaDeps=Ji.validatePropertyDeps=Ji.error=void 0;var VT=at(),nme=yt(),lf=li();Ji.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,VT.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,VT._)`{property: ${t},
|
|
17
|
+
missingProperty: ${n},
|
|
18
|
+
depsCount: ${e},
|
|
19
|
+
deps: ${r}}`};var ime={keyword:"dependencies",type:"object",schemaType:"object",error:Ji.error,code(t){let[e,r]=ame(t);kF(t,e),SF(t,r)}};function ame({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function kF(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let a=r.let("missing");for(let o in e){let s=e[o];if(s.length===0)continue;let c=(0,lf.propertyInData)(r,n,o,i.opts.ownProperties);t.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of s)(0,lf.checkReportMissingProp)(t,u)}):(r.if((0,VT._)`${c} && (${(0,lf.checkMissingProp)(t,s,a)})`),(0,lf.reportMissingProp)(t,a),r.else())}}Ji.validatePropertyDeps=kF;function SF(t,e=t.schema){let{gen:r,data:n,keyword:i,it:a}=t,o=r.name("valid");for(let s in e)(0,nme.alwaysValidSchema)(a,e[s])||(r.if((0,lf.propertyInData)(r,n,s,a.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},o);t.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),t.ok(o))}Ji.validateSchemaDeps=SF;Ji.default=ime});var EF=z(WT=>{"use strict";Object.defineProperty(WT,"__esModule",{value:!0});var IF=at(),ome=yt(),sme={message:"property name must be valid",params:({params:t})=>(0,IF._)`{propertyName: ${t.propertyName}}`},cme={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:sme,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,ome.alwaysValidSchema)(i,r))return;let a=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},a),e.if((0,IF.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};WT.default=cme});var KT=z(BT=>{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});var ly=li(),Ai=at(),ume=Ea(),dy=yt(),lme={message:"must NOT have additional properties",params:({params:t})=>(0,Ai._)`{additionalProperty: ${t.additionalProperty}}`},dme={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lme,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:a,it:o}=t;if(!a)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,dy.alwaysValidSchema)(o,r))return;let u=(0,ly.allSchemaProperties)(n.properties),l=(0,ly.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ai._)`${a} === ${ume.default.errors}`);function d(){e.forIn("key",i,g=>{!u.length&&!l.length?m(g):e.if(f(g),()=>m(g))})}function f(g){let h;if(u.length>8){let b=(0,dy.schemaRefOrVal)(o,n.properties,"properties");h=(0,ly.isOwnProperty)(e,b,g)}else u.length?h=(0,Ai.or)(...u.map(b=>(0,Ai._)`${g} === ${b}`)):h=Ai.nil;return l.length&&(h=(0,Ai.or)(h,...l.map(b=>(0,Ai._)`${(0,ly.usePattern)(t,b)}.test(${g})`))),(0,Ai.not)(h)}function p(g){e.code((0,Ai._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,dy.alwaysValidSchema)(o,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,Ai.not)(h),()=>{t.reset(),p(g)})):(v(g,h),s||e.if((0,Ai.not)(h),()=>e.break()))}}function v(g,h,b){let y={keyword:"additionalProperties",dataProp:g,dataPropType:dy.Type.Str};b===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,h)}}};BT.default=dme});var zF=z(GT=>{"use strict";Object.defineProperty(GT,"__esModule",{value:!0});var pme=Gp(),PF=li(),HT=yt(),TF=KT(),fme={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&TF.default.code(new pme.KeywordCxt(a,TF.default,"additionalProperties"));let o=(0,PF.allSchemaProperties)(r);for(let d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=HT.mergeEvaluated.props(e,(0,HT.toHash)(o),a.props));let s=o.filter(d=>!(0,HT.alwaysValidSchema)(a,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,PF.propertyInData)(e,i,d,a.opts.ownProperties)),l(d),a.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};GT.default=fme});var RF=z(QT=>{"use strict";Object.defineProperty(QT,"__esModule",{value:!0});var OF=li(),py=at(),jF=yt(),NF=yt(),mme={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:a}=t,{opts:o}=a,s=(0,OF.allSchemaProperties)(r),c=s.filter(v=>(0,jF.alwaysValidSchema)(a,r[v]));if(s.length===0||c.length===s.length&&(!a.opts.unevaluated||a.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,l=e.name("valid");a.props!==!0&&!(a.props instanceof py.Name)&&(a.props=(0,NF.evaluatedPropsToName)(e,a.props));let{props:d}=a;f();function f(){for(let v of s)u&&p(v),a.allErrors?m(v):(e.var(l,!0),m(v),e.if(l))}function p(v){for(let g in u)new RegExp(v).test(g)&&(0,jF.checkStrictMode)(a,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,py._)`${(0,OF.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:NF.Type.Str},l),a.opts.unevaluated&&d!==!0?e.assign((0,py._)`${d}[${g}]`,!0):!h&&!a.allErrors&&e.if((0,py.not)(l),()=>e.break())})})}}};QT.default=mme});var CF=z(YT=>{"use strict";Object.defineProperty(YT,"__esModule",{value:!0});var hme=yt(),gme={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,hme.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};YT.default=gme});var AF=z(JT=>{"use strict";Object.defineProperty(JT,"__esModule",{value:!0});var vme=li(),yme={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:vme.validateUnion,error:{message:"must match a schema in anyOf"}};JT.default=yme});var UF=z(XT=>{"use strict";Object.defineProperty(XT,"__esModule",{value:!0});var fy=at(),_me=yt(),bme={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,fy._)`{passingSchemas: ${t.passing}}`},xme={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:bme,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let a=r,o=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(o,()=>t.reset(),()=>t.error(!0));function u(){a.forEach((l,d)=>{let f;(0,_me.alwaysValidSchema)(i,l)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,fy._)`${c} && ${o}`).assign(o,!1).assign(s,(0,fy._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),f&&t.mergeEvaluated(f,fy.Name)})})}}};XT.default=xme});var DF=z(ez=>{"use strict";Object.defineProperty(ez,"__esModule",{value:!0});var wme=yt(),kme={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((a,o)=>{if((0,wme.alwaysValidSchema)(n,a))return;let s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};ez.default=kme});var ZF=z(tz=>{"use strict";Object.defineProperty(tz,"__esModule",{value:!0});var my=at(),qF=yt(),Sme={message:({params:t})=>(0,my.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,my._)`{failingKeyword: ${t.ifClause}}`},$me={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Sme,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,qF.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=MF(n,"then"),a=MF(n,"else");if(!i&&!a)return;let o=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&a){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else i?e.if(s,u("then")):e.if((0,my.not)(s),u("else"));t.pass(o,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let f=t.subschema({keyword:l},s);e.assign(o,s),t.mergeValidEvaluated(f,o),d?e.assign(d,(0,my._)`${l}`):t.setParams({ifClause:l})}}}};function MF(t,e){let r=t.schema[e];return r!==void 0&&!(0,qF.alwaysValidSchema)(t,r)}tz.default=$me});var LF=z(rz=>{"use strict";Object.defineProperty(rz,"__esModule",{value:!0});var Ime=yt(),Eme={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Ime.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};rz.default=Eme});var FF=z(nz=>{"use strict";Object.defineProperty(nz,"__esModule",{value:!0});var Pme=MT(),Tme=_F(),zme=qT(),Ome=xF(),jme=wF(),Nme=$F(),Rme=EF(),Cme=KT(),Ame=zF(),Ume=RF(),Dme=CF(),Mme=AF(),qme=UF(),Zme=DF(),Lme=ZF(),Fme=LF();function Vme(t=!1){let e=[Dme.default,Mme.default,qme.default,Zme.default,Lme.default,Fme.default,Rme.default,Cme.default,Nme.default,Ame.default,Ume.default];return t?e.push(Tme.default,Ome.default):e.push(Pme.default,zme.default),e.push(jme.default),e}nz.default=Vme});var VF=z(iz=>{"use strict";Object.defineProperty(iz,"__esModule",{value:!0});var cr=at(),Wme={message:({schemaCode:t})=>(0,cr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,cr._)`{format: ${t}}`},Bme={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Wme,code(t,e){let{gen:r,data:n,$data:i,schema:a,schemaCode:o,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;i?f():p();function f(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,cr._)`${m}[${o}]`),g=r.let("fType"),h=r.let("format");r.if((0,cr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,cr._)`${v}.type || "string"`).assign(h,(0,cr._)`${v}.validate`),()=>r.assign(g,(0,cr._)`"string"`).assign(h,v)),t.fail$data((0,cr.or)(b(),y()));function b(){return c.strictSchema===!1?cr.nil:(0,cr._)`${o} && !${h}`}function y(){let _=l.$async?(0,cr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,cr._)`${h}(${n})`,x=(0,cr._)`(typeof ${h} == "function" ? ${_} : ${h}.test(${n}))`;return(0,cr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function p(){let m=d.formats[a];if(!m){b();return}if(m===!0)return;let[v,g,h]=y(m);v===e&&t.pass(_());function b(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function y(x){let w=x instanceof RegExp?(0,cr.regexpCode)(x):c.code.formats?(0,cr._)`${c.code.formats}${(0,cr.getProperty)(a)}`:void 0,k=r.scopeValue("formats",{key:a,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,cr._)`${k}.validate`]:["string",x,k]}function _(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,cr._)`await ${h}(${n})`}return typeof g=="function"?(0,cr._)`${h}(${n})`:(0,cr._)`${h}.test(${n})`}}}};iz.default=Bme});var WF=z(az=>{"use strict";Object.defineProperty(az,"__esModule",{value:!0});var Kme=VF(),Hme=[Kme.default];az.default=Hme});var BF=z($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.contentVocabulary=$u.metadataVocabulary=void 0;$u.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$u.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var HF=z(oz=>{"use strict";Object.defineProperty(oz,"__esModule",{value:!0});var Gme=tF(),Qme=hF(),Yme=FF(),Jme=WF(),KF=BF(),Xme=[Gme.default,Qme.default,(0,Yme.default)(),Jme.default,KF.metadataVocabulary,KF.contentVocabulary];oz.default=Xme});var QF=z(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.DiscrError=void 0;var GF;(function(t){t.Tag="tag",t.Mapping="mapping"})(GF||(hy.DiscrError=GF={}))});var JF=z(cz=>{"use strict";Object.defineProperty(cz,"__esModule",{value:!0});var Iu=at(),sz=QF(),YF=Yv(),ehe=Qp(),the=yt(),rhe={message:({params:{discrError:t,tagName:e}})=>t===sz.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Iu._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},nhe={keyword:"discriminator",type:"object",schemaType:"object",error:rhe,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:a}=t,{oneOf:o}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="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=e.let("valid",!1),u=e.const("tag",(0,Iu._)`${r}${(0,Iu.getProperty)(s)}`);e.if((0,Iu._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:sz.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,Iu._)`${u} === ${m}`),e.assign(c,d(p[m]));e.else(),t.error(!1,{discrError:sz.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(p){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(v,Iu.Name),m}function f(){var p;let m={},v=h(i),g=!0;for(let _=0;_<o.length;_++){let x=o[_];if(x?.$ref&&!(0,the.schemaHasRulesButRef)(x,a.self.RULES)){let k=x.$ref;if(x=YF.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,k),x instanceof YF.SchemaEnv&&(x=x.schema),x===void 0)throw new ehe.default(a.opts.uriResolver,a.baseId,k)}let w=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),b(w,_)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:_}){return Array.isArray(_)&&_.includes(s)}function b(_,x){if(_.const)y(_.const,x);else if(_.enum)for(let w of _.enum)y(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function y(_,x){if(typeof _!="string"||_ in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[_]=x}}}};cz.default=nhe});var XF=z((qUe,ihe)=>{ihe.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 t9=z((Qt,uz)=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.MissingRefError=Qt.ValidationError=Qt.CodeGen=Qt.Name=Qt.nil=Qt.stringify=Qt.str=Qt._=Qt.KeywordCxt=Qt.Ajv=void 0;var ahe=GL(),ohe=HF(),she=JF(),e9=XF(),che=["/properties"],gy="http://json-schema.org/draft-07/schema",Eu=class extends ahe.default{_addVocabularies(){super._addVocabularies(),ohe.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(she.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(e9,che):e9;this.addMetaSchema(e,gy,!1),this.refs["http://json-schema.org/schema"]=gy}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(gy)?gy:void 0)}};Qt.Ajv=Eu;uz.exports=Qt=Eu;uz.exports.Ajv=Eu;Object.defineProperty(Qt,"__esModule",{value:!0});Qt.default=Eu;var uhe=Gp();Object.defineProperty(Qt,"KeywordCxt",{enumerable:!0,get:function(){return uhe.KeywordCxt}});var Pu=at();Object.defineProperty(Qt,"_",{enumerable:!0,get:function(){return Pu._}});Object.defineProperty(Qt,"str",{enumerable:!0,get:function(){return Pu.str}});Object.defineProperty(Qt,"stringify",{enumerable:!0,get:function(){return Pu.stringify}});Object.defineProperty(Qt,"nil",{enumerable:!0,get:function(){return Pu.nil}});Object.defineProperty(Qt,"Name",{enumerable:!0,get:function(){return Pu.Name}});Object.defineProperty(Qt,"CodeGen",{enumerable:!0,get:function(){return Pu.CodeGen}});var lhe=Gv();Object.defineProperty(Qt,"ValidationError",{enumerable:!0,get:function(){return lhe.default}});var dhe=Qp();Object.defineProperty(Qt,"MissingRefError",{enumerable:!0,get:function(){return dhe.default}})});var u9=z(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.formatNames=ea.fastFormats=ea.fullFormats=void 0;function Xi(t,e){return{validate:t,compare:e}}ea.fullFormats={date:Xi(a9,fz),time:Xi(dz(!0),mz),"date-time":Xi(r9(!0),s9),"iso-time":Xi(dz(),o9),"iso-date-time":Xi(r9(),c9),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:vhe,"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:She,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:yhe,int32:{type:"number",validate:xhe},int64:{type:"number",validate:whe},float:{type:"number",validate:i9},double:{type:"number",validate:i9},password:!0,binary:!0};ea.fastFormats={...ea.fullFormats,date:Xi(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,fz),time:Xi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,mz),"date-time":Xi(/^\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,s9),"iso-time":Xi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,o9),"iso-date-time":Xi(/^\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,c9),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};ea.formatNames=Object.keys(ea.fullFormats);function phe(t){return t%4===0&&(t%100!==0||t%400===0)}var fhe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mhe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a9(t){let e=fhe.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],i=+e[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&phe(r)?29:mhe[n])}function fz(t,e){if(t&&e)return t>e?1:t<e?-1:0}var lz=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function dz(t){return function(r){let n=lz.exec(r);if(!n)return!1;let i=+n[1],a=+n[2],o=+n[3],s=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),l=+(n[7]||0);if(u>23||l>59||t&&!s)return!1;if(i<=23&&a<=59&&o<60)return!0;let d=a-l*c,f=i-u*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&o<61}}function mz(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function o9(t,e){if(!(t&&e))return;let r=lz.exec(t),n=lz.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var pz=/t|\s/i;function r9(t){let e=dz(t);return function(n){let i=n.split(pz);return i.length===2&&a9(i[0])&&e(i[1])}}function s9(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function c9(t,e){if(!(t&&e))return;let[r,n]=t.split(pz),[i,a]=e.split(pz),o=fz(r,i);if(o!==void 0)return o||mz(n,a)}var hhe=/\/|:/,ghe=/^(?:[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;function vhe(t){return hhe.test(t)&&ghe.test(t)}var n9=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function yhe(t){return n9.lastIndex=0,n9.test(t)}var _he=-(2**31),bhe=2**31-1;function xhe(t){return Number.isInteger(t)&&t<=bhe&&t>=_he}function whe(t){return Number.isInteger(t)}function i9(){return!0}var khe=/[^\\]\\Z/;function She(t){if(khe.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var ff=z($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.regexpCode=$t.getEsmExportName=$t.getProperty=$t.safeStringify=$t.stringify=$t.strConcat=$t.addCodeArg=$t.str=$t._=$t.nil=$t._Code=$t.Name=$t.IDENTIFIER=$t._CodeOrName=void 0;var df=class{};$t._CodeOrName=df;$t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ss=class extends df{constructor(e){if(super(),!$t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$t.Name=Ss;var fi=class extends df{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Ss&&(r[n.str]=(r[n.str]||0)+1),r),{})}};$t._Code=fi;$t.nil=new fi("");function l9(t,...e){let r=[t[0]],n=0;for(;n<e.length;)gz(r,e[n]),r.push(t[++n]);return new fi(r)}$t._=l9;var hz=new fi("+");function d9(t,...e){let r=[pf(t[0])],n=0;for(;n<e.length;)r.push(hz),gz(r,e[n]),r.push(hz,pf(t[++n]));return $he(r),new fi(r)}$t.str=d9;function gz(t,e){e instanceof fi?t.push(...e._items):e instanceof Ss?t.push(e):t.push(Phe(e))}$t.addCodeArg=gz;function $he(t){let e=1;for(;e<t.length-1;){if(t[e]===hz){let r=Ihe(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Ihe(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ss||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ss))return`"${t}${e.slice(1)}`}function Ehe(t,e){return e.emptyStr()?t:t.emptyStr()?e:d9`${t}${e}`}$t.strConcat=Ehe;function Phe(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:pf(Array.isArray(t)?t.join(","):t)}function The(t){return new fi(pf(t))}$t.stringify=The;function pf(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$t.safeStringify=pf;function zhe(t){return typeof t=="string"&&$t.IDENTIFIER.test(t)?new fi(`.${t}`):l9`[${t}]`}$t.getProperty=zhe;function Ohe(t){if(typeof t=="string"&&$t.IDENTIFIER.test(t))return new fi(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}$t.getEsmExportName=Ohe;function jhe(t){return new fi(t.toString())}$t.regexpCode=jhe});var _z=z(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.ValueScope=Sn.ValueScopeName=Sn.Scope=Sn.varKinds=Sn.UsedValueState=void 0;var kn=ff(),vz=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},vy;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(vy||(Sn.UsedValueState=vy={}));Sn.varKinds={const:new kn.Name("const"),let:new kn.Name("let"),var:new kn.Name("var")};var yy=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof kn.Name?e:this.name(e)}name(e){return new kn.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Sn.Scope=yy;var _y=class extends kn.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,kn._)`.${new kn.Name(r)}[${n}]`}};Sn.ValueScopeName=_y;var Nhe=(0,kn._)`\n`,yz=class extends yy{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Nhe:kn.nil}}get(){return this._scope}name(e){return new _y(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:a}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[a];if(s){let l=s.get(o);if(l)return l}else s=this._values[a]=new Map;s.set(o,i);let c=this._scope[a]||(this._scope[a]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:a,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,kn._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let a=kn.nil;for(let o in e){let s=e[o];if(!s)continue;let c=n[o]=n[o]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,vy.Started);let l=r(u);if(l){let d=this.opts.es5?Sn.varKinds.var:Sn.varKinds.const;a=(0,kn._)`${a}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))a=(0,kn._)`${a}${l}${this.opts._n}`;else throw new vz(u);c.set(u,vy.Completed)})}return a}};Sn.ValueScope=yz});var Ye=z(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.or=nt.and=nt.not=nt.CodeGen=nt.operators=nt.varKinds=nt.ValueScopeName=nt.ValueScope=nt.Scope=nt.Name=nt.regexpCode=nt.stringify=nt.getProperty=nt.nil=nt.strConcat=nt.str=nt._=void 0;var gt=ff(),Ui=_z(),_o=ff();Object.defineProperty(nt,"_",{enumerable:!0,get:function(){return _o._}});Object.defineProperty(nt,"str",{enumerable:!0,get:function(){return _o.str}});Object.defineProperty(nt,"strConcat",{enumerable:!0,get:function(){return _o.strConcat}});Object.defineProperty(nt,"nil",{enumerable:!0,get:function(){return _o.nil}});Object.defineProperty(nt,"getProperty",{enumerable:!0,get:function(){return _o.getProperty}});Object.defineProperty(nt,"stringify",{enumerable:!0,get:function(){return _o.stringify}});Object.defineProperty(nt,"regexpCode",{enumerable:!0,get:function(){return _o.regexpCode}});Object.defineProperty(nt,"Name",{enumerable:!0,get:function(){return _o.Name}});var ky=_z();Object.defineProperty(nt,"Scope",{enumerable:!0,get:function(){return ky.Scope}});Object.defineProperty(nt,"ValueScope",{enumerable:!0,get:function(){return ky.ValueScope}});Object.defineProperty(nt,"ValueScopeName",{enumerable:!0,get:function(){return ky.ValueScopeName}});Object.defineProperty(nt,"varKinds",{enumerable:!0,get:function(){return ky.varKinds}});nt.operators={GT:new gt._Code(">"),GTE:new gt._Code(">="),LT:new gt._Code("<"),LTE:new gt._Code("<="),EQ:new gt._Code("==="),NEQ:new gt._Code("!=="),NOT:new gt._Code("!"),OR:new gt._Code("||"),AND:new gt._Code("&&"),ADD:new gt._Code("+")};var za=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},bz=class extends za{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ui.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=zu(this.rhs,e,r)),this}get names(){return this.rhs instanceof gt._CodeOrName?this.rhs.names:{}}},by=class extends za{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof gt.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=zu(this.rhs,e,r),this}get names(){let e=this.lhs instanceof gt.Name?{}:{...this.lhs.names};return wy(e,this.rhs)}},xz=class extends by{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},wz=class extends za{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},kz=class extends za{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Sz=class extends za{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},$z=class extends za{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=zu(this.code,e,r),this}get names(){return this.code instanceof gt._CodeOrName?this.code.names:{}}},mf=class extends za{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let a=n[i];a.optimizeNames(e,r)||(Rhe(e,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Es(e,r.names),{})}},Oa=class extends mf{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Iz=class extends mf{},Tu=class extends Oa{};Tu.kind="else";var $s=class t extends Oa{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Tu(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(p9(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=zu(this.condition,e,r),this}get names(){let e=super.names;return wy(e,this.condition),this.else&&Es(e,this.else.names),e}};$s.kind="if";var Is=class extends Oa{};Is.kind="for";var Ez=class extends Is{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=zu(this.iteration,e,r),this}get names(){return Es(super.names,this.iteration.names)}},Pz=class extends Is{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Ui.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${r} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){let e=wy(super.names,this.from);return wy(e,this.to)}},xy=class extends Is{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=zu(this.iterable,e,r),this}get names(){return Es(super.names,this.iterable.names)}},hf=class extends Oa{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};hf.kind="func";var gf=class extends mf{render(e){return"return "+super.render(e)}};gf.kind="return";var Tz=class extends Oa{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Es(e,this.catch.names),this.finally&&Es(e,this.finally.names),e}},vf=class extends Oa{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};vf.kind="catch";var yf=class extends Oa{render(e){return"finally"+super.render(e)}};yf.kind="finally";var zz=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
20
|
+
`:""},this._extScope=e,this._scope=new Ui.Scope({parent:e}),this._nodes=[new Iz]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new bz(e,a,n)),a}const(e,r,n){return this._def(Ui.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ui.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ui.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new by(e,r,n))}add(e,r){return this._leafNode(new xz(e,nt.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==gt.nil&&this._leafNode(new $z(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,gt.addCodeArg)(r,i));return r.push("}"),new gt._Code(r)}if(e,r,n){if(this._blockNode(new $s(e)),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(e){return this._elseNode(new $s(e))}else(){return this._elseNode(new Tu)}endIf(){return this._endBlockNode($s,Tu)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Ez(e),r)}forRange(e,r,n,i,a=this.opts.es5?Ui.varKinds.var:Ui.varKinds.let){let o=this._scope.toName(e);return this._for(new Pz(a,o,r,n),()=>i(o))}forOf(e,r,n,i=Ui.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let o=r instanceof gt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,gt._)`${o}.length`,s=>{this.var(a,(0,gt._)`${o}[${s}]`),n(a)})}return this._for(new xy("of",i,a,r),()=>n(a))}forIn(e,r,n,i=this.opts.es5?Ui.varKinds.var:Ui.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,gt._)`Object.keys(${r})`,n);let a=this._scope.toName(e);return this._for(new xy("in",i,a,r),()=>n(a))}endFor(){return this._endBlockNode(Is)}label(e){return this._leafNode(new wz(e))}break(e){return this._leafNode(new kz(e))}return(e){let r=new gf;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(gf)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Tz;if(this._blockNode(i),this.code(e),r){let a=this.name("e");this._currNode=i.catch=new vf(a),r(a)}return n&&(this._currNode=i.finally=new yf,this.code(n)),this._endBlockNode(vf,yf)}throw(e){return this._leafNode(new Sz(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){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||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=gt.nil,n,i){return this._blockNode(new hf(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(hf)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof $s))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};nt.CodeGen=zz;function Es(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function wy(t,e){return e instanceof gt._CodeOrName?Es(t,e.names):t}function zu(t,e,r){if(t instanceof gt.Name)return n(t);if(!i(t))return t;return new gt._Code(t._items.reduce((a,o)=>(o instanceof gt.Name&&(o=n(o)),o instanceof gt._Code?a.push(...o._items):a.push(o),a),[]));function n(a){let o=r[a.str];return o===void 0||e[a.str]!==1?a:(delete e[a.str],o)}function i(a){return a instanceof gt._Code&&a._items.some(o=>o instanceof gt.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function Rhe(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function p9(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,gt._)`!${Oz(t)}`}nt.not=p9;var Che=f9(nt.operators.AND);function Ahe(...t){return t.reduce(Che)}nt.and=Ahe;var Uhe=f9(nt.operators.OR);function Dhe(...t){return t.reduce(Uhe)}nt.or=Dhe;function f9(t){return(e,r)=>e===gt.nil?r:r===gt.nil?e:(0,gt._)`${Oz(e)} ${t} ${Oz(r)}`}function Oz(t){return t instanceof gt.Name?t:(0,gt._)`(${t})`}});var bt=z(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.checkStrictMode=st.getErrorPath=st.Type=st.useFunc=st.setEvaluated=st.evaluatedPropsToName=st.mergeEvaluated=st.eachItem=st.unescapeJsonPointer=st.escapeJsonPointer=st.escapeFragment=st.unescapeFragment=st.schemaRefOrVal=st.schemaHasRulesButRef=st.schemaHasRules=st.checkUnknownRules=st.alwaysValidSchema=st.toHash=void 0;var Ft=Ye(),Mhe=ff();function qhe(t){let e={};for(let r of t)e[r]=!0;return e}st.toHash=qhe;function Zhe(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(g9(t,e),!v9(e,t.self.RULES.all))}st.alwaysValidSchema=Zhe;function g9(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let a in e)i[a]||b9(t,`unknown keyword: "${a}"`)}st.checkUnknownRules=g9;function v9(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}st.schemaHasRules=v9;function Lhe(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}st.schemaHasRulesButRef=Lhe;function Fhe({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Ft._)`${r}`}return(0,Ft._)`${t}${e}${(0,Ft.getProperty)(n)}`}st.schemaRefOrVal=Fhe;function Vhe(t){return y9(decodeURIComponent(t))}st.unescapeFragment=Vhe;function Whe(t){return encodeURIComponent(Nz(t))}st.escapeFragment=Whe;function Nz(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}st.escapeJsonPointer=Nz;function y9(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}st.unescapeJsonPointer=y9;function Bhe(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}st.eachItem=Bhe;function m9({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,a,o,s)=>{let c=o===void 0?a:o instanceof Ft.Name?(a instanceof Ft.Name?t(i,a,o):e(i,a,o),o):a instanceof Ft.Name?(e(i,o,a),a):r(a,o);return s===Ft.Name&&!(c instanceof Ft.Name)?n(i,c):c}}st.mergeEvaluated={props:m9({mergeNames:(t,e,r)=>t.if((0,Ft._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Ft._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Ft._)`${r} || {}`).code((0,Ft._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Ft._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Ft._)`${r} || {}`),Rz(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:_9}),items:m9({mergeNames:(t,e,r)=>t.if((0,Ft._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Ft._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Ft._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Ft._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function _9(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Ft._)`{}`);return e!==void 0&&Rz(t,r,e),r}st.evaluatedPropsToName=_9;function Rz(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Ft._)`${e}${(0,Ft.getProperty)(n)}`,!0))}st.setEvaluated=Rz;var h9={};function Khe(t,e){return t.scopeValue("func",{ref:e,code:h9[e.code]||(h9[e.code]=new Mhe._Code(e.code))})}st.useFunc=Khe;var jz;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(jz||(st.Type=jz={}));function Hhe(t,e,r){if(t instanceof Ft.Name){let n=e===jz.Num;return r?n?(0,Ft._)`"[" + ${t} + "]"`:(0,Ft._)`"['" + ${t} + "']"`:n?(0,Ft._)`"/" + ${t}`:(0,Ft._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ft.getProperty)(t).toString():"/"+Nz(t)}st.getErrorPath=Hhe;function b9(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}st.checkStrictMode=b9});var ja=z(Cz=>{"use strict";Object.defineProperty(Cz,"__esModule",{value:!0});var Lr=Ye(),Ghe={data:new Lr.Name("data"),valCxt:new Lr.Name("valCxt"),instancePath:new Lr.Name("instancePath"),parentData:new Lr.Name("parentData"),parentDataProperty:new Lr.Name("parentDataProperty"),rootData:new Lr.Name("rootData"),dynamicAnchors:new Lr.Name("dynamicAnchors"),vErrors:new Lr.Name("vErrors"),errors:new Lr.Name("errors"),this:new Lr.Name("this"),self:new Lr.Name("self"),scope:new Lr.Name("scope"),json:new Lr.Name("json"),jsonPos:new Lr.Name("jsonPos"),jsonLen:new Lr.Name("jsonLen"),jsonPart:new Lr.Name("jsonPart")};Cz.default=Ghe});var _f=z(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.extendErrors=Fr.resetErrorsCount=Fr.reportExtraError=Fr.reportError=Fr.keyword$DataError=Fr.keywordError=void 0;var xt=Ye(),Sy=bt(),un=ja();Fr.keywordError={message:({keyword:t})=>(0,xt.str)`must pass "${t}" keyword validation`};Fr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,xt.str)`"${t}" keyword must be ${e} ($data)`:(0,xt.str)`"${t}" keyword is invalid ($data)`};function Qhe(t,e=Fr.keywordError,r,n){let{it:i}=t,{gen:a,compositeRule:o,allErrors:s}=i,c=k9(t,e,r);n??(o||s)?x9(a,c):w9(i,(0,xt._)`[${c}]`)}Fr.reportError=Qhe;function Yhe(t,e=Fr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:a,allErrors:o}=n,s=k9(t,e,r);x9(i,s),a||o||w9(n,un.default.vErrors)}Fr.reportExtraError=Yhe;function Jhe(t,e){t.assign(un.default.errors,e),t.if((0,xt._)`${un.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,xt._)`${un.default.vErrors}.length`,e),()=>t.assign(un.default.vErrors,null)))}Fr.resetErrorsCount=Jhe;function Xhe({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",i,un.default.errors,s=>{t.const(o,(0,xt._)`${un.default.vErrors}[${s}]`),t.if((0,xt._)`${o}.instancePath === undefined`,()=>t.assign((0,xt._)`${o}.instancePath`,(0,xt.strConcat)(un.default.instancePath,a.errorPath))),t.assign((0,xt._)`${o}.schemaPath`,(0,xt.str)`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign((0,xt._)`${o}.schema`,r),t.assign((0,xt._)`${o}.data`,n))})}Fr.extendErrors=Xhe;function x9(t,e){let r=t.const("err",e);t.if((0,xt._)`${un.default.vErrors} === null`,()=>t.assign(un.default.vErrors,(0,xt._)`[${r}]`),(0,xt._)`${un.default.vErrors}.push(${r})`),t.code((0,xt._)`${un.default.errors}++`)}function w9(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,xt._)`new ${t.ValidationError}(${e})`):(r.assign((0,xt._)`${n}.errors`,e),r.return(!1))}var Ps={keyword:new xt.Name("keyword"),schemaPath:new xt.Name("schemaPath"),params:new xt.Name("params"),propertyName:new xt.Name("propertyName"),message:new xt.Name("message"),schema:new xt.Name("schema"),parentSchema:new xt.Name("parentSchema")};function k9(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,xt._)`{}`:ege(t,e,r)}function ege(t,e,r={}){let{gen:n,it:i}=t,a=[tge(i,r),rge(t,r)];return nge(t,e,a),n.object(...a)}function tge({errorPath:t},{instancePath:e}){let r=e?(0,xt.str)`${t}${(0,Sy.getErrorPath)(e,Sy.Type.Str)}`:t;return[un.default.instancePath,(0,xt.strConcat)(un.default.instancePath,r)]}function rge({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,xt.str)`${e}/${t}`;return r&&(i=(0,xt.str)`${i}${(0,Sy.getErrorPath)(r,Sy.Type.Str)}`),[Ps.schemaPath,i]}function nge(t,{params:e,message:r},n){let{keyword:i,data:a,schemaValue:o,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;n.push([Ps.keyword,i],[Ps.params,typeof e=="function"?e(t):e||(0,xt._)`{}`]),c.messages&&n.push([Ps.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Ps.schema,o],[Ps.parentSchema,(0,xt._)`${l}${d}`],[un.default.data,a]),u&&n.push([Ps.propertyName,u])}});var $9=z(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.boolOrEmptySchema=Ou.topBoolOrEmptySchema=void 0;var ige=_f(),age=Ye(),oge=ja(),sge={message:"boolean schema is false"};function cge(t){let{gen:e,schema:r,validateName:n}=t;r===!1?S9(t,!1):typeof r=="object"&&r.$async===!0?e.return(oge.default.data):(e.assign((0,age._)`${n}.errors`,null),e.return(!0))}Ou.topBoolOrEmptySchema=cge;function uge(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),S9(t)):r.var(e,!0)}Ou.boolOrEmptySchema=uge;function S9(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,ige.reportError)(i,sge,void 0,e)}});var Az=z(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.getRules=ju.isJSONType=void 0;var lge=["string","number","integer","boolean","null","object","array"],dge=new Set(lge);function pge(t){return typeof t=="string"&&dge.has(t)}ju.isJSONType=pge;function fge(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}ju.getRules=fge});var Uz=z(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.shouldUseRule=bo.shouldUseGroup=bo.schemaHasRulesForType=void 0;function mge({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&I9(t,n)}bo.schemaHasRulesForType=mge;function I9(t,e){return e.rules.some(r=>E9(t,r))}bo.shouldUseGroup=I9;function E9(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}bo.shouldUseRule=E9});var bf=z(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.reportTypeError=Vr.checkDataTypes=Vr.checkDataType=Vr.coerceAndCheckDataType=Vr.getJSONTypes=Vr.getSchemaTypes=Vr.DataType=void 0;var hge=Az(),gge=Uz(),vge=_f(),Qe=Ye(),P9=bt(),Nu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Nu||(Vr.DataType=Nu={}));function yge(t){let e=T9(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Vr.getSchemaTypes=yge;function T9(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(hge.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Vr.getJSONTypes=T9;function _ge(t,e){let{gen:r,data:n,opts:i}=t,a=bge(e,i.coerceTypes),o=e.length>0&&!(a.length===0&&e.length===1&&(0,gge.schemaHasRulesForType)(t,e[0]));if(o){let s=Mz(e,n,i.strictNumbers,Nu.Wrong);r.if(s,()=>{a.length?xge(t,e,a):qz(t)})}return o}Vr.coerceAndCheckDataType=_ge;var z9=new Set(["string","number","integer","boolean","null"]);function bge(t,e){return e?t.filter(r=>z9.has(r)||e==="array"&&r==="array"):[]}function xge(t,e,r){let{gen:n,data:i,opts:a}=t,o=n.let("dataType",(0,Qe._)`typeof ${i}`),s=n.let("coerced",(0,Qe._)`undefined`);a.coerceTypes==="array"&&n.if((0,Qe._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Qe._)`${i}[0]`).assign(o,(0,Qe._)`typeof ${i}`).if(Mz(e,i,a.strictNumbers),()=>n.assign(s,i))),n.if((0,Qe._)`${s} !== undefined`);for(let u of r)(z9.has(u)||u==="array"&&a.coerceTypes==="array")&&c(u);n.else(),qz(t),n.endIf(),n.if((0,Qe._)`${s} !== undefined`,()=>{n.assign(i,s),wge(t,s)});function c(u){switch(u){case"string":n.elseIf((0,Qe._)`${o} == "number" || ${o} == "boolean"`).assign(s,(0,Qe._)`"" + ${i}`).elseIf((0,Qe._)`${i} === null`).assign(s,(0,Qe._)`""`);return;case"number":n.elseIf((0,Qe._)`${o} == "boolean" || ${i} === null
|
|
21
|
+
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Qe._)`+${i}`);return;case"integer":n.elseIf((0,Qe._)`${o} === "boolean" || ${i} === null
|
|
22
|
+
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Qe._)`+${i}`);return;case"boolean":n.elseIf((0,Qe._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Qe._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Qe._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Qe._)`${o} === "string" || ${o} === "number"
|
|
23
|
+
|| ${o} === "boolean" || ${i} === null`).assign(s,(0,Qe._)`[${i}]`)}}}function wge({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Qe._)`${e} !== undefined`,()=>t.assign((0,Qe._)`${e}[${r}]`,n))}function Dz(t,e,r,n=Nu.Correct){let i=n===Nu.Correct?Qe.operators.EQ:Qe.operators.NEQ,a;switch(t){case"null":return(0,Qe._)`${e} ${i} null`;case"array":a=(0,Qe._)`Array.isArray(${e})`;break;case"object":a=(0,Qe._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=o((0,Qe._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=o();break;default:return(0,Qe._)`typeof ${e} ${i} ${t}`}return n===Nu.Correct?a:(0,Qe.not)(a);function o(s=Qe.nil){return(0,Qe.and)((0,Qe._)`typeof ${e} == "number"`,s,r?(0,Qe._)`isFinite(${e})`:Qe.nil)}}Vr.checkDataType=Dz;function Mz(t,e,r,n){if(t.length===1)return Dz(t[0],e,r,n);let i,a=(0,P9.toHash)(t);if(a.array&&a.object){let o=(0,Qe._)`typeof ${e} != "object"`;i=a.null?o:(0,Qe._)`!${e} || ${o}`,delete a.null,delete a.array,delete a.object}else i=Qe.nil;a.number&&delete a.integer;for(let o in a)i=(0,Qe.and)(i,Dz(o,e,r,n));return i}Vr.checkDataTypes=Mz;var kge={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Qe._)`{type: ${t}}`:(0,Qe._)`{type: ${e}}`};function qz(t){let e=Sge(t);(0,vge.reportError)(e,kge)}Vr.reportTypeError=qz;function Sge(t){let{gen:e,data:r,schema:n}=t,i=(0,P9.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var j9=z($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.assignDefaults=void 0;var Ru=Ye(),$ge=bt();function Ige(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)O9(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>O9(t,a,i.default))}$y.assignDefaults=Ige;function O9(t,e,r){let{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;let s=(0,Ru._)`${a}${(0,Ru.getProperty)(e)}`;if(i){(0,$ge.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Ru._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,Ru._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,Ru._)`${s} = ${(0,Ru.stringify)(r)}`)}});var mi=z(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Yt=Ye(),Zz=bt(),xo=ja(),Ege=bt();function Pge(t,e){let{gen:r,data:n,it:i}=t;r.if(Fz(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Yt._)`${e}`},!0),t.error()})}Ct.checkReportMissingProp=Pge;function Tge({gen:t,data:e,it:{opts:r}},n,i){return(0,Yt.or)(...n.map(a=>(0,Yt.and)(Fz(t,e,a,r.ownProperties),(0,Yt._)`${i} = ${a}`)))}Ct.checkMissingProp=Tge;function zge(t,e){t.setParams({missingProperty:e},!0),t.error()}Ct.reportMissingProp=zge;function N9(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Yt._)`Object.prototype.hasOwnProperty`})}Ct.hasPropFunc=N9;function Lz(t,e,r){return(0,Yt._)`${N9(t)}.call(${e}, ${r})`}Ct.isOwnProperty=Lz;function Oge(t,e,r,n){let i=(0,Yt._)`${e}${(0,Yt.getProperty)(r)} !== undefined`;return n?(0,Yt._)`${i} && ${Lz(t,e,r)}`:i}Ct.propertyInData=Oge;function Fz(t,e,r,n){let i=(0,Yt._)`${e}${(0,Yt.getProperty)(r)} === undefined`;return n?(0,Yt.or)(i,(0,Yt.not)(Lz(t,e,r))):i}Ct.noPropertyInData=Fz;function R9(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ct.allSchemaProperties=R9;function jge(t,e){return R9(e).filter(r=>!(0,Zz.alwaysValidSchema)(t,e[r]))}Ct.schemaProperties=jge;function Nge({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:o},s,c,u){let l=u?(0,Yt._)`${t}, ${e}, ${n}${i}`:e,d=[[xo.default.instancePath,(0,Yt.strConcat)(xo.default.instancePath,a)],[xo.default.parentData,o.parentData],[xo.default.parentDataProperty,o.parentDataProperty],[xo.default.rootData,xo.default.rootData]];o.opts.dynamicRef&&d.push([xo.default.dynamicAnchors,xo.default.dynamicAnchors]);let f=(0,Yt._)`${l}, ${r.object(...d)}`;return c!==Yt.nil?(0,Yt._)`${s}.call(${c}, ${f})`:(0,Yt._)`${s}(${f})`}Ct.callValidateCode=Nge;var Rge=(0,Yt._)`new RegExp`;function Cge({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,a=i(r,n);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Yt._)`${i.code==="new RegExp"?Rge:(0,Ege.useFunc)(t,i)}(${r}, ${n})`})}Ct.usePattern=Cge;function Age(t){let{gen:e,data:r,keyword:n,it:i}=t,a=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return o(()=>e.assign(s,!1)),s}return e.var(a,!0),o(()=>e.break()),a;function o(s){let c=e.const("len",(0,Yt._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Zz.Type.Num},a),e.if((0,Yt.not)(a),s)})}}Ct.validateArray=Age;function Uge(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Zz.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},s);e.assign(o,(0,Yt._)`${o} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,Yt.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Ct.validateUnion=Uge});var U9=z(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.validateKeywordUsage=ta.validSchemaType=ta.funcKeywordCode=ta.macroKeywordCode=void 0;var ln=Ye(),Ts=ja(),Dge=mi(),Mge=_f();function qge(t,e){let{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=A9(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:ln.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}ta.macroKeywordCode=qge;function Zge(t,e){var r;let{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;Fge(c,e);let u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,l=A9(n,i,u),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&C9(t),g(()=>t.error());else{let h=e.async?p():m();e.modifying&&C9(t),g(()=>Lge(t,h))}}function p(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,ln._)`await `),b=>n.assign(d,!1).if((0,ln._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,ln._)`${b}.errors`),()=>n.throw(b))),h}function m(){let h=(0,ln._)`${l}.errors`;return n.assign(h,null),v(ln.nil),h}function v(h=e.async?(0,ln._)`await `:ln.nil){let b=c.opts.passContext?Ts.default.this:Ts.default.self,y=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,ln._)`${h}${(0,Dge.callValidateCode)(t,l,b,y)}`,e.modifying)}function g(h){var b;n.if((0,ln.not)((b=e.valid)!==null&&b!==void 0?b:d),h)}}ta.funcKeywordCode=Zge;function C9(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,ln._)`${n.parentData}[${n.parentDataProperty}]`))}function Lge(t,e){let{gen:r}=t;r.if((0,ln._)`Array.isArray(${e})`,()=>{r.assign(Ts.default.vErrors,(0,ln._)`${Ts.default.vErrors} === null ? ${e} : ${Ts.default.vErrors}.concat(${e})`).assign(Ts.default.errors,(0,ln._)`${Ts.default.vErrors}.length`),(0,Mge.extendErrors)(t)},()=>t.error())}function Fge({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function A9(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ln.stringify)(r)})}function Vge(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}ta.validSchemaType=Vge;function Wge({schema:t,opts:e,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[a])){let c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ta.validateKeywordUsage=Wge});var M9=z(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.extendSubschemaMode=wo.extendSubschemaData=wo.getSubschema=void 0;var ra=Ye(),D9=bt();function Bge(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,ra._)`${t.schemaPath}${(0,ra.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,ra._)`${t.schemaPath}${(0,ra.getProperty)(e)}${(0,ra.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,D9.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}wo.getSubschema=Bge;function Kge(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,f=s.let("data",(0,ra._)`${e.data}${(0,ra.getProperty)(r)}`,!0);c(f),t.errorPath=(0,ra.str)`${u}${(0,D9.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,ra._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(i!==void 0){let u=i instanceof ra.Name?i:s.let("data",i,!0);c(u),o!==void 0&&(t.propertyName=o)}a&&(t.dataTypes=a);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}wo.extendSubschemaData=Kge;function Hge(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}wo.extendSubschemaMode=Hge});var Z9=z((r4e,q9)=>{"use strict";var ko=q9.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Iy(e,n,i,t,"",t)};ko.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ko.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ko.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ko.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 Iy(t,e,r,n,i,a,o,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,a,o,s,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in ko.arrayKeywords)for(var f=0;f<d.length;f++)Iy(t,e,r,d[f],i+"/"+l+"/"+f,a,i,l,n,f)}else if(l in ko.propsKeywords){if(d&&typeof d=="object")for(var p in d)Iy(t,e,r,d[p],i+"/"+l+"/"+Gge(p),a,i,l,n,p)}else(l in ko.keywords||t.allKeys&&!(l in ko.skipKeywords))&&Iy(t,e,r,d,i+"/"+l,a,i,l,n)}r(n,i,a,o,s,c,u)}}function Gge(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var xf=z($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.getSchemaRefs=$n.resolveUrl=$n.normalizeId=$n._getFullPath=$n.getFullPath=$n.inlineRef=void 0;var Qge=bt(),Yge=Wp(),Jge=Z9(),Xge=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function eve(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Vz(t):e?L9(t)<=e:!1}$n.inlineRef=eve;var tve=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Vz(t){for(let e in t){if(tve.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Vz)||typeof r=="object"&&Vz(r))return!0}return!1}function L9(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Xge.has(r)&&(typeof t[r]=="object"&&(0,Qge.eachItem)(t[r],n=>e+=L9(n)),e===1/0))return 1/0}return e}function F9(t,e="",r){r!==!1&&(e=Cu(e));let n=t.parse(e);return V9(t,n)}$n.getFullPath=F9;function V9(t,e){return t.serialize(e).split("#")[0]+"#"}$n._getFullPath=V9;var rve=/#\/?$/;function Cu(t){return t?t.replace(rve,""):""}$n.normalizeId=Cu;function nve(t,e,r){return r=Cu(r),t.resolve(e,r)}$n.resolveUrl=nve;var ive=/^[a-z_][-a-z0-9._]*$/i;function ave(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Cu(t[r]||e),a={"":i},o=F9(n,i,!1),s={},c=new Set;return Jge(t,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let v=o+f,g=a[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),a[f]=g;function h(y){let _=this.opts.uriResolver.resolve;if(y=Cu(g?_(g,y):y),c.has(y))throw l(y);c.add(y);let x=this.refs[y];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(d,x.schema,y):y!==Cu(v)&&(y[0]==="#"?(u(d,s[y],y),s[y]=d):this.refs[y]=v),y}function b(y){if(typeof y=="string"){if(!ive.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),s;function u(d,f,p){if(f!==void 0&&!Yge(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}$n.getSchemaRefs=ave});var Sf=z(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.getData=So.KeywordCxt=So.validateFunctionCode=void 0;var G9=$9(),W9=bf(),Bz=Uz(),Ey=bf(),ove=j9(),kf=U9(),Wz=M9(),Se=Ye(),De=ja(),sve=xf(),Na=bt(),wf=_f();function cve(t){if(J9(t)&&(X9(t),Y9(t))){dve(t);return}Q9(t,()=>(0,G9.topBoolOrEmptySchema)(t))}So.validateFunctionCode=cve;function Q9({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},a){i.code.es5?t.func(e,(0,Se._)`${De.default.data}, ${De.default.valCxt}`,n.$async,()=>{t.code((0,Se._)`"use strict"; ${B9(r,i)}`),lve(t,i),t.code(a)}):t.func(e,(0,Se._)`${De.default.data}, ${uve(i)}`,n.$async,()=>t.code(B9(r,i)).code(a))}function uve(t){return(0,Se._)`{${De.default.instancePath}="", ${De.default.parentData}, ${De.default.parentDataProperty}, ${De.default.rootData}=${De.default.data}${t.dynamicRef?(0,Se._)`, ${De.default.dynamicAnchors}={}`:Se.nil}}={}`}function lve(t,e){t.if(De.default.valCxt,()=>{t.var(De.default.instancePath,(0,Se._)`${De.default.valCxt}.${De.default.instancePath}`),t.var(De.default.parentData,(0,Se._)`${De.default.valCxt}.${De.default.parentData}`),t.var(De.default.parentDataProperty,(0,Se._)`${De.default.valCxt}.${De.default.parentDataProperty}`),t.var(De.default.rootData,(0,Se._)`${De.default.valCxt}.${De.default.rootData}`),e.dynamicRef&&t.var(De.default.dynamicAnchors,(0,Se._)`${De.default.valCxt}.${De.default.dynamicAnchors}`)},()=>{t.var(De.default.instancePath,(0,Se._)`""`),t.var(De.default.parentData,(0,Se._)`undefined`),t.var(De.default.parentDataProperty,(0,Se._)`undefined`),t.var(De.default.rootData,De.default.data),e.dynamicRef&&t.var(De.default.dynamicAnchors,(0,Se._)`{}`)})}function dve(t){let{schema:e,opts:r,gen:n}=t;Q9(t,()=>{r.$comment&&e.$comment&&tV(t),gve(t),n.let(De.default.vErrors,null),n.let(De.default.errors,0),r.unevaluated&&pve(t),eV(t),_ve(t)})}function pve(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Se._)`${r}.evaluated`),e.if((0,Se._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Se._)`${t.evaluated}.props`,(0,Se._)`undefined`)),e.if((0,Se._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Se._)`${t.evaluated}.items`,(0,Se._)`undefined`))}function B9(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Se._)`/*# sourceURL=${r} */`:Se.nil}function fve(t,e){if(J9(t)&&(X9(t),Y9(t))){mve(t,e);return}(0,G9.boolOrEmptySchema)(t,e)}function Y9({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function J9(t){return typeof t.schema!="boolean"}function mve(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&tV(t),vve(t),yve(t);let a=n.const("_errs",De.default.errors);eV(t,a),n.var(e,(0,Se._)`${a} === ${De.default.errors}`)}function X9(t){(0,Na.checkUnknownRules)(t),hve(t)}function eV(t,e){if(t.opts.jtd)return K9(t,[],!1,e);let r=(0,W9.getSchemaTypes)(t.schema),n=(0,W9.coerceAndCheckDataType)(t,r);K9(t,r,!n,e)}function hve(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Na.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function gve(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Na.checkStrictMode)(t,"default is ignored in the schema root")}function vve(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,sve.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function yve(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function tV({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let a=r.$comment;if(i.$comment===!0)t.code((0,Se._)`${De.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){let o=(0,Se.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,Se._)`${De.default.self}.opts.$comment(${a}, ${o}, ${s}.schema)`)}}function _ve(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=t;r.$async?e.if((0,Se._)`${De.default.errors} === 0`,()=>e.return(De.default.data),()=>e.throw((0,Se._)`new ${i}(${De.default.vErrors})`)):(e.assign((0,Se._)`${n}.errors`,De.default.vErrors),a.unevaluated&&bve(t),e.return((0,Se._)`${De.default.errors} === 0`))}function bve({gen:t,evaluated:e,props:r,items:n}){r instanceof Se.Name&&t.assign((0,Se._)`${e}.props`,r),n instanceof Se.Name&&t.assign((0,Se._)`${e}.items`,n)}function K9(t,e,r,n){let{gen:i,schema:a,data:o,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,Na.schemaHasRulesButRef)(a,l))){i.block(()=>nV(t,"$ref",l.all.$ref.definition));return}c.jtd||xve(t,e),i.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,Bz.shouldUseGroup)(a,f)&&(f.type?(i.if((0,Ey.checkDataType)(f.type,o,c.strictNumbers)),H9(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,Ey.reportTypeError)(t)),i.endIf()):H9(t,f),s||i.if((0,Se._)`${De.default.errors} === ${n||0}`))}}function H9(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,ove.assignDefaults)(t,e.type),r.block(()=>{for(let a of e.rules)(0,Bz.shouldUseRule)(n,a)&&nV(t,a.keyword,a.definition,e.type)})}function xve(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(wve(t,e),t.opts.allowUnionTypes||kve(t,e),Sve(t,t.dataTypes))}function wve(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{rV(t.dataTypes,r)||Kz(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Ive(t,e)}}function kve(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Kz(t,"use allowUnionTypes to allow union type keyword")}function Sve(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Bz.shouldUseRule)(t.schema,i)){let{type:a}=i.definition;a.length&&!a.some(o=>$ve(e,o))&&Kz(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function $ve(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function rV(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Ive(t,e){let r=[];for(let n of t.dataTypes)rV(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Kz(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Na.checkStrictMode)(t,e,t.opts.strictTypes)}var Py=class{constructor(e,r,n){if((0,kf.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Na.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",iV(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,kf.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=e.gen.const("_errs",De.default.errors))}result(e,r,n){this.failResult((0,Se.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Se.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,Se._)`${r} !== undefined && (${(0,Se.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?wf.reportExtraError:wf.reportError)(this,this.def.error,r)}$dataError(){(0,wf.reportError)(this,this.def.$dataError||wf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,wf.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=Se.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=Se.nil,r=Se.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:a,def:o}=this;n.if((0,Se.or)((0,Se._)`${i} === undefined`,r)),e!==Se.nil&&n.assign(e,!0),(a.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Se.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,Se.or)(o(),s());function o(){if(n.length){if(!(r instanceof Se.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,Se._)`${(0,Ey.checkDataTypes)(c,r,a.opts.strictNumbers,Ey.DataType.Wrong)}`}return Se.nil}function s(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,Se._)`!${c}(${r})`}return Se.nil}}subschema(e,r){let n=(0,Wz.getSubschema)(this.it,e);(0,Wz.extendSubschemaData)(n,this.it,e),(0,Wz.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return fve(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Na.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Na.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,Se.Name)),!0}};So.KeywordCxt=Py;function nV(t,e,r,n){let i=new Py(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,kf.funcKeywordCode)(i,r):"macro"in r?(0,kf.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,kf.funcKeywordCode)(i,r)}var Eve=/^\/(?:[^~]|~0|~1)*$/,Pve=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function iV(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return De.default.rootData;if(t[0]==="/"){if(!Eve.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=De.default.rootData}else{let u=Pve.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=e)throw new Error(c("property/index",l));return n[e-l]}if(l>e)throw new Error(c("data",l));if(a=r[e-l],!i)return a}let o=a,s=i.split("/");for(let u of s)u&&(a=(0,Se._)`${a}${(0,Se.getProperty)((0,Na.unescapeJsonPointer)(u))}`,o=(0,Se._)`${o} && ${a}`);return o;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}So.getData=iV});var Ty=z(Gz=>{"use strict";Object.defineProperty(Gz,"__esModule",{value:!0});var Hz=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Gz.default=Hz});var $f=z(Jz=>{"use strict";Object.defineProperty(Jz,"__esModule",{value:!0});var Qz=xf(),Yz=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Qz.resolveUrl)(e,r,n),this.missingSchema=(0,Qz.normalizeId)((0,Qz.getFullPath)(e,this.missingRef))}};Jz.default=Yz});var Oy=z(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.resolveSchema=hi.getCompilingSchema=hi.resolveRef=hi.compileSchema=hi.SchemaEnv=void 0;var Di=Ye(),Tve=Ty(),zs=ja(),Mi=xf(),aV=bt(),zve=Sf(),Au=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Mi.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};hi.SchemaEnv=Au;function eO(t){let e=oV.call(this,t);if(e)return e;let r=(0,Mi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new Di.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),s;t.$async&&(s=o.scopeValue("Error",{ref:Tve.default,code:(0,Di._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");t.validateName=c;let u={gen:o,allErrors:this.opts.allErrors,data:zs.default.data,parentData:zs.default.parentData,parentDataProperty:zs.default.parentDataProperty,dataNames:[zs.default.data],dataPathArr:[Di.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Di.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Di.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Di._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,zve.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let d=o.toString();l=`${o.scopeRefs(zs.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let p=new Function(`${zs.default.self}`,`${zs.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:v}=u;p.evaluated={props:m instanceof Di.Name?void 0:m,items:v instanceof Di.Name?void 0:v,dynamicProps:m instanceof Di.Name,dynamicItems:v instanceof Di.Name},p.source&&(p.source.evaluated=(0,Di.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}hi.compileSchema=eO;function Ove(t,e,r){var n;r=(0,Mi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let a=Rve.call(this,t,r);if(a===void 0){let o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;o&&(a=new Au({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=jve.call(this,a)}hi.resolveRef=Ove;function jve(t){return(0,Mi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:eO.call(this,t)}function oV(t){for(let e of this._compilations)if(Nve(e,t))return e}hi.getCompilingSchema=oV;function Nve(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Rve(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||zy.call(this,t,e)}function zy(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Mi._getFullPath)(this.opts.uriResolver,r),i=(0,Mi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Xz.call(this,r,t);let a=(0,Mi.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){let s=zy.call(this,t,o);return typeof s?.schema!="object"?void 0:Xz.call(this,r,s)}if(typeof o?.schema=="object"){if(o.validate||eO.call(this,o),a===(0,Mi.normalizeId)(e)){let{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Mi.resolveUrl)(this.opts.uriResolver,i,u)),new Au({schema:s,schemaId:c,root:t,baseId:i})}return Xz.call(this,r,o)}}hi.resolveSchema=zy;var Cve=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Xz(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,aV.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Cve.has(s)&&u&&(e=(0,Mi.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,aV.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Mi.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=zy.call(this,n,s)}let{schemaId:o}=this.opts;if(a=a||new Au({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}});var sV=z((c4e,Ave)=>{Ave.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 uV=z(tO=>{"use strict";Object.defineProperty(tO,"__esModule",{value:!0});var cV=vT();cV.code='require("ajv/dist/runtime/uri").default';tO.default=cV});var vV=z(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.CodeGen=jr.Name=jr.nil=jr.stringify=jr.str=jr._=jr.KeywordCxt=void 0;var Uve=Sf();Object.defineProperty(jr,"KeywordCxt",{enumerable:!0,get:function(){return Uve.KeywordCxt}});var Uu=Ye();Object.defineProperty(jr,"_",{enumerable:!0,get:function(){return Uu._}});Object.defineProperty(jr,"str",{enumerable:!0,get:function(){return Uu.str}});Object.defineProperty(jr,"stringify",{enumerable:!0,get:function(){return Uu.stringify}});Object.defineProperty(jr,"nil",{enumerable:!0,get:function(){return Uu.nil}});Object.defineProperty(jr,"Name",{enumerable:!0,get:function(){return Uu.Name}});Object.defineProperty(jr,"CodeGen",{enumerable:!0,get:function(){return Uu.CodeGen}});var Dve=Ty(),mV=$f(),Mve=Az(),If=Oy(),qve=Ye(),Ef=xf(),jy=bf(),nO=bt(),lV=sV(),Zve=uV(),hV=(t,e)=>new RegExp(t,e);hV.code="new RegExp";var Lve=["removeAdditional","useDefaults","coerceTypes"],Fve=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Vve={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."},Wve={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},dV=200;function Bve(t){var e,r,n,i,a,o,s,c,u,l,d,f,p,m,v,g,h,b,y,_,x,w,k,$,P;let C=t.strict,T=(e=t.code)===null||e===void 0?void 0:e.optimize,D=T===!0||T===void 0?1:T||0,Z=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:hV,N=(i=t.uriResolver)!==null&&i!==void 0?i:Zve.default;return{strictSchema:(o=(a=t.strictSchema)!==null&&a!==void 0?a:C)!==null&&o!==void 0?o:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:C)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:C)!==null&&l!==void 0?l:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:C)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=t.strictRequired)!==null&&p!==void 0?p:C)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:D,regExp:Z}:{optimize:D,regExp:Z},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:dV,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:dV,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(b=t.messages)!==null&&b!==void 0?b:!0,inlineRefs:(y=t.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(_=t.schemaId)!==null&&_!==void 0?_:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(k=t.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:($=t.unicodeRegExp)!==null&&$!==void 0?$:!0,int32range:(P=t.int32range)!==null&&P!==void 0?P:!0,uriResolver:N}}var Pf=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Bve(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new qve.ValueScope({scope:{},prefixes:Fve,es5:r,lines:n}),this.logger=Jve(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Mve.getRules)(),pV.call(this,Vve,e,"NOT SUPPORTED"),pV.call(this,Wve,e,"DEPRECATED","warn"),this._metaOpts=Qve.call(this),e.formats&&Hve.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Gve.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Kve.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=lV;n==="id"&&(i={...lV},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,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,e,r);async function i(l,d){await a.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||o.call(this,f)}async function a(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 mV.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),o.call(this,l)}}function s({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 a.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(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,n,i);return this}let a;if(typeof e=="object"){let{schemaId:o}=this.opts;if(a=e[o],a!==void 0&&typeof a!="string")throw new Error(`schema ${o} must be string`)}return r=(0,Ef.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$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,e);if(!i&&r){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}getSchema(e){let r;for(;typeof(r=fV.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new If.SchemaEnv({schema:{},schemaId:n});if(r=If.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=fV.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Ef.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,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(eye.call(this,n,r),!r)return(0,nO.eachItem)(n,a=>rO.call(this,a)),this;rye.call(this,r);let i={...r,type:(0,jy.getJSONTypes)(r.type),schemaType:(0,jy.getJSONTypes)(r.schemaType)};return(0,nO.eachItem)(n,i.type.length===0?a=>rO.call(this,a,i):a=>i.type.forEach(o=>rO.call(this,a,i,o))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(a=>a.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,a)=>i+r+a)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let a=i.split("/").slice(1),o=e;for(let s of a)o=o[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=o[s];u&&l&&(o[s]=gV(l))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,a=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if(typeof e=="object")o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,Ef.normalizeId)(o||n);let u=Ef.getSchemaRefs.call(this,e,n);return c=new If.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),a&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):If.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{If.compileSchema.call(this,e)}finally{this.opts=r}}};Pf.ValidationError=Dve.default;Pf.MissingRefError=mV.default;jr.default=Pf;function pV(t,e,r,n="error"){for(let i in t){let a=i;a in e&&this.logger[n](`${r}: option ${i}. ${t[a]}`)}}function fV(t){return t=(0,Ef.normalizeId)(t),this.schemas[t]||this.refs[t]}function Kve(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Hve(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Gve(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Qve(){let t={...this.opts};for(let e of Lve)delete t[e];return t}var Yve={log(){},warn(){},error(){}};function Jve(t){if(t===!1)return Yve;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Xve=/^[a-z_$][a-z0-9_$:-]*$/i;function eye(t,e){let{RULES:r}=this;if((0,nO.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Xve.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function rO(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,o=i?a.post:a.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},a.rules.push(o)),a.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,jy.getJSONTypes)(e.type),schemaType:(0,jy.getJSONTypes)(e.schemaType)}};e.before?tye.call(this,o,s,e.before):o.rules.push(s),a.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function tye(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function rye(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=gV(e)),t.validateSchema=this.compile(e,!0))}var nye={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function gV(t){return{anyOf:[t,nye]}}});var yV=z(iO=>{"use strict";Object.defineProperty(iO,"__esModule",{value:!0});var iye={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};iO.default=iye});var wV=z(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.callRef=Os.getValidate=void 0;var aye=$f(),_V=mi(),In=Ye(),Du=ja(),bV=Oy(),Ny=bt(),oye={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:a,validateName:o,opts:s,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=bV.resolveRef.call(c,u,i,r);if(l===void 0)throw new aye.default(n.opts.uriResolver,i,r);if(l instanceof bV.SchemaEnv)return f(l);return p(l);function d(){if(a===u)return Ry(t,o,a,a.$async);let m=e.scopeValue("root",{ref:u});return Ry(t,(0,In._)`${m}.validate`,u,u.$async)}function f(m){let v=xV(t,m);Ry(t,v,m,m.$async)}function p(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,In.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:In.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function xV(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,In._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Os.getValidate=xV;function Ry(t,e,r,n){let{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?Du.default.this:In.nil;n?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,In._)`await ${(0,_V.callValidateCode)(t,e,u)}`),p(e),o||i.assign(m,!0)},v=>{i.if((0,In._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),f(v),o||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,_V.callValidateCode)(t,e,u),()=>p(e),()=>f(e))}function f(m){let v=(0,In._)`${m}.errors`;i.assign(Du.default.vErrors,(0,In._)`${Du.default.vErrors} === null ? ${v} : ${Du.default.vErrors}.concat(${v})`),i.assign(Du.default.errors,(0,In._)`${Du.default.vErrors}.length`)}function p(m){var v;if(!a.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(a.props=Ny.mergeEvaluated.props(i,g.props,a.props));else{let h=i.var("props",(0,In._)`${m}.evaluated.props`);a.props=Ny.mergeEvaluated.props(i,h,a.props,In.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=Ny.mergeEvaluated.items(i,g.items,a.items));else{let h=i.var("items",(0,In._)`${m}.evaluated.items`);a.items=Ny.mergeEvaluated.items(i,h,a.items,In.Name)}}}Os.callRef=Ry;Os.default=oye});var kV=z(aO=>{"use strict";Object.defineProperty(aO,"__esModule",{value:!0});var sye=yV(),cye=wV(),uye=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",sye.default,cye.default];aO.default=uye});var SV=z(oO=>{"use strict";Object.defineProperty(oO,"__esModule",{value:!0});var Cy=Ye(),$o=Cy.operators,Ay={maximum:{okStr:"<=",ok:$o.LTE,fail:$o.GT},minimum:{okStr:">=",ok:$o.GTE,fail:$o.LT},exclusiveMaximum:{okStr:"<",ok:$o.LT,fail:$o.GTE},exclusiveMinimum:{okStr:">",ok:$o.GT,fail:$o.LTE}},lye={message:({keyword:t,schemaCode:e})=>(0,Cy.str)`must be ${Ay[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Cy._)`{comparison: ${Ay[t].okStr}, limit: ${e}}`},dye={keyword:Object.keys(Ay),type:"number",schemaType:"number",$data:!0,error:lye,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Cy._)`${r} ${Ay[e].fail} ${n} || isNaN(${r})`)}};oO.default=dye});var $V=z(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});var Tf=Ye(),pye={message:({schemaCode:t})=>(0,Tf.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Tf._)`{multipleOf: ${t}}`},fye={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:pye,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,Tf._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,Tf._)`${o} !== parseInt(${o})`;t.fail$data((0,Tf._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};sO.default=fye});var EV=z(cO=>{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});function IV(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}cO.default=IV;IV.code='require("ajv/dist/runtime/ucs2length").default'});var PV=z(uO=>{"use strict";Object.defineProperty(uO,"__esModule",{value:!0});var js=Ye(),mye=bt(),hye=EV(),gye={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,js.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,js._)`{limit: ${t}}`},vye={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:gye,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?js.operators.GT:js.operators.LT,o=i.opts.unicode===!1?(0,js._)`${r}.length`:(0,js._)`${(0,mye.useFunc)(t.gen,hye.default)}(${r})`;t.fail$data((0,js._)`${o} ${a} ${n}`)}};uO.default=vye});var TV=z(lO=>{"use strict";Object.defineProperty(lO,"__esModule",{value:!0});var yye=mi(),_ye=bt(),Mu=Ye(),bye={message:({schemaCode:t})=>(0,Mu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Mu._)`{pattern: ${t}}`},xye={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:bye,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t,s=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,u=c.code==="new RegExp"?(0,Mu._)`new RegExp`:(0,_ye.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Mu._)`${u}(${a}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Mu._)`!${l}`)}else{let c=(0,yye.usePattern)(t,i);t.fail$data((0,Mu._)`!${c}.test(${r})`)}}};lO.default=xye});var zV=z(dO=>{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});var zf=Ye(),wye={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,zf.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,zf._)`{limit: ${t}}`},kye={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wye,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?zf.operators.GT:zf.operators.LT;t.fail$data((0,zf._)`Object.keys(${r}).length ${i} ${n}`)}};dO.default=kye});var OV=z(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});var Of=mi(),jf=Ye(),Sye=bt(),$ye={message:({params:{missingProperty:t}})=>(0,jf.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,jf._)`{missingProperty: ${t}}`},Iye={keyword:"required",type:"object",schemaType:"array",$data:!0,error:$ye,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:a,it:o}=t,{opts:s}=o;if(!a&&r.length===0)return;let c=r.length>=s.loopRequired;if(o.allErrors?u():l(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(p?.[v]===void 0&&!m.has(v)){let g=o.schemaEnv.baseId+o.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,Sye.checkStrictMode)(o,h,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(jf.nil,d);else for(let p of r)(0,Of.checkReportMissingProp)(t,p)}function l(){let p=e.let("missing");if(c||a){let m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,Of.checkMissingProp)(t,r,p)),(0,Of.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,Of.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(m,(0,Of.propertyInData)(e,i,p,s.ownProperties)),e.if((0,jf.not)(m),()=>{t.error(),e.break()})},jf.nil)}}};pO.default=Iye});var jV=z(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});var Nf=Ye(),Eye={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Nf.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Nf._)`{limit: ${t}}`},Pye={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Eye,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Nf.operators.GT:Nf.operators.LT;t.fail$data((0,Nf._)`${r}.length ${i} ${n}`)}};fO.default=Pye});var Uy=z(mO=>{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});var NV=Wp();NV.code='require("ajv/dist/runtime/equal").default';mO.default=NV});var RV=z(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});var hO=bf(),Nr=Ye(),Tye=bt(),zye=Uy(),Oye={message:({params:{i:t,j:e}})=>(0,Nr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Nr._)`{i: ${t}, j: ${e}}`},jye={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Oye,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:a,schemaCode:o,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),u=a.items?(0,hO.getSchemaTypes)(a.items):[];t.block$data(c,l,(0,Nr._)`${o} === false`),t.ok(c);function l(){let m=e.let("i",(0,Nr._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Nr._)`${m} > 1`,()=>(d()?f:p)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,v){let g=e.name("item"),h=(0,hO.checkDataTypes)(u,g,s.opts.strictNumbers,hO.DataType.Wrong),b=e.const("indices",(0,Nr._)`{}`);e.for((0,Nr._)`;${m}--;`,()=>{e.let(g,(0,Nr._)`${r}[${m}]`),e.if(h,(0,Nr._)`continue`),u.length>1&&e.if((0,Nr._)`typeof ${g} == "string"`,(0,Nr._)`${g} += "_"`),e.if((0,Nr._)`typeof ${b}[${g}] == "number"`,()=>{e.assign(v,(0,Nr._)`${b}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Nr._)`${b}[${g}] = ${m}`)})}function p(m,v){let g=(0,Tye.useFunc)(e,zye.default),h=e.name("outer");e.label(h).for((0,Nr._)`;${m}--;`,()=>e.for((0,Nr._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Nr._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};gO.default=jye});var CV=z(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});var vO=Ye(),Nye=bt(),Rye=Uy(),Cye={message:"must be equal to constant",params:({schemaCode:t})=>(0,vO._)`{allowedValue: ${t}}`},Aye={keyword:"const",$data:!0,error:Cye,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,vO._)`!${(0,Nye.useFunc)(e,Rye.default)}(${r}, ${i})`):t.fail((0,vO._)`${a} !== ${r}`)}};yO.default=Aye});var AV=z(_O=>{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});var Rf=Ye(),Uye=bt(),Dye=Uy(),Mye={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Rf._)`{allowedValues: ${t}}`},qye={keyword:"enum",schemaType:"array",$data:!0,error:Mye,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=o.opts.loopEnum,c,u=()=>c??(c=(0,Uye.useFunc)(e,Dye.default)),l;if(s||n)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",a);l=(0,Rf.or)(...i.map((m,v)=>f(p,v)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",a,p=>e.if((0,Rf._)`${u()}(${r}, ${p})`,()=>e.assign(l,!0).break()))}function f(p,m){let v=i[m];return typeof v=="object"&&v!==null?(0,Rf._)`${u()}(${r}, ${p}[${m}])`:(0,Rf._)`${r} === ${v}`}}};_O.default=qye});var UV=z(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});var Zye=SV(),Lye=$V(),Fye=PV(),Vye=TV(),Wye=zV(),Bye=OV(),Kye=jV(),Hye=RV(),Gye=CV(),Qye=AV(),Yye=[Zye.default,Lye.default,Fye.default,Vye.default,Wye.default,Bye.default,Kye.default,Hye.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Gye.default,Qye.default];bO.default=Yye});var wO=z(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.validateAdditionalItems=void 0;var Ns=Ye(),xO=bt(),Jye={message:({params:{len:t}})=>(0,Ns.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ns._)`{limit: ${t}}`},Xye={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Jye,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,xO.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}DV(t,n)}};function DV(t,e){let{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;let s=r.const("len",(0,Ns._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Ns._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,xO.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,Ns._)`${s} <= ${e.length}`);r.if((0,Ns.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:a,dataProp:l,dataPropType:xO.Type.Num},u),o.allErrors||r.if((0,Ns.not)(u),()=>r.break())})}}Cf.validateAdditionalItems=DV;Cf.default=Xye});var kO=z(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.validateTuple=void 0;var MV=Ye(),Dy=bt(),e_e=mi(),t_e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return qV(t,"additionalItems",e);r.items=!0,!(0,Dy.alwaysValidSchema)(r,e)&&t.ok((0,e_e.validateArray)(t))}};function qV(t,e,r=t.schema){let{gen:n,parentSchema:i,data:a,keyword:o,it:s}=t;l(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Dy.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),u=n.const("len",(0,MV._)`${a}.length`);r.forEach((d,f)=>{(0,Dy.alwaysValidSchema)(s,d)||(n.if((0,MV._)`${u} > ${f}`,()=>t.subschema({keyword:o,schemaProp:f,dataProp:f},c)),t.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let g=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Dy.checkStrictMode)(s,g,f.strictTuples)}}}Af.validateTuple=qV;Af.default=t_e});var ZV=z(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});var r_e=kO(),n_e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,r_e.validateTuple)(t,"items")};SO.default=n_e});var FV=z($O=>{"use strict";Object.defineProperty($O,"__esModule",{value:!0});var LV=Ye(),i_e=bt(),a_e=mi(),o_e=wO(),s_e={message:({params:{len:t}})=>(0,LV.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,LV._)`{limit: ${t}}`},c_e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:s_e,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,i_e.alwaysValidSchema)(n,e)&&(i?(0,o_e.validateAdditionalItems)(t,i):t.ok((0,a_e.validateArray)(t)))}};$O.default=c_e});var VV=z(IO=>{"use strict";Object.defineProperty(IO,"__esModule",{value:!0});var gi=Ye(),My=bt(),u_e={message:({params:{min:t,max:e}})=>e===void 0?(0,gi.str)`must contain at least ${t} valid item(s)`:(0,gi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,gi._)`{minContains: ${t}}`:(0,gi._)`{minContains: ${t}, maxContains: ${e}}`},l_e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:u_e,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t,o,s,{minContains:c,maxContains:u}=n;a.opts.next?(o=c===void 0?1:c,s=u):o=1;let l=e.const("len",(0,gi._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,My.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,My.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,My.alwaysValidSchema)(a,r)){let v=(0,gi._)`${l} >= ${o}`;s!==void 0&&(v=(0,gi._)`${v} && ${l} <= ${s}`),t.pass(v);return}a.items=!0;let d=e.name("valid");s===void 0&&o===1?p(d,()=>e.if(d,()=>e.break())):o===0?(e.let(d,!0),s!==void 0&&e.if((0,gi._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),g=e.let("count",0);p(v,()=>e.if(v,()=>m(g)))}function p(v,g){e.forRange("i",0,l,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:My.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,gi._)`${v}++`),s===void 0?e.if((0,gi._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,gi._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,gi._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};IO.default=l_e});var KV=z(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.validateSchemaDeps=na.validatePropertyDeps=na.error=void 0;var EO=Ye(),d_e=bt(),Uf=mi();na.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,EO.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,EO._)`{property: ${t},
|
|
24
|
+
missingProperty: ${n},
|
|
25
|
+
depsCount: ${e},
|
|
26
|
+
deps: ${r}}`};var p_e={keyword:"dependencies",type:"object",schemaType:"object",error:na.error,code(t){let[e,r]=f_e(t);WV(t,e),BV(t,r)}};function f_e({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function WV(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let a=r.let("missing");for(let o in e){let s=e[o];if(s.length===0)continue;let c=(0,Uf.propertyInData)(r,n,o,i.opts.ownProperties);t.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of s)(0,Uf.checkReportMissingProp)(t,u)}):(r.if((0,EO._)`${c} && (${(0,Uf.checkMissingProp)(t,s,a)})`),(0,Uf.reportMissingProp)(t,a),r.else())}}na.validatePropertyDeps=WV;function BV(t,e=t.schema){let{gen:r,data:n,keyword:i,it:a}=t,o=r.name("valid");for(let s in e)(0,d_e.alwaysValidSchema)(a,e[s])||(r.if((0,Uf.propertyInData)(r,n,s,a.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},o);t.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),t.ok(o))}na.validateSchemaDeps=BV;na.default=p_e});var GV=z(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});var HV=Ye(),m_e=bt(),h_e={message:"property name must be valid",params:({params:t})=>(0,HV._)`{propertyName: ${t.propertyName}}`},g_e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:h_e,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,m_e.alwaysValidSchema)(i,r))return;let a=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},a),e.if((0,HV.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};PO.default=g_e});var zO=z(TO=>{"use strict";Object.defineProperty(TO,"__esModule",{value:!0});var qy=mi(),qi=Ye(),v_e=ja(),Zy=bt(),y_e={message:"must NOT have additional properties",params:({params:t})=>(0,qi._)`{additionalProperty: ${t.additionalProperty}}`},__e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:y_e,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:a,it:o}=t;if(!a)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,Zy.alwaysValidSchema)(o,r))return;let u=(0,qy.allSchemaProperties)(n.properties),l=(0,qy.allSchemaProperties)(n.patternProperties);d(),t.ok((0,qi._)`${a} === ${v_e.default.errors}`);function d(){e.forIn("key",i,g=>{!u.length&&!l.length?m(g):e.if(f(g),()=>m(g))})}function f(g){let h;if(u.length>8){let b=(0,Zy.schemaRefOrVal)(o,n.properties,"properties");h=(0,qy.isOwnProperty)(e,b,g)}else u.length?h=(0,qi.or)(...u.map(b=>(0,qi._)`${g} === ${b}`)):h=qi.nil;return l.length&&(h=(0,qi.or)(h,...l.map(b=>(0,qi._)`${(0,qy.usePattern)(t,b)}.test(${g})`))),(0,qi.not)(h)}function p(g){e.code((0,qi._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,Zy.alwaysValidSchema)(o,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,qi.not)(h),()=>{t.reset(),p(g)})):(v(g,h),s||e.if((0,qi.not)(h),()=>e.break()))}}function v(g,h,b){let y={keyword:"additionalProperties",dataProp:g,dataPropType:Zy.Type.Str};b===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,h)}}};TO.default=__e});var JV=z(jO=>{"use strict";Object.defineProperty(jO,"__esModule",{value:!0});var b_e=Sf(),QV=mi(),OO=bt(),YV=zO(),x_e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&YV.default.code(new b_e.KeywordCxt(a,YV.default,"additionalProperties"));let o=(0,QV.allSchemaProperties)(r);for(let d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=OO.mergeEvaluated.props(e,(0,OO.toHash)(o),a.props));let s=o.filter(d=>!(0,OO.alwaysValidSchema)(a,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,QV.propertyInData)(e,i,d,a.opts.ownProperties)),l(d),a.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};jO.default=x_e});var rW=z(NO=>{"use strict";Object.defineProperty(NO,"__esModule",{value:!0});var XV=mi(),Ly=Ye(),eW=bt(),tW=bt(),w_e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:a}=t,{opts:o}=a,s=(0,XV.allSchemaProperties)(r),c=s.filter(v=>(0,eW.alwaysValidSchema)(a,r[v]));if(s.length===0||c.length===s.length&&(!a.opts.unevaluated||a.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,l=e.name("valid");a.props!==!0&&!(a.props instanceof Ly.Name)&&(a.props=(0,tW.evaluatedPropsToName)(e,a.props));let{props:d}=a;f();function f(){for(let v of s)u&&p(v),a.allErrors?m(v):(e.var(l,!0),m(v),e.if(l))}function p(v){for(let g in u)new RegExp(v).test(g)&&(0,eW.checkStrictMode)(a,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,Ly._)`${(0,XV.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:tW.Type.Str},l),a.opts.unevaluated&&d!==!0?e.assign((0,Ly._)`${d}[${g}]`,!0):!h&&!a.allErrors&&e.if((0,Ly.not)(l),()=>e.break())})})}}};NO.default=w_e});var nW=z(RO=>{"use strict";Object.defineProperty(RO,"__esModule",{value:!0});var k_e=bt(),S_e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,k_e.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};RO.default=S_e});var iW=z(CO=>{"use strict";Object.defineProperty(CO,"__esModule",{value:!0});var $_e=mi(),I_e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:$_e.validateUnion,error:{message:"must match a schema in anyOf"}};CO.default=I_e});var aW=z(AO=>{"use strict";Object.defineProperty(AO,"__esModule",{value:!0});var Fy=Ye(),E_e=bt(),P_e={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Fy._)`{passingSchemas: ${t.passing}}`},T_e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:P_e,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let a=r,o=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(o,()=>t.reset(),()=>t.error(!0));function u(){a.forEach((l,d)=>{let f;(0,E_e.alwaysValidSchema)(i,l)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Fy._)`${c} && ${o}`).assign(o,!1).assign(s,(0,Fy._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),f&&t.mergeEvaluated(f,Fy.Name)})})}}};AO.default=T_e});var oW=z(UO=>{"use strict";Object.defineProperty(UO,"__esModule",{value:!0});var z_e=bt(),O_e={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((a,o)=>{if((0,z_e.alwaysValidSchema)(n,a))return;let s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};UO.default=O_e});var uW=z(DO=>{"use strict";Object.defineProperty(DO,"__esModule",{value:!0});var Vy=Ye(),cW=bt(),j_e={message:({params:t})=>(0,Vy.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Vy._)`{failingKeyword: ${t.ifClause}}`},N_e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:j_e,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,cW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=sW(n,"then"),a=sW(n,"else");if(!i&&!a)return;let o=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&a){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else i?e.if(s,u("then")):e.if((0,Vy.not)(s),u("else"));t.pass(o,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let f=t.subschema({keyword:l},s);e.assign(o,s),t.mergeValidEvaluated(f,o),d?e.assign(d,(0,Vy._)`${l}`):t.setParams({ifClause:l})}}}};function sW(t,e){let r=t.schema[e];return r!==void 0&&!(0,cW.alwaysValidSchema)(t,r)}DO.default=N_e});var lW=z(MO=>{"use strict";Object.defineProperty(MO,"__esModule",{value:!0});var R_e=bt(),C_e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,R_e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};MO.default=C_e});var dW=z(qO=>{"use strict";Object.defineProperty(qO,"__esModule",{value:!0});var A_e=wO(),U_e=ZV(),D_e=kO(),M_e=FV(),q_e=VV(),Z_e=KV(),L_e=GV(),F_e=zO(),V_e=JV(),W_e=rW(),B_e=nW(),K_e=iW(),H_e=aW(),G_e=oW(),Q_e=uW(),Y_e=lW();function J_e(t=!1){let e=[B_e.default,K_e.default,H_e.default,G_e.default,Q_e.default,Y_e.default,L_e.default,F_e.default,Z_e.default,V_e.default,W_e.default];return t?e.push(U_e.default,M_e.default):e.push(A_e.default,D_e.default),e.push(q_e.default),e}qO.default=J_e});var pW=z(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0});var ur=Ye(),X_e={message:({schemaCode:t})=>(0,ur.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ur._)`{format: ${t}}`},ebe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:X_e,code(t,e){let{gen:r,data:n,$data:i,schema:a,schemaCode:o,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;i?f():p();function f(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,ur._)`${m}[${o}]`),g=r.let("fType"),h=r.let("format");r.if((0,ur._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,ur._)`${v}.type || "string"`).assign(h,(0,ur._)`${v}.validate`),()=>r.assign(g,(0,ur._)`"string"`).assign(h,v)),t.fail$data((0,ur.or)(b(),y()));function b(){return c.strictSchema===!1?ur.nil:(0,ur._)`${o} && !${h}`}function y(){let _=l.$async?(0,ur._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,ur._)`${h}(${n})`,x=(0,ur._)`(typeof ${h} == "function" ? ${_} : ${h}.test(${n}))`;return(0,ur._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function p(){let m=d.formats[a];if(!m){b();return}if(m===!0)return;let[v,g,h]=y(m);v===e&&t.pass(_());function b(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function y(x){let w=x instanceof RegExp?(0,ur.regexpCode)(x):c.code.formats?(0,ur._)`${c.code.formats}${(0,ur.getProperty)(a)}`:void 0,k=r.scopeValue("formats",{key:a,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,ur._)`${k}.validate`]:["string",x,k]}function _(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,ur._)`await ${h}(${n})`}return typeof g=="function"?(0,ur._)`${h}(${n})`:(0,ur._)`${h}.test(${n})`}}}};ZO.default=ebe});var fW=z(LO=>{"use strict";Object.defineProperty(LO,"__esModule",{value:!0});var tbe=pW(),rbe=[tbe.default];LO.default=rbe});var mW=z(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.contentVocabulary=qu.metadataVocabulary=void 0;qu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];qu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var gW=z(FO=>{"use strict";Object.defineProperty(FO,"__esModule",{value:!0});var nbe=kV(),ibe=UV(),abe=dW(),obe=fW(),hW=mW(),sbe=[nbe.default,ibe.default,(0,abe.default)(),obe.default,hW.metadataVocabulary,hW.contentVocabulary];FO.default=sbe});var yW=z(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});Wy.DiscrError=void 0;var vW;(function(t){t.Tag="tag",t.Mapping="mapping"})(vW||(Wy.DiscrError=vW={}))});var bW=z(WO=>{"use strict";Object.defineProperty(WO,"__esModule",{value:!0});var Zu=Ye(),VO=yW(),_W=Oy(),cbe=$f(),ube=bt(),lbe={message:({params:{discrError:t,tagName:e}})=>t===VO.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Zu._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},dbe={keyword:"discriminator",type:"object",schemaType:"object",error:lbe,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:a}=t,{oneOf:o}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="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=e.let("valid",!1),u=e.const("tag",(0,Zu._)`${r}${(0,Zu.getProperty)(s)}`);e.if((0,Zu._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:VO.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,Zu._)`${u} === ${m}`),e.assign(c,d(p[m]));e.else(),t.error(!1,{discrError:VO.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(p){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(v,Zu.Name),m}function f(){var p;let m={},v=h(i),g=!0;for(let _=0;_<o.length;_++){let x=o[_];if(x?.$ref&&!(0,ube.schemaHasRulesButRef)(x,a.self.RULES)){let k=x.$ref;if(x=_W.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,k),x instanceof _W.SchemaEnv&&(x=x.schema),x===void 0)throw new cbe.default(a.opts.uriResolver,a.baseId,k)}let w=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),b(w,_)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:_}){return Array.isArray(_)&&_.includes(s)}function b(_,x){if(_.const)y(_.const,x);else if(_.enum)for(let w of _.enum)y(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function y(_,x){if(typeof _!="string"||_ in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[_]=x}}}};WO.default=dbe});var xW=z((Q4e,pbe)=>{pbe.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 kW=z((Jt,BO)=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.MissingRefError=Jt.ValidationError=Jt.CodeGen=Jt.Name=Jt.nil=Jt.stringify=Jt.str=Jt._=Jt.KeywordCxt=Jt.Ajv=void 0;var fbe=vV(),mbe=gW(),hbe=bW(),wW=xW(),gbe=["/properties"],By="http://json-schema.org/draft-07/schema",Lu=class extends fbe.default{_addVocabularies(){super._addVocabularies(),mbe.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(hbe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(wW,gbe):wW;this.addMetaSchema(e,By,!1),this.refs["http://json-schema.org/schema"]=By}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(By)?By:void 0)}};Jt.Ajv=Lu;BO.exports=Jt=Lu;BO.exports.Ajv=Lu;Object.defineProperty(Jt,"__esModule",{value:!0});Jt.default=Lu;var vbe=Sf();Object.defineProperty(Jt,"KeywordCxt",{enumerable:!0,get:function(){return vbe.KeywordCxt}});var Fu=Ye();Object.defineProperty(Jt,"_",{enumerable:!0,get:function(){return Fu._}});Object.defineProperty(Jt,"str",{enumerable:!0,get:function(){return Fu.str}});Object.defineProperty(Jt,"stringify",{enumerable:!0,get:function(){return Fu.stringify}});Object.defineProperty(Jt,"nil",{enumerable:!0,get:function(){return Fu.nil}});Object.defineProperty(Jt,"Name",{enumerable:!0,get:function(){return Fu.Name}});Object.defineProperty(Jt,"CodeGen",{enumerable:!0,get:function(){return Fu.CodeGen}});var ybe=Ty();Object.defineProperty(Jt,"ValidationError",{enumerable:!0,get:function(){return ybe.default}});var _be=$f();Object.defineProperty(Jt,"MissingRefError",{enumerable:!0,get:function(){return _be.default}})});var SW=z(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.formatLimitDefinition=void 0;var bbe=kW(),Zi=Ye(),Io=Zi.operators,Ky={formatMaximum:{okStr:"<=",ok:Io.LTE,fail:Io.GT},formatMinimum:{okStr:">=",ok:Io.GTE,fail:Io.LT},formatExclusiveMaximum:{okStr:"<",ok:Io.LT,fail:Io.GTE},formatExclusiveMinimum:{okStr:">",ok:Io.GT,fail:Io.LTE}},xbe={message:({keyword:t,schemaCode:e})=>(0,Zi.str)`should be ${Ky[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Zi._)`{comparison: ${Ky[t].okStr}, limit: ${e}}`};Vu.formatLimitDefinition={keyword:Object.keys(Ky),type:"string",schemaType:"string",$data:!0,error:xbe,code(t){let{gen:e,data:r,schemaCode:n,keyword:i,it:a}=t,{opts:o,self:s}=a;if(!o.validateFormats)return;let c=new bbe.KeywordCxt(a,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let f=e.scopeValue("formats",{ref:s.formats,code:o.code.formats}),p=e.const("fmt",(0,Zi._)`${f}[${c.schemaCode}]`);t.fail$data((0,Zi.or)((0,Zi._)`typeof ${p} != "object"`,(0,Zi._)`${p} instanceof RegExp`,(0,Zi._)`typeof ${p}.compare != "function"`,d(p)))}function l(){let f=c.schema,p=s.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 m=e.scopeValue("formats",{key:f,ref:p,code:o.code.formats?(0,Zi._)`${o.code.formats}${(0,Zi.getProperty)(f)}`:void 0});t.fail$data(d(m))}function d(f){return(0,Zi._)`${f}.compare(${r}, ${n}) ${Ky[i].fail} 0`}},dependencies:["format"]};var wbe=t=>(t.addKeyword(Vu.formatLimitDefinition),t);Vu.default=wbe});var PW=z((Df,EW)=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var Wu=u9(),kbe=SW(),KO=Ye(),$W=new KO.Name("fullFormats"),Sbe=new KO.Name("fastFormats"),HO=(t,e={keywords:!0})=>{if(Array.isArray(e))return IW(t,e,Wu.fullFormats,$W),t;let[r,n]=e.mode==="fast"?[Wu.fastFormats,Sbe]:[Wu.fullFormats,$W],i=e.formats||Wu.formatNames;return IW(t,i,r,n),e.keywords&&(0,kbe.default)(t),t};HO.get=(t,e="full")=>{let n=(e==="fast"?Wu.fastFormats:Wu.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function IW(t,e,r,n){var i,a;(i=(a=t.opts.code).formats)!==null&&i!==void 0||(a.formats=(0,KO._)`require("ajv-formats/dist/formats").${n}`);for(let o of e)t.addFormat(o,r[o])}EW.exports=Df=HO;Object.defineProperty(Df,"__esModule",{value:!0});Df.default=HO});var UW=z((uDe,AW)=>{AW.exports=CW;CW.sync=Pbe;var NW=Tt("fs");function Ebe(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function RW(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:Ebe(e,r)}function CW(t,e,r){NW.stat(t,function(n,i){r(n,n?!1:RW(i,t,e))})}function Pbe(t,e){return RW(NW.statSync(t),t,e)}});var LW=z((lDe,ZW)=>{ZW.exports=MW;MW.sync=Tbe;var DW=Tt("fs");function MW(t,e,r){DW.stat(t,function(n,i){r(n,n?!1:qW(i,e))})}function Tbe(t,e){return qW(DW.statSync(t),e)}function qW(t,e){return t.isFile()&&zbe(t,e)}function zbe(t,e){var r=t.mode,n=t.uid,i=t.gid,a=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),s=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=s|c,d=r&u||r&c&&i===o||r&s&&n===a||r&l&&a===0;return d}});var VW=z((pDe,FW)=>{var dDe=Tt("fs"),Jy;process.platform==="win32"||global.TESTING_WINDOWS?Jy=UW():Jy=LW();FW.exports=GO;GO.sync=Obe;function GO(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){GO(t,e||{},function(a,o){a?i(a):n(o)})})}Jy(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function Obe(t,e){try{return Jy.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var YW=z((fDe,QW)=>{var Bu=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",WW=Tt("path"),jbe=Bu?";":":",BW=VW(),KW=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),HW=(t,e)=>{let r=e.colon||jbe,n=t.match(/\//)||Bu&&t.match(/\\/)?[""]:[...Bu?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=Bu?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=Bu?i.split(r):[""];return Bu&&t.indexOf(".")!==-1&&a[0]!==""&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:i}},GW=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:a}=HW(t,e),o=[],s=u=>new Promise((l,d)=>{if(u===n.length)return e.all&&o.length?l(o):d(KW(t));let f=n[u],p=/^".*"$/.test(f)?f.slice(1,-1):f,m=WW.join(p,t),v=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;l(c(v,u,0))}),c=(u,l,d)=>new Promise((f,p)=>{if(d===i.length)return f(s(l+1));let m=i[d];BW(u+m,{pathExt:a},(v,g)=>{if(!v&&g)if(e.all)o.push(u+m);else return f(u+m);return f(c(u,l,d+1))})});return r?s(0).then(u=>r(null,u),r):s(0)},Nbe=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=HW(t,e),a=[];for(let o=0;o<r.length;o++){let s=r[o],c=/^".*"$/.test(s)?s.slice(1,-1):s,u=WW.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let d=0;d<n.length;d++){let f=l+n[d];try{if(BW.sync(f,{pathExt:i}))if(e.all)a.push(f);else return f}catch{}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw KW(t)};QW.exports=GW;GW.sync=Nbe});var XW=z((mDe,QO)=>{"use strict";var JW=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};QO.exports=JW;QO.exports.default=JW});var n3=z((hDe,r3)=>{"use strict";var e3=Tt("path"),Rbe=YW(),Cbe=XW();function t3(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,a=i&&process.chdir!==void 0&&!process.chdir.disabled;if(a)try{process.chdir(t.options.cwd)}catch{}let o;try{o=Rbe.sync(t.command,{path:r[Cbe({env:r})],pathExt:e?e3.delimiter:void 0})}catch{}finally{a&&process.chdir(n)}return o&&(o=e3.resolve(i?t.options.cwd:"",o)),o}function Abe(t){return t3(t)||t3(t,!0)}r3.exports=Abe});var i3=z((gDe,JO)=>{"use strict";var YO=/([()\][%!^"`<>&|;, *?])/g;function Ube(t){return t=t.replace(YO,"^$1"),t}function Dbe(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(YO,"^$1"),e&&(t=t.replace(YO,"^$1")),t}JO.exports.command=Ube;JO.exports.argument=Dbe});var o3=z((vDe,a3)=>{"use strict";a3.exports=/^#!(.*)/});var c3=z((yDe,s3)=>{"use strict";var Mbe=o3();s3.exports=(t="")=>{let e=t.match(Mbe);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var l3=z((_De,u3)=>{"use strict";var XO=Tt("fs"),qbe=c3();function Zbe(t){let r=Buffer.alloc(150),n;try{n=XO.openSync(t,"r"),XO.readSync(n,r,0,150,0),XO.closeSync(n)}catch{}return qbe(r.toString())}u3.exports=Zbe});var m3=z((bDe,f3)=>{"use strict";var Lbe=Tt("path"),d3=n3(),p3=i3(),Fbe=l3(),Vbe=process.platform==="win32",Wbe=/\.(?:com|exe)$/i,Bbe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Kbe(t){t.file=d3(t);let e=t.file&&Fbe(t.file);return e?(t.args.unshift(t.file),t.command=e,d3(t)):t.file}function Hbe(t){if(!Vbe)return t;let e=Kbe(t),r=!Wbe.test(e);if(t.options.forceShell||r){let n=Bbe.test(e);t.command=Lbe.normalize(t.command),t.command=p3.command(t.command),t.args=t.args.map(a=>p3.argument(a,n));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Gbe(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:Hbe(n)}f3.exports=Gbe});var v3=z((xDe,g3)=>{"use strict";var e1=process.platform==="win32";function t1(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function Qbe(t,e){if(!e1)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let a=h3(i,e);if(a)return r.call(t,"error",a)}return r.apply(t,arguments)}}function h3(t,e){return e1&&t===1&&!e.file?t1(e.original,"spawn"):null}function Ybe(t,e){return e1&&t===1&&!e.file?t1(e.original,"spawnSync"):null}g3.exports={hookChildProcess:Qbe,verifyENOENT:h3,verifyENOENTSync:Ybe,notFoundError:t1}});var b3=z((wDe,Ku)=>{"use strict";var y3=Tt("child_process"),r1=m3(),n1=v3();function _3(t,e,r){let n=r1(t,e,r),i=y3.spawn(n.command,n.args,n.options);return n1.hookChildProcess(i,n),i}function Jbe(t,e,r){let n=r1(t,e,r),i=y3.spawnSync(n.command,n.args,n.options);return i.error=i.error||n1.verifyENOENTSync(i.status,n),i}Ku.exports=_3;Ku.exports.spawn=_3;Ku.exports.sync=Jbe;Ku.exports._parse=r1;Ku.exports._enoent=n1});var Tn=class{constructor(e,r,n=0){this.name=e,this.description=r,this.priority=n}async invoke(e,r={}){throw new Error("AgentStrategy.invoke() must be implemented by subclass")}canHandle(e){throw new Error("AgentStrategy.canHandle() must be implemented by subclass")}getName(){return this.name}getDescription(){return this.description}getPriority(){return this.priority}};import{spawn as k7,execSync as Ko}from"child_process";import{writeFileSync as vU,readFileSync as yU,mkdirSync as _U,existsSync as wd,accessSync as bU,constants as xU,unlinkSync as S7}from"fs";import{join as Si,resolve as $7}from"path";import{homedir as kd}from"os";import Ju from"chalk";var Li={debug:0,info:1,warn:2,error:3,silent:4},u_=class{constructor(){this._level=this._getLogLevel()}_getLogLevel(){if(process.env.ZIBBY_DEBUG==="true")return Li.debug;if(process.env.ZIBBY_VERBOSE==="true")return Li.info;let e=process.env.LOG_LEVEL?.toLowerCase();return e&&e in Li?Li[e]:Li.info}_shouldLog(e){return Li[e]>=this._level}_formatMessage(e,r,n={}){let i=new Date().toISOString(),o=`${this._getPrefix(e)} ${r}`;return Object.keys(n).length>0&&(o+=Ju.dim(` ${JSON.stringify(n)}`)),o}_getPrefix(e){return{debug:Ju.gray("[DEBUG]"),info:Ju.cyan("[INFO]"),warn:Ju.yellow("[WARN]"),error:Ju.red("\u274C [ERROR]")}[e]||""}debug(e,r){this._shouldLog("debug")&&console.log(this._formatMessage("debug",e,r))}info(e,r){this._shouldLog("info")&&console.log(this._formatMessage("info",e,r))}warn(e,r){this._shouldLog("warn")&&console.warn(this._formatMessage("warn",e,r))}error(e,r){this._shouldLog("error")&&console.error(this._formatMessage("error",e,r))}setLevel(e){e in Li&&(this._level=Li[e])}getLevel(){return Object.keys(Li).find(e=>Li[e]===this._level)}},K=new u_;var Br={ASSISTANT:"gpt-5.4-nano-2026-03-17",CLAUDE:"claude-sonnet-4-6",CURSOR:"auto",CODEX:"o4-mini",GEMINI:"gemini-2.5-pro",OPENAI_POSTPROCESSING:"gpt-4o-mini"};var l_={auto:"claude-sonnet-4-6","sonnet-4.6":"claude-sonnet-4-6","sonnet-4-6":"claude-sonnet-4-6","opus-4.6":"claude-opus-4-6","opus-4-6":"claude-opus-4-6","sonnet-4.5":"claude-sonnet-4-5-20250929","sonnet-4-5":"claude-sonnet-4-5-20250929","opus-4.5":"claude-opus-4-20250514","opus-4-5":"claude-opus-4-20250514","claude-sonnet-4-6":"claude-sonnet-4-6","claude-opus-4-6":"claude-opus-4-6","claude-sonnet-4-5-20250929":"claude-sonnet-4-5-20250929","claude-opus-4-20250514":"claude-opus-4-20250514"},d_={auto:"o4-mini","o4-mini":"o4-mini",o3:"o3","o3-mini":"o3-mini","codex-mini":"codex-mini-latest","gpt-4o":"gpt-4o","gpt-4o-mini":"gpt-4o-mini","gpt-5.2-codex":"gpt-5.2-codex","gpt-5.2":"gpt-5.2","gpt-5.3":"gpt-5.3","gpt-5.4":"gpt-5.4"},u1={auto:"gemini-2.5-pro","gemini-2.5-pro":"gemini-2.5-pro","gemini-2.5-flash":"gemini-2.5-flash"},qf={CURSOR_AGENT_DEFAULT:1200*1e3,OPENAI_REQUEST:18e4};var l1=".zibby/output";var d1=".session-info.json",p1=".zibby-studio-stop";Eo();var As=class t{constructor(){this.buffer="",this.extractedResult=null,this.rawText="",this.zodSchema=null,this.lastOutputLength=0,this.onToolCall=null,this._lastToolEmit=null}processChunk(e){if(!e)return null;this.buffer+=e;let r=this.buffer.split(`
|
|
27
|
+
`);this.buffer=r.pop()||"";let n="";for(let i of r)if(i.trim())try{let a=JSON.parse(i);this._emitToolCalls(a);let o=this.extractText(a);if(o){if(this.rawText&&o.startsWith(this.rawText)){let s=o.substring(this.rawText.length);this.rawText=o,n+=s}else(!this.rawText.includes(o)||o.length<20)&&(this.rawText+=o,n+=o);this.tryExtractResult(this.rawText)}else this.isValidResult(a)&&(this.rawText+=`${i}
|
|
28
|
+
`,n+=`${i}
|
|
29
|
+
`,this.extractedResult=a)}catch{if(i.includes('"text"')||i.includes('"content"')){let o=i.match(/"text"\s*:\s*"([^"]*)/),s=i.match(/"content"\s*:\s*"([^"]*)/),c=o?o[1]:s?s[1]:null;c&&!this.rawText.includes(c)&&(n+=c,this.rawText+=c)}}return n||null}flush(){if(!this.buffer.trim())return null;let e="";try{let r=JSON.parse(this.buffer);this._emitToolCalls(r);let n=this.extractText(r);n&&(this.rawText+=n,e+=n,this.tryExtractResult(n))}catch{this.rawText+=this.buffer,e+=this.buffer,this.tryExtractResult(this.buffer)}return this.buffer="",e||null}_emitToolCalls(e){if(!this.onToolCall)return;let r=(o,s)=>{if(!o)return;let c=`${o}:${JSON.stringify(s??{})}`;this._lastToolEmit!==c&&(this._lastToolEmit=c,this.onToolCall(o,s??void 0))},n=o=>{if(o!=null){if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{return JSON.parse(o)}catch{return}}};if(e.type==="tool_use"||e.type==="tool_call"){if(e.name){r(e.name,n(e.input??e.arguments));return}let o=e.tool_call;if(o&&typeof o=="object"&&!Array.isArray(o)){let s=Object.keys(o);if(s.length===1){let c=s[0],u=o[c],l=u&&typeof u=="object"?u.args??u.input??u:void 0;r(c,n(l))}return}return}if(Array.isArray(e.tool_calls)){for(let o of e.tool_calls)r(o.name,n(o.input??o.arguments));return}let i=e.message??e;if(Array.isArray(i?.tool_calls)){for(let o of i.tool_calls)r(o.name,n(o.input??o.arguments));return}let a=i?.content??e.content;if(Array.isArray(a))for(let o of a)(o.type==="tool_use"||o.type==="tool_call")&&o.name&&r(o.name,n(o.input??o.arguments))}extractText(e){if(e.type==="assistant"&&e.message?.content){let r=e.message.content;if(Array.isArray(r))return r.filter(n=>n.type==="text"&&n.text).map(n=>n.text).join("")}return e.type==="thinking"&&e.text||e.text?e.text:e.content&&typeof e.content=="string"?e.content:e.delta?e.delta:null}tryExtractResult(e){if(!e||typeof e!="string")return;let r=[],n=/```json\s*\n?([\s\S]*?)\n?```/g,i;for(;(i=n.exec(e))!==null;){let d=i[1].trim();try{JSON.parse(d),r.push({text:d,source:"markdown"})}catch{}}let a=0,o=0;for(;a<e.length&&(a=e.indexOf("{",a),a!==-1);){let d=0,f=a;for(let p=a;p<e.length;p++)if(e[p]==="{")d++;else if(e[p]==="}"&&(d--,d===0)){f=p,r.push({text:e.substring(a,f+1),source:"brace"}),o++;break}a=f+1}let s=this.extractedResult,c=s?JSON.stringify(s).length:0,u=0,l=-1;for(let d=0;d<r.length;d++){let f=r[d];try{let p=f.text.replace(/,(\s*[}\]])/g,"$1"),m=JSON.parse(p);this.isValidResult(m)&&(u++,c=JSON.stringify(m).length,s=m,l=d)}catch{}}s&&(this.extractedResult=s)}isValidResult(e){if(!e||typeof e!="object"||Array.isArray(e)||e.session_id||e.timestamp_ms||e.type||e.call_id||e.tool_call||e.result&&typeof e.result=="object"&&(e.result.success&&typeof e.result.success=="object"||e.result.error&&typeof e.result.error=="object")||e.args&&typeof e.args=="object")return!1;if(this.zodSchema)try{return this.zodSchema.parse(e),!0}catch{return!1}return!0}getResult(){return this.extractedResult}getRawText(){return this.rawText}static extractResult(e,r=null){let n=new t;n.zodSchema=r,n.processChunk(e),n.flush();let i=n.getResult();return!i&&process.env.LOG_LEVEL==="debug"&&console.error("[StreamingParser] No result extracted from",e?.length||0,"chars"),i}};zo();var Js=class{static generateFileOutputInstructions(e,r){let n;typeof e?.parse=="function"?n=Gn(e,{target:"openApi3"}):n=e;let i=this._buildExample(n);return`
|
|
30
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
31
|
+
\u{1F6A8} MANDATORY: WRITE RESULT TO FILE \u{1F6A8}
|
|
32
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
33
|
+
You MUST write your final result as pure JSON to this EXACT file path:
|
|
4
34
|
|
|
5
|
-
|
|
35
|
+
${r}
|
|
36
|
+
|
|
37
|
+
Use your file writing tool (WriteFile or ApplyPatch) to create this file.
|
|
38
|
+
DO NOT just output JSON to stdout. The file MUST exist when you finish.
|
|
39
|
+
DO NOT skip this step. The workflow WILL FAIL if the file is missing.
|
|
40
|
+
|
|
41
|
+
Required JSON structure:
|
|
42
|
+
${JSON.stringify(i,null,2)}
|
|
43
|
+
|
|
44
|
+
JSON types (strict \u2014 validators reject wrong types):
|
|
45
|
+
- Use bare JSON numbers for numeric fields (e.g. 3000). Do NOT quote them as strings (wrong: "3000").
|
|
46
|
+
- Use true/false without quotes for booleans.
|
|
47
|
+
- Use unquoted null where a field may be null.
|
|
48
|
+
|
|
49
|
+
Rules: valid JSON only, no markdown wrapping, no extra text in the file.`}static _buildExample(e){if(!e)return{};let r=e.type;if(r==="object"&&e.properties){let n={};for(let[i,a]of Object.entries(e.properties))n[i]=this._buildExample(a);return n}if(r==="array"&&e.items)return[this._buildExample(e.items)];if(r==="string")return"<string>";if(r==="number"||r==="integer")return 0;if(r==="boolean")return!1;if(e.description)return`<${e.description}>`;if(e.nullable||e.oneOf||e.anyOf){let n=e.oneOf?.find(i=>i.type!=="null")||e.anyOf?.find(i=>i.type!=="null");return n?this._buildExample(n):null}return"<value>"}};function yl(t,e){return function(){return t.apply(e,arguments)}}var{toString:_B}=Object.prototype,{getPrototypeOf:zb}=Object,{iterator:tm,toStringTag:T1}=Symbol,rm=(t=>e=>{let r=_B.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),bi=t=>(t=t.toLowerCase(),e=>rm(e)===t),nm=t=>e=>typeof e===t,{isArray:ec}=Array,Xs=nm("undefined");function _l(t){return t!==null&&!Xs(t)&&t.constructor!==null&&!Xs(t.constructor)&&dn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var z1=bi("ArrayBuffer");function bB(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&z1(t.buffer),e}var xB=nm("string"),dn=nm("function"),O1=nm("number"),bl=t=>t!==null&&typeof t=="object",wB=t=>t===!0||t===!1,em=t=>{if(rm(t)!=="object")return!1;let e=zb(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(T1 in t)&&!(tm in t)},kB=t=>{if(!bl(t)||_l(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},SB=bi("Date"),$B=bi("File"),IB=t=>!!(t&&typeof t.uri<"u"),EB=t=>t&&typeof t.getParts<"u",PB=bi("Blob"),TB=bi("FileList"),zB=t=>bl(t)&&dn(t.pipe);function OB(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var I1=OB(),E1=typeof I1.FormData<"u"?I1.FormData:void 0,jB=t=>{let e;return t&&(E1&&t instanceof E1||dn(t.append)&&((e=rm(t))==="formdata"||e==="object"&&dn(t.toString)&&t.toString()==="[object FormData]"))},NB=bi("URLSearchParams"),[RB,CB,AB,UB]=["ReadableStream","Request","Response","Headers"].map(bi),DB=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xl(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),ec(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(_l(t))return;let a=r?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length,s;for(n=0;n<o;n++)s=a[n],e.call(null,t[s],s,t)}}function j1(t,e){if(_l(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}var Oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,N1=t=>!Xs(t)&&t!==Oo;function Tb(){let{caseless:t,skipUndefined:e}=N1(this)&&this||{},r={},n=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let o=t&&j1(r,a)||a;em(r[o])&&em(i)?r[o]=Tb(r[o],i):em(i)?r[o]=Tb({},i):ec(i)?r[o]=i.slice():(!e||!Xs(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&xl(arguments[i],n);return r}var MB=(t,e,r,{allOwnKeys:n}={})=>(xl(e,(i,a)=>{r&&dn(i)?Object.defineProperty(t,a,{value:yl(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,a,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),qB=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ZB=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},LB=(t,e,r,n)=>{let i,a,o,s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),a=i.length;a-- >0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&zb(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},FB=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},VB=t=>{if(!t)return null;if(ec(t))return t;let e=t.length;if(!O1(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},WB=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&zb(Uint8Array)),BB=(t,e)=>{let n=(t&&t[tm]).call(t),i;for(;(i=n.next())&&!i.done;){let a=i.value;e.call(t,a[0],a[1])}},KB=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},HB=bi("HTMLFormElement"),GB=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),P1=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),QB=bi("RegExp"),R1=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};xl(r,(i,a)=>{let o;(o=e(i,a,t))!==!1&&(n[a]=o||i)}),Object.defineProperties(t,n)},YB=t=>{R1(t,(e,r)=>{if(dn(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(dn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},JB=(t,e)=>{let r={},n=i=>{i.forEach(a=>{r[a]=!0})};return ec(t)?n(t):n(String(t).split(e)),r},XB=()=>{},eK=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function tK(t){return!!(t&&dn(t.append)&&t[T1]==="FormData"&&t[tm])}var rK=t=>{let e=new Array(10),r=(n,i)=>{if(bl(n)){if(e.indexOf(n)>=0)return;if(_l(n))return n;if(!("toJSON"in n)){e[i]=n;let a=ec(n)?[]:{};return xl(n,(o,s)=>{let c=r(o,i+1);!Xs(c)&&(a[s]=c)}),e[i]=void 0,a}}return n};return r(t,0)},nK=bi("AsyncFunction"),iK=t=>t&&(bl(t)||dn(t))&&dn(t.then)&&dn(t.catch),C1=((t,e)=>t?setImmediate:e?((r,n)=>(Oo.addEventListener("message",({source:i,data:a})=>{i===Oo&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Oo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",dn(Oo.postMessage)),aK=typeof queueMicrotask<"u"?queueMicrotask.bind(Oo):typeof process<"u"&&process.nextTick||C1,oK=t=>t!=null&&dn(t[tm]),O={isArray:ec,isArrayBuffer:z1,isBuffer:_l,isFormData:jB,isArrayBufferView:bB,isString:xB,isNumber:O1,isBoolean:wB,isObject:bl,isPlainObject:em,isEmptyObject:kB,isReadableStream:RB,isRequest:CB,isResponse:AB,isHeaders:UB,isUndefined:Xs,isDate:SB,isFile:$B,isReactNativeBlob:IB,isReactNative:EB,isBlob:PB,isRegExp:QB,isFunction:dn,isStream:zB,isURLSearchParams:NB,isTypedArray:WB,isFileList:TB,forEach:xl,merge:Tb,extend:MB,trim:DB,stripBOM:qB,inherits:ZB,toFlatObject:LB,kindOf:rm,kindOfTest:bi,endsWith:FB,toArray:VB,forEachEntry:BB,matchAll:KB,isHTMLForm:HB,hasOwnProperty:P1,hasOwnProp:P1,reduceDescriptors:R1,freezeMethods:YB,toObjectSet:JB,toCamelCase:GB,noop:XB,toFiniteNumber:eK,findKey:j1,global:Oo,isContextDefined:N1,isSpecCompliantForm:tK,toJSONObject:rK,isAsyncFn:nK,isThenable:iK,setImmediate:C1,asap:aK,isIterable:oK};var Qr=class t extends Error{static from(e,r,n,i,a,o){let s=new t(e.message,r||e.code,n,i,a);return s.cause=e,s.name=e.name,e.status!=null&&s.status==null&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,r,n,i,a){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}};Qr.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Qr.ERR_BAD_OPTION="ERR_BAD_OPTION";Qr.ECONNABORTED="ECONNABORTED";Qr.ETIMEDOUT="ETIMEDOUT";Qr.ERR_NETWORK="ERR_NETWORK";Qr.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Qr.ERR_DEPRECATED="ERR_DEPRECATED";Qr.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Qr.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Qr.ERR_CANCELED="ERR_CANCELED";Qr.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Qr.ERR_INVALID_URL="ERR_INVALID_URL";var ie=Qr;var MN=Yu(DN(),1),mm=MN.default;function Yb(t){return O.isPlainObject(t)||O.isArray(t)}function qN(t){return O.endsWith(t,"[]")?t.slice(0,-2):t}function Qb(t,e,r){return t?t.concat(e).map(function(i,a){return i=qN(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function WH(t){return O.isArray(t)&&!t.some(Yb)}var BH=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function KH(t,e,r){if(!O.isObject(t))throw new TypeError("target must be an object");e=e||new(mm||FormData),r=O.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!O.isUndefined(g[v])});let n=r.metaTokens,i=r.visitor||l,a=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(O.isDate(m))return m.toISOString();if(O.isBoolean(m))return m.toString();if(!c&&O.isBlob(m))throw new ie("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(m)||O.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,v,g){let h=m;if(O.isReactNative(e)&&O.isReactNativeBlob(m))return e.append(Qb(g,v,a),u(m)),!1;if(m&&!g&&typeof m=="object"){if(O.endsWith(v,"{}"))v=n?v:v.slice(0,-2),m=JSON.stringify(m);else if(O.isArray(m)&&WH(m)||(O.isFileList(m)||O.endsWith(v,"[]"))&&(h=O.toArray(m)))return v=qN(v),h.forEach(function(y,_){!(O.isUndefined(y)||y===null)&&e.append(o===!0?Qb([v],_,a):o===null?v:v+"[]",u(y))}),!1}return Yb(m)?!0:(e.append(Qb(g,v,a),u(m)),!1)}let d=[],f=Object.assign(BH,{defaultVisitor:l,convertValue:u,isVisitable:Yb});function p(m,v){if(!O.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(m),O.forEach(m,function(h,b){(!(O.isUndefined(h)||h===null)&&i.call(e,h,O.isString(b)?b.trim():b,v,f))===!0&&p(h,v?v.concat(b):[b])}),d.pop()}}if(!O.isObject(t))throw new TypeError("data must be an object");return p(t),e}var La=KH;function ZN(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function LN(t,e){this._pairs=[],t&&La(t,this,e)}var FN=LN.prototype;FN.append=function(e,r){this._pairs.push([e,r])};FN.toString=function(e){let r=e?function(n){return e.call(this,n,ZN)}:ZN;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var VN=LN;function HH(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function No(t,e,r){if(!e)return t;let n=r&&r.encode||HH,i=O.isFunction(r)?{serialize:r}:r,a=i&&i.serialize,o;if(a?o=a(e,i):o=O.isURLSearchParams(e)?e.toString():new VN(e,i).toString(n),o){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}var Jb=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(n){n!==null&&e(n)})}},Xb=Jb;var Fa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import QH from"crypto";import GH from"url";var WN=GH.URLSearchParams;var ex="abcdefghijklmnopqrstuvwxyz",BN="0123456789",KN={DIGIT:BN,ALPHA:ex,ALPHA_DIGIT:ex+ex.toUpperCase()+BN},YH=(t=16,e=KN.ALPHA_DIGIT)=>{let r="",{length:n}=e,i=new Uint32Array(t);QH.randomFillSync(i);for(let a=0;a<t;a++)r+=e[i[a]%n];return r},HN={isNode:!0,classes:{URLSearchParams:WN,FormData:mm,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:KN,generateString:YH,protocols:["http","https","file","data"]};var nx={};aa(nx,{hasBrowserEnv:()=>rx,hasStandardBrowserEnv:()=>JH,hasStandardBrowserWebWorkerEnv:()=>XH,navigator:()=>tx,origin:()=>eG});var rx=typeof window<"u"&&typeof document<"u",tx=typeof navigator=="object"&&navigator||void 0,JH=rx&&(!tx||["ReactNative","NativeScript","NS"].indexOf(tx.product)<0),XH=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eG=rx&&window.location.href||"http://localhost";var It={...nx,...HN};function ix(t,e){return La(t,new It.classes.URLSearchParams,{visitor:function(r,n,i,a){return It.isNode&&O.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function tG(t){return O.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function rG(t){let e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n<i;n++)a=r[n],e[a]=t[a];return e}function nG(t){function e(r,n,i,a){let o=r[a++];if(o==="__proto__")return!0;let s=Number.isFinite(+o),c=a>=r.length;return o=!o&&O.isArray(i)?i.length:o,c?(O.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!O.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],a)&&O.isArray(i[o])&&(i[o]=rG(i[o])),!s)}if(O.isFormData(t)&&O.isFunction(t.entries)){let r={};return O.forEachEntry(t,(n,i)=>{e(tG(n),i,r,0)}),r}return null}var hm=nG;function iG(t,e,r){if(O.isString(t))try{return(e||JSON.parse)(t),O.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var ax={transitional:Fa,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=O.isObject(e);if(a&&O.isHTMLForm(e)&&(e=new FormData(e)),O.isFormData(e))return i?JSON.stringify(hm(e)):e;if(O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e)||O.isReadableStream(e))return e;if(O.isArrayBufferView(e))return e.buffer;if(O.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ix(e,this.formSerializer).toString();if((s=O.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return La(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),iG(e)):e}],transformResponse:[function(e){let r=this.transitional||ax.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(O.isResponse(e)||O.isReadableStream(e))return e;if(e&&O.isString(e)&&(n&&!this.responseType||i)){let o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?ie.from(s,ie.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],t=>{ax.headers[t]={}});var ac=ax;var aG=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),GN=t=>{let e={},r,n,i;return t&&t.split(`
|
|
50
|
+
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&aG[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};var QN=Symbol("internals"),oG=t=>!/[\r\n]/.test(t);function YN(t,e){if(!(t===!1||t==null)){if(O.isArray(t)){t.forEach(r=>YN(r,e));return}if(!oG(String(t)))throw new Error(`Invalid character in header content ["${e}"]`)}}function Il(t){return t&&String(t).trim().toLowerCase()}function sG(t){let e=t.length;for(;e>0;){let r=t.charCodeAt(e-1);if(r!==10&&r!==13)break;e-=1}return e===t.length?t:t.slice(0,e)}function gm(t){return t===!1||t==null?t:O.isArray(t)?t.map(gm):sG(String(t))}function cG(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var uG=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ox(t,e,r,n,i){if(O.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!O.isString(e)){if(O.isString(n))return e.indexOf(n)!==-1;if(O.isRegExp(n))return n.test(e)}}function lG(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function dG(t,e){let r=O.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,a,o){return this[n].call(this,e,i,a,o)},configurable:!0})})}var oc=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function a(s,c,u){let l=Il(c);if(!l)throw new Error("header name must be a non-empty string");let d=O.findKey(i,l);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(YN(s,c),i[d||c]=gm(s))}let o=(s,c)=>O.forEach(s,(u,l)=>a(u,l,c));if(O.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(O.isString(e)&&(e=e.trim())&&!uG(e))o(GN(e),r);else if(O.isObject(e)&&O.isIterable(e)){let s={},c,u;for(let l of e){if(!O.isArray(l))throw TypeError("Object iterator must return a key-value pair");s[u=l[0]]=(c=s[u])?O.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}o(s,r)}else e!=null&&a(r,e,n);return this}get(e,r){if(e=Il(e),e){let n=O.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return cG(i);if(O.isFunction(r))return r.call(this,i,n);if(O.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Il(e),e){let n=O.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||ox(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function a(o){if(o=Il(o),o){let s=O.findKey(n,o);s&&(!r||ox(n,n[s],s,r))&&(delete n[s],i=!0)}}return O.isArray(e)?e.forEach(a):a(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let a=r[n];(!e||ox(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){let r=this,n={};return O.forEach(this,(i,a)=>{let o=O.findKey(n,a);if(o){r[o]=gm(i),delete r[a];return}let s=e?lG(a):String(a).trim();s!==a&&delete r[a],r[s]=gm(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return O.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&O.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
51
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[QN]=this[QN]={accessors:{}}).accessors,i=this.prototype;function a(o){let s=Il(o);n[s]||(dG(i,o),n[s]=!0)}return O.isArray(e)?e.forEach(a):a(e),this}};oc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(oc.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});O.freezeMethods(oc);var tr=oc;function El(t,e){let r=this||ac,n=e||r,i=tr.from(n.headers),a=n.data;return O.forEach(t,function(s){a=s.call(r,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function Pl(t){return!!(t&&t.__CANCEL__)}var sx=class extends ie{constructor(e,r,n){super(e??"canceled",ie.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},jn=sx;function Vi(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new ie("Request failed with status code "+r.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function cx(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ux(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ro(t,e,r){let n=!cx(e);return t&&(n||r==!1)?ux(t,e):e}var pG={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function fG(t){try{return new URL(t)}catch{return null}}function JN(t){var e=(typeof t=="string"?fG(t):t)||{},r=e.protocol,n=e.host,i=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||pG[r]||0,!mG(n,i)))return"";var a=lx(r+"_proxy")||lx("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function mG(t,e){var r=lx("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),a=i?i[1]:n,o=i?parseInt(i[2]):0;return o&&o!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!t.endsWith(a)):t!==a}):!0}function lx(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var jR=Yu(vR(),1);import p5 from"http";import f5 from"https";import zR from"http2";import OR from"util";import Ba from"zlib";var Do="1.15.0";function Nl(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var YG=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ex(t,e,r){let n=r&&r.Blob||It.classes.Blob,i=Nl(t);if(e===void 0&&n&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let a=YG.exec(t);if(!a)throw new ie("Invalid URL",ie.ERR_INVALID_URL);let o=a[1],s=a[2],c=a[3],u=Buffer.from(decodeURIComponent(c),s?"base64":"utf8");if(e){if(!n)throw new ie("Blob is not supported",ie.ERR_NOT_SUPPORT);return new n([u],{type:o})}return u}throw new ie("Unsupported protocol "+i,ie.ERR_NOT_SUPPORT)}import Wa from"stream";import JG from"stream";var Px=Symbol("internals"),Tx=class extends JG.Transform{constructor(e){e=O.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,i)=>!O.isUndefined(i[n])),super({readableHighWaterMark:e.chunkSize});let r=this[Px]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(e){let r=this[Px];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let i=this[Px],a=i.maxRate,o=this.readableHighWaterMark,s=i.timeWindow,c=1e3/s,u=a/c,l=i.minChunkSize!==!1?Math.max(i.minChunkSize,u*.01):0,d=(p,m)=>{let v=Buffer.byteLength(p);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(p)?process.nextTick(m):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(m)}},f=(p,m)=>{let v=Buffer.byteLength(p),g=null,h=o,b,y=0;if(a){let _=Date.now();(!i.ts||(y=_-i.ts)>=s)&&(i.ts=_,b=u-i.bytes,i.bytes=b<0?-b:0,y=0),b=u-i.bytes}if(a){if(b<=0)return setTimeout(()=>{m(null,p)},s-y);b<h&&(h=b)}h&&v>h&&v-h>l&&(g=p.subarray(h),p=p.subarray(0,h)),d(p,g?()=>{process.nextTick(m,null,g)}:m)};f(e,function p(m,v){if(m)return n(m);v?f(v,p):n(null)})}},zx=Tx;import{EventEmitter as m5}from"events";import e5 from"util";import{Readable as t5}from"stream";var{asyncIterator:yR}=Symbol,XG=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[yR]?yield*t[yR]():yield t},xm=XG;var r5=It.ALPHABET.ALPHA_DIGIT+"-_",Rl=typeof TextEncoder=="function"?new TextEncoder:new e5.TextEncoder,Mo=`\r
|
|
52
|
+
`,n5=Rl.encode(Mo),i5=2,Ox=class{constructor(e,r){let{escapeName:n}=this.constructor,i=O.isString(r),a=`Content-Disposition: form-data; name="${n(e)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Mo}`;i?r=Rl.encode(String(r).replace(/\r?\n|\r\n?/g,Mo)):a+=`Content-Type: ${r.type||"application/octet-stream"}${Mo}`,this.headers=Rl.encode(a+Mo),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+i5,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;O.isTypedArray(e)?yield e:yield*xm(e),yield n5}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},a5=(t,e,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:a=n+"-"+It.generateString(i,r5)}=r||{};if(!O.isFormData(t))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let o=Rl.encode("--"+a+Mo),s=Rl.encode("--"+a+"--"+Mo),c=s.byteLength,u=Array.from(t.entries()).map(([d,f])=>{let p=new Ox(d,f);return c+=p.size,p});c+=o.byteLength*u.length,c=O.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(l["Content-Length"]=c),e&&e(l),t5.from((async function*(){for(let d of u)yield o,yield*d.encode();yield s})())},_R=a5;import o5 from"stream";var jx=class extends o5.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(e,r,n)}},bR=jx;var s5=(t,e)=>O.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(i=>{try{e?n(null,...e(i)):n(null,i)}catch(a){n(a)}},n)}:t,xR=s5;var c5={http:80,https:443,ws:80,wss:443,ftp:21},u5=t=>{let e=t,r=0;if(e.charAt(0)==="["){let a=e.indexOf("]");if(a!==-1){let o=e.slice(1,a),s=e.slice(a+1);return s.charAt(0)===":"&&/^\d+$/.test(s.slice(1))&&(r=Number.parseInt(s.slice(1),10)),[o,r]}}let n=e.indexOf(":"),i=e.lastIndexOf(":");return n!==-1&&n===i&&/^\d+$/.test(e.slice(i+1))&&(r=Number.parseInt(e.slice(i+1),10),e=e.slice(0,i)),[e,r]},wR=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t.replace(/\.+$/,""));function Nx(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||c5[e.protocol.split(":",1)[0]]||0,i=wR(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(a=>{if(!a)return!1;let[o,s]=u5(a);return o=wR(o),!o||s&&s!==n?!1:(o.charAt(0)==="*"&&(o=o.slice(1)),o.charAt(0)==="."?i.endsWith(o):i===o)})}function l5(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,a=0,o;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),l=n[a];o||(o=u),r[i]=c,n[i]=u;let d=a,f=0;for(;d!==i;)f+=r[d++],d=d%t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o<e)return;let p=l&&u-l;return p?Math.round(f*1e3/p):void 0}}var kR=l5;function d5(t,e){let r=0,n=1e3/e,i,a,o=(u,l=Date.now())=>{r=l,i=null,a&&(clearTimeout(a),a=null),t(...u)};return[(...u)=>{let l=Date.now(),d=l-r;d>=n?o(u,l):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-d)))},()=>i&&o(i)]}var SR=d5;var la=(t,e,r=3)=>{let n=0,i=kR(50,250);return SR(a=>{let o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-n,u=i(c),l=o<=s;n=o;let d={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&l?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},r)},lc=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},dc=t=>(...e)=>O.asap(()=>t(...e));function Rx(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let r=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(r)){let a=n.length,o=n.length;for(let f=0;f<o;f++)if(n.charCodeAt(f)===37&&f+2<o){let p=n.charCodeAt(f+1),m=n.charCodeAt(f+2);(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(a-=2,f+=2)}let s=0,c=o-1,u=f=>f>=2&&n.charCodeAt(f-2)===37&&n.charCodeAt(f-1)===51&&(n.charCodeAt(f)===68||n.charCodeAt(f)===100);c>=0&&(n.charCodeAt(c)===61?(s++,c--):u(c)&&(s++,c-=3)),s===1&&c>=0&&(n.charCodeAt(c)===61||u(c))&&s++;let d=Math.floor(a/4)*3-(s||0);return d>0?d:0}return Buffer.byteLength(n,"utf8")}var $R={flush:Ba.constants.Z_SYNC_FLUSH,finishFlush:Ba.constants.Z_SYNC_FLUSH},h5={flush:Ba.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ba.constants.BROTLI_OPERATION_FLUSH},IR=O.isFunction(Ba.createBrotliDecompress),{http:g5,https:v5}=jR.default,y5=/https:?/,ER=It.protocols.map(t=>t+":"),PR=(t,[e,r])=>(t.on("end",r).on("error",r),e),Cx=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let l=n.length;for(let d=0;d<l;d++){let[f,p]=n[d];if(!f.destroyed&&!f.closed&&OR.isDeepStrictEqual(p,r))return f}}let i=zR.connect(e,r),a,o=()=>{if(a)return;a=!0;let l=n,d=l.length,f=d;for(;f--;)if(l[f][0]===i){d===1?delete this.sessions[e]:l.splice(f,1),i.closed||i.close();return}},s=i.request,{sessionTimeout:c}=r;if(c!=null){let l,d=0;i.request=function(){let f=s.apply(this,arguments);return d++,l&&(clearTimeout(l),l=null),f.once("close",()=>{--d||(l=setTimeout(()=>{l=null,o()},c))}),f}}i.once("close",o);let u=[i,r];return n?n.push(u):n=this.sessions[e]=[u],i}},_5=new Cx;function b5(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function NR(t,e,r){let n=e;if(!n&&n!==!1){let i=JN(r);i&&(Nx(r)||(n=new URL(i)))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){if(!!(n.auth.username||n.auth.password))n.auth=(n.auth.username||"")+":"+(n.auth.password||"");else if(typeof n.auth=="object")throw new ie("Invalid proxy authorization",ie.ERR_BAD_OPTION,{proxy:n});let o=Buffer.from(n.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+o}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=n.hostname||n.host;t.hostname=i,t.host=i,t.port=n.port,t.path=r,n.protocol&&(t.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}t.beforeRedirects.proxy=function(a){NR(a,e,a.href)}}var x5=typeof process<"u"&&O.kindOf(process)==="process",w5=t=>new Promise((e,r)=>{let n,i,a=(c,u)=>{i||(i=!0,n&&n(c,u))},o=c=>{a(c),e(c)},s=c=>{a(c,!0),r(c)};t(o,s,c=>n=c).catch(s)}),k5=({address:t,family:e})=>{if(!O.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},TR=(t,e)=>k5(O.isObject(t)?t:{address:t,family:e}),S5={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:i}=t,a=_5.getSession(r,n),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=zR.constants,l={[o]:t.protocol.replace(":",""),[s]:t.method,[c]:t.path};O.forEach(i,(f,p)=>{p.charAt(0)!==":"&&(l[p]=f)});let d=a.request(l);return d.once("response",f=>{let p=d;f=Object.assign({},f);let m=f[u];delete f[u],p.headers=f,p.statusCode=+m,e(p)}),d}},RR=x5&&function(e){return w5(async function(n,i,a){let{data:o,lookup:s,family:c,httpVersion:u=1,http2Options:l}=e,{responseType:d,responseEncoding:f}=e,p=e.method.toUpperCase(),m,v=!1,g;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let h=u===2;if(s){let W=xR(s,I=>O.isArray(I)?I:[I]);s=(I,V,R)=>{W(I,V,(S,E,B)=>{if(S)return R(S);let ae=O.isArray(E)?E.map(he=>TR(he)):[TR(E,B)];V.all?R(S,ae):R(S,ae[0].address,ae[0].family)})}}let b=new m5;function y(W){try{b.emit("abort",!W||W.type?new jn(null,e,g):W)}catch(I){console.warn("emit error",I)}}b.once("abort",i);let _=()=>{e.cancelToken&&e.cancelToken.unsubscribe(y),e.signal&&e.signal.removeEventListener("abort",y),b.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(y),e.signal&&(e.signal.aborted?y():e.signal.addEventListener("abort",y))),a((W,I)=>{if(m=!0,I){v=!0,_();return}let{data:V}=W;if(V instanceof Wa.Readable||V instanceof Wa.Duplex){let R=Wa.finished(V,()=>{R(),_()})}else _()});let x=Ro(e.baseURL,e.url,e.allowAbsoluteUrls),w=new URL(x,It.hasBrowserEnv?It.origin:void 0),k=w.protocol||ER[0];if(k==="data:"){if(e.maxContentLength>-1){let I=String(e.url||x||"");if(Rx(I)>e.maxContentLength)return i(new ie("maxContentLength size of "+e.maxContentLength+" exceeded",ie.ERR_BAD_RESPONSE,e))}let W;if(p!=="GET")return Vi(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=Ex(e.url,d==="blob",{Blob:e.env&&e.env.Blob})}catch(I){throw ie.from(I,ie.ERR_BAD_REQUEST,e)}return d==="text"?(W=W.toString(f),(!f||f==="utf8")&&(W=O.stripBOM(W))):d==="stream"&&(W=Wa.Readable.from(W)),Vi(n,i,{data:W,status:200,statusText:"OK",headers:new tr,config:e})}if(ER.indexOf(k)===-1)return i(new ie("Unsupported protocol "+k,ie.ERR_BAD_REQUEST,e));let $=tr.from(e.headers).normalize();$.set("User-Agent","axios/"+Do,!1);let{onUploadProgress:P,onDownloadProgress:C}=e,T=e.maxRate,D,Z;if(O.isSpecCompliantForm(o)){let W=$.getContentType(/boundary=([-_\w\d]{10,70})/i);o=_R(o,I=>{$.set(I)},{tag:`axios-${Do}-boundary`,boundary:W&&W[1]||void 0})}else if(O.isFormData(o)&&O.isFunction(o.getHeaders)){if($.set(o.getHeaders()),!$.hasContentLength())try{let W=await OR.promisify(o.getLength).call(o);Number.isFinite(W)&&W>=0&&$.setContentLength(W)}catch{}}else if(O.isBlob(o)||O.isFile(o))o.size&&$.setContentType(o.type||"application/octet-stream"),$.setContentLength(o.size||0),o=Wa.Readable.from(xm(o));else if(o&&!O.isStream(o)){if(!Buffer.isBuffer(o))if(O.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(O.isString(o))o=Buffer.from(o,"utf-8");else return i(new ie("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ie.ERR_BAD_REQUEST,e));if($.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return i(new ie("Request body larger than maxBodyLength limit",ie.ERR_BAD_REQUEST,e))}let N=O.toFiniteNumber($.getContentLength());O.isArray(T)?(D=T[0],Z=T[1]):D=Z=T,o&&(P||D)&&(O.isStream(o)||(o=Wa.Readable.from(o,{objectMode:!1})),o=Wa.pipeline([o,new zx({maxRate:O.toFiniteNumber(D)})],O.noop),P&&o.on("progress",PR(o,lc(N,la(dc(P),!1,3)))));let ee;if(e.auth){let W=e.auth.username||"",I=e.auth.password||"";ee=W+":"+I}if(!ee&&w.username){let W=w.username,I=w.password;ee=W+":"+I}ee&&$.delete("authorization");let H;try{H=No(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(W){let I=new Error(W.message);return I.config=e,I.url=e.url,I.exists=!0,i(I)}$.set("Accept-Encoding","gzip, compress, deflate"+(IR?", br":""),!1);let ge={path:H,method:p,headers:$.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:ee,protocol:k,family:c,beforeRedirect:b5,beforeRedirects:{},http2Options:l};!O.isUndefined(s)&&(ge.lookup=s),e.socketPath?ge.socketPath=e.socketPath:(ge.hostname=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,ge.port=w.port,NR(ge,e.proxy,k+"//"+w.hostname+(w.port?":"+w.port:"")+ge.path));let Le,ve=y5.test(ge.protocol);if(ge.agent=ve?e.httpsAgent:e.httpAgent,h?Le=S5:e.transport?Le=e.transport:e.maxRedirects===0?Le=ve?f5:p5:(e.maxRedirects&&(ge.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ge.beforeRedirects.config=e.beforeRedirect),Le=ve?v5:g5),e.maxBodyLength>-1?ge.maxBodyLength=e.maxBodyLength:ge.maxBodyLength=1/0,e.insecureHTTPParser&&(ge.insecureHTTPParser=e.insecureHTTPParser),g=Le.request(ge,function(I){if(g.destroyed)return;let V=[I],R=O.toFiniteNumber(I.headers["content-length"]);if(C||Z){let ae=new zx({maxRate:O.toFiniteNumber(Z)});C&&ae.on("progress",PR(ae,lc(R,la(dc(C),!0,3)))),V.push(ae)}let S=I,E=I.req||g;if(e.decompress!==!1&&I.headers["content-encoding"])switch((p==="HEAD"||I.statusCode===204)&&delete I.headers["content-encoding"],(I.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":V.push(Ba.createUnzip($R)),delete I.headers["content-encoding"];break;case"deflate":V.push(new bR),V.push(Ba.createUnzip($R)),delete I.headers["content-encoding"];break;case"br":IR&&(V.push(Ba.createBrotliDecompress(h5)),delete I.headers["content-encoding"])}S=V.length>1?Wa.pipeline(V,O.noop):V[0];let B={status:I.statusCode,statusText:I.statusMessage,headers:new tr(I.headers),config:e,request:E};if(d==="stream")B.data=S,Vi(n,i,B);else{let ae=[],he=0;S.on("data",function(Ie){ae.push(Ie),he+=Ie.length,e.maxContentLength>-1&&he>e.maxContentLength&&(v=!0,S.destroy(),y(new ie("maxContentLength size of "+e.maxContentLength+" exceeded",ie.ERR_BAD_RESPONSE,e,E)))}),S.on("aborted",function(){if(v)return;let Ie=new ie("stream has been aborted",ie.ERR_BAD_RESPONSE,e,E);S.destroy(Ie),i(Ie)}),S.on("error",function(Ie){g.destroyed||i(ie.from(Ie,null,e,E))}),S.on("end",function(){try{let Ie=ae.length===1?ae[0]:Buffer.concat(ae);d!=="arraybuffer"&&(Ie=Ie.toString(f),(!f||f==="utf8")&&(Ie=O.stripBOM(Ie))),B.data=Ie}catch(Ie){return i(ie.from(Ie,null,e,B.request,B))}Vi(n,i,B)})}b.once("abort",ae=>{S.destroyed||(S.emit("error",ae),S.destroy())})}),b.once("abort",W=>{g.close?g.close():g.destroy(W)}),g.on("error",function(I){i(ie.from(I,null,e,g))}),g.on("socket",function(I){I.setKeepAlive(!0,1e3*60)}),e.timeout){let W=parseInt(e.timeout,10);if(Number.isNaN(W)){y(new ie("error trying to parse `config.timeout` to int",ie.ERR_BAD_OPTION_VALUE,e,g));return}g.setTimeout(W,function(){if(m)return;let V=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",R=e.transitional||Fa;e.timeoutErrorMessage&&(V=e.timeoutErrorMessage),y(new ie(V,R.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,e,g))})}else g.setTimeout(0);if(O.isStream(o)){let W=!1,I=!1;o.on("end",()=>{W=!0}),o.once("error",V=>{I=!0,g.destroy(V)}),o.on("close",()=>{!W&&!I&&y(new jn("Request stream has been aborted",e,g))}),o.pipe(g)}else o&&g.write(o),g.end()})};var CR=It.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,It.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0;var AR=It.hasStandardBrowserEnv?{write(t,e,r,n,i,a,o){if(typeof document>"u")return;let s=[`${t}=${encodeURIComponent(e)}`];O.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),O.isString(n)&&s.push(`path=${n}`),O.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push("secure"),O.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var UR=t=>t instanceof tr?{...t}:t;function wi(t,e){e=e||{};let r={};function n(u,l,d,f){return O.isPlainObject(u)&&O.isPlainObject(l)?O.merge.call({caseless:f},u,l):O.isPlainObject(l)?O.merge({},l):O.isArray(l)?l.slice():l}function i(u,l,d,f){if(O.isUndefined(l)){if(!O.isUndefined(u))return n(void 0,u,d,f)}else return n(u,l,d,f)}function a(u,l){if(!O.isUndefined(l))return n(void 0,l)}function o(u,l){if(O.isUndefined(l)){if(!O.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function s(u,l,d){if(d in e)return n(u,l);if(d in t)return n(void 0,u)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,l,d)=>i(UR(u),UR(l),d,!0)};return O.forEach(Object.keys({...t,...e}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;let d=O.hasOwnProp(c,l)?c[l]:i,f=d(t[l],e[l],l);O.isUndefined(f)&&d!==s||(r[l]=f)}),r}var wm=t=>{let e=wi({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=e;if(e.headers=o=tr.from(o),e.url=No(Ro(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),O.isFormData(r)){if(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(O.isFunction(r.getHeaders)){let c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&o.set(l,d)})}}if(It.hasStandardBrowserEnv&&(n&&O.isFunction(n)&&(n=n(e)),n||n!==!1&&CR(e.url))){let c=i&&a&&AR.read(a);c&&o.set(i,c)}return e};var $5=typeof XMLHttpRequest<"u",DR=$5&&function(t){return new Promise(function(r,n){let i=wm(t),a=i.data,o=tr.from(i.headers).normalize(),{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,l,d,f,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function h(){if(!g)return;let y=tr.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:t,request:g};Vi(function(k){r(k),v()},function(k){n(k),v()},x),g=null}"onloadend"in g?g.onloadend=h:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(h)},g.onabort=function(){g&&(n(new ie("Request aborted",ie.ECONNABORTED,t,g)),g=null)},g.onerror=function(_){let x=_&&_.message?_.message:"Network Error",w=new ie(x,ie.ERR_NETWORK,t,g);w.event=_||null,n(w),g=null},g.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",x=i.transitional||Fa;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),n(new ie(_,x.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,t,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&O.forEach(o.toJSON(),function(_,x){g.setRequestHeader(x,_)}),O.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([f,m]=la(u,!0),g.addEventListener("progress",f)),c&&g.upload&&([d,p]=la(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(l=y=>{g&&(n(!y||y.type?new jn(null,t,g):y),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let b=Nl(i.url);if(b&&It.protocols.indexOf(b)===-1){n(new ie("Unsupported protocol "+b+":",ie.ERR_BAD_REQUEST,t));return}g.send(a||null)})};var I5=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i,a=function(u){if(!i){i=!0,s();let l=u instanceof Error?u:this.reason;n.abort(l instanceof ie?l:new jn(l instanceof Error?l.message:l))}},o=e&&setTimeout(()=>{o=null,a(new ie(`timeout of ${e}ms exceeded`,ie.ETIMEDOUT))},e),s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),t=null)};t.forEach(u=>u.addEventListener("abort",a));let{signal:c}=n;return c.unsubscribe=()=>O.asap(s),c}},MR=I5;var E5=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},P5=async function*(t,e){for await(let r of T5(t))yield*E5(r,e)},T5=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Ax=(t,e,r,n)=>{let i=P5(t,e),a=0,o,s=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await i.next();if(u){s(),c.close();return}let d=l.byteLength;if(r){let f=a+=d;r(f)}c.enqueue(new Uint8Array(l))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})};var qR=64*1024,{isFunction:km}=O,z5=(({Request:t,Response:e})=>({Request:t,Response:e}))(O.global),{ReadableStream:ZR,TextEncoder:LR}=O.global,FR=(t,...e)=>{try{return!!t(...e)}catch{return!1}},O5=t=>{t=O.merge.call({skipUndefined:!0},z5,t);let{fetch:e,Request:r,Response:n}=t,i=e?km(e):typeof fetch=="function",a=km(r),o=km(n);if(!i)return!1;let s=i&&km(ZR),c=i&&(typeof LR=="function"?(m=>v=>m.encode(v))(new LR):async m=>new Uint8Array(await new r(m).arrayBuffer())),u=a&&s&&FR(()=>{let m=!1,v=new ZR,g=new r(It.origin,{body:v,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return v.cancel(),m&&!g}),l=o&&s&&FR(()=>O.isReadableStream(new n("").body)),d={stream:l&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(v,g)=>{let h=v&&v[m];if(h)return h.call(v);throw new ie(`Response type '${m}' is not supported`,ie.ERR_NOT_SUPPORT,g)})});let f=async m=>{if(m==null)return 0;if(O.isBlob(m))return m.size;if(O.isSpecCompliantForm(m))return(await new r(It.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(O.isArrayBufferView(m)||O.isArrayBuffer(m))return m.byteLength;if(O.isURLSearchParams(m)&&(m=m+""),O.isString(m))return(await c(m)).byteLength},p=async(m,v)=>{let g=O.toFiniteNumber(m.getContentLength());return g??f(v)};return async m=>{let{url:v,method:g,data:h,signal:b,cancelToken:y,timeout:_,onDownloadProgress:x,onUploadProgress:w,responseType:k,headers:$,withCredentials:P="same-origin",fetchOptions:C}=wm(m),T=e||fetch;k=k?(k+"").toLowerCase():"text";let D=MR([b,y&&y.toAbortSignal()],_),Z=null,N=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),ee;try{if(w&&u&&g!=="get"&&g!=="head"&&(ee=await p($,h))!==0){let I=new r(v,{method:"POST",body:h,duplex:"half"}),V;if(O.isFormData(h)&&(V=I.headers.get("content-type"))&&$.setContentType(V),I.body){let[R,S]=lc(ee,la(dc(w)));h=Ax(I.body,qR,R,S)}}O.isString(P)||(P=P?"include":"omit");let H=a&&"credentials"in r.prototype,ge={...C,signal:D,method:g.toUpperCase(),headers:$.normalize().toJSON(),body:h,duplex:"half",credentials:H?P:void 0};Z=a&&new r(v,ge);let Le=await(a?T(Z,C):T(v,ge)),ve=l&&(k==="stream"||k==="response");if(l&&(x||ve&&N)){let I={};["status","statusText","headers"].forEach(E=>{I[E]=Le[E]});let V=O.toFiniteNumber(Le.headers.get("content-length")),[R,S]=x&&lc(V,la(dc(x),!0))||[];Le=new n(Ax(Le.body,qR,R,()=>{S&&S(),N&&N()}),I)}k=k||"text";let W=await d[O.findKey(d,k)||"text"](Le,m);return!ve&&N&&N(),await new Promise((I,V)=>{Vi(I,V,{data:W,headers:tr.from(Le.headers),status:Le.status,statusText:Le.statusText,config:m,request:Z})})}catch(H){throw N&&N(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new ie("Network Error",ie.ERR_NETWORK,m,Z,H&&H.response),{cause:H.cause||H}):ie.from(H,H&&H.code,m,Z,H&&H.response)}}},j5=new Map,Ux=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:i}=e,a=[n,i,r],o=a.length,s=o,c,u,l=j5;for(;s--;)c=a[s],u=l.get(c),u===void 0&&l.set(c,u=s?new Map:O5(e)),l=u;return u},kPe=Ux();var Dx={http:RR,xhr:DR,fetch:{get:Ux}};O.forEach(Dx,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var VR=t=>`- ${t}`,R5=t=>O.isFunction(t)||t===null||t===!1;function C5(t,e){t=O.isArray(t)?t:[t];let{length:r}=t,n,i,a={};for(let o=0;o<r;o++){n=t[o];let s;if(i=n,!R5(n)&&(i=Dx[(s=String(n)).toLowerCase()],i===void 0))throw new ie(`Unknown adapter '${s}'`);if(i&&(O.isFunction(i)||(i=i.get(e))))break;a[s||"#"+o]=i}if(!i){let o=Object.entries(a).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=r?o.length>1?`since :
|
|
53
|
+
`+o.map(VR).join(`
|
|
54
|
+
`):" "+VR(o[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}var Sm={getAdapter:C5,adapters:Dx};function Mx(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new jn(null,t)}function $m(t){return Mx(t),t.headers=tr.from(t.headers),t.data=El.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Sm.getAdapter(t.adapter||ac.adapter,t)(t).then(function(n){return Mx(t),n.data=El.call(t,t.transformResponse,n),n.headers=tr.from(n.headers),n},function(n){return Pl(n)||(Mx(t),n&&n.response&&(n.response.data=El.call(t,t.transformResponse,n.response),n.response.headers=tr.from(n.response.headers))),Promise.reject(n)})}var Im={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Im[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var WR={};Im.transitional=function(e,r,n){function i(a,o){return"[Axios v"+Do+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(e===!1)throw new ie(i(o," has been removed"+(r?" in "+r:"")),ie.ERR_DEPRECATED);return r&&!WR[o]&&(WR[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};Im.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function A5(t,e,r){if(typeof t!="object")throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let a=n[i],o=e[a];if(o){let s=t[a],c=s===void 0||o(s,a,t);if(c!==!0)throw new ie("option "+a+" must be "+c,ie.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ie("Unknown option "+a,ie.ERR_BAD_OPTION)}}var Cl={assertOptions:A5,validators:Im};var Yn=Cl.validators,pc=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Xb,response:new Xb}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let a=(()=>{if(!i.stack)return"";let o=i.stack.indexOf(`
|
|
55
|
+
`);return o===-1?"":i.stack.slice(o+1)})();try{if(!n.stack)n.stack=a;else if(a){let o=a.indexOf(`
|
|
56
|
+
`),s=o===-1?-1:a.indexOf(`
|
|
57
|
+
`,o+1),c=s===-1?"":a.slice(s+1);String(n.stack).endsWith(c)||(n.stack+=`
|
|
58
|
+
`+a)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=wi(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Cl.assertOptions(n,{silentJSONParsing:Yn.transitional(Yn.boolean),forcedJSONParsing:Yn.transitional(Yn.boolean),clarifyTimeoutError:Yn.transitional(Yn.boolean),legacyInterceptorReqResOrdering:Yn.transitional(Yn.boolean)},!1),i!=null&&(O.isFunction(i)?r.paramsSerializer={serialize:i}:Cl.assertOptions(i,{encode:Yn.function,serialize:Yn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Cl.assertOptions(r,{baseUrl:Yn.spelling("baseURL"),withXsrfToken:Yn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&O.merge(a.common,a[r.method]);a&&O.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),r.headers=tr.concat(o,a);let s=[],c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;c=c&&v.synchronous;let g=r.transitional||Fa;g&&g.legacyInterceptorReqResOrdering?s.unshift(v.fulfilled,v.rejected):s.push(v.fulfilled,v.rejected)});let u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let l,d=0,f;if(!c){let m=[$m.bind(this),void 0];for(m.unshift(...s),m.push(...u),f=m.length,l=Promise.resolve(r);d<f;)l=l.then(m[d++],m[d++]);return l}f=s.length;let p=r;for(;d<f;){let m=s[d++],v=s[d++];try{p=m(p)}catch(g){v.call(this,g);break}}try{l=$m.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=u.length;d<f;)l=l.then(u[d++],u[d++]);return l}getUri(e){e=wi(this.defaults,e);let r=Ro(e.baseURL,e.url,e.allowAbsoluteUrls);return No(r,e.params,e.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(e){pc.prototype[e]=function(r,n){return this.request(wi(n||{},{method:e,url:r,data:(n||{}).data}))}});O.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(wi(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}pc.prototype[e]=r(),pc.prototype[e+"Form"]=r(!0)});var Al=pc;var qx=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a,o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},e(function(a,o,s){n.reason||(n.reason=new jn(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},BR=qx;function Zx(t){return function(r){return t.apply(null,r)}}function Lx(t){return O.isObject(t)&&t.isAxiosError===!0}var Fx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fx).forEach(([t,e])=>{Fx[e]=t});var KR=Fx;function HR(t){let e=new Al(t),r=yl(Al.prototype.request,e);return O.extend(r,Al.prototype,e,{allOwnKeys:!0}),O.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return HR(wi(t,i))},r}var pr=HR(ac);pr.Axios=Al;pr.CanceledError=jn;pr.CancelToken=BR;pr.isCancel=Pl;pr.VERSION=Do;pr.toFormData=La;pr.AxiosError=ie;pr.Cancel=pr.CanceledError;pr.all=function(e){return Promise.all(e)};pr.spread=Zx;pr.isAxiosError=Lx;pr.mergeConfig=wi;pr.AxiosHeaders=tr;pr.formToJSON=t=>hm(O.isHTMLForm(t)?new FormData(t):t);pr.getAdapter=Sm.getAdapter;pr.HttpStatusCode=KR;pr.default=pr;var Em=pr;var{Axios:bTe,AxiosError:xTe,CanceledError:wTe,isCancel:kTe,CancelToken:STe,VERSION:$Te,all:ITe,Cancel:ETe,isAxiosError:PTe,spread:TTe,toFormData:zTe,AxiosHeaders:OTe,HttpStatusCode:jTe,formToJSON:NTe,getAdapter:RTe,mergeConfig:CTe}=Em;import{homedir as s7}from"os";import{join as c7}from"path";import{existsSync as u7,readFileSync as l7}from"fs";var GR=Object.freeze({status:"aborted"});function j(t,e,r){function n(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,c);let u=o.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let f=l[d];f in s||(s[f]=u[f].bind(s))}}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:t});function o(s){var c;let u=r?.Parent?new a:this;n(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}var Wi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},qo=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},Pm={};function hr(t){return t&&Object.assign(Pm,t),Pm}var Y={};aa(Y,{BIGINT_FORMAT_RANGES:()=>Xx,Class:()=>Wx,NUMBER_FORMAT_RANGES:()=>Jx,aborted:()=>Qa,allowsEval:()=>Hx,assert:()=>Z5,assertEqual:()=>U5,assertIs:()=>M5,assertNever:()=>q5,assertNotEqual:()=>D5,assignProp:()=>Ha,base64ToUint8Array:()=>nC,base64urlToUint8Array:()=>J5,cached:()=>mc,captureStackTrace:()=>zm,cleanEnum:()=>Y5,cleanRegex:()=>Ml,clone:()=>Yr,cloneDef:()=>F5,createTransparentProxy:()=>G5,defineLazy:()=>Be,esc:()=>Tm,escapeRegex:()=>Jn,extend:()=>XR,finalizeIssue:()=>hn,floatSafeRemainder:()=>Bx,getElementAtPath:()=>V5,getEnumValues:()=>Dl,getLengthableOrigin:()=>Ll,getParsedType:()=>H5,getSizableOrigin:()=>Zl,hexToUint8Array:()=>eQ,isObject:()=>Zo,isPlainObject:()=>Ga,issue:()=>hc,joinValues:()=>Te,jsonStringifyReplacer:()=>fc,merge:()=>Q5,mergeDefs:()=>da,normalizeParams:()=>se,nullish:()=>Ka,numKeys:()=>K5,objectClone:()=>L5,omit:()=>JR,optionalKeys:()=>Yx,parsedType:()=>je,partial:()=>tC,pick:()=>YR,prefixIssues:()=>Nn,primitiveTypes:()=>Qx,promiseAllObject:()=>W5,propertyKeyTypes:()=>ql,randomString:()=>B5,required:()=>rC,safeExtend:()=>eC,shallowClone:()=>Gx,slugify:()=>Kx,stringifyPrimitive:()=>ze,uint8ArrayToBase64:()=>iC,uint8ArrayToBase64url:()=>X5,uint8ArrayToHex:()=>tQ,unwrapMessage:()=>Ul});function U5(t){return t}function D5(t){return t}function M5(t){}function q5(t){throw new Error("Unexpected value in exhaustive check")}function Z5(t){}function Dl(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function Te(t,e="|"){return t.map(r=>ze(r)).join(e)}function fc(t,e){return typeof e=="bigint"?e.toString():e}function mc(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ka(t){return t==null}function Ml(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Bx(t,e){let r=(t.toString().split(".")[1]||"").length,n=e.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 a=r>i?r:i,o=Number.parseInt(t.toFixed(a).replace(".","")),s=Number.parseInt(e.toFixed(a).replace(".",""));return o%s/10**a}var QR=Symbol("evaluating");function Be(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==QR)return n===void 0&&(n=QR,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function L5(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Ha(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function da(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function F5(t){return da(t._zod.def)}function V5(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function W5(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<e.length;a++)i[e[a]]=n[a];return i})}function B5(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function Tm(t){return JSON.stringify(t)}function Kx(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var zm="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Zo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Hx=mc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Ga(t){if(Zo(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Zo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Gx(t){return Ga(t)?{...t}:Array.isArray(t)?[...t]:t}function K5(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var H5=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},ql=new Set(["string","number","symbol"]),Qx=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Jn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yr(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function se(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function G5(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,a){return e??(e=t()),Reflect.set(e,n,i,a)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function ze(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Yx(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Jx={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]},Xx={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function YR(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a=da(t._zod.def,{get shape(){let o={};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(o[s]=r.shape[s])}return Ha(this,"shape",o),o},checks:[]});return Yr(t,a)}function JR(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=da(t._zod.def,{get shape(){let o={...t._zod.def.shape};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete o[s]}return Ha(this,"shape",o),o},checks:[]});return Yr(t,a)}function XR(t,e){if(!Ga(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let a=t._zod.def.shape;for(let o in e)if(Object.getOwnPropertyDescriptor(a,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=da(t._zod.def,{get shape(){let a={...t._zod.def.shape,...e};return Ha(this,"shape",a),a}});return Yr(t,i)}function eC(t,e){if(!Ga(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=da(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return Ha(this,"shape",n),n}});return Yr(t,r)}function Q5(t,e){let r=da(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Ha(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return Yr(t,r)}function tC(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=da(e._zod.def,{get shape(){let s=e._zod.def.shape,c={...s};if(r)for(let u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=t?new t({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=t?new t({type:"optional",innerType:s[u]}):s[u];return Ha(this,"shape",c),c},checks:[]});return Yr(e,o)}function rC(t,e,r){let n=da(e._zod.def,{get shape(){let i=e._zod.def.shape,a={...i};if(r)for(let o in r){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(a[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(let o in i)a[o]=new t({type:"nonoptional",innerType:i[o]});return Ha(this,"shape",a),a}});return Yr(e,n)}function Qa(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Nn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Ul(t){return typeof t=="string"?t:t?.message}function hn(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Ul(t.inst?._zod.def?.error?.(t))??Ul(e?.error?.(t))??Ul(r.customError?.(t))??Ul(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Zl(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Ll(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function je(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function hc(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Y5(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function nC(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function iC(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function J5(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return nC(e+r)}function X5(t){return iC(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function eQ(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function tQ(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Wx=class{constructor(...e){}};var aC=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,fc,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Om=j("$ZodError",aC),Fl=j("$ZodError",aC,{Parent:Error});function jm(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function Nm(t,e=r=>r.message){let r={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)r._errors.push(e(a));else{let o=r,s=0;for(;s<a.path.length;){let c=a.path[s];s===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(e(a))):o[c]=o[c]||{_errors:[]},o=o[c],s++}}};return n(t),r}var Vl=t=>(e,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new Wi;if(o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>hn(c,a,hr())));throw zm(s,i?.callee),s}return o.value},Wl=Vl(Fl),Bl=t=>async(e,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>hn(c,a,hr())));throw zm(s,i?.callee),s}return o.value},Kl=Bl(Fl),Hl=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Wi;return a.issues.length?{success:!1,error:new(t??Om)(a.issues.map(o=>hn(o,i,hr())))}:{success:!0,data:a.value}},gc=Hl(Fl),Gl=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(o=>hn(o,i,hr())))}:{success:!0,data:a.value}},Ql=Gl(Fl),oC=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vl(t)(e,r,i)};var sC=t=>(e,r,n)=>Vl(t)(e,r,n);var cC=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Bl(t)(e,r,i)};var uC=t=>async(e,r,n)=>Bl(t)(e,r,n);var lC=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Hl(t)(e,r,i)};var dC=t=>(e,r,n)=>Hl(t)(e,r,n);var pC=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Gl(t)(e,r,i)};var fC=t=>async(e,r,n)=>Gl(t)(e,r,n);var Xn={};aa(Xn,{base64:()=>hw,base64url:()=>Rm,bigint:()=>xw,boolean:()=>kw,browserEmail:()=>lQ,cidrv4:()=>fw,cidrv6:()=>mw,cuid:()=>ew,cuid2:()=>tw,date:()=>vw,datetime:()=>_w,domain:()=>fQ,duration:()=>ow,e164:()=>gw,email:()=>cw,emoji:()=>uw,extendedDuration:()=>nQ,guid:()=>sw,hex:()=>mQ,hostname:()=>pQ,html5Email:()=>sQ,idnEmail:()=>uQ,integer:()=>ww,ipv4:()=>lw,ipv6:()=>dw,ksuid:()=>iw,lowercase:()=>Iw,mac:()=>pw,md5_base64:()=>gQ,md5_base64url:()=>vQ,md5_hex:()=>hQ,nanoid:()=>aw,null:()=>Sw,number:()=>Cm,rfc5322Email:()=>cQ,sha1_base64:()=>_Q,sha1_base64url:()=>bQ,sha1_hex:()=>yQ,sha256_base64:()=>wQ,sha256_base64url:()=>kQ,sha256_hex:()=>xQ,sha384_base64:()=>$Q,sha384_base64url:()=>IQ,sha384_hex:()=>SQ,sha512_base64:()=>PQ,sha512_base64url:()=>TQ,sha512_hex:()=>EQ,string:()=>bw,time:()=>yw,ulid:()=>rw,undefined:()=>$w,unicodeEmail:()=>mC,uppercase:()=>Ew,uuid:()=>Lo,uuid4:()=>iQ,uuid6:()=>aQ,uuid7:()=>oQ,xid:()=>nw});var ew=/^[cC][^\s-]{8,}$/,tw=/^[0-9a-z]+$/,rw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,nw=/^[0-9a-vA-V]{20}$/,iw=/^[A-Za-z0-9]{27}$/,aw=/^[a-zA-Z0-9_-]{21}$/,ow=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nQ=/^[-+]?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)?)??$/,sw=/^([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})$/,Lo=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,iQ=Lo(4),aQ=Lo(6),oQ=Lo(7),cw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,sQ=/^[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])?)*$/,cQ=/^(([^<>()\[\]\\.,;:\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,}))$/,mC=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,uQ=mC,lQ=/^[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])?)*$/,dQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function uw(){return new RegExp(dQ,"u")}var lw=/^(?:(?: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])$/,dw=/^(([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}|:))$/,pw=t=>{let e=Jn(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},fw=/^((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])$/,mw=/^(([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])$/,hw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rm=/^[A-Za-z0-9_-]*$/,pQ=/^(?=.{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])?)*\.?$/,fQ=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,gw=/^\+[1-9]\d{6,14}$/,hC="(?:(?:\\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])))",vw=new RegExp(`^${hC}$`);function gC(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function yw(t){return new RegExp(`^${gC(t)}$`)}function _w(t){let e=gC({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${hC}T(?:${n})$`)}var bw=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},xw=/^-?\d+n?$/,ww=/^-?\d+$/,Cm=/^-?\d+(?:\.\d+)?$/,kw=/^(?:true|false)$/i,Sw=/^null$/i;var $w=/^undefined$/i;var Iw=/^[^A-Z]*$/,Ew=/^[^a-z]*$/,mQ=/^[0-9a-fA-F]*$/;function Yl(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Jl(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var hQ=/^[0-9a-fA-F]{32}$/,gQ=Yl(22,"=="),vQ=Jl(22),yQ=/^[0-9a-fA-F]{40}$/,_Q=Yl(27,"="),bQ=Jl(27),xQ=/^[0-9a-fA-F]{64}$/,wQ=Yl(43,"="),kQ=Jl(43),SQ=/^[0-9a-fA-F]{96}$/,$Q=Yl(64,""),IQ=Jl(64),EQ=/^[0-9a-fA-F]{128}$/,PQ=Yl(86,"=="),TQ=Jl(86);var At=j("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),yC={number:"number",bigint:"bigint",object:"date"},Pw=j("$ZodCheckLessThan",(t,e)=>{At.init(t,e);let r=yC[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Tw=j("$ZodCheckGreaterThan",(t,e)=>{At.init(t,e);let r=yC[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),_C=j("$ZodCheckMultipleOf",(t,e)=>{At.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Bx(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),bC=j("$ZodCheckNumberFormat",(t,e)=>{At.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,a]=Jx[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=i,s.maximum=a,r&&(s.pattern=ww)}),t._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:t,continue:!e.abort})}}),xC=j("$ZodCheckBigIntFormat",(t,e)=>{At.init(t,e);let[r,n]=Xx[e.format];t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,a.minimum=r,a.maximum=n}),t._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),wC=j("$ZodCheckMaxSize",(t,e)=>{var r;At.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Ka(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:Zl(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),kC=j("$ZodCheckMinSize",(t,e)=>{var r;At.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Ka(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:Zl(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),SC=j("$ZodCheckSizeEquals",(t,e)=>{var r;At.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Ka(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,a=i.size;if(a===e.size)return;let o=a>e.size;n.issues.push({origin:Zl(i),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),$C=j("$ZodCheckMaxLength",(t,e)=>{var r;At.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Ka(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let o=Ll(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),IC=j("$ZodCheckMinLength",(t,e)=>{var r;At.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Ka(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let o=Ll(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),EC=j("$ZodCheckLengthEquals",(t,e)=>{var r;At.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Ka(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,a=i.length;if(a===e.length)return;let o=Ll(i),s=a>e.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Xl=j("$ZodCheckStringFormat",(t,e)=>{var r,n;At.init(t,e),t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),PC=j("$ZodCheckRegex",(t,e)=>{Xl.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),TC=j("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Iw),Xl.init(t,e)}),zC=j("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Ew),Xl.init(t,e)}),OC=j("$ZodCheckIncludes",(t,e)=>{At.init(t,e);let r=Jn(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),jC=j("$ZodCheckStartsWith",(t,e)=>{At.init(t,e);let r=new RegExp(`^${Jn(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),NC=j("$ZodCheckEndsWith",(t,e)=>{At.init(t,e);let r=new RegExp(`.*${Jn(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function vC(t,e,r){t.issues.length&&e.issues.push(...Nn(r,t.issues))}var RC=j("$ZodCheckProperty",(t,e)=>{At.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>vC(i,r,e.property));vC(n,r,e.property)}}),CC=j("$ZodCheckMimeType",(t,e)=>{At.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),AC=j("$ZodCheckOverwrite",(t,e)=>{At.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Am=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
59
|
+
`).filter(o=>o),i=Math.min(...n.map(o=>o.length-o.trimStart().length)),a=n.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(let o of a)this.content.push(o)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(a=>` ${a}`)];return new e(...r,i.join(`
|
|
60
|
+
`))}};var DC={major:4,minor:3,patch:6};var Me=j("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=DC;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let a of i._zod.onattach)a(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(o,s,c)=>{let u=Qa(o),l;for(let d of s){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 Wi;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(u||(u=Qa(o,f)))});else{if(o.issues.length===f)continue;u||(u=Qa(o,f))}}return l?l.then(()=>o):o},a=(o,s,c)=>{if(Qa(o))return o.aborted=!0,o;let u=i(s,n,c);if(u instanceof Promise){if(c.async===!1)throw new Wi;return u.then(l=>t._zod.parse(l,c))}return t._zod.parse(u,c)};t._zod.run=(o,s)=>{if(s.skipChecks)return t._zod.parse(o,s);if(s.direction==="backward"){let u=t._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>a(l,o,s)):a(u,o,s)}let c=t._zod.parse(o,s);if(c instanceof Promise){if(s.async===!1)throw new Wi;return c.then(u=>i(u,n,s))}return i(c,n,s)}}Be(t,"~standard",()=>({validate:i=>{try{let a=gc(t,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Ql(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Fo=j("$ZodString",(t,e)=>{Me.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??bw(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),Ot=j("$ZodStringFormat",(t,e)=>{Xl.init(t,e),Fo.init(t,e)}),Ow=j("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=sw),Ot.init(t,e)}),jw=j("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Lo(n))}else e.pattern??(e.pattern=Lo());Ot.init(t,e)}),Nw=j("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=cw),Ot.init(t,e)}),Rw=j("$ZodURL",(t,e)=>{Ot.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Cw=j("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=uw()),Ot.init(t,e)}),Aw=j("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=aw),Ot.init(t,e)}),Uw=j("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=ew),Ot.init(t,e)}),Dw=j("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=tw),Ot.init(t,e)}),Mw=j("$ZodULID",(t,e)=>{e.pattern??(e.pattern=rw),Ot.init(t,e)}),qw=j("$ZodXID",(t,e)=>{e.pattern??(e.pattern=nw),Ot.init(t,e)}),Zw=j("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=iw),Ot.init(t,e)}),Lw=j("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=_w(e)),Ot.init(t,e)}),Fw=j("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=vw),Ot.init(t,e)}),Vw=j("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=yw(e)),Ot.init(t,e)}),Ww=j("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=ow),Ot.init(t,e)}),Bw=j("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=lw),Ot.init(t,e),t._zod.bag.format="ipv4"}),Kw=j("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=dw),Ot.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Hw=j("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=pw(e.delimiter)),Ot.init(t,e),t._zod.bag.format="mac"}),Gw=j("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=fw),Ot.init(t,e)}),Qw=j("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=mw),Ot.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,a]=n;if(!a)throw new Error;let o=Number(a);if(`${o}`!==a)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:t,continue:!e.abort})}}});function QC(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Yw=j("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=hw),Ot.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{QC(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function zQ(t){if(!Rm.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return QC(r)}var Jw=j("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Rm),Ot.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{zQ(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Xw=j("$ZodE164",(t,e)=>{e.pattern??(e.pattern=gw),Ot.init(t,e)});function OQ(t,e=null){try{let r=t.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||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var e0=j("$ZodJWT",(t,e)=>{Ot.init(t,e),t._zod.check=r=>{OQ(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),t0=j("$ZodCustomStringFormat",(t,e)=>{Ot.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Lm=j("$ZodNumber",(t,e)=>{Me.init(t,e),t._zod.pattern=t._zod.bag.pattern??Cm,t._zod.parse=(r,n)=>{if(e.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 a=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:t,...a?{received:a}:{}}),r}}),r0=j("$ZodNumberFormat",(t,e)=>{bC.init(t,e),Lm.init(t,e)}),ed=j("$ZodBoolean",(t,e)=>{Me.init(t,e),t._zod.pattern=kw,t._zod.parse=(r,n)=>{if(e.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:t}),r}}),Fm=j("$ZodBigInt",(t,e)=>{Me.init(t,e),t._zod.pattern=xw,t._zod.parse=(r,n)=>{if(e.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:t}),r}}),n0=j("$ZodBigIntFormat",(t,e)=>{xC.init(t,e),Fm.init(t,e)}),i0=j("$ZodSymbol",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),a0=j("$ZodUndefined",(t,e)=>{Me.init(t,e),t._zod.pattern=$w,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),o0=j("$ZodNull",(t,e)=>{Me.init(t,e),t._zod.pattern=Sw,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),s0=j("$ZodAny",(t,e)=>{Me.init(t,e),t._zod.parse=r=>r}),c0=j("$ZodUnknown",(t,e)=>{Me.init(t,e),t._zod.parse=r=>r}),u0=j("$ZodNever",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),l0=j("$ZodVoid",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),d0=j("$ZodDate",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:t}),r}});function MC(t,e,r){t.issues.length&&e.issues.push(...Nn(r,t.issues)),e.value[r]=t.value}var p0=j("$ZodArray",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let a=[];for(let o=0;o<i.length;o++){let s=i[o],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?a.push(c.then(u=>MC(u,r,o))):MC(c,r,o)}return a.length?Promise.all(a).then(()=>r):r}});function Zm(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...Nn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function YC(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Yx(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function JC(t,e,r,n,i,a){let o=[],s=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in e){if(s.has(d))continue;if(u==="never"){o.push(d);continue}let f=c.run({value:e[d],issues:[]},n);f instanceof Promise?t.push(f.then(p=>Zm(p,r,d,e,l))):Zm(f,r,d,e,l)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:a}),t.length?Promise.all(t).then(()=>r):r}var XC=j("$ZodObject",(t,e)=>{if(Me.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...s};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=mc(()=>YC(e));Be(t._zod,"propValues",()=>{let s=e.shape,c={};for(let u in s){let l=s[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=Zo,a=e.catchall,o;t._zod.parse=(s,c)=>{o??(o=n.value);let u=s.value;if(!i(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),s;s.value={};let l=[],d=o.shape;for(let f of o.keys){let p=d[f],m=p._zod.optout==="optional",v=p._zod.run({value:u[f],issues:[]},c);v instanceof Promise?l.push(v.then(g=>Zm(g,s,f,u,m))):Zm(v,s,f,u,m)}return a?JC(l,u,s,c,n.value,t):l.length?Promise.all(l).then(()=>s):s}}),eA=j("$ZodObjectJIT",(t,e)=>{XC.init(t,e);let r=t._zod.parse,n=mc(()=>YC(e)),i=f=>{let p=new Am(["shape","payload","ctx"]),m=n.value,v=y=>{let _=Tm(y);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");let g=Object.create(null),h=0;for(let y of m.keys)g[y]=`key_${h++}`;p.write("const newResult = {};");for(let y of m.keys){let _=g[y],x=Tm(y),k=f[y]?._zod?.optout==="optional";p.write(`const ${_} = ${v(y)};`),k?p.write(`
|
|
61
|
+
if (${_}.issues.length) {
|
|
62
|
+
if (${x} in input) {
|
|
63
|
+
payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
|
|
64
|
+
...iss,
|
|
65
|
+
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
66
|
+
})));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (${_}.value === undefined) {
|
|
71
|
+
if (${x} in input) {
|
|
72
|
+
newResult[${x}] = undefined;
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
newResult[${x}] = ${_}.value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
`):p.write(`
|
|
79
|
+
if (${_}.issues.length) {
|
|
80
|
+
payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
|
|
81
|
+
...iss,
|
|
82
|
+
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
83
|
+
})));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (${_}.value === undefined) {
|
|
87
|
+
if (${x} in input) {
|
|
88
|
+
newResult[${x}] = undefined;
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
newResult[${x}] = ${_}.value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
`)}p.write("payload.value = newResult;"),p.write("return payload;");let b=p.compile();return(y,_)=>b(f,y,_)},a,o=Zo,s=!Pm.jitless,u=s&&Hx.value,l=e.catchall,d;t._zod.parse=(f,p)=>{d??(d=n.value);let m=f.value;return o(m)?s&&u&&p?.async===!1&&p.jitless!==!0?(a||(a=i(e.shape)),f=a(f,p),l?JC([],m,f,p,d,t):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),f)}});function qC(t,e,r,n){for(let a of t)if(a.issues.length===0)return e.value=a.value,e;let i=t.filter(a=>!Qa(a));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(a=>a.issues.map(o=>hn(o,n,hr())))}),e)}var td=j("$ZodUnion",(t,e)=>{Me.init(t,e),Be(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Be(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Be(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Be(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(a=>a._zod.pattern);return new RegExp(`^(${i.map(a=>Ml(a.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,a)=>{if(r)return n(i,a);let o=!1,s=[];for(let c of e.options){let u=c._zod.run({value:i.value,issues:[]},a);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(c=>qC(c,i,t,a)):qC(s,i,t,a)}});function ZC(t,e,r,n){let i=t.filter(a=>a.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(a=>a.issues.map(o=>hn(o,n,hr())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var f0=j("$ZodXor",(t,e)=>{td.init(t,e),e.inclusive=!1;let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,a)=>{if(r)return n(i,a);let o=!1,s=[];for(let c of e.options){let u=c._zod.run({value:i.value,issues:[]},a);u instanceof Promise?(s.push(u),o=!0):s.push(u)}return o?Promise.all(s).then(c=>ZC(c,i,t,a)):ZC(s,i,t,a)}}),m0=j("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,td.init(t,e);let r=t._zod.parse;Be(t._zod,"propValues",()=>{let i={};for(let a of e.options){let o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[s,c]of Object.entries(o)){i[s]||(i[s]=new Set);for(let u of c)i[s].add(u)}}return i});let n=mc(()=>{let i=e.options,a=new Map;for(let o of i){let s=o._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let c of s){if(a.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,o)}}return a});t._zod.parse=(i,a)=>{let o=i.value;if(!Zo(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;let s=n.value.get(o?.[e.discriminator]);return s?s._zod.run(i,a):e.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:o,path:[e.discriminator],inst:t}),i)}}),h0=j("$ZodIntersection",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,a=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([c,u])=>LC(r,c,u)):LC(r,a,o)}});function zw(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Ga(t)&&Ga(e)){let r=Object.keys(e),n=Object.keys(t).filter(a=>r.indexOf(a)!==-1),i={...t,...e};for(let a of n){let o=zw(t[a],e[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],a=e[n],o=zw(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function LC(t,e,r){let n=new Map,i;for(let s of e.issues)if(s.code==="unrecognized_keys"){i??(i=s);for(let c of s.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(s);let a=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&i&&t.issues.push({...i,keys:a}),Qa(t))return t;let o=zw(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}var Vm=j("$ZodTuple",(t,e)=>{Me.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let o=[],s=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!e.rest){let l=a.length>r.length,d=a.length<c-1;if(l||d)return n.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:a,inst:t,origin:"array"}),n}let u=-1;for(let l of r){if(u++,u>=a.length&&u>=c)continue;let d=l._zod.run({value:a[u],issues:[]},i);d instanceof Promise?o.push(d.then(f=>Um(f,n,u))):Um(d,n,u)}if(e.rest){let l=a.slice(r.length);for(let d of l){u++;let f=e.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?o.push(f.then(p=>Um(p,n,u))):Um(f,n,u)}}return o.length?Promise.all(o).then(()=>n):n}});function Um(t,e,r){t.issues.length&&e.issues.push(...Nn(r,t.issues)),e.value[r]=t.value}var g0=j("$ZodRecord",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Ga(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let a=[],o=e.keyType._zod.values;if(o){r.value={};let s=new Set;for(let u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let l=e.valueType._zod.run({value:i[u],issues:[]},n);l instanceof Promise?a.push(l.then(d=>{d.issues.length&&r.issues.push(...Nn(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...Nn(u,l.issues)),r.value[u]=l.value)}let c;for(let u in i)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__")continue;let c=e.keyType._zod.run({value:s,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Cm.test(s)&&c.issues.length){let d=e.keyType._zod.run({value:Number(s),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){e.mode==="loose"?r.value[s]=i[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>hn(d,n,hr())),input:s,path:[s],inst:t});continue}let l=e.valueType._zod.run({value:i[s],issues:[]},n);l instanceof Promise?a.push(l.then(d=>{d.issues.length&&r.issues.push(...Nn(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...Nn(s,l.issues)),r.value[c.value]=l.value)}}return a.length?Promise.all(a).then(()=>r):r}}),v0=j("$ZodMap",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let a=[];r.value=new Map;for(let[o,s]of i){let c=e.keyType._zod.run({value:o,issues:[]},n),u=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([l,d])=>{FC(l,d,r,o,i,t,n)})):FC(c,u,r,o,i,t,n)}return a.length?Promise.all(a).then(()=>r):r}});function FC(t,e,r,n,i,a,o){t.issues.length&&(ql.has(typeof n)?r.issues.push(...Nn(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:t.issues.map(s=>hn(s,o,hr()))})),e.issues.length&&(ql.has(typeof n)?r.issues.push(...Nn(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:e.issues.map(s=>hn(s,o,hr()))})),r.value.set(t.value,e.value)}var y0=j("$ZodSet",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let a=[];r.value=new Set;for(let o of i){let s=e.valueType._zod.run({value:o,issues:[]},n);s instanceof Promise?a.push(s.then(c=>VC(c,r))):VC(s,r)}return a.length?Promise.all(a).then(()=>r):r}});function VC(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var _0=j("$ZodEnum",(t,e)=>{Me.init(t,e);let r=Dl(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>ql.has(typeof i)).map(i=>typeof i=="string"?Jn(i):i.toString()).join("|")})$`),t._zod.parse=(i,a)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:t}),i}}),b0=j("$ZodLiteral",(t,e)=>{if(Me.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Jn(n):n?Jn(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:e.values,input:a,inst:t}),n}}),x0=j("$ZodFile",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),w0=j("$ZodTransform",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new qo(t.constructor.name);let i=e.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 Wi;return r.value=i,r}});function WC(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var Wm=j("$ZodOptional",(t,e)=>{Me.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Be(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Be(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Ml(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>WC(a,r.value)):WC(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),k0=j("$ZodExactOptional",(t,e)=>{Wm.init(t,e),Be(t._zod,"values",()=>e.innerType._zod.values),Be(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),S0=j("$ZodNullable",(t,e)=>{Me.init(t,e),Be(t._zod,"optin",()=>e.innerType._zod.optin),Be(t._zod,"optout",()=>e.innerType._zod.optout),Be(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Ml(r.source)}|null)$`):void 0}),Be(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),$0=j("$ZodDefault",(t,e)=>{Me.init(t,e),t._zod.optin="optional",Be(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>BC(a,e)):BC(i,e)}});function BC(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var I0=j("$ZodPrefault",(t,e)=>{Me.init(t,e),t._zod.optin="optional",Be(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),E0=j("$ZodNonOptional",(t,e)=>{Me.init(t,e),Be(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>KC(a,t)):KC(i,t)}});function KC(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var P0=j("$ZodSuccess",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new qo("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),T0=j("$ZodCatch",(t,e)=>{Me.init(t,e),Be(t._zod,"optin",()=>e.innerType._zod.optin),Be(t._zod,"optout",()=>e.innerType._zod.optout),Be(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.value,a.issues.length&&(r.value=e.catchValue({...r,error:{issues:a.issues.map(o=>hn(o,n,hr()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>hn(a,n,hr()))},input:r.value}),r.issues=[]),r)}}),z0=j("$ZodNaN",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),O0=j("$ZodPipe",(t,e)=>{Me.init(t,e),Be(t._zod,"values",()=>e.in._zod.values),Be(t._zod,"optin",()=>e.in._zod.optin),Be(t._zod,"optout",()=>e.out._zod.optout),Be(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=e.out._zod.run(r,n);return a instanceof Promise?a.then(o=>Dm(o,e.in,n)):Dm(a,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(a=>Dm(a,e.out,n)):Dm(i,e.out,n)}});function Dm(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var rd=j("$ZodCodec",(t,e)=>{Me.init(t,e),Be(t._zod,"values",()=>e.in._zod.values),Be(t._zod,"optin",()=>e.in._zod.optin),Be(t._zod,"optout",()=>e.out._zod.optout),Be(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let a=e.in._zod.run(r,n);return a instanceof Promise?a.then(o=>Mm(o,e,n)):Mm(a,e,n)}else{let a=e.out._zod.run(r,n);return a instanceof Promise?a.then(o=>Mm(o,e,n)):Mm(a,e,n)}}});function Mm(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(a=>qm(t,a,e.out,r)):qm(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(a=>qm(t,a,e.in,r)):qm(t,i,e.in,r)}}function qm(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}var j0=j("$ZodReadonly",(t,e)=>{Me.init(t,e),Be(t._zod,"propValues",()=>e.innerType._zod.propValues),Be(t._zod,"values",()=>e.innerType._zod.values),Be(t._zod,"optin",()=>e.innerType?._zod?.optin),Be(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(HC):HC(i)}});function HC(t){return t.value=Object.freeze(t.value),t}var N0=j("$ZodTemplateLiteral",(t,e)=>{Me.init(t,e);let r=[];for(let n of e.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 a=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,o))}else if(n===null||Qx.has(typeof n))r.push(Jn(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)}),R0=j("$ZodFunction",(t,e)=>(Me.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?Wl(t._def.input,n):n,a=Reflect.apply(r,this,i);return t._def.output?Wl(t._def.output,a):a}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await Kl(t._def.input,n):n,a=await Reflect.apply(r,this,i);return t._def.output?await Kl(t._def.output,a):a}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new Vm({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t)),C0=j("$ZodPromise",(t,e)=>{Me.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),A0=j("$ZodLazy",(t,e)=>{Me.init(t,e),Be(t._zod,"innerType",()=>e.getter()),Be(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Be(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Be(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Be(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),U0=j("$ZodCustom",(t,e)=>{At.init(t,e),Me.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(a=>GC(a,r,n,t));GC(i,r,n,t)}});function GC(t,e,r,n){if(!t){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),e.issues.push(hc(i))}}var NQ=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(i){return t[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 a=n[i.expected]??i.expected,o=je(i.input),s=n[o]??o;return`Invalid input: expected ${a}, received ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ze(i.values[0])}`:`Invalid option: expected one of ${Te(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.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":""}: ${Te(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 D0(){return{localeError:NQ()}}var tA;var q0=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Z0(){return new q0}(tA=globalThis).__zod_globalRegistry??(tA.__zod_globalRegistry=Z0());var Jr=globalThis.__zod_globalRegistry;function L0(t,e){return new t({type:"string",...se(e)})}function Bm(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...se(e)})}function nd(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...se(e)})}function Km(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...se(e)})}function Hm(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...se(e)})}function Gm(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...se(e)})}function Qm(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...se(e)})}function id(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...se(e)})}function Ym(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...se(e)})}function Jm(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...se(e)})}function Xm(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...se(e)})}function eh(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...se(e)})}function th(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...se(e)})}function rh(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...se(e)})}function nh(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...se(e)})}function ih(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...se(e)})}function ah(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...se(e)})}function F0(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...se(e)})}function oh(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...se(e)})}function sh(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...se(e)})}function ch(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...se(e)})}function uh(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...se(e)})}function lh(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...se(e)})}function dh(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...se(e)})}function V0(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...se(e)})}function W0(t,e){return new t({type:"string",format:"date",check:"string_format",...se(e)})}function B0(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...se(e)})}function K0(t,e){return new t({type:"string",format:"duration",check:"string_format",...se(e)})}function H0(t,e){return new t({type:"number",checks:[],...se(e)})}function G0(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...se(e)})}function Q0(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...se(e)})}function Y0(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...se(e)})}function J0(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...se(e)})}function X0(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...se(e)})}function ek(t,e){return new t({type:"boolean",...se(e)})}function tk(t,e){return new t({type:"bigint",...se(e)})}function rk(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...se(e)})}function nk(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...se(e)})}function ik(t,e){return new t({type:"symbol",...se(e)})}function ak(t,e){return new t({type:"undefined",...se(e)})}function ok(t,e){return new t({type:"null",...se(e)})}function sk(t){return new t({type:"any"})}function ck(t){return new t({type:"unknown"})}function uk(t,e){return new t({type:"never",...se(e)})}function lk(t,e){return new t({type:"void",...se(e)})}function dk(t,e){return new t({type:"date",...se(e)})}function pk(t,e){return new t({type:"nan",...se(e)})}function pa(t,e){return new Pw({check:"less_than",...se(e),value:t,inclusive:!1})}function Rn(t,e){return new Pw({check:"less_than",...se(e),value:t,inclusive:!0})}function fa(t,e){return new Tw({check:"greater_than",...se(e),value:t,inclusive:!1})}function Xr(t,e){return new Tw({check:"greater_than",...se(e),value:t,inclusive:!0})}function fk(t){return fa(0,t)}function mk(t){return pa(0,t)}function hk(t){return Rn(0,t)}function gk(t){return Xr(0,t)}function Vo(t,e){return new _C({check:"multiple_of",...se(e),value:t})}function Wo(t,e){return new wC({check:"max_size",...se(e),maximum:t})}function ma(t,e){return new kC({check:"min_size",...se(e),minimum:t})}function vc(t,e){return new SC({check:"size_equals",...se(e),size:t})}function yc(t,e){return new $C({check:"max_length",...se(e),maximum:t})}function Ya(t,e){return new IC({check:"min_length",...se(e),minimum:t})}function _c(t,e){return new EC({check:"length_equals",...se(e),length:t})}function ad(t,e){return new PC({check:"string_format",format:"regex",...se(e),pattern:t})}function od(t){return new TC({check:"string_format",format:"lowercase",...se(t)})}function sd(t){return new zC({check:"string_format",format:"uppercase",...se(t)})}function cd(t,e){return new OC({check:"string_format",format:"includes",...se(e),includes:t})}function ud(t,e){return new jC({check:"string_format",format:"starts_with",...se(e),prefix:t})}function ld(t,e){return new NC({check:"string_format",format:"ends_with",...se(e),suffix:t})}function vk(t,e,r){return new RC({check:"property",property:t,schema:e,...se(r)})}function dd(t,e){return new CC({check:"mime_type",mime:t,...se(e)})}function Bi(t){return new AC({check:"overwrite",tx:t})}function pd(t){return Bi(e=>e.normalize(t))}function fd(){return Bi(t=>t.trim())}function md(){return Bi(t=>t.toLowerCase())}function hd(){return Bi(t=>t.toUpperCase())}function ph(){return Bi(t=>Kx(t))}function rA(t,e,r){return new t({type:"array",element:e,...se(r)})}function yk(t,e){return new t({type:"file",...se(e)})}function _k(t,e,r){let n=se(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function bk(t,e,r){return new t({type:"custom",check:"custom",fn:e,...se(r)})}function xk(t){let e=UQ(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(hc(n,r.value,e._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=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(hc(i))}},t(r.value,r)));return e}function UQ(t,e){let r=new At({check:"custom",...se(e)});return r._zod.check=t,r}function wk(t){let e=new At({check:"describe"});return e._zod.onattach=[r=>{let n=Jr.get(r)??{};Jr.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function kk(t){let e=new At({check:"meta"});return e._zod.onattach=[r=>{let n=Jr.get(r)??{};Jr.add(r,{...n,...t})}],e._zod.check=()=>{},e}function Sk(t,e){let r=se(e),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 a=new Set(n),o=new Set(i),s=t.Codec??rd,c=t.Boolean??ed,u=t.String??Fo,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new s({type:"pipe",in:l,out:d,transform:((p,m)=>{let v=p;return r.case!=="sensitive"&&(v=v.toLowerCase()),a.has(v)?!0:o.has(v)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((p,m)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function bc(t,e,r,n={}){let i=se(n),a={...se(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(a.pattern=r),new t(a)}function xc(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Jr,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function jt(t,e,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,a=e.seen.get(t);if(a)return a.count++,r.schemaPath.includes(t)&&(a.cycle=r.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);let s=t._zod.toJSONSchema?.();if(s)o.schema=s;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,l);else{let f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,l)}let d=t._zod.parent;d&&(o.ref||(o.ref=d),jt(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(o.schema,c),e.io==="input"&&en(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function wc(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let o of t.seen.entries()){let s=t.metadataRegistry.get(o[0])?.id;if(s){let c=n.get(s);if(c&&c!==o[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,o[0])}}let i=o=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(o[0])?.id,f=t.external.uri??(m=>m);if(d)return{ref:f(d)};let p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${s}/${p}`}}if(o[1]===r)return{ref:"#"};let u=`#/${s}/`,l=o[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+l}},a=o=>{if(o[1].schema.$ref)return;let s=o[1],{ref:c,defId:u}=i(o);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(t.cycles==="throw")for(let o of t.seen.entries()){let s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
95
|
+
|
|
96
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of t.seen.entries()){let s=o[1];if(e===o[0]){a(o);continue}if(t.external){let u=t.external.registry.get(o[0])?.id;if(e!==o[0]&&u){a(o);continue}}if(t.metadataRegistry.get(o[0])?.id){a(o);continue}if(s.cycle){a(o);continue}if(s.count>1&&t.reused==="ref"){a(o);continue}}}function kc(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=o=>{let s=t.seen.get(o);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){n(l);let f=t.seen.get(l),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.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 v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(p.$ref&&f.def)for(let v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}let d=o._zod.parent;if(d&&d!==l){n(d);let f=t.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]}t.override({zodSchema:o,jsonSchema:c,path:s.path??[]})};for(let o of[...t.seen.entries()].reverse())n(o[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,r.def??r.schema);let a=t.external?.defs??{};for(let o of t.seen.entries()){let s=o[1];s.def&&s.defId&&(a[s.defId]=s.def)}t.external||Object.keys(a).length>0&&(t.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{let o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:gd(e,"input",t.processors),output:gd(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function en(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return en(n.element,r);if(n.type==="set")return en(n.valueType,r);if(n.type==="lazy")return en(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 en(n.innerType,r);if(n.type==="intersection")return en(n.left,r)||en(n.right,r);if(n.type==="record"||n.type==="map")return en(n.keyType,r)||en(n.valueType,r);if(n.type==="pipe")return en(n.in,r)||en(n.out,r);if(n.type==="object"){for(let i in n.shape)if(en(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(en(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(en(i,r))return!0;return!!(n.rest&&en(n.rest,r))}return!1}var nA=(t,e={})=>r=>{let n=xc({...r,processors:e});return jt(t,n),wc(n,t),kc(n,t)},gd=(t,e,r={})=>n=>{let{libraryOptions:i,target:a}=n??{},o=xc({...i??{},target:a,io:e,processors:r});return jt(t,o),wc(o,t),kc(o,t)};var DQ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ik=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof o=="number"&&(i.maxLength=o),s&&(i.format=DQ[s]??s,i.format===""&&delete i.format,s==="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=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Ek=(t,e,r,n)=>{let i=r,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=t._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof a=="number"&&(i.minimum=a,typeof l=="number"&&e.target!=="draft-04"&&(l>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof o=="number"&&(i.maximum=o,typeof u=="number"&&e.target!=="draft-04"&&(u<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},Pk=(t,e,r,n)=>{r.type="boolean"},Tk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},zk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ok=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},jk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Nk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Rk=(t,e,r,n)=>{r.not={}},Ck=(t,e,r,n)=>{},Ak=(t,e,r,n)=>{},Uk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Dk=(t,e,r,n)=>{let i=t._zod.def,a=Dl(i.entries);a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),r.enum=a},Mk=(t,e,r,n)=>{let i=t._zod.def,a=[];for(let o of i.values)if(o===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let o=a[0];r.type=o===null?"null":typeof o,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[o]:r.const=o}else a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),a.every(o=>typeof o=="boolean")&&(r.type="boolean"),a.every(o=>o===null)&&(r.type="null"),r.enum=a},qk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Zk=(t,e,r,n)=>{let i=r,a=t._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=a.source},Lk=(t,e,r,n)=>{let i=r,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:c}=t._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,a)},Fk=(t,e,r,n)=>{r.type="boolean"},Vk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Wk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Bk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Kk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Hk=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Gk=(t,e,r,n)=>{let i=r,a=t._zod.def,{minimum:o,maximum:s}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=jt(a.element,e,{...n,path:[...n.path,"items"]})},Qk=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="object",i.properties={};let o=a.shape;for(let u in o)i.properties[u]=jt(o[u],e,{...n,path:[...n.path,"properties",u]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(u=>{let l=a.shape[u]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=jt(a.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},fh=(t,e,r,n)=>{let i=t._zod.def,a=i.inclusive===!1,o=i.options.map((s,c)=>jt(s,e,{...n,path:[...n.path,a?"oneOf":"anyOf",c]}));a?r.oneOf=o:r.anyOf=o},Yk=(t,e,r,n)=>{let i=t._zod.def,a=jt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=jt(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];r.allOf=c},Jk=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="array";let o=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=a.items.map((f,p)=>jt(f,e,{...n,path:[...n.path,o,p]})),u=a.rest?jt(a.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[a.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):e.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}=t._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)},Xk=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="object";let o=a.keyType,c=o._zod.bag?.patterns;if(a.mode==="loose"&&c&&c.size>0){let l=jt(a.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=jt(a.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=jt(a.valueType,e,{...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)}},eS=(t,e,r,n)=>{let i=t._zod.def,a=jt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},tS=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},rS=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},nS=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},iS=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.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},aS=(t,e,r,n)=>{let i=t._zod.def,a=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;jt(a,e,n);let o=e.seen.get(t);o.ref=a},oS=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,r.readOnly=!0},sS=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},mh=(t,e,r,n)=>{let i=t._zod.def;jt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},cS=(t,e,r,n)=>{let i=t._zod.innerType;jt(i,e,n);let a=e.seen.get(t);a.ref=i},$k={string:Ik,number:Ek,boolean:Pk,bigint:Tk,symbol:zk,null:Ok,undefined:jk,void:Nk,never:Rk,any:Ck,unknown:Ak,date:Uk,enum:Dk,literal:Mk,nan:qk,template_literal:Zk,file:Lk,success:Fk,custom:Vk,function:Wk,transform:Bk,map:Kk,set:Hk,array:Gk,object:Qk,union:fh,intersection:Yk,tuple:Jk,record:Xk,nullable:eS,nonoptional:tS,default:rS,prefault:nS,catch:iS,pipe:aS,readonly:oS,promise:sS,optional:mh,lazy:cS};function Sc(t,e){if("_idmap"in t){let n=t,i=xc({...e,processors:$k}),a={};for(let c of n._idmap.entries()){let[u,l]=c;jt(l,i)}let o={},s={registry:n,uri:e?.uri,defs:a};i.external=s;for(let c of n._idmap.entries()){let[u,l]=c;wc(i,l),o[u]=kc(i,l)}if(Object.keys(a).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[c]:a}}return{schemas:o}}let r=xc({...e,processors:$k});return jt(t,r),wc(r,t),kc(r,t)}var vd={};aa(vd,{ZodAny:()=>xA,ZodArray:()=>$A,ZodBase64:()=>OS,ZodBase64URL:()=>jS,ZodBigInt:()=>kh,ZodBigIntFormat:()=>CS,ZodBoolean:()=>wh,ZodCIDRv4:()=>TS,ZodCIDRv6:()=>zS,ZodCUID:()=>wS,ZodCUID2:()=>kS,ZodCatch:()=>WA,ZodCodec:()=>LS,ZodCustom:()=>Th,ZodCustomStringFormat:()=>_d,ZodDate:()=>US,ZodDefault:()=>MA,ZodDiscriminatedUnion:()=>EA,ZodE164:()=>NS,ZodEmail:()=>_S,ZodEmoji:()=>bS,ZodEnum:()=>yd,ZodExactOptional:()=>AA,ZodFile:()=>RA,ZodFunction:()=>eU,ZodGUID:()=>gh,ZodIPv4:()=>ES,ZodIPv6:()=>PS,ZodIntersection:()=>PA,ZodJWT:()=>RS,ZodKSUID:()=>IS,ZodLazy:()=>YA,ZodLiteral:()=>NA,ZodMAC:()=>vA,ZodMap:()=>OA,ZodNaN:()=>KA,ZodNanoID:()=>xS,ZodNever:()=>kA,ZodNonOptional:()=>qS,ZodNull:()=>bA,ZodNullable:()=>DA,ZodNumber:()=>xh,ZodNumberFormat:()=>$c,ZodObject:()=>$h,ZodOptional:()=>MS,ZodPipe:()=>ZS,ZodPrefault:()=>ZA,ZodPromise:()=>XA,ZodReadonly:()=>HA,ZodRecord:()=>Ph,ZodSet:()=>jA,ZodString:()=>_h,ZodStringFormat:()=>Ut,ZodSuccess:()=>VA,ZodSymbol:()=>yA,ZodTemplateLiteral:()=>QA,ZodTransform:()=>CA,ZodTuple:()=>TA,ZodType:()=>Ke,ZodULID:()=>SS,ZodURL:()=>bh,ZodUUID:()=>ha,ZodUndefined:()=>_A,ZodUnion:()=>Ih,ZodUnknown:()=>wA,ZodVoid:()=>SA,ZodXID:()=>$S,ZodXor:()=>IA,_ZodString:()=>yS,_default:()=>qA,_function:()=>L8,any:()=>S8,array:()=>it,base64:()=>s8,base64url:()=>c8,bigint:()=>_8,boolean:()=>fr,catch:()=>BA,check:()=>F8,cidrv4:()=>a8,cidrv6:()=>o8,codec:()=>M8,cuid:()=>YQ,cuid2:()=>JQ,custom:()=>FS,date:()=>I8,describe:()=>V8,discriminatedUnion:()=>Eh,e164:()=>u8,email:()=>ZQ,emoji:()=>GQ,enum:()=>Dr,exactOptional:()=>UA,file:()=>C8,float32:()=>h8,float64:()=>g8,function:()=>L8,guid:()=>LQ,hash:()=>m8,hex:()=>f8,hostname:()=>p8,httpUrl:()=>HQ,instanceof:()=>B8,int:()=>vS,int32:()=>v8,int64:()=>b8,intersection:()=>bd,ipv4:()=>r8,ipv6:()=>i8,json:()=>H8,jwt:()=>l8,keyof:()=>E8,ksuid:()=>t8,lazy:()=>JA,literal:()=>xe,looseObject:()=>Ur,looseRecord:()=>O8,mac:()=>n8,map:()=>j8,meta:()=>W8,nan:()=>D8,nanoid:()=>QQ,nativeEnum:()=>R8,never:()=>AS,nonoptional:()=>FA,null:()=>Sh,nullable:()=>vh,nullish:()=>A8,number:()=>Et,object:()=>de,optional:()=>Vt,partialRecord:()=>z8,pipe:()=>yh,prefault:()=>LA,preprocess:()=>zh,promise:()=>Z8,readonly:()=>GA,record:()=>Nt,refine:()=>tU,set:()=>N8,strictObject:()=>P8,string:()=>L,stringFormat:()=>d8,stringbool:()=>K8,success:()=>U8,superRefine:()=>rU,symbol:()=>w8,templateLiteral:()=>q8,transform:()=>DS,tuple:()=>zA,uint32:()=>y8,uint64:()=>x8,ulid:()=>XQ,undefined:()=>k8,union:()=>Mt,unknown:()=>Dt,url:()=>KQ,uuid:()=>FQ,uuidv4:()=>VQ,uuidv6:()=>WQ,uuidv7:()=>BQ,void:()=>$8,xid:()=>e8,xor:()=>T8});var hh={};aa(hh,{endsWith:()=>ld,gt:()=>fa,gte:()=>Xr,includes:()=>cd,length:()=>_c,lowercase:()=>od,lt:()=>pa,lte:()=>Rn,maxLength:()=>yc,maxSize:()=>Wo,mime:()=>dd,minLength:()=>Ya,minSize:()=>ma,multipleOf:()=>Vo,negative:()=>mk,nonnegative:()=>gk,nonpositive:()=>hk,normalize:()=>pd,overwrite:()=>Bi,positive:()=>fk,property:()=>vk,regex:()=>ad,size:()=>vc,slugify:()=>ph,startsWith:()=>ud,toLowerCase:()=>md,toUpperCase:()=>hd,trim:()=>fd,uppercase:()=>sd});var Bo={};aa(Bo,{ZodISODate:()=>dS,ZodISODateTime:()=>uS,ZodISODuration:()=>hS,ZodISOTime:()=>fS,date:()=>pS,datetime:()=>lS,duration:()=>gS,time:()=>mS});var uS=j("ZodISODateTime",(t,e)=>{Lw.init(t,e),Ut.init(t,e)});function lS(t){return V0(uS,t)}var dS=j("ZodISODate",(t,e)=>{Fw.init(t,e),Ut.init(t,e)});function pS(t){return W0(dS,t)}var fS=j("ZodISOTime",(t,e)=>{Vw.init(t,e),Ut.init(t,e)});function mS(t){return B0(fS,t)}var hS=j("ZodISODuration",(t,e)=>{Ww.init(t,e),Ut.init(t,e)});function gS(t){return K0(hS,t)}var iA=(t,e)=>{Om.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Nm(t,r)},flatten:{value:r=>jm(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,fc,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,fc,2)}},isEmpty:{get(){return t.issues.length===0}}})},X1e=j("ZodError",iA),Cn=j("ZodError",iA,{Parent:Error});var aA=Vl(Cn),oA=Bl(Cn),sA=Hl(Cn),cA=Gl(Cn),uA=oC(Cn),lA=sC(Cn),dA=cC(Cn),pA=uC(Cn),fA=lC(Cn),mA=dC(Cn),hA=pC(Cn),gA=fC(Cn);var Ke=j("ZodType",(t,e)=>(Me.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:gd(t,"input"),output:gd(t,"output")}}),t.toJSONSchema=nA(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(Y.mergeDefs(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>Yr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>aA(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>sA(t,r,n),t.parseAsync=async(r,n)=>oA(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>cA(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>uA(t,r,n),t.decode=(r,n)=>lA(t,r,n),t.encodeAsync=async(r,n)=>dA(t,r,n),t.decodeAsync=async(r,n)=>pA(t,r,n),t.safeEncode=(r,n)=>fA(t,r,n),t.safeDecode=(r,n)=>mA(t,r,n),t.safeEncodeAsync=async(r,n)=>hA(t,r,n),t.safeDecodeAsync=async(r,n)=>gA(t,r,n),t.refine=(r,n)=>t.check(tU(r,n)),t.superRefine=r=>t.check(rU(r)),t.overwrite=r=>t.check(Bi(r)),t.optional=()=>Vt(t),t.exactOptional=()=>UA(t),t.nullable=()=>vh(t),t.nullish=()=>Vt(vh(t)),t.nonoptional=r=>FA(t,r),t.array=()=>it(t),t.or=r=>Mt([t,r]),t.and=r=>bd(t,r),t.transform=r=>yh(t,DS(r)),t.default=r=>qA(t,r),t.prefault=r=>LA(t,r),t.catch=r=>BA(t,r),t.pipe=r=>yh(t,r),t.readonly=()=>GA(t),t.describe=r=>{let n=t.clone();return Jr.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return Jr.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Jr.get(t);let n=t.clone();return Jr.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),yS=j("_ZodString",(t,e)=>{Fo.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,a)=>Ik(t,n,i,a);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(ad(...n)),t.includes=(...n)=>t.check(cd(...n)),t.startsWith=(...n)=>t.check(ud(...n)),t.endsWith=(...n)=>t.check(ld(...n)),t.min=(...n)=>t.check(Ya(...n)),t.max=(...n)=>t.check(yc(...n)),t.length=(...n)=>t.check(_c(...n)),t.nonempty=(...n)=>t.check(Ya(1,...n)),t.lowercase=n=>t.check(od(n)),t.uppercase=n=>t.check(sd(n)),t.trim=()=>t.check(fd()),t.normalize=(...n)=>t.check(pd(...n)),t.toLowerCase=()=>t.check(md()),t.toUpperCase=()=>t.check(hd()),t.slugify=()=>t.check(ph())}),_h=j("ZodString",(t,e)=>{Fo.init(t,e),yS.init(t,e),t.email=r=>t.check(Bm(_S,r)),t.url=r=>t.check(id(bh,r)),t.jwt=r=>t.check(dh(RS,r)),t.emoji=r=>t.check(Ym(bS,r)),t.guid=r=>t.check(nd(gh,r)),t.uuid=r=>t.check(Km(ha,r)),t.uuidv4=r=>t.check(Hm(ha,r)),t.uuidv6=r=>t.check(Gm(ha,r)),t.uuidv7=r=>t.check(Qm(ha,r)),t.nanoid=r=>t.check(Jm(xS,r)),t.guid=r=>t.check(nd(gh,r)),t.cuid=r=>t.check(Xm(wS,r)),t.cuid2=r=>t.check(eh(kS,r)),t.ulid=r=>t.check(th(SS,r)),t.base64=r=>t.check(ch(OS,r)),t.base64url=r=>t.check(uh(jS,r)),t.xid=r=>t.check(rh($S,r)),t.ksuid=r=>t.check(nh(IS,r)),t.ipv4=r=>t.check(ih(ES,r)),t.ipv6=r=>t.check(ah(PS,r)),t.cidrv4=r=>t.check(oh(TS,r)),t.cidrv6=r=>t.check(sh(zS,r)),t.e164=r=>t.check(lh(NS,r)),t.datetime=r=>t.check(lS(r)),t.date=r=>t.check(pS(r)),t.time=r=>t.check(mS(r)),t.duration=r=>t.check(gS(r))});function L(t){return L0(_h,t)}var Ut=j("ZodStringFormat",(t,e)=>{Ot.init(t,e),yS.init(t,e)}),_S=j("ZodEmail",(t,e)=>{Nw.init(t,e),Ut.init(t,e)});function ZQ(t){return Bm(_S,t)}var gh=j("ZodGUID",(t,e)=>{Ow.init(t,e),Ut.init(t,e)});function LQ(t){return nd(gh,t)}var ha=j("ZodUUID",(t,e)=>{jw.init(t,e),Ut.init(t,e)});function FQ(t){return Km(ha,t)}function VQ(t){return Hm(ha,t)}function WQ(t){return Gm(ha,t)}function BQ(t){return Qm(ha,t)}var bh=j("ZodURL",(t,e)=>{Rw.init(t,e),Ut.init(t,e)});function KQ(t){return id(bh,t)}function HQ(t){return id(bh,{protocol:/^https?$/,hostname:Xn.domain,...Y.normalizeParams(t)})}var bS=j("ZodEmoji",(t,e)=>{Cw.init(t,e),Ut.init(t,e)});function GQ(t){return Ym(bS,t)}var xS=j("ZodNanoID",(t,e)=>{Aw.init(t,e),Ut.init(t,e)});function QQ(t){return Jm(xS,t)}var wS=j("ZodCUID",(t,e)=>{Uw.init(t,e),Ut.init(t,e)});function YQ(t){return Xm(wS,t)}var kS=j("ZodCUID2",(t,e)=>{Dw.init(t,e),Ut.init(t,e)});function JQ(t){return eh(kS,t)}var SS=j("ZodULID",(t,e)=>{Mw.init(t,e),Ut.init(t,e)});function XQ(t){return th(SS,t)}var $S=j("ZodXID",(t,e)=>{qw.init(t,e),Ut.init(t,e)});function e8(t){return rh($S,t)}var IS=j("ZodKSUID",(t,e)=>{Zw.init(t,e),Ut.init(t,e)});function t8(t){return nh(IS,t)}var ES=j("ZodIPv4",(t,e)=>{Bw.init(t,e),Ut.init(t,e)});function r8(t){return ih(ES,t)}var vA=j("ZodMAC",(t,e)=>{Hw.init(t,e),Ut.init(t,e)});function n8(t){return F0(vA,t)}var PS=j("ZodIPv6",(t,e)=>{Kw.init(t,e),Ut.init(t,e)});function i8(t){return ah(PS,t)}var TS=j("ZodCIDRv4",(t,e)=>{Gw.init(t,e),Ut.init(t,e)});function a8(t){return oh(TS,t)}var zS=j("ZodCIDRv6",(t,e)=>{Qw.init(t,e),Ut.init(t,e)});function o8(t){return sh(zS,t)}var OS=j("ZodBase64",(t,e)=>{Yw.init(t,e),Ut.init(t,e)});function s8(t){return ch(OS,t)}var jS=j("ZodBase64URL",(t,e)=>{Jw.init(t,e),Ut.init(t,e)});function c8(t){return uh(jS,t)}var NS=j("ZodE164",(t,e)=>{Xw.init(t,e),Ut.init(t,e)});function u8(t){return lh(NS,t)}var RS=j("ZodJWT",(t,e)=>{e0.init(t,e),Ut.init(t,e)});function l8(t){return dh(RS,t)}var _d=j("ZodCustomStringFormat",(t,e)=>{t0.init(t,e),Ut.init(t,e)});function d8(t,e,r={}){return bc(_d,t,e,r)}function p8(t){return bc(_d,"hostname",Xn.hostname,t)}function f8(t){return bc(_d,"hex",Xn.hex,t)}function m8(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=Xn[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return bc(_d,n,i,e)}var xh=j("ZodNumber",(t,e)=>{Lm.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,a)=>Ek(t,n,i,a),t.gt=(n,i)=>t.check(fa(n,i)),t.gte=(n,i)=>t.check(Xr(n,i)),t.min=(n,i)=>t.check(Xr(n,i)),t.lt=(n,i)=>t.check(pa(n,i)),t.lte=(n,i)=>t.check(Rn(n,i)),t.max=(n,i)=>t.check(Rn(n,i)),t.int=n=>t.check(vS(n)),t.safe=n=>t.check(vS(n)),t.positive=n=>t.check(fa(0,n)),t.nonnegative=n=>t.check(Xr(0,n)),t.negative=n=>t.check(pa(0,n)),t.nonpositive=n=>t.check(Rn(0,n)),t.multipleOf=(n,i)=>t.check(Vo(n,i)),t.step=(n,i)=>t.check(Vo(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Et(t){return H0(xh,t)}var $c=j("ZodNumberFormat",(t,e)=>{r0.init(t,e),xh.init(t,e)});function vS(t){return G0($c,t)}function h8(t){return Q0($c,t)}function g8(t){return Y0($c,t)}function v8(t){return J0($c,t)}function y8(t){return X0($c,t)}var wh=j("ZodBoolean",(t,e)=>{ed.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Pk(t,r,n,i)});function fr(t){return ek(wh,t)}var kh=j("ZodBigInt",(t,e)=>{Fm.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,a)=>Tk(t,n,i,a),t.gte=(n,i)=>t.check(Xr(n,i)),t.min=(n,i)=>t.check(Xr(n,i)),t.gt=(n,i)=>t.check(fa(n,i)),t.gte=(n,i)=>t.check(Xr(n,i)),t.min=(n,i)=>t.check(Xr(n,i)),t.lt=(n,i)=>t.check(pa(n,i)),t.lte=(n,i)=>t.check(Rn(n,i)),t.max=(n,i)=>t.check(Rn(n,i)),t.positive=n=>t.check(fa(BigInt(0),n)),t.negative=n=>t.check(pa(BigInt(0),n)),t.nonpositive=n=>t.check(Rn(BigInt(0),n)),t.nonnegative=n=>t.check(Xr(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(Vo(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function _8(t){return tk(kh,t)}var CS=j("ZodBigIntFormat",(t,e)=>{n0.init(t,e),kh.init(t,e)});function b8(t){return rk(CS,t)}function x8(t){return nk(CS,t)}var yA=j("ZodSymbol",(t,e)=>{i0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>zk(t,r,n,i)});function w8(t){return ik(yA,t)}var _A=j("ZodUndefined",(t,e)=>{a0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>jk(t,r,n,i)});function k8(t){return ak(_A,t)}var bA=j("ZodNull",(t,e)=>{o0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ok(t,r,n,i)});function Sh(t){return ok(bA,t)}var xA=j("ZodAny",(t,e)=>{s0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ck(t,r,n,i)});function S8(){return sk(xA)}var wA=j("ZodUnknown",(t,e)=>{c0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Ak(t,r,n,i)});function Dt(){return ck(wA)}var kA=j("ZodNever",(t,e)=>{u0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Rk(t,r,n,i)});function AS(t){return uk(kA,t)}var SA=j("ZodVoid",(t,e)=>{l0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Nk(t,r,n,i)});function $8(t){return lk(SA,t)}var US=j("ZodDate",(t,e)=>{d0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,a)=>Uk(t,n,i,a),t.min=(n,i)=>t.check(Xr(n,i)),t.max=(n,i)=>t.check(Rn(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function I8(t){return dk(US,t)}var $A=j("ZodArray",(t,e)=>{p0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Gk(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(Ya(r,n)),t.nonempty=r=>t.check(Ya(1,r)),t.max=(r,n)=>t.check(yc(r,n)),t.length=(r,n)=>t.check(_c(r,n)),t.unwrap=()=>t.element});function it(t,e){return rA($A,t,e)}function E8(t){let e=t._zod.def.shape;return Dr(Object.keys(e))}var $h=j("ZodObject",(t,e)=>{eA.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Qk(t,r,n,i),Y.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Dr(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Dt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Dt()}),t.strict=()=>t.clone({...t._zod.def,catchall:AS()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>Y.extend(t,r),t.safeExtend=r=>Y.safeExtend(t,r),t.merge=r=>Y.merge(t,r),t.pick=r=>Y.pick(t,r),t.omit=r=>Y.omit(t,r),t.partial=(...r)=>Y.partial(MS,t,r[0]),t.required=(...r)=>Y.required(qS,t,r[0])});function de(t,e){let r={type:"object",shape:t??{},...Y.normalizeParams(e)};return new $h(r)}function P8(t,e){return new $h({type:"object",shape:t,catchall:AS(),...Y.normalizeParams(e)})}function Ur(t,e){return new $h({type:"object",shape:t,catchall:Dt(),...Y.normalizeParams(e)})}var Ih=j("ZodUnion",(t,e)=>{td.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>fh(t,r,n,i),t.options=e.options});function Mt(t,e){return new Ih({type:"union",options:t,...Y.normalizeParams(e)})}var IA=j("ZodXor",(t,e)=>{Ih.init(t,e),f0.init(t,e),t._zod.processJSONSchema=(r,n,i)=>fh(t,r,n,i),t.options=e.options});function T8(t,e){return new IA({type:"union",options:t,inclusive:!1,...Y.normalizeParams(e)})}var EA=j("ZodDiscriminatedUnion",(t,e)=>{Ih.init(t,e),m0.init(t,e)});function Eh(t,e,r){return new EA({type:"union",options:e,discriminator:t,...Y.normalizeParams(r)})}var PA=j("ZodIntersection",(t,e)=>{h0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Yk(t,r,n,i)});function bd(t,e){return new PA({type:"intersection",left:t,right:e})}var TA=j("ZodTuple",(t,e)=>{Vm.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Jk(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function zA(t,e,r){let n=e instanceof Me,i=n?r:e,a=n?e:null;return new TA({type:"tuple",items:t,rest:a,...Y.normalizeParams(i)})}var Ph=j("ZodRecord",(t,e)=>{g0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Xk(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function Nt(t,e,r){return new Ph({type:"record",keyType:t,valueType:e,...Y.normalizeParams(r)})}function z8(t,e,r){let n=Yr(t);return n._zod.values=void 0,new Ph({type:"record",keyType:n,valueType:e,...Y.normalizeParams(r)})}function O8(t,e,r){return new Ph({type:"record",keyType:t,valueType:e,mode:"loose",...Y.normalizeParams(r)})}var OA=j("ZodMap",(t,e)=>{v0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Kk(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(ma(...r)),t.nonempty=r=>t.check(ma(1,r)),t.max=(...r)=>t.check(Wo(...r)),t.size=(...r)=>t.check(vc(...r))});function j8(t,e,r){return new OA({type:"map",keyType:t,valueType:e,...Y.normalizeParams(r)})}var jA=j("ZodSet",(t,e)=>{y0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Hk(t,r,n,i),t.min=(...r)=>t.check(ma(...r)),t.nonempty=r=>t.check(ma(1,r)),t.max=(...r)=>t.check(Wo(...r)),t.size=(...r)=>t.check(vc(...r))});function N8(t,e){return new jA({type:"set",valueType:t,...Y.normalizeParams(e)})}var yd=j("ZodEnum",(t,e)=>{_0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,a)=>Dk(t,n,i,a),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let a={};for(let o of n)if(r.has(o))a[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new yd({...e,checks:[],...Y.normalizeParams(i),entries:a})},t.exclude=(n,i)=>{let a={...e.entries};for(let o of n)if(r.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new yd({...e,checks:[],...Y.normalizeParams(i),entries:a})}});function Dr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new yd({type:"enum",entries:r,...Y.normalizeParams(e)})}function R8(t,e){return new yd({type:"enum",entries:t,...Y.normalizeParams(e)})}var NA=j("ZodLiteral",(t,e)=>{b0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Mk(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function xe(t,e){return new NA({type:"literal",values:Array.isArray(t)?t:[t],...Y.normalizeParams(e)})}var RA=j("ZodFile",(t,e)=>{x0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Lk(t,r,n,i),t.min=(r,n)=>t.check(ma(r,n)),t.max=(r,n)=>t.check(Wo(r,n)),t.mime=(r,n)=>t.check(dd(Array.isArray(r)?r:[r],n))});function C8(t){return yk(RA,t)}var CA=j("ZodTransform",(t,e)=>{w0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Bk(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new qo(t.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(Y.issue(a,r.value,e));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(Y.issue(o))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});function DS(t){return new CA({type:"transform",transform:t})}var MS=j("ZodOptional",(t,e)=>{Wm.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>mh(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Vt(t){return new MS({type:"optional",innerType:t})}var AA=j("ZodExactOptional",(t,e)=>{k0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>mh(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function UA(t){return new AA({type:"optional",innerType:t})}var DA=j("ZodNullable",(t,e)=>{S0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>eS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function vh(t){return new DA({type:"nullable",innerType:t})}function A8(t){return Vt(vh(t))}var MA=j("ZodDefault",(t,e)=>{$0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>rS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function qA(t,e){return new MA({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():Y.shallowClone(e)}})}var ZA=j("ZodPrefault",(t,e)=>{I0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>nS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function LA(t,e){return new ZA({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():Y.shallowClone(e)}})}var qS=j("ZodNonOptional",(t,e)=>{E0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>tS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function FA(t,e){return new qS({type:"nonoptional",innerType:t,...Y.normalizeParams(e)})}var VA=j("ZodSuccess",(t,e)=>{P0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Fk(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function U8(t){return new VA({type:"success",innerType:t})}var WA=j("ZodCatch",(t,e)=>{T0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>iS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function BA(t,e){return new WA({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var KA=j("ZodNaN",(t,e)=>{z0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>qk(t,r,n,i)});function D8(t){return pk(KA,t)}var ZS=j("ZodPipe",(t,e)=>{O0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>aS(t,r,n,i),t.in=e.in,t.out=e.out});function yh(t,e){return new ZS({type:"pipe",in:t,out:e})}var LS=j("ZodCodec",(t,e)=>{ZS.init(t,e),rd.init(t,e)});function M8(t,e,r){return new LS({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var HA=j("ZodReadonly",(t,e)=>{j0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>oS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function GA(t){return new HA({type:"readonly",innerType:t})}var QA=j("ZodTemplateLiteral",(t,e)=>{N0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Zk(t,r,n,i)});function q8(t,e){return new QA({type:"template_literal",parts:t,...Y.normalizeParams(e)})}var YA=j("ZodLazy",(t,e)=>{A0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>cS(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function JA(t){return new YA({type:"lazy",getter:t})}var XA=j("ZodPromise",(t,e)=>{C0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>sS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Z8(t){return new XA({type:"promise",innerType:t})}var eU=j("ZodFunction",(t,e)=>{R0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Wk(t,r,n,i)});function L8(t){return new eU({type:"function",input:Array.isArray(t?.input)?zA(t?.input):t?.input??it(Dt()),output:t?.output??Dt()})}var Th=j("ZodCustom",(t,e)=>{U0.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Vk(t,r,n,i)});function F8(t){let e=new At({check:"custom"});return e._zod.check=t,e}function FS(t,e){return _k(Th,t??(()=>!0),e)}function tU(t,e={}){return bk(Th,t,e)}function rU(t){return xk(t)}var V8=wk,W8=kk;function B8(t,e={}){let r=new Th({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...Y.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var K8=(...t)=>Sk({Codec:LS,Boolean:wh,String:_h},...t);function H8(t){let e=JA(()=>Mt([L(t),Et(),fr(),Sh(),it(e),Nt(L(),e)]));return e}function zh(t,e){return yh(DS(t),e)}var nU;nU||(nU={});var sje={...vd,...hh,iso:Bo};hr(D0());function d7(){if(process.env.OPENAI_PROXY_TOKEN)return K.debug("[Auth] Using OPENAI_PROXY_TOKEN (ECS execution)"),process.env.OPENAI_PROXY_TOKEN;if(process.env.ZIBBY_USER_TOKEN)return K.debug("[Auth] Using ZIBBY_USER_TOKEN (CI/CD PAT)"),process.env.ZIBBY_USER_TOKEN;try{let t=c7(s7(),".zibby","config.json");if(u7(t)){let e=JSON.parse(l7(t,"utf-8"));if(e.sessionToken)return K.debug("[Auth] Using session token from zibby login"),e.sessionToken}}catch(t){K.debug(`[Auth] Could not read zibby login session: ${t.message}`)}return null}function p7(){return process.env.OPENAI_PROXY_URL?process.env.OPENAI_PROXY_URL.replace(/\/v1\/?$/,""):"https://api-prod.zibby.app/openai-proxy"}function Ic(t){if(!(typeof t!="object"||t===null)){if(Object.keys(t).length===0){t.type="object",t.additionalProperties=!0;return}if(t.type||(t.properties?t.type="object":t.items&&(t.type="array")),t.type==="object")if(t.properties){for(let[e,r]of Object.entries(t.properties))r.type==="object"&&r.additionalProperties&&r.additionalProperties!==!1&&(!r.properties||Object.keys(r.properties).length===0)&&(t.properties[e]={type:["object","null"]});t.additionalProperties=!1,t.required=Object.keys(t.properties),Object.values(t.properties).forEach(Ic)}else"additionalProperties"in t||(t.additionalProperties=!0);t.type==="array"&&t.items&&Ic(t.items),t.anyOf&&t.anyOf.forEach(Ic),t.oneOf&&t.oneOf.forEach(Ic),t.allOf&&t.allOf.forEach(Ic)}}async function aU(t,e){K.info("\u{1F527} [OpenAI Proxy] Formatting structured output...");let r=d7();if(!r)throw new Error("Authentication required for structured output processing.\n Local development: Run `zibby login`\n CI/CD: Set ZIBBY_USER_TOKEN environment variable (Personal Access Token from UI settings)");let n=p7();K.info(`\u{1F517} Using OpenAI proxy: ${n}`);let i=Sc(e),a=i;if(i.$ref&&i.definitions){let l=i.$ref.split("/").pop();a=i.definitions[l]||i,K.debug(`Extracted schema from $ref: ${l}`)}delete a.$schema,Ic(a);let o=4e5,s=t;t.length>o&&(K.warn(`\u26A0\uFE0F [OpenAI Proxy] Raw text (${t.length} chars) exceeds limit, keeping last ${o} chars`),s=`... [truncated early content] ...
|
|
97
|
+
${t.slice(-o)}`);let c=`Extract and format the following information into structured JSON matching the schema.
|
|
98
|
+
|
|
99
|
+
RAW CONTENT:
|
|
100
|
+
${s}
|
|
101
|
+
|
|
102
|
+
Extract all relevant information and format it according to the schema. If any required fields are missing, do your best to infer them from the content.`,u={model:Br.OPENAI_POSTPROCESSING,messages:[{role:"user",content:c}],response_format:{type:"json_schema",json_schema:{name:"extract",schema:a,strict:!0}}};K.info(`\u{1F4E4} Sending to OpenAI proxy: model=${Br.OPENAI_POSTPROCESSING}, schema keys=${Object.keys(a.properties||{}).join(", ")}`),K.debug(` Schema size: ${JSON.stringify(a).length} chars`),K.debug(` Prompt size: ${c.length} chars`);try{let l={"Content-Type":"application/json"};process.env.OPENAI_PROXY_TOKEN?(l["x-proxy-token"]=r,l["x-execution-id"]=process.env.EXECUTION_ID||""):(l.Authorization=`Bearer ${r}`,l["x-api-key"]=process.env.ZIBBY_API_KEY||"",l["x-execution-id"]=process.env.EXECUTION_ID||"");let f=(await Em.post(n,u,{headers:l,timeout:qf.OPENAI_REQUEST})).data?.choices?.[0]?.message?.content;if(!f)throw new Error("OpenAI proxy returned empty response");let p=JSON.parse(f);return K.info("\u2705 Successfully formatted with OpenAI proxy"),{structured:p,raw:t}}catch(l){if(l.response){let d=l.response.status,f=l.response.data;throw K.error(`\u274C OpenAI proxy request failed: ${d}`),K.error(` Status: ${d}`),K.error(` Response: ${JSON.stringify(f,null,2)}`),d===401||d===403?new Error(`Authentication failed for OpenAI proxy.
|
|
103
|
+
Run \`zibby login\` or set ZIBBY_USER_TOKEN environment variable.
|
|
104
|
+
Response: ${JSON.stringify(f)}`,{cause:l}):new Error(`Failed to format Cursor output: ${f?.error?.message||"Unknown error"}`,{cause:l})}throw K.error(`\u274C OpenAI proxy request failed: ${l.message}`),new Error(`Failed to format output: ${l.message}`,{cause:l})}}import Sr from"chalk";var f7="__WORKFLOW_GRAPH_LOG__",xd=Sr.gray("\u2502"),m7=Sr.gray("\u250C"),oU=Sr.gray("\u2514"),VS=Sr.green("\u25C6"),sU=Sr.hex("#c084fc")("\u25C6"),cU=Sr.hex("#2dd4bf")("\u25C6"),WS=Sr.red("\u25C6"),uU=`${xd} `,lU=2;function dU(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function pU(t,e){return(r,n,i)=>{if(typeof r!="string")return t(r,n,i);let a=process.stdout.columns||120,o="";for(let s=0;s<r.length;s++){let c=r[s];e.lineStart&&(o+=uU,e.col=lU,e.lineStart=!1),c===`
|
|
105
|
+
`?(o+=c,e.lineStart=!0,e.col=0,e.inEsc=!1):c==="\x1B"?(e.inEsc=!0,o+=c):e.inEsc?(o+=c,(c>="A"&&c<="Z"||c>="a"&&c<="z")&&(e.inEsc=!1)):(e.col++,o+=c,e.col>=a&&(o+=`
|
|
106
|
+
${uU}`,e.col=lU))}return t(o,n,i)}}var BS=class{constructor(){this._currentNode=null,this._origStdoutWrite=null,this._origStderrWrite=null;let e=String(process.env.ZIBBY_RUN_SOURCE||"").trim().toLowerCase(),r=String(process.env.ZIBBY_WORKFLOW_GRAPH_LOG_MARKERS||"").trim()==="1";this._emitWorkflowGraphMarkers=r||e==="studio"}get isInsideNode(){return this._currentNode!==null}_startIntercepting(){this._origStdoutWrite=process.stdout.write.bind(process.stdout),this._origStderrWrite=process.stderr.write.bind(process.stderr);let e={lineStart:!0,col:0,inEsc:!1},r={lineStart:!0,col:0,inEsc:!1};this._outState=e,this._errState=r,process.stdout.write=pU(this._origStdoutWrite,e),process.stderr.write=pU(this._origStderrWrite,r)}_stopIntercepting(){this._origStdoutWrite&&(this._outState&&!this._outState.lineStart&&this._origStdoutWrite(`
|
|
107
|
+
`),process.stdout.write=this._origStdoutWrite),this._origStderrWrite&&(this._errState&&!this._errState.lineStart&&this._origStderrWrite(`
|
|
108
|
+
`),process.stderr.write=this._origStderrWrite),this._origStdoutWrite=null,this._origStderrWrite=null}_rawWrite(e){(this._origStdoutWrite||process.stdout.write.bind(process.stdout))(`${e}
|
|
109
|
+
`)}_emitGraphLogMarker(e){if(!this._emitWorkflowGraphMarkers)return;let r=`${f7}${JSON.stringify(e)}
|
|
110
|
+
`;this._origStdoutWrite?this._origStdoutWrite(r):process.stdout.write(r)}_writeDot(e,r){this._origStdoutWrite?(this._outState&&!this._outState.lineStart&&(this._origStdoutWrite(`
|
|
111
|
+
`),this._outState.lineStart=!0,this._outState.col=0),this._origStdoutWrite(`${e} ${r}
|
|
112
|
+
`)):process.stdout.write.bind(process.stdout)(`${e} ${r}
|
|
113
|
+
`)}step(e){this._origStdoutWrite?this._writeDot(VS,e):process.stdout.write.bind(process.stdout)(`${xd} ${VS} ${e}
|
|
114
|
+
`)}stepTool(e){this._origStdoutWrite?this._writeDot(sU,e):process.stdout.write.bind(process.stdout)(`${xd} ${sU} ${e}
|
|
115
|
+
`)}stepMemory(e){let r=Sr.hex("#2dd4bf")(e);this._origStdoutWrite?this._writeDot(cU,r):process.stdout.write.bind(process.stdout)(`${xd} ${cU} ${r}
|
|
116
|
+
`)}stepFail(e){this._origStdoutWrite?this._writeDot(WS,Sr.red(e)):process.stdout.write.bind(process.stdout)(`${xd} ${WS} ${Sr.red(e)}
|
|
117
|
+
`)}nodeStart(e){this._currentNode=e,this._emitGraphLogMarker({phase:"node_begin",node:e}),this._rawWrite(`${m7} ${e}`),this._startIntercepting()}nodeComplete(e,r={}){this._stopIntercepting();let{duration:n,details:i}=r;if(i)for(let o of i)this._rawWrite(`${VS} ${o}`);let a=n?Sr.dim(` ${dU(n)}`):"";this._rawWrite(`${oU} ${Sr.green("done")}${a}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}nodeFailed(e,r,n={}){this._stopIntercepting();let{duration:i}=n,a=i?Sr.dim(` ${dU(i)}`):"";this._rawWrite(`${WS} ${Sr.red(r)}`),this._rawWrite(`${oU} ${Sr.red("failed")}${a}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}route(e,r){this._rawWrite(Sr.dim(` ${e} \u2192 ${r}`)),this._rawWrite("")}graphComplete(){this._rawWrite(Sr.green.bold("\u2713 Workflow completed"))}},ga=new BS;import{copyFileSync as h7,existsSync as KS,lstatSync as g7,mkdirSync as fU,rmSync as v7,symlinkSync as y7,unlinkSync as _7}from"fs";import{join as va}from"path";import{homedir as b7}from"os";import{randomBytes as x7}from"crypto";var w7=["cli-config.json","config.json","auth.json","argv.json"];function mU(t){return!(!t||typeof t!="string"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="1"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="true")}function hU(t){let e=va(t||process.cwd(),".zibby","tmp");fU(e,{recursive:!0});let r=`${process.pid}-${Date.now()}-${x7(4).toString("hex")}`,n=va(e,`cursor-agent-home-${r}`),i=va(n,".cursor");fU(i,{recursive:!0});let a=b7(),o=va(a,".cursor");if(KS(o))for(let s of w7){let c=va(o,s);if(KS(c))try{h7(c,va(i,s))}catch{}}if(process.platform==="darwin"){let s=va(a,"Library");if(KS(s))try{y7(s,va(n,"Library"))}catch{}}return n}function gU(t){if(!(!t||typeof t!="string"))try{let e=va(t,"Library");try{g7(e).isSymbolicLink()&&_7(e)}catch{}v7(t,{recursive:!0,force:!0})}catch{}}var Oh=class extends Tn{constructor(){super("cursor","Cursor (CLI)",100)}canHandle(e){let r=[Si(kd(),".local","bin","cursor-agent"),Si(kd(),".cursor","bin","cursor-agent"),"/usr/local/bin/cursor-agent","/usr/local/bin/agent","/Applications/Cursor.app/Contents/Resources/app/bin/cursor","agent","cursor-agent"];for(let n of r)try{if(n.startsWith("/")){bU(n,xU.X_OK);let i=Ko(`"${n}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(i&&i.length>0)return K.debug(`[Cursor] Found agent at: ${n} (version: ${i.trim().slice(0,50)})`),!0}else{let i=Ko(`which ${n}`,{encoding:"utf-8",timeout:2e3,stdio:"pipe"}).trim();if(!i)continue;let a=Ko(`${n} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(a&&a.length>0)return K.debug(`[Cursor] Found '${n}' in PATH at ${i} (version: ${a.trim().slice(0,50)})`),!0}}catch{continue}return K.warn("[Cursor] \u274C Cursor Agent CLI not found or not working. Run: agent --version"),!1}async invoke(e,r={}){let{workspace:n=process.cwd(),print:i=!1,schema:a=null,skills:o=null,sessionPath:s=null,nodeName:c=null,timeout:u=qf.CURSOR_AGENT_DEFAULT,config:l={}}=r,d=l?.agent?.strictMode||!1,f=r.model??l?.agent?.cursor?.model??Br.CURSOR;K.debug(`[Cursor] Invoking (model: ${f}, timeout: ${u/1e3}s, skills: ${JSON.stringify(o)})`);let m=(this._setupMcpConfig(s,n,l,o,c)||{}).isolatedMcpHome??null,v=[Si(kd(),".local","bin","cursor-agent"),Si(kd(),".cursor","bin","cursor-agent"),"/usr/local/bin/cursor-agent","/usr/local/bin/agent","/Applications/Cursor.app/Contents/Resources/app/bin/cursor","agent","cursor-agent"],g=null;for(let C of v)try{if(C.startsWith("/"))bU(C,xU.X_OK),Ko(`"${C}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});else{if(!Ko(`which ${C}`,{encoding:"utf-8",timeout:2e3}).trim())throw new Error("not in PATH");Ko(`${C} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"})}g=C,K.debug(`[Agent] Using binary: ${C}`);break}catch(T){K.debug(`[Agent] Binary '${C}' check failed: ${T.message}`);continue}if(!g)throw new Error(`Cursor Agent CLI not found or not working.
|
|
118
|
+
|
|
119
|
+
Checked paths:
|
|
120
|
+
${v.map(C=>` - ${C}`).join(`
|
|
121
|
+
`)}
|
|
122
|
+
|
|
123
|
+
Install cursor-agent:
|
|
124
|
+
curl https://cursor.com/install -fsS | bash
|
|
125
|
+
|
|
126
|
+
Then add to PATH:
|
|
127
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
|
|
128
|
+
|
|
129
|
+
Test with: agent --version`);let h=null;if(a){let C=`zibby-result-${Date.now()}.json`;h=Si(n,".zibby","tmp",C);let T=Si(n,".zibby","tmp");wd(T)||_U(T,{recursive:!0});let D=Js.generateFileOutputInstructions(a,h);e=`${e}
|
|
130
|
+
|
|
131
|
+
${D}`}let b=process.env.CURSOR_API_KEY,y=b?` | key: ***${b.slice(-4)}`:" | key: not set";console.log(`
|
|
132
|
+
\u25C6 Model: ${f||"auto"}${y}
|
|
133
|
+
`);let _=(await import("chalk")).default;console.log(`
|
|
134
|
+
${_.bold("Prompt sent to LLM:")}`),console.log(_.dim("\u2500".repeat(60))),console.log(_.dim(e)),console.log(_.dim("\u2500".repeat(60)));let x=["--print","--force","--approve-mcps","--output-format","stream-json","--stream-partial-output","--model",f||"auto"];if(process.env.CURSOR_API_KEY&&x.push("--api-key",process.env.CURSOR_API_KEY),x.push(e),K.debug(`[Agent] Prompt: ${e.length} chars, model: ${f||"auto"}`),K.debug(`[Agent] Workspace: ${n}`),process.env.LOG_LEVEL==="debug"||process.env.ZIBBY_LOG_CURSOR_CLI==="1")try{console.log(`\u{1F527} Cursor CLI --model ${f||"auto"} (from .zibby.config.js agent.cursor.model)
|
|
135
|
+
`)}catch{}let w,k=null;try{let C=s||(process.env.ZIBBY_SESSION_PATH?String(process.env.ZIBBY_SESSION_PATH).trim():null);w=await this._spawnWithStreaming(g,x,n,u,null,C,m)}catch(C){k=C}let $=w?.stdout||"";if(a){let C=typeof a.parse=="function",T=null,D=!!(h&&wd(h));if(h&&K.info(`[Agent] Result file: ${D?"present":"missing"} at ${h}`),D)try{let N=yU(h,"utf-8").trim();T=JSON.parse(N),K.info(`[Agent] Parsed JSON from result file OK (${N.length} chars) \u2192 object ready for validation`),k&&K.debug("[Agent] Agent exited non-zero but result file was written \u2014 recovering")}catch(N){K.warn(`\u26A0\uFE0F [Agent] Result file exists on disk but is not valid JSON: ${N.message}`)}else if(k)K.warn(`[Agent] Result file missing at ${h} (agent process error \u2014 may still recover if strictMode repairs)`);else throw K.error(`\u274C [Agent] Result file was never created at ${h}`),new Error(`Agent did not write required result file at ${h}`);if(T&&C)try{let N=a.parse(T);return K.info("\u2705 [Agent] Zod validation passed for structured result file"),d&&K.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:N}}catch(N){K.warn(`\u26A0\uFE0F [Agent] JSON parsed but Zod rejected it (wrong types/shape): ${N.message?.slice(0,400)}`)}else{if(T)return K.info("\u2705 [Agent] File-based output extracted (no Zod parse fn) \u2014 accepting as structured"),d&&K.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:T};D&&K.error("\u274C [Agent] Result file exists but produced no in-memory JSON (parse failed earlier)")}if(d&&!k){let N=w.parsedText,ee=T?JSON.stringify(T):N;K.info(`[Agent] strictMode: calling OpenAI proxy to fix structured output (${ee.length} chars in)`);try{let H=await aU(ee,a);if(C){let ge=a.parse(H.structured);return K.info("\u2705 [Agent] Proxy output passed Zod validation"),{raw:$,structured:ge}}return{raw:$,...H}}catch(H){if(K.warn(`\u26A0\uFE0F [Agent] strictMode proxy failed: ${H.message}`),T)return K.warn("[Agent] Using agent's original result file as fallback"),{raw:$,structured:T}}}if(k)throw k;let Z=D?T==null?"file existed but JSON.parse failed \u2014 see WARN log above":C?"JSON was valid but Zod validation failed \u2014 see WARN log above":"no structured object after read (unexpected)":"file never appeared (agent may not have run Write tool to the path above)";throw K.error(`\u274C [Agent] No validated structured output: ${Z}`),K.error("\u{1F4A1} Tip: Set strictMode=true in .zibby.config.js for OpenAI proxy fallback"),new Error(`Agent did not produce a valid result file at ${h}. Enable strictMode for proxy fallback.`)}if(k)throw k;return this._extractFinalResult($)||w?.parsedText||$}_extractFinalResult(e){if(!e)return null;let r=e.split(`
|
|
136
|
+
`),n=null;for(let i of r){let a=i.trim();if(a)try{let o=JSON.parse(a);if(o.type==="assistant"&&o.message?.content){let s=o.message.content;if(Array.isArray(s)){let c=s.filter(u=>u.type==="text"&&u.text).map(u=>u.text).join("");c&&(n=c)}else typeof s=="string"&&s&&(n=s)}}catch{}}return n?.trim()||null}_setupMcpConfig(e,r,n,i=null,a=null){let o=n?.headless,s=Si(kd(),".cursor"),c=Si(s,"mcp.json"),u={};if(wd(c))try{u=JSON.parse(yU(c,"utf-8"))}catch{}let l=u.mcpServers||{},d=n?.paths?.output||l1,f=Si(r||process.cwd(),d,d1),p=Array.isArray(i)?i.map(g=>Kr(g)).filter(Boolean):[...p_()].map(([,g])=>g),m=new Set;for(let g of p)typeof g.resolve=="function"&&(m.has(g.serverName)||(m.add(g.serverName),this._ensureSkillConfigured(l,g,e,f,a,o)));if(e){let g=Kr("browser");g&&typeof g.resolve=="function"&&!m.has(g.serverName)&&this._ensureSkillConfigured(l,g,e,f,"execute_live",o)}if(Object.keys(l).length===0)return K.debug("[MCP] No MCP servers configured - agent will run without tool access"),{isolatedMcpHome:null};let v=`${JSON.stringify({mcpServers:l},null,2)}
|
|
137
|
+
`;if(mU(e)){let g=hU(r||process.cwd()),h=Si(g,".cursor","mcp.json");return vU(h,v,"utf8"),K.debug(`[MCP] Isolated cursor-agent HOME (session-scoped mcp.json): ${g} | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:g}}return wd(s)||_U(s,{recursive:!0}),vU(c,v,"utf8"),K.debug(`[MCP] Global ~/.cursor/mcp.json | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:null}}_ensureSkillConfigured(e,r,n,i,a=null,o){let s=r.cursorKey||r.serverName,c=e[s]?s:e[r.serverName]?r.serverName:null;if(c&&n){let l=typeof r.resolve=="function"?r.resolve({sessionPath:n,nodeName:a,headless:o}):null;l?.args?e[c].args=l.args:e[c].args=(e[c].args||[]).map(p=>p.startsWith("--output-dir=")?`--output-dir=${n}`:p);let d=l?.env||{},f=r.sessionEnvKey?{[r.sessionEnvKey]:i}:{};e[c].env={...e[c].env||{},...d,...f},K.debug(`[MCP] Updated ${c} session \u2192 ${n}`);return}if(c)return;let u=r.resolve({sessionPath:n,nodeName:a,headless:o});u&&(e[s]={...u,...r.sessionEnvKey&&{env:{...u.env||{},[r.sessionEnvKey]:i}}},K.debug(`[MCP] Configured ${s}`))}_spawnWithStreaming(e,r,n,i,a=null,o=null,s=null){return new Promise((c,u)=>{let l=Date.now(),d="",f="",p=Date.now(),m=0,v=!1,g=null,h=!1,b=!1,y=null;if(o)try{y=Si($7(String(o)),p1)}catch{y=null}let _=!1,x=()=>{_||(_=!0,gU(s))},w={...process.env};s&&(w.HOME=s,process.platform==="win32"&&(w.USERPROFILE=s),K.debug(`[Agent] cursor-agent HOME=${s} (isolated MCP config)`));let k=k7(e,r,{cwd:n,shell:!1,stdio:["pipe","pipe","pipe"],env:w});K.debug(`[Agent] PID: ${k.pid}`),k.stdin.on("error",N=>{N.code!=="EPIPE"&&K.warn(`[Agent] stdin error: ${N.message}`)}),k.stdout.on("error",N=>{N.code!=="EPIPE"&&K.warn(`[Agent] stdout error: ${N.message}`)}),k.stderr.on("error",N=>{N.code!=="EPIPE"&&K.warn(`[Agent] stderr error: ${N.message}`)}),a?(k.stdin.write(a,N=>{N&&N.code!=="EPIPE"&&K.warn(`[Agent] Failed to write to stdin: ${N.message}`),k.stdin.end()}),K.debug(`[Agent] Prompt also piped to stdin (${a.length} chars)`)):k.stdin.end();let $=null;y&&($=setInterval(()=>{if(!(v||b))try{if(wd(y)){v=!0,g="studio-stop";try{S7(y)}catch{}K.warn("\u{1F6D1} Studio stop requested \u2014 terminating Cursor agent (and MCP browser session)"),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},2e3)}}catch{}},600));let P=new Set,C=new Date(l).toISOString().replace(/\.\d+Z$/,""),T=setInterval(()=>{let N=Math.round((Date.now()-l)/1e3),ee=Math.round((Date.now()-p)/1e3),H=[];try{let Le=Math.ceil(N/60)+1,ve=Ko(`find "${n}" -type f -mmin -${Le} -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/target/*' 2>/dev/null | head -20`,{encoding:"utf-8",timeout:5e3}).trim();if(ve)for(let W of ve.split(`
|
|
138
|
+
`)){let I=W.replace(`${n}/`,"");P.has(I)||(P.add(I),H.push(I))}}catch{}let ge="";H.length>0&&(ge=` | \u{1F4C1} new: ${H.map(ve=>ve.split("/").pop()).join(", ")}`),P.size>0&&(ge+=` | \u{1F4E6} total: ${P.size} files`),K.debug(`\u{1F493} [Agent] Running for ${N}s | ${m} lines output${ge}`),m===0&&N>=30&&P.size===0&&(N<35&&K.warn(`\u26A0\uFE0F [Agent] No output after ${N}s \u2014 agent may be stuck. Check your CURSOR_API_KEY.`),N>=60&&(v=!0,g=g||"stall",K.error(`\u274C [Agent] No response after ${N}s \u2014 killing. Verify CURSOR_API_KEY is valid and agent CLI works: agent --version`),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},3e3)))},3e4),D=setTimeout(()=>{v=!0,g=g||"timeout";let N=Math.round((Date.now()-l)/1e3);K.error(`\u23F1\uFE0F [Agent] Timeout after ${N}s \u2014 killing process (PID: ${k.pid})`),d.trim()&&K.warn(`\u{1F4E4} [Agent] Partial output (${d.length} chars) before timeout:
|
|
139
|
+
${d.slice(-2e3)}`),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},5e3)},i),Z=new As;Z.onToolCall=(N,ee)=>{let H=N,ge=ee;if(N==="mcpToolCall"&&ee?.name)H=ee.name.replace(/^mcp_+[^_]+_+/,""),H.includes("-")&&H.split("-")[0]===H.split("-")[1]&&(H=H.split("-")[0]),ge=ee.args??ee.input??ee;else{if(N==="readToolCall"||N==="editToolCall"||N==="writeToolCall")return;(N.startsWith("mcp__")||N.includes("ToolCall"))&&(H=N.replace(/^mcp_+[^_]+_+/,"").replace(/ToolCall$/,""))}if(H.includes("memory")?ga.stepMemory(`Tool: ${H}`):ga.stepTool(`Tool: ${H}`),ge!=null&&typeof ge=="object"&&Object.keys(ge).length>0&&!b){let ve=JSON.stringify(ge),W=ve.length>100?`${ve.substring(0,100)}...`:ve;console.log(` Input: ${W}`)}},k.stdout.on("data",N=>{let ee=N.toString();d+=ee,p=Date.now(),h||(h=!0);let H=Z.processChunk(ee);H&&!b&&process.stdout.write(H);let ge=ee.split(`
|
|
140
|
+
`).filter(Le=>Le.trim());m+=ge.length}),k.stderr.on("data",N=>{let ee=N.toString();f+=ee,p=Date.now(),h||(h=!0);let H=ee.split(`
|
|
141
|
+
`).filter(ge=>ge.trim());for(let ge of H)K.warn(`\u26A0\uFE0F [Agent stderr] ${ge}`)}),k.on("close",(N,ee)=>{b=!0,x(),clearTimeout(D),clearInterval(T),$&&clearInterval($),Z.flush();let H=Math.round((Date.now()-l)/1e3);if(K.debug(`[Agent] Exited: code=${N}, signal=${ee}, elapsed=${H}s, output=${d.length} chars`),v){if(g==="studio-stop"){u(new Error("Stopped from Zibby Studio"));return}u(new Error(`Cursor Agent timed out after ${H}s (limit: ${i/1e3}s). ${m} lines produced. Last output ${Math.round((Date.now()-p)/1e3)}s ago. ${d.trim()?`
|
|
142
|
+
Partial output (last 500 chars):
|
|
143
|
+
${d.slice(-500)}`:"No output captured."}`));return}if(N!==0){u(new Error(`Cursor Agent failed: exit code ${N}, signal ${ee}. ${f.trim()?`
|
|
144
|
+
Stderr: ${f.slice(-1e3)}`:""}${d.trim()?`
|
|
145
|
+
Stdout (last 500 chars): ${d.slice(-500)}`:""}`));return}let ge=Z.getResult(),Le=ge?JSON.stringify(ge,null,2):Z.getRawText()||d||"";c({stdout:d||f||"",parsedText:Le})}),k.on("error",N=>{x(),clearTimeout(D),clearInterval(T),$&&clearInterval($),u(new Error(`Cursor Agent spawn error: ${N.message}
|
|
146
|
+
Binary: ${e}
|
|
147
|
+
This usually means the binary is not in PATH. Try:
|
|
148
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc`))})})}};import{execFile as RY}from"child_process";import{randomUUID as CY}from"crypto";import{copyFile as AY,mkdir as HS,readFile as UY,rm as DY,writeFile as Yh}from"fs/promises";import{createRequire as MY}from"module";import{homedir as u$,tmpdir as qY}from"os";import{dirname as kU,isAbsolute as M4,join as $i,relative as ZY,resolve as Jh,sep as q4}from"path";import{fileURLToPath as LY}from"url";import{setMaxListeners as FY}from"events";import{spawn as KY}from"child_process";import{createInterface as HY}from"readline";import{homedir as NX}from"os";import{join as RX}from"path";import{randomUUID as See}from"crypto";import{appendFile as $ee,mkdir as Iee}from"fs/promises";import{join as e4}from"path";import{realpathSync as t4}from"fs";import{cwd as Pee}from"process";import{randomUUID as mD}from"crypto";import{appendFile as Cee,mkdir as Aee,symlink as Uee,unlink as Dee}from"fs/promises";import{dirname as hD,join as gD}from"path";import*as qe from"fs";import{mkdir as Wee,open as Bee,readdir as Kee,readFile as n4,rename as Hee,rmdir as Gee,rm as Qee,stat as Yee,unlink as Jee}from"fs/promises";import{execFile as bte}from"child_process";import{promisify as xte}from"util";import{createHash as Pte}from"crypto";import{userInfo as Tte}from"os";var I7=Object.create,{getPrototypeOf:E7,defineProperty:c$,getOwnPropertyNames:P7}=Object,T7=Object.prototype.hasOwnProperty;function z7(t){return this[t]}var O7,j7,O4=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var i=e?O7??=new WeakMap:j7??=new WeakMap,a=i.get(t);if(a)return a}r=t!=null?I7(E7(t)):{};let o=e||!t||!t.__esModule?c$(r,"default",{value:t,enumerable:!0}):r;for(let s of P7(t))T7.call(o,s)||c$(o,s,{get:z7.bind(t,s),enumerable:!0});return n&&i.set(t,o),o},ue=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),N7=t=>t;function R7(t,e){this[t]=N7.bind(null,e)}var ss=(t,e)=>{for(var r in e)c$(t,r,{get:e[r],enumerable:!0,configurable:!0,set:R7.bind(e,r)})},C7=Symbol.dispose||Symbol.for("Symbol.dispose"),A7=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),nr=(t,e,r)=>{if(e!=null){if(typeof e!="object"&&typeof e!="function")throw TypeError('Object expected to be assigned to "using" declaration');var n;if(r&&(n=e[A7]),n===void 0&&(n=e[C7]),typeof n!="function")throw TypeError("Object not disposable");t.push([r,n,e])}else r&&t.push([r]);return e},ir=(t,e,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,c,u){return u=Error(c),u.name="SuppressedError",u.error=o,u.suppressed=s,u},i=o=>e=r?new n(o,e,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=t.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(a,c=>(i(c),a()))}catch(c){i(c)}if(r)throw e};return a()},ng=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(b){if(super(),!t.IDENTIFIER.test(b))throw Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((y,_)=>`${y}${_}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((y,_)=>(_ instanceof r&&(y[_.str]=(y[_.str]||0)+1),y),{})}}t._Code=n,t.nil=new n("");function i(h,...b){let y=[h[0]],_=0;for(;_<b.length;)s(y,b[_]),y.push(h[++_]);return new n(y)}t._=i;var a=new n("+");function o(h,...b){let y=[p(h[0])],_=0;for(;_<b.length;)y.push(a),s(y,b[_]),y.push(a,p(h[++_]));return c(y),new n(y)}t.str=o;function s(h,b){b instanceof n?h.push(...b._items):b instanceof r?h.push(b):h.push(d(b))}t.addCodeArg=s;function c(h){let b=1;for(;b<h.length-1;){if(h[b]===a){let y=u(h[b-1],h[b+1]);if(y!==void 0){h.splice(b-1,3,y);continue}h[b++]="+"}b++}}function u(h,b){if(b==='""')return h;if(h==='""')return b;if(typeof h=="string")return b instanceof r||h[h.length-1]!=='"'?void 0:typeof b!="string"?`${h.slice(0,-1)}${b}"`:b[0]==='"'?h.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(h instanceof r))return`"${h}${b.slice(1)}`}function l(h,b){return b.emptyStr()?h:h.emptyStr()?b:o`${h}${b}`}t.strConcat=l;function d(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:p(Array.isArray(h)?h.join(","):h)}function f(h){return new n(p(h))}t.stringify=f;function p(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=p;function m(h){return typeof h=="string"&&t.IDENTIFIER.test(h)?new n(`.${h}`):i`[${h}]`}t.getProperty=m;function v(h){if(typeof h=="string"&&t.IDENTIFIER.test(h))return new n(`${h}`);throw Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}t.getEsmExportName=v;function g(h){return new n(h.toString())}t.regexpCode=g}),wU=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=ng();class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){let l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}t.Scope=i;class a extends e.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=e._`.${new e.Name(l)}[${d}]`}}t.ValueScopeName=a;var o=e._`\n`;class s extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?o:e.nil}}get(){return this._scope}name(u){return new a(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw Error("CodeGen: ref must be passed in value");let f=this.toName(u),{prefix:p}=f,m=(d=l.key)!==null&&d!==void 0?d:l.ref,v=this._values[p];if(v){let b=v.get(m);if(b)return b}else v=this._values[p]=new Map;v.set(m,f);let g=this._scope[p]||(this._scope[p]=[]),h=g.length;return g[h]=l.ref,f.setValue(l,{property:p,itemIndex:h}),f}getValue(u,l){let d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw Error(`CodeGen: name "${d}" has no value`);return e._`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,f=>{if(f.value===void 0)throw Error(`CodeGen: name "${f}" has no value`);return f.value.code},l,d)}_reduceValues(u,l,d={},f){let p=e.nil;for(let m in u){let v=u[m];if(!v)continue;let g=d[m]=d[m]||new Map;v.forEach(h=>{if(g.has(h))return;g.set(h,n.Started);let b=l(h);if(b){let y=this.opts.es5?t.varKinds.var:t.varKinds.const;p=e._`${p}${y} ${h} = ${b};${this.opts._n}`}else if(b=f?.(h))p=e._`${p}${b}${this.opts._n}`;else throw new r(h);g.set(h,n.Completed)})}return p}}t.ValueScope=s}),Xe=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=ng(),r=wU(),n=ng();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=wU();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(S,E){return this}}class o extends a{constructor(S,E,B){super(),this.varKind=S,this.name=E,this.rhs=B}render({es5:S,_n:E}){let B=S?r.varKinds.var:this.varKind,ae=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ae};`+E}optimizeNames(S,E){if(S[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,S,E)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(S,E,B){super(),this.lhs=S,this.rhs=E,this.sideEffects=B}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,E){if(!(this.lhs instanceof e.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=N(this.rhs,S,E),this}get names(){let S=this.lhs instanceof e.Name?{}:{...this.lhs.names};return Z(S,this.rhs)}}class c extends s{constructor(S,E,B,ae){super(S,B,ae),this.op=E}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class u extends a{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class l extends a{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class d extends a{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class f extends a{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,E){return this.code=N(this.code,S,E),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends a{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((E,B)=>E+B.render(S),"")}optimizeNodes(){let{nodes:S}=this,E=S.length;for(;E--;){let B=S[E].optimizeNodes();Array.isArray(B)?S.splice(E,1,...B):B?S[E]=B:S.splice(E,1)}return S.length>0?this:void 0}optimizeNames(S,E){let{nodes:B}=this,ae=B.length;for(;ae--;){let he=B[ae];he.optimizeNames(S,E)||(ee(S,he.names),B.splice(ae,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((S,E)=>D(S,E.names),{})}}class m extends p{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class v extends p{}class g extends m{}g.kind="else";class h extends m{constructor(S,E){super(E),this.condition=S}render(S){let E=`if(${this.condition})`+super.render(S);return this.else&&(E+="else "+this.else.render(S)),E}optimizeNodes(){super.optimizeNodes();let S=this.condition;if(S===!0)return this.nodes;let E=this.else;if(E){let B=E.optimizeNodes();E=this.else=Array.isArray(B)?new g(B):B}if(E)return S===!1?E instanceof h?E:E.nodes:this.nodes.length?this:new h(H(S),E instanceof h?[E]:E.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,E){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(S,E),!!(super.optimizeNames(S,E)||this.else))return this.condition=N(this.condition,S,E),this}get names(){let S=super.names;return Z(S,this.condition),this.else&&D(S,this.else.names),S}}h.kind="if";class b extends m{}b.kind="for";class y extends b{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,E){if(super.optimizeNames(S,E))return this.iteration=N(this.iteration,S,E),this}get names(){return D(super.names,this.iteration.names)}}class _ extends b{constructor(S,E,B,ae){super(),this.varKind=S,this.name=E,this.from=B,this.to=ae}render(S){let E=S.es5?r.varKinds.var:this.varKind,{name:B,from:ae,to:he}=this;return`for(${E} ${B}=${ae}; ${B}<${he}; ${B}++)`+super.render(S)}get names(){let S=Z(super.names,this.from);return Z(S,this.to)}}class x extends b{constructor(S,E,B,ae){super(),this.loop=S,this.varKind=E,this.name=B,this.iterable=ae}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,E){if(super.optimizeNames(S,E))return this.iterable=N(this.iterable,S,E),this}get names(){return D(super.names,this.iterable.names)}}class w extends m{constructor(S,E,B){super(),this.name=S,this.args=E,this.async=B}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}w.kind="func";class k extends p{render(S){return"return "+super.render(S)}}k.kind="return";class $ extends m{render(S){let E="try"+super.render(S);return this.catch&&(E+=this.catch.render(S)),this.finally&&(E+=this.finally.render(S)),E}optimizeNodes(){var S,E;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(E=this.finally)===null||E===void 0||E.optimizeNodes(),this}optimizeNames(S,E){var B,ae;return super.optimizeNames(S,E),(B=this.catch)===null||B===void 0||B.optimizeNames(S,E),(ae=this.finally)===null||ae===void 0||ae.optimizeNames(S,E),this}get names(){let S=super.names;return this.catch&&D(S,this.catch.names),this.finally&&D(S,this.finally.names),S}}class P extends m{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}P.kind="catch";class C extends m{render(S){return"finally"+super.render(S)}}C.kind="finally";class T{constructor(S,E={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...E,_n:E.lines?`
|
|
149
|
+
`:""},this._extScope=S,this._scope=new r.Scope({parent:S}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,E){let B=this._extScope.value(S,E);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(S,E){return this._extScope.getValue(S,E)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,E,B,ae){let he=this._scope.toName(E);return B!==void 0&&ae&&(this._constants[he.str]=B),this._leafNode(new o(S,he,B)),he}const(S,E,B){return this._def(r.varKinds.const,S,E,B)}let(S,E,B){return this._def(r.varKinds.let,S,E,B)}var(S,E,B){return this._def(r.varKinds.var,S,E,B)}assign(S,E,B){return this._leafNode(new s(S,E,B))}add(S,E){return this._leafNode(new c(S,t.operators.ADD,E))}code(S){return typeof S=="function"?S():S!==e.nil&&this._leafNode(new f(S)),this}object(...S){let E=["{"];for(let[B,ae]of S)E.length>1&&E.push(","),E.push(B),(B!==ae||this.opts.es5)&&(E.push(":"),(0,e.addCodeArg)(E,ae));return E.push("}"),new e._Code(E)}if(S,E,B){if(this._blockNode(new h(S)),E&&B)this.code(E).else().code(B).endIf();else if(E)this.code(E).endIf();else if(B)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new h(S))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(h,g)}_for(S,E){return this._blockNode(S),E&&this.code(E).endFor(),this}for(S,E){return this._for(new y(S),E)}forRange(S,E,B,ae,he=this.opts.es5?r.varKinds.var:r.varKinds.let){let ct=this._scope.toName(S);return this._for(new _(he,ct,E,B),()=>ae(ct))}forOf(S,E,B,ae=r.varKinds.const){let he=this._scope.toName(S);if(this.opts.es5){let ct=E instanceof e.Name?E:this.var("_arr",E);return this.forRange("_i",0,e._`${ct}.length`,Ie=>{this.var(he,e._`${ct}[${Ie}]`),B(he)})}return this._for(new x("of",ae,he,E),()=>B(he))}forIn(S,E,B,ae=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,e._`Object.keys(${E})`,B);let he=this._scope.toName(S);return this._for(new x("in",ae,he,E),()=>B(he))}endFor(){return this._endBlockNode(b)}label(S){return this._leafNode(new u(S))}break(S){return this._leafNode(new l(S))}return(S){let E=new k;if(this._blockNode(E),this.code(S),E.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(S,E,B){if(!E&&!B)throw Error('CodeGen: "try" without "catch" and "finally"');let ae=new $;if(this._blockNode(ae),this.code(S),E){let he=this.name("e");this._currNode=ae.catch=new P(he),E(he)}return B&&(this._currNode=ae.finally=new C,this.code(B)),this._endBlockNode(P,C)}throw(S){return this._leafNode(new d(S))}block(S,E){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(E),this}endBlock(S){let E=this._blockStarts.pop();if(E===void 0)throw Error("CodeGen: not in self-balancing block");let B=this._nodes.length-E;if(B<0||S!==void 0&&B!==S)throw Error(`CodeGen: wrong number of nodes: ${B} vs ${S} expected`);return this._nodes.length=E,this}func(S,E=e.nil,B,ae){return this._blockNode(new w(S,E,B)),ae&&this.code(ae).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,E){let B=this._currNode;if(B instanceof S||E&&B instanceof E)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${E?`${S.kind}/${E.kind}`:S.kind}"`)}_elseNode(S){let E=this._currNode;if(!(E instanceof h))throw Error('CodeGen: "else" without "if"');return this._currNode=E.else=S,this}get _root(){return this._nodes[0]}get _currNode(){let S=this._nodes;return S[S.length-1]}set _currNode(S){let E=this._nodes;E[E.length-1]=S}}t.CodeGen=T;function D(R,S){for(let E in S)R[E]=(R[E]||0)+(S[E]||0);return R}function Z(R,S){return S instanceof e._CodeOrName?D(R,S.names):R}function N(R,S,E){if(R instanceof e.Name)return B(R);if(!ae(R))return R;return new e._Code(R._items.reduce((he,ct)=>(ct instanceof e.Name&&(ct=B(ct)),ct instanceof e._Code?he.push(...ct._items):he.push(ct),he),[]));function B(he){let ct=E[he.str];return ct===void 0||S[he.str]!==1?he:(delete S[he.str],ct)}function ae(he){return he instanceof e._Code&&he._items.some(ct=>ct instanceof e.Name&&S[ct.str]===1&&E[ct.str]!==void 0)}}function ee(R,S){for(let E in S)R[E]=(R[E]||0)-(S[E]||0)}function H(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:e._`!${V(R)}`}t.not=H;var ge=I(t.operators.AND);function Le(...R){return R.reduce(ge)}t.and=Le;var ve=I(t.operators.OR);function W(...R){return R.reduce(ve)}t.or=W;function I(R){return(S,E)=>S===e.nil?E:E===e.nil?S:e._`${V(S)} ${R} ${V(E)}`}function V(R){return R instanceof e.Name?R:e._`(${R})`}}),kt=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Xe(),r=ng();function n(w){let k={};for(let $ of w)k[$]=!0;return k}t.toHash=n;function i(w,k){return typeof k=="boolean"?k:Object.keys(k).length===0?!0:(a(w,k),!o(k,w.self.RULES.all))}t.alwaysValidSchema=i;function a(w,k=w.schema){let{opts:$,self:P}=w;if(!$.strictSchema||typeof k=="boolean")return;let C=P.RULES.keywords;for(let T in k)C[T]||x(w,`unknown keyword: "${T}"`)}t.checkUnknownRules=a;function o(w,k){if(typeof w=="boolean")return!w;for(let $ in w)if(k[$])return!0;return!1}t.schemaHasRules=o;function s(w,k){if(typeof w=="boolean")return!w;for(let $ in w)if($!=="$ref"&&k.all[$])return!0;return!1}t.schemaHasRulesButRef=s;function c({topSchemaRef:w,schemaPath:k},$,P,C){if(!C){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return e._`${$}`}return e._`${w}${k}${(0,e.getProperty)(P)}`}t.schemaRefOrVal=c;function u(w){return f(decodeURIComponent(w))}t.unescapeFragment=u;function l(w){return encodeURIComponent(d(w))}t.escapeFragment=l;function d(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function f(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=f;function p(w,k){if(Array.isArray(w))for(let $ of w)k($);else k(w)}t.eachItem=p;function m({mergeNames:w,mergeToName:k,mergeValues:$,resultToName:P}){return(C,T,D,Z)=>{let N=D===void 0?T:D instanceof e.Name?(T instanceof e.Name?w(C,T,D):k(C,T,D),D):T instanceof e.Name?(k(C,D,T),T):$(T,D);return Z===e.Name&&!(N instanceof e.Name)?P(C,N):N}}t.mergeEvaluated={props:m({mergeNames:(w,k,$)=>w.if(e._`${$} !== true && ${k} !== undefined`,()=>{w.if(e._`${k} === true`,()=>w.assign($,!0),()=>w.assign($,e._`${$} || {}`).code(e._`Object.assign(${$}, ${k})`))}),mergeToName:(w,k,$)=>w.if(e._`${$} !== true`,()=>{k===!0?w.assign($,!0):(w.assign($,e._`${$} || {}`),g(w,$,k))}),mergeValues:(w,k)=>w===!0?!0:{...w,...k},resultToName:v}),items:m({mergeNames:(w,k,$)=>w.if(e._`${$} !== true && ${k} !== undefined`,()=>w.assign($,e._`${k} === true ? true : ${$} > ${k} ? ${$} : ${k}`)),mergeToName:(w,k,$)=>w.if(e._`${$} !== true`,()=>w.assign($,k===!0?!0:e._`${$} > ${k} ? ${$} : ${k}`)),mergeValues:(w,k)=>w===!0?!0:Math.max(w,k),resultToName:(w,k)=>w.var("items",k)})};function v(w,k){if(k===!0)return w.var("props",!0);let $=w.var("props",e._`{}`);return k!==void 0&&g(w,$,k),$}t.evaluatedPropsToName=v;function g(w,k,$){Object.keys($).forEach(P=>w.assign(e._`${k}${(0,e.getProperty)(P)}`,!0))}t.setEvaluated=g;var h={};function b(w,k){return w.scopeValue("func",{ref:k,code:h[k.code]||(h[k.code]=new r._Code(k.code))})}t.useFunc=b;var y;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(y||(t.Type=y={}));function _(w,k,$){if(w instanceof e.Name){let P=k===y.Num;return $?P?e._`"[" + ${w} + "]"`:e._`"['" + ${w} + "']"`:P?e._`"/" + ${w}`:e._`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(w).toString():"/"+d(w)}t.getErrorPath=_;function x(w,k,$=w.opts.strictSchema){if($){if(k=`strict mode: ${k}`,$===!0)throw Error(k);w.self.logger.warn(k)}}t.checkStrictMode=x}),so=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),Bg=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Xe(),r=kt(),n=so();t.keywordError={message:({keyword:g})=>e.str`must pass "${g}" keyword validation`},t.keyword$DataError={message:({keyword:g,schemaType:h})=>h?e.str`"${g}" keyword must be ${h} ($data)`:e.str`"${g}" keyword is invalid ($data)`};function i(g,h=t.keywordError,b,y){let{it:_}=g,{gen:x,compositeRule:w,allErrors:k}=_,$=d(g,h,b);y??(w||k)?c(x,$):u(_,e._`[${$}]`)}t.reportError=i;function a(g,h=t.keywordError,b){let{it:y}=g,{gen:_,compositeRule:x,allErrors:w}=y,k=d(g,h,b);c(_,k),!(x||w)&&u(y,n.default.vErrors)}t.reportExtraError=a;function o(g,h){g.assign(n.default.errors,h),g.if(e._`${n.default.vErrors} !== null`,()=>g.if(h,()=>g.assign(e._`${n.default.vErrors}.length`,h),()=>g.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function s({gen:g,keyword:h,schemaValue:b,data:y,errsCount:_,it:x}){if(_===void 0)throw Error("ajv implementation error");let w=g.name("err");g.forRange("i",_,n.default.errors,k=>{g.const(w,e._`${n.default.vErrors}[${k}]`),g.if(e._`${w}.instancePath === undefined`,()=>g.assign(e._`${w}.instancePath`,(0,e.strConcat)(n.default.instancePath,x.errorPath))),g.assign(e._`${w}.schemaPath`,e.str`${x.errSchemaPath}/${h}`),x.opts.verbose&&(g.assign(e._`${w}.schema`,b),g.assign(e._`${w}.data`,y))})}t.extendErrors=s;function c(g,h){let b=g.const("err",h);g.if(e._`${n.default.vErrors} === null`,()=>g.assign(n.default.vErrors,e._`[${b}]`),e._`${n.default.vErrors}.push(${b})`),g.code(e._`${n.default.errors}++`)}function u(g,h){let{gen:b,validateName:y,schemaEnv:_}=g;_.$async?b.throw(e._`new ${g.ValidationError}(${h})`):(b.assign(e._`${y}.errors`,h),b.return(!1))}var l={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(g,h,b){let{createErrors:y}=g.it;return y===!1?e._`{}`:f(g,h,b)}function f(g,h,b={}){let{gen:y,it:_}=g,x=[p(_,b),m(g,b)];return v(g,h,x),y.object(...x)}function p({errorPath:g},{instancePath:h}){let b=h?e.str`${g}${(0,r.getErrorPath)(h,r.Type.Str)}`:g;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)]}function m({keyword:g,it:{errSchemaPath:h}},{schemaPath:b,parentSchema:y}){let _=y?h:e.str`${h}/${g}`;return b&&(_=e.str`${_}${(0,r.getErrorPath)(b,r.Type.Str)}`),[l.schemaPath,_]}function v(g,{params:h,message:b},y){let{keyword:_,data:x,schemaValue:w,it:k}=g,{opts:$,propertyName:P,topSchemaRef:C,schemaPath:T}=k;y.push([l.keyword,_],[l.params,typeof h=="function"?h(g):h||e._`{}`]),$.messages&&y.push([l.message,typeof b=="function"?b(g):b]),$.verbose&&y.push([l.schema,w],[l.parentSchema,e._`${C}${T}`],[n.default.data,x]),P&&y.push([l.propertyName,P])}}),U7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Bg(),r=Xe(),n=so(),i={message:"boolean schema is false"};function a(c){let{gen:u,schema:l,validateName:d}=c;l===!1?s(c,!1):typeof l=="object"&&l.$async===!0?u.return(n.default.data):(u.assign(r._`${d}.errors`,null),u.return(!0))}t.topBoolOrEmptySchema=a;function o(c,u){let{gen:l,schema:d}=c;d===!1?(l.var(u,!1),s(c)):l.var(u,!0)}t.boolOrEmptySchema=o;function s(c,u){let{gen:l,data:d}=c,f={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(f,i,void 0,u)}}),j4=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(a){return typeof a=="string"&&r.has(a)}t.isJSONType=n;function i(){let a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=i}),N4=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:i,self:a},o){let s=a.RULES.types[o];return s&&s!==!0&&r(i,s)}t.schemaHasRulesForType=e;function r(i,a){return a.rules.some(o=>n(i,o))}t.shouldUseGroup=r;function n(i,a){var o;return i[a.keyword]!==void 0||((o=a.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}t.shouldUseRule=n}),ig=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=j4(),r=N4(),n=Bg(),i=Xe(),a=kt(),o;(function(y){y[y.Correct=0]="Correct",y[y.Wrong=1]="Wrong"})(o||(t.DataType=o={}));function s(y){let _=c(y.type);if(_.includes("null")){if(y.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!_.length&&y.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');y.nullable===!0&&_.push("null")}return _}t.getSchemaTypes=s;function c(y){let _=Array.isArray(y)?y:y?[y]:[];if(_.every(e.isJSONType))return _;throw Error("type must be JSONType or JSONType[]: "+_.join(","))}t.getJSONTypes=c;function u(y,_){let{gen:x,data:w,opts:k}=y,$=d(_,k.coerceTypes),P=_.length>0&&!($.length===0&&_.length===1&&(0,r.schemaHasRulesForType)(y,_[0]));if(P){let C=v(_,w,k.strictNumbers,o.Wrong);x.if(C,()=>{$.length?f(y,_,$):h(y)})}return P}t.coerceAndCheckDataType=u;var l=new Set(["string","number","integer","boolean","null"]);function d(y,_){return _?y.filter(x=>l.has(x)||_==="array"&&x==="array"):[]}function f(y,_,x){let{gen:w,data:k,opts:$}=y,P=w.let("dataType",i._`typeof ${k}`),C=w.let("coerced",i._`undefined`);$.coerceTypes==="array"&&w.if(i._`${P} == 'object' && Array.isArray(${k}) && ${k}.length == 1`,()=>w.assign(k,i._`${k}[0]`).assign(P,i._`typeof ${k}`).if(v(_,k,$.strictNumbers),()=>w.assign(C,k))),w.if(i._`${C} !== undefined`);for(let D of x)(l.has(D)||D==="array"&&$.coerceTypes==="array")&&T(D);w.else(),h(y),w.endIf(),w.if(i._`${C} !== undefined`,()=>{w.assign(k,C),p(y,C)});function T(D){switch(D){case"string":w.elseIf(i._`${P} == "number" || ${P} == "boolean"`).assign(C,i._`"" + ${k}`).elseIf(i._`${k} === null`).assign(C,i._`""`);return;case"number":w.elseIf(i._`${P} == "boolean" || ${k} === null
|
|
150
|
+
|| (${P} == "string" && ${k} && ${k} == +${k})`).assign(C,i._`+${k}`);return;case"integer":w.elseIf(i._`${P} === "boolean" || ${k} === null
|
|
151
|
+
|| (${P} === "string" && ${k} && ${k} == +${k} && !(${k} % 1))`).assign(C,i._`+${k}`);return;case"boolean":w.elseIf(i._`${k} === "false" || ${k} === 0 || ${k} === null`).assign(C,!1).elseIf(i._`${k} === "true" || ${k} === 1`).assign(C,!0);return;case"null":w.elseIf(i._`${k} === "" || ${k} === 0 || ${k} === false`),w.assign(C,null);return;case"array":w.elseIf(i._`${P} === "string" || ${P} === "number"
|
|
152
|
+
|| ${P} === "boolean" || ${k} === null`).assign(C,i._`[${k}]`)}}}function p({gen:y,parentData:_,parentDataProperty:x},w){y.if(i._`${_} !== undefined`,()=>y.assign(i._`${_}[${x}]`,w))}function m(y,_,x,w=o.Correct){let k=w===o.Correct?i.operators.EQ:i.operators.NEQ,$;switch(y){case"null":return i._`${_} ${k} null`;case"array":$=i._`Array.isArray(${_})`;break;case"object":$=i._`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":$=P(i._`!(${_} % 1) && !isNaN(${_})`);break;case"number":$=P();break;default:return i._`typeof ${_} ${k} ${y}`}return w===o.Correct?$:(0,i.not)($);function P(C=i.nil){return(0,i.and)(i._`typeof ${_} == "number"`,C,x?i._`isFinite(${_})`:i.nil)}}t.checkDataType=m;function v(y,_,x,w){if(y.length===1)return m(y[0],_,x,w);let k,$=(0,a.toHash)(y);if($.array&&$.object){let P=i._`typeof ${_} != "object"`;k=$.null?P:i._`!${_} || ${P}`,delete $.null,delete $.array,delete $.object}else k=i.nil;$.number&&delete $.integer;for(let P in $)k=(0,i.and)(k,m(P,_,x,w));return k}t.checkDataTypes=v;var g={message:({schema:y})=>`must be ${y}`,params:({schema:y,schemaValue:_})=>typeof y=="string"?i._`{type: ${y}}`:i._`{type: ${_}}`};function h(y){let _=b(y);(0,n.reportError)(_,g)}t.reportTypeError=h;function b(y){let{gen:_,data:x,schema:w}=y,k=(0,a.schemaRefOrVal)(y,w,"type");return{gen:_,keyword:"type",data:x,schema:w.type,schemaCode:k,schemaValue:k,parentSchema:w,params:{},it:y}}}),D7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Xe(),r=kt();function n(a,o){let{properties:s,items:c}=a.schema;if(o==="object"&&s)for(let u in s)i(a,u,s[u].default);else o==="array"&&Array.isArray(c)&&c.forEach((u,l)=>i(a,l,u.default))}t.assignDefaults=n;function i(a,o,s){let{gen:c,compositeRule:u,data:l,opts:d}=a;if(s===void 0)return;let f=e._`${l}${(0,e.getProperty)(o)}`;if(u){(0,r.checkStrictMode)(a,`default is ignored for: ${f}`);return}let p=e._`${f} === undefined`;d.useDefaults==="empty"&&(p=e._`${p} || ${f} === null || ${f} === ""`),c.if(p,e._`${f} = ${(0,e.stringify)(s)}`)}}),zi=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Xe(),r=kt(),n=so(),i=kt();function a(y,_){let{gen:x,data:w,it:k}=y;x.if(d(x,w,_,k.opts.ownProperties),()=>{y.setParams({missingProperty:e._`${_}`},!0),y.error()})}t.checkReportMissingProp=a;function o({gen:y,data:_,it:{opts:x}},w,k){return(0,e.or)(...w.map($=>(0,e.and)(d(y,_,$,x.ownProperties),e._`${k} = ${$}`)))}t.checkMissingProp=o;function s(y,_){y.setParams({missingProperty:_},!0),y.error()}t.reportMissingProp=s;function c(y){return y.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}t.hasPropFunc=c;function u(y,_,x){return e._`${c(y)}.call(${_}, ${x})`}t.isOwnProperty=u;function l(y,_,x,w){let k=e._`${_}${(0,e.getProperty)(x)} !== undefined`;return w?e._`${k} && ${u(y,_,x)}`:k}t.propertyInData=l;function d(y,_,x,w){let k=e._`${_}${(0,e.getProperty)(x)} === undefined`;return w?(0,e.or)(k,(0,e.not)(u(y,_,x))):k}t.noPropertyInData=d;function f(y){return y?Object.keys(y).filter(_=>_!=="__proto__"):[]}t.allSchemaProperties=f;function p(y,_){return f(_).filter(x=>!(0,r.alwaysValidSchema)(y,_[x]))}t.schemaProperties=p;function m({schemaCode:y,data:_,it:{gen:x,topSchemaRef:w,schemaPath:k,errorPath:$},it:P},C,T,D){let Z=D?e._`${y}, ${_}, ${w}${k}`:_,N=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,$)],[n.default.parentData,P.parentData],[n.default.parentDataProperty,P.parentDataProperty],[n.default.rootData,n.default.rootData]];P.opts.dynamicRef&&N.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);let ee=e._`${Z}, ${x.object(...N)}`;return T!==e.nil?e._`${C}.call(${T}, ${ee})`:e._`${C}(${ee})`}t.callValidateCode=m;var v=e._`new RegExp`;function g({gen:y,it:{opts:_}},x){let w=_.unicodeRegExp?"u":"",{regExp:k}=_.code,$=k(x,w);return y.scopeValue("pattern",{key:$.toString(),ref:$,code:e._`${k.code==="new RegExp"?v:(0,i.useFunc)(y,k)}(${x}, ${w})`})}t.usePattern=g;function h(y){let{gen:_,data:x,keyword:w,it:k}=y,$=_.name("valid");if(k.allErrors){let C=_.let("valid",!0);return P(()=>_.assign(C,!1)),C}return _.var($,!0),P(()=>_.break()),$;function P(C){let T=_.const("len",e._`${x}.length`);_.forRange("i",0,T,D=>{y.subschema({keyword:w,dataProp:D,dataPropType:r.Type.Num},$),_.if((0,e.not)($),C)})}}t.validateArray=h;function b(y){let{gen:_,schema:x,keyword:w,it:k}=y;if(!Array.isArray(x))throw Error("ajv implementation error");if(x.some(C=>(0,r.alwaysValidSchema)(k,C))&&!k.opts.unevaluated)return;let $=_.let("valid",!1),P=_.name("_valid");_.block(()=>x.forEach((C,T)=>{let D=y.subschema({keyword:w,schemaProp:T,compositeRule:!0},P);_.assign($,e._`${$} || ${P}`),!y.mergeValidEvaluated(D,P)&&_.if((0,e.not)($))})),y.result($,()=>y.reset(),()=>y.error(!0))}t.validateUnion=b}),M7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Xe(),r=so(),n=zi(),i=Bg();function a(p,m){let{gen:v,keyword:g,schema:h,parentSchema:b,it:y}=p,_=m.macro.call(y.self,h,b,y),x=l(v,g,_);y.opts.validateSchema!==!1&&y.self.validateSchema(_,!0);let w=v.name("valid");p.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${y.errSchemaPath}/${g}`,topSchemaRef:x,compositeRule:!0},w),p.pass(w,()=>p.error(!0))}t.macroKeywordCode=a;function o(p,m){var v;let{gen:g,keyword:h,schema:b,parentSchema:y,$data:_,it:x}=p;u(x,m);let w=!_&&m.compile?m.compile.call(x.self,b,y,x):m.validate,k=l(g,h,w),$=g.let("valid");p.block$data($,P),p.ok((v=m.valid)!==null&&v!==void 0?v:$);function P(){if(m.errors===!1)D(),m.modifying&&s(p),Z(()=>p.error());else{let N=m.async?C():T();m.modifying&&s(p),Z(()=>c(p,N))}}function C(){let N=g.let("ruleErrs",null);return g.try(()=>D(e._`await `),ee=>g.assign($,!1).if(e._`${ee} instanceof ${x.ValidationError}`,()=>g.assign(N,e._`${ee}.errors`),()=>g.throw(ee))),N}function T(){let N=e._`${k}.errors`;return g.assign(N,null),D(e.nil),N}function D(N=m.async?e._`await `:e.nil){let ee=x.opts.passContext?r.default.this:r.default.self,H=!("compile"in m&&!_||m.schema===!1);g.assign($,e._`${N}${(0,n.callValidateCode)(p,k,ee,H)}`,m.modifying)}function Z(N){var ee;g.if((0,e.not)((ee=m.valid)!==null&&ee!==void 0?ee:$),N)}}t.funcKeywordCode=o;function s(p){let{gen:m,data:v,it:g}=p;m.if(g.parentData,()=>m.assign(v,e._`${g.parentData}[${g.parentDataProperty}]`))}function c(p,m){let{gen:v}=p;v.if(e._`Array.isArray(${m})`,()=>{v.assign(r.default.vErrors,e._`${r.default.vErrors} === null ? ${m} : ${r.default.vErrors}.concat(${m})`).assign(r.default.errors,e._`${r.default.vErrors}.length`),(0,i.extendErrors)(p)},()=>p.error())}function u({schemaEnv:p},m){if(m.async&&!p.$async)throw Error("async keyword in sync schema")}function l(p,m,v){if(v===void 0)throw Error(`keyword "${m}" failed to compile`);return p.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function d(p,m,v=!1){return!m.length||m.some(g=>g==="array"?Array.isArray(p):g==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==g||v&&typeof p>"u")}t.validSchemaType=d;function f({schema:p,opts:m,self:v,errSchemaPath:g},h,b){if(Array.isArray(h.keyword)?!h.keyword.includes(b):h.keyword!==b)throw Error("ajv implementation error");let y=h.dependencies;if(y?.some(_=>!Object.prototype.hasOwnProperty.call(p,_)))throw Error(`parent schema must have dependencies of ${b}: ${y.join(",")}`);if(h.validateSchema&&!h.validateSchema(p[b])){let _=`keyword "${b}" value is invalid at path "${g}": `+v.errorsText(h.validateSchema.errors);if(m.validateSchema==="log")v.logger.error(_);else throw Error(_)}}t.validateKeywordUsage=f}),q7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Xe(),r=kt();function n(o,{keyword:s,schemaProp:c,schema:u,schemaPath:l,errSchemaPath:d,topSchemaRef:f}){if(s!==void 0&&u!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let p=o.schema[s];return c===void 0?{schema:p,schemaPath:e._`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:p[c],schemaPath:e._`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(c)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,r.escapeFragment)(c)}`}}if(u!==void 0){if(l===void 0||d===void 0||f===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:f,errSchemaPath:d}}throw Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function i(o,s,{dataProp:c,dataPropType:u,data:l,dataTypes:d,propertyName:f}){if(l!==void 0&&c!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:p}=s;if(c!==void 0){let{errorPath:v,dataPathArr:g,opts:h}=s,b=p.let("data",e._`${s.data}${(0,e.getProperty)(c)}`,!0);m(b),o.errorPath=e.str`${v}${(0,r.getErrorPath)(c,u,h.jsPropertySyntax)}`,o.parentDataProperty=e._`${c}`,o.dataPathArr=[...g,o.parentDataProperty]}if(l!==void 0){let v=l instanceof e.Name?l:p.let("data",l,!0);m(v),f!==void 0&&(o.propertyName=f)}d&&(o.dataTypes=d);function m(v){o.data=v,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,v]}}t.extendSubschemaData=i;function a(o,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:u,createErrors:l,allErrors:d}){u!==void 0&&(o.compositeRule=u),l!==void 0&&(o.createErrors=l),d!==void 0&&(o.allErrors=d),o.jtdDiscriminator=s,o.jtdMetadata=c}t.extendSubschemaMode=a}),R4=ue((t,e)=>{e.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var a,o,s;if(Array.isArray(n)){if(a=n.length,a!=i.length)return!1;for(o=a;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(s=Object.keys(n),a=s.length,a!==Object.keys(i).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,s[o]))return!1;for(o=a;o--!==0;){var c=s[o];if(!r(n[c],i[c]))return!1}return!0}return n!==n&&i!==i}}),Z7=ue((t,e)=>{var r=e.exports=function(a,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var c=typeof s=="function"?s:s.pre||function(){},u=s.post||function(){};n(o,c,u,a,"",a)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.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 n(a,o,s,c,u,l,d,f,p,m){if(c&&typeof c=="object"&&!Array.isArray(c)){o(c,u,l,d,f,p,m);for(var v in c){var g=c[v];if(Array.isArray(g)){if(v in r.arrayKeywords)for(var h=0;h<g.length;h++)n(a,o,s,g[h],u+"/"+v+"/"+h,l,u,v,c,h)}else if(v in r.propsKeywords){if(g&&typeof g=="object")for(var b in g)n(a,o,s,g[b],u+"/"+v+"/"+i(b),l,u,v,c,b)}else(v in r.keywords||a.allKeys&&!(v in r.skipKeywords))&&n(a,o,s,g,u+"/"+v,l,u,v,c)}s(c,u,l,d,f,p,m)}}function i(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}}),Kg=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=kt(),r=R4(),n=Z7(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(g,h=!0){return typeof g=="boolean"?!0:h===!0?!s(g):h?c(g)<=h:!1}t.inlineRef=a;var o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(let h in g){if(o.has(h))return!0;let b=g[h];if(Array.isArray(b)&&b.some(s)||typeof b=="object"&&s(b))return!0}return!1}function c(g){let h=0;for(let b in g){if(b==="$ref")return 1/0;if(h++,!i.has(b)&&(typeof g[b]=="object"&&(0,e.eachItem)(g[b],y=>h+=c(y)),h===1/0))return 1/0}return h}function u(g,h="",b){b!==!1&&(h=f(h));let y=g.parse(h);return l(g,y)}t.getFullPath=u;function l(g,h){return g.serialize(h).split("#")[0]+"#"}t._getFullPath=l;var d=/#\/?$/;function f(g){return g?g.replace(d,""):""}t.normalizeId=f;function p(g,h,b){return b=f(b),g.resolve(h,b)}t.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function v(g,h){if(typeof g=="boolean")return{};let{schemaId:b,uriResolver:y}=this.opts,_=f(g[b]||h),x={"":_},w=u(y,_,!1),k={},$=new Set;return n(g,{allKeys:!0},(T,D,Z,N)=>{if(N===void 0)return;let ee=w+D,H=x[N];typeof T[b]=="string"&&(H=ge.call(this,T[b])),Le.call(this,T.$anchor),Le.call(this,T.$dynamicAnchor),x[D]=H;function ge(ve){let W=this.opts.uriResolver.resolve;if(ve=f(H?W(H,ve):ve),$.has(ve))throw C(ve);$.add(ve);let I=this.refs[ve];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?P(T,I.schema,ve):ve!==f(ee)&&(ve[0]==="#"?(P(T,k[ve],ve),k[ve]=T):this.refs[ve]=ee),ve}function Le(ve){if(typeof ve=="string"){if(!m.test(ve))throw Error(`invalid anchor "${ve}"`);ge.call(this,`#${ve}`)}}}),k;function P(T,D,Z){if(D!==void 0&&!r(T,D))throw C(Z)}function C(T){return Error(`reference "${T}" resolves to more than one schema`)}}t.getSchemaRefs=v}),Hg=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=U7(),r=ig(),n=N4(),i=ig(),a=D7(),o=M7(),s=q7(),c=Xe(),u=so(),l=Kg(),d=kt(),f=Bg();function p(U){if(w(U)&&($(U),x(U))){h(U);return}m(U,()=>(0,e.topBoolOrEmptySchema)(U))}t.validateFunctionCode=p;function m({gen:U,validateName:q,schema:G,schemaEnv:re,opts:be},We){be.code.es5?U.func(q,c._`${u.default.data}, ${u.default.valCxt}`,re.$async,()=>{U.code(c._`"use strict"; ${y(G,be)}`),g(U,be),U.code(We)}):U.func(q,c._`${u.default.data}, ${v(be)}`,re.$async,()=>U.code(y(G,be)).code(We))}function v(U){return c._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${U.dynamicRef?c._`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function g(U,q){U.if(u.default.valCxt,()=>{U.var(u.default.instancePath,c._`${u.default.valCxt}.${u.default.instancePath}`),U.var(u.default.parentData,c._`${u.default.valCxt}.${u.default.parentData}`),U.var(u.default.parentDataProperty,c._`${u.default.valCxt}.${u.default.parentDataProperty}`),U.var(u.default.rootData,c._`${u.default.valCxt}.${u.default.rootData}`),q.dynamicRef&&U.var(u.default.dynamicAnchors,c._`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{U.var(u.default.instancePath,c._`""`),U.var(u.default.parentData,c._`undefined`),U.var(u.default.parentDataProperty,c._`undefined`),U.var(u.default.rootData,u.default.data),q.dynamicRef&&U.var(u.default.dynamicAnchors,c._`{}`)})}function h(U){let{schema:q,opts:G,gen:re}=U;m(U,()=>{G.$comment&&q.$comment&&N(U),T(U),re.let(u.default.vErrors,null),re.let(u.default.errors,0),G.unevaluated&&b(U),P(U),ee(U)})}function b(U){let{gen:q,validateName:G}=U;U.evaluated=q.const("evaluated",c._`${G}.evaluated`),q.if(c._`${U.evaluated}.dynamicProps`,()=>q.assign(c._`${U.evaluated}.props`,c._`undefined`)),q.if(c._`${U.evaluated}.dynamicItems`,()=>q.assign(c._`${U.evaluated}.items`,c._`undefined`))}function y(U,q){let G=typeof U=="object"&&U[q.schemaId];return G&&(q.code.source||q.code.process)?c._`/*# sourceURL=${G} */`:c.nil}function _(U,q){if(w(U)&&($(U),x(U))){k(U,q);return}(0,e.boolOrEmptySchema)(U,q)}function x({schema:U,self:q}){if(typeof U=="boolean")return!U;for(let G in U)if(q.RULES.all[G])return!0;return!1}function w(U){return typeof U.schema!="boolean"}function k(U,q){let{schema:G,gen:re,opts:be}=U;be.$comment&&G.$comment&&N(U),D(U),Z(U);let We=re.const("_errs",u.default.errors);P(U,We),re.var(q,c._`${We} === ${u.default.errors}`)}function $(U){(0,d.checkUnknownRules)(U),C(U)}function P(U,q){if(U.opts.jtd)return ge(U,[],!1,q);let G=(0,r.getSchemaTypes)(U.schema),re=(0,r.coerceAndCheckDataType)(U,G);ge(U,G,!re,q)}function C(U){let{schema:q,errSchemaPath:G,opts:re,self:be}=U;q.$ref&&re.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(q,be.RULES)&&be.logger.warn(`$ref: keywords ignored in schema at path "${G}"`)}function T(U){let{schema:q,opts:G}=U;q.default!==void 0&&G.useDefaults&&G.strictSchema&&(0,d.checkStrictMode)(U,"default is ignored in the schema root")}function D(U){let q=U.schema[U.opts.schemaId];q&&(U.baseId=(0,l.resolveUrl)(U.opts.uriResolver,U.baseId,q))}function Z(U){if(U.schema.$async&&!U.schemaEnv.$async)throw Error("async schema in sync schema")}function N({gen:U,schemaEnv:q,schema:G,errSchemaPath:re,opts:be}){let We=G.$comment;if(be.$comment===!0)U.code(c._`${u.default.self}.logger.log(${We})`);else if(typeof be.$comment=="function"){let lr=c.str`${re}/$comment`,En=U.scopeValue("root",{ref:q.root});U.code(c._`${u.default.self}.opts.$comment(${We}, ${lr}, ${En}.schema)`)}}function ee(U){let{gen:q,schemaEnv:G,validateName:re,ValidationError:be,opts:We}=U;G.$async?q.if(c._`${u.default.errors} === 0`,()=>q.return(u.default.data),()=>q.throw(c._`new ${be}(${u.default.vErrors})`)):(q.assign(c._`${re}.errors`,u.default.vErrors),We.unevaluated&&H(U),q.return(c._`${u.default.errors} === 0`))}function H({gen:U,evaluated:q,props:G,items:re}){G instanceof c.Name&&U.assign(c._`${q}.props`,G),re instanceof c.Name&&U.assign(c._`${q}.items`,re)}function ge(U,q,G,re){let{gen:be,schema:We,data:lr,allErrors:En,opts:Rr,self:Cr}=U,{RULES:mr}=Cr;if(We.$ref&&(Rr.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(We,mr))){be.block(()=>he(U,"$ref",mr.all.$ref.definition));return}Rr.jtd||ve(U,q),be.block(()=>{for(let Wr of mr.rules)Ra(Wr);Ra(mr.post)});function Ra(Wr){(0,n.shouldUseGroup)(We,Wr)&&(Wr.type?(be.if((0,i.checkDataType)(Wr.type,lr,Rr.strictNumbers)),Le(U,Wr),q.length===1&&q[0]===Wr.type&&G&&(be.else(),(0,i.reportTypeError)(U)),be.endIf()):Le(U,Wr),En||be.if(c._`${u.default.errors} === ${re||0}`))}}function Le(U,q){let{gen:G,schema:re,opts:{useDefaults:be}}=U;be&&(0,a.assignDefaults)(U,q.type),G.block(()=>{for(let We of q.rules)(0,n.shouldUseRule)(re,We)&&he(U,We.keyword,We.definition,q.type)})}function ve(U,q){U.schemaEnv.meta||!U.opts.strictTypes||(W(U,q),!U.opts.allowUnionTypes&&I(U,q),V(U,U.dataTypes))}function W(U,q){if(q.length){if(!U.dataTypes.length){U.dataTypes=q;return}q.forEach(G=>{S(U.dataTypes,G)||B(U,`type "${G}" not allowed by context "${U.dataTypes.join(",")}"`)}),E(U,q)}}function I(U,q){q.length>1&&!(q.length===2&&q.includes("null"))&&B(U,"use allowUnionTypes to allow union type keyword")}function V(U,q){let G=U.self.RULES.all;for(let re in G){let be=G[re];if(typeof be=="object"&&(0,n.shouldUseRule)(U.schema,be)){let{type:We}=be.definition;We.length&&!We.some(lr=>R(q,lr))&&B(U,`missing type "${We.join(",")}" for keyword "${re}"`)}}}function R(U,q){return U.includes(q)||q==="number"&&U.includes("integer")}function S(U,q){return U.includes(q)||q==="integer"&&U.includes("number")}function E(U,q){let G=[];for(let re of U.dataTypes)S(q,re)?G.push(re):q.includes("integer")&&re==="number"&&G.push("integer");U.dataTypes=G}function B(U,q){let G=U.schemaEnv.baseId+U.errSchemaPath;q+=` at "${G}" (strictTypes)`,(0,d.checkStrictMode)(U,q,U.opts.strictTypes)}class ae{constructor(q,G,re){if((0,o.validateKeywordUsage)(q,G,re),this.gen=q.gen,this.allErrors=q.allErrors,this.keyword=re,this.data=q.data,this.schema=q.schema[re],this.$data=G.$data&&q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(q,this.schema,re,this.$data),this.schemaType=G.schemaType,this.parentSchema=q.schema,this.params={},this.it=q,this.def=G,this.$data)this.schemaCode=q.gen.const("vSchema",er(this.$data,q));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,G.schemaType,G.allowUndefined))throw Error(`${re} value must be ${JSON.stringify(G.schemaType)}`);("code"in G?G.trackErrors:G.errors!==!1)&&(this.errsCount=q.gen.const("_errs",u.default.errors))}result(q,G,re){this.failResult((0,c.not)(q),G,re)}failResult(q,G,re){this.gen.if(q),re?re():this.error(),G?(this.gen.else(),G(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(q,G){this.failResult((0,c.not)(q),void 0,G)}fail(q){if(q===void 0){this.error(),!this.allErrors&&this.gen.if(!1);return}this.gen.if(q),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(q){if(!this.$data)return this.fail(q);let{schemaCode:G}=this;this.fail(c._`${G} !== undefined && (${(0,c.or)(this.invalid$data(),q)})`)}error(q,G,re){if(G){this.setParams(G),this._error(q,re),this.setParams({});return}this._error(q,re)}_error(q,G){(q?f.reportExtraError:f.reportError)(this,this.def.error,G)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(q){this.allErrors||this.gen.if(q)}setParams(q,G){G?Object.assign(this.params,q):this.params=q}block$data(q,G,re=c.nil){this.gen.block(()=>{this.check$data(q,re),G()})}check$data(q=c.nil,G=c.nil){if(!this.$data)return;let{gen:re,schemaCode:be,schemaType:We,def:lr}=this;re.if((0,c.or)(c._`${be} === undefined`,G)),q!==c.nil&&re.assign(q,!0),(We.length||lr.validateSchema)&&(re.elseIf(this.invalid$data()),this.$dataError(),q!==c.nil&&re.assign(q,!1)),re.else()}invalid$data(){let{gen:q,schemaCode:G,schemaType:re,def:be,it:We}=this;return(0,c.or)(lr(),En());function lr(){if(re.length){if(!(G instanceof c.Name))throw Error("ajv implementation error");let Rr=Array.isArray(re)?re:[re];return c._`${(0,i.checkDataTypes)(Rr,G,We.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function En(){if(be.validateSchema){let Rr=q.scopeValue("validate$data",{ref:be.validateSchema});return c._`!${Rr}(${G})`}return c.nil}}subschema(q,G){let re=(0,s.getSubschema)(this.it,q);(0,s.extendSubschemaData)(re,this.it,q),(0,s.extendSubschemaMode)(re,q);let be={...this.it,...re,items:void 0,props:void 0};return _(be,G),be}mergeEvaluated(q,G){let{it:re,gen:be}=this;re.opts.unevaluated&&(re.props!==!0&&q.props!==void 0&&(re.props=d.mergeEvaluated.props(be,q.props,re.props,G)),re.items!==!0&&q.items!==void 0&&(re.items=d.mergeEvaluated.items(be,q.items,re.items,G)))}mergeValidEvaluated(q,G){let{it:re,gen:be}=this;if(re.opts.unevaluated&&(re.props!==!0||re.items!==!0))return be.if(G,()=>this.mergeEvaluated(q,c.Name)),!0}}t.KeywordCxt=ae;function he(U,q,G,re){let be=new ae(U,G,q);"code"in G?G.code(be,re):be.$data&&G.validate?(0,o.funcKeywordCode)(be,G):"macro"in G?(0,o.macroKeywordCode)(be,G):(G.compile||G.validate)&&(0,o.funcKeywordCode)(be,G)}var ct=/^\/(?:[^~]|~0|~1)*$/,Ie=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function er(U,{dataLevel:q,dataNames:G,dataPathArr:re}){let be,We;if(U==="")return u.default.rootData;if(U[0]==="/"){if(!ct.test(U))throw Error(`Invalid JSON-pointer: ${U}`);be=U,We=u.default.rootData}else{let Cr=Ie.exec(U);if(!Cr)throw Error(`Invalid JSON-pointer: ${U}`);let mr=+Cr[1];if(be=Cr[2],be==="#"){if(mr>=q)throw Error(Rr("property/index",mr));return re[q-mr]}if(mr>q)throw Error(Rr("data",mr));if(We=G[q-mr],!be)return We}let lr=We,En=be.split("/");for(let Cr of En)Cr&&(We=c._`${We}${(0,c.getProperty)((0,d.unescapeJsonPointer)(Cr))}`,lr=c._`${lr} && ${We}`);return lr;function Rr(Cr,mr){return`Cannot access ${Cr} ${mr} levels up, current level is ${q}`}}t.getData=er}),U$=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),Gg=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Kg();class r extends Error{constructor(i,a,o,s){super(s||`can't resolve reference ${o} from id ${a}`),this.missingRef=(0,e.resolveUrl)(i,a,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}t.default=r}),D$=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Xe(),r=U$(),n=so(),i=Kg(),a=kt(),o=Hg();class s{constructor(b){var y;this.refs={},this.dynamicAnchors={};let _;typeof b.schema=="object"&&(_=b.schema),this.schema=b.schema,this.schemaId=b.schemaId,this.root=b.root||this,this.baseId=(y=b.baseId)!==null&&y!==void 0?y:(0,i.normalizeId)(_?.[b.schemaId||"$id"]),this.schemaPath=b.schemaPath,this.localRefs=b.localRefs,this.meta=b.meta,this.$async=_?.$async,this.refs={}}}t.SchemaEnv=s;function c(h){let b=d.call(this,h);if(b)return b;let y=(0,i.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:_,lines:x}=this.opts.code,{ownProperties:w}=this.opts,k=new e.CodeGen(this.scope,{es5:_,lines:x,ownProperties:w}),$;h.$async&&($=k.scopeValue("Error",{ref:r.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));let P=k.scopeName("validate");h.validateName=P;let C={gen:k,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:k.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,e.stringify)(h.schema)}:{ref:h.schema}),validateName:P,ValidationError:$,schema:h.schema,schemaEnv:h,rootId:y,baseId:h.baseId||y,schemaPath:e.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this},T;try{this._compilations.add(h),(0,o.validateFunctionCode)(C),k.optimize(this.opts.code.optimize);let D=k.toString();T=`${k.scopeRefs(n.default.scope)}return ${D}`,this.opts.code.process&&(T=this.opts.code.process(T,h));let Z=Function(`${n.default.self}`,`${n.default.scope}`,T)(this,this.scope.get());if(this.scope.value(P,{ref:Z}),Z.errors=null,Z.schema=h.schema,Z.schemaEnv=h,h.$async&&(Z.$async=!0),this.opts.code.source===!0&&(Z.source={validateName:P,validateCode:D,scopeValues:k._values}),this.opts.unevaluated){let{props:N,items:ee}=C;Z.evaluated={props:N instanceof e.Name?void 0:N,items:ee instanceof e.Name?void 0:ee,dynamicProps:N instanceof e.Name,dynamicItems:ee instanceof e.Name},Z.source&&(Z.source.evaluated=(0,e.stringify)(Z.evaluated))}return h.validate=Z,h}catch(D){throw delete h.validate,delete h.validateName,T&&this.logger.error("Error compiling schema, function code:",T),D}finally{this._compilations.delete(h)}}t.compileSchema=c;function u(h,b,y){var _;y=(0,i.resolveUrl)(this.opts.uriResolver,b,y);let x=h.refs[y];if(x)return x;let w=p.call(this,h,y);if(w===void 0){let k=(_=h.localRefs)===null||_===void 0?void 0:_[y],{schemaId:$}=this.opts;k&&(w=new s({schema:k,schemaId:$,root:h,baseId:b}))}if(w!==void 0)return h.refs[y]=l.call(this,w)}t.resolveRef=u;function l(h){return(0,i.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:c.call(this,h)}function d(h){for(let b of this._compilations)if(f(b,h))return b}t.getCompilingSchema=d;function f(h,b){return h.schema===b.schema&&h.root===b.root&&h.baseId===b.baseId}function p(h,b){let y;for(;typeof(y=this.refs[b])=="string";)b=y;return y||this.schemas[b]||m.call(this,h,b)}function m(h,b){let y=this.opts.uriResolver.parse(b),_=(0,i._getFullPath)(this.opts.uriResolver,y),x=(0,i.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&_===x)return g.call(this,y,h);let w=(0,i.normalizeId)(_),k=this.refs[w]||this.schemas[w];if(typeof k=="string"){let $=m.call(this,h,k);return typeof $?.schema!="object"?void 0:g.call(this,y,$)}if(typeof k?.schema=="object"){if(k.validate||c.call(this,k),w===(0,i.normalizeId)(b)){let{schema:$}=k,{schemaId:P}=this.opts,C=$[P];return C&&(x=(0,i.resolveUrl)(this.opts.uriResolver,x,C)),new s({schema:$,schemaId:P,root:h,baseId:x})}return g.call(this,y,k)}}t.resolveSchema=m;var v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(h,{baseId:b,schema:y,root:_}){var x;if(((x=h.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(let $ of h.fragment.slice(1).split("/")){if(typeof y=="boolean")return;let P=y[(0,a.unescapeFragment)($)];if(P===void 0)return;y=P;let C=typeof y=="object"&&y[this.opts.schemaId];!v.has($)&&C&&(b=(0,i.resolveUrl)(this.opts.uriResolver,b,C))}let w;if(typeof y!="boolean"&&y.$ref&&!(0,a.schemaHasRulesButRef)(y,this.RULES)){let $=(0,i.resolveUrl)(this.opts.uriResolver,b,y.$ref);w=m.call(this,_,$)}let{schemaId:k}=this.opts;if(w=w||new s({schema:y,schemaId:k,root:_,baseId:b}),w.schema!==w.root.schema)return w}}),L7=ue((t,e)=>{e.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}}),F7=ue((t,e)=>{var r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};e.exports={HEX:r}}),V7=ue((t,e)=>{var{HEX:r}=F7(),n=/^(?:(?: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;function i(h){if(u(h,".")<3)return{host:h,isIPV4:!1};let b=h.match(n)||[],[y]=b;return y?{host:c(y,"."),isIPV4:!0}:{host:h,isIPV4:!1}}function a(h,b=!1){let y="",_=!0;for(let x of h){if(r[x]===void 0)return;x!=="0"&&_===!0&&(_=!1),_||(y+=x)}return b&&y.length===0&&(y="0"),y}function o(h){let b=0,y={error:!1,address:"",zone:""},_=[],x=[],w=!1,k=!1,$=!1;function P(){if(x.length){if(w===!1){let C=a(x);if(C!==void 0)_.push(C);else return y.error=!0,!1}x.length=0}return!0}for(let C=0;C<h.length;C++){let T=h[C];if(!(T==="["||T==="]"))if(T===":"){if(k===!0&&($=!0),!P())break;if(b++,_.push(":"),b>7){y.error=!0;break}C-1>=0&&h[C-1]===":"&&(k=!0);continue}else if(T==="%"){if(!P())break;w=!0}else{x.push(T);continue}}return x.length&&(w?y.zone=x.join(""):$?_.push(x.join("")):_.push(a(x))),y.address=_.join(""),y}function s(h){if(u(h,":")<2)return{host:h,isIPV6:!1};let b=o(h);if(b.error)return{host:h,isIPV6:!1};{let{address:y,address:_}=b;return b.zone&&(y+="%"+b.zone,_+="%25"+b.zone),{host:y,escapedHost:_,isIPV6:!0}}}function c(h,b){let y="",_=!0,x=h.length;for(let w=0;w<x;w++){let k=h[w];k==="0"&&_?(w+1<=x&&h[w+1]===b||w+1===x)&&(y+=k,_=!1):(k===b?_=!0:_=!1,y+=k)}return y}function u(h,b){let y=0;for(let _=0;_<h.length;_++)h[_]===b&&y++;return y}var l=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,f=/^\/\.\.(?:\/|$)/u,p=/^\/?(?:.|\n)*?(?=\/|$)/u;function m(h){let b=[];for(;h.length;)if(h.match(l))h=h.replace(l,"");else if(h.match(d))h=h.replace(d,"/");else if(h.match(f))h=h.replace(f,"/"),b.pop();else if(h==="."||h==="..")h="";else{let y=h.match(p);if(y){let _=y[0];h=h.slice(_.length),b.push(_)}else throw Error("Unexpected dot segment condition")}return b.join("")}function v(h,b){let y=b!==!0?escape:unescape;return h.scheme!==void 0&&(h.scheme=y(h.scheme)),h.userinfo!==void 0&&(h.userinfo=y(h.userinfo)),h.host!==void 0&&(h.host=y(h.host)),h.path!==void 0&&(h.path=y(h.path)),h.query!==void 0&&(h.query=y(h.query)),h.fragment!==void 0&&(h.fragment=y(h.fragment)),h}function g(h){let b=[];if(h.userinfo!==void 0&&(b.push(h.userinfo),b.push("@")),h.host!==void 0){let y=unescape(h.host),_=i(y);if(_.isIPV4)y=_.host;else{let x=s(_.host);x.isIPV6===!0?y=`[${x.escapedHost}]`:y=h.host}b.push(y)}return(typeof h.port=="number"||typeof h.port=="string")&&(b.push(":"),b.push(String(h.port))),b.length?b.join(""):void 0}e.exports={recomposeAuthority:g,normalizeComponentEncoding:v,removeDotSegments:m,normalizeIPv4:i,normalizeIPv6:s,stringArrayToHexStripped:a}}),W7=ue((t,e)=>{var r=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function i(_){return typeof _.secure=="boolean"?_.secure:String(_.scheme).toLowerCase()==="wss"}function a(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function o(_){let x=String(_.scheme).toLowerCase()==="https";return(_.port===(x?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function s(_){return _.secure=i(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function c(_){if((_.port===(i(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let[x,w]=_.resourceName.split("?");_.path=x&&x!=="/"?x:void 0,_.query=w,_.resourceName=void 0}return _.fragment=void 0,_}function u(_,x){if(!_.path)return _.error="URN can not be parsed",_;let w=_.path.match(n);if(w){let k=x.scheme||_.scheme||"urn";_.nid=w[1].toLowerCase(),_.nss=w[2];let $=`${k}:${x.nid||_.nid}`,P=y[$];_.path=void 0,P&&(_=P.parse(_,x))}else _.error=_.error||"URN can not be parsed.";return _}function l(_,x){let w=x.scheme||_.scheme||"urn",k=_.nid.toLowerCase(),$=`${w}:${x.nid||k}`,P=y[$];P&&(_=P.serialize(_,x));let C=_,T=_.nss;return C.path=`${k||x.nid}:${T}`,x.skipEscape=!0,C}function d(_,x){let w=_;return w.uuid=w.nss,w.nss=void 0,!x.tolerant&&(!w.uuid||!r.test(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function f(_){let x=_;return x.nss=(_.uuid||"").toLowerCase(),x}var p={scheme:"http",domainHost:!0,parse:a,serialize:o},m={scheme:"https",domainHost:p.domainHost,parse:a,serialize:o},v={scheme:"ws",domainHost:!0,parse:s,serialize:c},g={scheme:"wss",domainHost:v.domainHost,parse:v.parse,serialize:v.serialize},h={scheme:"urn",parse:u,serialize:l,skipNormalize:!0},b={scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0},y={http:p,https:m,ws:v,wss:g,urn:h,"urn:uuid":b};e.exports=y}),B7=ue((t,e)=>{var{normalizeIPv6:r,normalizeIPv4:n,removeDotSegments:i,recomposeAuthority:a,normalizeComponentEncoding:o}=V7(),s=W7();function c(b,y){return typeof b=="string"?b=f(g(b,y),y):typeof b=="object"&&(b=g(f(b,y),y)),b}function u(b,y,_){let x=Object.assign({scheme:"null"},_),w=l(g(b,x),g(y,x),x,!0);return f(w,{...x,skipEscape:!0})}function l(b,y,_,x){let w={};return x||(b=g(f(b,_),_),y=g(f(y,_),_)),_=_||{},!_.tolerant&&y.scheme?(w.scheme=y.scheme,w.userinfo=y.userinfo,w.host=y.host,w.port=y.port,w.path=i(y.path||""),w.query=y.query):(y.userinfo!==void 0||y.host!==void 0||y.port!==void 0?(w.userinfo=y.userinfo,w.host=y.host,w.port=y.port,w.path=i(y.path||""),w.query=y.query):(y.path?(y.path.charAt(0)==="/"?w.path=i(y.path):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?w.path="/"+y.path:b.path?w.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+y.path:w.path=y.path,w.path=i(w.path)),w.query=y.query):(w.path=b.path,y.query!==void 0?w.query=y.query:w.query=b.query),w.userinfo=b.userinfo,w.host=b.host,w.port=b.port),w.scheme=b.scheme),w.fragment=y.fragment,w}function d(b,y,_){return typeof b=="string"?(b=unescape(b),b=f(o(g(b,_),!0),{..._,skipEscape:!0})):typeof b=="object"&&(b=f(o(b,!0),{..._,skipEscape:!0})),typeof y=="string"?(y=unescape(y),y=f(o(g(y,_),!0),{..._,skipEscape:!0})):typeof y=="object"&&(y=f(o(y,!0),{..._,skipEscape:!0})),b.toLowerCase()===y.toLowerCase()}function f(b,y){let _={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},x=Object.assign({},y),w=[],k=s[(x.scheme||_.scheme||"").toLowerCase()];k&&k.serialize&&k.serialize(_,x),_.path!==void 0&&(x.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),x.reference!=="suffix"&&_.scheme&&w.push(_.scheme,":");let $=a(_);if($!==void 0&&(x.reference!=="suffix"&&w.push("//"),w.push($),_.path&&_.path.charAt(0)!=="/"&&w.push("/")),_.path!==void 0){let P=_.path;!x.absolutePath&&(!k||!k.absolutePath)&&(P=i(P)),$===void 0&&(P=P.replace(/^\/\//u,"/%2F")),w.push(P)}return _.query!==void 0&&w.push("?",_.query),_.fragment!==void 0&&w.push("#",_.fragment),w.join("")}var p=Array.from({length:127},(b,y)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(y)));function m(b){let y=0;for(let _=0,x=b.length;_<x;++_)if(y=b.charCodeAt(_),y>126||p[y])return!0;return!1}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(b,y){let _=Object.assign({},y),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=b.indexOf("%")!==-1,k=!1;_.reference==="suffix"&&(b=(_.scheme?_.scheme+":":"")+"//"+b);let $=b.match(v);if($){if(x.scheme=$[1],x.userinfo=$[3],x.host=$[4],x.port=parseInt($[5],10),x.path=$[6]||"",x.query=$[7],x.fragment=$[8],isNaN(x.port)&&(x.port=$[5]),x.host){let C=n(x.host);if(C.isIPV4===!1){let T=r(C.host);x.host=T.host.toLowerCase(),k=T.isIPV6}else x.host=C.host,k=!0}x.scheme===void 0&&x.userinfo===void 0&&x.host===void 0&&x.port===void 0&&x.query===void 0&&!x.path?x.reference="same-document":x.scheme===void 0?x.reference="relative":x.fragment===void 0?x.reference="absolute":x.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==x.reference&&(x.error=x.error||"URI is not a "+_.reference+" reference.");let P=s[(_.scheme||x.scheme||"").toLowerCase()];if(!_.unicodeSupport&&(!P||!P.unicodeSupport)&&x.host&&(_.domainHost||P&&P.domainHost)&&k===!1&&m(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase())}catch(C){x.error=x.error||"Host's domain name can not be converted to ASCII: "+C}(!P||P&&!P.skipNormalize)&&(w&&x.scheme!==void 0&&(x.scheme=unescape(x.scheme)),w&&x.host!==void 0&&(x.host=unescape(x.host)),x.path&&(x.path=escape(unescape(x.path))),x.fragment&&(x.fragment=encodeURI(decodeURIComponent(x.fragment)))),P&&P.parse&&P.parse(x,_)}else x.error=x.error||"URI can not be parsed.";return x}var h={SCHEMES:s,normalize:c,resolve:u,resolveComponents:l,equal:d,serialize:f,parse:g};e.exports=h,e.exports.default=h,e.exports.fastUri=h}),K7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=B7();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),H7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Hg();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Xe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=U$(),i=Gg(),a=j4(),o=D$(),s=Xe(),c=Kg(),u=ig(),l=kt(),d=L7(),f=K7(),p=(W,I)=>new RegExp(W,I);p.code="new RegExp";var m=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={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."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function y(W){var I,V,R,S,E,B,ae,he,ct,Ie,er,U,q,G,re,be,We,lr,En,Rr,Cr,mr,Ra,Wr,Pn;let Ca=W.strict,Rs=(I=W.code)===null||I===void 0?void 0:I.optimize,Aa=Rs===!0||Rs===void 0?1:Rs||0,Qu=(R=(V=W.code)===null||V===void 0?void 0:V.regExp)!==null&&R!==void 0?R:p,o_=(S=W.uriResolver)!==null&&S!==void 0?S:f.default;return{strictSchema:(B=(E=W.strictSchema)!==null&&E!==void 0?E:Ca)!==null&&B!==void 0?B:!0,strictNumbers:(he=(ae=W.strictNumbers)!==null&&ae!==void 0?ae:Ca)!==null&&he!==void 0?he:!0,strictTypes:(Ie=(ct=W.strictTypes)!==null&&ct!==void 0?ct:Ca)!==null&&Ie!==void 0?Ie:"log",strictTuples:(U=(er=W.strictTuples)!==null&&er!==void 0?er:Ca)!==null&&U!==void 0?U:"log",strictRequired:(G=(q=W.strictRequired)!==null&&q!==void 0?q:Ca)!==null&&G!==void 0?G:!1,code:W.code?{...W.code,optimize:Aa,regExp:Qu}:{optimize:Aa,regExp:Qu},loopRequired:(re=W.loopRequired)!==null&&re!==void 0?re:b,loopEnum:(be=W.loopEnum)!==null&&be!==void 0?be:b,meta:(We=W.meta)!==null&&We!==void 0?We:!0,messages:(lr=W.messages)!==null&&lr!==void 0?lr:!0,inlineRefs:(En=W.inlineRefs)!==null&&En!==void 0?En:!0,schemaId:(Rr=W.schemaId)!==null&&Rr!==void 0?Rr:"$id",addUsedSchema:(Cr=W.addUsedSchema)!==null&&Cr!==void 0?Cr:!0,validateSchema:(mr=W.validateSchema)!==null&&mr!==void 0?mr:!0,validateFormats:(Ra=W.validateFormats)!==null&&Ra!==void 0?Ra:!0,unicodeRegExp:(Wr=W.unicodeRegExp)!==null&&Wr!==void 0?Wr:!0,int32range:(Pn=W.int32range)!==null&&Pn!==void 0?Pn:!0,uriResolver:o_}}class _{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...y(I)};let{es5:V,lines:R}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:V,lines:R}),this.logger=D(I.logger);let S=I.validateFormats;I.validateFormats=!1,this.RULES=(0,a.getRules)(),x.call(this,g,I,"NOT SUPPORTED"),x.call(this,h,I,"DEPRECATED","warn"),this._metaOpts=C.call(this),I.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&P.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),k.call(this),I.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:I,meta:V,schemaId:R}=this.opts,S=d;R==="id"&&(S={...d},S.id=S.$id,delete S.$id),V&&I&&this.addMetaSchema(S,S[R],!1)}defaultMeta(){let{meta:I,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[V]||I:void 0}validate(I,V){let R;if(typeof I=="string"){if(R=this.getSchema(I),!R)throw Error(`no schema with key or ref "${I}"`)}else R=this.compile(I);let S=R(V);return"$async"in R||(this.errors=R.errors),S}compile(I,V){let R=this._addSchema(I,V);return R.validate||this._compileSchemaEnv(R)}compileAsync(I,V){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:R}=this.opts;return S.call(this,I,V);async function S(Ie,er){await E.call(this,Ie.$schema);let U=this._addSchema(Ie,er);return U.validate||B.call(this,U)}async function E(Ie){Ie&&!this.getSchema(Ie)&&await S.call(this,{$ref:Ie},!0)}async function B(Ie){try{return this._compileSchemaEnv(Ie)}catch(er){if(!(er instanceof i.default))throw er;return ae.call(this,er),await he.call(this,er.missingSchema),B.call(this,Ie)}}function ae({missingSchema:Ie,missingRef:er}){if(this.refs[Ie])throw Error(`AnySchema ${Ie} is loaded but ${er} cannot be resolved`)}async function he(Ie){let er=await ct.call(this,Ie);this.refs[Ie]||await E.call(this,er.$schema),this.refs[Ie]||this.addSchema(er,Ie,V)}async function ct(Ie){let er=this._loading[Ie];if(er)return er;try{return await(this._loading[Ie]=R(Ie))}finally{delete this._loading[Ie]}}}addSchema(I,V,R,S=this.opts.validateSchema){if(Array.isArray(I)){for(let B of I)this.addSchema(B,void 0,R,S);return this}let E;if(typeof I=="object"){let{schemaId:B}=this.opts;if(E=I[B],E!==void 0&&typeof E!="string")throw Error(`schema ${B} must be string`)}return V=(0,c.normalizeId)(V||E),this._checkUnique(V),this.schemas[V]=this._addSchema(I,R,V,S,!0),this}addMetaSchema(I,V,R=this.opts.validateSchema){return this.addSchema(I,V,!0,R),this}validateSchema(I,V){if(typeof I=="boolean")return!0;let R;if(R=I.$schema,R!==void 0&&typeof R!="string")throw Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let S=this.validate(R,I);if(!S&&V){let E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw Error(E)}return S}getSchema(I){let V;for(;typeof(V=w.call(this,I))=="string";)I=V;if(V===void 0){let{schemaId:R}=this.opts,S=new o.SchemaEnv({schema:{},schemaId:R});if(V=o.resolveSchema.call(this,S,I),!V)return;this.refs[I]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let V=w.call(this,I);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{let V=I;this._cache.delete(V);let R=I[this.opts.schemaId];return R&&(R=(0,c.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(let V of I)this.addKeyword(V);return this}addKeyword(I,V){let R;if(typeof I=="string")R=I,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=R);else if(typeof I=="object"&&V===void 0){if(V=I,R=V.keyword,Array.isArray(R)&&!R.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(N.call(this,R,V),!V)return(0,l.eachItem)(R,E=>ee.call(this,E)),this;ge.call(this,V);let S={...V,type:(0,u.getJSONTypes)(V.type),schemaType:(0,u.getJSONTypes)(V.schemaType)};return(0,l.eachItem)(R,S.type.length===0?E=>ee.call(this,E,S):E=>S.type.forEach(B=>ee.call(this,E,S,B))),this}getKeyword(I){let V=this.RULES.all[I];return typeof V=="object"?V.definition:!!V}removeKeyword(I){let{RULES:V}=this;delete V.keywords[I],delete V.all[I];for(let R of V.rules){let S=R.rules.findIndex(E=>E.keyword===I);S>=0&&R.rules.splice(S,1)}return this}addFormat(I,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[I]=V,this}errorsText(I=this.errors,{separator:V=", ",dataVar:R="data"}={}){return!I||I.length===0?"No errors":I.map(S=>`${R}${S.instancePath} ${S.message}`).reduce((S,E)=>S+V+E)}$dataMetaSchema(I,V){let R=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(let S of V){let E=S.split("/").slice(1),B=I;for(let ae of E)B=B[ae];for(let ae in R){let he=R[ae];if(typeof he!="object")continue;let{$data:ct}=he.definition,Ie=B[ae];ct&&Ie&&(B[ae]=ve(Ie))}}return I}_removeAllSchemas(I,V){for(let R in I){let S=I[R];(!V||V.test(R))&&(typeof S=="string"?delete I[R]:S&&!S.meta&&(this._cache.delete(S.schema),delete I[R]))}}_addSchema(I,V,R,S=this.opts.validateSchema,E=this.opts.addUsedSchema){let B,{schemaId:ae}=this.opts;if(typeof I=="object")B=I[ae];else{if(this.opts.jtd)throw Error("schema must be object");if(typeof I!="boolean")throw Error("schema must be object or boolean")}let he=this._cache.get(I);if(he!==void 0)return he;R=(0,c.normalizeId)(B||R);let ct=c.getSchemaRefs.call(this,I,R);return he=new o.SchemaEnv({schema:I,schemaId:ae,meta:V,baseId:R,localRefs:ct}),this._cache.set(he.schema,he),E&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=he),S&&this.validateSchema(I,!0),he}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):o.compileSchema.call(this,I),!I.validate)throw Error("ajv implementation error");return I.validate}_compileMetaSchema(I){let V=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,I)}finally{this.opts=V}}}_.ValidationError=n.default,_.MissingRefError=i.default,t.default=_;function x(W,I,V,R="error"){for(let S in W){let E=S;E in I&&this.logger[R](`${V}: option ${S}. ${W[E]}`)}}function w(W){return W=(0,c.normalizeId)(W),this.schemas[W]||this.refs[W]}function k(){let W=this.opts.schemas;if(W)if(Array.isArray(W))this.addSchema(W);else for(let I in W)this.addSchema(W[I],I)}function $(){for(let W in this.opts.formats){let I=this.opts.formats[W];I&&this.addFormat(W,I)}}function P(W){if(Array.isArray(W)){this.addVocabulary(W);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let I in W){let V=W[I];V.keyword||(V.keyword=I),this.addKeyword(V)}}function C(){let W={...this.opts};for(let I of m)delete W[I];return W}var T={log(){},warn(){},error(){}};function D(W){if(W===!1)return T;if(W===void 0)return console;if(W.log&&W.warn&&W.error)return W;throw Error("logger must implement log, warn and error methods")}var Z=/^[a-z_$][a-z0-9_$:-]*$/i;function N(W,I){let{RULES:V}=this;if((0,l.eachItem)(W,R=>{if(V.keywords[R])throw Error(`Keyword ${R} is already defined`);if(!Z.test(R))throw Error(`Keyword ${R} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw Error('$data keyword must have "code" or "validate" function')}function ee(W,I,V){var R;let S=I?.post;if(V&&S)throw Error('keyword with "post" flag cannot have "type"');let{RULES:E}=this,B=S?E.post:E.rules.find(({type:he})=>he===V);if(B||(B={type:V,rules:[]},E.rules.push(B)),E.keywords[W]=!0,!I)return;let ae={keyword:W,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?H.call(this,B,ae,I.before):B.rules.push(ae),E.all[W]=ae,(R=I.implements)===null||R===void 0||R.forEach(he=>this.addKeyword(he))}function H(W,I,V){let R=W.rules.findIndex(S=>S.keyword===V);R>=0?W.rules.splice(R,0,I):(W.rules.push(I),this.logger.warn(`rule ${V} is not defined`))}function ge(W){let{metaSchema:I}=W;I!==void 0&&(W.$data&&this.opts.$data&&(I=ve(I)),W.validateSchema=this.compile(I,!0))}var Le={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ve(W){return{anyOf:[W,Le]}}}),G7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Q7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=Gg(),r=zi(),n=Xe(),i=so(),a=D$(),o=kt(),s={keyword:"$ref",schemaType:"string",code(l){let{gen:d,schema:f,it:p}=l,{baseId:m,schemaEnv:v,validateName:g,opts:h,self:b}=p,{root:y}=v;if((f==="#"||f==="#/")&&m===y.baseId)return x();let _=a.resolveRef.call(b,y,m,f);if(_===void 0)throw new e.default(p.opts.uriResolver,m,f);if(_ instanceof a.SchemaEnv)return w(_);return k(_);function x(){if(v===y)return u(l,g,v,v.$async);let $=d.scopeValue("root",{ref:y});return u(l,n._`${$}.validate`,y,y.$async)}function w($){let P=c(l,$);u(l,P,$,$.$async)}function k($){let P=d.scopeValue("schema",h.code.source===!0?{ref:$,code:(0,n.stringify)($)}:{ref:$}),C=d.name("valid"),T=l.subschema({schema:$,dataTypes:[],schemaPath:n.nil,topSchemaRef:P,errSchemaPath:f},C);l.mergeEvaluated(T),l.ok(C)}}};function c(l,d){let{gen:f}=l;return d.validate?f.scopeValue("validate",{ref:d.validate}):n._`${f.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=c;function u(l,d,f,p){let{gen:m,it:v}=l,{allErrors:g,schemaEnv:h,opts:b}=v,y=b.passContext?i.default.this:n.nil;p?_():x();function _(){if(!h.$async)throw Error("async schema referenced by sync schema");let $=m.let("valid");m.try(()=>{m.code(n._`await ${(0,r.callValidateCode)(l,d,y)}`),k(d),!g&&m.assign($,!0)},P=>{m.if(n._`!(${P} instanceof ${v.ValidationError})`,()=>m.throw(P)),w(P),!g&&m.assign($,!1)}),l.ok($)}function x(){l.result((0,r.callValidateCode)(l,d,y),()=>k(d),()=>w(d))}function w($){let P=n._`${$}.errors`;m.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${P} : ${i.default.vErrors}.concat(${P})`),m.assign(i.default.errors,n._`${i.default.vErrors}.length`)}function k($){var P;if(!v.opts.unevaluated)return;let C=(P=f?.validate)===null||P===void 0?void 0:P.evaluated;if(v.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(v.props=o.mergeEvaluated.props(m,C.props,v.props));else{let T=m.var("props",n._`${$}.evaluated.props`);v.props=o.mergeEvaluated.props(m,T,v.props,n.Name)}if(v.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(v.items=o.mergeEvaluated.items(m,C.items,v.items));else{let T=m.var("items",n._`${$}.evaluated.items`);v.items=o.mergeEvaluated.items(m,T,v.items,n.Name)}}}t.callRef=u,t.default=s}),Y7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=G7(),r=Q7(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),J7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:o,schemaCode:s})=>e.str`must be ${n[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>e._`{comparison: ${n[o].okStr}, limit: ${s}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(o){let{keyword:s,data:c,schemaCode:u}=o;o.fail$data(e._`${c} ${n[s].fail} ${u} || isNaN(${c})`)}};t.default=a}),X7=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r={message:({schemaCode:i})=>e.str`must be multiple of ${i}`,params:({schemaCode:i})=>e._`{multipleOf: ${i}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(i){let{gen:a,data:o,schemaCode:s,it:c}=i,u=c.opts.multipleOfPrecision,l=a.let("res"),d=u?e._`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:e._`${l} !== parseInt(${l})`;i.fail$data(e._`(${s} === 0 || (${l} = ${o}/${s}, ${d}))`)}};t.default=n}),eY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){let n=r.length,i=0,a=0,o;for(;a<n;)i++,o=r.charCodeAt(a++),o>=55296&&o<=56319&&a<n&&(o=r.charCodeAt(a),(o&64512)===56320&&a++);return i}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),tY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n=eY(),i={message({keyword:o,schemaCode:s}){let c=o==="maxLength"?"more":"fewer";return e.str`must NOT have ${c} than ${s} characters`},params:({schemaCode:o})=>e._`{limit: ${o}}`},a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:i,code(o){let{keyword:s,data:c,schemaCode:u,it:l}=o,d=s==="maxLength"?e.operators.GT:e.operators.LT,f=l.opts.unicode===!1?e._`${c}.length`:e._`${(0,r.useFunc)(o.gen,n.default)}(${c})`;o.fail$data(e._`${f} ${d} ${u}`)}};t.default=a}),rY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zi(),r=kt(),n=Xe(),i={message:({schemaCode:o})=>n.str`must match pattern "${o}"`,params:({schemaCode:o})=>n._`{pattern: ${o}}`},a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i,code(o){let{gen:s,data:c,$data:u,schema:l,schemaCode:d,it:f}=o,p=f.opts.unicodeRegExp?"u":"";if(u){let{regExp:m}=f.opts.code,v=m.code==="new RegExp"?n._`new RegExp`:(0,r.useFunc)(s,m),g=s.let("valid");s.try(()=>s.assign(g,n._`${v}(${d}, ${p}).test(${c})`),()=>s.assign(g,!1)),o.fail$data(n._`!${g}`)}else{let m=(0,e.usePattern)(o,l);o.fail$data(n._`!${m}.test(${c})`)}}};t.default=a}),nY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r={message({keyword:i,schemaCode:a}){let o=i==="maxProperties"?"more":"fewer";return e.str`must NOT have ${o} than ${a} properties`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(i){let{keyword:a,data:o,schemaCode:s}=i,c=a==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data(e._`Object.keys(${o}).length ${c} ${s}`)}};t.default=n}),iY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zi(),r=Xe(),n=kt(),i={message:({params:{missingProperty:o}})=>r.str`must have required property '${o}'`,params:({params:{missingProperty:o}})=>r._`{missingProperty: ${o}}`},a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:i,code(o){let{gen:s,schema:c,schemaCode:u,data:l,$data:d,it:f}=o,{opts:p}=f;if(!d&&c.length===0)return;let m=c.length>=p.loopRequired;if(f.allErrors?v():g(),p.strictRequired){let y=o.parentSchema.properties,{definedProperties:_}=o.it;for(let x of c)if(y?.[x]===void 0&&!_.has(x)){let w=f.schemaEnv.baseId+f.errSchemaPath,k=`required property "${x}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(f,k,f.opts.strictRequired)}}function v(){if(m||d)o.block$data(r.nil,h);else for(let y of c)(0,e.checkReportMissingProp)(o,y)}function g(){let y=s.let("missing");if(m||d){let _=s.let("valid",!0);o.block$data(_,()=>b(y,_)),o.ok(_)}else s.if((0,e.checkMissingProp)(o,c,y)),(0,e.reportMissingProp)(o,y),s.else()}function h(){s.forOf("prop",u,y=>{o.setParams({missingProperty:y}),s.if((0,e.noPropertyInData)(s,l,y,p.ownProperties),()=>o.error())})}function b(y,_){o.setParams({missingProperty:y}),s.forOf(y,u,()=>{s.assign(_,(0,e.propertyInData)(s,l,y,p.ownProperties)),s.if((0,r.not)(_),()=>{o.error(),s.break()})},r.nil)}}};t.default=a}),aY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r={message({keyword:i,schemaCode:a}){let o=i==="maxItems"?"more":"fewer";return e.str`must NOT have ${o} than ${a} items`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(i){let{keyword:a,data:o,schemaCode:s}=i,c=a==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data(e._`${o}.length ${c} ${s}`)}};t.default=n}),M$=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=R4();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),oY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ig(),r=Xe(),n=kt(),i=M$(),a={message:({params:{i:s,j:c}})=>r.str`must NOT have duplicate items (items ## ${c} and ${s} are identical)`,params:({params:{i:s,j:c}})=>r._`{i: ${s}, j: ${c}}`},o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(s){let{gen:c,data:u,$data:l,schema:d,parentSchema:f,schemaCode:p,it:m}=s;if(!l&&!d)return;let v=c.let("valid"),g=f.items?(0,e.getSchemaTypes)(f.items):[];s.block$data(v,h,r._`${p} === false`),s.ok(v);function h(){let x=c.let("i",r._`${u}.length`),w=c.let("j");s.setParams({i:x,j:w}),c.assign(v,!0),c.if(r._`${x} > 1`,()=>(b()?y:_)(x,w))}function b(){return g.length>0&&!g.some(x=>x==="object"||x==="array")}function y(x,w){let k=c.name("item"),$=(0,e.checkDataTypes)(g,k,m.opts.strictNumbers,e.DataType.Wrong),P=c.const("indices",r._`{}`);c.for(r._`;${x}--;`,()=>{c.let(k,r._`${u}[${x}]`),c.if($,r._`continue`),g.length>1&&c.if(r._`typeof ${k} == "string"`,r._`${k} += "_"`),c.if(r._`typeof ${P}[${k}] == "number"`,()=>{c.assign(w,r._`${P}[${k}]`),s.error(),c.assign(v,!1).break()}).code(r._`${P}[${k}] = ${x}`)})}function _(x,w){let k=(0,n.useFunc)(c,i.default),$=c.name("outer");c.label($).for(r._`;${x}--;`,()=>c.for(r._`${w} = ${x}; ${w}--;`,()=>c.if(r._`${k}(${u}[${x}], ${u}[${w}])`,()=>{s.error(),c.assign(v,!1).break($)})))}}};t.default=o}),sY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n=M$(),i={message:"must be equal to constant",params:({schemaCode:o})=>e._`{allowedValue: ${o}}`},a={keyword:"const",$data:!0,error:i,code(o){let{gen:s,data:c,$data:u,schemaCode:l,schema:d}=o;u||d&&typeof d=="object"?o.fail$data(e._`!${(0,r.useFunc)(s,n.default)}(${c}, ${l})`):o.fail(e._`${d} !== ${c}`)}};t.default=a}),cY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n=M$(),i={message:"must be equal to one of the allowed values",params:({schemaCode:o})=>e._`{allowedValues: ${o}}`},a={keyword:"enum",schemaType:"array",$data:!0,error:i,code(o){let{gen:s,data:c,$data:u,schema:l,schemaCode:d,it:f}=o;if(!u&&l.length===0)throw Error("enum must have non-empty array");let p=l.length>=f.opts.loopEnum,m,v=()=>m??(m=(0,r.useFunc)(s,n.default)),g;if(p||u)g=s.let("valid"),o.block$data(g,h);else{if(!Array.isArray(l))throw Error("ajv implementation error");let y=s.const("vSchema",d);g=(0,e.or)(...l.map((_,x)=>b(y,x)))}o.pass(g);function h(){s.assign(g,!1),s.forOf("v",d,y=>s.if(e._`${v()}(${c}, ${y})`,()=>s.assign(g,!0).break()))}function b(y,_){let x=l[_];return typeof x=="object"&&x!==null?e._`${v()}(${c}, ${y}[${_}])`:e._`${c} === ${x}`}}};t.default=a}),uY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=J7(),r=X7(),n=tY(),i=rY(),a=nY(),o=iY(),s=aY(),c=oY(),u=sY(),l=cY(),d=[e.default,r.default,n.default,i.default,a.default,o.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];t.default=d}),C4=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Xe(),r=kt(),n={message:({params:{len:o}})=>e.str`must NOT have more than ${o} items`,params:({params:{len:o}})=>e._`{limit: ${o}}`},i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(o){let{parentSchema:s,it:c}=o,{items:u}=s;if(!Array.isArray(u)){(0,r.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(o,u)}};function a(o,s){let{gen:c,schema:u,data:l,keyword:d,it:f}=o;f.items=!0;let p=c.const("len",e._`${l}.length`);if(u===!1)o.setParams({len:s.length}),o.pass(e._`${p} <= ${s.length}`);else if(typeof u=="object"&&!(0,r.alwaysValidSchema)(f,u)){let v=c.var("valid",e._`${p} <= ${s.length}`);c.if((0,e.not)(v),()=>m(v)),o.ok(v)}function m(v){c.forRange("i",s.length,p,g=>{o.subschema({keyword:d,dataProp:g,dataPropType:r.Type.Num},v),!f.allErrors&&c.if((0,e.not)(v),()=>c.break())})}}t.validateAdditionalItems=a,t.default=i}),A4=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Xe(),r=kt(),n=zi(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){let{schema:s,it:c}=o;if(Array.isArray(s))return a(o,"additionalItems",s);c.items=!0,!(0,r.alwaysValidSchema)(c,s)&&o.ok((0,n.validateArray)(o))}};function a(o,s,c=o.schema){let{gen:u,parentSchema:l,data:d,keyword:f,it:p}=o;g(l),p.opts.unevaluated&&c.length&&p.items!==!0&&(p.items=r.mergeEvaluated.items(u,c.length,p.items));let m=u.name("valid"),v=u.const("len",e._`${d}.length`);c.forEach((h,b)=>{(0,r.alwaysValidSchema)(p,h)||(u.if(e._`${v} > ${b}`,()=>o.subschema({keyword:f,schemaProp:b,dataProp:b},m)),o.ok(m))});function g(h){let{opts:b,errSchemaPath:y}=p,_=c.length,x=_===h.minItems&&(_===h.maxItems||h[s]===!1);if(b.strictTuples&&!x){let w=`"${f}" is ${_}-tuple, but minItems or maxItems/${s} are not specified or different at path "${y}"`;(0,r.checkStrictMode)(p,w,b.strictTuples)}}}t.validateTuple=a,t.default=i}),lY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=A4(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),dY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n=zi(),i=C4(),a={message:({params:{len:s}})=>e.str`must NOT have more than ${s} items`,params:({params:{len:s}})=>e._`{limit: ${s}}`},o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:a,code(s){let{schema:c,parentSchema:u,it:l}=s,{prefixItems:d}=u;l.items=!0,!(0,r.alwaysValidSchema)(l,c)&&(d?(0,i.validateAdditionalItems)(s,d):s.ok((0,n.validateArray)(s)))}};t.default=o}),pY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n={message:({params:{min:a,max:o}})=>o===void 0?e.str`must contain at least ${a} valid item(s)`:e.str`must contain at least ${a} and no more than ${o} valid item(s)`,params:({params:{min:a,max:o}})=>o===void 0?e._`{minContains: ${a}}`:e._`{minContains: ${a}, maxContains: ${o}}`},i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(a){let{gen:o,schema:s,parentSchema:c,data:u,it:l}=a,d,f,{minContains:p,maxContains:m}=c;l.opts.next?(d=p===void 0?1:p,f=m):d=1;let v=o.const("len",e._`${u}.length`);if(a.setParams({min:d,max:f}),f===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&d>f){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,r.alwaysValidSchema)(l,s)){let _=e._`${v} >= ${d}`;f!==void 0&&(_=e._`${_} && ${v} <= ${f}`),a.pass(_);return}l.items=!0;let g=o.name("valid");f===void 0&&d===1?b(g,()=>o.if(g,()=>o.break())):d===0?(o.let(g,!0),f!==void 0&&o.if(e._`${u}.length > 0`,h)):(o.let(g,!1),h()),a.result(g,()=>a.reset());function h(){let _=o.name("_valid"),x=o.let("count",0);b(_,()=>o.if(_,()=>y(x)))}function b(_,x){o.forRange("i",0,v,w=>{a.subschema({keyword:"contains",dataProp:w,dataPropType:r.Type.Num,compositeRule:!0},_),x()})}function y(_){o.code(e._`${_}++`),f===void 0?o.if(e._`${_} >= ${d}`,()=>o.assign(g,!0).break()):(o.if(e._`${_} > ${f}`,()=>o.assign(g,!1).break()),d===1?o.assign(g,!0):o.if(e._`${_} >= ${d}`,()=>o.assign(g,!0)))}}};t.default=i}),fY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Xe(),r=kt(),n=zi();t.error={message:({params:{property:c,depsCount:u,deps:l}})=>{let d=u===1?"property":"properties";return e.str`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>e._`{property: ${c},
|
|
153
|
+
missingProperty: ${d},
|
|
154
|
+
depsCount: ${u},
|
|
155
|
+
deps: ${l}}`};var i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){let[u,l]=a(c);o(c,u),s(c,l)}};function a({schema:c}){let u={},l={};for(let d in c){if(d==="__proto__")continue;let f=Array.isArray(c[d])?u:l;f[d]=c[d]}return[u,l]}function o(c,u=c.schema){let{gen:l,data:d,it:f}=c;if(Object.keys(u).length===0)return;let p=l.let("missing");for(let m in u){let v=u[m];if(v.length===0)continue;let g=(0,n.propertyInData)(l,d,m,f.opts.ownProperties);c.setParams({property:m,depsCount:v.length,deps:v.join(", ")}),f.allErrors?l.if(g,()=>{for(let h of v)(0,n.checkReportMissingProp)(c,h)}):(l.if(e._`${g} && (${(0,n.checkMissingProp)(c,v,p)})`),(0,n.reportMissingProp)(c,p),l.else())}}t.validatePropertyDeps=o;function s(c,u=c.schema){let{gen:l,data:d,keyword:f,it:p}=c,m=l.name("valid");for(let v in u)(0,r.alwaysValidSchema)(p,u[v])||(l.if((0,n.propertyInData)(l,d,v,p.opts.ownProperties),()=>{let g=c.subschema({keyword:f,schemaProp:v},m);c.mergeValidEvaluated(g,m)},()=>l.var(m,!0)),c.ok(m))}t.validateSchemaDeps=s,t.default=i}),mY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n={message:"property name must be valid",params:({params:a})=>e._`{propertyName: ${a.propertyName}}`},i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(a){let{gen:o,schema:s,data:c,it:u}=a;if((0,r.alwaysValidSchema)(u,s))return;let l=o.name("valid");o.forIn("key",c,d=>{a.setParams({propertyName:d}),a.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),o.if((0,e.not)(l),()=>{a.error(!0),!u.allErrors&&o.break()})}),a.ok(l)}};t.default=i}),U4=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zi(),r=Xe(),n=so(),i=kt(),a={message:"must NOT have additional properties",params:({params:s})=>r._`{additionalProperty: ${s.additionalProperty}}`},o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:a,code(s){let{gen:c,schema:u,parentSchema:l,data:d,errsCount:f,it:p}=s;if(!f)throw Error("ajv implementation error");let{allErrors:m,opts:v}=p;if(p.props=!0,v.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(p,u))return;let g=(0,e.allSchemaProperties)(l.properties),h=(0,e.allSchemaProperties)(l.patternProperties);b(),s.ok(r._`${f} === ${n.default.errors}`);function b(){c.forIn("key",d,k=>{!g.length&&!h.length?x(k):c.if(y(k),()=>x(k))})}function y(k){let $;if(g.length>8){let P=(0,i.schemaRefOrVal)(p,l.properties,"properties");$=(0,e.isOwnProperty)(c,P,k)}else g.length?$=(0,r.or)(...g.map(P=>r._`${k} === ${P}`)):$=r.nil;return h.length&&($=(0,r.or)($,...h.map(P=>r._`${(0,e.usePattern)(s,P)}.test(${k})`))),(0,r.not)($)}function _(k){c.code(r._`delete ${d}[${k}]`)}function x(k){if(v.removeAdditional==="all"||v.removeAdditional&&u===!1){_(k);return}if(u===!1){s.setParams({additionalProperty:k}),s.error(),!m&&c.break();return}if(typeof u=="object"&&!(0,i.alwaysValidSchema)(p,u)){let $=c.name("valid");v.removeAdditional==="failing"?(w(k,$,!1),c.if((0,r.not)($),()=>{s.reset(),_(k)})):(w(k,$),!m&&c.if((0,r.not)($),()=>c.break()))}}function w(k,$,P){let C={keyword:"additionalProperties",dataProp:k,dataPropType:i.Type.Str};P===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(C,$)}}};t.default=o}),hY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Hg(),r=zi(),n=kt(),i=U4(),a={keyword:"properties",type:"object",schemaType:"object",code(o){let{gen:s,schema:c,parentSchema:u,data:l,it:d}=o;d.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));let f=(0,r.allSchemaProperties)(c);for(let h of f)d.definedProperties.add(h);d.opts.unevaluated&&f.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(s,(0,n.toHash)(f),d.props));let p=f.filter(h=>!(0,n.alwaysValidSchema)(d,c[h]));if(p.length===0)return;let m=s.name("valid");for(let h of p)v(h)?g(h):(s.if((0,r.propertyInData)(s,l,h,d.opts.ownProperties)),g(h),!d.allErrors&&s.else().var(m,!0),s.endIf()),o.it.definedProperties.add(h),o.ok(m);function v(h){return d.opts.useDefaults&&!d.compositeRule&&c[h].default!==void 0}function g(h){o.subschema({keyword:"properties",schemaProp:h,dataProp:h},m)}}};t.default=a}),gY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zi(),r=Xe(),n=kt(),i=kt(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(o){let{gen:s,schema:c,data:u,parentSchema:l,it:d}=o,{opts:f}=d,p=(0,e.allSchemaProperties)(c),m=p.filter(x=>(0,n.alwaysValidSchema)(d,c[x]));if(p.length===0||m.length===p.length&&(!d.opts.unevaluated||d.props===!0))return;let v=f.strictSchema&&!f.allowMatchingProperties&&l.properties,g=s.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,i.evaluatedPropsToName)(s,d.props));let{props:h}=d;b();function b(){for(let x of p)v&&y(x),d.allErrors?_(x):(s.var(g,!0),_(x),s.if(g))}function y(x){for(let w in v)new RegExp(x).test(w)&&(0,n.checkStrictMode)(d,`property ${w} matches pattern ${x} (use allowMatchingProperties)`)}function _(x){s.forIn("key",u,w=>{s.if(r._`${(0,e.usePattern)(o,x)}.test(${w})`,()=>{let k=m.includes(x);k||o.subschema({keyword:"patternProperties",schemaProp:x,dataProp:w,dataPropType:i.Type.Str},g),d.opts.unevaluated&&h!==!0?s.assign(r._`${h}[${w}]`,!0):!k&&!d.allErrors&&s.if((0,r.not)(g),()=>s.break())})})}}};t.default=a}),vY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kt(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){let{gen:i,schema:a,it:o}=n;if((0,e.alwaysValidSchema)(o,a)){n.fail();return}let s=i.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),n.failResult(s,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),yY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zi(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),_Y=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n={message:"must match exactly one schema in oneOf",params:({params:a})=>e._`{passingSchemas: ${a.passing}}`},i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(a){let{gen:o,schema:s,parentSchema:c,it:u}=a;if(!Array.isArray(s))throw Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;let l=s,d=o.let("valid",!1),f=o.let("passing",null),p=o.name("_valid");a.setParams({passing:f}),o.block(m),a.result(d,()=>a.reset(),()=>a.error(!0));function m(){l.forEach((v,g)=>{let h;(0,r.alwaysValidSchema)(u,v)?o.var(p,!0):h=a.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},p),g>0&&o.if(e._`${p} && ${d}`).assign(d,!1).assign(f,e._`[${f}, ${g}]`).else(),o.if(p,()=>{o.assign(d,!0),o.assign(f,g),h&&a.mergeEvaluated(h,e.Name)})})}}};t.default=i}),bY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kt(),r={keyword:"allOf",schemaType:"array",code(n){let{gen:i,schema:a,it:o}=n;if(!Array.isArray(a))throw Error("ajv implementation error");let s=i.name("valid");a.forEach((c,u)=>{if((0,e.alwaysValidSchema)(o,c))return;let l=n.subschema({keyword:"allOf",schemaProp:u},s);n.ok(s),n.mergeEvaluated(l)})}};t.default=r}),xY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=kt(),n={message:({params:o})=>e.str`must match "${o.ifClause}" schema`,params:({params:o})=>e._`{failingKeyword: ${o.ifClause}}`},i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(o){let{gen:s,parentSchema:c,it:u}=o;c.then===void 0&&c.else===void 0&&(0,r.checkStrictMode)(u,'"if" without "then" and "else" is ignored');let l=a(u,"then"),d=a(u,"else");if(!l&&!d)return;let f=s.let("valid",!0),p=s.name("_valid");if(m(),o.reset(),l&&d){let g=s.let("ifClause");o.setParams({ifClause:g}),s.if(p,v("then",g),v("else",g))}else l?s.if(p,v("then")):s.if((0,e.not)(p),v("else"));o.pass(f,()=>o.error(!0));function m(){let g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);o.mergeEvaluated(g)}function v(g,h){return()=>{let b=o.subschema({keyword:g},p);s.assign(f,p),o.mergeValidEvaluated(b,f),h?s.assign(h,e._`${g}`):o.setParams({ifClause:g})}}}};function a(o,s){let c=o.schema[s];return c!==void 0&&!(0,r.alwaysValidSchema)(o,c)}t.default=i}),wY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kt(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:a}){i.if===void 0&&(0,e.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};t.default=r}),kY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=C4(),r=lY(),n=A4(),i=dY(),a=pY(),o=fY(),s=mY(),c=U4(),u=hY(),l=gY(),d=vY(),f=yY(),p=_Y(),m=bY(),v=xY(),g=wY();function h(b=!1){let y=[d.default,f.default,p.default,m.default,v.default,g.default,s.default,c.default,o.default,u.default,l.default];return b?y.push(r.default,i.default):y.push(e.default,n.default),y.push(a.default),y}t.default=h}),SY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r={message:({schemaCode:i})=>e.str`must match format "${i}"`,params:({schemaCode:i})=>e._`{format: ${i}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(i,a){let{gen:o,data:s,$data:c,schema:u,schemaCode:l,it:d}=i,{opts:f,errSchemaPath:p,schemaEnv:m,self:v}=d;if(!f.validateFormats)return;c?g():h();function g(){let b=o.scopeValue("formats",{ref:v.formats,code:f.code.formats}),y=o.const("fDef",e._`${b}[${l}]`),_=o.let("fType"),x=o.let("format");o.if(e._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>o.assign(_,e._`${y}.type || "string"`).assign(x,e._`${y}.validate`),()=>o.assign(_,e._`"string"`).assign(x,y)),i.fail$data((0,e.or)(w(),k()));function w(){return f.strictSchema===!1?e.nil:e._`${l} && !${x}`}function k(){let $=m.$async?e._`(${y}.async ? await ${x}(${s}) : ${x}(${s}))`:e._`${x}(${s})`,P=e._`(typeof ${x} == "function" ? ${$} : ${x}.test(${s}))`;return e._`${x} && ${x} !== true && ${_} === ${a} && !${P}`}}function h(){let b=v.formats[u];if(!b){w();return}if(b===!0)return;let[y,_,x]=k(b);y===a&&i.pass($());function w(){if(f.strictSchema===!1){v.logger.warn(P());return}throw Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${p}"`}}function k(P){let C=P instanceof RegExp?(0,e.regexpCode)(P):f.code.formats?e._`${f.code.formats}${(0,e.getProperty)(u)}`:void 0,T=o.scopeValue("formats",{key:u,ref:P,code:C});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,e._`${T}.validate`]:["string",P,T]}function $(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!m.$async)throw Error("async format in sync schema");return e._`await ${x}(${s})`}return typeof _=="function"?e._`${x}(${s})`:e._`${x}.test(${s})`}}}};t.default=n}),$Y=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=SY(),r=[e.default];t.default=r}),IY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),EY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Y7(),r=uY(),n=kY(),i=$Y(),a=IY(),o=[e.default,r.default,(0,n.default)(),i.default,a.metadataVocabulary,a.contentVocabulary];t.default=o}),PY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),TY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xe(),r=PY(),n=D$(),i=Gg(),a=kt(),o={message:({params:{discrError:c,tagName:u}})=>c===r.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:l}})=>e._`{error: ${c}, tag: ${l}, tagValue: ${u}}`},s={keyword:"discriminator",type:"object",schemaType:"object",error:o,code(c){let{gen:u,data:l,schema:d,parentSchema:f,it:p}=c,{oneOf:m}=f;if(!p.opts.discriminator)throw Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!m)throw Error("discriminator: requires oneOf keyword");let g=u.let("valid",!1),h=u.const("tag",e._`${l}${(0,e.getProperty)(v)}`);u.if(e._`typeof ${h} == "string"`,()=>b(),()=>c.error(!1,{discrError:r.DiscrError.Tag,tag:h,tagName:v})),c.ok(g);function b(){let x=_();u.if(!1);for(let w in x)u.elseIf(e._`${h} === ${w}`),u.assign(g,y(x[w]));u.else(),c.error(!1,{discrError:r.DiscrError.Mapping,tag:h,tagName:v}),u.endIf()}function y(x){let w=u.name("valid"),k=c.subschema({keyword:"oneOf",schemaProp:x},w);return c.mergeEvaluated(k,e.Name),w}function _(){var x;let w={},k=P(f),$=!0;for(let D=0;D<m.length;D++){let Z=m[D];if(Z?.$ref&&!(0,a.schemaHasRulesButRef)(Z,p.self.RULES)){let ee=Z.$ref;if(Z=n.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,ee),Z instanceof n.SchemaEnv&&(Z=Z.schema),Z===void 0)throw new i.default(p.opts.uriResolver,p.baseId,ee)}let N=(x=Z?.properties)===null||x===void 0?void 0:x[v];if(typeof N!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);$=$&&(k||P(Z)),C(N,D)}if(!$)throw Error(`discriminator: "${v}" must be required`);return w;function P({required:D}){return Array.isArray(D)&&D.includes(v)}function C(D,Z){if(D.const)T(D.const,Z);else if(D.enum)for(let N of D.enum)T(N,Z);else throw Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function T(D,Z){if(typeof D!="string"||D in w)throw Error(`discriminator: "${v}" values must be unique strings`);w[D]=Z}}}};t.default=s}),zY=ue((t,e)=>{e.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}}),D4=ue((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=H7(),n=EY(),i=TY(),a=zY(),o=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(m=>this.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let m=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(m,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=Hg();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=Xe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=U$();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=Gg();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),OY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(T,D){return{validate:T,compare:D}}t.fullFormats={date:e(a,o),time:e(c(!0),u),"date-time":e(f(!0),p),"iso-time":e(c(),l),"iso-date-time":e(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"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:C,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:y,int32:{type:"number",validate:w},int64:{type:"number",validate:k},float:{type:"number",validate:$},double:{type:"number",validate:$},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":e(/^\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,p),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":e(/^\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,m),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},t.formatNames=Object.keys(t.fullFormats);function r(T){return T%4===0&&(T%100!==0||T%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(T){let D=n.exec(T);if(!D)return!1;let Z=+D[1],N=+D[2],ee=+D[3];return N>=1&&N<=12&&ee>=1&&ee<=(N===2&&r(Z)?29:i[N])}function o(T,D){if(T&&D)return T>D?1:T<D?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(T){return function(D){let Z=s.exec(D);if(!Z)return!1;let N=+Z[1],ee=+Z[2],H=+Z[3],ge=Z[4],Le=Z[5]==="-"?-1:1,ve=+(Z[6]||0),W=+(Z[7]||0);if(ve>23||W>59||T&&!ge)return!1;if(N<=23&&ee<=59&&H<60)return!0;let I=ee-W*Le,V=N-ve*Le-(I<0?1:0);return(V===23||V===-1)&&(I===59||I===-1)&&H<61}}function u(T,D){if(!(T&&D))return;let Z=new Date("2020-01-01T"+T).valueOf(),N=new Date("2020-01-01T"+D).valueOf();if(Z&&N)return Z-N}function l(T,D){if(!(T&&D))return;let Z=s.exec(T),N=s.exec(D);if(Z&&N)return T=Z[1]+Z[2]+Z[3],D=N[1]+N[2]+N[3],T>D?1:T<D?-1:0}var d=/t|\s/i;function f(T){let D=c(T);return function(Z){let N=Z.split(d);return N.length===2&&a(N[0])&&D(N[1])}}function p(T,D){if(!(T&&D))return;let Z=new Date(T).valueOf(),N=new Date(D).valueOf();if(Z&&N)return Z-N}function m(T,D){if(!(T&&D))return;let[Z,N]=T.split(d),[ee,H]=D.split(d),ge=o(Z,ee);if(ge!==void 0)return ge||u(N,H)}var v=/\/|:/,g=/^(?:[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;function h(T){return v.test(T)&&g.test(T)}var b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(T){return b.lastIndex=0,b.test(T)}var _=-2147483648,x=2147483647;function w(T){return Number.isInteger(T)&&T<=x&&T>=_}function k(T){return Number.isInteger(T)}function $(){return!0}var P=/[^\\]\\Z/;function C(T){if(P.test(T))return!1;try{return new RegExp(T),!0}catch{return!1}}}),jY=ue(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=D4(),r=Xe(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:s,schemaCode:c})=>r.str`should be ${i[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>r._`{comparison: ${i[s].okStr}, limit: ${c}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(s){let{gen:c,data:u,schemaCode:l,keyword:d,it:f}=s,{opts:p,self:m}=f;if(!p.validateFormats)return;let v=new e.KeywordCxt(f,m.RULES.all.format.definition,"format");v.$data?g():h();function g(){let y=c.scopeValue("formats",{ref:m.formats,code:p.code.formats}),_=c.const("fmt",r._`${y}[${v.schemaCode}]`);s.fail$data((0,r.or)(r._`typeof ${_} != "object"`,r._`${_} instanceof RegExp`,r._`typeof ${_}.compare != "function"`,b(_)))}function h(){let y=v.schema,_=m.formats[y];if(!_||_===!0)return;if(typeof _!="object"||_ instanceof RegExp||typeof _.compare!="function")throw Error(`"${d}": format "${y}" does not define "compare" function`);let x=c.scopeValue("formats",{key:y,ref:_,code:p.code.formats?r._`${p.code.formats}${(0,r.getProperty)(y)}`:void 0});s.fail$data(b(x))}function b(y){return r._`${y}.compare(${u}, ${l}) ${i[d].fail} 0`}},dependencies:["format"]};var o=s=>(s.addKeyword(t.formatLimitDefinition),s);t.default=o}),NY=ue((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=OY(),n=jY(),i=Xe(),a=new i.Name("fullFormats"),o=new i.Name("fastFormats"),s=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,a),u;let[d,f]=l.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,a],p=l.formats||r.formatNames;return c(u,p,d,f),l.keywords&&(0,n.default)(u),u};s.get=(u,l="full")=>{let d=(l==="fast"?r.fastFormats:r.fullFormats)[u];if(!d)throw Error(`Unknown format "${u}"`);return d};function c(u,l,d,f){var p,m;(p=(m=u.opts.code).formats)!==null&&p!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${f}`);for(let v of l)u.addFormat(v,d[v])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}),VY=50;function Z4(t=VY){let e=new AbortController;return FY(t,e.signal),e}function WY(t,e,r){return new Promise((n,i)=>{if(e?.aborted){r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n();return}let a=setTimeout((s,c,u)=>{s?.removeEventListener("abort",c),u()},t,e,o,n);function o(){clearTimeout(a),r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n()}e?.addEventListener("abort",o,{once:!0}),r?.unref&&a.unref()})}function BY(t,e){t(Error(e))}function GS(t,e,r){let n,i=new Promise((a,o)=>{n=setTimeout(BY,e,o,r),typeof n=="object"&&n.unref?.()});return Promise.race([t,i]).finally(()=>{n!==void 0&&clearTimeout(n)})}var ro=class extends Error{};function L4(){return process.versions.bun!==void 0}var GY=typeof global=="object"&&global&&global.Object===Object&&global,QY=GY,YY=typeof self=="object"&&self&&self.Object===Object&&self,JY=QY||YY||Function("return this")(),q$=JY,XY=q$.Symbol,ag=XY,F4=Object.prototype,eJ=F4.hasOwnProperty,tJ=F4.toString,Sd=ag?ag.toStringTag:void 0;function rJ(t){var e=eJ.call(t,Sd),r=t[Sd];try{t[Sd]=void 0;var n=!0}catch{}var i=tJ.call(t);return n&&(e?t[Sd]=r:delete t[Sd]),i}var nJ=rJ,iJ=Object.prototype,aJ=iJ.toString;function oJ(t){return aJ.call(t)}var sJ=oJ,cJ="[object Null]",uJ="[object Undefined]",SU=ag?ag.toStringTag:void 0;function lJ(t){return t==null?t===void 0?uJ:cJ:SU&&SU in Object(t)?nJ(t):sJ(t)}var dJ=lJ;function pJ(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var V4=pJ,fJ="[object AsyncFunction]",mJ="[object Function]",hJ="[object GeneratorFunction]",gJ="[object Proxy]";function vJ(t){if(!V4(t))return!1;var e=dJ(t);return e==mJ||e==hJ||e==fJ||e==gJ}var yJ=vJ,_J=q$["__core-js_shared__"],QS=_J,$U=(function(){var t=/[^.]+$/.exec(QS&&QS.keys&&QS.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function bJ(t){return!!$U&&$U in t}var xJ=bJ,wJ=Function.prototype,kJ=wJ.toString;function SJ(t){if(t!=null){try{return kJ.call(t)}catch{}try{return t+""}catch{}}return""}var $J=SJ,IJ=/[\\^$.*+?()[\]{}|]/g,EJ=/^\[object .+?Constructor\]$/,PJ=Function.prototype,TJ=Object.prototype,zJ=PJ.toString,OJ=TJ.hasOwnProperty,jJ=RegExp("^"+zJ.call(OJ).replace(IJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NJ(t){if(!V4(t)||xJ(t))return!1;var e=yJ(t)?jJ:EJ;return e.test($J(t))}var RJ=NJ;function CJ(t,e){return t?.[e]}var AJ=CJ;function UJ(t,e){var r=AJ(t,e);return RJ(r)?r:void 0}var W4=UJ,DJ=W4(Object,"create"),Kd=DJ;function MJ(){this.__data__=Kd?Kd(null):{},this.size=0}var qJ=MJ;function ZJ(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var LJ=ZJ,FJ="__lodash_hash_undefined__",VJ=Object.prototype,WJ=VJ.hasOwnProperty;function BJ(t){var e=this.__data__;if(Kd){var r=e[t];return r===FJ?void 0:r}return WJ.call(e,t)?e[t]:void 0}var KJ=BJ,HJ=Object.prototype,GJ=HJ.hasOwnProperty;function QJ(t){var e=this.__data__;return Kd?e[t]!==void 0:GJ.call(e,t)}var YJ=QJ,JJ="__lodash_hash_undefined__";function XJ(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Kd&&e===void 0?JJ:e,this}var eX=XJ;function nu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}nu.prototype.clear=qJ;nu.prototype.delete=LJ;nu.prototype.get=KJ;nu.prototype.has=YJ;nu.prototype.set=eX;var IU=nu;function tX(){this.__data__=[],this.size=0}var rX=tX;function nX(t,e){return t===e||t!==t&&e!==e}var iX=nX;function aX(t,e){for(var r=t.length;r--;)if(iX(t[r][0],e))return r;return-1}var Qg=aX,oX=Array.prototype,sX=oX.splice;function cX(t){var e=this.__data__,r=Qg(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():sX.call(e,r,1),--this.size,!0}var uX=cX;function lX(t){var e=this.__data__,r=Qg(e,t);return r<0?void 0:e[r][1]}var dX=lX;function pX(t){return Qg(this.__data__,t)>-1}var fX=pX;function mX(t,e){var r=this.__data__,n=Qg(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var hX=mX;function iu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}iu.prototype.clear=rX;iu.prototype.delete=uX;iu.prototype.get=dX;iu.prototype.has=fX;iu.prototype.set=hX;var gX=iu,vX=W4(q$,"Map"),yX=vX;function _X(){this.size=0,this.__data__={hash:new IU,map:new(yX||gX),string:new IU}}var bX=_X;function xX(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var wX=xX;function kX(t,e){var r=t.__data__;return wX(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Yg=kX;function SX(t){var e=Yg(this,t).delete(t);return this.size-=e?1:0,e}var $X=SX;function IX(t){return Yg(this,t).get(t)}var EX=IX;function PX(t){return Yg(this,t).has(t)}var TX=PX;function zX(t,e){var r=Yg(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var OX=zX;function au(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}au.prototype.clear=bX;au.prototype.delete=$X;au.prototype.get=EX;au.prototype.has=TX;au.prototype.set=OX;var B4=au,jX="Expected a function";function Z$(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(jX);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Z$.Cache||B4),r}Z$.Cache=B4;var co=Z$,L$=co(()=>(process.env.CLAUDE_CONFIG_DIR??RX(NX(),".claude")).normalize("NFC"),()=>process.env.CLAUDE_CONFIG_DIR);function Jo(t){if(!t)return!1;if(typeof t=="boolean")return t;let e=String(t).toLowerCase().trim();return["1","true","yes","on"].includes(e)}function pe(t,e,r,n,i){if(n==="m")throw TypeError("Private method is not writable");if(n==="a"&&!i)throw TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function M(t,e,r,n){if(r==="a"&&!n)throw TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}var K4=function(){let{crypto:t}=globalThis;if(t?.randomUUID)return K4=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),r=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))};function Hd(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}var l$=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return Error(JSON.stringify(t))}catch{}}return Error(t)},Ce=class extends Error{},nn=class t extends Ce{constructor(e,r,n,i,a){super(`${t.makeMessage(e,r,n)}`),this.status=e,this.headers=i,this.requestID=i?.get("request-id"),this.error=r,this.type=a??null}static makeMessage(e,r,n){let i=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return e&&i?`${e} ${i}`:e?`${e} status code (no body)`:i||"(no status code or body)"}static generate(e,r,n,i){if(!e||!i)return new Mc({message:n,cause:l$(r)});let a=r,o=a?.error?.type;return e===400?new sg(e,a,n,i,o):e===401?new cg(e,a,n,i,o):e===403?new ug(e,a,n,i,o):e===404?new lg(e,a,n,i,o):e===409?new dg(e,a,n,i,o):e===422?new pg(e,a,n,i,o):e===429?new fg(e,a,n,i,o):e>=500?new mg(e,a,n,i,o):new t(e,a,n,i,o)}},Zn=class extends nn{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},Mc=class extends nn{constructor({message:e,cause:r}){super(void 0,void 0,e||"Connection error.",void 0),r&&(this.cause=r)}},og=class extends Mc{constructor({message:e}={}){super({message:e??"Request timed out."})}},sg=class extends nn{},cg=class extends nn{},ug=class extends nn{},lg=class extends nn{},dg=class extends nn{},pg=class extends nn{},fg=class extends nn{},mg=class extends nn{},CX=/^[a-z][a-z0-9+.-]*:/i,AX=t=>CX.test(t),d$=t=>(d$=Array.isArray,d$(t)),EU=d$;function p$(t){return typeof t!="object"?{}:t??{}}function PU(t){if(!t)return!0;for(let e in t)return!1;return!0}function UX(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var DX=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new Ce(`${t} must be an integer`);if(e<0)throw new Ce(`${t} must be a positive integer`);return e},H4=t=>{try{return JSON.parse(t)}catch{return}},MX=t=>new Promise(e=>setTimeout(e,t)),Oc="0.81.0",qX=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function ZX(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var LX=()=>{let t=ZX();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oc,"X-Stainless-OS":zU(Deno.build.os),"X-Stainless-Arch":TU(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oc,"X-Stainless-OS":zU(globalThis.process.platform??"unknown"),"X-Stainless-Arch":TU(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=FX();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Oc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function FX(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:r}of t){let n=r.exec(navigator.userAgent);if(n){let i=n[1]||0,a=n[2]||0,o=n[3]||0;return{browser:e,version:`${i}.${a}.${o}`}}}return null}var TU=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",zU=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),OU,VX=()=>OU??(OU=LX());function WX(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function G4(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function Q4(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return G4({start(){},async pull(r){let{done:n,value:i}=await e.next();n?r.close():r.enqueue(i)},async cancel(){await e.return?.()}})}function F$(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let r=await e.read();return r?.done&&e.releaseLock(),r}catch(r){throw e.releaseLock(),r}},async return(){let r=e.cancel();return e.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function BX(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),r=e.cancel();e.releaseLock(),await r}var KX=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});function HX(t){return Object.entries(t).filter(([e,r])=>typeof r<"u").map(([e,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(e)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(e)}=`;throw new Ce(`Cannot stringify type ${typeof r}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}function GX(t){let e=0;for(let i of t)e+=i.length;let r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}var jU;function V$(t){let e;return(jU??(e=new globalThis.TextEncoder,jU=e.encode.bind(e)))(t)}var NU;function RU(t){let e;return(NU??(e=new globalThis.TextDecoder,NU=e.decode.bind(e)))(t)}var Un,Dn,es=class{constructor(){Un.set(this,void 0),Dn.set(this,void 0),pe(this,Un,new Uint8Array,"f"),pe(this,Dn,null,"f")}decode(e){if(e==null)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?V$(e):e;pe(this,Un,GX([M(this,Un,"f"),r]),"f");let n=[],i;for(;(i=QX(M(this,Un,"f"),M(this,Dn,"f")))!=null;){if(i.carriage&&M(this,Dn,"f")==null){pe(this,Dn,i.index,"f");continue}if(M(this,Dn,"f")!=null&&(i.index!==M(this,Dn,"f")+1||i.carriage)){n.push(RU(M(this,Un,"f").subarray(0,M(this,Dn,"f")-1))),pe(this,Un,M(this,Un,"f").subarray(M(this,Dn,"f")),"f"),pe(this,Dn,null,"f");continue}let a=M(this,Dn,"f")!==null?i.preceding-1:i.preceding,o=RU(M(this,Un,"f").subarray(0,a));n.push(o),pe(this,Un,M(this,Un,"f").subarray(i.index),"f"),pe(this,Dn,null,"f")}return n}flush(){return M(this,Un,"f").length?this.decode(`
|
|
156
|
+
`):[]}};Un=new WeakMap,Dn=new WeakMap;es.NEWLINE_CHARS=new Set([`
|
|
157
|
+
`,"\r"]);es.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function QX(t,e){for(let r=e??0;r<t.length;r++){if(t[r]===10)return{preceding:r,index:r+1,carriage:!1};if(t[r]===13)return{preceding:r,index:r+1,carriage:!0}}return null}function YX(t){for(let e=0;e<t.length-1;e++){if(t[e]===10&&t[e+1]===10||t[e]===13&&t[e+1]===13)return e+2;if(t[e]===13&&t[e+1]===10&&e+3<t.length&&t[e+2]===13&&t[e+3]===10)return e+4}return-1}var hg={off:0,error:200,warn:300,info:400,debug:500},CU=(t,e,r)=>{if(t){if(UX(hg,t))return t;tn(r).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(hg))}`)}};function Zd(){}function jh(t,e,r){return!e||hg[t]>hg[r]?Zd:e[t].bind(e)}var JX={error:Zd,warn:Zd,info:Zd,debug:Zd},AU=new WeakMap;function tn(t){let e=t.logger,r=t.logLevel??"off";if(!e)return JX;let n=AU.get(e);if(n&&n[0]===r)return n[1];let i={error:jh("error",e,r),warn:jh("warn",e,r),info:jh("info",e,r),debug:jh("debug",e,r)};return AU.set(e,[r,i]),i}var Yo=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,r])=>[e,e.toLowerCase()==="x-api-key"||e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t),$d,ts=class t{constructor(e,r,n){this.iterator=e,$d.set(this,void 0),this.controller=r,pe(this,$d,n,"f")}static fromSSEResponse(e,r,n){let i=!1,a=n?tn(n):console;async function*o(){if(i)throw new Ce("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let s=!1;try{for await(let c of XX(e,r)){if(c.event==="completion")try{yield JSON.parse(c.data)}catch(u){throw a.error("Could not parse message into JSON:",c.data),a.error("From chunk:",c.raw),u}if(c.event==="message_start"||c.event==="message_delta"||c.event==="message_stop"||c.event==="content_block_start"||c.event==="content_block_delta"||c.event==="content_block_stop")try{yield JSON.parse(c.data)}catch(u){throw a.error("Could not parse message into JSON:",c.data),a.error("From chunk:",c.raw),u}if(c.event!=="ping"&&c.event==="error"){let u=H4(c.data)??c.data,l=u?.error?.type;throw new nn(void 0,u,void 0,e.headers,l)}}s=!0}catch(c){if(Hd(c))return;throw c}finally{s||r.abort()}}return new t(o,r,n)}static fromReadableStream(e,r,n){let i=!1;async function*a(){let s=new es,c=F$(e);for await(let u of c)for(let l of s.decode(u))yield l;for(let u of s.flush())yield u}async function*o(){if(i)throw new Ce("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let s=!1;try{for await(let c of a())s||c&&(yield JSON.parse(c));s=!0}catch(c){if(Hd(c))return;throw c}finally{s||r.abort()}}return new t(o,r,n)}[($d=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],r=[],n=this.iterator(),i=a=>({next:()=>{if(a.length===0){let o=n.next();e.push(o),r.push(o)}return a.shift()}});return[new t(()=>i(e),this.controller,M(this,$d,"f")),new t(()=>i(r),this.controller,M(this,$d,"f"))]}toReadableStream(){let e=this,r;return G4({async start(){r=e[Symbol.asyncIterator]()},async pull(n){try{let{value:i,done:a}=await r.next();if(a)return n.close();let o=V$(JSON.stringify(i)+`
|
|
158
|
+
`);n.enqueue(o)}catch(i){n.error(i)}},async cancel(){await r.return?.()}})}};async function*XX(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Ce("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Ce("Attempted to iterate over a response with no body");let r=new f$,n=new es,i=F$(t.body);for await(let a of eee(i))for(let o of n.decode(a)){let s=r.decode(o);s&&(yield s)}for(let a of n.flush()){let o=r.decode(a);o&&(yield o)}}async function*eee(t){let e=new Uint8Array;for await(let r of t){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?V$(r):r,i=new Uint8Array(e.length+n.length);i.set(e),i.set(n,e.length),e=i;let a;for(;(a=YX(e))!==-1;)yield e.slice(0,a),e=e.slice(a)}e.length>0&&(yield e)}var f$=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let a={event:this.event,data:this.data.join(`
|
|
159
|
+
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],a}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,n,i]=tee(e,":");return i.startsWith(" ")&&(i=i.substring(1)),r==="event"?this.event=i:r==="data"&&this.data.push(i),null}};function tee(t,e){let r=t.indexOf(e);return r!==-1?[t.substring(0,r),e,t.substring(r+e.length)]:[t,"",""]}async function Y4(t,e){let{response:r,requestLogID:n,retryOfRequestLogID:i,startTime:a}=e,o=await(async()=>{if(e.options.stream)return tn(t).debug("response",r.status,r.url,r.headers,r.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(r,e.controller):ts.fromSSEResponse(r,e.controller);if(r.status===204)return null;if(e.options.__binaryResponse)return r;let s=r.headers.get("content-type")?.split(";")[0]?.trim();if(s?.includes("application/json")||s?.endsWith("+json")){if(r.headers.get("content-length")==="0")return;let c=await r.json();return J4(c,r)}return await r.text()})();return tn(t).debug(`[${n}] response parsed`,Yo({retryOfRequestLogID:i,url:r.url,status:r.status,body:o,durationMs:Date.now()-a})),o}function J4(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}var Ld,gg=class t extends Promise{constructor(e,r,n=Y4){super(i=>{i(null)}),this.responsePromise=r,this.parseResponse=n,Ld.set(this,void 0),pe(this,Ld,e,"f")}_thenUnwrap(e){return new t(M(this,Ld,"f"),this.responsePromise,async(r,n)=>J4(e(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:r,request_id:r.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(M(this,Ld,"f"),e))),this.parsedPromise}then(e,r){return this.parse().then(e,r)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};Ld=new WeakMap;var Nh,vg=class{constructor(e,r,n,i){Nh.set(this,void 0),pe(this,Nh,e,"f"),this.options=i,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new Ce("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await M(this,Nh,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(Nh=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let r of e.getPaginatedItems())yield r}},m$=class extends gg{constructor(e,r,n){super(e,r,async(i,a)=>new n(i,a.response,await Y4(i,a),a.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let r of e)yield r}},rs=class extends vg{constructor(e,r,n,i){super(e,r,n,i),this.data=n.data||[],this.has_more=n.has_more||!1,this.first_id=n.first_id||null,this.last_id=n.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let r=this.first_id;return r?{...this.options,query:{...p$(this.options.query),before_id:r}}:null}let e=this.last_id;return e?{...this.options,query:{...p$(this.options.query),after_id:e}}:null}},yg=class extends vg{constructor(e,r,n,i){super(e,r,n,i),this.data=n.data||[],this.has_more=n.has_more||!1,this.next_page=n.next_page||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.next_page;return e?{...this.options,query:{...p$(this.options.query),page:e}}:null}},X4=()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function Ac(t,e,r){return X4(),new File(t,e??"unknown_file",r)}function Xh(t,e){let r=typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"";return e?r.split(/[\\/]/).pop()||void 0:r}var eD=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",W$=async(t,e,r=!0)=>({...t,body:await nee(t.body,e,r)}),UU=new WeakMap;function ree(t){let e=typeof t=="function"?t:t.fetch,r=UU.get(e);if(r)return r;let n=(async()=>{try{let i="Response"in e?e.Response:(await e("data:,")).constructor,a=new FormData;return a.toString()!==await new i(a).text()}catch{return!0}})();return UU.set(e,n),n}var nee=async(t,e,r=!0)=>{if(!await ree(e))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let n=new FormData;return await Promise.all(Object.entries(t||{}).map(([i,a])=>h$(n,i,a,r))),n},iee=t=>t instanceof Blob&&"name"in t,h$=async(t,e,r,n)=>{if(r!==void 0){if(r==null)throw TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")t.append(e,String(r));else if(r instanceof Response){let i={},a=r.headers.get("Content-Type");a&&(i={type:a}),t.append(e,Ac([await r.blob()],Xh(r,n),i))}else if(eD(r))t.append(e,Ac([await new Response(Q4(r)).blob()],Xh(r,n)));else if(iee(r))t.append(e,Ac([r],Xh(r,n),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(i=>h$(t,e+"[]",i,n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([i,a])=>h$(t,`${e}[${i}]`,a,n)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}},tD=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",aee=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&tD(t),oee=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function";async function see(t,e,r){if(X4(),t=await t,e||(e=Xh(t,!0)),aee(t))return t instanceof File&&e==null&&r==null?t:Ac([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...r});if(oee(t)){let i=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),Ac(await g$(i),e,r)}let n=await g$(t);if(!r?.type){let i=n.find(a=>typeof a=="object"&&"type"in a&&a.type);typeof i=="string"&&(r={...r,type:i})}return Ac(n,e,r)}async function g$(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(tD(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(eD(t))for await(let r of t)e.push(...await g$(r));else{let r=t?.constructor?.name;throw Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${cee(t)}`)}return e}function cee(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(e=>`"${e}"`).join(", ")}]`}var Ln=class{constructor(e){this._client=e}},rD=Symbol.for("brand.privateNullableHeaders");function*uee(t){if(!t)return;if(rD in t){let{values:n,nulls:i}=t;yield*n.entries();for(let a of i)yield[a,null];return}let e=!1,r;t instanceof Headers?r=t.entries():EU(t)?r=t:(e=!0,r=Object.entries(t??{}));for(let n of r){let i=n[0];if(typeof i!="string")throw TypeError("expected header name to be a string");let a=EU(n[1])?n[1]:[n[1]],o=!1;for(let s of a)s!==void 0&&(e&&!o&&(o=!0,yield[i,null]),yield[i,s])}}var mt=t=>{let e=new Headers,r=new Set;for(let n of t){let i=new Set;for(let[a,o]of uee(n)){let s=a.toLowerCase();i.has(s)||(e.delete(a),i.add(s)),o===null?(e.delete(a),r.add(s)):(e.append(a,o),r.delete(s))}}return{[rD]:!0,values:e,nulls:r}},Wd=Symbol("anthropic.sdk.stainlessHelper");function eg(t){return typeof t=="object"&&t!==null&&Wd in t}function nD(t,e){let r=new Set;if(t)for(let n of t)eg(n)&&r.add(n[Wd]);if(e){for(let n of e)if(eg(n)&&r.add(n[Wd]),Array.isArray(n.content))for(let i of n.content)eg(i)&&r.add(i[Wd])}return Array.from(r)}function iD(t,e){let r=nD(t,e);return r.length===0?{}:{"x-stainless-helper":r.join(", ")}}function lee(t){return eg(t)?{"x-stainless-helper":t[Wd]}:{}}function aD(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var DU=Object.freeze(Object.create(null)),dee=(t=aD)=>function(e,...r){if(e.length===1)return e[0];let n=!1,i=[],a=e.reduce((u,l,d)=>{/[?#]/.test(l)&&(n=!0);let f=r[d],p=(n?encodeURIComponent:t)(""+f);return d!==r.length&&(f==null||typeof f=="object"&&f.toString===Object.getPrototypeOf(Object.getPrototypeOf(f.hasOwnProperty??DU)??DU)?.toString)&&(p=f+"",i.push({start:u.length+l.length,length:p.length,error:`Value of type ${Object.prototype.toString.call(f).slice(8,-1)} is not a valid path parameter`})),u+l+(d===r.length?"":p)},""),o=a.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=s.exec(o))!==null;)i.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can't be safely passed as a path parameter`});if(i.sort((u,l)=>u.start-l.start),i.length>0){let u=0,l=i.reduce((d,f)=>{let p=" ".repeat(f.start-u),m="^".repeat(f.length);return u=f.start+f.length,d+p+m},"");throw new Ce(`Path parameters result in path with invalid segments:
|
|
160
|
+
${i.map(d=>d.error).join(`
|
|
161
|
+
`)}
|
|
162
|
+
${a}
|
|
163
|
+
${l}`)}return a},$r=dee(aD),_g=class extends Ln{list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/files",rs,{query:i,...r,headers:mt([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete($r`/v1/files/${e}`,{...n,headers:mt([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}download(e,r={},n){let{betas:i}=r??{};return this._client.get($r`/v1/files/${e}/content`,{...n,headers:mt([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}retrieveMetadata(e,r={},n){let{betas:i}=r??{};return this._client.get($r`/v1/files/${e}`,{...n,headers:mt([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}upload(e,r){let{betas:n,...i}=e;return this._client.post("/v1/files",W$({body:i,...r,headers:mt([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},lee(i.file),r?.headers])},this._client))}},bg=class extends Ln{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get($r`/v1/models/${e}?beta=true`,{...n,headers:mt([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/models?beta=true",rs,{query:i,...r,headers:mt([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},oD={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192};function sD(t){return t?.output_format??t?.output_config?.format}function MU(t,e,r){let n=sD(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>{if(i.type==="text"){let a=Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(a,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return i}),parsed_output:null}:cD(t,e,r)}function cD(t,e,r){let n=null,i=t.content.map(a=>{if(a.type==="text"){let o=pee(e,a.text);n===null&&(n=o);let s=Object.defineProperty({...a},"parsed_output",{value:o,enumerable:!1});return Object.defineProperty(s,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),o},enumerable:!1})}return a});return{...t,content:i,parsed_output:n}}function pee(t,e){let r=sD(t);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(e):JSON.parse(e)}catch(n){throw new Ce(`Failed to parse structured output: ${n}`)}}var fee=t=>{let e=0,r=[];for(;e<t.length;){let n=t[e];if(n==="\\"){e++;continue}if(n==="{"){r.push({type:"brace",value:"{"}),e++;continue}if(n==="}"){r.push({type:"brace",value:"}"}),e++;continue}if(n==="["){r.push({type:"paren",value:"["}),e++;continue}if(n==="]"){r.push({type:"paren",value:"]"}),e++;continue}if(n===":"){r.push({type:"separator",value:":"}),e++;continue}if(n===","){r.push({type:"delimiter",value:","}),e++;continue}if(n==='"'){let o="",s=!1;for(n=t[++e];n!=='"';){if(e===t.length){s=!0;break}if(n==="\\"){if(e++,e===t.length){s=!0;break}o+=n+t[e],n=t[++e]}else o+=n,n=t[++e]}n=t[++e],!s&&r.push({type:"string",value:o});continue}if(n&&/\s/.test(n)){e++;continue}let i=/[0-9]/;if(n&&i.test(n)||n==="-"||n==="."){let o="";for(n==="-"&&(o+=n,n=t[++e]);n&&i.test(n)||n===".";)o+=n,n=t[++e];r.push({type:"number",value:o});continue}let a=/[a-z]/i;if(n&&a.test(n)){let o="";for(;n&&a.test(n)&&e!==t.length;)o+=n,n=t[++e];if(o=="true"||o=="false"||o==="null")r.push({type:"name",value:o});else{e++;continue}continue}e++}return r},jc=t=>{if(t.length===0)return t;let e=t[t.length-1];switch(e.type){case"separator":return t=t.slice(0,t.length-1),jc(t);case"number":let r=e.value[e.value.length-1];if(r==="."||r==="-")return t=t.slice(0,t.length-1),jc(t);case"string":let n=t[t.length-2];if(n?.type==="delimiter")return t=t.slice(0,t.length-1),jc(t);if(n?.type==="brace"&&n.value==="{")return t=t.slice(0,t.length-1),jc(t);break;case"delimiter":return t=t.slice(0,t.length-1),jc(t)}return t},mee=t=>{let e=[];return t.map(r=>{r.type==="brace"&&(r.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),r.type==="paren"&&(r.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(r=>{r==="}"?t.push({type:"brace",value:"}"}):r==="]"&&t.push({type:"paren",value:"]"})}),t},hee=t=>{let e="";return t.map(r=>{r.type==="string"?e+='"'+r.value+'"':e+=r.value}),e},uD=t=>JSON.parse(hee(mee(jc(fee(t))))),ei,Ja,Ec,Id,Rh,Ed,Pd,Ch,Td,ya,zd,Ah,Uh,Ho,Dh,Mh,Od,YS,qU,qh,JS,XS,e$,ZU,LU="__json_buf";function FU(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}var v$=class t{constructor(e,r){ei.add(this),this.messages=[],this.receivedMessages=[],Ja.set(this,void 0),Ec.set(this,null),this.controller=new AbortController,Id.set(this,void 0),Rh.set(this,()=>{}),Ed.set(this,()=>{}),Pd.set(this,void 0),Ch.set(this,()=>{}),Td.set(this,()=>{}),ya.set(this,{}),zd.set(this,!1),Ah.set(this,!1),Uh.set(this,!1),Ho.set(this,!1),Dh.set(this,void 0),Mh.set(this,void 0),Od.set(this,void 0),qh.set(this,n=>{if(pe(this,Ah,!0,"f"),Hd(n)&&(n=new Zn),n instanceof Zn)return pe(this,Uh,!0,"f"),this._emit("abort",n);if(n instanceof Ce)return this._emit("error",n);if(n instanceof Error){let i=new Ce(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Ce(String(n)))}),pe(this,Id,new Promise((n,i)=>{pe(this,Rh,n,"f"),pe(this,Ed,i,"f")}),"f"),pe(this,Pd,new Promise((n,i)=>{pe(this,Ch,n,"f"),pe(this,Td,i,"f")}),"f"),M(this,Id,"f").catch(()=>{}),M(this,Pd,"f").catch(()=>{}),pe(this,Ec,e,"f"),pe(this,Od,r?.logger??console,"f")}get response(){return M(this,Dh,"f")}get request_id(){return M(this,Mh,"f")}async withResponse(){pe(this,Ho,!0,"f");let e=await M(this,Id,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t(null);return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n,{logger:i}={}){let a=new t(r,{logger:i});for(let o of r.messages)a._addMessageParam(o);return pe(a,Ec,{...r,stream:!0},"f"),a._run(()=>a._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},M(this,qh,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let i=n?.signal,a;i&&(i.aborted&&this.controller.abort(),a=this.controller.abort.bind(this.controller),i.addEventListener("abort",a));try{M(this,ei,"m",JS).call(this);let{response:o,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(o);for await(let c of s)M(this,ei,"m",XS).call(this,c);if(s.controller.signal?.aborted)throw new Zn;M(this,ei,"m",e$).call(this)}finally{i&&a&&i.removeEventListener("abort",a)}}_connected(e){this.ended||(pe(this,Dh,e,"f"),pe(this,Mh,e?.headers.get("request-id"),"f"),M(this,Rh,"f").call(this,e),this._emit("connect"))}get ended(){return M(this,zd,"f")}get errored(){return M(this,Ah,"f")}get aborted(){return M(this,Uh,"f")}abort(){this.controller.abort()}on(e,r){return(M(this,ya,"f")[e]||(M(this,ya,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=M(this,ya,"f")[e];if(!n)return this;let i=n.findIndex(a=>a.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(M(this,ya,"f")[e]||(M(this,ya,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{pe(this,Ho,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){pe(this,Ho,!0,"f"),await M(this,Pd,"f")}get currentMessage(){return M(this,Ja,"f")}async finalMessage(){return await this.done(),M(this,ei,"m",YS).call(this)}async finalText(){return await this.done(),M(this,ei,"m",qU).call(this)}_emit(e,...r){if(M(this,zd,"f"))return;e==="end"&&(pe(this,zd,!0,"f"),M(this,Ch,"f").call(this));let n=M(this,ya,"f")[e];if(n&&(M(this,ya,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!M(this,Ho,"f")&&!n?.length&&Promise.reject(i),M(this,Ed,"f").call(this,i),M(this,Td,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!M(this,Ho,"f")&&!n?.length&&Promise.reject(i),M(this,Ed,"f").call(this,i),M(this,Td,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",M(this,ei,"m",YS).call(this))}async _fromReadableStream(e,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{M(this,ei,"m",JS).call(this),this._connected(null);let a=ts.fromReadableStream(e,this.controller);for await(let o of a)M(this,ei,"m",XS).call(this,o);if(a.controller.signal?.aborted)throw new Zn;M(this,ei,"m",e$).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(Ja=new WeakMap,Ec=new WeakMap,Id=new WeakMap,Rh=new WeakMap,Ed=new WeakMap,Pd=new WeakMap,Ch=new WeakMap,Td=new WeakMap,ya=new WeakMap,zd=new WeakMap,Ah=new WeakMap,Uh=new WeakMap,Ho=new WeakMap,Dh=new WeakMap,Mh=new WeakMap,Od=new WeakMap,qh=new WeakMap,ei=new WeakSet,YS=function(){if(this.receivedMessages.length===0)throw new Ce("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},qU=function(){if(this.receivedMessages.length===0)throw new Ce("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(e.length===0)throw new Ce("stream ended without producing a content block with type=text");return e.join(" ")},JS=function(){this.ended||pe(this,Ja,void 0,"f")},XS=function(e){if(this.ended)return;let r=M(this,ei,"m",ZU).call(this,e);switch(this._emit("streamEvent",e,r),e.type){case"content_block_delta":{let n=r.content.at(-1);switch(e.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",e.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",e.delta.citation,n.citations??[]);break}case"input_json_delta":{FU(n)&&n.input&&this._emit("inputJson",e.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",e.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}case"compaction_delta":{n.type==="compaction"&&n.content&&this._emit("compaction",n.content);break}default:e.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(MU(r,M(this,Ec,"f"),{logger:M(this,Od,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{pe(this,Ja,r,"f");break}case"content_block_start":case"message_delta":break}},e$=function(){if(this.ended)throw new Ce("stream has ended, this shouldn't happen");let e=M(this,Ja,"f");if(!e)throw new Ce("request ended without sending any chunks");return pe(this,Ja,void 0,"f"),MU(e,M(this,Ec,"f"),{logger:M(this,Od,"f")})},ZU=function(e){let r=M(this,Ja,"f");if(e.type==="message_start"){if(r)throw new Ce(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!r)throw new Ce(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":return r;case"message_delta":return r.container=e.delta.container,r.stop_reason=e.delta.stop_reason,r.stop_sequence=e.delta.stop_sequence,r.usage.output_tokens=e.usage.output_tokens,r.context_management=e.context_management,e.usage.input_tokens!=null&&(r.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(r.usage.server_tool_use=e.usage.server_tool_use),e.usage.iterations!=null&&(r.usage.iterations=e.usage.iterations),r;case"content_block_start":return r.content.push(e.content_block),r;case"content_block_delta":{let n=r.content.at(e.index);switch(e.delta.type){case"text_delta":{n?.type==="text"&&(r.content[e.index]={...n,text:(n.text||"")+e.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break}case"input_json_delta":{if(n&&FU(n)){let i=n[LU]||"";i+=e.delta.partial_json;let a={...n};if(Object.defineProperty(a,LU,{value:i,enumerable:!1,writable:!0}),i)try{a.input=uD(i)}catch(o){let s=new Ce(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${o}. JSON: ${i}`);M(this,qh,"f").call(this,s)}r.content[e.index]=a}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,signature:e.delta.signature});break}case"compaction_delta":{n?.type==="compaction"&&(r.content[e.index]={...n,content:(n.content||"")+e.delta.content});break}default:e.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",i=>{let a=r.shift();a?a.resolve(i):e.push(i)}),this.on("end",()=>{n=!0;for(let i of r)i.resolve(void 0);r.length=0}),this.on("abort",i=>{n=!0;for(let a of r)a.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let a of r)a.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,a)=>r.push({resolve:i,reject:a})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new ts(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};var xg=class extends Error{constructor(e){let r=typeof e=="string"?e:e.map(n=>n.type==="text"?n.text:`[${n.type}]`).join(" ");super(r),this.name="ToolError",this.content=e}},gee=1e5,vee=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
|
|
164
|
+
1. Task Overview
|
|
165
|
+
The user's core request and success criteria
|
|
166
|
+
Any clarifications or constraints they specified
|
|
167
|
+
2. Current State
|
|
168
|
+
What has been completed so far
|
|
169
|
+
Files created, modified, or analyzed (with paths if relevant)
|
|
170
|
+
Key outputs or artifacts produced
|
|
171
|
+
3. Important Discoveries
|
|
172
|
+
Technical constraints or requirements uncovered
|
|
173
|
+
Decisions made and their rationale
|
|
174
|
+
Errors encountered and how they were resolved
|
|
175
|
+
What approaches were tried that didn't work (and why)
|
|
176
|
+
4. Next Steps
|
|
177
|
+
Specific actions needed to complete the task
|
|
178
|
+
Any blockers or open questions to resolve
|
|
179
|
+
Priority order if multiple steps remain
|
|
180
|
+
5. Context to Preserve
|
|
181
|
+
User preferences or style requirements
|
|
182
|
+
Domain-specific details that aren't obvious
|
|
183
|
+
Any promises made to the user
|
|
184
|
+
Be concise but complete\u2014err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
|
|
185
|
+
Wrap your summary in <summary></summary> tags.`,jd,Pc,Go,gr,Nd,An,xa,Xa,Rd,VU,y$;function WU(){let t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}var wg=class{constructor(e,r,n){jd.add(this),this.client=e,Pc.set(this,!1),Go.set(this,!1),gr.set(this,void 0),Nd.set(this,void 0),An.set(this,void 0),xa.set(this,void 0),Xa.set(this,void 0),Rd.set(this,0),pe(this,gr,{params:{...r,messages:structuredClone(r.messages)}},"f");let i=["BetaToolRunner",...nD(r.tools,r.messages)].join(", ");pe(this,Nd,{...n,headers:mt([{"x-stainless-helper":i},n?.headers])},"f"),pe(this,Xa,WU(),"f")}async*[(Pc=new WeakMap,Go=new WeakMap,gr=new WeakMap,Nd=new WeakMap,An=new WeakMap,xa=new WeakMap,Xa=new WeakMap,Rd=new WeakMap,jd=new WeakSet,VU=async function(){let e=M(this,gr,"f").params.compactionControl;if(!e||!e.enabled)return!1;let r=0;if(M(this,An,"f")!==void 0)try{let c=await M(this,An,"f");r=c.usage.input_tokens+(c.usage.cache_creation_input_tokens??0)+(c.usage.cache_read_input_tokens??0)+c.usage.output_tokens}catch{return!1}let n=e.contextTokenThreshold??gee;if(r<n)return!1;let i=e.model??M(this,gr,"f").params.model,a=e.summaryPrompt??vee,o=M(this,gr,"f").params.messages;if(o[o.length-1].role==="assistant"){let c=o[o.length-1];if(Array.isArray(c.content)){let u=c.content.filter(l=>l.type!=="tool_use");u.length===0?o.pop():c.content=u}}let s=await this.client.beta.messages.create({model:i,messages:[...o,{role:"user",content:[{type:"text",text:a}]}],max_tokens:M(this,gr,"f").params.max_tokens},{headers:{"x-stainless-helper":"compaction"}});if(s.content[0]?.type!=="text")throw new Ce("Expected text response for compaction");return M(this,gr,"f").params.messages=[{role:"user",content:s.content}],!0},Symbol.asyncIterator)](){var e;if(M(this,Pc,"f"))throw new Ce("Cannot iterate over a consumed stream");pe(this,Pc,!0,"f"),pe(this,Go,!0,"f"),pe(this,xa,void 0,"f");try{for(;;){let r;try{if(M(this,gr,"f").params.max_iterations&&M(this,Rd,"f")>=M(this,gr,"f").params.max_iterations)break;pe(this,Go,!1,"f"),pe(this,xa,void 0,"f"),pe(this,Rd,(e=M(this,Rd,"f"),e++,e),"f"),pe(this,An,void 0,"f");let{max_iterations:n,compactionControl:i,...a}=M(this,gr,"f").params;if(a.stream?(r=this.client.beta.messages.stream({...a},M(this,Nd,"f")),pe(this,An,r.finalMessage(),"f"),M(this,An,"f").catch(()=>{}),yield r):(pe(this,An,this.client.beta.messages.create({...a,stream:!1},M(this,Nd,"f")),"f"),yield M(this,An,"f")),!await M(this,jd,"m",VU).call(this)){if(!M(this,Go,"f")){let{role:s,content:c}=await M(this,An,"f");M(this,gr,"f").params.messages.push({role:s,content:c})}let o=await M(this,jd,"m",y$).call(this,M(this,gr,"f").params.messages.at(-1));if(o)M(this,gr,"f").params.messages.push(o);else if(!M(this,Go,"f"))break}}finally{r&&r.abort()}}if(!M(this,An,"f"))throw new Ce("ToolRunner concluded without a message from the server");M(this,Xa,"f").resolve(await M(this,An,"f"))}catch(r){throw pe(this,Pc,!1,"f"),M(this,Xa,"f").promise.catch(()=>{}),M(this,Xa,"f").reject(r),pe(this,Xa,WU(),"f"),r}}setMessagesParams(e){typeof e=="function"?M(this,gr,"f").params=e(M(this,gr,"f").params):M(this,gr,"f").params=e,pe(this,Go,!0,"f"),pe(this,xa,void 0,"f")}async generateToolResponse(){let e=await M(this,An,"f")??this.params.messages.at(-1);return e?M(this,jd,"m",y$).call(this,e):null}done(){return M(this,Xa,"f").promise}async runUntilDone(){if(!M(this,Pc,"f"))for await(let e of this);return this.done()}get params(){return M(this,gr,"f").params}pushMessages(...e){this.setMessagesParams(r=>({...r,messages:[...r.messages,...e]}))}then(e,r){return this.runUntilDone().then(e,r)}};y$=async function(t){return M(this,xa,"f")!==void 0?M(this,xa,"f"):(pe(this,xa,yee(M(this,gr,"f").params,t),"f"),M(this,xa,"f"))};async function yee(t,e=t.messages.at(-1)){if(!e||e.role!=="assistant"||!e.content||typeof e.content=="string")return null;let r=e.content.filter(n=>n.type==="tool_use");return r.length===0?null:{role:"user",content:await Promise.all(r.map(async n=>{let i=t.tools.find(a=>("name"in a?a.name:a.mcp_server_name)===n.name);if(!i||!("run"in i))return{type:"tool_result",tool_use_id:n.id,content:`Error: Tool '${n.name}' not found`,is_error:!0};try{let a=n.input;"parse"in i&&i.parse&&(a=i.parse(a));let o=await i.run(a);return{type:"tool_result",tool_use_id:n.id,content:o}}catch(a){return{type:"tool_result",tool_use_id:n.id,content:a instanceof xg?a.content:`Error: ${a instanceof Error?a.message:String(a)}`,is_error:!0}}}))}}var kg=class t{constructor(e,r){this.iterator=e,this.controller=r}async*decoder(){let e=new es;for await(let r of this.iterator)for(let n of e.decode(r))yield JSON.parse(n);for(let r of e.flush())yield JSON.parse(r)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,r){if(!e.body)throw r.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Ce("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Ce("Attempted to iterate over a response with no body");return new t(F$(e.body),r)}},Sg=class extends Ln{create(e,r){let{betas:n,...i}=e;return this._client.post("/v1/messages/batches?beta=true",{body:i,...r,headers:mt([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get($r`/v1/messages/batches/${e}?beta=true`,{...n,headers:mt([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",rs,{query:i,...r,headers:mt([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete($r`/v1/messages/batches/${e}?beta=true`,{...n,headers:mt([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}cancel(e,r={},n){let{betas:i}=r??{};return this._client.post($r`/v1/messages/batches/${e}/cancel?beta=true`,{...n,headers:mt([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}async results(e,r={},n){let i=await this.retrieve(e);if(!i.results_url)throw new Ce(`No batch \`results_url\`; Has it finished processing? ${i.processing_status} - ${i.id}`);let{betas:a}=r??{};return this._client.get(i.results_url,{...n,headers:mt([{"anthropic-beta":[...a??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((o,s)=>kg.fromResponse(s.response,s.controller))}},BU={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},_ee=["claude-opus-4-6"],ns=class extends Ln{constructor(){super(...arguments),this.batches=new Sg(this._client)}create(e,r){let n=KU(e),{betas:i,...a}=n;a.model in BU&&console.warn(`The model '${a.model}' is deprecated and will reach end-of-life on ${BU[a.model]}
|
|
186
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),a.model in _ee&&a.thinking&&a.thinking.type==="enabled"&&console.warn(`Using Claude with ${a.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let o=this._client._options.timeout;if(!a.stream&&o==null){let c=oD[a.model]??void 0;o=this._client.calculateNonstreamingTimeout(a.max_tokens,c)}let s=iD(a.tools,a.messages);return this._client.post("/v1/messages?beta=true",{body:a,timeout:o??6e5,...r,headers:mt([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},s,r?.headers]),stream:n.stream??!1})}parse(e,r){return r={...r,headers:mt([{"anthropic-beta":[...e.betas??[],"structured-outputs-2025-12-15"].toString()},r?.headers])},this.create(e,r).then(n=>cD(n,e,{logger:this._client.logger??console}))}stream(e,r){return v$.createMessage(this,e,r)}countTokens(e,r){let n=KU(e),{betas:i,...a}=n;return this._client.post("/v1/messages/count_tokens?beta=true",{body:a,...r,headers:mt([{"anthropic-beta":[...i??[],"token-counting-2024-11-01"].toString()},r?.headers])})}toolRunner(e,r){return new wg(this._client,e,r)}};function KU(t){if(!t.output_format)return t;if(t.output_config?.format)throw new Ce("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:e,...r}=t;return{...r,output_config:{...t.output_config,format:e}}}ns.Batches=Sg;ns.BetaToolRunner=wg;ns.ToolError=xg;var $g=class extends Ln{create(e,r={},n){let{betas:i,...a}=r??{};return this._client.post($r`/v1/skills/${e}/versions?beta=true`,W$({body:a,...n,headers:mt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])},this._client))}retrieve(e,r,n){let{skill_id:i,betas:a}=r;return this._client.get($r`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:mt([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e,r={},n){let{betas:i,...a}=r??{};return this._client.getAPIList($r`/v1/skills/${e}/versions?beta=true`,yg,{query:a,...n,headers:mt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}delete(e,r,n){let{skill_id:i,betas:a}=r;return this._client.delete($r`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:mt([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},n?.headers])})}},Gd=class extends Ln{constructor(){super(...arguments),this.versions=new $g(this._client)}create(e={},r){let{betas:n,...i}=e??{};return this._client.post("/v1/skills?beta=true",W$({body:i,...r,headers:mt([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])},this._client,!1))}retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get($r`/v1/skills/${e}?beta=true`,{...n,headers:mt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/skills?beta=true",yg,{query:i,...r,headers:mt([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete($r`/v1/skills/${e}?beta=true`,{...n,headers:mt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}};Gd.Versions=$g;var io=class extends Ln{constructor(){super(...arguments),this.models=new bg(this._client),this.messages=new ns(this._client),this.files=new _g(this._client),this.skills=new Gd(this._client)}};io.Models=bg;io.Messages=ns;io.Files=_g;io.Skills=Gd;var Ig=class extends Ln{create(e,r){let{betas:n,...i}=e;return this._client.post("/v1/complete",{body:i,timeout:this._client._options.timeout??6e5,...r,headers:mt([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}};function lD(t){return t?.output_config?.format}function HU(t,e,r){let n=lD(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>i.type==="text"?Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1}):i),parsed_output:null}:dD(t,e,r)}function dD(t,e,r){let n=null,i=t.content.map(a=>{if(a.type==="text"){let o=bee(e,a.text);return n===null&&(n=o),Object.defineProperty({...a},"parsed_output",{value:o,enumerable:!1})}return a});return{...t,content:i,parsed_output:n}}function bee(t,e){let r=lD(t);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(e):JSON.parse(e)}catch(n){throw new Ce(`Failed to parse structured output: ${n}`)}}var ti,eo,Tc,Cd,Zh,Ad,Ud,Lh,Dd,_a,Md,Fh,Vh,Qo,Wh,Bh,qd,t$,GU,r$,n$,i$,a$,QU,YU="__json_buf";function JU(t){return t.type==="tool_use"||t.type==="server_tool_use"}var _$=class t{constructor(e,r){ti.add(this),this.messages=[],this.receivedMessages=[],eo.set(this,void 0),Tc.set(this,null),this.controller=new AbortController,Cd.set(this,void 0),Zh.set(this,()=>{}),Ad.set(this,()=>{}),Ud.set(this,void 0),Lh.set(this,()=>{}),Dd.set(this,()=>{}),_a.set(this,{}),Md.set(this,!1),Fh.set(this,!1),Vh.set(this,!1),Qo.set(this,!1),Wh.set(this,void 0),Bh.set(this,void 0),qd.set(this,void 0),r$.set(this,n=>{if(pe(this,Fh,!0,"f"),Hd(n)&&(n=new Zn),n instanceof Zn)return pe(this,Vh,!0,"f"),this._emit("abort",n);if(n instanceof Ce)return this._emit("error",n);if(n instanceof Error){let i=new Ce(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Ce(String(n)))}),pe(this,Cd,new Promise((n,i)=>{pe(this,Zh,n,"f"),pe(this,Ad,i,"f")}),"f"),pe(this,Ud,new Promise((n,i)=>{pe(this,Lh,n,"f"),pe(this,Dd,i,"f")}),"f"),M(this,Cd,"f").catch(()=>{}),M(this,Ud,"f").catch(()=>{}),pe(this,Tc,e,"f"),pe(this,qd,r?.logger??console,"f")}get response(){return M(this,Wh,"f")}get request_id(){return M(this,Bh,"f")}async withResponse(){pe(this,Qo,!0,"f");let e=await M(this,Cd,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t(null);return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n,{logger:i}={}){let a=new t(r,{logger:i});for(let o of r.messages)a._addMessageParam(o);return pe(a,Tc,{...r,stream:!0},"f"),a._run(()=>a._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},M(this,r$,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let i=n?.signal,a;i&&(i.aborted&&this.controller.abort(),a=this.controller.abort.bind(this.controller),i.addEventListener("abort",a));try{M(this,ti,"m",n$).call(this);let{response:o,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(o);for await(let c of s)M(this,ti,"m",i$).call(this,c);if(s.controller.signal?.aborted)throw new Zn;M(this,ti,"m",a$).call(this)}finally{i&&a&&i.removeEventListener("abort",a)}}_connected(e){this.ended||(pe(this,Wh,e,"f"),pe(this,Bh,e?.headers.get("request-id"),"f"),M(this,Zh,"f").call(this,e),this._emit("connect"))}get ended(){return M(this,Md,"f")}get errored(){return M(this,Fh,"f")}get aborted(){return M(this,Vh,"f")}abort(){this.controller.abort()}on(e,r){return(M(this,_a,"f")[e]||(M(this,_a,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=M(this,_a,"f")[e];if(!n)return this;let i=n.findIndex(a=>a.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(M(this,_a,"f")[e]||(M(this,_a,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{pe(this,Qo,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){pe(this,Qo,!0,"f"),await M(this,Ud,"f")}get currentMessage(){return M(this,eo,"f")}async finalMessage(){return await this.done(),M(this,ti,"m",t$).call(this)}async finalText(){return await this.done(),M(this,ti,"m",GU).call(this)}_emit(e,...r){if(M(this,Md,"f"))return;e==="end"&&(pe(this,Md,!0,"f"),M(this,Lh,"f").call(this));let n=M(this,_a,"f")[e];if(n&&(M(this,_a,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!M(this,Qo,"f")&&!n?.length&&Promise.reject(i),M(this,Ad,"f").call(this,i),M(this,Dd,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!M(this,Qo,"f")&&!n?.length&&Promise.reject(i),M(this,Ad,"f").call(this,i),M(this,Dd,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",M(this,ti,"m",t$).call(this))}async _fromReadableStream(e,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{M(this,ti,"m",n$).call(this),this._connected(null);let a=ts.fromReadableStream(e,this.controller);for await(let o of a)M(this,ti,"m",i$).call(this,o);if(a.controller.signal?.aborted)throw new Zn;M(this,ti,"m",a$).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(eo=new WeakMap,Tc=new WeakMap,Cd=new WeakMap,Zh=new WeakMap,Ad=new WeakMap,Ud=new WeakMap,Lh=new WeakMap,Dd=new WeakMap,_a=new WeakMap,Md=new WeakMap,Fh=new WeakMap,Vh=new WeakMap,Qo=new WeakMap,Wh=new WeakMap,Bh=new WeakMap,qd=new WeakMap,r$=new WeakMap,ti=new WeakSet,t$=function(){if(this.receivedMessages.length===0)throw new Ce("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},GU=function(){if(this.receivedMessages.length===0)throw new Ce("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(e.length===0)throw new Ce("stream ended without producing a content block with type=text");return e.join(" ")},n$=function(){this.ended||pe(this,eo,void 0,"f")},i$=function(e){if(this.ended)return;let r=M(this,ti,"m",QU).call(this,e);switch(this._emit("streamEvent",e,r),e.type){case"content_block_delta":{let n=r.content.at(-1);switch(e.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",e.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",e.delta.citation,n.citations??[]);break}case"input_json_delta":{JU(n)&&n.input&&this._emit("inputJson",e.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",e.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:e.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(HU(r,M(this,Tc,"f"),{logger:M(this,qd,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{pe(this,eo,r,"f");break}case"content_block_start":case"message_delta":break}},a$=function(){if(this.ended)throw new Ce("stream has ended, this shouldn't happen");let e=M(this,eo,"f");if(!e)throw new Ce("request ended without sending any chunks");return pe(this,eo,void 0,"f"),HU(e,M(this,Tc,"f"),{logger:M(this,qd,"f")})},QU=function(e){let r=M(this,eo,"f");if(e.type==="message_start"){if(r)throw new Ce(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!r)throw new Ce(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":return r;case"message_delta":return r.stop_reason=e.delta.stop_reason,r.stop_sequence=e.delta.stop_sequence,r.usage.output_tokens=e.usage.output_tokens,e.usage.input_tokens!=null&&(r.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(r.usage.server_tool_use=e.usage.server_tool_use),r;case"content_block_start":return r.content.push({...e.content_block}),r;case"content_block_delta":{let n=r.content.at(e.index);switch(e.delta.type){case"text_delta":{n?.type==="text"&&(r.content[e.index]={...n,text:(n.text||"")+e.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break}case"input_json_delta":{if(n&&JU(n)){let i=n[YU]||"";i+=e.delta.partial_json;let a={...n};Object.defineProperty(a,YU,{value:i,enumerable:!1,writable:!0}),i&&(a.input=uD(i)),r.content[e.index]=a}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,signature:e.delta.signature});break}default:e.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",i=>{let a=r.shift();a?a.resolve(i):e.push(i)}),this.on("end",()=>{n=!0;for(let i of r)i.resolve(void 0);r.length=0}),this.on("abort",i=>{n=!0;for(let a of r)a.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let a of r)a.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,a)=>r.push({resolve:i,reject:a})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new ts(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};var Eg=class extends Ln{create(e,r){return this._client.post("/v1/messages/batches",{body:e,...r})}retrieve(e,r){return this._client.get($r`/v1/messages/batches/${e}`,r)}list(e={},r){return this._client.getAPIList("/v1/messages/batches",rs,{query:e,...r})}delete(e,r){return this._client.delete($r`/v1/messages/batches/${e}`,r)}cancel(e,r){return this._client.post($r`/v1/messages/batches/${e}/cancel`,r)}async results(e,r){let n=await this.retrieve(e);if(!n.results_url)throw new Ce(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...r,headers:mt([{Accept:"application/binary"},r?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((i,a)=>kg.fromResponse(a.response,a.controller))}},Qd=class extends Ln{constructor(){super(...arguments),this.batches=new Eg(this._client)}create(e,r){e.model in XU&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${XU[e.model]}
|
|
187
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),e.model in xee&&e.thinking&&e.thinking.type==="enabled"&&console.warn(`Using Claude with ${e.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let n=this._client._options.timeout;if(!e.stream&&n==null){let a=oD[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,a)}let i=iD(e.tools,e.messages);return this._client.post("/v1/messages",{body:e,timeout:n??6e5,...r,headers:mt([i,r?.headers]),stream:e.stream??!1})}parse(e,r){return this.create(e,r).then(n=>dD(n,e,{logger:this._client.logger??console}))}stream(e,r){return _$.createMessage(this,e,r,{logger:this._client.logger??console})}countTokens(e,r){return this._client.post("/v1/messages/count_tokens",{body:e,...r})}},XU={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026"},xee=["claude-opus-4-6"];Qd.Batches=Eg;var Pg=class extends Ln{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get($r`/v1/models/${e}`,{...n,headers:mt([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/models",rs,{query:i,...r,headers:mt([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},Kh=t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()},b$,B$,tg,pD,wee="\\n\\nHuman:",kee="\\n\\nAssistant:",or=class{constructor({baseURL:e=Kh("ANTHROPIC_BASE_URL"),apiKey:r=Kh("ANTHROPIC_API_KEY")??null,authToken:n=Kh("ANTHROPIC_AUTH_TOKEN")??null,...i}={}){b$.add(this),tg.set(this,void 0);let a={apiKey:r,authToken:n,...i,baseURL:e||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&qX())throw new Ce(`It looks like you're running in a browser-like environment.
|
|
188
|
+
|
|
189
|
+
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
190
|
+
If you understand the risks and have appropriate mitigations in place,
|
|
191
|
+
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
192
|
+
|
|
193
|
+
new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
194
|
+
`);this.baseURL=a.baseURL,this.timeout=a.timeout??B$.DEFAULT_TIMEOUT,this.logger=a.logger??console;let o="warn";this.logLevel=o,this.logLevel=CU(a.logLevel,"ClientOptions.logLevel",this)??CU(Kh("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??o,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??WX(),pe(this,tg,KX,"f"),this._options=a,this.apiKey=typeof r=="string"?r:null,this.authToken=n}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:r}){if(!(e.get("x-api-key")||e.get("authorization"))&&!(this.apiKey&&e.get("x-api-key"))&&!r.has("x-api-key")&&!(this.authToken&&e.get("authorization"))&&!r.has("authorization"))throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}async authHeaders(e){return mt([await this.apiKeyAuth(e),await this.bearerAuth(e)])}async apiKeyAuth(e){if(this.apiKey!=null)return mt([{"X-Api-Key":this.apiKey}])}async bearerAuth(e){if(this.authToken!=null)return mt([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return HX(e)}getUserAgent(){return`${this.constructor.name}/JS ${Oc}`}defaultIdempotencyKey(){return`stainless-node-retry-${K4()}`}makeStatusError(e,r,n,i){return nn.generate(e,r,n,i)}buildURL(e,r,n){let i=!M(this,b$,"m",pD).call(this)&&n||this.baseURL,a=AX(e)?new URL(e):new URL(i+(i.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),o=this.defaultQuery(),s=Object.fromEntries(a.searchParams);return(!PU(o)||!PU(s))&&(r={...s,...o,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(a.search=this.stringifyQuery(r)),a.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new Ce("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:r,options:n}){}get(e,r){return this.methodRequest("get",e,r)}post(e,r){return this.methodRequest("post",e,r)}patch(e,r){return this.methodRequest("patch",e,r)}put(e,r){return this.methodRequest("put",e,r)}delete(e,r){return this.methodRequest("delete",e,r)}methodRequest(e,r,n){return this.request(Promise.resolve(n).then(i=>({method:e,path:r,...i})))}request(e,r=null){return new gg(this,this.makeRequest(e,r,void 0))}async makeRequest(e,r,n){let i=await e,a=i.maxRetries??this.maxRetries;r==null&&(r=a),await this.prepareOptions(i);let{req:o,url:s,timeout:c}=await this.buildRequest(i,{retryCount:a-r});await this.prepareRequest(o,{url:s,options:i});let u="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),l=n===void 0?"":`, retryOf: ${n}`,d=Date.now();if(tn(this).debug(`[${u}] sending request`,Yo({retryOfRequestLogID:n,method:i.method,url:s,options:i,headers:o.headers})),i.signal?.aborted)throw new Zn;let f=new AbortController,p=await this.fetchWithTimeout(s,o,c,f).catch(l$),m=Date.now();if(p instanceof globalThis.Error){let h=`retrying, ${r} attempts remaining`;if(i.signal?.aborted)throw new Zn;let b=Hd(p)||/timed? ?out/i.test(String(p)+("cause"in p?String(p.cause):""));if(r)return tn(this).info(`[${u}] connection ${b?"timed out":"failed"} - ${h}`),tn(this).debug(`[${u}] connection ${b?"timed out":"failed"} (${h})`,Yo({retryOfRequestLogID:n,url:s,durationMs:m-d,message:p.message})),this.retryRequest(i,r,n??u);throw tn(this).info(`[${u}] connection ${b?"timed out":"failed"} - error; no more retries left`),tn(this).debug(`[${u}] connection ${b?"timed out":"failed"} (error; no more retries left)`,Yo({retryOfRequestLogID:n,url:s,durationMs:m-d,message:p.message})),b?new og:new Mc({cause:p})}let v=[...p.headers.entries()].filter(([h])=>h==="request-id").map(([h,b])=>", "+h+": "+JSON.stringify(b)).join(""),g=`[${u}${l}${v}] ${o.method} ${s} ${p.ok?"succeeded":"failed"} with status ${p.status} in ${m-d}ms`;if(!p.ok){let h=await this.shouldRetry(p);if(r&&h){let w=`retrying, ${r} attempts remaining`;return await BX(p.body),tn(this).info(`${g} - ${w}`),tn(this).debug(`[${u}] response error (${w})`,Yo({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),this.retryRequest(i,r,n??u,p.headers)}let b=h?"error; no more retries left":"error; not retryable";tn(this).info(`${g} - ${b}`);let y=await p.text().catch(w=>l$(w).message),_=H4(y),x=_?void 0:y;throw tn(this).debug(`[${u}] response error (${b})`,Yo({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,message:x,durationMs:Date.now()-d})),this.makeStatusError(p.status,_,x,p.headers)}return tn(this).info(g),tn(this).debug(`[${u}] response start`,Yo({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),{response:p,options:i,controller:f,requestLogID:u,retryOfRequestLogID:n,startTime:d}}getAPIList(e,r,n){return this.requestAPIList(r,n&&"then"in n?n.then(i=>({method:"get",path:e,...i})):{method:"get",path:e,...n})}requestAPIList(e,r){let n=this.makeRequest(r,null,void 0);return new m$(this,n,e)}async fetchWithTimeout(e,r,n,i){let{signal:a,method:o,...s}=r||{},c=this._makeAbort(i);a&&a.addEventListener("abort",c,{once:!0});let u=setTimeout(c,n),l=globalThis.ReadableStream&&s.body instanceof globalThis.ReadableStream||typeof s.body=="object"&&s.body!==null&&Symbol.asyncIterator in s.body,d={signal:i.signal,...l?{duplex:"half"}:{},method:"GET",...s};o&&(d.method=o.toUpperCase());try{return await this.fetch.call(void 0,e,d)}finally{clearTimeout(u)}}async shouldRetry(e){let r=e.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,r,n,i){let a,o=i?.get("retry-after-ms");if(o){let c=parseFloat(o);Number.isNaN(c)||(a=c)}let s=i?.get("retry-after");if(s&&!a){let c=parseFloat(s);Number.isNaN(c)?a=Date.parse(s)-Date.now():a=c*1e3}if(a===void 0){let c=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(r,c)}return await MX(a),this.makeRequest(e,r-1,n)}calculateDefaultRetryTimeoutMillis(e,r){let n=r-e,i=Math.min(.5*Math.pow(2,n),8),a=1-Math.random()*.25;return i*a*1e3}calculateNonstreamingTimeout(e,r){if(36e5*e/128e3>6e5||r!=null&&e>r)throw new Ce("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}async buildRequest(e,{retryCount:r=0}={}){let n={...e},{method:i,path:a,query:o,defaultBaseURL:s}=n,c=this.buildURL(a,o,s);"timeout"in n&&DX("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:u,body:l}=this.buildBody({options:n}),d=await this.buildHeaders({options:e,method:i,bodyHeaders:u,retryCount:r});return{req:{method:i,headers:d,...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:"half"},...l&&{body:l},...this.fetchOptions??{},...n.fetchOptions??{}},url:c,timeout:n.timeout}}async buildHeaders({options:e,method:r,bodyHeaders:n,retryCount:i}){let a={};this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),a[this.idempotencyHeader]=e.idempotencyKey);let o=mt([a,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(i),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...VX(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(o),o.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:r}}){if(!e)return{bodyHeaders:void 0,body:void 0};let n=mt([r]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&n.values.has("content-type")||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:Q4(e)}:typeof e=="object"&&n.values.get("content-type")==="application/x-www-form-urlencoded"?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(e)}:M(this,tg,"f").call(this,{body:e,headers:n})}};B$=or,tg=new WeakMap,b$=new WeakSet,pD=function(){return this.baseURL!=="https://api.anthropic.com"};or.Anthropic=B$;or.HUMAN_PROMPT=wee;or.AI_PROMPT=kee;or.DEFAULT_TIMEOUT=6e5;or.AnthropicError=Ce;or.APIError=nn;or.APIConnectionError=Mc;or.APIConnectionTimeoutError=og;or.APIUserAbortError=Zn;or.NotFoundError=lg;or.ConflictError=dg;or.RateLimitError=fg;or.BadRequestError=sg;or.AuthenticationError=cg;or.InternalServerError=mg;or.PermissionDeniedError=ug;or.UnprocessableEntityError=pg;or.toFile=see;var qc=class extends or{constructor(){super(...arguments),this.completions=new Ig(this),this.messages=new Qd(this),this.models=new Pg(this),this.beta=new io(this)}};qc.Completions=Ig;qc.Messages=Qd;qc.Models=Pg;qc.Beta=io;function fD(t){return t instanceof Error?t:Error(String(t))}function rg(t){return t instanceof Error?t.message:String(t)}function Bd(t){if(t&&typeof t=="object"&&"code"in t&&typeof t.code=="string")return t.code}function K$(t){return Bd(t)==="ENOENT"}var Uc,zc=null;function Eee(){if(zc)return zc;if(!Jo(process.env.DEBUG_CLAUDE_AGENT_SDK))return Uc=null,zc=Promise.resolve(),zc;let t=e4(L$(),"debug");return Uc=e4(t,`sdk-${See()}.txt`),process.stderr.write(`SDK debug logs: ${Uc}
|
|
195
|
+
`),zc=Iee(t,{recursive:!0}).then(()=>{}).catch(()=>{}),zc}function Ki(t){if(Uc===null)return;let e=`${new Date().toISOString()} ${t}
|
|
196
|
+
`;Eee().then(()=>{Uc&&$ee(Uc,e).catch(()=>{})})}function H$(){let t=new Set;return{subscribe(e){return t.add(e),()=>{t.delete(e)}},emit(...e){let r;for(let n of t)try{n(...e)}catch(i){(r??=[]).push(i)}if(r)throw r.length===1?r[0]:AggregateError(r,"Signal listener(s) threw")},clear(){t.clear()}}}function Tee(){let t="";if(typeof process<"u"&&typeof process.cwd=="function"&&typeof t4=="function"){let e=Pee();try{t=t4(e).normalize("NFC")}catch{t=e.normalize("NFC")}}return{originalCwd:t,projectRoot:t,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:t,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,hasStreamingInput:!1,kairosActive:!1,strictToolResultPairing:!1,memoryToggledOff:!1,teamMemoryServerStatus:void 0,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:mD(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],loopChainStartedAt:Object.create(null),sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,sdkOAuthTokenRefreshCallback:null,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,activeRoutine:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}var zee=Tee();function Oee(){return zee.sessionId}var jee=H$(),hNe=jee.subscribe,Nee=H$(),gNe=Nee.subscribe,Ree=H$(),vNe=Ree.subscribe;function Mee({writeFn:t,flushIntervalMs:e=1e3,maxBufferSize:r=100,maxBufferBytes:n=1/0,immediateMode:i=!1}){let a=[],o=0,s=null,c=null;function u(){s&&(clearTimeout(s),s=null)}function l(){c&&(t(c.join("")),c=null),a.length!==0&&(t(a.join("")),a=[],o=0,u())}function d(){s||(s=setTimeout(l,e))}function f(){if(c){c.push(...a),a=[],o=0,u();return}let p=a;a=[],o=0,u(),c=p,setImmediate(()=>{let m=c;c=null,m&&t(m.join(""))})}return{write(p){if(i){t(p);return}a.push(p),o+=p.length,d(),(a.length>=r||o>=n)&&f()},flush:l,dispose(){l()}}}var r4=new Set;function qee(t){return r4.add(t),()=>r4.delete(t)}var Zee=co(t=>{if(!t||t.trim()==="")return null;let e=t.split(",").map(a=>a.trim()).filter(Boolean);if(e.length===0)return null;let r=e.some(a=>a.startsWith("!")),n=e.some(a=>!a.startsWith("!"));if(r&&n)return null;let i=e.map(a=>a.replace(/^!/,"").toLowerCase());return{include:r?[]:i,exclude:r?i:[],isExclusive:r}});function Lee(t){let e=[],r=t.match(/^MCP server ["']([^"']+)["']/);if(r&&r[1])e.push("mcp"),e.push(r[1].toLowerCase());else{let a=t.match(/^([^:[]+):/);a&&a[1]&&e.push(a[1].trim().toLowerCase())}let n=t.match(/^\[([^\]]+)]/);n&&n[1]&&e.push(n[1].trim().toLowerCase()),t.toLowerCase().includes("1p event:")&&e.push("1p");let i=t.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i&&i[1]){let a=i[1].trim().toLowerCase();a.length<30&&!a.includes(" ")&&e.push(a)}return Array.from(new Set(e))}function Fee(t,e){return e?t.length===0?!1:e.isExclusive?!t.some(r=>e.exclude.includes(r)):t.some(r=>e.include.includes(r)):!0}function Vee(t,e){if(!e)return!0;let r=Lee(t);return Fee(r,e)}var Xee={cwd(){return process.cwd()},existsSync(t){let e=[];try{let i=nr(e,ar`fs.existsSync(${t})`,0);return qe.existsSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},async stat(t){return Yee(t)},async readdir(t){return Kee(t,{withFileTypes:!0})},async unlink(t){return Jee(t)},async rmdir(t){return Gee(t)},async rm(t,e){return Qee(t,e)},async mkdir(t,e){try{await Wee(t,{recursive:!0,...e})}catch(r){if(Bd(r)!=="EEXIST")throw r}},async readFile(t,e){return n4(t,{encoding:e.encoding})},async rename(t,e){return Hee(t,e)},statSync(t){let e=[];try{let i=nr(e,ar`fs.statSync(${t})`,0);return qe.statSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},lstatSync(t){let e=[];try{let i=nr(e,ar`fs.lstatSync(${t})`,0);return qe.lstatSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},readFileSync(t,e){let r=[];try{let a=nr(r,ar`fs.readFileSync(${t})`,0);return qe.readFileSync(t,{encoding:e.encoding})}catch(a){var n=a,i=1}finally{ir(r,n,i)}},readFileBytesSync(t){let e=[];try{let i=nr(e,ar`fs.readFileBytesSync(${t})`,0);return qe.readFileSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},readSync(t,e){let r=[];try{let a=nr(r,ar`fs.readSync(${t}, ${e.length} bytes)`,0),o;try{o=qe.openSync(t,"r");let s=Buffer.alloc(e.length),c=qe.readSync(o,s,0,e.length,0);return{buffer:s,bytesRead:c}}finally{o&&qe.closeSync(o)}}catch(a){var n=a,i=1}finally{ir(r,n,i)}},appendFileSync(t,e,r){let n=[];try{let o=nr(n,ar`fs.appendFileSync(${t}, ${e.length} chars)`,0);if(r?.mode!==void 0)try{let s=qe.openSync(t,"ax",r.mode);try{qe.appendFileSync(s,e)}finally{qe.closeSync(s)}return}catch(s){if(Bd(s)!=="EEXIST")throw s}qe.appendFileSync(t,e)}catch(o){var i=o,a=1}finally{ir(n,i,a)}},copyFileSync(t,e){let r=[];try{let a=nr(r,ar`fs.copyFileSync(${t} → ${e})`,0);qe.copyFileSync(t,e)}catch(a){var n=a,i=1}finally{ir(r,n,i)}},unlinkSync(t){let e=[];try{let i=nr(e,ar`fs.unlinkSync(${t})`,0);qe.unlinkSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},renameSync(t,e){let r=[];try{let a=nr(r,ar`fs.renameSync(${t} → ${e})`,0);qe.renameSync(t,e)}catch(a){var n=a,i=1}finally{ir(r,n,i)}},linkSync(t,e){let r=[];try{let a=nr(r,ar`fs.linkSync(${t} → ${e})`,0);qe.linkSync(t,e)}catch(a){var n=a,i=1}finally{ir(r,n,i)}},symlinkSync(t,e,r){let n=[];try{let o=nr(n,ar`fs.symlinkSync(${t} → ${e})`,0);qe.symlinkSync(t,e,r)}catch(o){var i=o,a=1}finally{ir(n,i,a)}},readlinkSync(t){let e=[];try{let i=nr(e,ar`fs.readlinkSync(${t})`,0);return qe.readlinkSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},realpathSync(t){let e=[];try{let i=nr(e,ar`fs.realpathSync(${t})`,0);return qe.realpathSync(t).normalize("NFC")}catch(i){var r=i,n=1}finally{ir(e,r,n)}},mkdirSync(t,e){let r=[];try{let a=nr(r,ar`fs.mkdirSync(${t})`,0),o={recursive:!0};e?.mode!==void 0&&(o.mode=e.mode);try{qe.mkdirSync(t,o)}catch(s){if(Bd(s)!=="EEXIST")throw s}}catch(a){var n=a,i=1}finally{ir(r,n,i)}},readdirSync(t){let e=[];try{let i=nr(e,ar`fs.readdirSync(${t})`,0);return qe.readdirSync(t,{withFileTypes:!0})}catch(i){var r=i,n=1}finally{ir(e,r,n)}},readdirStringSync(t){let e=[];try{let i=nr(e,ar`fs.readdirStringSync(${t})`,0);return qe.readdirSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},isDirEmptySync(t){let e=[];try{let i=nr(e,ar`fs.isDirEmptySync(${t})`,0);return this.readdirSync(t).length===0}catch(i){var r=i,n=1}finally{ir(e,r,n)}},rmdirSync(t){let e=[];try{let i=nr(e,ar`fs.rmdirSync(${t})`,0);qe.rmdirSync(t)}catch(i){var r=i,n=1}finally{ir(e,r,n)}},rmSync(t,e){let r=[];try{let a=nr(r,ar`fs.rmSync(${t})`,0);qe.rmSync(t,e)}catch(a){var n=a,i=1}finally{ir(r,n,i)}},createWriteStream(t){return qe.createWriteStream(t)},async readFileBytes(t,e){if(e===void 0)return n4(t);let r=await Bee(t,"r");try{let{size:n}=await r.stat(),i=Math.min(n,e),a=Buffer.allocUnsafe(i),o=0;for(;o<i;){let{bytesRead:s}=await r.read(a,o,i-o,o);if(s===0)break;o+=s}return o<i?a.subarray(0,o):a}finally{await r.close()}}},ete=Xee;function i4(){return ete}function tte(t,e){t.destroyed||t.write(e)}function rte(t){tte(process.stderr,t)}var x$={verbose:0,debug:1,info:2,warn:3,error:4},nte=co(()=>{let t=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return t&&Object.hasOwn(x$,t)?t:"debug"}),ite=!1,w$=co(()=>ite||Jo(process.env.DEBUG)||Jo(process.env.DEBUG_SDK)||process.argv.includes("--debug")||process.argv.includes("-d")||vD()||process.argv.some(t=>t.startsWith("--debug="))||yD()!==null),ate=co(()=>{let t=process.argv.find(r=>r.startsWith("--debug="));if(!t)return null;let e=t.substring(8);return Zee(e)}),vD=co(()=>process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e")),yD=co(()=>{for(let t=0;t<process.argv.length;t++){let e=process.argv[t];if(e.startsWith("--debug-file="))return e.substring(13);if(e==="--debug-file"&&t+1<process.argv.length)return process.argv[t+1]}return null});function ote(t){if(!w$()||typeof process>"u"||typeof process.versions>"u"||typeof process.versions.node>"u")return!1;let e=ate();return Vee(t,e)}var ste=!1,Hh=null,o$=Promise.resolve();async function cte(t,e,r,n){t&&await Aee(e,{recursive:!0}).catch(()=>{}),await Cee(r,n),bD()}function ute(){}function lte(){if(!Hh){let t=null;Hh=Mee({writeFn:e=>{let r=_D(),n=hD(r),i=t!==n;if(t=n,w$()){if(i)try{i4().mkdirSync(n)}catch{}i4().appendFileSync(r,e),bD();return}o$=o$.then(cte.bind(null,i,n,r,e)).catch(ute)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:w$()}),qee(async()=>{Hh?.dispose(),await o$})}return Hh}function Mn(t,{level:e}={level:"debug"}){if(x$[e]<x$[nte()]||!ote(t))return;ste&&t.includes(`
|
|
197
|
+
`)&&(t=gn(t));let r=`${new Date().toISOString()} [${e.toUpperCase()}] ${t.trim()}
|
|
198
|
+
`;if(vD()){rte(r);return}lte().write(r)}function _D(){return yD()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??gD(L$(),"debug",`${Oee()}.txt`)}var bD=co(async()=>{try{let t=_D(),e=hD(t),r=gD(e,"latest");await Dee(r).catch(()=>{}),await Uee(t,r)}catch{}}),xNe=(()=>{let t=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(t!==void 0){let e=Number(t);if(!Number.isNaN(e)&&e>=0)return e}return 1/0})(),dte={[Symbol.dispose](){}};function pte(){return dte}var ar=pte;function gn(t,e,r){let n=[];try{let o=nr(n,ar`JSON.stringify(${t})`,0);return JSON.stringify(t,e,r)}catch(o){var i=o,a=1}finally{ir(n,i,a)}}var G$=(t,e)=>{let r=[];try{let a=nr(r,ar`JSON.parse(${t})`,0);return typeof e>"u"?JSON.parse(t):JSON.parse(t,e)}catch(a){var n=a,i=1}finally{ir(r,n,i)}};function fte(t){let e=t.trim();return e.startsWith("{")&&e.endsWith("}")}function mte(t,e){let r={...t};if(e){let n=e.enabled===!0&&e.failIfUnavailable===void 0?{...e,failIfUnavailable:!0}:e,i=r.settings;if(i&&!fte(i))throw Error("Cannot use both a settings file path and the sandbox option. Include the sandbox configuration in your settings file instead.");let a={sandbox:n};if(i)try{a={...G$(i),sandbox:n}}catch{}r.settings=gn(a)}return r}var hte=2e3,Tg=new Set,a4=!1;function gte(){for(let t of Tg)t.killed||t.kill("SIGTERM")}function vte(t){Tg.add(t),!a4&&(a4=!0,process.on("exit",gte))}var k$=class{options;process;processStdin;processStdout;ready=!1;abortController;exitError;exitListeners=[];abortHandler;pendingWrites=[];pendingEndInput=!1;spawnResolve;spawnReject;spawnPromise;constructor(e){this.options=e,this.abortController=e.abortController||Z4(),e.deferSpawn?(this.spawnPromise=new Promise((r,n)=>{this.spawnResolve=r,this.spawnReject=n}),this.spawnPromise.catch(()=>{})):this.initialize()}spawn(){try{this.initialize()}catch(r){throw this.spawnAbort(fD(r)),r}let e=this.pendingWrites;this.pendingWrites=[],this.spawnResolve&&(this.spawnResolve(),this.spawnResolve=void 0,this.spawnReject=void 0);for(let r of e)this.write(r);this.pendingEndInput&&(this.pendingEndInput=!1,this.processStdin?.end())}spawnAbort(e){this.spawnReject&&(this.spawnReject(e),this.spawnReject=void 0,this.spawnResolve=void 0,this.pendingWrites=[])}updateEnv(e){this.options.env?Object.assign(this.options.env,e):this.options.env={...e}}getDefaultExecutable(){return L4()?"bun":"node"}spawnLocalProcess(e){let{command:r,args:n,cwd:i,env:a,signal:o}=e,s=Jo(a.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr?"pipe":"ignore",c=KY(r,n,{cwd:i,stdio:["pipe","pipe",s],signal:o,env:a,windowsHide:!0});return(Jo(a.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr)&&c.stderr.on("data",u=>{let l=u.toString();Ki(l),this.options.stderr&&this.options.stderr(l)}),{stdin:c.stdin,stdout:c.stdout,get killed(){return c.killed},get exitCode(){return c.exitCode},kill:c.kill.bind(c),on:c.on.bind(c),once:c.once.bind(c),off:c.off.bind(c)}}initialize(){try{let{additionalDirectories:e=[],agent:r,betas:n,cwd:i,executable:a=this.getDefaultExecutable(),executableArgs:o=[],extraArgs:s={},pathToClaudeCodeExecutable:c,env:u={...process.env},thinkingConfig:l,maxTurns:d,maxBudgetUsd:f,taskBudget:p,model:m,fallbackModel:v,jsonSchema:g,permissionMode:h,allowDangerouslySkipPermissions:b,permissionPromptToolName:y,continueConversation:_,resume:x,settingSources:w,allowedTools:k=[],disallowedTools:$=[],tools:P,mcpServers:C,strictMcpConfig:T,canUseTool:D,includePartialMessages:Z,plugins:N,sandbox:ee}=this.options,H=["--output-format","stream-json","--verbose","--input-format","stream-json"];if(l){switch(l.type){case"enabled":l.budgetTokens===void 0?H.push("--thinking","adaptive"):H.push("--max-thinking-tokens",l.budgetTokens.toString());break;case"disabled":H.push("--thinking","disabled");break;case"adaptive":H.push("--thinking","adaptive");break}l.type!=="disabled"&&l.display&&H.push("--thinking-display",l.display)}if(this.options.effort&&H.push("--effort",this.options.effort),d&&H.push("--max-turns",d.toString()),f!==void 0&&H.push("--max-budget-usd",f.toString()),p&&H.push("--task-budget",p.total.toString()),m&&H.push("--model",m),r&&H.push("--agent",r),n&&n.length>0&&H.push("--betas",n.join(",")),g&&H.push("--json-schema",gn(g)),this.options.debugFile?H.push("--debug-file",this.options.debugFile):this.options.debug&&H.push("--debug"),Jo(u.DEBUG_CLAUDE_AGENT_SDK)&&H.push("--debug-to-stderr"),D){if(y)throw Error("canUseTool callback cannot be used with permissionPromptToolName. Please use one or the other.");H.push("--permission-prompt-tool","stdio")}else y&&H.push("--permission-prompt-tool",y);if(_&&H.push("--continue"),x&&H.push("--resume",x),this.options.assistant&&H.push("--assistant"),this.options.channels&&this.options.channels.length>0&&H.push("--channels",...this.options.channels),k.length>0&&H.push("--allowedTools",k.join(",")),$.length>0&&H.push("--disallowedTools",$.join(",")),P!==void 0&&(Array.isArray(P)?P.length===0?H.push("--tools",""):H.push("--tools",P.join(",")):H.push("--tools","default")),C&&Object.keys(C).length>0&&H.push("--mcp-config",gn({mcpServers:C})),w!==void 0&&H.push(`--setting-sources=${w.join(",")}`),T&&H.push("--strict-mcp-config"),h&&H.push("--permission-mode",h),b&&H.push("--allow-dangerously-skip-permissions"),v){if(m&&v===m)throw Error("Fallback model cannot be the same as the main model. Please specify a different model for fallbackModel option.");H.push("--fallback-model",v)}this.options.includeHookEvents&&H.push("--include-hook-events"),Z&&H.push("--include-partial-messages"),this.options.sessionMirror&&H.push("--session-mirror");for(let R of e)H.push("--add-dir",R);if(N&&N.length>0)for(let R of N)if(R.type==="local")H.push("--plugin-dir",R.path);else throw Error(`Unsupported plugin type: ${R.type}`);this.options.forkSession&&H.push("--fork-session"),this.options.resumeSessionAt&&H.push("--resume-session-at",this.options.resumeSessionAt),this.options.sessionId&&H.push("--session-id",this.options.sessionId),this.options.persistSession===!1&&H.push("--no-session-persistence");let ge={...s??{}};this.options.settings&&(ge.settings=this.options.settings);let Le=mte(ge,ee);for(let[R,S]of Object.entries(Le))S===null?H.push(`--${R}`):H.push(`--${R}`,S);u.CLAUDE_CODE_ENTRYPOINT||(u.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),delete u.NODE_OPTIONS,Jo(u.DEBUG_CLAUDE_AGENT_SDK)?u.DEBUG="1":delete u.DEBUG;let ve=yte(c),W=ve?c:a,I=ve?[...o,...H]:[...o,c,...H],V={command:W,args:I,cwd:i,env:u,signal:this.abortController.signal};this.options.spawnClaudeCodeProcess?(Ki(`Spawning Claude Code (custom): ${W} ${I.join(" ")}`),this.process=this.options.spawnClaudeCodeProcess(V)):(Ki(`Spawning Claude Code: ${W} ${I.join(" ")}`),this.process=this.spawnLocalProcess(V)),this.processStdin=this.process.stdin,this.processStdout=this.process.stdout,vte(this.process),this.abortHandler=()=>{this.process&&!this.process.killed&&this.process.kill("SIGTERM")},this.abortController.signal.addEventListener("abort",this.abortHandler),this.process.on("error",R=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new ro("Claude Code process aborted by user");else if(K$(R)){let S=ve?`Claude Code native binary not found at ${c}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.`:`Claude Code executable not found at ${c}. Is options.pathToClaudeCodeExecutable set?`;this.exitError=ReferenceError(S),Ki(this.exitError.message)}else this.exitError=Error(`Failed to spawn Claude Code process: ${R.message}`),Ki(this.exitError.message)}),this.process.on("exit",(R,S)=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new ro("Claude Code process aborted by user");else{let E=this.getProcessExitError(R,S);E&&(this.exitError=E,Ki(E.message))}}),this.ready=!0}catch(e){throw this.ready=!1,e}}getProcessExitError(e,r){if(e!==0&&e!==null)return Error(`Claude Code process exited with code ${e}`);if(r)return Error(`Claude Code process terminated by signal ${r}`)}write(e){if(this.abortController.signal.aborted)throw new ro("Operation aborted");if(this.spawnResolve){this.pendingWrites.push(e);return}if(!this.ready||!this.processStdin)throw Error("ProcessTransport is not ready for writing");if(this.processStdin.writableEnded){Ki("[ProcessTransport] Dropping write to ended stdin stream");return}if(this.process?.killed||this.process?.exitCode!==null)throw Error("Cannot write to terminated process");if(this.exitError)throw Error(`Cannot write to process that exited with error: ${this.exitError.message}`);Ki(`[ProcessTransport] Writing to stdin: ${e.substring(0,100)}`);try{this.processStdin.write(e)||Ki("[ProcessTransport] Write buffer full, data queued")}catch(r){throw this.ready=!1,Error(`Failed to write to process stdin: ${rg(r)}`)}}close(){this.spawnAbort(Error("Query closed before spawn")),this.processStdin&&(this.processStdin.end(),this.processStdin=void 0),this.abortHandler&&(this.abortController.signal.removeEventListener("abort",this.abortHandler),this.abortHandler=void 0);for(let{handler:r}of this.exitListeners)this.process?.off("exit",r);this.exitListeners=[];let e=this.process;e&&!e.killed&&e.exitCode===null?(setTimeout(r=>{r.killed||r.exitCode!==null||(r.kill("SIGTERM"),setTimeout(n=>{n.exitCode===null&&n.kill("SIGKILL")},5e3,r).unref())},hte,e).unref(),e.once("exit",()=>Tg.delete(e))):e&&Tg.delete(e),this.ready=!1}isReady(){return this.ready}async*readMessages(){if(this.spawnPromise&&(await this.spawnPromise,this.spawnPromise=void 0),!this.processStdout)throw Error("ProcessTransport output stream not available");if(this.exitError)throw this.exitError;let e=HY({input:this.processStdout}),r=this.process?(()=>{let n=this.process,i=()=>e.close();return n.on("error",i),()=>n.off("error",i)})():void 0;this.exitError&&e.close();try{for await(let n of e)if(n.trim()){let i;try{i=G$(n)}catch{Ki(`Non-JSON stdout: ${n}`);continue}yield i}if(this.exitError)throw this.exitError;await this.waitForExit()}catch(n){throw n}finally{r?.(),e.close()}}endInput(){if(this.spawnResolve){this.pendingEndInput=!0;return}this.processStdin&&this.processStdin.end()}getInputStream(){return this.processStdin}onExit(e){if(!this.process)return()=>{};let r=(n,i)=>{let a=this.getProcessExitError(n,i);e(a)};return this.process.on("exit",r),this.exitListeners.push({callback:e,handler:r}),()=>{this.process&&this.process.off("exit",r);let n=this.exitListeners.findIndex(i=>i.handler===r);n!==-1&&this.exitListeners.splice(n,1)}}async waitForExit(){if(!this.process){if(this.exitError)throw this.exitError;return}if(this.process.exitCode!==null||this.process.killed||this.exitError){if(this.exitError)throw this.exitError;return}return new Promise((e,r)=>{let n=(a,o)=>{if(this.abortController.signal.aborted){r(new ro("Operation aborted"));return}let s=this.getProcessExitError(a,o);s?r(s):e()};this.process.once("exit",n);let i=a=>{this.process.off("exit",n),r(a)};this.process.once("error",i),this.process.once("exit",()=>{this.process.off("error",i)})})}};function yte(t){return![".js",".mjs",".tsx",".ts",".jsx"].some(e=>t.endsWith(e))}function _te(t,e=process.platform,r=process.arch){let n;e==="linux"?n=[`@anthropic-ai/claude-agent-sdk-linux-${r}-musl/cli`,`@anthropic-ai/claude-agent-sdk-linux-${r}/cli`]:e==="win32"?n=[`@anthropic-ai/claude-agent-sdk-win32-${r}/cli.exe`]:n=[`@anthropic-ai/claude-agent-sdk-${e}-${r}/cli`];for(let i of n)try{return t(i)}catch{}return null}var S$=class{returned;queue=[];readResolve;readReject;isDone=!1;hasError;started=!1;constructor(e){this.returned=e}[Symbol.asyncIterator](){if(this.started)throw Error("Stream can only be iterated once");return this.started=!0,this}next(){return this.queue.length>0?Promise.resolve({done:!1,value:this.queue.shift()}):this.isDone?Promise.resolve({done:!0,value:void 0}):this.hasError?Promise.reject(this.hasError):new Promise((e,r)=>{this.readResolve=e,this.readReject=r})}enqueue(e){if(this.readResolve){let r=this.readResolve;this.readResolve=void 0,this.readReject=void 0,r({done:!1,value:e})}else this.queue.push(e)}done(){if(this.isDone=!0,this.readResolve){let e=this.readResolve;this.readResolve=void 0,this.readReject=void 0,e({done:!0,value:void 0})}}error(e){if(this.hasError=e,this.readReject){let r=this.readReject;this.readResolve=void 0,this.readReject=void 0,r(e)}}return(){return this.isDone=!0,this.returned&&this.returned(),Promise.resolve({done:!0,value:void 0})}},$$=class{sendMcpMessage;isClosed=!1;constructor(e){this.sendMcpMessage=e}onclose;onerror;onmessage;async start(){}async send(e){if(this.isClosed)throw Error("Transport is closed");this.sendMcpMessage(e)}async close(){this.isClosed||(this.isClosed=!0,this.onclose?.())}},I$=class{transport;isSingleUserTurn;canUseTool;hooks;abortController;jsonSchema;initConfig;onElicitation;getOAuthToken;pendingControlResponses=new Map;cleanupPerformed=!1;sdkMessages;inputStream=new S$;initialization;cancelControllers=new Map;hookCallbacks=new Map;nextCallbackId=0;sdkMcpTransports=new Map;sdkMcpServerInstances=new Map;pendingMcpResponses=new Map;firstResultReceivedResolve;firstResultReceived=!1;lastErrorResultText;transcriptMirrorBatcher;cleanupCallbacks=[];cleanupPromise;setIsSingleUserTurn(e){this.isSingleUserTurn=e}setTranscriptMirrorBatcher(e){this.transcriptMirrorBatcher=e}addCleanupCallback(e){this.cleanupPerformed?e():this.cleanupCallbacks.push(e)}isClosed(){return this.cleanupPerformed}hasBidirectionalNeeds(){return this.sdkMcpTransports.size>0||this.hooks!==void 0&&Object.keys(this.hooks).length>0||this.canUseTool!==void 0||this.onElicitation!==void 0||this.getOAuthToken!==void 0}constructor(e,r,n,i,a,o=new Map,s,c,u,l){this.transport=e,this.isSingleUserTurn=r,this.canUseTool=n,this.hooks=i,this.abortController=a,this.jsonSchema=s,this.initConfig=c,this.onElicitation=u,this.getOAuthToken=l;for(let[d,f]of o)this.connectSdkMcpServer(d,f);this.sdkMessages=this.readSdkMessages(),this.readMessages(),this.initialization=this.initialize(),this.initialization.catch(()=>{})}setError(e){this.inputStream.error(e)}async stopTask(e){await this.request({subtype:"stop_task",task_id:e})}close(){this.cleanup()}cleanup(e){return this.cleanupPromise?this.cleanupPromise:(this.cleanupPerformed=!0,this.cleanupPromise=this.performCleanup(e),this.cleanupPromise)}async performCleanup(e){for(let r of this.cleanupCallbacks)try{r()}catch{}if(this.cleanupCallbacks=[],this.transcriptMirrorBatcher)try{await this.transcriptMirrorBatcher.flush()}catch{}try{for(let n of this.cancelControllers.values())n.abort();this.cancelControllers.clear(),this.transport.close();let r=e??Error("Query closed before response received");for(let{reject:n}of this.pendingControlResponses.values())n(r);this.pendingControlResponses.clear();for(let{reject:n}of this.pendingMcpResponses.values())n(r);this.pendingMcpResponses.clear(),this.hookCallbacks.clear();for(let n of this.sdkMcpTransports.values())n.close().catch(()=>{});this.sdkMcpTransports.clear(),e?this.inputStream.error(e):this.inputStream.done()}catch{}}next(...[e]){return this.sdkMessages.next(e)}async return(e){return await this.cleanup(),this.sdkMessages.return(e)}async throw(e){return await this.cleanup(),this.sdkMessages.throw(e)}[Symbol.asyncIterator](){return this.sdkMessages}async[Symbol.asyncDispose](){await this.cleanup()}async readMessages(){try{for await(let e of this.transport.readMessages()){if(e.type==="control_response"){let r=this.pendingControlResponses.get(e.response.request_id);r&&r.handler(e.response);continue}else if(e.type==="control_request"){this.handleControlRequest(e);continue}else if(e.type==="control_cancel_request"){this.handleControlCancelRequest(e);continue}else{if(e.type==="keep_alive")continue;if(e.type==="transcript_mirror"){this.transcriptMirrorBatcher?.enqueue(e.filePath,e.entries);continue}}e.type==="system"&&e.subtype==="post_turn_summary"||(e.type==="result"?(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.lastErrorResultText=e.is_error?e.subtype==="success"?e.result:e.errors.join("; "):void 0,this.firstResultReceived=!0,this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.isSingleUserTurn&&(Mn("[Query.readMessages] First result received for single-turn query, closing stdin"),this.transport.endInput())):e.type==="system"&&e.subtype==="session_state_changed"||(this.lastErrorResultText=void 0),this.inputStream.enqueue(e))}this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.inputStream.done(),this.cleanup()}catch(e){if(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.lastErrorResultText!==void 0&&!(e instanceof ro)){let r=Error(`Claude Code returned an error result: ${this.lastErrorResultText}`);Mn(`[Query.readMessages] Replacing exit error with result text. Original: ${rg(e)}`),this.inputStream.error(r),this.cleanup(r);return}this.inputStream.error(e),this.cleanup(e)}}async handleControlRequest(e){let r=new AbortController;this.cancelControllers.set(e.request_id,r);try{let n=await this.processControlRequest(e,r.signal);if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"success",request_id:e.request_id,response:n}};await Promise.resolve(this.transport.write(gn(i)+`
|
|
199
|
+
`))}catch(n){if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"error",request_id:e.request_id,error:rg(n)}};try{await Promise.resolve(this.transport.write(gn(i)+`
|
|
200
|
+
`))}catch(a){Mn(`[Query.handleControlRequest] Error-response write failed: ${rg(a)}`,{level:"error"})}}finally{this.cancelControllers.delete(e.request_id)}}handleControlCancelRequest(e){let r=this.cancelControllers.get(e.request_id);r&&(r.abort(),this.cancelControllers.delete(e.request_id))}async processControlRequest(e,r){if(e.request.subtype==="can_use_tool"){if(!this.canUseTool)throw Error("canUseTool callback is not provided.");return{...await this.canUseTool(e.request.tool_name,e.request.input,{signal:r,suggestions:e.request.permission_suggestions,blockedPath:e.request.blocked_path,decisionReason:e.request.decision_reason,title:e.request.title,displayName:e.request.display_name,description:e.request.description,toolUseID:e.request.tool_use_id,agentID:e.request.agent_id}),toolUseID:e.request.tool_use_id}}else{if(e.request.subtype==="hook_callback")return await this.handleHookCallbacks(e.request.callback_id,e.request.input,e.request.tool_use_id,r);if(e.request.subtype==="mcp_message"){let n=e.request,i=this.sdkMcpTransports.get(n.server_name);if(!i)throw Error(`SDK MCP server not found: ${n.server_name}`);return"method"in n.message&&"id"in n.message&&n.message.id!==null?{mcp_response:await this.handleMcpControlRequest(n.server_name,n,i)}:(i.onmessage&&i.onmessage(n.message),{mcp_response:{jsonrpc:"2.0",result:{},id:0}})}else if(e.request.subtype==="elicitation"){let n=e.request;return this.onElicitation?await this.onElicitation({serverName:n.mcp_server_name,message:n.message,mode:n.mode,url:n.url,elicitationId:n.elicitation_id,requestedSchema:n.requested_schema,title:n.title,displayName:n.display_name,description:n.description},{signal:r}):{action:"decline"}}else if(e.request.subtype==="oauth_token_refresh"){if(!this.getOAuthToken)throw Error("getOAuthToken callback is not provided.");return{accessToken:await this.getOAuthToken({signal:r})??null}}}throw Error("Unsupported control request subtype: "+e.request.subtype)}async*readSdkMessages(){try{for await(let e of this.inputStream)yield e}finally{await this.cleanup()}}async initialize(){let e;if(this.hooks){e={};for(let[i,a]of Object.entries(this.hooks))a.length>0&&(e[i]=a.map(o=>{let s=[];for(let c of o.hooks){let u=`hook_${this.nextCallbackId++}`;this.hookCallbacks.set(u,c),s.push(u)}return{matcher:o.matcher,hookCallbackIds:s,timeout:o.timeout}}))}let r=this.sdkMcpTransports.size>0?Array.from(this.sdkMcpTransports.keys()):void 0,n={subtype:"initialize",hooks:e,sdkMcpServers:r,jsonSchema:this.jsonSchema,systemPrompt:this.initConfig?.systemPrompt,appendSystemPrompt:this.initConfig?.appendSystemPrompt,excludeDynamicSections:this.initConfig?.excludeDynamicSections,agents:this.initConfig?.agents,promptSuggestions:this.initConfig?.promptSuggestions,agentProgressSummaries:this.initConfig?.agentProgressSummaries};return(await this.request(n)).response}async interrupt(){await this.request({subtype:"interrupt"})}async setPermissionMode(e){await this.request({subtype:"set_permission_mode",mode:e})}async setModel(e){await this.request({subtype:"set_model",model:e})}async setMaxThinkingTokens(e){await this.request({subtype:"set_max_thinking_tokens",max_thinking_tokens:e})}async applyFlagSettings(e){await this.request({subtype:"apply_flag_settings",settings:e})}async getSettings(){return(await this.request({subtype:"get_settings"})).response}async rewindFiles(e,r){return(await this.request({subtype:"rewind_files",user_message_id:e,dry_run:r?.dryRun})).response}async cancelAsyncMessage(e){return(await this.request({subtype:"cancel_async_message",message_uuid:e})).response.cancelled}async seedReadState(e,r){await this.request({subtype:"seed_read_state",path:e,mtime:r})}async enableRemoteControl(e,r){return(await this.request({subtype:"remote_control",enabled:e,...r!==void 0&&{name:r}})).response}async generateSessionTitle(e,r){return(await this.request({subtype:"generate_session_title",description:e,persist:r?.persist})).response.title}async askSideQuestion(e){let r=(await this.request({subtype:"side_question",question:e})).response;return r.response===null?null:{response:r.response,synthetic:r.synthetic??!1}}processPendingPermissionRequests(e){for(let r of e)r.request.subtype==="can_use_tool"&&this.handleControlRequest(r).catch(()=>{})}request(e){let r=Math.random().toString(36).substring(2,15),n={request_id:r,type:"control_request",request:e};return new Promise((i,a)=>{this.pendingControlResponses.set(r,{handler:o=>{this.pendingControlResponses.delete(r),o.subtype==="success"?i(o):(a(Error(o.error)),o.pending_permission_requests&&this.processPendingPermissionRequests(o.pending_permission_requests))},reject:a}),Promise.resolve(this.transport.write(gn(n)+`
|
|
201
|
+
`)).catch(o=>{this.pendingControlResponses.delete(r),a(o)})})}initializationResult(){return this.initialization}async supportedCommands(){return(await this.initialization).commands}async supportedModels(){return(await this.initialization).models}async supportedAgents(){return(await this.initialization).agents}async reconnectMcpServer(e){await this.request({subtype:"mcp_reconnect",serverName:e})}async toggleMcpServer(e,r){await this.request({subtype:"mcp_toggle",serverName:e,enabled:r})}async enableChannel(e){await this.request({subtype:"channel_enable",serverName:e})}async mcpAuthenticate(e){return(await this.request({subtype:"mcp_authenticate",serverName:e})).response}async mcpClearAuth(e){return(await this.request({subtype:"mcp_clear_auth",serverName:e})).response}async mcpSubmitOAuthCallbackUrl(e,r){return(await this.request({subtype:"mcp_oauth_callback_url",serverName:e,callbackUrl:r})).response}async claudeAuthenticate(e){return(await this.request({subtype:"claude_authenticate",loginWithClaudeAi:e})).response}async claudeOAuthCallback(e,r){return(await this.request({subtype:"claude_oauth_callback",authorizationCode:e,state:r})).response}async claudeOAuthWaitForCompletion(){return(await this.request({subtype:"claude_oauth_wait_for_completion"})).response}async mcpServerStatus(){return(await this.request({subtype:"mcp_status"})).response.mcpServers}async getContextUsage(){return(await this.request({subtype:"get_context_usage"})).response}async reloadPlugins(){return(await this.request({subtype:"reload_plugins"})).response}async setMcpServers(e){let r={},n={};for(let[s,c]of Object.entries(e))c.type==="sdk"&&"instance"in c?r[s]=c.instance:n[s]=c;let i=new Set(this.sdkMcpServerInstances.keys()),a=new Set(Object.keys(r));for(let s of i)a.has(s)||await this.disconnectSdkMcpServer(s);for(let[s,c]of Object.entries(r))i.has(s)||this.connectSdkMcpServer(s,c);let o={};for(let s of Object.keys(r))o[s]={type:"sdk",name:s};return(await this.request({subtype:"mcp_set_servers",servers:{...n,...o}})).response}async accountInfo(){return(await this.initialization).account}async streamInput(e){Mn("[Query.streamInput] Starting to process input stream");try{let r=0;for await(let n of e){if(r++,Mn(`[Query.streamInput] Processing message ${r}: ${n.type}`),this.abortController?.signal.aborted)break;await Promise.resolve(this.transport.write(gn(n)+`
|
|
202
|
+
`))}Mn(`[Query.streamInput] Finished processing ${r} messages from input stream`),r>0&&this.hasBidirectionalNeeds()&&(Mn("[Query.streamInput] Has bidirectional needs, waiting for first result"),await this.waitForFirstResult()),Mn("[Query] Calling transport.endInput() to close stdin to CLI process"),this.transport.endInput()}catch(r){if(!(r instanceof ro))throw r}}waitForFirstResult(){return this.firstResultReceived?(Mn("[Query.waitForFirstResult] Result already received, returning immediately"),Promise.resolve()):new Promise(e=>{if(this.abortController?.signal.aborted){e();return}this.abortController?.signal.addEventListener("abort",()=>e(),{once:!0}),this.firstResultReceivedResolve=e})}handleHookCallbacks(e,r,n,i){let a=this.hookCallbacks.get(e);if(!a)throw Error(`No hook callback found for ID: ${e}`);return a(r,n,{signal:i})}connectSdkMcpServer(e,r){let n=new $$(i=>this.sendMcpServerMessageToCli(e,i));this.sdkMcpTransports.set(e,n),this.sdkMcpServerInstances.set(e,r),r.connect(n).catch(i=>{this.sdkMcpTransports.get(e)===n&&this.sdkMcpTransports.delete(e),this.sdkMcpServerInstances.get(e)===r&&this.sdkMcpServerInstances.delete(e),Mn(`[Query.connectSdkMcpServer] Failed to connect MCP server '${e}': ${i}`,{level:"error"})})}async disconnectSdkMcpServer(e){let r=this.sdkMcpTransports.get(e);r&&(await r.close(),this.sdkMcpTransports.delete(e)),this.sdkMcpServerInstances.delete(e)}sendMcpServerMessageToCli(e,r){if("id"in r&&r.id!==null&&r.id!==void 0){let i=`${e}:${r.id}`,a=this.pendingMcpResponses.get(i);if(a){a.resolve(r),this.pendingMcpResponses.delete(i);return}}let n={type:"control_request",request_id:mD(),request:{subtype:"mcp_message",server_name:e,message:r}};Promise.resolve(this.transport.write(gn(n)+`
|
|
203
|
+
`)).catch(i=>{Mn(`[Query.sendMcpServerMessageToCli] Transport write failed: ${i}`,{level:"error"})})}handleMcpControlRequest(e,r,n){let i="id"in r.message?r.message.id:null,a=`${e}:${i}`;return new Promise((o,s)=>{let c=()=>{this.pendingMcpResponses.delete(a)},u=d=>{c(),o(d)},l=d=>{c(),s(d)};if(this.pendingMcpResponses.set(a,{resolve:u,reject:l}),n.onmessage)n.onmessage(r.message);else{c(),s(Error("No message handler registered"));return}})}},E$=class{send;pending=[];flushPromise=null;constructor(e){this.send=e}enqueue(e,r){this.pending.push({filePath:e,entries:r})}async flush(){this.flushPromise&&await this.flushPromise;let e=this.pending.splice(0);e.length!==0&&(this.flushPromise=this.doFlush(e),await this.flushPromise,this.flushPromise=null)}async doFlush(e){let r=new Map;for(let n of e){let i=r.get(n.filePath);i?i.push(...n.entries):r.set(n.filePath,n.entries.slice())}for(let[n,i]of r)try{await this.send(n,i)}catch(a){Mn(`[TranscriptMirrorBatcher] flush failed for ${n}: ${a}`,{level:"error"})}}};var SNe=xte(bte);function wte(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0;return e}var kte=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ste(t){return typeof t!="string"?null:kte.test(t)?t:null}var o4=200;function $te(t){return Math.abs(wte(t)).toString(36)}function Ite(t){let e=t.replace(/[^a-zA-Z0-9]/g,"-");return e.length<=o4?e:`${e.slice(0,o4)}-${$te(t)}`}var $Ne=Buffer.from('{"type":"attribution-snapshot"'),INe=Buffer.from('{"type":"system"'),Ete=10,ENe=Buffer.from([Ete]);function zte(){return"prod"}var Ote="user:inference",xD="user:profile",jte="org:create_api_key",Nte=[jte,xD],Rte=[xD,Ote,"user:sessions:claude_code","user:mcp_servers","user:file_upload"],zNe=Array.from(new Set([...Nte,...Rte])),s4={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.com/cai/oauth/authorize",CLAUDE_AI_ORIGIN:"https://claude.ai",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"},Cte=void 0;function Ate(){let t=process.env.CLAUDE_LOCAL_OAUTH_API_BASE?.replace(/\/$/,"")??"http://localhost:8000",e=process.env.CLAUDE_LOCAL_OAUTH_APPS_BASE?.replace(/\/$/,"")??"http://localhost:4000",r=process.env.CLAUDE_LOCAL_OAUTH_CONSOLE_BASE?.replace(/\/$/,"")??"http://localhost:3000";return{BASE_API_URL:t,CONSOLE_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${e}/oauth/authorize`,CLAUDE_AI_ORIGIN:e,TOKEN_URL:`${t}/v1/oauth/token`,API_KEY_URL:`${t}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${t}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${r}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${r}/oauth/code/callback`,CLIENT_ID:"22422756-60c9-4084-8eb7-27705fd5cf9a",OAUTH_FILE_SUFFIX:"-local-oauth",MCP_PROXY_URL:"http://localhost:8205",MCP_PROXY_PATH:"/v1/toolbox/shttp/mcp/{server_id}"}}var Ute=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];function Dte(){let t=(()=>{switch(zte()){case"local":return Ate();case"staging":return Cte??s4;case"prod":return s4}})(),e=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(e){let n=e.replace(/\/$/,"");if(!Ute.includes(n))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");t={...t,BASE_API_URL:n,CONSOLE_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_ORIGIN:n,TOKEN_URL:`${n}/v1/oauth/token`,API_KEY_URL:`${n}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${n}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${n}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let r=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;return r&&(t={...t,CLIENT_ID:r}),t}var Mte="-credentials";function qte(t=""){let e=L$(),r=process.env.CLAUDE_CONFIG_DIR?`-${Pte("sha256").update(e).digest("hex").substring(0,8)}`:"";return`Claude Code${Dte().OAUTH_FILE_SUFFIX}${t}${r}`}function Zte(){try{return process.env.USER||Tte().username}catch{return"claude-code-user"}}var wt;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw Error()}t.assertNever=r,t.arrayToEnum=i=>{let a={};for(let o of i)a[o]=o;return a},t.getValidEnumValues=i=>{let a=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(let s of a)o[s]=i[s];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},t.find=(i,a)=>{for(let o of i)if(a(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(wt||(wt={}));var c4;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(c4||(c4={}));var me=wt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),to=t=>{switch(typeof t){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(t)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(t)?me.array:t===null?me.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?me.promise:typeof Map<"u"&&t instanceof Map?me.map:typeof Set<"u"&&t instanceof Set?me.set:typeof Date<"u"&&t instanceof Date?me.date:me.object;default:return me.unknown}},J=wt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ni=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){let u=o.path[c];c!==o.path.length-1?s[u]=s[u]||{_errors:[]}:(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))),s=s[u],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let a=i.path[0];r[a]=r[a]||[],r[a].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};ni.create=t=>new ni(t);var Lte=(t,e)=>{let r;switch(t.code){case J.invalid_type:t.received===me.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,wt.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${wt.joinValues(t.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${wt.joinValues(t.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${wt.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:r="Invalid function arguments";break;case J.invalid_return_type:r="Invalid function return type";break;case J.invalid_date:r="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:wt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case J.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case J.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case J.custom:r="Invalid input";break;case J.invalid_intersection_types:r="Intersection results could not be merged";break;case J.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=e.defaultError,wt.assertNever(t)}return{message:r}},Yd=Lte,Fte=Yd;function P$(){return Fte}var T$=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(o,{data:e,defaultError:s}).message;return{...i,path:a,message:s}};function ce(t,e){let r=P$(),n=T$({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Yd?void 0:Yd].filter(i=>!!i)});t.common.issues.push(n)}var an=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Ne;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let a=await i.key,o=await i.value;n.push({key:a,value:o})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ne;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}},Ne=Object.freeze({status:"aborted"}),Fd=t=>({status:"dirty",value:t}),vn=t=>({status:"valid",value:t}),u4=t=>t.status==="aborted",l4=t=>t.status==="dirty",Zc=t=>t.status==="valid",zg=t=>typeof Promise<"u"&&t instanceof Promise,_e;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(_e||(_e={}));var ii=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},d4=(t,e)=>{if(Zc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new ni(t.common.issues);return this._error=r,this._error}}};function Ve(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{let{message:s}=t;return a.code==="invalid_enum_value"?{message:s??o.defaultError}:typeof o.data>"u"?{message:s??n??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:s??r??o.defaultError}},description:i}}var et=class{get description(){return this._def.description}_getType(e){return to(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:to(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new an,ctx:{common:e.parent.common,data:e.data,parsedType:to(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(zg(r))throw Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:to(e)},i=this._parseSync({data:e,path:n.path,parent:n});return d4(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:to(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return Zc(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>Zc(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:to(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(zg(i)?i:Promise.resolve(i));return d4(n,a)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let o=e(i),s=()=>a.addIssue({code:J.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Pi({schema:this,typeName:Re.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ii.create(this,this._def)}nullable(){return Sa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ao.create(this)}promise(){return is.create(this,this._def)}or(e){return Wc.create([this,e],this._def)}and(e){return Bc.create(this,e,this._def)}transform(e){return new Pi({...Ve(this._def),schema:this,typeName:Re.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Yc({...Ve(this._def),innerType:this,defaultValue:r,typeName:Re.ZodDefault})}brand(){return new Og({typeName:Re.ZodBranded,type:this,...Ve(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Jc({...Ve(this._def),innerType:this,catchValue:r,typeName:Re.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return jg.create(this,e)}readonly(){return Xc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Vte=/^c[^\s-]{8,}$/i,Wte=/^[0-9a-z]+$/,Bte=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Kte=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Hte=/^[a-z0-9_-]{21}$/i,Gte=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qte=/^[-+]?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)?)??$/,Yte=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Jte="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",s$,Xte=/^(?:(?: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])$/,ere=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,tre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,rre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nre=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ire=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wD="((\\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])))",are=new RegExp(`^${wD}$`);function kD(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function ore(t){return new RegExp(`^${kD(t)}$`)}function sre(t){let e=`${wD}T${kD(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function cre(t,e){return!!((e==="v4"||!e)&&Xte.test(t)||(e==="v6"||!e)&&tre.test(t))}function ure(t,e){if(!Gte.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function lre(t,e){return!!((e==="v4"||!e)&&ere.test(t)||(e==="v6"||!e)&&rre.test(t))}var Lc=class t extends et{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==me.string){let i=this._getOrReturnCtx(e);return ce(i,{code:J.invalid_type,expected:me.string,received:i.parsedType}),Ne}let r=new an,n;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),ce(n,{code:J.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),ce(n,{code:J.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,o=e.data.length<i.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?ce(n,{code:J.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&ce(n,{code:J.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Yte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"email",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")s$||(s$=new RegExp(Jte,"u")),s$.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"emoji",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Kte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"uuid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Hte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"nanoid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Vte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"cuid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Wte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"cuid2",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Bte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"ulid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),ce(n,{validation:"url",code:J.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,!i.regex.test(e.data)&&(n=this._getOrReturnCtx(e,n),ce(n,{validation:"regex",code:J.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),ce(n,{code:J.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),ce(n,{code:J.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),ce(n,{code:J.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?sre(i).test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{code:J.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?are.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{code:J.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?ore(i).test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{code:J.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Qte.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"duration",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?cre(e.data,i.version)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"ip",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?ure(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"jwt",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?lre(e.data,i.version)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"cidr",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?nre.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"base64",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?ire.test(e.data)||(n=this._getOrReturnCtx(e,n),ce(n,{validation:"base64url",code:J.invalid_string,message:i.message}),r.dirty()):wt.assertNever(i);return{status:r.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:J.invalid_string,..._e.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._e.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._e.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._e.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._e.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._e.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._e.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._e.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._e.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._e.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._e.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._e.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._e.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._e.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,..._e.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,..._e.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",..._e.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,..._e.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,..._e.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,..._e.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,..._e.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,..._e.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,..._e.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,..._e.errToObj(r)})}nonempty(e){return this.min(1,_e.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Lc.create=t=>new Lc({checks:[],typeName:Re.ZodString,coerce:t?.coerce??!1,...Ve(t)});function dre(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(t.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return a%o/10**i}var Jd=class t extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==me.number){let i=this._getOrReturnCtx(e);return ce(i,{code:J.invalid_type,expected:me.number,received:i.parsedType}),Ne}let r,n=new an;for(let i of this._def.checks)i.kind==="int"?wt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ce(r,{code:J.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ce(r,{code:J.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ce(r,{code:J.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?dre(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),ce(r,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ce(r,{code:J.not_finite,message:i.message}),n.dirty()):wt.assertNever(i);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,_e.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_e.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_e.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_e.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_e.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:_e.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&wt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Jd.create=t=>new Jd({checks:[],typeName:Re.ZodNumber,coerce:t?.coerce||!1,...Ve(t)});var Xd=class t extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==me.bigint)return this._getInvalidInput(e);let r,n=new an;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ce(r,{code:J.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ce(r,{code:J.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ce(r,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):wt.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.bigint,received:r.parsedType}),Ne}gte(e,r){return this.setLimit("min",e,!0,_e.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_e.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_e.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_e.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Xd.create=t=>new Xd({checks:[],typeName:Re.ZodBigInt,coerce:t?.coerce??!1,...Ve(t)});var ep=class extends et{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==me.boolean){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.boolean,received:r.parsedType}),Ne}return vn(e.data)}};ep.create=t=>new ep({typeName:Re.ZodBoolean,coerce:t?.coerce||!1,...Ve(t)});var tp=class t extends et{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==me.date){let i=this._getOrReturnCtx(e);return ce(i,{code:J.invalid_type,expected:me.date,received:i.parsedType}),Ne}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return ce(i,{code:J.invalid_date}),Ne}let r=new an,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),ce(n,{code:J.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),ce(n,{code:J.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):wt.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:_e.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:_e.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};tp.create=t=>new tp({checks:[],coerce:t?.coerce||!1,typeName:Re.ZodDate,...Ve(t)});var rp=class extends et{_parse(e){if(this._getType(e)!==me.symbol){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.symbol,received:r.parsedType}),Ne}return vn(e.data)}};rp.create=t=>new rp({typeName:Re.ZodSymbol,...Ve(t)});var Fc=class extends et{_parse(e){if(this._getType(e)!==me.undefined){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.undefined,received:r.parsedType}),Ne}return vn(e.data)}};Fc.create=t=>new Fc({typeName:Re.ZodUndefined,...Ve(t)});var Vc=class extends et{_parse(e){if(this._getType(e)!==me.null){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.null,received:r.parsedType}),Ne}return vn(e.data)}};Vc.create=t=>new Vc({typeName:Re.ZodNull,...Ve(t)});var np=class extends et{constructor(){super(...arguments),this._any=!0}_parse(e){return vn(e.data)}};np.create=t=>new np({typeName:Re.ZodAny,...Ve(t)});var no=class extends et{constructor(){super(...arguments),this._unknown=!0}_parse(e){return vn(e.data)}};no.create=t=>new no({typeName:Re.ZodUnknown,...Ve(t)});var Hi=class extends et{_parse(e){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.never,received:r.parsedType}),Ne}};Hi.create=t=>new Hi({typeName:Re.ZodNever,...Ve(t)});var ip=class extends et{_parse(e){if(this._getType(e)!==me.undefined){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.void,received:r.parsedType}),Ne}return vn(e.data)}};ip.create=t=>new ip({typeName:Re.ZodVoid,...Ve(t)});var ao=class t extends et{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==me.array)return ce(r,{code:J.invalid_type,expected:me.array,received:r.parsedType}),Ne;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(ce(r,{code:o?J.too_big:J.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(ce(r,{code:J.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(ce(r,{code:J.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new ii(r,o,r.path,s)))).then(o=>an.mergeArray(n,o));let a=[...r.data].map((o,s)=>i.type._parseSync(new ii(r,o,r.path,s)));return an.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:_e.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:_e.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:_e.toString(r)}})}nonempty(e){return this.min(1,e)}};ao.create=(t,e)=>new ao({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Re.ZodArray,...Ve(e)});function Nc(t){if(t instanceof Fn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Ii.create(Nc(n))}return new Fn({...t._def,shape:()=>e})}else return t instanceof ao?new ao({...t._def,type:Nc(t.element)}):t instanceof Ii?Ii.create(Nc(t.unwrap())):t instanceof Sa?Sa.create(Nc(t.unwrap())):t instanceof ka?ka.create(t.items.map(e=>Nc(e))):t}var Fn=class t extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=wt.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==me.object){let c=this._getOrReturnCtx(e);return ce(c,{code:J.invalid_type,expected:me.object,received:c.parsedType}),Ne}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Hi&&this._def.unknownKeys==="strip"))for(let c in n.data)a.includes(c)||o.push(c);let s=[];for(let c of a){let u=i[c],l=n.data[c];s.push({key:{status:"valid",value:c},value:u._parse(new ii(n,l,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Hi){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of o)s.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")o.length>0&&(ce(n,{code:J.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of o){let l=n.data[u];s.push({key:{status:"valid",value:u},value:c._parse(new ii(n,l,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of s){let l=await u.key,d=await u.value;c.push({key:l,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>an.mergeObjectSync(r,c)):an.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(e){return _e.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:_e.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Re.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of wt.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of wt.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Nc(this)}partial(e){let r={};for(let n of wt.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of wt.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ii;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return SD(wt.objectKeys(this.shape))}};Fn.create=(t,e)=>new Fn({shape:()=>t,unknownKeys:"strip",catchall:Hi.create(),typeName:Re.ZodObject,...Ve(e)});Fn.strictCreate=(t,e)=>new Fn({shape:()=>t,unknownKeys:"strict",catchall:Hi.create(),typeName:Re.ZodObject,...Ve(e)});Fn.lazycreate=(t,e)=>new Fn({shape:t,unknownKeys:"strip",catchall:Hi.create(),typeName:Re.ZodObject,...Ve(e)});var Wc=class extends et{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(s=>new ni(s.ctx.common.issues));return ce(r,{code:J.invalid_union,unionErrors:o}),Ne}if(r.common.async)return Promise.all(n.map(async a=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!a&&(a={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(c=>new ni(c));return ce(r,{code:J.invalid_union,unionErrors:s}),Ne}}get options(){return this._def.options}};Wc.create=(t,e)=>new Wc({options:t,typeName:Re.ZodUnion,...Ve(e)});var ba=t=>t instanceof Kc?ba(t.schema):t instanceof Pi?ba(t.innerType()):t instanceof Hc?[t.value]:t instanceof Gc?t.options:t instanceof Qc?wt.objectValues(t.enum):t instanceof Yc?ba(t._def.innerType):t instanceof Fc?[void 0]:t instanceof Vc?[null]:t instanceof Ii?[void 0,...ba(t.unwrap())]:t instanceof Sa?[null,...ba(t.unwrap())]:t instanceof Og||t instanceof Xc?ba(t.unwrap()):t instanceof Jc?ba(t._def.innerType):[],z$=class t extends et{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==me.object)return ce(r,{code:J.invalid_type,expected:me.object,received:r.parsedType}),Ne;let n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(ce(r,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ne)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let a of r){let o=ba(a.shape[e]);if(!o.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of o){if(i.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,a)}}return new t({typeName:Re.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ve(n)})}};function O$(t,e){let r=to(t),n=to(e);if(t===e)return{valid:!0,data:t};if(r===me.object&&n===me.object){let i=wt.objectKeys(e),a=wt.objectKeys(t).filter(s=>i.indexOf(s)!==-1),o={...t,...e};for(let s of a){let c=O$(t[s],e[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(r===me.array&&n===me.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let a=0;a<t.length;a++){let o=t[a],s=e[a],c=O$(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===me.date&&n===me.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Bc=class extends et{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(a,o)=>{if(u4(a)||u4(o))return Ne;let s=O$(a.value,o.value);return s.valid?((l4(a)||l4(o))&&r.dirty(),{status:r.value,value:s.data}):(ce(n,{code:J.invalid_intersection_types}),Ne)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Bc.create=(t,e,r)=>new Bc({left:t,right:e,typeName:Re.ZodIntersection,...Ve(r)});var ka=class t extends et{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==me.array)return ce(n,{code:J.invalid_type,expected:me.array,received:n.parsedType}),Ne;if(n.data.length<this._def.items.length)return ce(n,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ne;!this._def.rest&&n.data.length>this._def.items.length&&(ce(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((a,o)=>{let s=this._def.items[o]||this._def.rest;return s?s._parse(new ii(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>an.mergeArray(r,a)):an.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};ka.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ka({items:t,typeName:Re.ZodTuple,rest:null,...Ve(e)})};var j$=class t extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==me.object)return ce(n,{code:J.invalid_type,expected:me.object,received:n.parsedType}),Ne;let i=[],a=this._def.keyType,o=this._def.valueType;for(let s in n.data)i.push({key:a._parse(new ii(n,s,n.path,s)),value:o._parse(new ii(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?an.mergeObjectAsync(r,i):an.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof et?new t({keyType:e,valueType:r,typeName:Re.ZodRecord,...Ve(n)}):new t({keyType:Lc.create(),valueType:e,typeName:Re.ZodRecord,...Ve(r)})}},ap=class extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==me.map)return ce(n,{code:J.invalid_type,expected:me.map,received:n.parsedType}),Ne;let i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new ii(n,s,n.path,[u,"key"])),value:a._parse(new ii(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Ne;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of o){let{key:u,value:l}=c;if(u.status==="aborted"||l.status==="aborted")return Ne;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};ap.create=(t,e,r)=>new ap({valueType:e,keyType:t,typeName:Re.ZodMap,...Ve(r)});var op=class t extends et{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==me.set)return ce(n,{code:J.invalid_type,expected:me.set,received:n.parsedType}),Ne;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(ce(n,{code:J.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(ce(n,{code:J.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let a=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Ne;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((c,u)=>a._parse(new ii(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:_e.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:_e.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};op.create=(t,e)=>new op({valueType:t,minSize:null,maxSize:null,typeName:Re.ZodSet,...Ve(e)});var N$=class t extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==me.function)return ce(r,{code:J.invalid_type,expected:me.function,received:r.parsedType}),Ne;function n(s,c){return T$({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,P$(),Yd].filter(u=>!!u),issueData:{code:J.invalid_arguments,argumentsError:c}})}function i(s,c){return T$({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,P$(),Yd].filter(u=>!!u),issueData:{code:J.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof is){let s=this;return vn(async function(...c){let u=new ni([]),l=await s._def.args.parseAsync(c,a).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await s._def.returns._def.type.parseAsync(d,a).catch(f=>{throw u.addIssue(i(d,f)),u})})}else{let s=this;return vn(function(...c){let u=s._def.args.safeParse(c,a);if(!u.success)throw new ni([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=s._def.returns.safeParse(l,a);if(!d.success)throw new ni([i(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:ka.create(e).rest(no.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||ka.create([]).rest(no.create()),returns:r||no.create(),typeName:Re.ZodFunction,...Ve(n)})}},Kc=class extends et{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Kc.create=(t,e)=>new Kc({getter:t,typeName:Re.ZodLazy,...Ve(e)});var Hc=class extends et{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return ce(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),Ne}return{status:"valid",value:e.data}}get value(){return this._def.value}};Hc.create=(t,e)=>new Hc({value:t,typeName:Re.ZodLiteral,...Ve(e)});function SD(t,e){return new Gc({values:t,typeName:Re.ZodEnum,...Ve(e)})}var Gc=class t extends et{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return ce(r,{expected:wt.joinValues(n),received:r.parsedType,code:J.invalid_type}),Ne}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return ce(r,{received:r.data,code:J.invalid_enum_value,options:n}),Ne}return vn(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Gc.create=SD;var Qc=class extends et{_parse(e){let r=wt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==me.string&&n.parsedType!==me.number){let i=wt.objectValues(r);return ce(n,{expected:wt.joinValues(i),received:n.parsedType,code:J.invalid_type}),Ne}if(this._cache||(this._cache=new Set(wt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=wt.objectValues(r);return ce(n,{received:n.data,code:J.invalid_enum_value,options:i}),Ne}return vn(e.data)}get enum(){return this._def.values}};Qc.create=(t,e)=>new Qc({values:t,typeName:Re.ZodNativeEnum,...Ve(e)});var is=class extends et{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==me.promise&&r.common.async===!1)return ce(r,{code:J.invalid_type,expected:me.promise,received:r.parsedType}),Ne;let n=r.parsedType===me.promise?r.data:Promise.resolve(r.data);return vn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};is.create=(t,e)=>new is({type:t,typeName:Re.ZodPromise,...Ve(e)});var Pi=class extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:o=>{ce(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return Ne;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Ne:c.status==="dirty"||r.value==="dirty"?Fd(c.value):c});{if(r.value==="aborted")return Ne;let s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?Ne:s.status==="dirty"||r.value==="dirty"?Fd(s.value):s}}if(i.type==="refinement"){let o=s=>{let c=i.refinement(s,a);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ne:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Ne:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Zc(o))return Ne;let s=i.transform(o.value,a);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Zc(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):Ne);wt.assertNever(i)}};Pi.create=(t,e,r)=>new Pi({schema:t,typeName:Re.ZodEffects,effect:e,...Ve(r)});Pi.createWithPreprocess=(t,e,r)=>new Pi({schema:e,effect:{type:"preprocess",transform:t},typeName:Re.ZodEffects,...Ve(r)});var Ii=class extends et{_parse(e){return this._getType(e)===me.undefined?vn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ii.create=(t,e)=>new Ii({innerType:t,typeName:Re.ZodOptional,...Ve(e)});var Sa=class extends et{_parse(e){return this._getType(e)===me.null?vn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Sa.create=(t,e)=>new Sa({innerType:t,typeName:Re.ZodNullable,...Ve(e)});var Yc=class extends et{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===me.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Yc.create=(t,e)=>new Yc({innerType:t,typeName:Re.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});var Jc=class extends et{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return zg(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ni(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ni(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Jc.create=(t,e)=>new Jc({innerType:t,typeName:Re.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});var sp=class extends et{_parse(e){if(this._getType(e)!==me.nan){let r=this._getOrReturnCtx(e);return ce(r,{code:J.invalid_type,expected:me.nan,received:r.parsedType}),Ne}return{status:"valid",value:e.data}}};sp.create=t=>new sp({typeName:Re.ZodNaN,...Ve(t)});var Og=class extends et{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},jg=class t extends et{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ne:i.status==="dirty"?(r.dirty(),Fd(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ne:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Re.ZodPipeline})}},Xc=class extends et{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Zc(i)&&(i.value=Object.freeze(i.value)),i);return zg(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Xc.create=(t,e)=>new Xc({innerType:t,typeName:Re.ZodReadonly,...Ve(e)});var ONe={object:Fn.lazycreate},Re;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Re||(Re={}));var jNe=Lc.create,NNe=Jd.create,RNe=sp.create,CNe=Xd.create,ANe=ep.create,UNe=tp.create,DNe=rp.create,MNe=Fc.create,qNe=Vc.create,ZNe=np.create,LNe=no.create,FNe=Hi.create,VNe=ip.create,WNe=ao.create,BNe=Fn.create,KNe=Fn.strictCreate,HNe=Wc.create,GNe=z$.create,QNe=Bc.create,YNe=ka.create,JNe=j$.create,XNe=ap.create,eRe=op.create,tRe=N$.create,rRe=Kc.create,nRe=Hc.create,iRe=Gc.create,aRe=Qc.create,oRe=is.create,sRe=Pi.create,cRe=Ii.create,uRe=Sa.create,lRe=Pi.createWithPreprocess,dRe=jg.create,$D={};ss($D,{version:()=>AM,util:()=>pt,treeifyError:()=>UD,toJSONSchema:()=>T6,toDotPath:()=>DD,safeParseAsync:()=>sI,safeParse:()=>aI,registry:()=>wI,regexes:()=>cI,prettifyError:()=>MD,parseAsync:()=>Ag,parse:()=>Cg,locales:()=>xI,isValidJWT:()=>o2,isValidBase64URL:()=>n2,isValidBase64:()=>pI,globalRegistry:()=>Xo,globalConfig:()=>Ng,function:()=>P6,formatError:()=>tI,flattenError:()=>eI,config:()=>on,clone:()=>Oi,_xid:()=>RI,_void:()=>f6,_uuidv7:()=>EI,_uuidv6:()=>II,_uuidv4:()=>$I,_uuid:()=>SI,_url:()=>PI,_uppercase:()=>KI,_unknown:()=>qg,_union:()=>pie,_undefined:()=>u6,_ulid:()=>NI,_uint64:()=>s6,_uint32:()=>t6,_tuple:()=>w6,_trim:()=>XI,_transform:()=>xie,_toUpperCase:()=>tE,_toLowerCase:()=>eE,_templateLiteral:()=>zie,_symbol:()=>c6,_success:()=>Iie,_stringbool:()=>I6,_stringFormat:()=>E6,_string:()=>L2,_startsWith:()=>GI,_size:()=>VI,_set:()=>vie,_safeParseAsync:()=>oI,_safeParse:()=>iI,_regex:()=>WI,_refine:()=>$6,_record:()=>hie,_readonly:()=>Tie,_property:()=>x6,_promise:()=>jie,_positive:()=>v6,_pipe:()=>Pie,_parseAsync:()=>nI,_parse:()=>rI,_overwrite:()=>ls,_optional:()=>wie,_number:()=>G2,_nullable:()=>kie,_null:()=>l6,_normalize:()=>JI,_nonpositive:()=>_6,_nonoptional:()=>$ie,_nonnegative:()=>b6,_never:()=>p6,_negative:()=>y6,_nativeEnum:()=>_ie,_nanoid:()=>zI,_nan:()=>g6,_multipleOf:()=>dp,_minSize:()=>pp,_minLength:()=>tu,_min:()=>qn,_mime:()=>YI,_maxSize:()=>nv,_maxLength:()=>iv,_max:()=>Ei,_map:()=>gie,_lte:()=>Ei,_lt:()=>as,_lowercase:()=>BI,_literal:()=>bie,_length:()=>av,_lazy:()=>Oie,_ksuid:()=>CI,_jwt:()=>FI,_isoTime:()=>K2,_isoDuration:()=>H2,_isoDateTime:()=>W2,_isoDate:()=>B2,_ipv6:()=>UI,_ipv4:()=>AI,_intersection:()=>mie,_int64:()=>o6,_int32:()=>e6,_int:()=>Y2,_includes:()=>HI,_guid:()=>Mg,_gte:()=>qn,_gt:()=>os,_float64:()=>X2,_float32:()=>J2,_file:()=>k6,_enum:()=>yie,_endsWith:()=>QI,_emoji:()=>TI,_email:()=>kI,_e164:()=>LI,_discriminatedUnion:()=>fie,_default:()=>Sie,_date:()=>m6,_custom:()=>S6,_cuid2:()=>jI,_cuid:()=>OI,_coercedString:()=>F2,_coercedNumber:()=>Q2,_coercedDate:()=>h6,_coercedBoolean:()=>n6,_coercedBigint:()=>a6,_cidrv6:()=>MI,_cidrv4:()=>DI,_catch:()=>Eie,_boolean:()=>r6,_bigint:()=>i6,_base64url:()=>ZI,_base64:()=>qI,_array:()=>rE,_any:()=>d6,TimePrecision:()=>V2,NEVER:()=>ID,JSONSchemaGenerator:()=>fp,JSONSchema:()=>Nie,Doc:()=>Ug,$output:()=>q2,$input:()=>Z2,$constructor:()=>A,$brand:()=>ED,$ZodXID:()=>BM,$ZodVoid:()=>g2,$ZodUnknown:()=>Dg,$ZodUnion:()=>yI,$ZodUndefined:()=>p2,$ZodUUID:()=>DM,$ZodURL:()=>qM,$ZodULID:()=>WM,$ZodType:()=>Ze,$ZodTuple:()=>rv,$ZodTransform:()=>_I,$ZodTemplateLiteral:()=>C2,$ZodSymbol:()=>d2,$ZodSuccess:()=>O2,$ZodStringFormat:()=>Wt,$ZodString:()=>vp,$ZodSet:()=>w2,$ZodRegistry:()=>lp,$ZodRecord:()=>b2,$ZodRealError:()=>hp,$ZodReadonly:()=>R2,$ZodPromise:()=>A2,$ZodPrefault:()=>T2,$ZodPipe:()=>bI,$ZodOptional:()=>I2,$ZodObject:()=>vI,$ZodNumberFormat:()=>u2,$ZodNumber:()=>fI,$ZodNullable:()=>E2,$ZodNull:()=>f2,$ZodNonOptional:()=>z2,$ZodNever:()=>h2,$ZodNanoID:()=>LM,$ZodNaN:()=>N2,$ZodMap:()=>x2,$ZodLiteral:()=>S2,$ZodLazy:()=>U2,$ZodKSUID:()=>KM,$ZodJWT:()=>s2,$ZodIntersection:()=>_2,$ZodISOTime:()=>QM,$ZodISODuration:()=>YM,$ZodISODateTime:()=>HM,$ZodISODate:()=>GM,$ZodIPv6:()=>XM,$ZodIPv4:()=>JM,$ZodGUID:()=>UM,$ZodFunction:()=>Zg,$ZodFile:()=>$2,$ZodError:()=>X$,$ZodEnum:()=>k2,$ZodEmoji:()=>ZM,$ZodEmail:()=>MM,$ZodE164:()=>a2,$ZodDiscriminatedUnion:()=>y2,$ZodDefault:()=>P2,$ZodDate:()=>v2,$ZodCustomStringFormat:()=>c2,$ZodCustom:()=>D2,$ZodCheckUpperCase:()=>TM,$ZodCheckStringFormat:()=>gp,$ZodCheckStartsWith:()=>OM,$ZodCheckSizeEquals:()=>kM,$ZodCheckRegex:()=>EM,$ZodCheckProperty:()=>NM,$ZodCheckOverwrite:()=>CM,$ZodCheckNumberFormat:()=>_M,$ZodCheckMultipleOf:()=>yM,$ZodCheckMinSize:()=>wM,$ZodCheckMinLength:()=>$M,$ZodCheckMimeType:()=>RM,$ZodCheckMaxSize:()=>xM,$ZodCheckMaxLength:()=>SM,$ZodCheckLowerCase:()=>PM,$ZodCheckLessThan:()=>lI,$ZodCheckLengthEquals:()=>IM,$ZodCheckIncludes:()=>zM,$ZodCheckGreaterThan:()=>dI,$ZodCheckEndsWith:()=>jM,$ZodCheckBigIntFormat:()=>bM,$ZodCheck:()=>sr,$ZodCatch:()=>j2,$ZodCUID2:()=>VM,$ZodCUID:()=>FM,$ZodCIDRv6:()=>t2,$ZodCIDRv4:()=>e2,$ZodBoolean:()=>mI,$ZodBigIntFormat:()=>l2,$ZodBigInt:()=>hI,$ZodBase64URL:()=>i2,$ZodBase64:()=>r2,$ZodAsyncError:()=>oo,$ZodArray:()=>gI,$ZodAny:()=>m2});var ID=Object.freeze({status:"aborted"});function A(t,e,r){function n(s,c){var u;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(u=s._zod).traits??(u.traits=new Set),s._zod.traits.add(t),e(s,c);for(let l in o.prototype)l in s||Object.defineProperty(s,l,{value:o.prototype[l].bind(s)});s._zod.constr=o,s._zod.def=c}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:t});function o(s){var c;let u=r?.Parent?new a:this;n(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}var ED=Symbol("zod_brand"),oo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ng={};function on(t){return t&&Object.assign(Ng,t),Ng}var pt={};ss(pt,{unwrapMessage:()=>Vd,stringifyPrimitive:()=>He,required:()=>Pre,randomString:()=>_re,propertyKeyTypes:()=>Rg,promiseAllObject:()=>yre,primitiveTypes:()=>OD,prefixIssues:()=>ri,pick:()=>kre,partial:()=>Ere,optionalKeys:()=>jD,omit:()=>Sre,numKeys:()=>bre,nullish:()=>cs,normalizeParams:()=>te,merge:()=>Ire,jsonStringifyReplacer:()=>PD,joinValues:()=>ne,issue:()=>CD,isPlainObject:()=>up,isObject:()=>cp,getSizableOrigin:()=>ev,getParsedType:()=>xre,getLengthableOrigin:()=>tv,getEnumValues:()=>Q$,getElementAtPath:()=>vre,floatSafeRemainder:()=>TD,finalizeIssue:()=>Ti,extend:()=>$re,escapeRegex:()=>us,esc:()=>Rc,defineLazy:()=>zt,createTransparentProxy:()=>wre,clone:()=>Oi,cleanRegex:()=>Xg,cleanEnum:()=>Tre,captureStackTrace:()=>J$,cached:()=>Jg,assignProp:()=>Y$,assertNotEqual:()=>fre,assertNever:()=>hre,assertIs:()=>mre,assertEqual:()=>pre,assert:()=>gre,allowsEval:()=>zD,aborted:()=>Dc,NUMBER_FORMAT_RANGES:()=>ND,Class:()=>R$,BIGINT_FORMAT_RANGES:()=>RD});function pre(t){return t}function fre(t){return t}function mre(t){}function hre(t){throw Error()}function gre(t){}function Q$(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,n])=>e.indexOf(+r)===-1).map(([r,n])=>n)}function ne(t,e="|"){return t.map(r=>He(r)).join(e)}function PD(t,e){return typeof e=="bigint"?e.toString():e}function Jg(t){return{get value(){{let e=t();return Object.defineProperty(this,"value",{value:e}),e}throw Error("cached value already set")}}}function cs(t){return t==null}function Xg(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function TD(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(t.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return a%o/10**i}function zt(t,e,r){Object.defineProperty(t,e,{get(){{let n=r();return t[e]=n,n}throw Error("cached value already set")},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function Y$(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function vre(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function yre(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<e.length;a++)i[e[a]]=n[a];return i})}function _re(t=10){let e="";for(let r=0;r<t;r++)e+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return e}function Rc(t){return JSON.stringify(t)}var J$=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function cp(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var zD=Jg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function up(t){if(cp(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(cp(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function bre(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var xre=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw Error(`Unknown data type: ${e}`)}},Rg=new Set(["string","number","symbol"]),OD=new Set(["string","number","bigint","boolean","symbol","undefined"]);function us(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oi(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function te(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function wre(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,a){return e??(e=t()),Reflect.set(e,n,i,a)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function He(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function jD(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var ND={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]},RD={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kre(t,e){let r={},n=t._zod.def;for(let i in e){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);e[i]&&(r[i]=n.shape[i])}return Oi(t,{...t._zod.def,shape:r,checks:[]})}function Sre(t,e){let r={...t._zod.def.shape},n=t._zod.def;for(let i in e){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);e[i]&&delete r[i]}return Oi(t,{...t._zod.def,shape:r,checks:[]})}function $re(t,e){if(!up(e))throw Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return Y$(this,"shape",n),n},checks:[]};return Oi(t,r)}function Ire(t,e){return Oi(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return Y$(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function Ere(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in n))throw Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=t?new t({type:"optional",innerType:n[a]}):n[a])}else for(let a in n)i[a]=t?new t({type:"optional",innerType:n[a]}):n[a];return Oi(e,{...e._zod.def,shape:i,checks:[]})}function Pre(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new t({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new t({type:"nonoptional",innerType:n[a]});return Oi(e,{...e._zod.def,shape:i,checks:[]})}function Dc(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function ri(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Vd(t){return typeof t=="string"?t:t?.message}function Ti(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Vd(t.inst?._zod.def?.error?.(t))??Vd(e?.error?.(t))??Vd(r.customError?.(t))??Vd(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,!e?.reportInput&&delete n.input,n}function ev(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function tv(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function CD(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Tre(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var R$=class{constructor(...e){}},AD=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,PD,2)},enumerable:!0})},X$=A("$ZodError",AD),hp=A("$ZodError",AD,{Parent:Error});function eI(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function tI(t,e){let r=e||function(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){let u=o.path[c];c!==o.path.length-1?s[u]=s[u]||{_errors:[]}:(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))),s=s[u],c++}}};return i(t),n}function UD(t,e){let r=e||function(a){return a.message},n={errors:[]},i=(a,o=[])=>{var s,c;for(let u of a.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{let l=[...o,...u.path];if(l.length===0){n.errors.push(r(u));continue}let d=n,f=0;for(;f<l.length;){let p=l[f],m=f===l.length-1;typeof p=="string"?(d.properties??(d.properties={}),(s=d.properties)[p]??(s[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(c=d.items)[p]??(c[p]={errors:[]}),d=d.items[p]),m&&d.errors.push(r(u)),f++}}};return i(t),n}function DD(t){let e=[];for(let r of t)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function MD(t){let e=[],r=[...t.issues].sort((n,i)=>n.path.length-i.path.length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${DD(n.path)}`);return e.join(`
|
|
204
|
+
`)}var rI=t=>(e,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new oo;if(o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>Ti(c,a,on())));throw J$(s,i?.callee),s}return o.value},Cg=rI(hp),nI=t=>async(e,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>Ti(c,a,on())));throw J$(s,i?.callee),s}return o.value},Ag=nI(hp),iI=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new oo;return a.issues.length?{success:!1,error:new(t??X$)(a.issues.map(o=>Ti(o,i,on())))}:{success:!0,data:a.value}},aI=iI(hp),oI=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(o=>Ti(o,i,on())))}:{success:!0,data:a.value}},sI=oI(hp),cI={};ss(cI,{xid:()=>FD,uuid7:()=>Nre,uuid6:()=>jre,uuid4:()=>Ore,uuid:()=>eu,uppercase:()=>gM,unicodeEmail:()=>Are,undefined:()=>mM,ulid:()=>LD,time:()=>oM,string:()=>cM,rfc5322Email:()=>Cre,number:()=>dM,null:()=>fM,nanoid:()=>WD,lowercase:()=>hM,ksuid:()=>VD,ipv6:()=>YD,ipv4:()=>QD,integer:()=>lM,html5Email:()=>Rre,hostname:()=>tM,guid:()=>KD,extendedDuration:()=>zre,emoji:()=>GD,email:()=>HD,e164:()=>rM,duration:()=>BD,domain:()=>Mre,datetime:()=>sM,date:()=>iM,cuid2:()=>ZD,cuid:()=>qD,cidrv6:()=>XD,cidrv4:()=>JD,browserEmail:()=>Ure,boolean:()=>pM,bigint:()=>uM,base64url:()=>uI,base64:()=>eM,_emoji:()=>Dre});var qD=/^[cC][^\s-]{8,}$/,ZD=/^[0-9a-z]+$/,LD=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,FD=/^[0-9a-vA-V]{20}$/,VD=/^[A-Za-z0-9]{27}$/,WD=/^[a-zA-Z0-9_-]{21}$/,BD=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zre=/^[-+]?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)?)??$/,KD=/^([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})$/,eu=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Ore=eu(4),jre=eu(6),Nre=eu(7),HD=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Rre=/^[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])?)*$/,Cre=/^(([^<>()\[\]\\.,;:\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,}))$/,Are=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Ure=/^[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])?)*$/,Dre="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function GD(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}var QD=/^(?:(?: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])$/,YD=/^(([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})$/,JD=/^((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])$/,XD=/^(([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])$/,eM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uI=/^[A-Za-z0-9_-]*$/,tM=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Mre=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,rM=/^\+(?:[0-9]){6,14}[0-9]$/,nM="(?:(?:\\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])))",iM=new RegExp(`^${nM}$`);function aM(t){return typeof t.precision=="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function oM(t){return new RegExp(`^${aM(t)}$`)}function sM(t){let e=aM({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${nM}T(?:${n})$`)}var cM=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},uM=/^\d+n?$/,lM=/^\d+$/,dM=/^-?\d+(?:\.\d+)?/i,pM=/true|false/i,fM=/null/i,mM=/undefined/i,hM=/^[^A-Z]*$/,gM=/^[^a-z]*$/,sr=A("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),vM={number:"number",bigint:"bigint",object:"date"},lI=A("$ZodCheckLessThan",(t,e)=>{sr.init(t,e);let r=vM[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),dI=A("$ZodCheckGreaterThan",(t,e)=>{sr.init(t,e);let r=vM[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),yM=A("$ZodCheckMultipleOf",(t,e)=>{sr.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):TD(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),_M=A("$ZodCheckNumberFormat",(t,e)=>{sr.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,a]=ND[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=i,s.maximum=a,r&&(s.pattern=lM)}),t._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:n,format:e.format,code:"invalid_type",input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inst:t})}}),bM=A("$ZodCheckBigIntFormat",(t,e)=>{sr.init(t,e);let[r,n]=RD[e.format];t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,a.minimum=r,a.maximum=n}),t._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inst:t})}}),xM=A("$ZodCheckMaxSize",(t,e)=>{sr.init(t,e),t._zod.when=r=>{let n=r.value;return!cs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let n=r.value;n.size<=e.maximum||r.issues.push({origin:ev(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),wM=A("$ZodCheckMinSize",(t,e)=>{sr.init(t,e),t._zod.when=r=>{let n=r.value;return!cs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let n=r.value;n.size>=e.minimum||r.issues.push({origin:ev(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),kM=A("$ZodCheckSizeEquals",(t,e)=>{sr.init(t,e),t._zod.when=r=>{let n=r.value;return!cs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=r=>{let n=r.value,i=n.size;if(i===e.size)return;let a=i>e.size;r.issues.push({origin:ev(n),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),SM=A("$ZodCheckMaxLength",(t,e)=>{sr.init(t,e),t._zod.when=r=>{let n=r.value;return!cs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let n=r.value;if(n.length<=e.maximum)return;let i=tv(n);r.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),$M=A("$ZodCheckMinLength",(t,e)=>{sr.init(t,e),t._zod.when=r=>{let n=r.value;return!cs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let n=r.value;if(n.length>=e.minimum)return;let i=tv(n);r.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),IM=A("$ZodCheckLengthEquals",(t,e)=>{sr.init(t,e),t._zod.when=r=>{let n=r.value;return!cs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=r=>{let n=r.value,i=n.length;if(i===e.length)return;let a=tv(n),o=i>e.length;r.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),gp=A("$ZodCheckStringFormat",(t,e)=>{var r,n;sr.init(t,e),t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),EM=A("$ZodCheckRegex",(t,e)=>{gp.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),PM=A("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=hM),gp.init(t,e)}),TM=A("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=gM),gp.init(t,e)}),zM=A("$ZodCheckIncludes",(t,e)=>{sr.init(t,e);let r=us(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),OM=A("$ZodCheckStartsWith",(t,e)=>{sr.init(t,e);let r=new RegExp(`^${us(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),jM=A("$ZodCheckEndsWith",(t,e)=>{sr.init(t,e);let r=new RegExp(`.*${us(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function p4(t,e,r){t.issues.length&&e.issues.push(...ri(r,t.issues))}var NM=A("$ZodCheckProperty",(t,e)=>{sr.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>p4(i,r,e.property));p4(n,r,e.property)}}),RM=A("$ZodCheckMimeType",(t,e)=>{sr.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t})}}),CM=A("$ZodCheckOverwrite",(t,e)=>{sr.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),Ug=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
205
|
+
`).filter(a=>a),n=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(`
|
|
206
|
+
`))}},AM={major:4,minor:0,patch:0},Ze=A("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=AM;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let a of i._zod.onattach)a(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(a,o,s)=>{let c=Dc(a),u;for(let l of o){if(l._zod.when){if(!l._zod.when(a))continue}else if(c)continue;let d=a.issues.length,f=l._zod.check(a);if(f instanceof Promise&&s?.async===!1)throw new oo;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,a.issues.length!==d&&(c||(c=Dc(a,d)))});else{if(a.issues.length===d)continue;c||(c=Dc(a,d))}}return u?u.then(()=>a):a};t._zod.run=(a,o)=>{let s=t._zod.parse(a,o);if(s instanceof Promise){if(o.async===!1)throw new oo;return s.then(c=>i(c,n,o))}return i(s,n,o)}}t["~standard"]={validate:i=>{try{let a=aI(t,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return sI(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}}),vp=A("$ZodString",(t,e)=>{Ze.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??cM(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),Wt=A("$ZodStringFormat",(t,e)=>{gp.init(t,e),vp.init(t,e)}),UM=A("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=KD),Wt.init(t,e)}),DM=A("$ZodUUID",(t,e)=>{if(e.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=eu(r))}else e.pattern??(e.pattern=eu());Wt.init(t,e)}),MM=A("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=HD),Wt.init(t,e)}),qM=A("$ZodURL",(t,e)=>{Wt.init(t,e),t._zod.check=r=>{try{let n=r.value,i=new URL(n),a=i.href;e.hostname&&(e.hostname.lastIndex=0,!e.hostname.test(i.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:tM.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,!e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!n.endsWith("/")&&a.endsWith("/")?r.value=a.slice(0,-1):r.value=a;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),ZM=A("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=GD()),Wt.init(t,e)}),LM=A("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=WD),Wt.init(t,e)}),FM=A("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=qD),Wt.init(t,e)}),VM=A("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=ZD),Wt.init(t,e)}),WM=A("$ZodULID",(t,e)=>{e.pattern??(e.pattern=LD),Wt.init(t,e)}),BM=A("$ZodXID",(t,e)=>{e.pattern??(e.pattern=FD),Wt.init(t,e)}),KM=A("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=VD),Wt.init(t,e)}),HM=A("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=sM(e)),Wt.init(t,e)}),GM=A("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=iM),Wt.init(t,e)}),QM=A("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=oM(e)),Wt.init(t,e)}),YM=A("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=BD),Wt.init(t,e)}),JM=A("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=QD),Wt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),XM=A("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=YD),Wt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),e2=A("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=JD),Wt.init(t,e)}),t2=A("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=XD),Wt.init(t,e),t._zod.check=r=>{let[n,i]=r.value.split("/");try{if(!i)throw Error();let a=Number(i);if(`${a}`!==i||a<0||a>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function pI(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var r2=A("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=eM),Wt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{pI(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function n2(t){if(!uI.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return pI(r)}var i2=A("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=uI),Wt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{n2(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),a2=A("$ZodE164",(t,e)=>{e.pattern??(e.pattern=rM),Wt.init(t,e)});function o2(t,e=null){try{let r=t.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||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var s2=A("$ZodJWT",(t,e)=>{Wt.init(t,e),t._zod.check=r=>{o2(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),c2=A("$ZodCustomStringFormat",(t,e)=>{Wt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),fI=A("$ZodNumber",(t,e)=>{Ze.init(t,e),t._zod.pattern=t._zod.bag.pattern??dM,t._zod.parse=(r,n)=>{if(e.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 a=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:t,...a?{received:a}:{}}),r}}),u2=A("$ZodNumber",(t,e)=>{_M.init(t,e),fI.init(t,e)}),mI=A("$ZodBoolean",(t,e)=>{Ze.init(t,e),t._zod.pattern=pM,t._zod.parse=(r,n)=>{if(e.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:t}),r}}),hI=A("$ZodBigInt",(t,e)=>{Ze.init(t,e),t._zod.pattern=uM,t._zod.parse=(r,n)=>{if(e.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:t}),r}}),l2=A("$ZodBigInt",(t,e)=>{bM.init(t,e),hI.init(t,e)}),d2=A("$ZodSymbol",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),p2=A("$ZodUndefined",(t,e)=>{Ze.init(t,e),t._zod.pattern=mM,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),f2=A("$ZodNull",(t,e)=>{Ze.init(t,e),t._zod.pattern=fM,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),m2=A("$ZodAny",(t,e)=>{Ze.init(t,e),t._zod.parse=r=>r}),Dg=A("$ZodUnknown",(t,e)=>{Ze.init(t,e),t._zod.parse=r=>r}),h2=A("$ZodNever",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),g2=A("$ZodVoid",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),v2=A("$ZodDate",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:t}),r}});function f4(t,e,r){t.issues.length&&e.issues.push(...ri(r,t.issues)),e.value[r]=t.value}var gI=A("$ZodArray",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let a=[];for(let o=0;o<i.length;o++){let s=i[o],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?a.push(c.then(u=>f4(u,r,o))):f4(c,r,o)}return a.length?Promise.all(a).then(()=>r):r}});function Gh(t,e,r){t.issues.length&&e.issues.push(...ri(r,t.issues)),e.value[r]=t.value}function m4(t,e,r,n){t.issues.length?n[r]===void 0?r in n?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...ri(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}var vI=A("$ZodObject",(t,e)=>{Ze.init(t,e);let r=Jg(()=>{let l=Object.keys(e.shape);for(let f of l)if(!(e.shape[f]instanceof Ze))throw Error(`Invalid element at key "${f}": expected a Zod schema`);let d=jD(e.shape);return{shape:e.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});zt(t._zod,"propValues",()=>{let l=e.shape,d={};for(let f in l){let p=l[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(let m of p.values)d[f].add(m)}}return d});let n=l=>{let d=new Ug(["shape","payload","ctx"]),f=r.value,p=h=>{let b=Rc(h);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),v=0;for(let h of f.keys)m[h]=`key_${v++}`;d.write("const newResult = {}");for(let h of f.keys)if(f.optionalKeys.has(h)){let b=m[h];d.write(`const ${b} = ${p(h)};`);let y=Rc(h);d.write(`
|
|
207
|
+
if (${b}.issues.length) {
|
|
208
|
+
if (input[${y}] === undefined) {
|
|
209
|
+
if (${y} in input) {
|
|
210
|
+
newResult[${y}] = undefined;
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
payload.issues = payload.issues.concat(
|
|
214
|
+
${b}.issues.map((iss) => ({
|
|
215
|
+
...iss,
|
|
216
|
+
path: iss.path ? [${y}, ...iss.path] : [${y}],
|
|
217
|
+
}))
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
} else if (${b}.value === undefined) {
|
|
221
|
+
if (${y} in input) newResult[${y}] = undefined;
|
|
222
|
+
} else {
|
|
223
|
+
newResult[${y}] = ${b}.value;
|
|
224
|
+
}
|
|
225
|
+
`)}else{let b=m[h];d.write(`const ${b} = ${p(h)};`),d.write(`
|
|
226
|
+
if (${b}.issues.length) payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
227
|
+
...iss,
|
|
228
|
+
path: iss.path ? [${Rc(h)}, ...iss.path] : [${Rc(h)}]
|
|
229
|
+
})));`),d.write(`newResult[${Rc(h)}] = ${b}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let g=d.compile();return(h,b)=>g(l,h,b)},i,a=cp,o=!Ng.jitless,s=o&&zD.value,c=e.catchall,u;t._zod.parse=(l,d)=>{u??(u=r.value);let f=l.value;if(!a(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),l;let p=[];if(o&&s&&d?.async===!1&&d.jitless!==!0)i||(i=n(e.shape)),l=i(l,d);else{l.value={};let b=u.shape;for(let y of u.keys){let _=b[y],x=_._zod.run({value:f[y],issues:[]},d),w=_._zod.optin==="optional"&&_._zod.optout==="optional";x instanceof Promise?p.push(x.then(k=>w?m4(k,l,y,f):Gh(k,l,y))):w?m4(x,l,y,f):Gh(x,l,y)}}if(!c)return p.length?Promise.all(p).then(()=>l):l;let m=[],v=u.keySet,g=c._zod,h=g.def.type;for(let b of Object.keys(f)){if(v.has(b))continue;if(h==="never"){m.push(b);continue}let y=g.run({value:f[b],issues:[]},d);y instanceof Promise?p.push(y.then(_=>Gh(_,l,b))):Gh(y,l,b)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:f,inst:t}),p.length?Promise.all(p).then(()=>l):l}});function h4(t,e,r,n){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(i=>i.issues.map(a=>Ti(a,n,on())))}),e}var yI=A("$ZodUnion",(t,e)=>{Ze.init(t,e),zt(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),zt(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),zt(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),zt(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>Xg(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let i=!1,a=[];for(let o of e.options){let s=o._zod.run({value:r.value,issues:[]},n);if(s instanceof Promise)a.push(s),i=!0;else{if(s.issues.length===0)return s;a.push(s)}}return i?Promise.all(a).then(o=>h4(o,r,t,n)):h4(a,r,t,n)}}),y2=A("$ZodDiscriminatedUnion",(t,e)=>{yI.init(t,e);let r=t._zod.parse;zt(t._zod,"propValues",()=>{let i={};for(let a of e.options){let o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[s,c]of Object.entries(o)){i[s]||(i[s]=new Set);for(let u of c)i[s].add(u)}}return i});let n=Jg(()=>{let i=e.options,a=new Map;for(let o of i){let s=o._zod.propValues[e.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let c of s){if(a.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,o)}}return a});t._zod.parse=(i,a)=>{let o=i.value;if(!cp(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;let s=n.value.get(o?.[e.discriminator]);return s?s._zod.run(i,a):e.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:o,path:[e.discriminator],inst:t}),i)}}),_2=A("$ZodIntersection",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,a=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([s,c])=>g4(r,s,c)):g4(r,a,o)}});function C$(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(up(t)&&up(e)){let r=Object.keys(e),n=Object.keys(t).filter(a=>r.indexOf(a)!==-1),i={...t,...e};for(let a of n){let o=C$(t[a],e[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],a=e[n],o=C$(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function g4(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),Dc(t))return t;let n=C$(e.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return t.value=n.data,t}var rv=A("$ZodTuple",(t,e)=>{Ze.init(t,e);let r=e.items,n=r.length-[...r].reverse().findIndex(i=>i._zod.optin!=="optional");t._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[];if(!e.rest){let u=o.length>r.length,l=o.length<n-1;if(u||l)return i.issues.push({input:o,inst:t,origin:"array",...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),i}let c=-1;for(let u of r){if(c++,c>=o.length&&c>=n)continue;let l=u._zod.run({value:o[c],issues:[]},a);l instanceof Promise?s.push(l.then(d=>Qh(d,i,c))):Qh(l,i,c)}if(e.rest){let u=o.slice(r.length);for(let l of u){c++;let d=e.rest._zod.run({value:l,issues:[]},a);d instanceof Promise?s.push(d.then(f=>Qh(f,i,c))):Qh(d,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});function Qh(t,e,r){t.issues.length&&e.issues.push(...ri(r,t.issues)),e.value[r]=t.value}var b2=A("$ZodRecord",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!up(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let a=[];if(e.keyType._zod.values){let o=e.keyType._zod.values;r.value={};for(let c of o)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=e.valueType._zod.run({value:i[c],issues:[]},n);u instanceof Promise?a.push(u.then(l=>{l.issues.length&&r.issues.push(...ri(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...ri(c,u.issues)),r.value[c]=u.value)}let s;for(let c in i)o.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:s})}else{r.value={};for(let o of Reflect.ownKeys(i)){if(o==="__proto__")continue;let s=e.keyType._zod.run({value:o,issues:[]},n);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:s.issues.map(u=>Ti(u,n,on())),input:o,path:[o],inst:t}),r.value[s.value]=s.value;continue}let c=e.valueType._zod.run({value:i[o],issues:[]},n);c instanceof Promise?a.push(c.then(u=>{u.issues.length&&r.issues.push(...ri(o,u.issues)),r.value[s.value]=u.value})):(c.issues.length&&r.issues.push(...ri(o,c.issues)),r.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>r):r}}),x2=A("$ZodMap",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let a=[];r.value=new Map;for(let[o,s]of i){let c=e.keyType._zod.run({value:o,issues:[]},n),u=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([l,d])=>{v4(l,d,r,o,i,t,n)})):v4(c,u,r,o,i,t,n)}return a.length?Promise.all(a).then(()=>r):r}});function v4(t,e,r,n,i,a,o){t.issues.length&&(Rg.has(typeof n)?r.issues.push(...ri(n,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:a,issues:t.issues.map(s=>Ti(s,o,on()))})),e.issues.length&&(Rg.has(typeof n)?r.issues.push(...ri(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:e.issues.map(s=>Ti(s,o,on()))})),r.value.set(t.value,e.value)}var w2=A("$ZodSet",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let a=[];r.value=new Set;for(let o of i){let s=e.valueType._zod.run({value:o,issues:[]},n);s instanceof Promise?a.push(s.then(c=>y4(c,r))):y4(s,r)}return a.length?Promise.all(a).then(()=>r):r}});function y4(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var k2=A("$ZodEnum",(t,e)=>{Ze.init(t,e);let r=Q$(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>Rg.has(typeof n)).map(n=>typeof n=="string"?us(n):n.toString()).join("|")})$`),t._zod.parse=(n,i)=>{let a=n.value;return t._zod.values.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:t}),n}}),S2=A("$ZodLiteral",(t,e)=>{Ze.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?us(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,n)=>{let i=r.value;return t._zod.values.has(i)||r.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),r}}),$2=A("$ZodFile",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),_I=A("$ZodTransform",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r));if(i instanceof Promise)throw new oo;return r.value=i,r}}),I2=A("$ZodOptional",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",t._zod.optout="optional",zt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),zt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Xg(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,n):r.value===void 0?r:e.innerType._zod.run(r,n)}),E2=A("$ZodNullable",(t,e)=>{Ze.init(t,e),zt(t._zod,"optin",()=>e.innerType._zod.optin),zt(t._zod,"optout",()=>e.innerType._zod.optout),zt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Xg(r.source)}|null)$`):void 0}),zt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),P2=A("$ZodDefault",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",zt(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>_4(a,e)):_4(i,e)}});function _4(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var T2=A("$ZodPrefault",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",zt(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),z2=A("$ZodNonOptional",(t,e)=>{Ze.init(t,e),zt(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>b4(a,t)):b4(i,t)}});function b4(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var O2=A("$ZodSuccess",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),j2=A("$ZodCatch",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",zt(t._zod,"optout",()=>e.innerType._zod.optout),zt(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.value,a.issues.length&&(r.value=e.catchValue({...r,error:{issues:a.issues.map(o=>Ti(o,n,on()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>Ti(a,n,on()))},input:r.value}),r.issues=[]),r)}}),N2=A("$ZodNaN",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),bI=A("$ZodPipe",(t,e)=>{Ze.init(t,e),zt(t._zod,"values",()=>e.in._zod.values),zt(t._zod,"optin",()=>e.in._zod.optin),zt(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,n)=>{let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(a=>x4(a,e,n)):x4(i,e,n)}});function x4(t,e,r){return Dc(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}var R2=A("$ZodReadonly",(t,e)=>{Ze.init(t,e),zt(t._zod,"propValues",()=>e.innerType._zod.propValues),zt(t._zod,"values",()=>e.innerType._zod.values),zt(t._zod,"optin",()=>e.innerType._zod.optin),zt(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(w4):w4(i)}});function w4(t){return t.value=Object.freeze(t.value),t}var C2=A("$ZodTemplateLiteral",(t,e)=>{Ze.init(t,e);let r=[];for(let n of e.parts)if(n instanceof Ze){if(!n._zod.pattern)throw 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 Error(`Invalid template literal part: ${n._zod.traits}`);let a=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,o))}else if(n===null||OD.has(typeof n))r.push(us(`${n}`));else throw Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"template_literal",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),n)}),A2=A("$ZodPromise",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),U2=A("$ZodLazy",(t,e)=>{Ze.init(t,e),zt(t._zod,"innerType",()=>e.getter()),zt(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),zt(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),zt(t._zod,"optin",()=>t._zod.innerType._zod.optin),zt(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),D2=A("$ZodCustom",(t,e)=>{sr.init(t,e),Ze.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(a=>k4(a,r,n,t));k4(i,r,n,t)}});function k4(t,e,r,n){if(!t){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),e.issues.push(CD(i))}}var xI={};ss(xI,{zhTW:()=>die,zhCN:()=>uie,vi:()=>sie,ur:()=>aie,ua:()=>nie,tr:()=>tie,th:()=>Jne,ta:()=>Qne,sv:()=>Hne,sl:()=>Bne,ru:()=>Vne,pt:()=>Lne,ps:()=>Dne,pl:()=>qne,ota:()=>Ane,no:()=>Rne,nl:()=>jne,ms:()=>zne,mk:()=>Pne,ko:()=>Ine,kh:()=>Sne,ja:()=>wne,it:()=>bne,id:()=>yne,hu:()=>gne,he:()=>mne,frCA:()=>pne,fr:()=>lne,fi:()=>cne,fa:()=>one,es:()=>ine,eo:()=>rne,en:()=>M2,de:()=>Yre,cs:()=>Gre,ca:()=>Kre,be:()=>Wre,az:()=>Fre,ar:()=>Zre});var qre=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return i=>{switch(i.code){case"invalid_type":return`\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 ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(i.input)}`;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 ${He(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: ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(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"} ${a} ${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"} ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(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 ${a} ${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 ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`${n[a.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":""}: ${ne(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 Zre(){return{localeError:qre()}}var Lre=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i.expected}, daxil olan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${He(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[a.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":""}: ${ne(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 Fre(){return{localeError:Lre()}}function S4(t,e,r,n){let i=Math.abs(t),a=i%10,o=i%100;return o>=11&&o<=19?n:a===1?e:a>=2&&a<=4?r:n}var Vre=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0456\u045E";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(i.input)}`;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 ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),c=S4(s,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} ${a}${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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),c=S4(s,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} ${a}${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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[a.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"}: ${ne(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 Wre(){return{localeError:Vre()}}var Bre=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${i.expected}, s'ha rebut ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${He(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${ne(i.values," o ")}`;case"too_big":{let a=i.inclusive?"com a m\xE0xim":"menys de",o=e(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${a} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"com a m\xEDnim":"m\xE9s de",o=e(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${a} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${n[a.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":""}: ${ne(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 Kre(){return{localeError:Bre()}}var Hre=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i.expected}, obdr\u017Eeno ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${He(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${a.includes}"`:a.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${n[a.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: ${ne(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 Gre(){return{localeError:Hre()}}var Qre=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${i.expected}, erhalten ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${He(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ist`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ist`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${n[a.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"}: ${ne(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 Yre(){return{localeError:Qre()}}var Jre=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Xre=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(n){return t[n]??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"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${Jre(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${He(n.values[0])}`:`Invalid option: expected one of ${ne(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${ne(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function M2(){return{localeError:Xre()}}var ene=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},tne=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??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"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${n.expected}, ricevi\u011Dis ${ene(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${He(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${ne(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${ne(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function rne(){return{localeError:tne()}}var nne=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(i))return"arreglo";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype)return i.constructor.name}}return a},n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${i.expected}, recibido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${He(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Demasiado grande: se esperaba que ${i.origin??"valor"} tuviera ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i.origin??"valor"} fuera ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Demasiado peque\xF1o: se esperaba que ${i.origin} tuviera ${a}${i.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${i.origin} fuera ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${n[a.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":""}: ${ne(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i.origin}`;default:return"Entrada inv\xE1lida"}}};function ine(){return{localeError:nne()}}var ane=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(i))return"\u0622\u0631\u0627\u06CC\u0647";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return i=>{switch(i.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(i.input)} \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 ${He(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 ${ne(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${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 ${a}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[a.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: ${ne(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 one(){return{localeError:ane()}}var sne=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${He(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${a}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${a}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${a.includes}"`:a.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${a.pattern}`:`Virheellinen ${n[a.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"}: ${ne(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 cne(){return{localeError:sne()}}var une=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return i=>{switch(i.code){case"invalid_type":return`Entr\xE9e invalide : ${i.expected} attendu, ${r(i.input)} re\xE7u`;case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${He(i.values[0])} attendu`:`Option invalide : une valeur parmi ${ne(i.values,"|")} attendue`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Trop grand : ${i.origin??"valeur"} doit ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Trop petit : ${i.origin} doit ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${a.pattern}`:`${n[a.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":""} : ${ne(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 lne(){return{localeError:une()}}var dne=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return i=>{switch(i.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${i.expected}, re\xE7u ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${He(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u2264":"<",o=e(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${a}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u2265":">",o=e(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${a.pattern}`:`${n[a.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":""} : ${ne(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 pne(){return{localeError:dne()}}var fne=()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return i=>{switch(i.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${i.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${He(i.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.maximum.toString()} ${o.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.minimum.toString()} ${o.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${a.prefix}"`:a.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${a.suffix}"`:a.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${a.includes}"`:a.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${a.pattern}`:`${n[a.format]??i.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}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 ${i.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${i.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${i.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${ne(i.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i.origin}`;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.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function mne(){return{localeError:fne()}}var hne=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(i))return"t\xF6mb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i.expected}, a kapott \xE9rt\xE9k ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${He(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${i.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${a}${i.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[a.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":""}: ${ne(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 gne(){return{localeError:hne()}}var vne=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${He(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${n[a.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":""}: ${ne(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 yne(){return{localeError:vne()}}var _ne=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${He(i.values[0])}`:`Opzione non valida: atteso uno tra ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${a}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${a}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${n[a.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"}: ${ne(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 bne(){return{localeError:_ne()}}var xne=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(i))return"\u914D\u5217";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return i=>{switch(i.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(i.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${He(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${ne(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=e(i.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o.unit??"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=e(i.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[a.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":""}: ${ne(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 wne(){return{localeError:xne()}}var kne=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(i))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(i===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return i=>{switch(i.code){case"invalid_type":return`\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 ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(i.input)}`;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 ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(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"} ${a} ${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"} ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[a.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 ${ne(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 Sne(){return{localeError:kne()}}var $ne=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return i=>{switch(i.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(i.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${He(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${ne(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=a==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),c=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${a}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${a}${o}`}case"too_small":{let a=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=a==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),c=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${a}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${a}${o}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:a.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${a.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[a.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: ${ne(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 Ine(){return{localeError:$ne()}}var Ene=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(i))return"\u043D\u0438\u0437\u0430";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return i=>{switch(i.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(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 ${a}${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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(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 ${a}${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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`Invalid ${n[a.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"}: ${ne(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 Pne(){return{localeError:Ene()}}var Tne=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${He(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${n[a.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ne(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 zne(){return{localeError:Tne()}}var One=()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${He(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} ${o.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} is`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} ${o.unit} bevat`:`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} is`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${n[a.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":""}: ${ne(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 jne(){return{localeError:One()}}var Nne=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${He(i.values[0])}`:`Ugyldig valg: forventet en av ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${n[a.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"}: ${ne(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 Rne(){return{localeError:Nne()}}var Cne=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`F\xE2sit giren: umulan ${i.expected}, al\u0131nan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${He(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=i;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[a.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":""}: ${ne(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 Ane(){return{localeError:Cne()}}var Une=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(i))return"\u0627\u0631\u06D0";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return i=>{switch(i.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(i.input)} \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 ${He(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${ne(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${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 ${a}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[a.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"}: ${ne(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 Dne(){return{localeError:Une()}}var Mne=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return i=>{switch(i.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i.expected}, otrzymano ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${He(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${a.prefix}"`:a.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${a.suffix}"`:a.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${a.includes}"`:a.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${a.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[a.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":""}: ${ne(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 qne(){return{localeError:Mne()}}var Zne=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${i.expected}, recebido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${He(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${a}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${a.prefix}"`:a.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inv\xE1lido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${a.pattern}`:`${n[a.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":""}: ${ne(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 Lne(){return{localeError:Zne()}}function $4(t,e,r,n){let i=Math.abs(t),a=i%10,o=i%100;return o>=11&&o<=19?n:a===1?e:a>=2&&a<=4?r:n}var Fne=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(i.input)}`;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 ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),c=$4(s,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 ${a}${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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),c=$4(s,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 ${a}${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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[a.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":""}: ${ne(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 Vne(){return{localeError:Fne()}}var Wne=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${i.expected}, prejeto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${He(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${a}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${a}${i.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${n[a.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"}: ${ne(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 Bne(){return{localeError:Wne()}}var Kne=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${i.expected}, fick ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${He(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${a.includes}"`:a.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${a.pattern}"`:`Ogiltig(t) ${n[a.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"}: ${ne(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 Hne(){return{localeError:Kne()}}var Gne=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(i))return"\u0B85\u0BA3\u0BBF";if(i===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`\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 ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(i.input)}`;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 ${He(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 ${ne(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(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"} ${a}${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"} ${a}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=i.inclusive?">=":">",o=e(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} ${a}${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} ${a}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[a.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":""}: ${ne(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 Qne(){return{localeError:Gne()}}var Yne=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(i))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(i===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return i=>{switch(i.code){case"invalid_type":return`\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 ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(i.input)}`;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 ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=e(i.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${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${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=e(i.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${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${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.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 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[a.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: ${ne(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 Jne(){return{localeError:Yne()}}var Xne=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},eie=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(n){return t[n]??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"};return n=>{switch(n.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${n.expected}, al\u0131nan ${Xne(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${He(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${ne(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${ne(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function tie(){return{localeError:eie()}}var rie=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0438\u0432";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return i=>{switch(i.code){case"invalid_type":return`\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 ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(i.input)}`;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 ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(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} ${a}${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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(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} ${a}${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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[a.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":""}: ${ne(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 nie(){return{localeError:rie()}}var iie=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(i))return"\u0622\u0631\u06D2";if(i===null)return"\u0646\u0644";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return i=>{switch(i.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(i.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${He(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${ne(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${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 ${a}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${a}${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 ${a}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[a.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":""}: ${ne(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 aie(){return{localeError:iie()}}var oie=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(i))return"m\u1EA3ng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return i=>{switch(i.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${He(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 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${n[a.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: ${ne(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 sie(){return{localeError:oie()}}var cie=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(i))return"\u6570\u7EC4";if(i===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return i=>{switch(i.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${He(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${n[a.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): ${ne(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 uie(){return{localeError:cie()}}var lie=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(i){return t[i]??null}let r=i=>{let a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return i=>{switch(i.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i.expected}\uFF0C\u4F46\u6536\u5230 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${He(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${ne(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${n[a.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${ne(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 die(){return{localeError:lie()}}var q2=Symbol("ZodOutput"),Z2=Symbol("ZodInput"),lp=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}remove(e){return this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function wI(){return new lp}var Xo=wI();function L2(t,e){return new t({type:"string",...te(e)})}function F2(t,e){return new t({type:"string",coerce:!0,...te(e)})}function kI(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...te(e)})}function Mg(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...te(e)})}function SI(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...te(e)})}function $I(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(e)})}function II(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(e)})}function EI(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(e)})}function PI(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...te(e)})}function TI(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...te(e)})}function zI(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(e)})}function OI(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...te(e)})}function jI(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(e)})}function NI(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...te(e)})}function RI(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...te(e)})}function CI(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(e)})}function AI(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(e)})}function UI(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(e)})}function DI(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(e)})}function MI(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(e)})}function qI(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...te(e)})}function ZI(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...te(e)})}function LI(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...te(e)})}function FI(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...te(e)})}var V2={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function W2(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(e)})}function B2(t,e){return new t({type:"string",format:"date",check:"string_format",...te(e)})}function K2(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...te(e)})}function H2(t,e){return new t({type:"string",format:"duration",check:"string_format",...te(e)})}function G2(t,e){return new t({type:"number",checks:[],...te(e)})}function Q2(t,e){return new t({type:"number",coerce:!0,checks:[],...te(e)})}function Y2(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...te(e)})}function J2(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...te(e)})}function X2(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...te(e)})}function e6(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...te(e)})}function t6(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...te(e)})}function r6(t,e){return new t({type:"boolean",...te(e)})}function n6(t,e){return new t({type:"boolean",coerce:!0,...te(e)})}function i6(t,e){return new t({type:"bigint",...te(e)})}function a6(t,e){return new t({type:"bigint",coerce:!0,...te(e)})}function o6(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...te(e)})}function s6(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...te(e)})}function c6(t,e){return new t({type:"symbol",...te(e)})}function u6(t,e){return new t({type:"undefined",...te(e)})}function l6(t,e){return new t({type:"null",...te(e)})}function d6(t){return new t({type:"any"})}function qg(t){return new t({type:"unknown"})}function p6(t,e){return new t({type:"never",...te(e)})}function f6(t,e){return new t({type:"void",...te(e)})}function m6(t,e){return new t({type:"date",...te(e)})}function h6(t,e){return new t({type:"date",coerce:!0,...te(e)})}function g6(t,e){return new t({type:"nan",...te(e)})}function as(t,e){return new lI({check:"less_than",...te(e),value:t,inclusive:!1})}function Ei(t,e){return new lI({check:"less_than",...te(e),value:t,inclusive:!0})}function os(t,e){return new dI({check:"greater_than",...te(e),value:t,inclusive:!1})}function qn(t,e){return new dI({check:"greater_than",...te(e),value:t,inclusive:!0})}function v6(t){return os(0,t)}function y6(t){return as(0,t)}function _6(t){return Ei(0,t)}function b6(t){return qn(0,t)}function dp(t,e){return new yM({check:"multiple_of",...te(e),value:t})}function nv(t,e){return new xM({check:"max_size",...te(e),maximum:t})}function pp(t,e){return new wM({check:"min_size",...te(e),minimum:t})}function VI(t,e){return new kM({check:"size_equals",...te(e),size:t})}function iv(t,e){return new SM({check:"max_length",...te(e),maximum:t})}function tu(t,e){return new $M({check:"min_length",...te(e),minimum:t})}function av(t,e){return new IM({check:"length_equals",...te(e),length:t})}function WI(t,e){return new EM({check:"string_format",format:"regex",...te(e),pattern:t})}function BI(t){return new PM({check:"string_format",format:"lowercase",...te(t)})}function KI(t){return new TM({check:"string_format",format:"uppercase",...te(t)})}function HI(t,e){return new zM({check:"string_format",format:"includes",...te(e),includes:t})}function GI(t,e){return new OM({check:"string_format",format:"starts_with",...te(e),prefix:t})}function QI(t,e){return new jM({check:"string_format",format:"ends_with",...te(e),suffix:t})}function x6(t,e,r){return new NM({check:"property",property:t,schema:e,...te(r)})}function YI(t,e){return new RM({check:"mime_type",mime:t,...te(e)})}function ls(t){return new CM({check:"overwrite",tx:t})}function JI(t){return ls(e=>e.normalize(t))}function XI(){return ls(t=>t.trim())}function eE(){return ls(t=>t.toLowerCase())}function tE(){return ls(t=>t.toUpperCase())}function rE(t,e,r){return new t({type:"array",element:e,...te(r)})}function pie(t,e,r){return new t({type:"union",options:e,...te(r)})}function fie(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...te(n)})}function mie(t,e,r){return new t({type:"intersection",left:e,right:r})}function w6(t,e,r,n){let i=r instanceof Ze;return new t({type:"tuple",items:e,rest:i?r:null,...te(i?n:r)})}function hie(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...te(n)})}function gie(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...te(n)})}function vie(t,e,r){return new t({type:"set",valueType:e,...te(r)})}function yie(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:n,...te(r)})}function _ie(t,e,r){return new t({type:"enum",entries:e,...te(r)})}function bie(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...te(r)})}function k6(t,e){return new t({type:"file",...te(e)})}function xie(t,e){return new t({type:"transform",transform:e})}function wie(t,e){return new t({type:"optional",innerType:e})}function kie(t,e){return new t({type:"nullable",innerType:e})}function Sie(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function $ie(t,e,r){return new t({type:"nonoptional",innerType:e,...te(r)})}function Iie(t,e){return new t({type:"success",innerType:e})}function Eie(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Pie(t,e,r){return new t({type:"pipe",in:e,out:r})}function Tie(t,e){return new t({type:"readonly",innerType:e})}function zie(t,e,r){return new t({type:"template_literal",parts:e,...te(r)})}function Oie(t,e){return new t({type:"lazy",getter:e})}function jie(t,e){return new t({type:"promise",innerType:e})}function S6(t,e,r){let n=te(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function $6(t,e,r){return new t({type:"custom",check:"custom",fn:e,...te(r)})}function I6(t,e){let r=te(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let a=new Set(n),o=new Set(i),s=t.Pipe??bI,c=t.Boolean??mI,u=t.String??vp,l=new(t.Transform??_I)({type:"transform",transform:(f,p)=>{let m=f;return r.case!=="sensitive"&&(m=m.toLowerCase()),a.has(m)?!0:o.has(m)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:p.value,inst:l}),{})},error:r.error}),d=new s({type:"pipe",in:new u({type:"string",error:r.error}),out:l,error:r.error});return new s({type:"pipe",in:d,out:new c({type:"boolean",error:r.error}),error:r.error})}function E6(t,e,r,n={}){let i=te(n),a={...te(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:o=>r.test(o),...i};return r instanceof RegExp&&(a.pattern=r),new t(a)}var Zg=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw Error("implement() must be called with a function");let r=(...n)=>{let i=this._def.input?Cg(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let a=e(...i);return this._def.output?Cg(this._def.output,a,void 0,{callee:r}):a};return r}implementAsync(e){if(typeof e!="function")throw Error("implement() must be called with a function");let r=async(...n)=>{let i=this._def.input?await Ag(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let a=await e(...i);return this._def.output?Ag(this._def.output,a,void 0,{callee:r}):a};return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new rv({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){return new this.constructor({type:"function",input:this._def.input,output:e})}};function P6(t){return new Zg({type:"function",input:Array.isArray(t?.input)?w6(rv,t?.input):t?.input??rE(gI,qg(Dg)),output:t?.output??qg(Dg)})}var fp=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Xo,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o=this.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path},d=e._zod.parent;if(d)s.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let f=s.schema;switch(i.type){case"string":{let p=f;p.type="string";let{minimum:m,maximum:v,format:g,patterns:h,contentEncoding:b}=e._zod.bag;if(typeof m=="number"&&(p.minLength=m),typeof v=="number"&&(p.maxLength=v),g&&(p.format=a[g]??g,p.format===""&&delete p.format),b&&(p.contentEncoding=b),h&&h.size>0){let y=[...h];y.length===1?p.pattern=y[0].source:y.length>1&&(s.schema.allOf=[...y.map(_=>({...this.target==="draft-7"?{type:"string"}:{},pattern:_.source}))])}break}case"number":{let p=f,{minimum:m,maximum:v,format:g,multipleOf:h,exclusiveMaximum:b,exclusiveMinimum:y}=e._zod.bag;typeof g=="string"&&g.includes("int")?p.type="integer":p.type="number",typeof y=="number"&&(p.exclusiveMinimum=y),typeof m=="number"&&(p.minimum=m,typeof y=="number"&&(y>=m?delete p.minimum:delete p.exclusiveMinimum)),typeof b=="number"&&(p.exclusiveMaximum=b),typeof v=="number"&&(p.maximum=v,typeof b=="number"&&(b<=v?delete p.maximum:delete p.exclusiveMaximum)),typeof h=="number"&&(p.multipleOf=h);break}case"boolean":{let p=f;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema");break}case"null":{f.type="null";break}case"any":break;case"unknown":break;case"undefined":case"never":{f.not={};break}case"void":{if(this.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema");break}case"array":{let p=f,{minimum:m,maximum:v}=e._zod.bag;typeof m=="number"&&(p.minItems=m),typeof v=="number"&&(p.maxItems=v),p.type="array",p.items=this.process(i.element,{...l,path:[...l.path,"items"]});break}case"object":{let p=f;p.type="object",p.properties={};let m=i.shape;for(let h in m)p.properties[h]=this.process(m[h],{...l,path:[...l.path,"properties",h]});let v=new Set(Object.keys(m)),g=new Set([...v].filter(h=>{let b=i.shape[h]._zod;return this.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(p.required=Array.from(g)),i.catchall?._zod.def.type==="never"?p.additionalProperties=!1:i.catchall?i.catchall&&(p.additionalProperties=this.process(i.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{let p=f;p.anyOf=i.options.map((m,v)=>this.process(m,{...l,path:[...l.path,"anyOf",v]}));break}case"intersection":{let p=f,m=this.process(i.left,{...l,path:[...l.path,"allOf",0]}),v=this.process(i.right,{...l,path:[...l.path,"allOf",1]}),g=b=>"allOf"in b&&Object.keys(b).length===1,h=[...g(m)?m.allOf:[m],...g(v)?v.allOf:[v]];p.allOf=h;break}case"tuple":{let p=f;p.type="array";let m=i.items.map((h,b)=>this.process(h,{...l,path:[...l.path,"prefixItems",b]}));if(this.target==="draft-2020-12"?p.prefixItems=m:p.items=m,i.rest){let h=this.process(i.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?p.items=h:p.additionalItems=h}i.rest&&(p.items=this.process(i.rest,{...l,path:[...l.path,"items"]}));let{minimum:v,maximum:g}=e._zod.bag;typeof v=="number"&&(p.minItems=v),typeof g=="number"&&(p.maxItems=g);break}case"record":{let p=f;p.type="object",p.propertyNames=this.process(i.keyType,{...l,path:[...l.path,"propertyNames"]}),p.additionalProperties=this.process(i.valueType,{...l,path:[...l.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema");break}case"enum":{let p=f,m=Q$(i.entries);m.every(v=>typeof v=="number")&&(p.type="number"),m.every(v=>typeof v=="string")&&(p.type="string"),p.enum=m;break}case"literal":{let p=f,m=[];for(let v of i.values)if(v===void 0){if(this.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof v=="bigint"){if(this.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");m.push(Number(v))}else m.push(v);if(m.length!==0)if(m.length===1){let v=m[0];p.type=v===null?"null":typeof v,p.const=v}else m.every(v=>typeof v=="number")&&(p.type="number"),m.every(v=>typeof v=="string")&&(p.type="string"),m.every(v=>typeof v=="boolean")&&(p.type="string"),m.every(v=>v===null)&&(p.type="null"),p.enum=m;break}case"file":{let p=f,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:g,mime:h}=e._zod.bag;v!==void 0&&(m.minLength=v),g!==void 0&&(m.maxLength=g),h?h.length===1?(m.contentMediaType=h[0],Object.assign(p,m)):p.anyOf=h.map(b=>({...m,contentMediaType:b})):Object.assign(p,m);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let p=this.process(i.innerType,l);f.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,l),s.ref=i.innerType;break}case"success":{let p=f;p.type="boolean";break}case"default":{this.process(i.innerType,l),s.ref=i.innerType,f.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,l),s.ref=i.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,l),s.ref=i.innerType;let p;try{p=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}f.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let p=f,m=e._zod.pattern;if(!m)throw Error("Pattern not found in template literal");p.type="string",p.pattern=m.source;break}case"pipe":{let p=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(p,l),s.ref=p;break}case"readonly":{this.process(i.innerType,l),s.ref=i.innerType,f.readOnly=!0;break}case"promise":{this.process(i.innerType,l),s.ref=i.innerType;break}case"optional":{this.process(i.innerType,l),s.ref=i.innerType;break}case"lazy":{let p=e._zod.innerType;this.process(p,l),s.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),this.io==="input"&&vr(e)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(e).schema}emit(e,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},i=this.seen.get(e);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let a=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let m=n.external.registry.get(l[0])?.id;if(m)return{ref:n.external.uri(m)};let v=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=v,{defId:v,ref:`${n.external.uri("__shared")}#/${d}/${v}`}}if(l[1]===i)return{ref:"#"};let f=`#/${d}/`,p=l[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:f+p}},o=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:f,defId:p}=a(l);d.def={...d.schema},p&&(d.defId=p);let m=d.schema;for(let v in m)delete m[v];m.$ref=f};for(let l of this.seen.entries()){let d=l[1];if(e===l[0]){o(l);continue}if(n.external){let f=n.external.registry.get(l[0])?.id;if(e!==l[0]&&f){o(l);continue}}if(this.metadataRegistry.get(l[0])?.id){o(l);continue}if(d.cycle){if(n.cycles==="throw")throw Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
230
|
+
|
|
231
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);n.cycles==="ref"&&o(l);continue}if(d.count>1&&n.reused==="ref"){o(l);continue}}let s=(l,d)=>{let f=this.seen.get(l),p=f.def??f.schema,m={...p};if(f.ref===null)return;let v=f.ref;if(f.ref=null,v){s(v,d);let g=this.seen.get(v).schema;g.$ref&&d.target==="draft-7"?(p.allOf=p.allOf??[],p.allOf.push(g)):(Object.assign(p,g),Object.assign(p,m))}f.isParent||this.override({zodSchema:l,jsonSchema:p,path:f.path??[]})};for(let l of[...this.seen.entries()].reverse())s(l[0],{target:this.target});let c={};this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(c,i.def);let u=n.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}!n.external&&Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw Error("Error converting schema to JSON.")}}};function T6(t,e){if(t instanceof lp){let n=new fp(e),i={};for(let s of t._idmap.entries()){let[c,u]=s;n.process(u)}let a={},o={registry:t,uri:e?.uri||(s=>s),defs:i};for(let s of t._idmap.entries()){let[c,u]=s;a[c]=n.emit(u,{...e,external:o})}if(Object.keys(i).length>0){let s=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:i}}return{schemas:a}}let r=new fp(e);return r.process(t),r.emit(t,e)}function vr(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return vr(n.element,r);case"object":{for(let i in n.shape)if(vr(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(vr(i,r))return!0;return!1}case"intersection":return vr(n.left,r)||vr(n.right,r);case"tuple":{for(let i of n.items)if(vr(i,r))return!0;return!!(n.rest&&vr(n.rest,r))}case"record":return vr(n.keyType,r)||vr(n.valueType,r);case"map":return vr(n.keyType,r)||vr(n.valueType,r);case"set":return vr(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return vr(n.innerType,r);case"lazy":return vr(n.getter(),r);case"default":return vr(n.innerType,r);case"prefault":return vr(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return vr(n.in,r)||vr(n.out,r);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${n.type}`)}var Nie={},Rie=A("ZodMiniType",(t,e)=>{if(!t._zod)throw Error("Uninitialized schema in ZodMiniType.");Ze.init(t,e),t.def=e,t.parse=(r,n)=>Cg(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>aI(t,r,n),t.parseAsync=async(r,n)=>Ag(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>sI(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>Oi(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t)}),pRe=A("ZodMiniObject",(t,e)=>{vI.init(t,e),Rie.init(t,e),pt.defineLazy(t,"shape",()=>e.shape)});var Cc={};ss(Cc,{xid:()=>Hie,void:()=>hae,uuidv7:()=>Zie,uuidv6:()=>qie,uuidv4:()=>Mie,uuid:()=>Die,url:()=>Lie,uppercase:()=>KI,unknown:()=>Xt,union:()=>Zt,undefined:()=>fae,ulid:()=>Kie,uint64:()=>dae,uint32:()=>cae,tuple:()=>_ae,trim:()=>XI,treeifyError:()=>UD,transform:()=>NE,toUpperCase:()=>tE,toLowerCase:()=>eE,toJSONSchema:()=>T6,templateLiteral:()=>Pae,symbol:()=>pae,superRefine:()=>bq,success:()=>Iae,stringbool:()=>Oae,stringFormat:()=>iae,string:()=>F,strictObject:()=>yae,startsWith:()=>GI,size:()=>VI,setErrorMap:()=>Rae,set:()=>wae,safeParseAsync:()=>D6,safeParse:()=>U6,registry:()=>wI,regexes:()=>cI,regex:()=>WI,refine:()=>_q,record:()=>qt,readonly:()=>pq,property:()=>x6,promise:()=>Tae,prettifyError:()=>MD,preprocess:()=>UE,prefault:()=>aq,positive:()=>v6,pipe:()=>Vg,partialRecord:()=>bae,parseAsync:()=>A6,parse:()=>C6,overwrite:()=>ls,optional:()=>Kt,object:()=>fe,number:()=>Pt,nullish:()=>$ae,nullable:()=>Fg,null:()=>EE,normalize:()=>JI,nonpositive:()=>_6,nonoptional:()=>oq,nonnegative:()=>b6,never:()=>lv,negative:()=>y6,nativeEnum:()=>kae,nanoid:()=>Vie,nan:()=>Eae,multipleOf:()=>dp,minSize:()=>pp,minLength:()=>tu,mime:()=>YI,maxSize:()=>nv,maxLength:()=>iv,map:()=>xae,lte:()=>Ei,lt:()=>as,lowercase:()=>BI,looseObject:()=>rn,locales:()=>xI,literal:()=>we,length:()=>av,lazy:()=>hq,ksuid:()=>Gie,keyof:()=>vae,jwt:()=>nae,json:()=>jae,iso:()=>nE,ipv6:()=>Yie,ipv4:()=>Qie,intersection:()=>pv,int64:()=>lae,int32:()=>sae,int:()=>A$,instanceof:()=>zae,includes:()=>HI,guid:()=>Uie,gte:()=>qn,gt:()=>os,globalRegistry:()=>Xo,getErrorMap:()=>Cae,function:()=>P6,formatError:()=>tI,float64:()=>oae,float32:()=>aae,flattenError:()=>eI,file:()=>Sae,enum:()=>yn,endsWith:()=>QI,emoji:()=>Fie,email:()=>Aie,e164:()=>rae,discriminatedUnion:()=>zE,date:()=>gae,custom:()=>yq,cuid2:()=>Bie,cuid:()=>Wie,core:()=>$D,config:()=>on,coerce:()=>xq,clone:()=>Oi,cidrv6:()=>Xie,cidrv4:()=>Jie,check:()=>vq,catch:()=>uq,boolean:()=>yr,bigint:()=>uae,base64url:()=>tae,base64:()=>eae,array:()=>ft,any:()=>mae,_default:()=>nq,_ZodString:()=>cE,ZodXID:()=>gE,ZodVoid:()=>B6,ZodUnknown:()=>V6,ZodUnion:()=>TE,ZodUndefined:()=>Z6,ZodUUID:()=>wa,ZodURL:()=>lE,ZodULID:()=>hE,ZodType:()=>tt,ZodTuple:()=>Q6,ZodTransform:()=>jE,ZodTemplateLiteral:()=>fq,ZodSymbol:()=>q6,ZodSuccess:()=>sq,ZodStringFormat:()=>Ht,ZodString:()=>ov,ZodSet:()=>J6,ZodRecord:()=>OE,ZodRealError:()=>yp,ZodReadonly:()=>dq,ZodPromise:()=>gq,ZodPrefault:()=>iq,ZodPipe:()=>AE,ZodOptional:()=>RE,ZodObject:()=>dv,ZodNumberFormat:()=>ou,ZodNumber:()=>sv,ZodNullable:()=>tq,ZodNull:()=>L6,ZodNonOptional:()=>CE,ZodNever:()=>W6,ZodNanoID:()=>pE,ZodNaN:()=>lq,ZodMap:()=>Y6,ZodLiteral:()=>X6,ZodLazy:()=>mq,ZodKSUID:()=>vE,ZodJWT:()=>$E,ZodIssueCode:()=>Nae,ZodIntersection:()=>G6,ZodISOTime:()=>oE,ZodISODuration:()=>sE,ZodISODateTime:()=>iE,ZodISODate:()=>aE,ZodIPv6:()=>_E,ZodIPv4:()=>yE,ZodGUID:()=>Lg,ZodFile:()=>eq,ZodError:()=>Cie,ZodEnum:()=>mp,ZodEmoji:()=>dE,ZodEmail:()=>uE,ZodE164:()=>SE,ZodDiscriminatedUnion:()=>H6,ZodDefault:()=>rq,ZodDate:()=>PE,ZodCustomStringFormat:()=>M6,ZodCustom:()=>fv,ZodCatch:()=>cq,ZodCUID2:()=>mE,ZodCUID:()=>fE,ZodCIDRv6:()=>xE,ZodCIDRv4:()=>bE,ZodBoolean:()=>cv,ZodBigIntFormat:()=>IE,ZodBigInt:()=>uv,ZodBase64URL:()=>kE,ZodBase64:()=>wE,ZodArray:()=>K6,ZodAny:()=>F6,TimePrecision:()=>V2,NEVER:()=>ID,$output:()=>q2,$input:()=>Z2,$brand:()=>ED});var nE={};ss(nE,{time:()=>j6,duration:()=>N6,datetime:()=>z6,date:()=>O6,ZodISOTime:()=>oE,ZodISODuration:()=>sE,ZodISODateTime:()=>iE,ZodISODate:()=>aE});var iE=A("ZodISODateTime",(t,e)=>{HM.init(t,e),Ht.init(t,e)});function z6(t){return W2(iE,t)}var aE=A("ZodISODate",(t,e)=>{GM.init(t,e),Ht.init(t,e)});function O6(t){return B2(aE,t)}var oE=A("ZodISOTime",(t,e)=>{QM.init(t,e),Ht.init(t,e)});function j6(t){return K2(oE,t)}var sE=A("ZodISODuration",(t,e)=>{YM.init(t,e),Ht.init(t,e)});function N6(t){return H2(sE,t)}var R6=(t,e)=>{X$.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>tI(t,r)},flatten:{value:r=>eI(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},Cie=A("ZodError",R6),yp=A("ZodError",R6,{Parent:Error}),C6=rI(yp),A6=nI(yp),U6=iI(yp),D6=oI(yp),tt=A("ZodType",(t,e)=>(Ze.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>Oi(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t),t.parse=(r,n)=>C6(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>U6(t,r,n),t.parseAsync=async(r,n)=>A6(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>D6(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(_q(r,n)),t.superRefine=r=>t.check(bq(r)),t.overwrite=r=>t.check(ls(r)),t.optional=()=>Kt(t),t.nullable=()=>Fg(t),t.nullish=()=>Kt(Fg(t)),t.nonoptional=r=>oq(t,r),t.array=()=>ft(t),t.or=r=>Zt([t,r]),t.and=r=>pv(t,r),t.transform=r=>Vg(t,NE(r)),t.default=r=>nq(t,r),t.prefault=r=>aq(t,r),t.catch=r=>uq(t,r),t.pipe=r=>Vg(t,r),t.readonly=()=>pq(t),t.describe=r=>{let n=t.clone();return Xo.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return Xo.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Xo.get(t);let n=t.clone();return Xo.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),cE=A("_ZodString",(t,e)=>{vp.init(t,e),tt.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(WI(...n)),t.includes=(...n)=>t.check(HI(...n)),t.startsWith=(...n)=>t.check(GI(...n)),t.endsWith=(...n)=>t.check(QI(...n)),t.min=(...n)=>t.check(tu(...n)),t.max=(...n)=>t.check(iv(...n)),t.length=(...n)=>t.check(av(...n)),t.nonempty=(...n)=>t.check(tu(1,...n)),t.lowercase=n=>t.check(BI(n)),t.uppercase=n=>t.check(KI(n)),t.trim=()=>t.check(XI()),t.normalize=(...n)=>t.check(JI(...n)),t.toLowerCase=()=>t.check(eE()),t.toUpperCase=()=>t.check(tE())}),ov=A("ZodString",(t,e)=>{vp.init(t,e),cE.init(t,e),t.email=r=>t.check(kI(uE,r)),t.url=r=>t.check(PI(lE,r)),t.jwt=r=>t.check(FI($E,r)),t.emoji=r=>t.check(TI(dE,r)),t.guid=r=>t.check(Mg(Lg,r)),t.uuid=r=>t.check(SI(wa,r)),t.uuidv4=r=>t.check($I(wa,r)),t.uuidv6=r=>t.check(II(wa,r)),t.uuidv7=r=>t.check(EI(wa,r)),t.nanoid=r=>t.check(zI(pE,r)),t.guid=r=>t.check(Mg(Lg,r)),t.cuid=r=>t.check(OI(fE,r)),t.cuid2=r=>t.check(jI(mE,r)),t.ulid=r=>t.check(NI(hE,r)),t.base64=r=>t.check(qI(wE,r)),t.base64url=r=>t.check(ZI(kE,r)),t.xid=r=>t.check(RI(gE,r)),t.ksuid=r=>t.check(CI(vE,r)),t.ipv4=r=>t.check(AI(yE,r)),t.ipv6=r=>t.check(UI(_E,r)),t.cidrv4=r=>t.check(DI(bE,r)),t.cidrv6=r=>t.check(MI(xE,r)),t.e164=r=>t.check(LI(SE,r)),t.datetime=r=>t.check(z6(r)),t.date=r=>t.check(O6(r)),t.time=r=>t.check(j6(r)),t.duration=r=>t.check(N6(r))});function F(t){return L2(ov,t)}var Ht=A("ZodStringFormat",(t,e)=>{Wt.init(t,e),cE.init(t,e)}),uE=A("ZodEmail",(t,e)=>{MM.init(t,e),Ht.init(t,e)});function Aie(t){return kI(uE,t)}var Lg=A("ZodGUID",(t,e)=>{UM.init(t,e),Ht.init(t,e)});function Uie(t){return Mg(Lg,t)}var wa=A("ZodUUID",(t,e)=>{DM.init(t,e),Ht.init(t,e)});function Die(t){return SI(wa,t)}function Mie(t){return $I(wa,t)}function qie(t){return II(wa,t)}function Zie(t){return EI(wa,t)}var lE=A("ZodURL",(t,e)=>{qM.init(t,e),Ht.init(t,e)});function Lie(t){return PI(lE,t)}var dE=A("ZodEmoji",(t,e)=>{ZM.init(t,e),Ht.init(t,e)});function Fie(t){return TI(dE,t)}var pE=A("ZodNanoID",(t,e)=>{LM.init(t,e),Ht.init(t,e)});function Vie(t){return zI(pE,t)}var fE=A("ZodCUID",(t,e)=>{FM.init(t,e),Ht.init(t,e)});function Wie(t){return OI(fE,t)}var mE=A("ZodCUID2",(t,e)=>{VM.init(t,e),Ht.init(t,e)});function Bie(t){return jI(mE,t)}var hE=A("ZodULID",(t,e)=>{WM.init(t,e),Ht.init(t,e)});function Kie(t){return NI(hE,t)}var gE=A("ZodXID",(t,e)=>{BM.init(t,e),Ht.init(t,e)});function Hie(t){return RI(gE,t)}var vE=A("ZodKSUID",(t,e)=>{KM.init(t,e),Ht.init(t,e)});function Gie(t){return CI(vE,t)}var yE=A("ZodIPv4",(t,e)=>{JM.init(t,e),Ht.init(t,e)});function Qie(t){return AI(yE,t)}var _E=A("ZodIPv6",(t,e)=>{XM.init(t,e),Ht.init(t,e)});function Yie(t){return UI(_E,t)}var bE=A("ZodCIDRv4",(t,e)=>{e2.init(t,e),Ht.init(t,e)});function Jie(t){return DI(bE,t)}var xE=A("ZodCIDRv6",(t,e)=>{t2.init(t,e),Ht.init(t,e)});function Xie(t){return MI(xE,t)}var wE=A("ZodBase64",(t,e)=>{r2.init(t,e),Ht.init(t,e)});function eae(t){return qI(wE,t)}var kE=A("ZodBase64URL",(t,e)=>{i2.init(t,e),Ht.init(t,e)});function tae(t){return ZI(kE,t)}var SE=A("ZodE164",(t,e)=>{a2.init(t,e),Ht.init(t,e)});function rae(t){return LI(SE,t)}var $E=A("ZodJWT",(t,e)=>{s2.init(t,e),Ht.init(t,e)});function nae(t){return FI($E,t)}var M6=A("ZodCustomStringFormat",(t,e)=>{c2.init(t,e),Ht.init(t,e)});function iae(t,e,r={}){return E6(M6,t,e,r)}var sv=A("ZodNumber",(t,e)=>{fI.init(t,e),tt.init(t,e),t.gt=(n,i)=>t.check(os(n,i)),t.gte=(n,i)=>t.check(qn(n,i)),t.min=(n,i)=>t.check(qn(n,i)),t.lt=(n,i)=>t.check(as(n,i)),t.lte=(n,i)=>t.check(Ei(n,i)),t.max=(n,i)=>t.check(Ei(n,i)),t.int=n=>t.check(A$(n)),t.safe=n=>t.check(A$(n)),t.positive=n=>t.check(os(0,n)),t.nonnegative=n=>t.check(qn(0,n)),t.negative=n=>t.check(as(0,n)),t.nonpositive=n=>t.check(Ei(0,n)),t.multipleOf=(n,i)=>t.check(dp(n,i)),t.step=(n,i)=>t.check(dp(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function Pt(t){return G2(sv,t)}var ou=A("ZodNumberFormat",(t,e)=>{u2.init(t,e),sv.init(t,e)});function A$(t){return Y2(ou,t)}function aae(t){return J2(ou,t)}function oae(t){return X2(ou,t)}function sae(t){return e6(ou,t)}function cae(t){return t6(ou,t)}var cv=A("ZodBoolean",(t,e)=>{mI.init(t,e),tt.init(t,e)});function yr(t){return r6(cv,t)}var uv=A("ZodBigInt",(t,e)=>{hI.init(t,e),tt.init(t,e),t.gte=(n,i)=>t.check(qn(n,i)),t.min=(n,i)=>t.check(qn(n,i)),t.gt=(n,i)=>t.check(os(n,i)),t.gte=(n,i)=>t.check(qn(n,i)),t.min=(n,i)=>t.check(qn(n,i)),t.lt=(n,i)=>t.check(as(n,i)),t.lte=(n,i)=>t.check(Ei(n,i)),t.max=(n,i)=>t.check(Ei(n,i)),t.positive=n=>t.check(os(BigInt(0),n)),t.negative=n=>t.check(as(BigInt(0),n)),t.nonpositive=n=>t.check(Ei(BigInt(0),n)),t.nonnegative=n=>t.check(qn(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(dp(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function uae(t){return i6(uv,t)}var IE=A("ZodBigIntFormat",(t,e)=>{l2.init(t,e),uv.init(t,e)});function lae(t){return o6(IE,t)}function dae(t){return s6(IE,t)}var q6=A("ZodSymbol",(t,e)=>{d2.init(t,e),tt.init(t,e)});function pae(t){return c6(q6,t)}var Z6=A("ZodUndefined",(t,e)=>{p2.init(t,e),tt.init(t,e)});function fae(t){return u6(Z6,t)}var L6=A("ZodNull",(t,e)=>{f2.init(t,e),tt.init(t,e)});function EE(t){return l6(L6,t)}var F6=A("ZodAny",(t,e)=>{m2.init(t,e),tt.init(t,e)});function mae(){return d6(F6)}var V6=A("ZodUnknown",(t,e)=>{Dg.init(t,e),tt.init(t,e)});function Xt(){return qg(V6)}var W6=A("ZodNever",(t,e)=>{h2.init(t,e),tt.init(t,e)});function lv(t){return p6(W6,t)}var B6=A("ZodVoid",(t,e)=>{g2.init(t,e),tt.init(t,e)});function hae(t){return f6(B6,t)}var PE=A("ZodDate",(t,e)=>{v2.init(t,e),tt.init(t,e),t.min=(n,i)=>t.check(qn(n,i)),t.max=(n,i)=>t.check(Ei(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function gae(t){return m6(PE,t)}var K6=A("ZodArray",(t,e)=>{gI.init(t,e),tt.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(tu(r,n)),t.nonempty=r=>t.check(tu(1,r)),t.max=(r,n)=>t.check(iv(r,n)),t.length=(r,n)=>t.check(av(r,n)),t.unwrap=()=>t.element});function ft(t,e){return rE(K6,t,e)}function vae(t){let e=t._zod.def.shape;return we(Object.keys(e))}var dv=A("ZodObject",(t,e)=>{vI.init(t,e),tt.init(t,e),pt.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>yn(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Xt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Xt()}),t.strict=()=>t.clone({...t._zod.def,catchall:lv()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>pt.extend(t,r),t.merge=r=>pt.merge(t,r),t.pick=r=>pt.pick(t,r),t.omit=r=>pt.omit(t,r),t.partial=(...r)=>pt.partial(RE,t,r[0]),t.required=(...r)=>pt.required(CE,t,r[0])});function fe(t,e){let r={type:"object",get shape(){return pt.assignProp(this,"shape",{...t}),this.shape},...pt.normalizeParams(e)};return new dv(r)}function yae(t,e){return new dv({type:"object",get shape(){return pt.assignProp(this,"shape",{...t}),this.shape},catchall:lv(),...pt.normalizeParams(e)})}function rn(t,e){return new dv({type:"object",get shape(){return pt.assignProp(this,"shape",{...t}),this.shape},catchall:Xt(),...pt.normalizeParams(e)})}var TE=A("ZodUnion",(t,e)=>{yI.init(t,e),tt.init(t,e),t.options=e.options});function Zt(t,e){return new TE({type:"union",options:t,...pt.normalizeParams(e)})}var H6=A("ZodDiscriminatedUnion",(t,e)=>{TE.init(t,e),y2.init(t,e)});function zE(t,e,r){return new H6({type:"union",options:e,discriminator:t,...pt.normalizeParams(r)})}var G6=A("ZodIntersection",(t,e)=>{_2.init(t,e),tt.init(t,e)});function pv(t,e){return new G6({type:"intersection",left:t,right:e})}var Q6=A("ZodTuple",(t,e)=>{rv.init(t,e),tt.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function _ae(t,e,r){let n=e instanceof Ze,i=n?r:e;return new Q6({type:"tuple",items:t,rest:n?e:null,...pt.normalizeParams(i)})}var OE=A("ZodRecord",(t,e)=>{b2.init(t,e),tt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function qt(t,e,r){return new OE({type:"record",keyType:t,valueType:e,...pt.normalizeParams(r)})}function bae(t,e,r){return new OE({type:"record",keyType:Zt([t,lv()]),valueType:e,...pt.normalizeParams(r)})}var Y6=A("ZodMap",(t,e)=>{x2.init(t,e),tt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function xae(t,e,r){return new Y6({type:"map",keyType:t,valueType:e,...pt.normalizeParams(r)})}var J6=A("ZodSet",(t,e)=>{w2.init(t,e),tt.init(t,e),t.min=(...r)=>t.check(pp(...r)),t.nonempty=r=>t.check(pp(1,r)),t.max=(...r)=>t.check(nv(...r)),t.size=(...r)=>t.check(VI(...r))});function wae(t,e){return new J6({type:"set",valueType:t,...pt.normalizeParams(e)})}var mp=A("ZodEnum",(t,e)=>{k2.init(t,e),tt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let a={};for(let o of n)if(r.has(o))a[o]=e.entries[o];else throw Error(`Key ${o} not found in enum`);return new mp({...e,checks:[],...pt.normalizeParams(i),entries:a})},t.exclude=(n,i)=>{let a={...e.entries};for(let o of n)if(r.has(o))delete a[o];else throw Error(`Key ${o} not found in enum`);return new mp({...e,checks:[],...pt.normalizeParams(i),entries:a})}});function yn(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new mp({type:"enum",entries:r,...pt.normalizeParams(e)})}function kae(t,e){return new mp({type:"enum",entries:t,...pt.normalizeParams(e)})}var X6=A("ZodLiteral",(t,e)=>{S2.init(t,e),tt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function we(t,e){return new X6({type:"literal",values:Array.isArray(t)?t:[t],...pt.normalizeParams(e)})}var eq=A("ZodFile",(t,e)=>{$2.init(t,e),tt.init(t,e),t.min=(r,n)=>t.check(pp(r,n)),t.max=(r,n)=>t.check(nv(r,n)),t.mime=(r,n)=>t.check(YI(Array.isArray(r)?r:[r],n))});function Sae(t){return k6(eq,t)}var jE=A("ZodTransform",(t,e)=>{_I.init(t,e),tt.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=a=>{if(typeof a=="string")r.issues.push(pt.issue(a,r.value,e));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!0),r.issues.push(pt.issue(o))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});function NE(t){return new jE({type:"transform",transform:t})}var RE=A("ZodOptional",(t,e)=>{I2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Kt(t){return new RE({type:"optional",innerType:t})}var tq=A("ZodNullable",(t,e)=>{E2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Fg(t){return new tq({type:"nullable",innerType:t})}function $ae(t){return Kt(Fg(t))}var rq=A("ZodDefault",(t,e)=>{P2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function nq(t,e){return new rq({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var iq=A("ZodPrefault",(t,e)=>{T2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function aq(t,e){return new iq({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var CE=A("ZodNonOptional",(t,e)=>{z2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function oq(t,e){return new CE({type:"nonoptional",innerType:t,...pt.normalizeParams(e)})}var sq=A("ZodSuccess",(t,e)=>{O2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Iae(t){return new sq({type:"success",innerType:t})}var cq=A("ZodCatch",(t,e)=>{j2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function uq(t,e){return new cq({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var lq=A("ZodNaN",(t,e)=>{N2.init(t,e),tt.init(t,e)});function Eae(t){return g6(lq,t)}var AE=A("ZodPipe",(t,e)=>{bI.init(t,e),tt.init(t,e),t.in=e.in,t.out=e.out});function Vg(t,e){return new AE({type:"pipe",in:t,out:e})}var dq=A("ZodReadonly",(t,e)=>{R2.init(t,e),tt.init(t,e)});function pq(t){return new dq({type:"readonly",innerType:t})}var fq=A("ZodTemplateLiteral",(t,e)=>{C2.init(t,e),tt.init(t,e)});function Pae(t,e){return new fq({type:"template_literal",parts:t,...pt.normalizeParams(e)})}var mq=A("ZodLazy",(t,e)=>{U2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.getter()});function hq(t){return new mq({type:"lazy",getter:t})}var gq=A("ZodPromise",(t,e)=>{A2.init(t,e),tt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Tae(t){return new gq({type:"promise",innerType:t})}var fv=A("ZodCustom",(t,e)=>{D2.init(t,e),tt.init(t,e)});function vq(t,e){let r=new sr({check:"custom",...pt.normalizeParams(e)});return r._zod.check=t,r}function yq(t,e){return S6(fv,t??(()=>!0),e)}function _q(t,e={}){return $6(fv,t,e)}function bq(t,e){let r=vq(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(pt.issue(i,n.value,r._zod.def));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),n.issues.push(pt.issue(a))}},t(n.value,n)),e);return r}function zae(t,e={error:`Input not instance of ${t.name}`}){let r=new fv({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...pt.normalizeParams(e)});return r._zod.bag.Class=t,r}var Oae=(...t)=>I6({Pipe:AE,Boolean:cv,String:ov,Transform:jE},...t);function jae(t){let e=hq(()=>Zt([F(t),Pt(),yr(),EE(),ft(e),qt(F(),e)]));return e}function UE(t,e){return Vg(NE(t),e)}var Nae={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Rae(t){on({customError:t})}function Cae(){return on().customError}var xq={};ss(xq,{string:()=>Aae,number:()=>Uae,date:()=>qae,boolean:()=>Dae,bigint:()=>Mae});function Aae(t){return F2(ov,t)}function Uae(t){return Q2(sv,t)}function Dae(t){return n6(cv,t)}function Mae(t){return a6(uv,t)}function qae(t){return h6(PE,t)}on(M2());var Zae="io.modelcontextprotocol/related-task",mv="2.0",_r=yq(t=>t!==null&&(typeof t=="object"||typeof t=="function")),wq=Zt([F(),Pt().int()]),kq=F(),fRe=rn({ttl:Pt().optional(),pollInterval:Pt().optional()}),Lae=fe({ttl:Pt().optional()}),Fae=fe({taskId:F()}),DE=rn({progressToken:wq.optional(),[Zae]:Fae.optional()}),Vn=fe({_meta:DE.optional()}),hv=Vn.extend({task:Lae.optional()});var Ir=fe({method:F(),params:Vn.loose().optional()}),ai=fe({_meta:DE.optional()}),oi=fe({method:F(),params:ai.loose().optional()}),Er=rn({_meta:DE.optional()}),gv=Zt([F(),Pt().int()]),Vae=fe({jsonrpc:we(mv),id:gv,...Ir.shape}).strict();var Wae=fe({jsonrpc:we(mv),...oi.shape}).strict();var Sq=fe({jsonrpc:we(mv),id:gv,result:Er}).strict();var I4;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(I4||(I4={}));var $q=fe({jsonrpc:we(mv),id:gv.optional(),error:fe({code:Pt().int(),message:F(),data:Xt().optional()})}).strict();var mRe=Zt([Vae,Wae,Sq,$q]),hRe=Zt([Sq,$q]),Iq=Er.strict(),Bae=ai.extend({requestId:gv.optional(),reason:F().optional()}),Eq=oi.extend({method:we("notifications/cancelled"),params:Bae}),Kae=fe({src:F(),mimeType:F().optional(),sizes:ft(F()).optional(),theme:yn(["light","dark"]).optional()}),_p=fe({icons:ft(Kae).optional()}),ru=fe({name:F(),title:F().optional()}),Pq=ru.extend({...ru.shape,..._p.shape,version:F(),websiteUrl:F().optional(),description:F().optional()}),Hae=pv(fe({applyDefaults:yr().optional()}),qt(F(),Xt())),Gae=UE(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,pv(fe({form:Hae.optional(),url:_r.optional()}),qt(F(),Xt()).optional())),Qae=rn({list:_r.optional(),cancel:_r.optional(),requests:rn({sampling:rn({createMessage:_r.optional()}).optional(),elicitation:rn({create:_r.optional()}).optional()}).optional()}),Yae=rn({list:_r.optional(),cancel:_r.optional(),requests:rn({tools:rn({call:_r.optional()}).optional()}).optional()}),Jae=fe({experimental:qt(F(),_r).optional(),sampling:fe({context:_r.optional(),tools:_r.optional()}).optional(),elicitation:Gae.optional(),roots:fe({listChanged:yr().optional()}).optional(),tasks:Qae.optional(),extensions:qt(F(),_r).optional()}),Xae=Vn.extend({protocolVersion:F(),capabilities:Jae,clientInfo:Pq}),eoe=Ir.extend({method:we("initialize"),params:Xae}),toe=fe({experimental:qt(F(),_r).optional(),logging:_r.optional(),completions:_r.optional(),prompts:fe({listChanged:yr().optional()}).optional(),resources:fe({subscribe:yr().optional(),listChanged:yr().optional()}).optional(),tools:fe({listChanged:yr().optional()}).optional(),tasks:Yae.optional(),extensions:qt(F(),_r).optional()}),roe=Er.extend({protocolVersion:F(),capabilities:toe,serverInfo:Pq,instructions:F().optional()}),noe=oi.extend({method:we("notifications/initialized"),params:ai.optional()}),Tq=Ir.extend({method:we("ping"),params:Vn.optional()}),ioe=fe({progress:Pt(),total:Kt(Pt()),message:Kt(F())}),aoe=fe({...ai.shape,...ioe.shape,progressToken:wq}),zq=oi.extend({method:we("notifications/progress"),params:aoe}),ooe=Vn.extend({cursor:kq.optional()}),bp=Ir.extend({params:ooe.optional()}),xp=Er.extend({nextCursor:kq.optional()}),soe=yn(["working","input_required","completed","failed","cancelled"]),wp=fe({taskId:F(),status:soe,ttl:Zt([Pt(),EE()]),createdAt:F(),lastUpdatedAt:F(),pollInterval:Kt(Pt()),statusMessage:Kt(F())}),Oq=Er.extend({task:wp}),coe=ai.merge(wp),jq=oi.extend({method:we("notifications/tasks/status"),params:coe}),Nq=Ir.extend({method:we("tasks/get"),params:Vn.extend({taskId:F()})}),Rq=Er.merge(wp),Cq=Ir.extend({method:we("tasks/result"),params:Vn.extend({taskId:F()})}),gRe=Er.loose(),Aq=bp.extend({method:we("tasks/list")}),Uq=xp.extend({tasks:ft(wp)}),Dq=Ir.extend({method:we("tasks/cancel"),params:Vn.extend({taskId:F()})}),vRe=Er.merge(wp),Mq=fe({uri:F(),mimeType:Kt(F()),_meta:qt(F(),Xt()).optional()}),qq=Mq.extend({text:F()}),ME=F().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Zq=Mq.extend({blob:ME}),kp=yn(["user","assistant"]),su=fe({audience:ft(kp).optional(),priority:Pt().min(0).max(1).optional(),lastModified:nE.datetime({offset:!0}).optional()}),Lq=fe({...ru.shape,..._p.shape,uri:F(),description:Kt(F()),mimeType:Kt(F()),size:Kt(Pt()),annotations:su.optional(),_meta:Kt(rn({}))}),uoe=fe({...ru.shape,..._p.shape,uriTemplate:F(),description:Kt(F()),mimeType:Kt(F()),annotations:su.optional(),_meta:Kt(rn({}))}),loe=bp.extend({method:we("resources/list")}),doe=xp.extend({resources:ft(Lq)}),poe=bp.extend({method:we("resources/templates/list")}),foe=xp.extend({resourceTemplates:ft(uoe)}),qE=Vn.extend({uri:F()}),moe=qE,hoe=Ir.extend({method:we("resources/read"),params:moe}),goe=Er.extend({contents:ft(Zt([qq,Zq]))}),voe=oi.extend({method:we("notifications/resources/list_changed"),params:ai.optional()}),yoe=qE,_oe=Ir.extend({method:we("resources/subscribe"),params:yoe}),boe=qE,xoe=Ir.extend({method:we("resources/unsubscribe"),params:boe}),woe=ai.extend({uri:F()}),koe=oi.extend({method:we("notifications/resources/updated"),params:woe}),Soe=fe({name:F(),description:Kt(F()),required:Kt(yr())}),$oe=fe({...ru.shape,..._p.shape,description:Kt(F()),arguments:Kt(ft(Soe)),_meta:Kt(rn({}))}),Ioe=bp.extend({method:we("prompts/list")}),Eoe=xp.extend({prompts:ft($oe)}),Poe=Vn.extend({name:F(),arguments:qt(F(),F()).optional()}),Toe=Ir.extend({method:we("prompts/get"),params:Poe}),ZE=fe({type:we("text"),text:F(),annotations:su.optional(),_meta:qt(F(),Xt()).optional()}),LE=fe({type:we("image"),data:ME,mimeType:F(),annotations:su.optional(),_meta:qt(F(),Xt()).optional()}),FE=fe({type:we("audio"),data:ME,mimeType:F(),annotations:su.optional(),_meta:qt(F(),Xt()).optional()}),zoe=fe({type:we("tool_use"),name:F(),id:F(),input:qt(F(),Xt()),_meta:qt(F(),Xt()).optional()}),Ooe=fe({type:we("resource"),resource:Zt([qq,Zq]),annotations:su.optional(),_meta:qt(F(),Xt()).optional()}),joe=Lq.extend({type:we("resource_link")}),VE=Zt([ZE,LE,FE,joe,Ooe]),Noe=fe({role:kp,content:VE}),Roe=Er.extend({description:F().optional(),messages:ft(Noe)}),Coe=oi.extend({method:we("notifications/prompts/list_changed"),params:ai.optional()}),Aoe=fe({title:F().optional(),readOnlyHint:yr().optional(),destructiveHint:yr().optional(),idempotentHint:yr().optional(),openWorldHint:yr().optional()}),Uoe=fe({taskSupport:yn(["required","optional","forbidden"]).optional()}),Fq=fe({...ru.shape,..._p.shape,description:F().optional(),inputSchema:fe({type:we("object"),properties:qt(F(),_r).optional(),required:ft(F()).optional()}).catchall(Xt()),outputSchema:fe({type:we("object"),properties:qt(F(),_r).optional(),required:ft(F()).optional()}).catchall(Xt()).optional(),annotations:Aoe.optional(),execution:Uoe.optional(),_meta:qt(F(),Xt()).optional()}),Doe=bp.extend({method:we("tools/list")}),Moe=xp.extend({tools:ft(Fq)}),Vq=Er.extend({content:ft(VE).default([]),structuredContent:qt(F(),Xt()).optional(),isError:yr().optional()}),yRe=Vq.or(Er.extend({toolResult:Xt()})),qoe=hv.extend({name:F(),arguments:qt(F(),Xt()).optional()}),Zoe=Ir.extend({method:we("tools/call"),params:qoe}),Loe=oi.extend({method:we("notifications/tools/list_changed"),params:ai.optional()}),_Re=fe({autoRefresh:yr().default(!0),debounceMs:Pt().int().nonnegative().default(300)}),Wq=yn(["debug","info","notice","warning","error","critical","alert","emergency"]),Foe=Vn.extend({level:Wq}),Voe=Ir.extend({method:we("logging/setLevel"),params:Foe}),Woe=ai.extend({level:Wq,logger:F().optional(),data:Xt()}),Boe=oi.extend({method:we("notifications/message"),params:Woe}),Koe=fe({name:F().optional()}),Hoe=fe({hints:ft(Koe).optional(),costPriority:Pt().min(0).max(1).optional(),speedPriority:Pt().min(0).max(1).optional(),intelligencePriority:Pt().min(0).max(1).optional()}),Goe=fe({mode:yn(["auto","required","none"]).optional()}),Qoe=fe({type:we("tool_result"),toolUseId:F().describe("The unique identifier for the corresponding tool call."),content:ft(VE).default([]),structuredContent:fe({}).loose().optional(),isError:yr().optional(),_meta:qt(F(),Xt()).optional()}),Yoe=zE("type",[ZE,LE,FE]),Wg=zE("type",[ZE,LE,FE,zoe,Qoe]),Joe=fe({role:kp,content:Zt([Wg,ft(Wg)]),_meta:qt(F(),Xt()).optional()}),Xoe=hv.extend({messages:ft(Joe),modelPreferences:Hoe.optional(),systemPrompt:F().optional(),includeContext:yn(["none","thisServer","allServers"]).optional(),temperature:Pt().optional(),maxTokens:Pt().int(),stopSequences:ft(F()).optional(),metadata:_r.optional(),tools:ft(Fq).optional(),toolChoice:Goe.optional()}),ese=Ir.extend({method:we("sampling/createMessage"),params:Xoe}),tse=Er.extend({model:F(),stopReason:Kt(yn(["endTurn","stopSequence","maxTokens"]).or(F())),role:kp,content:Yoe}),rse=Er.extend({model:F(),stopReason:Kt(yn(["endTurn","stopSequence","maxTokens","toolUse"]).or(F())),role:kp,content:Zt([Wg,ft(Wg)])}),nse=fe({type:we("boolean"),title:F().optional(),description:F().optional(),default:yr().optional()}),ise=fe({type:we("string"),title:F().optional(),description:F().optional(),minLength:Pt().optional(),maxLength:Pt().optional(),format:yn(["email","uri","date","date-time"]).optional(),default:F().optional()}),ase=fe({type:yn(["number","integer"]),title:F().optional(),description:F().optional(),minimum:Pt().optional(),maximum:Pt().optional(),default:Pt().optional()}),ose=fe({type:we("string"),title:F().optional(),description:F().optional(),enum:ft(F()),default:F().optional()}),sse=fe({type:we("string"),title:F().optional(),description:F().optional(),oneOf:ft(fe({const:F(),title:F()})),default:F().optional()}),cse=fe({type:we("string"),title:F().optional(),description:F().optional(),enum:ft(F()),enumNames:ft(F()).optional(),default:F().optional()}),use=Zt([ose,sse]),lse=fe({type:we("array"),title:F().optional(),description:F().optional(),minItems:Pt().optional(),maxItems:Pt().optional(),items:fe({type:we("string"),enum:ft(F())}),default:ft(F()).optional()}),dse=fe({type:we("array"),title:F().optional(),description:F().optional(),minItems:Pt().optional(),maxItems:Pt().optional(),items:fe({anyOf:ft(fe({const:F(),title:F()}))}),default:ft(F()).optional()}),pse=Zt([lse,dse]),fse=Zt([cse,use,pse]),mse=Zt([fse,nse,ise,ase]),hse=hv.extend({mode:we("form").optional(),message:F(),requestedSchema:fe({type:we("object"),properties:qt(F(),mse),required:ft(F()).optional()})}),gse=hv.extend({mode:we("url"),message:F(),elicitationId:F(),url:F().url()}),vse=Zt([hse,gse]),yse=Ir.extend({method:we("elicitation/create"),params:vse}),_se=ai.extend({elicitationId:F()}),bse=oi.extend({method:we("notifications/elicitation/complete"),params:_se}),xse=Er.extend({action:yn(["accept","decline","cancel"]),content:UE(t=>t===null?void 0:t,qt(F(),Zt([F(),Pt(),yr(),ft(F())])).optional())}),wse=fe({type:we("ref/resource"),uri:F()}),kse=fe({type:we("ref/prompt"),name:F()}),Sse=Vn.extend({ref:Zt([kse,wse]),argument:fe({name:F(),value:F()}),context:fe({arguments:qt(F(),F()).optional()}).optional()}),$se=Ir.extend({method:we("completion/complete"),params:Sse});var Ise=Er.extend({completion:rn({values:ft(F()).max(100),total:Kt(Pt().int()),hasMore:Kt(yr())})}),Ese=fe({uri:F().startsWith("file://"),name:F().optional(),_meta:qt(F(),Xt()).optional()}),Pse=Ir.extend({method:we("roots/list"),params:Vn.optional()}),Tse=Er.extend({roots:ft(Ese)}),zse=oi.extend({method:we("notifications/roots/list_changed"),params:ai.optional()}),bRe=Zt([Tq,eoe,$se,Voe,Toe,Ioe,loe,poe,hoe,_oe,xoe,Zoe,Doe,Nq,Cq,Aq,Dq]),xRe=Zt([Eq,zq,noe,zse,jq]),wRe=Zt([Iq,tse,rse,xse,Tse,Rq,Uq,Oq]),kRe=Zt([Tq,ese,yse,Pse,Nq,Cq,Aq,Dq]),SRe=Zt([Eq,zq,Boe,koe,voe,Loe,Coe,jq,bse]),$Re=Zt([Iq,roe,Ise,Roe,Eoe,doe,foe,goe,Vq,Moe,Rq,Uq,Oq]);var IRe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var ERe=O4(D4(),1),PRe=O4(NY(),1);var E4;(function(t){t.Completable="McpCompletable"})(E4||(E4={}));function Ose(t){let e;return()=>e??=t()}var TRe=Ose(()=>Cc.object({session_id:Cc.string(),ws_url:Cc.string(),work_dir:Cc.string().optional(),session_key:Cc.string().optional()}));async function jse(t,e){try{await AY(t,e)}catch(r){if(!K$(r))throw r}}async function Nse(t,e){if(!t)return;let r=t;try{let n=G$(t);n?.claudeAiOauth?.refreshToken&&(delete n.claudeAiOauth.refreshToken,r=gn(n))}catch{}await Yh(e,r,{mode:384})}function Rse(){if(process.platform!=="darwin")return Promise.resolve(void 0);let t=qte(Mte);return new Promise(e=>{RY("security",["find-generic-password","-a",Zte(),"-w","-s",t],{encoding:"utf-8",timeout:5e3},(r,n)=>e(r?void 0:n.trim()||void 0))})}async function Cse(t,e,r,n,i=6e4){if(!Ste(e))return;let a=Jh(r??"."),o=Ite(a),s=await GS(t.load({projectKey:o,sessionId:e}),i,`SessionStore.load() timed out after ${i}ms for session ${e}`);if(!s||s.length===0)return;let c=$i(qY(),`claude-resume-${CY()}`);try{let u=$i(c,"projects",o);await HS(u,{recursive:!0});let l=$i(u,`${e}.jsonl`);await Yh(l,z4(s),{mode:384});let d=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,f=d??$i(u$(),".claude"),p;try{p=await UY($i(f,".credentials.json"),"utf-8")}catch(m){if(!K$(m))throw m}if(!d&&!(n?.ANTHROPIC_API_KEY??process.env.ANTHROPIC_API_KEY)&&!(n?.CLAUDE_CODE_OAUTH_TOKEN??process.env.CLAUDE_CODE_OAUTH_TOKEN)&&(p=await Rse()??p),await Nse(p,$i(c,".credentials.json")),await jse($i(d??u$(),".claude.json"),$i(c,".claude.json")),t.listSubkeys){let m=$i(u,e),v=await GS(t.listSubkeys({projectKey:o,sessionId:e}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${e}`);for(let g of v){let h=Jh(m,g+".jsonl");if(!g||M4(g)||g.split(/[\\/]/).includes("..")||!h.startsWith(m+q4)){Mn(`[SessionStore] skipping unsafe subpath from listSubkeys: ${g}`,{level:"warn"});continue}let b=await GS(t.load({projectKey:o,sessionId:e,subpath:g}),i,`SessionStore.load() timed out after ${i}ms for session ${e} subpath ${g}`);if(!b||b.length===0)continue;let y=[],_=[];for(let x of b)Dse(x)?y.push(x):_.push(x);if(_.length>0&&(await HS(kU(h),{recursive:!0}),await Yh(h,z4(_),{mode:384})),y.length>0){let x=y.at(-1),w=Jh(m,g+".meta.json");await HS(kU(w),{recursive:!0});let{type:k,...$}=x;await Yh(w,gn($),{mode:384})}}}return c}catch(u){throw await Bq(c),u}}function P4(t,e,r,n){let{systemPrompt:i,settings:a,settingSources:o,sandbox:s,...c}=t??{},u,l,d;i===void 0?u="":typeof i=="string"?u=i:i.type==="preset"&&(l=i.append,d=i.excludeDynamicSections);let f=c.pathToClaudeCodeExecutable;if(!f){let Cs=LY(import.meta.url),ia=MY(Cs),Mf=_te(s_=>ia.resolve(s_));if(Mf)f=Mf;else try{f=ia.resolve("./cli.js")}catch{throw Error(`Native CLI binary for ${process.platform}-${process.arch} not found. Reinstall @anthropic-ai/claude-agent-sdk without --omit=optional, or set options.pathToClaudeCodeExecutable.`)}}process.env.CLAUDE_AGENT_SDK_VERSION="0.2.105";let{abortController:p=Z4(),additionalDirectories:m=[],agent:v,agents:g,allowedTools:h=[],betas:b,canUseTool:y,continue:_,cwd:x,debug:w,debugFile:k,disallowedTools:$=[],tools:P,env:C,executable:T=L4()?"bun":"node",executableArgs:D=[],extraArgs:Z={},fallbackModel:N,enableFileCheckpointing:ee,toolConfig:H,forkSession:ge,hooks:Le,includeHookEvents:ve,includePartialMessages:W,onElicitation:I,persistSession:V,sessionStore:R,thinking:S,effort:E,maxThinkingTokens:B,maxTurns:ae,maxBudgetUsd:he,taskBudget:ct,mcpServers:Ie,model:er,outputFormat:U,permissionMode:q="default",allowDangerouslySkipPermissions:G=!1,permissionPromptToolName:re,plugins:be,getOAuthToken:We,workload:lr,resume:En,resumeSessionAt:Rr,sessionId:Cr,stderr:mr,strictMcpConfig:Ra}=c;if(R&&V===!1)throw Error("sessionStore cannot be used with persistSession: false -- the storage adapter requires local writes to mirror from. Use CLAUDE_CONFIG_DIR=/tmp for ephemeral local writes with external mirroring.");let Wr=U?.type==="json_schema"?U.schema:void 0,Pn=C?{...C}:{...process.env};Pn.CLAUDE_CODE_ENTRYPOINT||(Pn.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),ee&&(Pn.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),We&&(Pn.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),H?.askUserQuestion?.previewFormat&&(Pn.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=H.askUserQuestion.previewFormat);let Ca={},Rs=new Map;if(Ie)for(let[Cs,ia]of Object.entries(Ie))ia.type==="sdk"&&ia.instance?Rs.set(Cs,ia.instance):Ca[Cs]=ia;let Aa;if(S)switch(S.type){case"adaptive":Aa={type:"adaptive",display:S.display};break;case"enabled":Aa={type:"enabled",budgetTokens:S.budgetTokens,display:S.display};break;case"disabled":Aa={type:"disabled"};break}else B!==void 0&&(Aa=B===0?{type:"disabled"}:{type:"enabled",budgetTokens:B});r&&(Pn.CLAUDE_CONFIG_DIR=r);let Qu=new k$({abortController:p,additionalDirectories:m,agent:v,betas:b,cwd:x,debug:w,debugFile:k,executable:T,executableArgs:D,extraArgs:lr?{...Z,workload:lr}:Z,pathToClaudeCodeExecutable:f,env:Pn,forkSession:ge,stderr:mr,thinkingConfig:Aa,effort:E,maxTurns:ae,maxBudgetUsd:he,taskBudget:ct,model:er,fallbackModel:N,jsonSchema:Wr,permissionMode:q,allowDangerouslySkipPermissions:G,permissionPromptToolName:re,continueConversation:_,resume:En,resumeSessionAt:Rr,sessionId:Cr,settings:typeof a=="object"?gn(a):a,settingSources:o,allowedTools:h,disallowedTools:$,tools:P,mcpServers:Ca,strictMcpConfig:Ra,canUseTool:!!y,hooks:!!Le,includeHookEvents:ve,includePartialMessages:W,persistSession:V,sessionMirror:!!R,plugins:be,sandbox:s,spawnClaudeCodeProcess:c.spawnClaudeCodeProcess,deferSpawn:n}),o_={systemPrompt:u,appendSystemPrompt:l,excludeDynamicSections:d,agents:g,promptSuggestions:c.promptSuggestions,agentProgressSummaries:c.agentProgressSummaries},s1=new I$(Qu,e,y,Le,p,Rs,Wr,o_,I,We);if(R){let Cs=new E$(async(ia,Mf)=>{let s_=$i(Pn.CLAUDE_CONFIG_DIR??$i(u$(),".claude"),"projects"),c1=Mse(ia,s_);c1&&await R.append(c1,Mf)});s1.setTranscriptMirrorBatcher(Cs)}return{queryInstance:s1,transport:Qu,abortController:p,processEnv:Pn}}function T4(t,e,r,n){typeof r=="string"?e.write(gn({type:"user",session_id:"",message:{role:"user",content:[{type:"text",text:r}]},parent_tool_use_id:null})+`
|
|
232
|
+
`):t.streamInput(r).catch(i=>n.abort(i))}var Ase=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"]);async function Bq(t){for(let e=0;;e++)try{return await DY(t,{recursive:!0,force:!0})}catch(r){if(e>=4||!Ase.has(Bd(r)??""))return;await WY((e+1)*100)}}function Use(t,e){t.waitForExit().catch(()=>{}).finally(()=>Bq(e))}function Kq({prompt:t,options:e}){if(e?.resume&&e?.sessionStore){let{queryInstance:a,transport:o,abortController:s,processEnv:c}=P4({...e},typeof t=="string",void 0,!0),u=Jh(e.cwd??".");return Cse(e.sessionStore,e.resume,u,e.env,e.loadTimeoutMs).then(l=>{l&&(o.updateEnv({CLAUDE_CONFIG_DIR:l}),c.CLAUDE_CONFIG_DIR=l,a.addCleanupCallback(()=>Use(o,l))),a.isClosed()||o.spawn()}).catch(l=>{let d=fD(l);o.spawnAbort(d),a.setError(d)}),T4(a,o,t,s),a}let{queryInstance:r,transport:n,abortController:i}=P4(e,typeof t=="string");return T4(r,n,t,i),r}function z4(t){return t.map(e=>gn(e)).join(`
|
|
233
|
+
`)+`
|
|
234
|
+
`}function Dse(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="agent_metadata"}function Mse(t,e){let r=ZY(e,t);if(r.startsWith("..")||M4(r))return null;let n=r.split(q4);if(n.length<2)return null;let i=n[0],a=n[1];if(n.length===2&&a.endsWith(".jsonl"))return{projectKey:i,sessionId:a.replace(/\.jsonl$/,"")};if(n.length>=4){let o=n.slice(2),s=o.length-1;return o[s]=o.at(-1).replace(/\.jsonl$/,""),{projectKey:i,sessionId:a,subpath:o.join("/")}}return null}zo();Eo();var vv=class extends Tn{constructor(){super("claude","Claude (Anthropic API)",50)}canHandle(e){let r=!!process.env.ANTHROPIC_API_KEY;return r||K.debug("ClaudeAgentStrategy: ANTHROPIC_API_KEY not set"),r}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,images:o=[],skills:s=null,sessionPath:c=null,nodeName:u=null,timeout:l,config:d={}}=r,f=n;(!f||f==="auto")&&(K.debug(`Model is '${f||"undefined"}', using default: ${Br.CLAUDE}`),f=Br.CLAUDE);let p=l_[f]||f;l_[f]&&f!==p&&K.debug(`Mapped model: ${f} \u2192 ${p}`),K.debug(`Invoking Claude Agent SDK with model: ${p}, skills: ${JSON.stringify(s)}`);let m=process.env.ANTHROPIC_API_KEY,v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
|
|
235
|
+
\u25C6 Model: ${p}${v}
|
|
236
|
+
`);let g=(await import("chalk")).default;console.log(`
|
|
237
|
+
${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(e)),console.log(g.dim("\u2500".repeat(60)));let{allowedTools:h,mcpServers:b}=this._resolveSkills(s,{sessionPath:c,workspace:i,nodeName:u});try{let y={cwd:i,allowedTools:h,permissionMode:"bypassPermissions",model:p,...Object.keys(b).length>0&&{mcpServers:b}};if(a){let D=typeof a.parse=="function"?Gn(a,{target:"openApi3"}):a;y.outputFormat={type:"json_schema",schema:D},K.debug("Structured output enforced via SDK outputFormat")}K.debug(`Agent SDK options: ${JSON.stringify({cwd:y.cwd,toolCount:h.length,permissionMode:y.permissionMode,model:y.model,hasOutputFormat:!!y.outputFormat})}`);let _="",x=0,w=[];K.debug("Starting Claude Agent SDK query stream");let k;try{k=Kq({prompt:e,options:y})}catch(T){throw K.error(`Failed to initialize Claude Agent SDK: ${T.message}`),T}let $=null,P=0,C=3;try{for await(let T of k){if(w.push(T),T.type==="error"||T.error){let Z=T.error?.message||T.error||T.message||"Unknown API error";throw new Error(typeof Z=="string"?Z:JSON.stringify(Z))}let D=JSON.stringify(T.message?.content||T.text||"").slice(0,200);if(D===$){if(P++,P>=C){let Z=(T.message?.content?.[0]?.text||T.text||"unknown").slice(0,100);throw new Error(`API stuck in loop (${P}x repeated): ${Z}`)}}else $=D,P=1;if(T.type==="assistant"||T.constructor?.name==="AssistantMessage"){let Z=T.message?.content||T.content||[];for(let N of Z)if(N.type==="thinking"&&N.thinking)console.log(`${N.thinking.substring(0,200)}${N.thinking.length>200?"...":""}`);else if(N.type==="text"&&N.text)_+=N.text,N.text.length<500?console.log(`${N.text}`):console.log(`${N.text.substring(0,200)}... (${N.text.length} chars)`);else if(N.type==="tool_use"){x++,N.name.includes("memory")?ga.stepMemory(`Tool: ${N.name}`):ga.stepTool(`Tool: ${N.name}`);let H=JSON.stringify(N.input).substring(0,100);console.log(` Input: ${H}${JSON.stringify(N.input).length>100?"...":""}`)}}else if(!(T.type==="user"&&T.tool_use_result)){if(T.type==="result"||T.constructor?.name==="ResultMessage"){let Z=T.result||T.text||T.content||_;if(a){if(T.structured_output){K.debug("Using SDK native structured_output");let ee=typeof a.parse=="function"?a.parse(T.structured_output):T.structured_output;return{raw:Z,structured:ee}}if(Z){let N=this._extractJson(Z,a);if(N)return{raw:Z,structured:N}}K.warn(`Could not extract structured output \u2014 returning raw text (${(Z||"").length} chars)`)}return Z||""}}}if(K.warn(`Agent SDK ended without result. Collected ${w.length} messages`),_.length>0)return K.debug("Returning accumulated text from messages"),_;throw new Error("Claude Agent SDK query ended without result")}catch(T){throw K.error(`Error during query stream: ${T.message}`),T}}catch(y){throw K.error("Claude Agent SDK call failed",{error:y.message}),y}}_resolveSkills(e,r){if(e===null)return K.debug("No skills \u2014 pure LLM mode"),{allowedTools:[],mcpServers:{}};if(!Array.isArray(e)||e.length===0)return K.debug("Default IDE skills for code generation"),{allowedTools:["Read","Write","Bash","Grep","Glob"],mcpServers:{}};let n=[],i={};for(let a of e){let o=Kr(a);if(!o){K.warn(`Unknown skill "${a}" \u2014 skipping`);continue}if(o.allowedTools&&n.push(...o.allowedTools),typeof o.resolve=="function"){let s=o.resolve(r);s&&(i[o.serverName]=s,K.debug(`MCP: ${o.serverName} \u2192 ${s.command} ${s.args[0]}`))}}return{allowedTools:n,mcpServers:i}}_extractJson(e,r){let n=[()=>{if(e.includes("===JSON_START===")){let i=e.indexOf("===JSON_START===")+16,a=e.indexOf("===JSON_END===");return e.substring(i,a).trim()}},()=>e.match(/```json\s*\n([\s\S]*?)\n```/)?.[1]?.trim(),()=>{if(!e.startsWith("{"))return e.match(/```\s*\n([\s\S]*?)\n```/)?.[1]?.trim()},()=>e.trim(),()=>{let i=e.indexOf("{"),a=e.lastIndexOf("}");if(i!==-1&&a>i)return e.substring(i,a+1)}];for(let i of n)try{let a=i();if(!a)continue;let o=JSON.parse(a);if(typeof o!="object"||o===null)continue;return typeof r.parse=="function"?r.parse(o):o}catch{}return null}};zo();import{execSync as tce}from"child_process";Eo();var _v=class extends Tn{constructor(){super("codex","Codex (OpenAI)",75)}canHandle(e){if(!!!(process.env.OPENAI_API_KEY||process.env.CODEX_API_KEY))return K.debug("CodexAgentStrategy: OPENAI_API_KEY or CODEX_API_KEY not set"),!1;try{return tce("codex --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return K.warn("[Codex] codex CLI not found. Install: npm install -g @openai/codex"),!1}}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,skills:o=null,sessionPath:s=null,nodeName:c=null,timeout:u,config:l={}}=r,{Codex:d}=await Promise.resolve().then(()=>(eZ(),Xq)),f=n;(!f||f==="auto")&&(K.debug(`Model is '${f||"undefined"}', using default: ${Br.CODEX}`),f=Br.CODEX);let p=d_[f]||f;d_[f]&&f!==p&&K.debug(`Mapped model: ${f} \u2192 ${p}`),K.debug(`Invoking Codex SDK with model: ${p}, skills: ${JSON.stringify(o)}`);let m=process.env.CODEX_API_KEY||process.env.OPENAI_API_KEY;m&&!process.env.CODEX_API_KEY&&(process.env.CODEX_API_KEY=m);let v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
|
|
238
|
+
\u25C6 Model: ${p}${v}
|
|
239
|
+
`);let g=(await import("chalk")).default;console.log(`
|
|
240
|
+
${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(e)),console.log(g.dim("\u2500".repeat(60)));let h=this._resolveSkillsToMcp(o,{sessionPath:s,workspace:i,nodeName:c}),b={};Object.keys(h).length>0&&(b.mcp_servers=h,K.debug(`[Codex] MCP servers: ${Object.keys(h).join(", ")}`));let _=new d({...Object.keys(b).length>0&&{config:b}}).startThread({workingDirectory:i,skipGitRepoCheck:!0,approvalPolicy:"never",sandboxMode:"danger-full-access",networkAccessEnabled:!0}),x=a&&typeof a.parse=="function",w={};if(a)try{let k=x?Gn(a,{target:"openAi"}):a;w.outputSchema=k,K.debug("Structured output via SDK outputSchema")}catch(k){K.warn(`[Codex] Schema conversion failed, will extract from text: ${k.message}`)}try{let{events:k}=await _.runStreamed(e,w),$=0,P="";for await(let C of k){let T=C.type;if(T==="item.completed"){let D=C.item,Z=D?.type;if(Z==="mcp_tool_call"){$++;let N=`${D.server}/${D.tool}`;if(ga.stepTool(`Tool: ${N}`),D.arguments){let ee=JSON.stringify(D.arguments),H=ee.length>100?`${ee.substring(0,100)}...`:ee;console.log(` Input: ${H}`)}}else if(Z==="tool_call"||Z==="function_call"||Z==="command_execution"){$++;let N=D.name||D.tool||D.command||"unknown";ga.stepTool(`Tool: ${N}`)}else Z==="agent_message"&&(P=D.text||"",P.length<500?console.log(P):console.log(`${P.substring(0,200)}... (${P.length} chars)`))}else T==="turn.completed"?K.debug(`[Codex] Turn completed. Usage: ${JSON.stringify(C.usage||{})}`):K.debug(`[Codex] Event: ${T} ${JSON.stringify(C).slice(0,300)}`)}if(K.debug(`[Codex] Last agent message (${P.length} chars): ${P.slice(0,500)}`),a){if(!P)throw new Error("Codex agent returned no response");let C=JSON.parse(P),T=x?a.parse(C):C;return K.debug("\u2705 [Codex] Structured output validated"),{raw:P,structured:T}}return P||""}catch(k){let $=k.message||String(k);throw K.error(`\u274C [Codex] SDK call failed: ${$}`),$.includes("exited with code")&&(K.error("\u{1F4A1} [Codex] Verify: codex --version && echo $OPENAI_API_KEY"),K.error("\u{1F4A1} [Codex] If codex is missing: npm install -g @openai/codex")),k}}_resolveSkillsToMcp(e,r={}){if(!Array.isArray(e)||e.length===0)return{};let n={};for(let i of e){let a=Kr(i);if(!a){K.warn(`[Codex] Unknown skill "${i}" \u2014 skipping`);continue}if(typeof a.resolve!="function")continue;let o=a.resolve(r);if(!o)continue;let s=a.serverName||i,c={command:o.command};o.args?.length&&(c.args=o.args),o.env&&Object.keys(o.env).length>0&&(c.env=o.env),n[s]=c,K.debug(`[Codex] MCP: ${s} \u2192 ${o.command} ${(o.args||[]).join(" ")}`)}return n}};zo();import{execSync as rce,spawn as nce}from"child_process";import{existsSync as tZ,mkdirSync as rZ,readFileSync as nZ,rmSync as ice,writeFileSync as iZ}from"fs";import{join as ds}from"path";Eo();function ace(t){if(!t)return null;let e=String(t),r=e.match(/```(?:json)?\s*([\s\S]*?)```/i);if(r?.[1])try{return JSON.parse(r[1].trim())}catch{}let n=e.indexOf("{");if(n<0)return null;let i=0,a=!1,o=!1,s=-1;for(let c=n;c<e.length;c++){let u=e[c];if(a){o?o=!1:u==="\\"?o=!0:u==='"'&&(a=!1);continue}if(u==='"'){a=!0;continue}if(u==="{"){i===0&&(s=c),i+=1;continue}if(u==="}"){if(i===0)continue;if(i-=1,i===0&&s>=0){let l=e.slice(s,c+1);try{return JSON.parse(l)}catch{s=-1}}}}return null}function oce(t){let e=String(t||"").trim();if(!e)return null;try{return JSON.parse(e)}catch{return ace(e)}}function sce(t){try{let e=JSON.parse(t);if(typeof e=="string")return e;if(typeof e?.response=="string")return e.response;if(typeof e?.text=="string")return e.text;if(typeof e?.output=="string")return e.output;if(Array.isArray(e?.candidates)&&e.candidates.length>0){let r=e.candidates[0];if(typeof r?.content=="string")return r.content;if(Array.isArray(r?.content?.parts)){let n=r.content.parts.map(i=>typeof i?.text=="string"?i.text:"").join("");if(n.trim())return n}}}catch{}return t}var bv=class extends Tn{constructor(){super("gemini","Gemini (Google)",70)}canHandle(e){if(!!!(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY))return K.debug("GeminiAgentStrategy: GEMINI_API_KEY or GOOGLE_API_KEY not set"),!1;try{return rce("gemini --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return K.warn("[Gemini] gemini CLI not found. Install: npm install -g @google/gemini-cli"),!1}}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,skills:o=null,sessionPath:s=null,nodeName:c=null,timeout:u=600*1e3}=r,l=n;(!l||l==="auto")&&(l=Br.GEMINI);let d=u1[l]||l,f=String(process.env.GEMINI_API_KEY||"").trim(),p=String(process.env.GOOGLE_API_KEY||"").trim(),m=this._resolveSkillsToMcp(o,{sessionPath:s,workspace:i,nodeName:c}),v=Object.keys(m).length>0,g=e,h=a&&typeof a.parse=="function",b=null;if(a){let D;try{let Z=h?Gn(a,{target:"openAi"}):a;D=JSON.stringify(Z,null,2)}catch{D="{}"}if(v){g+=`
|
|
241
|
+
|
|
242
|
+
Write valid JSON that matches this schema:
|
|
243
|
+
${D}`;let Z=`zibby-result-${Date.now()}.json`,N=ds(i,".zibby","tmp");b=ds(N,Z),rZ(N,{recursive:!0}),g+=Js.generateFileOutputInstructions(a,b)}else g+=`
|
|
244
|
+
|
|
245
|
+
Return ONLY valid JSON (no markdown, no commentary) that matches this schema:
|
|
246
|
+
${D}`}let y=this._createGeminiConfigDir(i,m),_=["--output-format","json"];d&&d!=="auto"&&_.push("--model",d);let x=Object.keys(m);if(x.length>0){_.push("--approval-mode","yolo");for(let D of x)_.push("--allowed-mcp-server-names",D);K.info(`[Gemini] Enabling MCP servers: ${x.join(", ")}`)}else o&&o.length>0&&K.warn(`[Gemini] Skills requested but no MCP servers configured: ${o.join(", ")}`);_.push("-p",g);let w={...process.env,GEMINI_CLI_HOME:y};f?(w.GEMINI_API_KEY=f,delete w.GOOGLE_API_KEY):p&&(w.GOOGLE_API_KEY=p,delete w.GEMINI_API_KEY),K.debug(`[Gemini] Command: gemini ${_.slice(0,8).join(" ")}... (${_.length} total args)`),K.debug(`[Gemini] Config home: ${y}`),K.debug(`[Gemini] GEMINI_CLI_HOME env: ${w.GEMINI_CLI_HOME}`);let k="",$=null;try{k=await new Promise((Z,N)=>{let ee=nce("gemini",_,{cwd:i,env:w,stdio:["ignore","pipe","pipe"]}),H="",ge="",Le=setTimeout(()=>{try{ee.kill("SIGTERM")}catch{}},u);ee.stdout.on("data",ve=>{H+=ve.toString()}),ee.stderr.on("data",ve=>{ge+=ve.toString()}),ee.on("error",ve=>{clearTimeout(Le),N(ve)}),ee.on("close",ve=>{if(clearTimeout(Le),ve===0)return Z(H.trim());N(new Error(`gemini failed with code ${ve}: ${(ge||H).trim()}`))})})}catch(D){$=D}finally{try{ice(y,{recursive:!0,force:!0})}catch{}}let P=sce(k).trim();if(!a){if($)throw $;return P}if(b){let D=tZ(b);if(K.info(`[Gemini] Result file: ${D?"present":"missing"} at ${b}`),D)try{let Z=nZ(b,"utf-8").trim(),N=JSON.parse(Z),ee=h?a.parse(N):N;return K.info("[Gemini] Structured output recovered from result file"),{raw:P,structured:ee}}catch(Z){K.warn(`[Gemini] Result file parse/validation failed: ${Z.message}`)}else $||K.warn("[Gemini] Result file missing; falling back to stream-parsed JSON")}let C=null;if(a){let D=new As;D.zodSchema=a,D.processChunk(P),D.flush(),C=D.getResult()}if(K.info(`[Gemini] Raw stdout length: ${k.length} chars`),K.info(`[Gemini] Extracted text length: ${P.length} chars`),K.info(`[Gemini] StreamParser result: ${C?"extracted":"null"}`),C||(P.length<2e3?K.info(`[Gemini] Raw text preview:
|
|
247
|
+
${P}`):K.info(`[Gemini] Raw text preview (first 1000 chars):
|
|
248
|
+
${P.slice(0,1e3)}`),C=oce(P)),!C)throw $||(K.error("[Gemini] Failed to extract valid JSON from output"),K.error("\u{1F4A1} Tip: Set strictMode=true in .zibby.config.js for OpenAI proxy fallback"),new Error("Gemini did not return valid JSON for structured output. Enable strictMode for proxy fallback."));let T=h?a.parse(C):C;return{raw:P,structured:T}}_resolveSkillsToMcp(e,r={}){if(!Array.isArray(e)||e.length===0)return{};let n={};for(let i of e){let a=Kr(i);if(!a||typeof a.resolve!="function")continue;let o=a.resolve(r);if(!o)continue;let s=a.cursorKey||a.serverName||i,c={command:o.command};o.args?.length&&(c.args=o.args),o.env&&Object.keys(o.env).length>0&&(c.env=o.env),o.cwd&&(c.cwd=o.cwd),n[s]=c}return n}_createGeminiConfigDir(e,r){let n=`${Date.now()}-${Math.random().toString(16).slice(2,10)}`,i=ds(e||process.cwd(),".zibby","tmp",`gemini-home-${n}`),a=ds(i,".gemini");rZ(a,{recursive:!0});let o=ds(a,"settings.json"),s={},c=ds(process.env.HOME||"",".gemini","settings.json");if(tZ(c))try{s=JSON.parse(nZ(c,"utf-8"))}catch{s={}}let u={...s,mcpServers:{...s.mcpServers&&typeof s.mcpServers=="object"?s.mcpServers:{},...r||{}}};iZ(o,`${JSON.stringify(u,null,2)}
|
|
249
|
+
`,"utf-8");let l=ds(e||process.cwd(),".zibby","tmp","gemini-settings-debug.json");try{iZ(l,`${JSON.stringify(u,null,2)}
|
|
250
|
+
`,"utf-8")}catch{}return K.debug(`[Gemini] Created isolated config with ${Object.keys(u.mcpServers||{}).length} MCP servers`),K.debug(`[Gemini] MCP servers: ${JSON.stringify(Object.keys(u.mcpServers||{}),null,2)}`),i}};var $p=class{formatTools(e){throw new Error("formatTools() must be implemented")}hasToolCalls(e){throw new Error("hasToolCalls() must be implemented")}parseToolCalls(e){throw new Error("parseToolCalls() must be implemented")}getTextContent(e){throw new Error("getTextContent() must be implemented")}buildAssistantMessage(e){throw new Error("buildAssistantMessage() must be implemented")}buildToolResultMessage(e,r){throw new Error("buildToolResultMessage() must be implemented")}injectToolsIntoBody(e,r){throw new Error("injectToolsIntoBody() must be implemented")}};var cu=class extends $p{formatTools(e){return e.map(r=>({type:"function",function:{name:r.name,description:r.description,parameters:r.parameters||r.input_schema||{type:"object",properties:{}}}}))}hasToolCalls(e){let r=e.choices?.[0]?.message;return!!(r?.tool_calls&&r.tool_calls.length>0)}parseToolCalls(e){return(e.choices?.[0]?.message?.tool_calls||[]).map(n=>({id:n.id,name:n.function.name,args:JSON.parse(n.function.arguments||"{}")}))}getTextContent(e){return e.choices?.[0]?.message?.content||""}buildAssistantMessage(e){return e.choices?.[0]?.message}buildToolResultMessage(e,r){return{role:"tool",tool_call_id:e,content:typeof r=="string"?r:JSON.stringify(r)}}injectToolsIntoBody(e,r){return r.length>0&&(e.tools=r),e}};var Ip=class{async fetchCompletion(e,r,n={}){throw new Error("fetchCompletion() must be implemented")}async fetchStreamingCompletion(e,r,n={}){throw new Error("fetchStreamingCompletion() must be implemented")}};function xv(t){return Buffer.byteLength(JSON.stringify(t),"utf8")}function wv(t,e){let r=String(t||"");if(r.length<=e)return r;let n=Math.max(0,e-28);return`${r.slice(0,n)}
|
|
251
|
+
|
|
252
|
+
[truncated for size budget]`}function HE(t,e=0){if(!t||typeof t!="object"||e>8)return t;if(Array.isArray(t))return t.map(n=>HE(n,e+1));let r={};for(let[n,i]of Object.entries(t))n==="description"||n==="title"||n==="examples"||n==="default"||(r[n]=HE(i,e+1));return r}function cce(t=[]){return t.map(e=>({...e,function:{...e.function,description:wv(e.function?.description||"",180),parameters:HE(e.function?.parameters||{type:"object",properties:{}})}}))}function aZ(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let a of i.tool_calls)e.add(a.id);let r=t.filter(i=>i.role==="tool"?e.has(i.tool_call_id):!0),n=new Set;for(let i of r)i.role==="tool"&&n.add(i.tool_call_id);return r.map(i=>{if(i.role!=="assistant"||!Array.isArray(i.tool_calls)||i.tool_calls.every(c=>n.has(c.id)))return i;let{tool_calls:o,...s}=i;return{...s,content:s.content||""}})}function GE(t,e={}){let r=e.maxBytes||49e3,n=e.systemMaxChars||12e3,i={...t,messages:Array.isArray(t.messages)?[...t.messages]:[],tools:Array.isArray(t.tools)?cce(t.tools):t.tools};i.messages.length>0&&i.messages[0]?.role==="system"&&(i.messages[0]={...i.messages[0],content:wv(i.messages[0].content,n)});let a=!1;for(;xv(i)>r&&i.messages.length>2;)i.messages.splice(1,1),a=!0;if(a&&(i.messages=aZ(i.messages)),xv(i)>r&&i.messages.length>0&&(i.messages[0]={...i.messages[0],content:wv(i.messages[0].content,6e3)},a=!0),xv(i)>r){let o=i.messages.find(c=>c.role==="system")||i.messages[0],s=i.messages.slice(-2);i.messages=aZ([o,...s].filter(Boolean).map((c,u)=>({...c,content:wv(c.content,u===0?4e3:8e3)}))),a=!0}return{body:i,meta:{bytes:xv(i),trimmed:a,maxBytes:r,messageCount:i.messages.length}}}var oZ=t=>Buffer.byteLength(JSON.stringify(t),"utf8"),uu=class extends Ip{async fetchCompletion(e,r,n={}){let i=oZ(e),{body:a,meta:o}=GE(e,n.payloadCompaction);n.onBudget?.({streaming:!1,beforeBytes:i,meta:o});let s=this.#e(n),c=`${r.baseUrl}${n.chatCompletionsPath||"/v1/chat/completions"}`,u=await fetch(c,{method:"POST",headers:r.headers,body:JSON.stringify(a),signal:s});if(!u.ok){let l=await u.text();throw u.status===401||u.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Proxy error ${u.status}: ${l}`)}return u.json()}async fetchStreamingCompletion(e,r,n={}){let i={...e,stream:!0},a=oZ(i),{body:o,meta:s}=GE(i,n.payloadCompaction);n.onBudget?.({streaming:!0,beforeBytes:a,meta:s});let c=this.#e(n),u=`${r.baseUrl}${n.chatCompletionsPath||"/v1/chat/completions"}`,l=await fetch(u,{method:"POST",headers:r.headers,body:JSON.stringify(o),signal:c});if(!l.ok){let g=await l.text();throw l.status===401||l.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Proxy error ${l.status}: ${g}`)}let d=l.body.getReader(),f=new TextDecoder,p="",m="",v=new Map;for(;;){let{done:g,value:h}=await d.read();if(g)break;p+=f.decode(h,{stream:!0});let b=p.split(`
|
|
253
|
+
`);p=b.pop();for(let y of b){if(!y.startsWith("data: "))continue;let _=y.slice(6).trim();if(_==="[DONE]")continue;let x;try{x=JSON.parse(_)}catch{continue}let w=x.choices?.[0]?.delta;if(w&&(w.content&&(m+=w.content,n.onToken&&n.onToken(w.content)),w.tool_calls))for(let k of w.tool_calls){let $=k.index??0;v.has($)||v.set($,{id:"",name:"",args:""});let P=v.get($);k.id&&(P.id=k.id),k.function?.name&&(P.name=k.function.name),k.function?.arguments!=null&&(P.args+=k.function.arguments)}}}if(v.size>0){let g=[...v.entries()].sort(([h],[b])=>h-b).map(([,h])=>({id:h.id,type:"function",function:{name:h.name,arguments:h.args}}));return{choices:[{message:{role:"assistant",content:m||null,tool_calls:g}}]}}return{choices:[{message:{role:"assistant",content:m}}]}}#e(e={}){let r=[e.signal,e.timeout?AbortSignal.timeout(e.timeout):null].filter(Boolean);return r.length>1?AbortSignal.any(r):r[0]||void 0}};ml();function lu(t){return!!t._zod}function ji(t,e){return lu(t)?gc(t,e):t.safeParse(e)}function kv(t){if(!t)return;let e;if(lu(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function uZ(t){if(lu(t)){let a=t._zod?.def;if(a){if(a.value!==void 0)return a.value;if(Array.isArray(a.values)&&a.values.length>0)return a.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}var YE="2025-11-25";var lZ=[YE,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],uo="io.modelcontextprotocol/related-task",$v="2.0",br=FS(t=>t!==null&&(typeof t=="object"||typeof t=="function")),dZ=Mt([L(),Et().int()]),pZ=L(),cAe=Ur({ttl:Et().optional(),pollInterval:Et().optional()}),mce=de({ttl:Et().optional()}),hce=de({taskId:L()}),JE=Ur({progressToken:dZ.optional(),[uo]:hce.optional()}),Wn=de({_meta:JE.optional()}),Ep=Wn.extend({task:mce.optional()}),fZ=t=>Ep.safeParse(t).success,Pr=de({method:L(),params:Wn.loose().optional()}),si=de({_meta:JE.optional()}),ci=de({method:L(),params:si.loose().optional()}),Tr=Ur({_meta:JE.optional()}),Iv=Mt([L(),Et().int()]),mZ=de({jsonrpc:xe($v),id:Iv,...Pr.shape}).strict(),XE=t=>mZ.safeParse(t).success,hZ=de({jsonrpc:xe($v),...ci.shape}).strict(),gZ=t=>hZ.safeParse(t).success,eP=de({jsonrpc:xe($v),id:Iv,result:Tr}).strict(),Pp=t=>eP.safeParse(t).success;var Ae;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ae||(Ae={}));var tP=de({jsonrpc:xe($v),id:Iv.optional(),error:de({code:Et().int(),message:L(),data:Dt().optional()})}).strict();var vZ=t=>tP.safeParse(t).success;var yZ=Mt([mZ,hZ,eP,tP]),uAe=Mt([eP,tP]),ps=Tr.strict(),gce=si.extend({requestId:Iv.optional(),reason:L().optional()}),Ev=ci.extend({method:xe("notifications/cancelled"),params:gce}),vce=de({src:L(),mimeType:L().optional(),sizes:it(L()).optional(),theme:Dr(["light","dark"]).optional()}),Tp=de({icons:it(vce).optional()}),du=de({name:L(),title:L().optional()}),_Z=du.extend({...du.shape,...Tp.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),yce=bd(de({applyDefaults:fr().optional()}),Nt(L(),Dt())),_ce=zh(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,bd(de({form:yce.optional(),url:br.optional()}),Nt(L(),Dt()).optional())),bce=Ur({list:br.optional(),cancel:br.optional(),requests:Ur({sampling:Ur({createMessage:br.optional()}).optional(),elicitation:Ur({create:br.optional()}).optional()}).optional()}),xce=Ur({list:br.optional(),cancel:br.optional(),requests:Ur({tools:Ur({call:br.optional()}).optional()}).optional()}),wce=de({experimental:Nt(L(),br).optional(),sampling:de({context:br.optional(),tools:br.optional()}).optional(),elicitation:_ce.optional(),roots:de({listChanged:fr().optional()}).optional(),tasks:bce.optional(),extensions:Nt(L(),br).optional()}),kce=Wn.extend({protocolVersion:L(),capabilities:wce,clientInfo:_Z}),Sce=Pr.extend({method:xe("initialize"),params:kce});var $ce=de({experimental:Nt(L(),br).optional(),logging:br.optional(),completions:br.optional(),prompts:de({listChanged:fr().optional()}).optional(),resources:de({subscribe:fr().optional(),listChanged:fr().optional()}).optional(),tools:de({listChanged:fr().optional()}).optional(),tasks:xce.optional(),extensions:Nt(L(),br).optional()}),rP=Tr.extend({protocolVersion:L(),capabilities:$ce,serverInfo:_Z,instructions:L().optional()}),Ice=ci.extend({method:xe("notifications/initialized"),params:si.optional()});var Pv=Pr.extend({method:xe("ping"),params:Wn.optional()}),Ece=de({progress:Et(),total:Vt(Et()),message:Vt(L())}),Pce=de({...si.shape,...Ece.shape,progressToken:dZ}),Tv=ci.extend({method:xe("notifications/progress"),params:Pce}),Tce=Wn.extend({cursor:pZ.optional()}),zp=Pr.extend({params:Tce.optional()}),Op=Tr.extend({nextCursor:pZ.optional()}),zce=Dr(["working","input_required","completed","failed","cancelled"]),jp=de({taskId:L(),status:zce,ttl:Mt([Et(),Sh()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:Vt(Et()),statusMessage:Vt(L())}),fs=Tr.extend({task:jp}),Oce=si.merge(jp),Np=ci.extend({method:xe("notifications/tasks/status"),params:Oce}),zv=Pr.extend({method:xe("tasks/get"),params:Wn.extend({taskId:L()})}),Ov=Tr.merge(jp),jv=Pr.extend({method:xe("tasks/result"),params:Wn.extend({taskId:L()})}),lAe=Tr.loose(),Nv=zp.extend({method:xe("tasks/list")}),Rv=Op.extend({tasks:it(jp)}),Cv=Pr.extend({method:xe("tasks/cancel"),params:Wn.extend({taskId:L()})}),bZ=Tr.merge(jp),xZ=de({uri:L(),mimeType:Vt(L()),_meta:Nt(L(),Dt()).optional()}),wZ=xZ.extend({text:L()}),nP=L().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),kZ=xZ.extend({blob:nP}),Rp=Dr(["user","assistant"]),pu=de({audience:it(Rp).optional(),priority:Et().min(0).max(1).optional(),lastModified:Bo.datetime({offset:!0}).optional()}),SZ=de({...du.shape,...Tp.shape,uri:L(),description:Vt(L()),mimeType:Vt(L()),size:Vt(Et()),annotations:pu.optional(),_meta:Vt(Ur({}))}),jce=de({...du.shape,...Tp.shape,uriTemplate:L(),description:Vt(L()),mimeType:Vt(L()),annotations:pu.optional(),_meta:Vt(Ur({}))}),Nce=zp.extend({method:xe("resources/list")}),iP=Op.extend({resources:it(SZ)}),Rce=zp.extend({method:xe("resources/templates/list")}),aP=Op.extend({resourceTemplates:it(jce)}),oP=Wn.extend({uri:L()}),Cce=oP,Ace=Pr.extend({method:xe("resources/read"),params:Cce}),sP=Tr.extend({contents:it(Mt([wZ,kZ]))}),cP=ci.extend({method:xe("notifications/resources/list_changed"),params:si.optional()}),Uce=oP,Dce=Pr.extend({method:xe("resources/subscribe"),params:Uce}),Mce=oP,qce=Pr.extend({method:xe("resources/unsubscribe"),params:Mce}),Zce=si.extend({uri:L()}),Lce=ci.extend({method:xe("notifications/resources/updated"),params:Zce}),Fce=de({name:L(),description:Vt(L()),required:Vt(fr())}),Vce=de({...du.shape,...Tp.shape,description:Vt(L()),arguments:Vt(it(Fce)),_meta:Vt(Ur({}))}),Wce=zp.extend({method:xe("prompts/list")}),uP=Op.extend({prompts:it(Vce)}),Bce=Wn.extend({name:L(),arguments:Nt(L(),L()).optional()}),Kce=Pr.extend({method:xe("prompts/get"),params:Bce}),lP=de({type:xe("text"),text:L(),annotations:pu.optional(),_meta:Nt(L(),Dt()).optional()}),dP=de({type:xe("image"),data:nP,mimeType:L(),annotations:pu.optional(),_meta:Nt(L(),Dt()).optional()}),pP=de({type:xe("audio"),data:nP,mimeType:L(),annotations:pu.optional(),_meta:Nt(L(),Dt()).optional()}),Hce=de({type:xe("tool_use"),name:L(),id:L(),input:Nt(L(),Dt()),_meta:Nt(L(),Dt()).optional()}),Gce=de({type:xe("resource"),resource:Mt([wZ,kZ]),annotations:pu.optional(),_meta:Nt(L(),Dt()).optional()}),Qce=SZ.extend({type:xe("resource_link")}),fP=Mt([lP,dP,pP,Qce,Gce]),Yce=de({role:Rp,content:fP}),mP=Tr.extend({description:L().optional(),messages:it(Yce)}),hP=ci.extend({method:xe("notifications/prompts/list_changed"),params:si.optional()}),Jce=de({title:L().optional(),readOnlyHint:fr().optional(),destructiveHint:fr().optional(),idempotentHint:fr().optional(),openWorldHint:fr().optional()}),Xce=de({taskSupport:Dr(["required","optional","forbidden"]).optional()}),$Z=de({...du.shape,...Tp.shape,description:L().optional(),inputSchema:de({type:xe("object"),properties:Nt(L(),br).optional(),required:it(L()).optional()}).catchall(Dt()),outputSchema:de({type:xe("object"),properties:Nt(L(),br).optional(),required:it(L()).optional()}).catchall(Dt()).optional(),annotations:Jce.optional(),execution:Xce.optional(),_meta:Nt(L(),Dt()).optional()}),eue=zp.extend({method:xe("tools/list")}),gP=Op.extend({tools:it($Z)}),fu=Tr.extend({content:it(fP).default([]),structuredContent:Nt(L(),Dt()).optional(),isError:fr().optional()}),dAe=fu.or(Tr.extend({toolResult:Dt()})),tue=Ep.extend({name:L(),arguments:Nt(L(),Dt()).optional()}),rue=Pr.extend({method:xe("tools/call"),params:tue}),vP=ci.extend({method:xe("notifications/tools/list_changed"),params:si.optional()}),IZ=de({autoRefresh:fr().default(!0),debounceMs:Et().int().nonnegative().default(300)}),EZ=Dr(["debug","info","notice","warning","error","critical","alert","emergency"]),nue=Wn.extend({level:EZ}),iue=Pr.extend({method:xe("logging/setLevel"),params:nue}),aue=si.extend({level:EZ,logger:L().optional(),data:Dt()}),oue=ci.extend({method:xe("notifications/message"),params:aue}),sue=de({name:L().optional()}),cue=de({hints:it(sue).optional(),costPriority:Et().min(0).max(1).optional(),speedPriority:Et().min(0).max(1).optional(),intelligencePriority:Et().min(0).max(1).optional()}),uue=de({mode:Dr(["auto","required","none"]).optional()}),lue=de({type:xe("tool_result"),toolUseId:L().describe("The unique identifier for the corresponding tool call."),content:it(fP).default([]),structuredContent:de({}).loose().optional(),isError:fr().optional(),_meta:Nt(L(),Dt()).optional()}),due=Eh("type",[lP,dP,pP]),Sv=Eh("type",[lP,dP,pP,Hce,lue]),pue=de({role:Rp,content:Mt([Sv,it(Sv)]),_meta:Nt(L(),Dt()).optional()}),fue=Ep.extend({messages:it(pue),modelPreferences:cue.optional(),systemPrompt:L().optional(),includeContext:Dr(["none","thisServer","allServers"]).optional(),temperature:Et().optional(),maxTokens:Et().int(),stopSequences:it(L()).optional(),metadata:br.optional(),tools:it($Z).optional(),toolChoice:uue.optional()}),yP=Pr.extend({method:xe("sampling/createMessage"),params:fue}),_P=Tr.extend({model:L(),stopReason:Vt(Dr(["endTurn","stopSequence","maxTokens"]).or(L())),role:Rp,content:due}),bP=Tr.extend({model:L(),stopReason:Vt(Dr(["endTurn","stopSequence","maxTokens","toolUse"]).or(L())),role:Rp,content:Mt([Sv,it(Sv)])}),mue=de({type:xe("boolean"),title:L().optional(),description:L().optional(),default:fr().optional()}),hue=de({type:xe("string"),title:L().optional(),description:L().optional(),minLength:Et().optional(),maxLength:Et().optional(),format:Dr(["email","uri","date","date-time"]).optional(),default:L().optional()}),gue=de({type:Dr(["number","integer"]),title:L().optional(),description:L().optional(),minimum:Et().optional(),maximum:Et().optional(),default:Et().optional()}),vue=de({type:xe("string"),title:L().optional(),description:L().optional(),enum:it(L()),default:L().optional()}),yue=de({type:xe("string"),title:L().optional(),description:L().optional(),oneOf:it(de({const:L(),title:L()})),default:L().optional()}),_ue=de({type:xe("string"),title:L().optional(),description:L().optional(),enum:it(L()),enumNames:it(L()).optional(),default:L().optional()}),bue=Mt([vue,yue]),xue=de({type:xe("array"),title:L().optional(),description:L().optional(),minItems:Et().optional(),maxItems:Et().optional(),items:de({type:xe("string"),enum:it(L())}),default:it(L()).optional()}),wue=de({type:xe("array"),title:L().optional(),description:L().optional(),minItems:Et().optional(),maxItems:Et().optional(),items:de({anyOf:it(de({const:L(),title:L()}))}),default:it(L()).optional()}),kue=Mt([xue,wue]),Sue=Mt([_ue,bue,kue]),$ue=Mt([Sue,mue,hue,gue]),Iue=Ep.extend({mode:xe("form").optional(),message:L(),requestedSchema:de({type:xe("object"),properties:Nt(L(),$ue),required:it(L()).optional()})}),Eue=Ep.extend({mode:xe("url"),message:L(),elicitationId:L(),url:L().url()}),Pue=Mt([Iue,Eue]),xP=Pr.extend({method:xe("elicitation/create"),params:Pue}),Tue=si.extend({elicitationId:L()}),zue=ci.extend({method:xe("notifications/elicitation/complete"),params:Tue}),wP=Tr.extend({action:Dr(["accept","decline","cancel"]),content:zh(t=>t===null?void 0:t,Nt(L(),Mt([L(),Et(),fr(),it(L())])).optional())}),Oue=de({type:xe("ref/resource"),uri:L()});var jue=de({type:xe("ref/prompt"),name:L()}),Nue=Wn.extend({ref:Mt([jue,Oue]),argument:de({name:L(),value:L()}),context:de({arguments:Nt(L(),L()).optional()}).optional()}),Rue=Pr.extend({method:xe("completion/complete"),params:Nue});var kP=Tr.extend({completion:Ur({values:it(L()).max(100),total:Vt(Et().int()),hasMore:Vt(fr())})}),Cue=de({uri:L().startsWith("file://"),name:L().optional(),_meta:Nt(L(),Dt()).optional()}),Aue=Pr.extend({method:xe("roots/list"),params:Wn.optional()}),Uue=Tr.extend({roots:it(Cue)}),Due=ci.extend({method:xe("notifications/roots/list_changed"),params:si.optional()}),pAe=Mt([Pv,Sce,Rue,iue,Kce,Wce,Nce,Rce,Ace,Dce,qce,rue,eue,zv,jv,Nv,Cv]),fAe=Mt([Ev,Tv,Ice,Due,Np]),mAe=Mt([ps,_P,bP,wP,Uue,Ov,Rv,fs]),hAe=Mt([Pv,yP,xP,Aue,zv,jv,Nv,Cv]),gAe=Mt([Ev,Tv,oue,Lce,cP,vP,hP,Np,zue]),vAe=Mt([ps,rP,kP,mP,uP,iP,aP,sP,fu,gP,Ov,Rv,fs]),$e=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===Ae.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new QE(i.elicitations,r)}return new t(e,r,n)}},QE=class extends $e{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(Ae.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function lo(t){return t==="completed"||t==="failed"||t==="cancelled"}zo();function SP(t){let r=kv(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=uZ(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function $P(t,e){let r=ji(t,e);if(!r.success)throw r.error;return r.data}var Mue=6e4,Av=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Ev,r=>{this._oncancel(r)}),this.setNotificationHandler(Tv,r=>{this._onprogress(r)}),this.setRequestHandler(Pv,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(zv,async(r,n)=>{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new $e(Ae.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(jv,async(r,n)=>{let i=async()=>{let a=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(a,n.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{let d=c,f=new $e(d.error.code,d.error.message,d.error.data);l(f)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:n.requestId})}}let o=await this._taskStore.getTask(a,n.sessionId);if(!o)throw new $e(Ae.InvalidParams,`Task not found: ${a}`);if(!lo(o.status))return await this._waitForTaskUpdate(a,n.signal),await i();if(lo(o.status)){let s=await this._taskStore.getTaskResult(a,n.sessionId);return this._clearTaskQueue(a),{...s,_meta:{...s._meta,[uo]:{taskId:a}}}}return await i()};return await i()}),this.setRequestHandler(Nv,async(r,n)=>{try{let{tasks:i,nextCursor:a}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:i,nextCursor:a,_meta:{}}}catch(i){throw new $e(Ae.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(Cv,async(r,n)=>{try{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new $e(Ae.InvalidParams,`Task not found: ${r.params.taskId}`);if(lo(i.status))throw new $e(Ae.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let a=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!a)throw new $e(Ae.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...a}}catch(i){throw i instanceof $e?i:new $e(Ae.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,n,i,a=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:a,onTimeout:i})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),$e.fromError(Ae.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=a=>{n?.(a),this._onerror(a)};let i=this._transport?.onmessage;this._transport.onmessage=(a,o)=>{i?.(a,o),Pp(a)||vZ(a)?this._onresponse(a):XE(a)?this._onrequest(a,o):gZ(a)?this._onnotification(a):this._onerror(new Error(`Unknown message type: ${JSON.stringify(a)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._timeoutInfo.values())clearTimeout(n.timeoutId);this._timeoutInfo.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=$e.fromError(Ae.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of e.values())n(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,a=e.params?._meta?.[uo]?.taskId;if(n===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:Ae.MethodNotFound,message:"Method not found"}};a&&this._taskMessageQueue?this._enqueueTaskMessage(a,{type:"error",message:l,timestamp:Date.now()},i?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):i?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);let s=fZ(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,u={signal:o.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(o.signal.aborted)return;let d={relatedRequestId:e.id};a&&(d.relatedTask={taskId:a}),await this.notification(l,d)},sendRequest:async(l,d,f)=>{if(o.signal.aborted)throw new $e(Ae.ConnectionClosed,"Request was cancelled");let p={...f,relatedRequestId:e.id};a&&!p.relatedTask&&(p.relatedTask={taskId:a});let m=p.relatedTask?.taskId??a;return m&&c&&await c.updateTaskStatus(m,"input_required"),await this.request(l,d,p)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:a,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,u)).then(async l=>{if(o.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:e.id};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"response",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)},async l=>{if(o.signal.aborted)return;let d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:Ae.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"error",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===o&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,i=Number(r),a=this._progressHandlers.get(i);if(!a){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&o&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(c){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(c);return}a(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Pp(e))n(e);else{let o=new $e(e.error.code,e.error.message,e.error.data);n(o)}return}let i=this._responseHandlers.get(r);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let a=!1;if(Pp(e)&&e.result&&typeof e.result=="object"){let o=e.result;if(o.task&&typeof o.task=="object"){let s=o.task;typeof s.taskId=="string"&&(a=!0,this._taskProgressTokens.set(s.taskId,r))}}if(a||this._progressHandlers.delete(r),Pp(e))i(e);else{let o=$e.fromError(e.error.code,e.error.message,e.error.data);i(o)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,n){let{task:i}=n??{};if(!i){try{yield{type:"result",result:await this.request(e,r,n)}}catch(o){yield{type:"error",error:o instanceof $e?o:new $e(Ae.InternalError,String(o))}}return}let a;try{let o=await this.request(e,fs,n);if(o.task)a=o.task.taskId,yield{type:"taskCreated",task:o.task};else throw new $e(Ae.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:a},n);if(yield{type:"taskStatus",task:s},lo(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:a},r,n)}:s.status==="failed"?yield{type:"error",error:new $e(Ae.InternalError,`Task ${a} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new $e(Ae.InternalError,`Task ${a} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:a},r,n)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(o){yield{type:"error",error:o instanceof $e?o:new $e(Ae.InternalError,String(o))}}}request(e,r,n){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,task:s,relatedTask:c}=n??{};return new Promise((u,l)=>{let d=b=>{l(b)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch(b){d(b);return}n?.signal?.throwIfAborted();let f=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:f};n?.onprogress&&(this._progressHandlers.set(f,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),s&&(p.params={...p.params,task:s}),c&&(p.params={...p.params,_meta:{...p.params?._meta||{},[uo]:c}});let m=b=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(b)}},{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`)));let y=b instanceof $e?b:new $e(Ae.RequestTimeout,String(b));l(y)};this._responseHandlers.set(f,b=>{if(!n?.signal?.aborted){if(b instanceof Error)return l(b);try{let y=ji(r,b.result);y.success?u(y.data):l(y.error)}catch(y){l(y)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});let v=n?.timeout??Mue,g=()=>m($e.fromError(Ae.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let h=c?.taskId;if(h){let b=y=>{let _=this._responseHandlers.get(f);_?_(y):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,b),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(f),l(y)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(b=>{this._cleanupTimeout(f),l(b)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},Ov,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},Rv,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},bZ,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=r?.relatedTask?.taskId;if(n){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[uo]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let s={...e,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[uo]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let o={...e,jsonrpc:"2.0"};r?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[uo]:r.relatedTask}}}),await this._transport.send(o,r)}setRequestHandler(e,r){let n=SP(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,a)=>{let o=$P(e,i);return Promise.resolve(r(o,a))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let n=SP(e);this._notificationHandlers.set(n,i=>{let a=$P(e,i);return Promise.resolve(r(a))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,i)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let i of n)if(i.type==="request"&&XE(i.message)){let a=i.message.id,o=this._requestResolvers.get(a);o?(o(new $e(Ae.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(a)):this._onerror(new Error(`Resolver missing for request ${a} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let i=await this._taskStore?.getTask(e);i?.pollInterval&&(n=i.pollInterval)}catch{}return new Promise((i,a)=>{if(r.aborted){a(new $e(Ae.InvalidRequest,"Request cancelled"));return}let o=setTimeout(i,n);r.addEventListener("abort",()=>{clearTimeout(o),a(new $e(Ae.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},r)},getTask:async i=>{let a=await n.getTask(i,r);if(!a)throw new $e(Ae.InvalidParams,"Failed to retrieve task: Task not found");return a},storeTaskResult:async(i,a,o)=>{await n.storeTaskResult(i,a,o,r);let s=await n.getTask(i,r);if(s){let c=Np.parse({method:"notifications/tasks/status",params:s});await this.notification(c),lo(s.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,a,o)=>{let s=await n.getTask(i,r);if(!s)throw new $e(Ae.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(lo(s.status))throw new $e(Ae.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${a}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,a,o,r);let c=await n.getTask(i,r);if(c){let u=Np.parse({method:"notifications/tasks/status",params:c});await this.notification(u),lo(c.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}};function PZ(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function TZ(t,e){let r={...t};for(let n in e){let i=n,a=e[i];if(a===void 0)continue;let o=r[i];PZ(o)&&PZ(a)?r[i]={...o,...a}:r[i]=a}return r}var TW=Yu(t9(),1),zW=Yu(PW(),1);function $be(){let t=new TW.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,zW.default)(t),t}var Hy=class{constructor(e){this._ajv=e??$be()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var Gy=class{constructor(e){this._client=e}async*callToolStream(e,r=fu,n){let i=this._client,a={...n,task:n?.task??(i.isToolTask(e.name)?{}:void 0)},o=i.requestStream({method:"tools/call",params:e},r,a),s=i.getToolOutputValidator(e.name);for await(let c of o){if(c.type==="result"&&s){let u=c.result;if(!u.structuredContent&&!u.isError){yield{type:"error",error:new $e(Ae.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(u.structuredContent)try{let l=s(u.structuredContent);if(!l.valid){yield{type:"error",error:new $e(Ae.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof $e){yield{type:"error",error:l};return}yield{type:"error",error:new $e(Ae.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield c}}async getTask(e,r){return this._client.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._client.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._client.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._client.cancelTask({taskId:e},r)}requestStream(e,r,n){return this._client.requestStream(e,r,n)}};function OW(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function jW(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}function Qy(t,e){if(!(!t||e===null||typeof e!="object")){if(t.type==="object"&&t.properties&&typeof t.properties=="object"){let r=e,n=t.properties;for(let i of Object.keys(n)){let a=n[i];r[i]===void 0&&Object.prototype.hasOwnProperty.call(a,"default")&&(r[i]=a.default),r[i]!==void 0&&Qy(a,r[i])}}if(Array.isArray(t.anyOf))for(let r of t.anyOf)typeof r!="boolean"&&Qy(r,e);if(Array.isArray(t.oneOf))for(let r of t.oneOf)typeof r!="boolean"&&Qy(r,e)}}function Ibe(t){if(!t)return{supportsFormMode:!1,supportsUrlMode:!1};let e=t.form!==void 0,r=t.url!==void 0;return{supportsFormMode:e||!e&&!r,supportsUrlMode:r}}var Yy=class extends Av{constructor(e,r){super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new Hy,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",vP,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",hP,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",cP,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Gy(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=TZ(this._capabilities,e)}setRequestHandler(e,r){let i=kv(e)?.method;if(!i)throw new Error("Schema is missing a method literal");let a;if(lu(i)){let s=i;a=s._zod?.def?.value??s.value}else{let s=i;a=s._def?.value??s.value}if(typeof a!="string")throw new Error("Schema method literal must be a string");let o=a;if(o==="elicitation/create"){let s=async(c,u)=>{let l=ji(xP,c);if(!l.success){let b=l.error instanceof Error?l.error.message:String(l.error);throw new $e(Ae.InvalidParams,`Invalid elicitation request: ${b}`)}let{params:d}=l.data;d.mode=d.mode??"form";let{supportsFormMode:f,supportsUrlMode:p}=Ibe(this._capabilities.elicitation);if(d.mode==="form"&&!f)throw new $e(Ae.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!p)throw new $e(Ae.InvalidParams,"Client does not support URL-mode elicitation requests");let m=await Promise.resolve(r(c,u));if(d.task){let b=ji(fs,m);if(!b.success){let y=b.error instanceof Error?b.error.message:String(b.error);throw new $e(Ae.InvalidParams,`Invalid task creation result: ${y}`)}return b.data}let v=ji(wP,m);if(!v.success){let b=v.error instanceof Error?v.error.message:String(v.error);throw new $e(Ae.InvalidParams,`Invalid elicitation result: ${b}`)}let g=v.data,h=d.mode==="form"?d.requestedSchema:void 0;if(d.mode==="form"&&g.action==="accept"&&g.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{Qy(h,g.content)}catch{}return g};return super.setRequestHandler(e,s)}if(o==="sampling/createMessage"){let s=async(c,u)=>{let l=ji(yP,c);if(!l.success){let g=l.error instanceof Error?l.error.message:String(l.error);throw new $e(Ae.InvalidParams,`Invalid sampling request: ${g}`)}let{params:d}=l.data,f=await Promise.resolve(r(c,u));if(d.task){let g=ji(fs,f);if(!g.success){let h=g.error instanceof Error?g.error.message:String(g.error);throw new $e(Ae.InvalidParams,`Invalid task creation result: ${h}`)}return g.data}let m=d.tools||d.toolChoice?bP:_P,v=ji(m,f);if(!v.success){let g=v.error instanceof Error?v.error.message:String(v.error);throw new $e(Ae.InvalidParams,`Invalid sampling result: ${g}`)}return v.data};return super.setRequestHandler(e,s)}return super.setRequestHandler(e,r)}assertCapability(e,r){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:YE,capabilities:this._capabilities,clientInfo:this._clientInfo}},rP,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!lZ.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break;case"ping":break}}assertTaskCapability(e){OW(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&jW(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},ps,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},kP,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},ps,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},mP,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},uP,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},iP,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},aP,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},sP,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},ps,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},ps,r)}async callTool(e,r=fu,n){if(this.isToolTaskRequired(e.name))throw new $e(Ae.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let i=await this.request({method:"tools/call",params:e},r,n),a=this.getToolOutputValidator(e.name);if(a){if(!i.structuredContent&&!i.isError)throw new $e(Ae.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent)try{let o=a(i.structuredContent);if(!o.valid)throw new $e(Ae.InvalidParams,`Structured content does not match the tool's output schema: ${o.errorMessage}`)}catch(o){throw o instanceof $e?o:new $e(Ae.InvalidParams,`Failed to validate structured content: ${o instanceof Error?o.message:String(o)}`)}}return i}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of e){if(r.outputSchema){let i=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,i)}let n=r.execution?.taskSupport;(n==="required"||n==="optional")&&this._cachedKnownTaskTools.add(r.name),n==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let n=await this.request({method:"tools/list",params:e},gP,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,r,n,i){let a=IZ.safeParse(n);if(!a.success)throw new Error(`Invalid ${e} listChanged options: ${a.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:o,debounceMs:s}=a.data,{onChanged:c}=n,u=async()=>{if(!o){c(null,null);return}try{let d=await i();c(null,d)}catch(d){let f=d instanceof Error?d:new Error(String(d));c(f,null)}},l=()=>{if(s){let d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);let f=setTimeout(u,s);this._listChangedDebounceTimers.set(e,f)}else u()};this.setNotificationHandler(r,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};var w3=Yu(b3(),1);import i1 from"node:process";import{PassThrough as exe}from"node:stream";var Xy=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
254
|
+
`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),Xbe(r)}clear(){this._buffer=void 0}};function Xbe(t){return yZ.parse(JSON.parse(t))}function x3(t){return JSON.stringify(t)+`
|
|
255
|
+
`}var txe=i1.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function rxe(){let t={};for(let e of txe){let r=i1.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}var e_=class{constructor(e){this._readBuffer=new Xy,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new exe)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._process=(0,w3.default)(this._serverParams.command,this._serverParams.args??[],{env:{...rxe(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:i1.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){let e=this._process;this._process=void 0;let r=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=x3(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}};var t_=class{#e=new Map;async ensureServer(e,r){if(this.#e.has(e))return this.#e.get(e);let{command:n,args:i=[],env:a={}}=r;K.debug(`[MCP] Starting ${e}: ${n} ${i.join(" ")}`);let o=new e_({command:n,args:i,env:{...process.env,...a}}),s=new Yy({name:`zibby-chat-${e}`,version:"1.0.0"},{capabilities:{}});await s.connect(o);let c={client:s,transport:o,serverConfig:r};return this.#e.set(e,c),c}async callTool(e,r,n={}){let i=this.#e.get(e);if(!i)throw new Error(`MCP server "${e}" not running`);K.debug(`[MCP] ${e}.${r}(${JSON.stringify(n).slice(0,200)})`);let a=await i.client.callTool({name:r,arguments:n});return{text:a.content?.filter(s=>s.type==="text").map(s=>s.text).join(`
|
|
256
|
+
`)||"",isError:a.isError||!1}}isRunning(e){return this.#e.has(e)}async stopServer(e){let r=this.#e.get(e);if(r){try{await r.client.close()}catch(n){K.debug(`[MCP] Error closing ${e}: ${n.message}`)}this.#e.delete(e)}}async stopAll(){let e=[...this.#e.keys()];await Promise.allSettled(e.map(r=>this.stopServer(r)))}};Eo();import{existsSync as nxe,readFileSync as ixe}from"fs";import{join as axe}from"path";import{homedir as oxe}from"os";function sxe(){try{let t=axe(oxe(),".zibby","config.json");return nxe(t)?JSON.parse(ixe(t,"utf-8")):{}}catch{return{}}}function r_(t){return String(t||"").replace(/\/v1\/?$/,"")}function cxe(t,e){let r=process.env.OPENAI_PROXY_URL;if(r)return r_(r);if(t==="session")return e.proxyUrl?r_(e.proxyUrl):`${(process.env.ZIBBY_API_URL||"https://api-prod.zibby.app").replace(/\/$/,"")}/openai-proxy`;if(t==="byok"){let n=process.env.OPENAI_BASE_URL;return r_(n||"https://api.openai.com")}return r_(r||"")}function a1(){let t=sxe(),e=process.env.ZIBBY_USER_TOKEN||t.sessionToken||null,r=process.env.OPENAI_API_KEY||null,n=(process.env.ASSISTANT_AUTH_MODE||"").trim().toLowerCase(),i=process.env.OPENAI_PROXY_NO_AUTH==="true",a=process.env.OPENAI_PROXY_URL,o="session";n==="byok"||n==="local"||n==="session"?o=n:e?o="session":r?o="byok":a&&i&&(o="local");let s=cxe(o,t),c={"Content-Type":"application/json"};if(o==="session"){if(!e)return{ok:!1,mode:o,reason:"missing_session_token"};c.Authorization=`Bearer ${e}`}else if(o==="byok"){if(!r)return{ok:!1,mode:o,reason:"missing_openai_api_key"};c.Authorization=`Bearer ${r}`}else if(o==="local"){if(!s)return{ok:!1,mode:o,reason:"missing_openai_proxy_url"};!i&&r&&(c.Authorization=`Bearer ${r}`)}return s?{ok:!0,mode:o,baseUrl:s,headers:c,tokenPreview:c.Authorization?`***${c.Authorization.slice(-4)}`:"none"}:{ok:!1,mode:o,reason:"missing_base_url"}}function n_(t,e){let r=String(t??"");return r.length<=e?r:`${r.slice(0,Math.max(0,e-30))}
|
|
257
|
+
|
|
258
|
+
[tool result truncated for size]`}function uxe(t,e){if(typeof t=="string")return n_(t,e);try{return n_(JSON.stringify(t),e)}catch{return n_(String(t),e)}}function k3(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let a of i.tool_calls)e.add(a.id);let r=t.filter(i=>i.role==="tool"?e.has(i.tool_call_id):!0),n=new Set;for(let i of r)i.role==="tool"&&n.add(i.tool_call_id);return r.map(i=>{if(i.role!=="assistant"||!Array.isArray(i.tool_calls)||i.tool_calls.every(c=>n.has(c.id)))return i;let{tool_calls:o,...s}=i;return{...s,content:s.content||""}})}function lxe(t){let e=Array.isArray(t?.messages)?t.messages:[],r=e.find(a=>a.role==="system"),n=e.slice(-4).map(a=>({...a,content:n_(a.content,a.role==="tool"?1200:2500)}));n=k3(n);let i={...t,messages:[r,...n].filter(Boolean)};return delete i.tools,i}async function dxe({body:t,streaming:e,auth:r,options:n,fetchCompletion:i,fetchStreamingCompletion:a,onFallbackLog:o}){try{return e?await a(t,r,n):await i(t,r,n)}catch(s){let c=String(s?.message||s||"");if(!/proxy error 413|payload too large/i.test(c))throw s;let u=lxe(t);return typeof o=="function"&&o(t,u),{data:e?await a(u,r,n):await i(u,r,n),fallback:u}}}async function S3({body:t,auth:e,options:r,streaming:n,toolContext:i,activeSkills:a,round:o,verbose:s,dependencies:c,config:u={}}){let l=u.maxToolResultChars||3e3,{fetchCompletion:d,fetchStreamingCompletion:f,onFallbackLog:p,hasToolCalls:m,getTextContent:v,parseToolCalls:g,buildAssistantMessage:h,buildToolResultMessage:b,executeTool:y,onToolCallLog:_,injectTools:x}=c;Array.isArray(t?.messages)&&(t.messages=k3(t.messages));let w=await dxe({body:t,streaming:n,auth:e,options:r,fetchCompletion:d,fetchStreamingCompletion:f,onFallbackLog:p}),k=w?.data||w;if(!m(k))return{done:!0,text:v(k),body:w?.fallback||t};let $=g(k),P=w?.fallback||t;P.messages.push(h(k)),s&&typeof _=="function"&&_($);let C=await Promise.all($.map((T,D)=>(typeof r.onToolCall=="function"&&r.onToolCall(T.name,T.args,{round:o,index:D,total:$.length}),y(T,i))));for(let T=0;T<$.length;T++){let Z=$[T].name==="get_skill_context"?typeof C[T]=="string"?C[T]:JSON.stringify(C[T]):uxe(C[T],l);P.messages.push(b($[T].id,Z))}return typeof r.onToolCall=="function"&&r.onToolCall(null),x(P,a),{done:!1,body:P}}var pxe=Br.ASSISTANT,fxe=15,o1="get_skill_context";function Gu(t){!t||typeof t!="object"||(t.type==="object"&&t.properties&&(t.required=Object.keys(t.properties),t.additionalProperties=!1,Object.values(t.properties).forEach(Gu)),t.type==="array"&&t.items&&Gu(t.items),t.anyOf&&t.anyOf.forEach(Gu),t.oneOf&&t.oneOf.forEach(Gu),t.allOf&&t.allOf.forEach(Gu))}var $3={maxBytes:49e3,systemMaxChars:12e3},Hu=()=>process.env.ZIBBY_VERBOSE==="true"||process.env.ZIBBY_DEBUG==="true",mxe=t=>Buffer.byteLength(JSON.stringify(t),"utf8");function i_(t){return Array.isArray(t)?new Set(t.map(e=>String(e||"").trim()).filter(Boolean)):new Set}function hxe(t){return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):[]}var a_=class extends Tn{#e;#t;#r=new t_;constructor(e=null){super("assistant","Zibby Assistant",200),e&&typeof e=="object"&&(e.toolProvider||e.completionProvider)?(this.#e=e.toolProvider||new cu,this.#t=e.completionProvider||new uu):(this.#e=e||new cu,this.#t=new uu)}canHandle(e){return a1().ok}async invoke(e,r={}){let n=r.model&&r.model!=="auto"?r.model:pxe,i=a1();if(!i.ok)throw i.reason==="missing_session_token"?new Error("Login required. Run `zibby login` to authenticate."):i.reason==="missing_openai_api_key"?new Error("Missing OPENAI_API_KEY for BYOK mode."):i.reason==="missing_openai_proxy_url"?new Error("Missing OPENAI_PROXY_URL for local mode."):new Error(`Assistant auth unavailable (${i.reason}).`);let a=r.messages||[{role:"user",content:e}],o=i.baseUrl,s=Hu();if(s?await this.#m(a,n,o,i.tokenPreview||"none"):K.debug(`[Assistant] ${o} | model: ${n} | messages: ${a.length}`),r.schema)return this.#u(n,a,i,r);let c=r.activeSkills||[],u=this.#d(r),l=this.#p(c,u),d=this.#f(l),f=this.#l(r),p={...r,payloadCompaction:f},m={activeSkills:l,options:p,executionRegistry:d,capabilityPolicy:u},v=!!r.stream,g={model:n,messages:[...a],stream:!1};this.#i(g,l,u);for(let h=0;h<fxe;h++){if(r.signal?.aborted)throw new Error("Aborted");let b=await S3({body:g,auth:i,options:p,streaming:v,toolContext:m,activeSkills:l,round:h,verbose:s,dependencies:{fetchCompletion:this.#a.bind(this),fetchStreamingCompletion:this.#c.bind(this),onFallbackLog:(y,_)=>{Hu()&&console.log(`413 fallback: messages ${y.messages.length} -> ${_.messages.length}, bytes=${mxe(_)}`)},hasToolCalls:y=>this.#e.hasToolCalls(y),getTextContent:y=>this.#e.getTextContent(y),parseToolCalls:y=>this.#e.parseToolCalls(y),buildAssistantMessage:y=>this.#e.buildAssistantMessage(y),buildToolResultMessage:(y,_)=>this.#e.buildToolResultMessage(y,_),executeTool:(y,_)=>this.#s(y,_),onToolCallLog:async y=>{let _=(await import("chalk")).default;console.log(_.dim(` ${y.map(x=>`${x.name}(${JSON.stringify(x.args).slice(0,80)})`).join(", ")}`))},injectTools:(y,_)=>this.#i(y,_,u)},config:{maxToolResultChars:r.maxToolResultChars||3e3}});if(b.done)return b.text;g.messages=b.body.messages,b.body.tools?g.tools=b.body.tools:delete g.tools}return"I hit my tool-calling limit for this turn. Please try again."}async cleanup(){await this.#r.stopAll()}#i(e,r,n=null){let i=this.#o(r,n),a=this.#e.formatTools(i);this.#e.injectToolsIntoBody(e,a)}#o(e,r=null){let n=[],i=new Set;for(let a of e){let o=Kr(a);if(o?.tools?.length)for(let s of o.tools)this.#n(s.name,r)&&(i.has(s.name)||(i.add(s.name),n.push({name:s.name,description:s.description,parameters:s.parameters||s.input_schema||{type:"object",properties:{}}})))}return!r?.disableSkillContextTool&&this.#n(o1,r)&&n.push({name:o1,description:"Fetch full prompt guidance/instructions for one installed skill on demand. Use this before making complex tool decisions if guidance is needed.",parameters:{type:"object",properties:{skillId:{type:"string",description:"Installed skill id to inspect (e.g. jira, github, runner, chat-memory)"}},required:["skillId"]}}),n}async#s(e,r){let{activeSkills:n,options:i,executionRegistry:a,capabilityPolicy:o}=r;if(!this.#n(e.name,o))return`Tool "${e.name}" blocked by policy`;if(e.name===o1){let u=String(e.args?.skillId||"").trim();if(!u)return JSON.stringify({error:"skillId is required"});if(!n.includes(u))return JSON.stringify({error:`Skill "${u}" is not active`,activeSkills:n});let l=Kr(u);if(!l)return JSON.stringify({error:`Skill "${u}" not found`});let d=typeof l.promptFragment=="function"?l.promptFragment():l.promptFragment||"",f=(l.tools||[]).map(m=>m.name),p=JSON.stringify({skillId:u,description:l.description||"",toolNames:f,promptFragment:d||""});return Hu()&&(console.log(`
|
|
259
|
+
\u{1F4D6} get_skill_context("${u}") \u2192 ${p.length} chars (fragment: ${d.length} chars)`),console.log(` tools: [${f.join(", ")}]`),console.log(` fragment preview: ${d.slice(0,200).replace(/\n/g,"\\n")}\u2026
|
|
260
|
+
`)),p}let s=a?.get(e.name)||null;if(!s)return`Unknown tool: ${e.name}`;let c=Kr(s.skillId);if(!c)return`Skill "${s.skillId}" not found for tool "${e.name}"`;if(s.mode==="handler")try{return c.handleToolCall(e.name,e.args,r)}catch(u){return`Error in ${e.name}: ${u.message}`}if(s.mode==="mcp")try{if(!this.#r.isRunning(c.serverName)){let l=c.resolve(i);if(!l)return`Skill "${s.skillId}" is not available (cannot start server)`;await this.#r.ensureServer(c.serverName,l)}let u=await this.#r.callTool(c.serverName,e.name,e.args);return u.text||(u.isError?"Tool call failed":"Done")}catch(u){return`MCP error (${c.serverName}): ${u.message}`}return`Skill "${s.skillId}" owns tool "${e.name}" but has no execution mode`}async#c(e,r,n){return this.#t.fetchStreamingCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:a})=>{Hu()&&console.log(`payload bytes (stream) before=${i} after=${a.bytes} trimmed=${a.trimmed} messages=${a.messageCount}`)}})}async#a(e,r,n){return this.#t.fetchCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:a})=>{Hu()&&console.log(`payload bytes before=${i} after=${a.bytes} trimmed=${a.trimmed} messages=${a.messageCount}`)}})}async#u(e,r,n,i){let{zodToJsonSchema:a}=await Promise.resolve().then(()=>(zo(),$1)),o=typeof i.schema?.parse=="function",s=o?a(i.schema):i.schema;delete s.$schema,Gu(s);let c={model:e,messages:r,stream:!1,response_format:{type:"json_schema",json_schema:{name:"extract",schema:s,strict:!0}}},u=await this.#a(c,n,i),l=this.#e.getTextContent(u),d=JSON.parse(l),f=o?i.schema.parse(d):d;return{raw:l,structured:f}}#l(e={}){let r=e?.config?.agent?.assistant?.payloadCompaction||{};return{maxBytes:Number(r.maxBytes||e.maxPayloadBytes||$3.maxBytes),systemMaxChars:Number(r.systemMaxChars||$3.systemMaxChars)}}#d(e={}){let r=e?.config?.agent?.assistant?.toolPolicy||{};return{allowTools:i_(r.allowTools||e.allowTools),denyTools:i_(r.denyTools||e.denyTools),denyPrefixes:hxe(r.denyPrefixes||e.denyToolPrefixes),includeSkills:i_(r.includeSkills||e.includeSkills),excludeSkills:i_(r.excludeSkills||e.excludeSkills),disableSkillContextTool:!!(r.disableSkillContextTool||e.disableSkillContextTool)}}#p(e,r){let n=r?.includeSkills||new Set,i=r?.excludeSkills||new Set;return n.size===0&&i.size===0?e:e.filter(a=>!(n.size>0&&!n.has(a)||i.has(a)))}#n(e,r){let n=String(e||"").trim();if(!n)return!1;let i=r?.allowTools;if(i&&i.size>0&&!i.has(n))return!1;let a=r?.denyTools;return!(a&&a.has(n)||(r?.denyPrefixes||[]).some(s=>n.startsWith(s)))}#f(e){let r=new Map,n=[];for(let i of e){let a=Kr(i);if(!a?.tools?.length)continue;let o=typeof a.handleToolCall=="function"?"handler":a.serverName&&typeof a.resolve=="function"?"mcp":null;if(o)for(let s of a.tools){let c=String(s?.name||"").trim();if(c){if(r.has(c)){n.push({tool:c,winner:r.get(c).skillId,skipped:i});continue}r.set(c,{skillId:i,mode:o})}}}if(n.length>0&&Hu()){let i=n.slice(0,5).map(a=>`${a.tool}:${a.winner}>${a.skipped}`).join(", ");console.log(`tool registry collisions: ${i}${n.length>5?" ...":""}`)}return r}async#m(e,r,n,i){console.log(`
|
|
261
|
+
\u25C6 Model: ${r} | proxy: ${n} | token: ${i||"none"}
|
|
262
|
+
`);let a=(await import("chalk")).default;console.log(a.bold("Prompt sent to LLM:")),console.log(a.dim("\u2500".repeat(60)));let o=!1;for(let s of e)if(s.role==="system")console.log(a.dim(`[System] ${s.content||""}`));else{o||(console.log(a.dim("\u2500\u2500\u2500 chat history \u2500\u2500\u2500")),o=!0);let c=s.role==="user"?"Human":"AI",u=s.content?.length>200?`${s.content.slice(0,200)}...`:s.content||"";console.log(a.dim(`[${c}] ${u}`))}console.log(a.dim("\u2500".repeat(60)))}};var I3=[new a_,new Oh,new vv,new _v,new bv];function gxe(t={}){let{state:e={},preferredAgent:r=null}=t,n=r||e.agentType||process.env.AGENT_TYPE;if(!n)throw new Error("No agent specified. Set agent.claude, agent.cursor, agent.codex, or agent.gemini in .zibby.config.js");K.debug(`Agent selection: requested=${n}`);let i=I3.find(a=>a.getName()===n);if(!i)throw new Error(`Unknown agent '${n}'. Available: ${I3.map(a=>a.getName()).join(", ")}`);if(K.debug(`Checking if ${n} can handle this environment...`),!i.canHandle(t)){let o={assistant:"Run `zibby login` to authenticate",claude:"Set ANTHROPIC_API_KEY in .env",cursor:"Install cursor-agent CLI or set CURSOR_API_KEY",codex:"Install codex CLI (npm i -g @openai/codex) and set OPENAI_API_KEY in .env",gemini:"Install gemini CLI (npm i -g @google/gemini-cli) and set GEMINI_API_KEY in .env"}[n]||"Check your environment configuration";throw new Error(`Agent '${n}' is not available. ${o}`)}return K.debug(`Using agent: ${i.getName()}`),i}async function XDe(t,e={},r={}){try{await import("@zibby/skills")}catch{}let n=gxe(e),i=e.state?.config||r.config||{},a=i.models||{},o=r.nodeName&&a[r.nodeName]||null,s=a.default||null,c=n.name,u=i.agent?.[c]?.model||null,l=o||s||u||r.model||null,d={...r,model:l,workspace:e.state?.workspace||r.workspace,schema:r.schema||e.schema,images:r.images||e.images||[],skills:r.skills||e.skills||[],config:i},f=d.skills||[];if(f.length>0&&!r.skipPromptFragments){let{getSkill:m}=await Promise.resolve().then(()=>(Eo(),f1)),v=f.map(g=>{let h=m(g)?.promptFragment;return typeof h=="function"?h():h}).filter(Boolean);v.length>0&&(t+=`
|
|
263
|
+
|
|
264
|
+
${v.join(`
|
|
265
|
+
|
|
266
|
+
`)}`)}let p=e.state?._currentNodeConfig?.extraPromptInstructions?.trim();return p&&(t+=`
|
|
6
267
|
|
|
7
268
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
8
269
|
\u26A0\uFE0F PRIORITY OVERRIDE \u2014 THE FOLLOWING INSTRUCTIONS TAKE PRECEDENCE OVER ALL PREVIOUS CONTENT
|
|
9
270
|
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
10
271
|
|
|
11
|
-
${
|
|
12
|
-
`),
|
|
13
|
-
${
|
|
272
|
+
${p}
|
|
273
|
+
`),K.debug(`Prompt length: ${t.length} chars`),process.env.STAGE!=="prod"&&K.debug(`Full prompt:
|
|
274
|
+
${t}`),n.invoke(t,d)}export{Tn as AgentStrategy,a_ as AssistantStrategy,vv as ClaudeAgentStrategy,_v as CodexAgentStrategy,Oh as CursorAgentStrategy,bv as GeminiAgentStrategy,gxe as getAgentStrategy,XDe as invokeAgent};
|
|
275
|
+
/*! Bundled license information:
|
|
276
|
+
|
|
277
|
+
mime-db/index.js:
|
|
278
|
+
(*!
|
|
279
|
+
* mime-db
|
|
280
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
281
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
282
|
+
* MIT Licensed
|
|
283
|
+
*)
|
|
284
|
+
|
|
285
|
+
mime-types/index.js:
|
|
286
|
+
(*!
|
|
287
|
+
* mime-types
|
|
288
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
289
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
290
|
+
* MIT Licensed
|
|
291
|
+
*)
|
|
292
|
+
*/
|