@zibby/core 0.1.31 → 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.
Files changed (94) hide show
  1. package/dist/agents/base.js +319 -14
  2. package/dist/backend-client.js +1 -1
  3. package/dist/constants/tool-names.js +1 -1
  4. package/dist/constants/zibby-scratch.js +1 -1
  5. package/dist/constants.js +1 -1
  6. package/dist/enrichment/base.js +1 -1
  7. package/dist/enrichment/enrichers/accessibility-enricher.js +1 -1
  8. package/dist/enrichment/enrichers/dom-enricher.js +1 -1
  9. package/dist/enrichment/enrichers/page-state-enricher.js +1 -1
  10. package/dist/enrichment/enrichers/position-enricher.js +1 -1
  11. package/dist/enrichment/index.js +4 -1
  12. package/dist/enrichment/mcp-integration.js +4 -1
  13. package/dist/enrichment/mcp-ref-enricher.js +1 -1
  14. package/dist/enrichment/pipeline.js +2 -2
  15. package/dist/enrichment/trace-text-enricher.js +2 -1
  16. package/dist/framework/agents/assistant-strategy.js +69 -5
  17. package/dist/framework/agents/base.js +1 -1
  18. package/dist/framework/agents/claude-strategy.js +107 -4
  19. package/dist/framework/agents/codex-strategy.js +23 -4
  20. package/dist/framework/agents/cursor-strategy.js +138 -20
  21. package/dist/framework/agents/gemini-strategy.js +34 -7
  22. package/dist/framework/agents/index.js +285 -6
  23. package/dist/framework/agents/middleware/assistant-round-pipeline.js +2 -2
  24. package/dist/framework/agents/providers/base.js +1 -1
  25. package/dist/framework/agents/providers/index.js +4 -1
  26. package/dist/framework/agents/providers/openai-transport.js +4 -2
  27. package/dist/framework/agents/providers/openai.js +1 -1
  28. package/dist/framework/agents/providers/transport-base.js +1 -1
  29. package/dist/framework/agents/utils/auth-resolver.js +1 -1
  30. package/dist/framework/agents/utils/cursor-output-formatter.js +25 -1
  31. package/dist/framework/agents/utils/openai-proxy-formatter.js +75 -5
  32. package/dist/framework/agents/utils/payload-budget.js +2 -2
  33. package/dist/framework/agents/utils/structured-output-formatter.js +8 -4
  34. package/dist/framework/code-generator.js +309 -10
  35. package/dist/framework/constants.js +1 -1
  36. package/dist/framework/context-loader.js +2 -2
  37. package/dist/framework/function-bridge.js +60 -1
  38. package/dist/framework/function-skill-registry.js +1 -1
  39. package/dist/framework/graph-compiler.js +314 -1
  40. package/dist/framework/graph.js +305 -4
  41. package/dist/framework/index.js +331 -1
  42. package/dist/framework/mcp-client.js +56 -2
  43. package/dist/framework/node-registry.js +294 -3
  44. package/dist/framework/node.js +297 -4
  45. package/dist/framework/output-parser.js +2 -2
  46. package/dist/framework/skill-registry.js +1 -1
  47. package/dist/framework/state-utils.js +5 -1
  48. package/dist/framework/state.js +1 -1
  49. package/dist/framework/tool-resolver.js +1 -1
  50. package/dist/index.js +512 -5
  51. package/dist/package.json +1 -1
  52. package/dist/runtime/generation/base.js +1 -1
  53. package/dist/runtime/generation/index.js +58 -3
  54. package/dist/runtime/generation/mcp-ref-strategy.js +17 -17
  55. package/dist/runtime/generation/stable-id-strategy.js +14 -14
  56. package/dist/runtime/stable-id-runtime.js +1 -1
  57. package/dist/runtime/verification/base.js +1 -1
  58. package/dist/runtime/verification/index.js +3 -3
  59. package/dist/runtime/verification/playwright-json-strategy.js +1 -1
  60. package/dist/runtime/zibby-runtime.js +1 -1
  61. package/dist/sync/index.js +1 -1
  62. package/dist/sync/uploader.js +1 -1
  63. package/dist/tools/run-playwright-test.js +3 -3
  64. package/dist/utils/adf-converter.js +1 -1
  65. package/dist/utils/ast-utils.js +9 -1
  66. package/dist/utils/ci-setup.js +4 -4
  67. package/dist/utils/cursor-mcp-isolated-home.js +1 -1
  68. package/dist/utils/cursor-utils.js +1 -1
  69. package/dist/utils/live-frame-discovery.js +1 -1
  70. package/dist/utils/logger.js +1 -1
  71. package/dist/utils/mcp-config-writer.js +4 -4
  72. package/dist/utils/mission-control-from-run-states.js +1 -1
  73. package/dist/utils/node-schema-parser.js +9 -1
  74. package/dist/utils/parallel-config.js +1 -1
  75. package/dist/utils/post-process-events.js +2 -1
  76. package/dist/utils/repo-clone.js +1 -0
  77. package/dist/utils/result-handler.js +1 -1
  78. package/dist/utils/ripple-effect.js +1 -1
  79. package/dist/utils/run-capacity-coordinator.js +3 -1
  80. package/dist/utils/run-capacity-queue.js +2 -2
  81. package/dist/utils/run-index-merge.js +1 -1
  82. package/dist/utils/run-index-post-cli.js +4 -1
  83. package/dist/utils/run-registry.js +3 -3
  84. package/dist/utils/run-state-session.js +2 -2
  85. package/dist/utils/selector-generator.js +4 -4
  86. package/dist/utils/session-state-constants.js +1 -1
  87. package/dist/utils/session-state-live-runs.js +1 -1
  88. package/dist/utils/streaming-parser.js +3 -3
  89. package/dist/utils/test-post-processor.js +14 -11
  90. package/dist/utils/timeline.js +6 -6
  91. package/dist/utils/trace-parser.js +2 -2
  92. package/dist/utils/video-organizer.js +3 -3
  93. package/package.json +1 -1
  94. package/templates/browser-test-automation/result-handler.mjs +4 -39
@@ -1 +1,331 @@
1
- import{WorkflowGraph as r}from"./graph.js";import{Node as l,ConditionalNode as p}from"./node.js";import{WorkflowState as a}from"./state.js";import{OutputParser as f,SchemaTypes as g}from"./output-parser.js";import{compileGraph as n,validateGraphConfig as d,extractSteps as x,CompilationError as S}from"./graph-compiler.js";import{registerNode as k,getNodeImpl as h,hasNode as T,listNodeTypes as A,getNodeTemplate as C}from"./node-registry.js";import{resolveNodeTools as y,getResolvedToolDefinitions as O,NODE_DEFAULT_TOOLS as c}from"./tool-resolver.js";import{registerSkill as D,getSkill as E,hasSkill as G,getAllSkills as W,listSkillIds as u}from"./skill-registry.js";import{generateWorkflowCode as L,generateNodeConfigsJson as _}from"./code-generator.js";import{hasAgentCall as J}from"../utils/ast-utils.js";import{AgentStrategy as R}from"./agents/base.js";import{invokeAgent as b,getAgentStrategy as j}from"./agents/index.js";export{R as AgentStrategy,S as CompilationError,p as ConditionalNode,c as NODE_DEFAULT_TOOLS,l as Node,f as OutputParser,g as SchemaTypes,r as WorkflowGraph,a as WorkflowState,n as compileGraph,x as extractSteps,_ as generateNodeConfigsJson,L as generateWorkflowCode,j as getAgentStrategy,W as getAllSkills,h as getNodeImpl,C as getNodeTemplate,O as getResolvedToolDefinitions,E as getSkill,J as hasAgentCall,T as hasNode,G as hasSkill,b as invokeAgent,A as listNodeTypes,u as listSkillIds,k as registerNode,D as registerSkill,y as resolveNodeTools,d as validateGraphConfig};
1
+ var C8=Object.create;var ix=Object.defineProperty;var N8=Object.getOwnPropertyDescriptor;var j8=Object.getOwnPropertyNames;var A8=Object.getPrototypeOf,R8=Object.prototype.hasOwnProperty;var Ot=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>()=>(e&&(t=e(e=0)),t);var C=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ga=(e,t)=>{for(var r in t)ix(e,r,{get:t[r],enumerable:!0})},U8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of j8(t))!R8.call(e,i)&&i!==r&&ix(e,i,{get:()=>t[i],enumerable:!(n=N8(t,i))||n.enumerable});return e};var Yl=(e,t,r)=>(r=e!=null?C8(A8(e)):{},U8(t||!e||!e.__esModule?ix(r,"default",{value:e,enumerable:!0}):r,e));import ed from"chalk";var va,sx,q,qi=P(()=>{va={debug:0,info:1,warn:2,error:3,silent:4},sx=class{constructor(){this._level=this._getLogLevel()}_getLogLevel(){if(process.env.ZIBBY_DEBUG==="true")return va.debug;if(process.env.ZIBBY_VERBOSE==="true")return va.info;let t=process.env.LOG_LEVEL?.toLowerCase();return t&&t in va?va[t]:va.info}_shouldLog(t){return va[t]>=this._level}_formatMessage(t,r,n={}){let i=new Date().toISOString(),s=`${this._getPrefix(t)} ${r}`;return Object.keys(n).length>0&&(s+=ed.dim(` ${JSON.stringify(n)}`)),s}_getPrefix(t){return{debug:ed.gray("[DEBUG]"),info:ed.cyan("[INFO]"),warn:ed.yellow("[WARN]"),error:ed.red("\u274C [ERROR]")}[t]||""}debug(t,r){this._shouldLog("debug")&&console.log(this._formatMessage("debug",t,r))}info(t,r){this._shouldLog("info")&&console.log(this._formatMessage("info",t,r))}warn(t,r){this._shouldLog("warn")&&console.warn(this._formatMessage("warn",t,r))}error(t,r){this._shouldLog("error")&&console.error(this._formatMessage("error",t,r))}setLevel(t){t in va&&(this._level=va[t])}getLevel(){return Object.keys(va).find(t=>va[t]===this._level)}},q=new sx});import Mr from"chalk";function cj(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function uj(e,t){return(r,n,i)=>{if(typeof r!="string")return e(r,n,i);let a=process.stdout.columns||120,s="";for(let o=0;o<r.length;o++){let c=r[o];t.lineStart&&(s+=sj,t.col=oj,t.lineStart=!1),c===`
2
+ `?(s+=c,t.lineStart=!0,t.col=0,t.inEsc=!1):c==="\x1B"?(t.inEsc=!0,s+=c):t.inEsc?(s+=c,(c>="A"&&c<="Z"||c>="a"&&c<="z")&&(t.inEsc=!1)):(t.col++,s+=c,t.col>=a&&(s+=`
3
+ ${sj}`,t.col=oj))}return e(s,n,i)}}var L8,td,q8,nj,ox,ij,aj,cx,sj,oj,ux,rr,Pc=P(()=>{L8="__WORKFLOW_GRAPH_LOG__",td=Mr.gray("\u2502"),q8=Mr.gray("\u250C"),nj=Mr.gray("\u2514"),ox=Mr.green("\u25C6"),ij=Mr.hex("#c084fc")("\u25C6"),aj=Mr.hex("#2dd4bf")("\u25C6"),cx=Mr.red("\u25C6"),sj=`${td} `,oj=2;ux=class{constructor(){this._currentNode=null,this._origStdoutWrite=null,this._origStderrWrite=null;let t=String(process.env.ZIBBY_RUN_SOURCE||"").trim().toLowerCase(),r=String(process.env.ZIBBY_WORKFLOW_GRAPH_LOG_MARKERS||"").trim()==="1";this._emitWorkflowGraphMarkers=r||t==="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 t={lineStart:!0,col:0,inEsc:!1},r={lineStart:!0,col:0,inEsc:!1};this._outState=t,this._errState=r,process.stdout.write=uj(this._origStdoutWrite,t),process.stderr.write=uj(this._origStderrWrite,r)}_stopIntercepting(){this._origStdoutWrite&&(this._outState&&!this._outState.lineStart&&this._origStdoutWrite(`
4
+ `),process.stdout.write=this._origStdoutWrite),this._origStderrWrite&&(this._errState&&!this._errState.lineStart&&this._origStderrWrite(`
5
+ `),process.stderr.write=this._origStderrWrite),this._origStdoutWrite=null,this._origStderrWrite=null}_rawWrite(t){(this._origStdoutWrite||process.stdout.write.bind(process.stdout))(`${t}
6
+ `)}_emitGraphLogMarker(t){if(!this._emitWorkflowGraphMarkers)return;let r=`${L8}${JSON.stringify(t)}
7
+ `;this._origStdoutWrite?this._origStdoutWrite(r):process.stdout.write(r)}_writeDot(t,r){this._origStdoutWrite?(this._outState&&!this._outState.lineStart&&(this._origStdoutWrite(`
8
+ `),this._outState.lineStart=!0,this._outState.col=0),this._origStdoutWrite(`${t} ${r}
9
+ `)):process.stdout.write.bind(process.stdout)(`${t} ${r}
10
+ `)}step(t){this._origStdoutWrite?this._writeDot(ox,t):process.stdout.write.bind(process.stdout)(`${td} ${ox} ${t}
11
+ `)}stepTool(t){this._origStdoutWrite?this._writeDot(ij,t):process.stdout.write.bind(process.stdout)(`${td} ${ij} ${t}
12
+ `)}stepMemory(t){let r=Mr.hex("#2dd4bf")(t);this._origStdoutWrite?this._writeDot(aj,r):process.stdout.write.bind(process.stdout)(`${td} ${aj} ${r}
13
+ `)}stepFail(t){this._origStdoutWrite?this._writeDot(cx,Mr.red(t)):process.stdout.write.bind(process.stdout)(`${td} ${cx} ${Mr.red(t)}
14
+ `)}nodeStart(t){this._currentNode=t,this._emitGraphLogMarker({phase:"node_begin",node:t}),this._rawWrite(`${q8} ${t}`),this._startIntercepting()}nodeComplete(t,r={}){this._stopIntercepting();let{duration:n,details:i}=r;if(i)for(let s of i)this._rawWrite(`${ox} ${s}`);let a=n?Mr.dim(` ${cj(n)}`):"";this._rawWrite(`${nj} ${Mr.green("done")}${a}`),this._emitGraphLogMarker({phase:"node_end",node:t}),this._rawWrite("")}nodeFailed(t,r,n={}){this._stopIntercepting();let{duration:i}=n,a=i?Mr.dim(` ${cj(i)}`):"";this._rawWrite(`${cx} ${Mr.red(r)}`),this._rawWrite(`${nj} ${Mr.red("failed")}${a}`),this._emitGraphLogMarker({phase:"node_end",node:t}),this._rawWrite("")}route(t,r){this._rawWrite(Mr.dim(` ${t} \u2192 ${r}`)),this._rawWrite("")}graphComplete(){this._rawWrite(Mr.green.bold("\u2713 Workflow completed"))}},rr=new ux});var Tc,lj,vs,uh,dj,lh=P(()=>{Tc=".zibby/output",lj="sessions",vs=".session-info.json",uh=".zibby-studio-stop",dj=["CI_JOB_ID","GITHUB_RUN_ID","CIRCLE_WORKFLOW_ID","BUILD_ID"]});var un,ys=P(()=>{un=class{constructor(t,r,n=0){this.name=t,this.description=r,this.priority=n}async invoke(t,r={}){throw new Error("AgentStrategy.invoke() must be implemented by subclass")}canHandle(t){throw new Error("AgentStrategy.canHandle() must be implemented by subclass")}getName(){return this.name}getDescription(){return this.description}getPriority(){return this.priority}}});var ln,lx,dx,pj,dh,fo=P(()=>{ln={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"},lx={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"},dx={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"},pj={auto:"gemini-2.5-pro","gemini-2.5-pro":"gemini-2.5-pro","gemini-2.5-flash":"gemini-2.5-flash"},dh={CURSOR_AGENT_DEFAULT:1200*1e3,OPENAI_REQUEST:18e4}});var px={};ga(px,{getAllSkills:()=>ph,getSkill:()=>Ar,hasSkill:()=>mj,listSkillIds:()=>hj,registerSkill:()=>fj});function fj(e){if(!e||typeof e.id!="string")throw new Error("Skill definition must include a string id");rd.set(e.id,Object.freeze({...e}))}function Ar(e){return rd.get(e)||null}function mj(e){return rd.has(e)}function ph(){return new Map(rd)}function hj(){return Array.from(rd.keys())}var rd,ya=P(()=>{rd=new Map});var Oc,fx=P(()=>{Oc=class e{constructor(){this.buffer="",this.extractedResult=null,this.rawText="",this.zodSchema=null,this.lastOutputLength=0,this.onToolCall=null,this._lastToolEmit=null}processChunk(t){if(!t)return null;this.buffer+=t;let r=this.buffer.split(`
15
+ `);this.buffer=r.pop()||"";let n="";for(let i of r)if(i.trim())try{let a=JSON.parse(i);this._emitToolCalls(a);let s=this.extractText(a);if(s){if(this.rawText&&s.startsWith(this.rawText)){let o=s.substring(this.rawText.length);this.rawText=s,n+=o}else(!this.rawText.includes(s)||s.length<20)&&(this.rawText+=s,n+=s);this.tryExtractResult(this.rawText)}else this.isValidResult(a)&&(this.rawText+=`${i}
16
+ `,n+=`${i}
17
+ `,this.extractedResult=a)}catch{if(i.includes('"text"')||i.includes('"content"')){let s=i.match(/"text"\s*:\s*"([^"]*)/),o=i.match(/"content"\s*:\s*"([^"]*)/),c=s?s[1]:o?o[1]:null;c&&!this.rawText.includes(c)&&(n+=c,this.rawText+=c)}}return n||null}flush(){if(!this.buffer.trim())return null;let t="";try{let r=JSON.parse(this.buffer);this._emitToolCalls(r);let n=this.extractText(r);n&&(this.rawText+=n,t+=n,this.tryExtractResult(n))}catch{this.rawText+=this.buffer,t+=this.buffer,this.tryExtractResult(this.buffer)}return this.buffer="",t||null}_emitToolCalls(t){if(!this.onToolCall)return;let r=(s,o)=>{if(!s)return;let c=`${s}:${JSON.stringify(o??{})}`;this._lastToolEmit!==c&&(this._lastToolEmit=c,this.onToolCall(s,o??void 0))},n=s=>{if(s!=null){if(typeof s=="object"&&!Array.isArray(s))return s;if(typeof s=="string")try{return JSON.parse(s)}catch{return}}};if(t.type==="tool_use"||t.type==="tool_call"){if(t.name){r(t.name,n(t.input??t.arguments));return}let s=t.tool_call;if(s&&typeof s=="object"&&!Array.isArray(s)){let o=Object.keys(s);if(o.length===1){let c=o[0],u=s[c],l=u&&typeof u=="object"?u.args??u.input??u:void 0;r(c,n(l))}return}return}if(Array.isArray(t.tool_calls)){for(let s of t.tool_calls)r(s.name,n(s.input??s.arguments));return}let i=t.message??t;if(Array.isArray(i?.tool_calls)){for(let s of i.tool_calls)r(s.name,n(s.input??s.arguments));return}let a=i?.content??t.content;if(Array.isArray(a))for(let s of a)(s.type==="tool_use"||s.type==="tool_call")&&s.name&&r(s.name,n(s.input??s.arguments))}extractText(t){if(t.type==="assistant"&&t.message?.content){let r=t.message.content;if(Array.isArray(r))return r.filter(n=>n.type==="text"&&n.text).map(n=>n.text).join("")}return t.type==="thinking"&&t.text||t.text?t.text:t.content&&typeof t.content=="string"?t.content:t.delta?t.delta:null}tryExtractResult(t){if(!t||typeof t!="string")return;let r=[],n=/```json\s*\n?([\s\S]*?)\n?```/g,i;for(;(i=n.exec(t))!==null;){let d=i[1].trim();try{JSON.parse(d),r.push({text:d,source:"markdown"})}catch{}}let a=0,s=0;for(;a<t.length&&(a=t.indexOf("{",a),a!==-1);){let d=0,p=a;for(let f=a;f<t.length;f++)if(t[f]==="{")d++;else if(t[f]==="}"&&(d--,d===0)){p=f,r.push({text:t.substring(a,p+1),source:"brace"}),s++;break}a=p+1}let o=this.extractedResult,c=o?JSON.stringify(o).length:0,u=0,l=-1;for(let d=0;d<r.length;d++){let p=r[d];try{let f=p.text.replace(/,(\s*[}\]])/g,"$1"),m=JSON.parse(f);this.isValidResult(m)&&(u++,c=JSON.stringify(m).length,o=m,l=d)}catch{}}o&&(this.extractedResult=o)}isValidResult(t){if(!t||typeof t!="object"||Array.isArray(t)||t.session_id||t.timestamp_ms||t.type||t.call_id||t.tool_call||t.result&&typeof t.result=="object"&&(t.result.success&&typeof t.result.success=="object"||t.result.error&&typeof t.result.error=="object")||t.args&&typeof t.args=="object")return!1;if(this.zodSchema)try{return this.zodSchema.parse(t),!0}catch{return!1}return!0}getResult(){return this.extractedResult}getRawText(){return this.rawText}static extractResult(t,r=null){let n=new e;n.zodSchema=r,n.processChunk(t),n.flush();let i=n.getResult();return!i&&process.env.LOG_LEVEL==="debug"&&console.error("[StreamingParser] No result extracted from",t?.length||0,"chars"),i}}});var hx,Z8,mx,gx,fh=P(()=>{hx=Symbol("Let zodToJsonSchema decide on which parser to use"),Z8=(e,t)=>{if(t.description)try{return{...e,...JSON.parse(t.description)}}catch{}return e},mx={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"},gx=e=>typeof e=="string"?{...mx,name:e}:{...mx,...e}});var vx,yx=P(()=>{fh();vx=e=>{let t=gx(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}}});function mh(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function vt(e,t,r,n,i){e[t]=r,mh(e,t,n,i)}var _s=P(()=>{});var nd,hh=P(()=>{nd=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")}});var yt,gj,me,Da,id=P(()=>{(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{let a={};for(let s of i)a[s]=s;return a},e.getValidEnumValues=i=>{let a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(let o of a)s[o]=i[o];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(let s of i)if(a(s))return s},e.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(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(yt||(yt={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(gj||(gj={}));me=yt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Da=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(e)?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(e)?me.array:e===null?me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?me.promise:typeof Map<"u"&&e instanceof Map?me.map:typeof Set<"u"&&e instanceof Set?me.set:typeof Date<"u"&&e instanceof Date?me.date:me.object;default:return me.unknown}}});var J,Hn,gh=P(()=>{id();J=yt.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"]),Hn=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(let s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let o=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(s))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,yt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=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(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Hn.create=e=>new Hn(e)});var F8,bs,_x=P(()=>{gh();id();F8=(e,t)=>{let r;switch(e.code){case J.invalid_type:e.received===me.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,yt.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${yt.joinValues(e.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${yt.joinValues(e.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${yt.joinValues(e.options)}, received '${e.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 e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:yt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case J.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case J.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.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 ${e.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=t.defaultError,yt.assertNever(e)}return{message:r}},bs=F8});function ad(){return V8}var V8,vh=P(()=>{_x();V8=bs});function ue(e,t){let r=ad(),n=yh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===bs?void 0:bs].filter(i=>!!i)});e.common.issues.push(n)}var yh,Yr,Re,zc,dn,bx,xx,mo,sd,wx=P(()=>{vh();_x();yh=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)o=u(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};Yr=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return Re;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let a=await i.key,s=await i.value;n.push({key:a,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return Re;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[a.value]=s.value)}return{status:t.value,value:n}}},Re=Object.freeze({status:"aborted"}),zc=e=>({status:"dirty",value:e}),dn=e=>({status:"valid",value:e}),bx=e=>e.status==="aborted",xx=e=>e.status==="dirty",mo=e=>e.status==="valid",sd=e=>typeof Promise<"u"&&e instanceof Promise});var vj=P(()=>{});var ke,yj=P(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}))});function He(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,o)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??n??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:c??r??o.defaultError}},description:i}}function xj(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function o7(e){return new RegExp(`^${xj(e)}$`)}function c7(e){let t=`${bj}T${xj(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function u7(e,t){return!!((t==="v4"||!t)&&e7.test(e)||(t==="v6"||!t)&&r7.test(e))}function l7(e,t){if(!Q8.test(e))return!1;try{let[r]=e.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||t&&i.alg!==t)}catch{return!1}}function d7(e,t){return!!((t==="v4"||!t)&&t7.test(e)||(t==="v6"||!t)&&n7.test(e))}function p7(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}function Cc(e){if(e instanceof Qn){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Zi.create(Cc(n))}return new Qn({...e._def,shape:()=>t})}else return e instanceof ws?new ws({...e._def,type:Cc(e.element)}):e instanceof Zi?Zi.create(Cc(e.unwrap())):e instanceof qa?qa.create(Cc(e.unwrap())):e instanceof La?La.create(e.items.map(t=>Cc(t))):e}function $x(e,t){let r=Da(e),n=Da(t);if(e===t)return{valid:!0,data:e};if(r===me.object&&n===me.object){let i=yt.objectKeys(t),a=yt.objectKeys(e).filter(o=>i.indexOf(o)!==-1),s={...e,...t};for(let o of a){let c=$x(e[o],t[o]);if(!c.valid)return{valid:!1};s[o]=c.data}return{valid:!0,data:s}}else if(r===me.array&&n===me.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let a=0;a<e.length;a++){let s=e[a],o=t[a],c=$x(s,o);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===me.date&&n===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function wj(e,t){return new Lc({values:e,typeName:te.ZodEnum,...He(t)})}var pi,_j,it,B8,W8,K8,G8,H8,Q8,Y8,J8,X8,kx,e7,t7,r7,n7,i7,a7,bj,s7,Nc,od,cd,ud,ld,dd,jc,Ac,pd,xs,_a,fd,ws,Qn,Rc,Ma,Sx,Uc,La,Ex,md,hd,Ix,Dc,Mc,Lc,qc,ho,Fi,Zi,qa,Zc,Fc,gd,_h,bh,Vc,_1e,te,b1e,x1e,w1e,k1e,S1e,$1e,E1e,I1e,P1e,T1e,O1e,z1e,C1e,N1e,f7,j1e,A1e,R1e,U1e,D1e,M1e,L1e,q1e,Z1e,F1e,V1e,B1e,W1e,K1e,G1e,H1e,Q1e,Y1e,J1e,kj=P(()=>{gh();vh();yj();wx();id();pi=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,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}},_j=(e,t)=>{if(mo(t))return{success:!0,data:t.value};if(!e.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 Hn(e.common.issues);return this._error=r,this._error}}};it=class{get description(){return this._def.description}_getType(t){return Da(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Da(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yr,ctx:{common:t.parent.common,data:t.data,parsedType:Da(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(sd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Da(t)},i=this._parseSync({data:t,path:n.path,parent:n});return _j(n,i)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Da(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return mo(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:t,path:[],parent:r}).then(n=>mo(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Da(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(sd(i)?i:Promise.resolve(i));return _j(n,a)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let s=t(i),o=()=>a.addIssue({code:J.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Fi({schema:this,typeName:te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Zi.create(this,this._def)}nullable(){return qa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ws.create(this)}promise(){return ho.create(this,this._def)}or(t){return Rc.create([this,t],this._def)}and(t){return Uc.create(this,t,this._def)}transform(t){return new Fi({...He(this._def),schema:this,typeName:te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Zc({...He(this._def),innerType:this,defaultValue:r,typeName:te.ZodDefault})}brand(){return new _h({typeName:te.ZodBranded,type:this,...He(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Fc({...He(this._def),innerType:this,catchValue:r,typeName:te.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return bh.create(this,t)}readonly(){return Vc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},B8=/^c[^\s-]{8,}$/i,W8=/^[0-9a-z]+$/,K8=/^[0-9A-HJKMNP-TV-Z]{26}$/i,G8=/^[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,H8=/^[a-z0-9_-]{21}$/i,Q8=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Y8=/^[-+]?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)?)??$/,J8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,X8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",e7=/^(?:(?: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])$/,t7=/^(?:(?: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])$/,r7=/^(([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]))$/,n7=/^(([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])$/,i7=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,a7=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bj="((\\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])))",s7=new RegExp(`^${bj}$`);Nc=class e extends it{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){let a=this._getOrReturnCtx(t);return ue(a,{code:J.invalid_type,expected:me.string,received:a.parsedType}),Re}let n=new Yr,i;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ue(i,{code:J.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ue(i,{code:J.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let s=t.data.length>a.value,o=t.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(t,i),s?ue(i,{code:J.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&ue(i,{code:J.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")J8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"email",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")kx||(kx=new RegExp(X8,"u")),kx.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"emoji",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")G8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"uuid",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")H8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"nanoid",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")B8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"cuid",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")W8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"cuid2",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")K8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"ulid",code:J.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ue(i,{validation:"url",code:J.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"regex",code:J.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ue(i,{code:J.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ue(i,{code:J.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ue(i,{code:J.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?c7(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{code:J.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?s7.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{code:J.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?o7(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{code:J.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Y8.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"duration",code:J.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?u7(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"ip",code:J.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?l7(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"jwt",code:J.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?d7(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"cidr",code:J.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?i7.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"base64",code:J.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?a7.test(t.data)||(i=this._getOrReturnCtx(t,i),ue(i,{validation:"base64url",code:J.invalid_string,message:a.message}),n.dirty()):yt.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:J.invalid_string,...ke.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ke.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ke.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ke.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ke.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ke.errToObj(r)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Nc.create=e=>new Nc({checks:[],typeName:te.ZodString,coerce:e?.coerce??!1,...He(e)});od=class e extends it{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==me.number){let a=this._getOrReturnCtx(t);return ue(a,{code:J.invalid_type,expected:me.number,received:a.parsedType}),Re}let n,i=new Yr;for(let a of this._def.checks)a.kind==="int"?yt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ue(n,{code:J.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),ue(n,{code:J.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),ue(n,{code:J.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?p7(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),ue(n,{code:J.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ue(n,{code:J.not_finite,message:a.message}),i.dirty()):yt.assertNever(a);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ke.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&yt.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};od.create=e=>new od({checks:[],typeName:te.ZodNumber,coerce:e?.coerce||!1,...He(e)});cd=class e extends it{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==me.bigint)return this._getInvalidInput(t);let n,i=new Yr;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),ue(n,{code:J.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),ue(n,{code:J.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ue(n,{code:J.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):yt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.bigint,received:r.parsedType}),Re}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ke.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};cd.create=e=>new cd({checks:[],typeName:te.ZodBigInt,coerce:e?.coerce??!1,...He(e)});ud=class extends it{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){let n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.boolean,received:n.parsedType}),Re}return dn(t.data)}};ud.create=e=>new ud({typeName:te.ZodBoolean,coerce:e?.coerce||!1,...He(e)});ld=class e extends it{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){let a=this._getOrReturnCtx(t);return ue(a,{code:J.invalid_type,expected:me.date,received:a.parsedType}),Re}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return ue(a,{code:J.invalid_date}),Re}let n=new Yr,i;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ue(i,{code:J.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ue(i,{code:J.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):yt.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};ld.create=e=>new ld({checks:[],coerce:e?.coerce||!1,typeName:te.ZodDate,...He(e)});dd=class extends it{_parse(t){if(this._getType(t)!==me.symbol){let n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.symbol,received:n.parsedType}),Re}return dn(t.data)}};dd.create=e=>new dd({typeName:te.ZodSymbol,...He(e)});jc=class extends it{_parse(t){if(this._getType(t)!==me.undefined){let n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.undefined,received:n.parsedType}),Re}return dn(t.data)}};jc.create=e=>new jc({typeName:te.ZodUndefined,...He(e)});Ac=class extends it{_parse(t){if(this._getType(t)!==me.null){let n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.null,received:n.parsedType}),Re}return dn(t.data)}};Ac.create=e=>new Ac({typeName:te.ZodNull,...He(e)});pd=class extends it{constructor(){super(...arguments),this._any=!0}_parse(t){return dn(t.data)}};pd.create=e=>new pd({typeName:te.ZodAny,...He(e)});xs=class extends it{constructor(){super(...arguments),this._unknown=!0}_parse(t){return dn(t.data)}};xs.create=e=>new xs({typeName:te.ZodUnknown,...He(e)});_a=class extends it{_parse(t){let r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.never,received:r.parsedType}),Re}};_a.create=e=>new _a({typeName:te.ZodNever,...He(e)});fd=class extends it{_parse(t){if(this._getType(t)!==me.undefined){let n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.void,received:n.parsedType}),Re}return dn(t.data)}};fd.create=e=>new fd({typeName:te.ZodVoid,...He(e)});ws=class e extends it{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==me.array)return ue(r,{code:J.invalid_type,expected:me.array,received:r.parsedType}),Re;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(s||o)&&(ue(r,{code:s?J.too_big:J.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?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&&(ue(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&&(ue(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((s,o)=>i.type._parseAsync(new pi(r,s,r.path,o)))).then(s=>Yr.mergeArray(n,s));let a=[...r.data].map((s,o)=>i.type._parseSync(new pi(r,s,r.path,o)));return Yr.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:ke.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:ke.toString(r)}})}nonempty(t){return this.min(1,t)}};ws.create=(e,t)=>new ws({type:e,minLength:null,maxLength:null,exactLength:null,typeName:te.ZodArray,...He(t)});Qn=class e extends it{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=yt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==me.object){let u=this._getOrReturnCtx(t);return ue(u,{code:J.invalid_type,expected:me.object,received:u.parsedType}),Re}let{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof _a&&this._def.unknownKeys==="strip"))for(let u in i.data)s.includes(u)||o.push(u);let c=[];for(let u of s){let l=a[u],d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new pi(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof _a){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of o)c.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(u==="strict")o.length>0&&(ue(i,{code:J.unrecognized_keys,keys:o}),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 o){let d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new pi(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,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>Yr.mergeObjectSync(n,u)):Yr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:ke.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:te.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of yt.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of yt.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Cc(this)}partial(t){let r={};for(let n of yt.objectKeys(this.shape)){let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of yt.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Zi;)a=a._def.innerType;r[n]=a}return new e({...this._def,shape:()=>r})}keyof(){return wj(yt.objectKeys(this.shape))}};Qn.create=(e,t)=>new Qn({shape:()=>e,unknownKeys:"strip",catchall:_a.create(),typeName:te.ZodObject,...He(t)});Qn.strictCreate=(e,t)=>new Qn({shape:()=>e,unknownKeys:"strict",catchall:_a.create(),typeName:te.ZodObject,...He(t)});Qn.lazycreate=(e,t)=>new Qn({shape:e,unknownKeys:"strip",catchall:_a.create(),typeName:te.ZodObject,...He(t)});Rc=class extends it{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(o=>new Hn(o.ctx.common.issues));return ue(r,{code:J.invalid_union,unionErrors:s}),Re}if(r.common.async)return Promise.all(n.map(async a=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let a,s=[];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&&s.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(c=>new Hn(c));return ue(r,{code:J.invalid_union,unionErrors:o}),Re}}get options(){return this._def.options}};Rc.create=(e,t)=>new Rc({options:e,typeName:te.ZodUnion,...He(t)});Ma=e=>e instanceof Dc?Ma(e.schema):e instanceof Fi?Ma(e.innerType()):e instanceof Mc?[e.value]:e instanceof Lc?e.options:e instanceof qc?yt.objectValues(e.enum):e instanceof Zc?Ma(e._def.innerType):e instanceof jc?[void 0]:e instanceof Ac?[null]:e instanceof Zi?[void 0,...Ma(e.unwrap())]:e instanceof qa?[null,...Ma(e.unwrap())]:e instanceof _h||e instanceof Vc?Ma(e.unwrap()):e instanceof Fc?Ma(e._def.innerType):[],Sx=class e extends it{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.object)return ue(r,{code:J.invalid_type,expected:me.object,received:r.parsedType}),Re;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}):(ue(r,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let a of r){let s=Ma(a.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let o of s){if(i.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,a)}}return new e({typeName:te.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...He(n)})}};Uc=class extends it{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(a,s)=>{if(bx(a)||bx(s))return Re;let o=$x(a.value,s.value);return o.valid?((xx(a)||xx(s))&&r.dirty(),{status:r.value,value:o.data}):(ue(n,{code:J.invalid_intersection_types}),Re)};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,s])=>i(a,s)):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}))}};Uc.create=(e,t,r)=>new Uc({left:e,right:t,typeName:te.ZodIntersection,...He(r)});La=class e extends it{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.array)return ue(n,{code:J.invalid_type,expected:me.array,received:n.parsedType}),Re;if(n.data.length<this._def.items.length)return ue(n,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&n.data.length>this._def.items.length&&(ue(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((s,o)=>{let c=this._def.items[o]||this._def.rest;return c?c._parse(new pi(n,s,n.path,o)):null}).filter(s=>!!s);return n.common.async?Promise.all(a).then(s=>Yr.mergeArray(r,s)):Yr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};La.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new La({items:e,typeName:te.ZodTuple,rest:null,...He(t)})};Ex=class e extends it{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.object)return ue(n,{code:J.invalid_type,expected:me.object,received:n.parsedType}),Re;let i=[],a=this._def.keyType,s=this._def.valueType;for(let o in n.data)i.push({key:a._parse(new pi(n,o,n.path,o)),value:s._parse(new pi(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?Yr.mergeObjectAsync(r,i):Yr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof it?new e({keyType:t,valueType:r,typeName:te.ZodRecord,...He(n)}):new e({keyType:Nc.create(),valueType:t,typeName:te.ZodRecord,...He(r)})}},md=class extends it{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.map)return ue(n,{code:J.invalid_type,expected:me.map,received:n.parsedType}),Re;let i=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map(([o,c],u)=>({key:i._parse(new pi(n,o,n.path,[u,"key"])),value:a._parse(new pi(n,c,n.path,[u,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Re;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(u.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let c of s){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return Re;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(u.value,l.value)}return{status:r.value,value:o}}}};md.create=(e,t,r)=>new md({valueType:t,keyType:e,typeName:te.ZodMap,...He(r)});hd=class e extends it{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==me.set)return ue(n,{code:J.invalid_type,expected:me.set,received:n.parsedType}),Re;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(ue(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&&(ue(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 s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Re;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let o=[...n.data.values()].map((c,u)=>a._parse(new pi(n,c,n.path,u)));return n.common.async?Promise.all(o).then(c=>s(c)):s(o)}min(t,r){return new e({...this._def,minSize:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:ke.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};hd.create=(e,t)=>new hd({valueType:e,minSize:null,maxSize:null,typeName:te.ZodSet,...He(t)});Ix=class e extends it{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.function)return ue(r,{code:J.invalid_type,expected:me.function,received:r.parsedType}),Re;function n(o,c){return yh({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ad(),bs].filter(u=>!!u),issueData:{code:J.invalid_arguments,argumentsError:c}})}function i(o,c){return yh({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ad(),bs].filter(u=>!!u),issueData:{code:J.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof ho){let o=this;return dn(async function(...c){let u=new Hn([]),l=await o._def.args.parseAsync(c,a).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(s,this,l);return await o._def.returns._def.type.parseAsync(d,a).catch(f=>{throw u.addIssue(i(d,f)),u})})}else{let o=this;return dn(function(...c){let u=o._def.args.safeParse(c,a);if(!u.success)throw new Hn([n(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=o._def.returns.safeParse(l,a);if(!d.success)throw new Hn([i(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:La.create(t).rest(xs.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||La.create([]).rest(xs.create()),returns:r||xs.create(),typeName:te.ZodFunction,...He(n)})}},Dc=class extends it{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Dc.create=(e,t)=>new Dc({getter:e,typeName:te.ZodLazy,...He(t)});Mc=class extends it{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return ue(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}};Mc.create=(e,t)=>new Mc({value:e,typeName:te.ZodLiteral,...He(t)});Lc=class e extends it{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return ue(r,{expected:yt.joinValues(n),received:r.parsedType,code:J.invalid_type}),Re}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return ue(r,{received:r.data,code:J.invalid_enum_value,options:n}),Re}return dn(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Lc.create=wj;qc=class extends it{_parse(t){let r=yt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==me.string&&n.parsedType!==me.number){let i=yt.objectValues(r);return ue(n,{expected:yt.joinValues(i),received:n.parsedType,code:J.invalid_type}),Re}if(this._cache||(this._cache=new Set(yt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let i=yt.objectValues(r);return ue(n,{received:n.data,code:J.invalid_enum_value,options:i}),Re}return dn(t.data)}get enum(){return this._def.values}};qc.create=(e,t)=>new qc({values:e,typeName:te.ZodNativeEnum,...He(t)});ho=class extends it{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==me.promise&&r.common.async===!1)return ue(r,{code:J.invalid_type,expected:me.promise,received:r.parsedType}),Re;let n=r.parsedType===me.promise?r.data:Promise.resolve(r.data);return dn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ho.create=(e,t)=>new ho({type:e,typeName:te.ZodPromise,...He(t)});Fi=class extends it{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:s=>{ue(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let s=i.transform(n.data,a);if(n.common.async)return Promise.resolve(s).then(async o=>{if(r.value==="aborted")return Re;let c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?Re:c.status==="dirty"?zc(c.value):r.value==="dirty"?zc(c.value):c});{if(r.value==="aborted")return Re;let o=this._def.schema._parseSync({data:s,path:n.path,parent:n});return o.status==="aborted"?Re:o.status==="dirty"?zc(o.value):r.value==="dirty"?zc(o.value):o}}if(i.type==="refinement"){let s=o=>{let c=i.refinement(o,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 o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Re:(o.status==="dirty"&&r.dirty(),s(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?Re:(o.status==="dirty"&&r.dirty(),s(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!mo(s))return Re;let o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>mo(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:r.value,value:o})):Re);yt.assertNever(i)}};Fi.create=(e,t,r)=>new Fi({schema:e,typeName:te.ZodEffects,effect:t,...He(r)});Fi.createWithPreprocess=(e,t,r)=>new Fi({schema:t,effect:{type:"preprocess",transform:e},typeName:te.ZodEffects,...He(r)});Zi=class extends it{_parse(t){return this._getType(t)===me.undefined?dn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Zi.create=(e,t)=>new Zi({innerType:e,typeName:te.ZodOptional,...He(t)});qa=class extends it{_parse(t){return this._getType(t)===me.null?dn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};qa.create=(e,t)=>new qa({innerType:e,typeName:te.ZodNullable,...He(t)});Zc=class extends it{_parse(t){let{ctx:r}=this._processInputParams(t),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}};Zc.create=(e,t)=>new Zc({innerType:e,typeName:te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});Fc=class extends it{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return sd(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Hn(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Hn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Fc.create=(e,t)=>new Fc({innerType:e,typeName:te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});gd=class extends it{_parse(t){if(this._getType(t)!==me.nan){let n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.nan,received:n.parsedType}),Re}return{status:"valid",value:t.data}}};gd.create=e=>new gd({typeName:te.ZodNaN,...He(e)});_h=class extends it{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},bh=class e extends it{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?Re:a.status==="dirty"?(r.dirty(),zc(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"?Re:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:te.ZodPipeline})}},Vc=class extends it{_parse(t){let r=this._def.innerType._parse(t),n=i=>(mo(i)&&(i.value=Object.freeze(i.value)),i);return sd(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Vc.create=(e,t)=>new Vc({innerType:e,typeName:te.ZodReadonly,...He(t)});_1e={object:Qn.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(te||(te={}));b1e=Nc.create,x1e=od.create,w1e=gd.create,k1e=cd.create,S1e=ud.create,$1e=ld.create,E1e=dd.create,I1e=jc.create,P1e=Ac.create,T1e=pd.create,O1e=xs.create,z1e=_a.create,C1e=fd.create,N1e=ws.create,f7=Qn.create,j1e=Qn.strictCreate,A1e=Rc.create,R1e=Sx.create,U1e=Uc.create,D1e=La.create,M1e=Ex.create,L1e=md.create,q1e=hd.create,Z1e=Ix.create,F1e=Dc.create,V1e=Mc.create,B1e=Lc.create,W1e=qc.create,K1e=ho.create,G1e=Fi.create,H1e=Zi.create,Q1e=qa.create,Y1e=Fi.createWithPreprocess,J1e=bh.create});var Px=P(()=>{vh();wx();vj();id();kj();gh()});var vd=P(()=>{Px();Px()});function nr(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?nd(t,e.currentPath):t.join("/")}}var fi=P(()=>{hh()});function Tx(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==te.ZodAny&&(r.items=Ne(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&vt(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&vt(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(vt(r,"minItems",e.exactLength.value,e.exactLength.message,t),vt(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Ox=P(()=>{vd();_s();Sr()});function zx(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?vt(r,"minimum",n.value,n.message,t):vt(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),vt(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?vt(r,"maximum",n.value,n.message,t):vt(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),vt(r,"maximum",n.value,n.message,t));break;case"multipleOf":vt(r,"multipleOf",n.value,n.message,t);break}return r}var Cx=P(()=>{_s()});function Nx(){return{type:"boolean"}}var jx=P(()=>{});function yd(e,t){return Ne(e.type._def,t)}var xh=P(()=>{Sr()});var Ax,Rx=P(()=>{Sr();Ax=(e,t)=>Ne(e.innerType._def,t)});function wh(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,a)=>wh(e,t,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 g7(e,t)}}var g7,Ux=P(()=>{_s();g7=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let n of e.checks)switch(n.kind){case"min":vt(r,"minimum",n.value,n.message,t);break;case"max":vt(r,"maximum",n.value,n.message,t);break}return r}});function Dx(e,t){return{...Ne(e.innerType._def,t),default:e.defaultValue()}}var Mx=P(()=>{Sr()});function Lx(e,t){return t.effectStrategy==="input"?Ne(e.schema._def,t):nr(t)}var qx=P(()=>{Sr();fi()});function Zx(e){return{type:"string",enum:Array.from(e.values)}}var Fx=P(()=>{});function Vx(e,t){let r=[Ne(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Ne(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(a=>!!a),n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(a=>{if(v7(a))i.push(...a.allOf),a.unevaluatedProperties===void 0&&(n=void 0);else{let s=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:o,...c}=a;s=c}else n=void 0;i.push(s)}}),i.length?{allOf:i,...n}:void 0}var v7,Bx=P(()=>{Sr();v7=e=>"type"in e&&e.type==="string"?!1:"allOf"in e});function Wx(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Kx=P(()=>{});function _d(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":vt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":vt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Vi(r,"email",n.message,t);break;case"format:idn-email":Vi(r,"idn-email",n.message,t);break;case"pattern:zod":pn(r,mi.email,n.message,t);break}break;case"url":Vi(r,"uri",n.message,t);break;case"uuid":Vi(r,"uuid",n.message,t);break;case"regex":pn(r,n.regex,n.message,t);break;case"cuid":pn(r,mi.cuid,n.message,t);break;case"cuid2":pn(r,mi.cuid2,n.message,t);break;case"startsWith":pn(r,RegExp(`^${Hx(n.value,t)}`),n.message,t);break;case"endsWith":pn(r,RegExp(`${Hx(n.value,t)}$`),n.message,t);break;case"datetime":Vi(r,"date-time",n.message,t);break;case"date":Vi(r,"date",n.message,t);break;case"time":Vi(r,"time",n.message,t);break;case"duration":Vi(r,"duration",n.message,t);break;case"length":vt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),vt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{pn(r,RegExp(Hx(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Vi(r,"ipv4",n.message,t),n.version!=="v4"&&Vi(r,"ipv6",n.message,t);break}case"base64url":pn(r,mi.base64url,n.message,t);break;case"jwt":pn(r,mi.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&pn(r,mi.ipv4Cidr,n.message,t),n.version!=="v4"&&pn(r,mi.ipv6Cidr,n.message,t);break}case"emoji":pn(r,mi.emoji(),n.message,t);break;case"ulid":{pn(r,mi.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Vi(r,"binary",n.message,t);break}case"contentEncoding:base64":{vt(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{pn(r,mi.base64,n.message,t);break}}break}case"nanoid":pn(r,mi.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Hx(e,t){return t.patternStrategy==="escape"?_7(e):e}function _7(e){let t="";for(let r=0;r<e.length;r++)y7.has(e[r])||(t+="\\"),t+=e[r];return t}function Vi(e,t,r,n){e.format||e.anyOf?.some(i=>i.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):vt(e,"format",t,r,n)}function pn(e,t,r,n){e.pattern||e.allOf?.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Sj(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):vt(e,"pattern",Sj(t,n),r,n)}function Sj(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,i="",a=!1,s=!1,o=!1;for(let c=0;c<n.length;c++){if(a){i+=n[c],a=!1;continue}if(r.i){if(s){if(n[c].match(/[a-z]/)){o?(i+=n[c],i+=`${n[c-2]}-${n[c]}`.toUpperCase(),o=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(i+=n[c],o=!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
18
+ ]))`;continue}else if(n[c]==="$"){i+=`($|(?=[\r
19
+ ]))`;continue}}if(r.s&&n[c]==="."){i+=s?`${n[c]}\r
20
+ `:`[${n[c]}\r
21
+ ]`;continue}i+=n[c],n[c]==="\\"?a=!0:s&&n[c]==="]"?s=!1:!s&&n[c]==="["&&(s=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}var Gx,mi,y7,kh=P(()=>{_s();mi={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:()=>(Gx===void 0&&(Gx=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Gx),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-_]*$/};y7=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function bd(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===te.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,i)=>({...n,[i]:Ne(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",i]})??nr(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:Ne(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===te.ZodString&&e.keyType._def.checks?.length){let{type:n,...i}=_d(e.keyType._def,t);return{...r,propertyNames:i}}else{if(e.keyType?._def.typeName===te.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===te.ZodBranded&&e.keyType._def.type._def.typeName===te.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...i}=yd(e.keyType._def,t);return{...r,propertyNames:i}}}return r}var Sh=P(()=>{vd();Sr();kh();xh();fi()});function Qx(e,t){if(t.mapStrategy==="record")return bd(e,t);let r=Ne(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||nr(t),n=Ne(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||nr(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Yx=P(()=>{Sr();Sh();fi()});function Jx(e){let t=e.values,n=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[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 Xx=P(()=>{});function e0(e){return e.target==="openAi"?void 0:{not:nr({...e,currentPath:[...e.currentPath,"not"]})}}var t0=P(()=>{fi()});function r0(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var n0=P(()=>{});function i0(e,t){if(t.target==="openApi3")return $j(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in Bc&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((i,a)=>{let s=Bc[a._def.typeName];return s&&!i.includes(s)?[...i,s]: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 s=typeof a._def.value;switch(s){case"string":case"number":case"boolean":return[...i,s];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,s,o)=>o.indexOf(a)===s);return{type:i.length>1?i:i[0],enum:r.reduce((a,s)=>a.includes(s._def.value)?a:[...a,s._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 $j(e,t)}var Bc,$j,$h=P(()=>{Sr();Bc={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};$j=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>Ne(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function a0(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Bc[e.innerType._def.typeName],nullable:!0}:{type:[Bc[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=Ne(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=Ne(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var s0=P(()=>{Sr();$h()});function o0(e,t){let r={type:"number"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"int":r.type="integer",mh(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?vt(r,"minimum",n.value,n.message,t):vt(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),vt(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?vt(r,"maximum",n.value,n.message,t):vt(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),vt(r,"maximum",n.value,n.message,t));break;case"multipleOf":vt(r,"multipleOf",n.value,n.message,t);break}return r}var c0=P(()=>{_s()});function u0(e,t){let r=t.target==="openAi",n={type:"object",properties:{}},i=[],a=e.shape();for(let o in a){let c=a[o];if(c===void 0||c._def===void 0)continue;let u=x7(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=Ne(c._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});l!==void 0&&(n.properties[o]=l,u||i.push(o))}i.length&&(n.required=i);let s=b7(e,t);return s!==void 0&&(n.additionalProperties=s),n}function b7(e,t){if(e.catchall._def.typeName!=="ZodNever")return Ne(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function x7(e){try{return e.isOptional()}catch{return!0}}var l0=P(()=>{Sr()});var d0,p0=P(()=>{Sr();fi();d0=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return Ne(e.innerType._def,t);let r=Ne(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:nr(t)},r]}:nr(t)}});var f0,m0=P(()=>{Sr();f0=(e,t)=>{if(t.pipeStrategy==="input")return Ne(e.in._def,t);if(t.pipeStrategy==="output")return Ne(e.out._def,t);let r=Ne(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Ne(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}}});function h0(e,t){return Ne(e.type._def,t)}var g0=P(()=>{Sr()});function v0(e,t){let n={type:"array",uniqueItems:!0,items:Ne(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&vt(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&vt(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}var y0=P(()=>{_s();Sr()});function _0(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Ne(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Ne(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Ne(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var b0=P(()=>{Sr()});function x0(e){return{not:nr(e)}}var w0=P(()=>{fi()});function k0(e){return nr(e)}var S0=P(()=>{fi()});var $0,E0=P(()=>{Sr();$0=(e,t)=>Ne(e.innerType._def,t)});var I0,P0=P(()=>{vd();fi();Ox();Cx();jx();xh();Rx();Ux();Mx();qx();Fx();Bx();Kx();Yx();Xx();t0();n0();s0();c0();l0();p0();m0();g0();Sh();y0();kh();b0();w0();$h();S0();E0();I0=(e,t,r)=>{switch(t){case te.ZodString:return _d(e,r);case te.ZodNumber:return o0(e,r);case te.ZodObject:return u0(e,r);case te.ZodBigInt:return zx(e,r);case te.ZodBoolean:return Nx();case te.ZodDate:return wh(e,r);case te.ZodUndefined:return x0(r);case te.ZodNull:return r0(r);case te.ZodArray:return Tx(e,r);case te.ZodUnion:case te.ZodDiscriminatedUnion:return i0(e,r);case te.ZodIntersection:return Vx(e,r);case te.ZodTuple:return _0(e,r);case te.ZodRecord:return bd(e,r);case te.ZodLiteral:return Wx(e,r);case te.ZodEnum:return Zx(e);case te.ZodNativeEnum:return Jx(e);case te.ZodNullable:return a0(e,r);case te.ZodOptional:return d0(e,r);case te.ZodMap:return Qx(e,r);case te.ZodSet:return v0(e,r);case te.ZodLazy:return()=>e.getter()._def;case te.ZodPromise:return h0(e,r);case te.ZodNaN:case te.ZodNever:return e0(r);case te.ZodEffects:return Lx(e,r);case te.ZodAny:return nr(r);case te.ZodUnknown:return k0(r);case te.ZodDefault:return Dx(e,r);case te.ZodBranded:return yd(e,r);case te.ZodReadonly:return $0(e,r);case te.ZodCatch:return Ax(e,r);case te.ZodPipeline:return f0(e,r);case te.ZodFunction:case te.ZodVoid:case te.ZodSymbol:return;default:return(n=>{})(t)}}});function Ne(e,t,r=!1){let n=t.seen.get(e);if(t.override){let o=t.override?.(e,t,n,r);if(o!==hx)return o}if(n&&!r){let o=w7(n,t);if(o!==void 0)return o}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=I0(e,e.typeName,t),s=typeof a=="function"?Ne(a(),t):a;if(s&&k7(e,t,s),t.postProcess){let o=t.postProcess(s,e,t);return i.jsonSchema=s,o}return i.jsonSchema=s,s}var w7,k7,Sr=P(()=>{fh();P0();hh();fi();w7=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:nd(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),nr(t)):t.$refStrategy==="seen"?nr(t):void 0}},k7=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r)});var Ej=P(()=>{});var fn,T0=P(()=>{Sr();yx();fi();fn=(e,t)=>{let r=vx(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:Ne(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??nr(r)}),{}):void 0,i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,a=Ne(e._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??nr(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(a.title=s),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 o=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"?o.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(o.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in o||"oneOf"in o||"allOf"in o||"type"in o&&Array.isArray(o.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),o}});var Ij={};ga(Ij,{addErrorMessage:()=>mh,default:()=>S7,defaultOptions:()=>mx,getDefaultOptions:()=>gx,getRefs:()=>vx,getRelativePath:()=>nd,ignoreOverride:()=>hx,jsonDescription:()=>Z8,parseAnyDef:()=>nr,parseArrayDef:()=>Tx,parseBigintDef:()=>zx,parseBooleanDef:()=>Nx,parseBrandedDef:()=>yd,parseCatchDef:()=>Ax,parseDateDef:()=>wh,parseDef:()=>Ne,parseDefaultDef:()=>Dx,parseEffectsDef:()=>Lx,parseEnumDef:()=>Zx,parseIntersectionDef:()=>Vx,parseLiteralDef:()=>Wx,parseMapDef:()=>Qx,parseNativeEnumDef:()=>Jx,parseNeverDef:()=>e0,parseNullDef:()=>r0,parseNullableDef:()=>a0,parseNumberDef:()=>o0,parseObjectDef:()=>u0,parseOptionalDef:()=>d0,parsePipelineDef:()=>f0,parsePromiseDef:()=>h0,parseReadonlyDef:()=>$0,parseRecordDef:()=>bd,parseSetDef:()=>v0,parseStringDef:()=>_d,parseTupleDef:()=>_0,parseUndefinedDef:()=>x0,parseUnionDef:()=>i0,parseUnknownDef:()=>k0,primitiveMappings:()=>Bc,selectParser:()=>I0,setResponseValueAndErrors:()=>vt,zodPatterns:()=>mi,zodToJsonSchema:()=>fn});var S7,ks=P(()=>{fh();yx();_s();hh();Sr();Ej();fi();Ox();Cx();jx();xh();Rx();Ux();Mx();qx();Fx();Bx();Kx();Yx();Xx();t0();n0();s0();c0();l0();p0();m0();g0();E0();Sh();y0();kh();b0();w0();$h();S0();P0();T0();T0();S7=fn});var Wc,O0=P(()=>{ks();Wc=class{static generateFileOutputInstructions(t,r){let n;typeof t?.parse=="function"?n=fn(t,{target:"openApi3"}):n=t;let i=this._buildExample(n);return`
22
+ \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
23
+ \u{1F6A8} MANDATORY: WRITE RESULT TO FILE \u{1F6A8}
24
+ \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
25
+ You MUST write your final result as pure JSON to this EXACT file path:
26
+
27
+ ${r}
28
+
29
+ Use your file writing tool (WriteFile or ApplyPatch) to create this file.
30
+ DO NOT just output JSON to stdout. The file MUST exist when you finish.
31
+ DO NOT skip this step. The workflow WILL FAIL if the file is missing.
32
+
33
+ Required JSON structure:
34
+ ${JSON.stringify(i,null,2)}
35
+
36
+ JSON types (strict \u2014 validators reject wrong types):
37
+ - Use bare JSON numbers for numeric fields (e.g. 3000). Do NOT quote them as strings (wrong: "3000").
38
+ - Use true/false without quotes for booleans.
39
+ - Use unquoted null where a field may be null.
40
+
41
+ Rules: valid JSON only, no markdown wrapping, no extra text in the file.`}static _buildExample(t){if(!t)return{};let r=t.type;if(r==="object"&&t.properties){let n={};for(let[i,a]of Object.entries(t.properties))n[i]=this._buildExample(a);return n}if(r==="array"&&t.items)return[this._buildExample(t.items)];if(r==="string")return"<string>";if(r==="number"||r==="integer")return 0;if(r==="boolean")return!1;if(t.description)return`<${t.description}>`;if(t.nullable||t.oneOf||t.anyOf){let n=t.oneOf?.find(i=>i.type!=="null")||t.anyOf?.find(i=>i.type!=="null");return n?this._buildExample(n):null}return"<value>"}}});function xd(e,t){return function(){return e.apply(t,arguments)}}var z0=P(()=>{"use strict"});function wd(e){return e!==null&&!Kc(e)&&e.constructor!==null&&!Kc(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}function E7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Cj(e.buffer),t}function U7(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function Sd(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Gc(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(wd(e))return;let a=r?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length,o;for(n=0;n<s;n++)o=a[n],t.call(null,e[o],o,e)}}function jj(e,t){if(wd(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}function C0(){let{caseless:e,skipUndefined:t}=Aj(this)&&this||{},r={},n=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let s=e&&jj(r,a)||a;Eh(r[s])&&Eh(i)?r[s]=C0(r[s],i):Eh(i)?r[s]=C0({},i):Gc(i)?r[s]=i.slice():(!t||!Kc(i))&&(r[s]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Sd(arguments[i],n);return r}function oQ(e){return!!(e&&Tn(e.append)&&e[zj]==="FormData"&&e[Ih])}var $7,N0,Ih,zj,Ph,Bi,Th,Gc,Kc,Cj,I7,Tn,Nj,kd,P7,Eh,T7,O7,z7,C7,N7,j7,A7,R7,Pj,Tj,D7,M7,L7,q7,Z7,F7,V7,go,Aj,B7,W7,K7,G7,H7,Q7,Y7,J7,X7,eQ,tQ,Oj,rQ,Rj,nQ,iQ,aQ,sQ,cQ,uQ,lQ,Uj,dQ,pQ,N,Xt=P(()=>{"use strict";z0();({toString:$7}=Object.prototype),{getPrototypeOf:N0}=Object,{iterator:Ih,toStringTag:zj}=Symbol,Ph=(e=>t=>{let r=$7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bi=e=>(e=e.toLowerCase(),t=>Ph(t)===e),Th=e=>t=>typeof t===e,{isArray:Gc}=Array,Kc=Th("undefined");Cj=Bi("ArrayBuffer");I7=Th("string"),Tn=Th("function"),Nj=Th("number"),kd=e=>e!==null&&typeof e=="object",P7=e=>e===!0||e===!1,Eh=e=>{if(Ph(e)!=="object")return!1;let t=N0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zj in e)&&!(Ih in e)},T7=e=>{if(!kd(e)||wd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},O7=Bi("Date"),z7=Bi("File"),C7=e=>!!(e&&typeof e.uri<"u"),N7=e=>e&&typeof e.getParts<"u",j7=Bi("Blob"),A7=Bi("FileList"),R7=e=>kd(e)&&Tn(e.pipe);Pj=U7(),Tj=typeof Pj.FormData<"u"?Pj.FormData:void 0,D7=e=>{let t;return e&&(Tj&&e instanceof Tj||Tn(e.append)&&((t=Ph(e))==="formdata"||t==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"))},M7=Bi("URLSearchParams"),[L7,q7,Z7,F7]=["ReadableStream","Request","Response","Headers"].map(Bi),V7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Aj=e=>!Kc(e)&&e!==go;B7=(e,t,r,{allOwnKeys:n}={})=>(Sd(t,(i,a)=>{r&&Tn(i)?Object.defineProperty(e,a,{value:xd(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),W7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),K7=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},G7=(e,t,r,n)=>{let i,a,s,o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],(!n||n(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=r!==!1&&N0(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},H7=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},Q7=e=>{if(!e)return null;if(Gc(e))return e;let t=e.length;if(!Nj(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Y7=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&N0(Uint8Array)),J7=(e,t)=>{let n=(e&&e[Ih]).call(e),i;for(;(i=n.next())&&!i.done;){let a=i.value;t.call(e,a[0],a[1])}},X7=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},eQ=Bi("HTMLFormElement"),tQ=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Oj=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),rQ=Bi("RegExp"),Rj=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};Sd(r,(i,a)=>{let s;(s=t(i,a,e))!==!1&&(n[a]=s||i)}),Object.defineProperties(e,n)},nQ=e=>{Rj(e,(t,r)=>{if(Tn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(Tn(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},iQ=(e,t)=>{let r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Gc(e)?n(e):n(String(e).split(t)),r},aQ=()=>{},sQ=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;cQ=e=>{let t=new Array(10),r=(n,i)=>{if(kd(n)){if(t.indexOf(n)>=0)return;if(wd(n))return n;if(!("toJSON"in n)){t[i]=n;let a=Gc(n)?[]:{};return Sd(n,(s,o)=>{let c=r(s,i+1);!Kc(c)&&(a[o]=c)}),t[i]=void 0,a}}return n};return r(e,0)},uQ=Bi("AsyncFunction"),lQ=e=>e&&(kd(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),Uj=((e,t)=>e?setImmediate:t?((r,n)=>(go.addEventListener("message",({source:i,data:a})=>{i===go&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),go.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Tn(go.postMessage)),dQ=typeof queueMicrotask<"u"?queueMicrotask.bind(go):typeof process<"u"&&process.nextTick||Uj,pQ=e=>e!=null&&Tn(e[Ih]),N={isArray:Gc,isArrayBuffer:Cj,isBuffer:wd,isFormData:D7,isArrayBufferView:E7,isString:I7,isNumber:Nj,isBoolean:P7,isObject:kd,isPlainObject:Eh,isEmptyObject:T7,isReadableStream:L7,isRequest:q7,isResponse:Z7,isHeaders:F7,isUndefined:Kc,isDate:O7,isFile:z7,isReactNativeBlob:C7,isReactNative:N7,isBlob:j7,isRegExp:rQ,isFunction:Tn,isStream:R7,isURLSearchParams:M7,isTypedArray:Y7,isFileList:A7,forEach:Sd,merge:C0,extend:B7,trim:V7,stripBOM:W7,inherits:K7,toFlatObject:G7,kindOf:Ph,kindOfTest:Bi,endsWith:H7,toArray:Q7,forEachEntry:J7,matchAll:X7,isHTMLForm:eQ,hasOwnProperty:Oj,hasOwnProp:Oj,reduceDescriptors:Rj,freezeMethods:nQ,toObjectSet:iQ,toCamelCase:tQ,noop:aQ,toFiniteNumber:sQ,findKey:jj,global:go,isContextDefined:Aj,isSpecCompliantForm:oQ,toJSONObject:cQ,isAsyncFn:uQ,isThenable:lQ,setImmediate:Uj,asap:dQ,isIterable:pQ}});var mn,ce,Yn=P(()=>{"use strict";Xt();mn=class e extends Error{static from(t,r,n,i,a,s){let o=new e(t.message,r||t.code,n,i,a);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),s&&Object.assign(o,s),o}constructor(t,r,n,i,a){super(t),Object.defineProperty(this,"message",{value:t,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:N.toJSONObject(this.config),code:this.code,status:this.status}}};mn.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";mn.ERR_BAD_OPTION="ERR_BAD_OPTION";mn.ECONNABORTED="ECONNABORTED";mn.ETIMEDOUT="ETIMEDOUT";mn.ERR_NETWORK="ERR_NETWORK";mn.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";mn.ERR_DEPRECATED="ERR_DEPRECATED";mn.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";mn.ERR_BAD_REQUEST="ERR_BAD_REQUEST";mn.ERR_CANCELED="ERR_CANCELED";mn.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";mn.ERR_INVALID_URL="ERR_INVALID_URL";ce=mn});var Lj=C((XOe,Mj)=>{var Dj=Ot("stream").Stream,fQ=Ot("util");Mj.exports=Wi;function Wi(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}fQ.inherits(Wi,Dj);Wi.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Wi.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Wi.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Wi.prototype.resume=function(){this._released||this.release(),this.source.resume()};Wi.prototype.pause=function(){this.source.pause()};Wi.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Wi.prototype.pipe=function(){var e=Dj.prototype.pipe.apply(this,arguments);return this.resume(),e};Wi.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Wi.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Vj=C((eze,Fj)=>{var mQ=Ot("util"),Zj=Ot("stream").Stream,qj=Lj();Fj.exports=mr;function mr(){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}mQ.inherits(mr,Zj);mr.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};mr.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};mr.prototype.append=function(e){var t=mr.isStreamLike(e);if(t){if(!(e instanceof qj)){var r=qj.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};mr.prototype.pipe=function(e,t){return Zj.prototype.pipe.call(this,e,t),this.resume(),e};mr.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}};mr.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=mr.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};mr.prototype._pipeNext=function(e){this._currentStream=e;var t=mr.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};mr.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};mr.prototype.write=function(e){this.emit("data",e)};mr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};mr.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")};mr.prototype.end=function(){this._reset(),this.emit("end")};mr.prototype.destroy=function(){this._reset(),this.emit("close")};mr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};mr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};mr.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};mr.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Bj=C((tze,hQ)=>{hQ.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 Kj=C((rze,Wj)=>{Wj.exports=Bj()});var Qj=C(On=>{"use strict";var Oh=Kj(),gQ=Ot("path").extname,Gj=/^\s*([^;\s]*)(?:;|\s|$)/,vQ=/^text\//i;On.charset=Hj;On.charsets={lookup:Hj};On.contentType=yQ;On.extension=_Q;On.extensions=Object.create(null);On.lookup=bQ;On.types=Object.create(null);xQ(On.extensions,On.types);function Hj(e){if(!e||typeof e!="string")return!1;var t=Gj.exec(e),r=t&&Oh[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&vQ.test(t[1])?"UTF-8":!1}function yQ(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?On.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=On.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function _Q(e){if(!e||typeof e!="string")return!1;var t=Gj.exec(e),r=t&&On.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function bQ(e){if(!e||typeof e!="string")return!1;var t=gQ("x."+e).toLowerCase().substr(1);return t&&On.types[t]||!1}function xQ(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Oh).forEach(function(i){var a=Oh[i],s=a.extensions;if(!(!s||!s.length)){e[i]=s;for(var o=0;o<s.length;o++){var c=s[o];if(t[c]){var u=r.indexOf(Oh[t[c]].source),l=r.indexOf(a.source);if(t[c]!=="application/octet-stream"&&(u>l||u===l&&t[c].substr(0,12)==="application/"))continue}t[c]=i}}})}});var Jj=C((ize,Yj)=>{Yj.exports=wQ;function wQ(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var j0=C((aze,eA)=>{var Xj=Jj();eA.exports=kQ;function kQ(e){var t=!1;return Xj(function(){t=!0}),function(n,i){t?e(n,i):Xj(function(){e(n,i)})}}});var A0=C((sze,tA)=>{tA.exports=SQ;function SQ(e){Object.keys(e.jobs).forEach($Q.bind(e)),e.jobs={}}function $Q(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var R0=C((oze,nA)=>{var rA=j0(),EQ=A0();nA.exports=IQ;function IQ(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=PQ(t,i,e[i],function(a,s){i in r.jobs&&(delete r.jobs[i],a?EQ(r):r.results[i]=s,n(a,r.results))})}function PQ(e,t,r,n){var i;return e.length==2?i=e(r,rA(n)):i=e(r,t,rA(n)),i}});var U0=C((cze,iA)=>{iA.exports=TQ;function TQ(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,a){return t(e[i],e[a])}),n}});var D0=C((uze,aA)=>{var OQ=A0(),zQ=j0();aA.exports=CQ;function CQ(e){Object.keys(this.jobs).length&&(this.index=this.size,OQ(this),zQ(e)(null,this.results))}});var oA=C((lze,sA)=>{var NQ=R0(),jQ=U0(),AQ=D0();sA.exports=RQ;function RQ(e,t,r){for(var n=jQ(e);n.index<(n.keyedList||e).length;)NQ(e,t,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 AQ.bind(n,r)}});var M0=C((dze,zh)=>{var cA=R0(),UQ=U0(),DQ=D0();zh.exports=MQ;zh.exports.ascending=uA;zh.exports.descending=LQ;function MQ(e,t,r,n){var i=UQ(e,r);return cA(e,t,i,function a(s,o){if(s){n(s,o);return}if(i.index++,i.index<(i.keyedList||e).length){cA(e,t,i,a);return}n(null,i.results)}),DQ.bind(i,n)}function uA(e,t){return e<t?-1:e>t?1:0}function LQ(e,t){return-1*uA(e,t)}});var dA=C((pze,lA)=>{var qQ=M0();lA.exports=ZQ;function ZQ(e,t,r){return qQ(e,t,null,r)}});var fA=C((fze,pA)=>{pA.exports={parallel:oA(),serial:dA(),serialOrdered:M0()}});var L0=C((mze,mA)=>{"use strict";mA.exports=Object});var gA=C((hze,hA)=>{"use strict";hA.exports=Error});var yA=C((gze,vA)=>{"use strict";vA.exports=EvalError});var bA=C((vze,_A)=>{"use strict";_A.exports=RangeError});var wA=C((yze,xA)=>{"use strict";xA.exports=ReferenceError});var SA=C((_ze,kA)=>{"use strict";kA.exports=SyntaxError});var Ch=C((bze,$A)=>{"use strict";$A.exports=TypeError});var IA=C((xze,EA)=>{"use strict";EA.exports=URIError});var TA=C((wze,PA)=>{"use strict";PA.exports=Math.abs});var zA=C((kze,OA)=>{"use strict";OA.exports=Math.floor});var NA=C((Sze,CA)=>{"use strict";CA.exports=Math.max});var AA=C(($ze,jA)=>{"use strict";jA.exports=Math.min});var UA=C((Eze,RA)=>{"use strict";RA.exports=Math.pow});var MA=C((Ize,DA)=>{"use strict";DA.exports=Math.round});var qA=C((Pze,LA)=>{"use strict";LA.exports=Number.isNaN||function(t){return t!==t}});var FA=C((Tze,ZA)=>{"use strict";var FQ=qA();ZA.exports=function(t){return FQ(t)||t===0?t:t<0?-1:1}});var BA=C((Oze,VA)=>{"use strict";VA.exports=Object.getOwnPropertyDescriptor});var q0=C((zze,WA)=>{"use strict";var Nh=BA();if(Nh)try{Nh([],"length")}catch{Nh=null}WA.exports=Nh});var GA=C((Cze,KA)=>{"use strict";var jh=Object.defineProperty||!1;if(jh)try{jh({},"a",{value:1})}catch{jh=!1}KA.exports=jh});var Z0=C((Nze,HA)=>{"use strict";HA.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},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;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var JA=C((jze,YA)=>{"use strict";var QA=typeof Symbol<"u"&&Symbol,VQ=Z0();YA.exports=function(){return typeof QA!="function"||typeof Symbol!="function"||typeof QA("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:VQ()}});var F0=C((Aze,XA)=>{"use strict";XA.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var V0=C((Rze,eR)=>{"use strict";var BQ=L0();eR.exports=BQ.getPrototypeOf||null});var nR=C((Uze,rR)=>{"use strict";var WQ="Function.prototype.bind called on incompatible ",KQ=Object.prototype.toString,GQ=Math.max,HQ="[object Function]",tR=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},QQ=function(t,r){for(var n=[],i=r||0,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},YQ=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};rR.exports=function(t){var r=this;if(typeof r!="function"||KQ.apply(r)!==HQ)throw new TypeError(WQ+r);for(var n=QQ(arguments,1),i,a=function(){if(this instanceof i){var l=r.apply(this,tR(n,arguments));return Object(l)===l?l:this}return r.apply(t,tR(n,arguments))},s=GQ(0,r.length-n.length),o=[],c=0;c<s;c++)o[c]="$"+c;if(i=Function("binder","return function ("+YQ(o,",")+"){ 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 $d=C((Dze,iR)=>{"use strict";var JQ=nR();iR.exports=Function.prototype.bind||JQ});var Ah=C((Mze,aR)=>{"use strict";aR.exports=Function.prototype.call});var B0=C((Lze,sR)=>{"use strict";sR.exports=Function.prototype.apply});var cR=C((qze,oR)=>{"use strict";oR.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var lR=C((Zze,uR)=>{"use strict";var XQ=$d(),eY=B0(),tY=Ah(),rY=cR();uR.exports=rY||XQ.call(tY,eY)});var pR=C((Fze,dR)=>{"use strict";var nY=$d(),iY=Ch(),aY=Ah(),sY=lR();dR.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new iY("a function is required");return sY(nY,aY,t)}});var yR=C((Vze,vR)=>{"use strict";var oY=pR(),fR=q0(),hR;try{hR=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var W0=!!hR&&fR&&fR(Object.prototype,"__proto__"),gR=Object,mR=gR.getPrototypeOf;vR.exports=W0&&typeof W0.get=="function"?oY([W0.get]):typeof mR=="function"?function(t){return mR(t==null?t:gR(t))}:!1});var kR=C((Bze,wR)=>{"use strict";var _R=F0(),bR=V0(),xR=yR();wR.exports=_R?function(t){return _R(t)}:bR?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return bR(t)}:xR?function(t){return xR(t)}:null});var Rh=C((Wze,SR)=>{"use strict";var cY=Function.prototype.call,uY=Object.prototype.hasOwnProperty,lY=$d();SR.exports=lY.call(cY,uY)});var zR=C((Kze,OR)=>{"use strict";var ht,dY=L0(),pY=gA(),fY=yA(),mY=bA(),hY=wA(),Jc=SA(),Yc=Ch(),gY=IA(),vY=TA(),yY=zA(),_Y=NA(),bY=AA(),xY=UA(),wY=MA(),kY=FA(),PR=Function,K0=function(e){try{return PR('"use strict"; return ('+e+").constructor;")()}catch{}},Ed=q0(),SY=GA(),G0=function(){throw new Yc},$Y=Ed?(function(){try{return arguments.callee,G0}catch{try{return Ed(arguments,"callee").get}catch{return G0}}})():G0,Hc=JA()(),Rr=kR(),EY=V0(),IY=F0(),TR=B0(),Id=Ah(),Qc={},PY=typeof Uint8Array>"u"||!Rr?ht:Rr(Uint8Array),vo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ht:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ht:ArrayBuffer,"%ArrayIteratorPrototype%":Hc&&Rr?Rr([][Symbol.iterator]()):ht,"%AsyncFromSyncIteratorPrototype%":ht,"%AsyncFunction%":Qc,"%AsyncGenerator%":Qc,"%AsyncGeneratorFunction%":Qc,"%AsyncIteratorPrototype%":Qc,"%Atomics%":typeof Atomics>"u"?ht:Atomics,"%BigInt%":typeof BigInt>"u"?ht:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ht:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ht:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ht:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":pY,"%eval%":eval,"%EvalError%":fY,"%Float16Array%":typeof Float16Array>"u"?ht:Float16Array,"%Float32Array%":typeof Float32Array>"u"?ht:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ht:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ht:FinalizationRegistry,"%Function%":PR,"%GeneratorFunction%":Qc,"%Int8Array%":typeof Int8Array>"u"?ht:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ht:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ht:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Hc&&Rr?Rr(Rr([][Symbol.iterator]())):ht,"%JSON%":typeof JSON=="object"?JSON:ht,"%Map%":typeof Map>"u"?ht:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Hc||!Rr?ht:Rr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":dY,"%Object.getOwnPropertyDescriptor%":Ed,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ht:Promise,"%Proxy%":typeof Proxy>"u"?ht:Proxy,"%RangeError%":mY,"%ReferenceError%":hY,"%Reflect%":typeof Reflect>"u"?ht:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ht:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Hc||!Rr?ht:Rr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ht:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Hc&&Rr?Rr(""[Symbol.iterator]()):ht,"%Symbol%":Hc?Symbol:ht,"%SyntaxError%":Jc,"%ThrowTypeError%":$Y,"%TypedArray%":PY,"%TypeError%":Yc,"%Uint8Array%":typeof Uint8Array>"u"?ht:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ht:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ht:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ht:Uint32Array,"%URIError%":gY,"%WeakMap%":typeof WeakMap>"u"?ht:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ht:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ht:WeakSet,"%Function.prototype.call%":Id,"%Function.prototype.apply%":TR,"%Object.defineProperty%":SY,"%Object.getPrototypeOf%":EY,"%Math.abs%":vY,"%Math.floor%":yY,"%Math.max%":_Y,"%Math.min%":bY,"%Math.pow%":xY,"%Math.round%":wY,"%Math.sign%":kY,"%Reflect.getPrototypeOf%":IY};if(Rr)try{null.error}catch(e){$R=Rr(Rr(e)),vo["%Error.prototype%"]=$R}var $R,TY=function e(t){var r;if(t==="%AsyncFunction%")r=K0("async function () {}");else if(t==="%GeneratorFunction%")r=K0("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=K0("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Rr&&(r=Rr(i.prototype))}return vo[t]=r,r},ER={__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"]},Pd=$d(),Uh=Rh(),OY=Pd.call(Id,Array.prototype.concat),zY=Pd.call(TR,Array.prototype.splice),IR=Pd.call(Id,String.prototype.replace),Dh=Pd.call(Id,String.prototype.slice),CY=Pd.call(Id,RegExp.prototype.exec),NY=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,jY=/\\(\\)?/g,AY=function(t){var r=Dh(t,0,1),n=Dh(t,-1);if(r==="%"&&n!=="%")throw new Jc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Jc("invalid intrinsic syntax, expected opening `%`");var i=[];return IR(t,NY,function(a,s,o,c){i[i.length]=o?IR(c,jY,"$1"):s||a}),i},RY=function(t,r){var n=t,i;if(Uh(ER,n)&&(i=ER[n],n="%"+i[0]+"%"),Uh(vo,n)){var a=vo[n];if(a===Qc&&(a=TY(n)),typeof a>"u"&&!r)throw new Yc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Jc("intrinsic "+t+" does not exist!")};OR.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Yc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Yc('"allowMissing" argument must be a boolean');if(CY(/^%?[^%]*%?$/,t)===null)throw new Jc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=AY(t),i=n.length>0?n[0]:"",a=RY("%"+i+"%",r),s=a.name,o=a.value,c=!1,u=a.alias;u&&(i=u[0],zY(n,OY([0,1],u)));for(var l=1,d=!0;l<n.length;l+=1){var p=n[l],f=Dh(p,0,1),m=Dh(p,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new Jc("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),i+="."+p,s="%"+i+"%",Uh(vo,s))o=vo[s];else if(o!=null){if(!(p in o)){if(!r)throw new Yc("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ed&&l+1>=n.length){var v=Ed(o,p);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?o=v.get:o=o[p]}else d=Uh(o,p),o=o[p];d&&!c&&(vo[s]=o)}}return o}});var NR=C((Gze,CR)=>{"use strict";var UY=Z0();CR.exports=function(){return UY()&&!!Symbol.toStringTag}});var RR=C((Hze,AR)=>{"use strict";var DY=zR(),jR=DY("%Object.defineProperty%",!0),MY=NR()(),LY=Rh(),qY=Ch(),Mh=MY?Symbol.toStringTag:null;AR.exports=function(t,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 qY("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Mh&&(n||!LY(t,Mh))&&(jR?jR(t,Mh,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[Mh]=r)}});var DR=C((Qze,UR)=>{"use strict";UR.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var LR=C((Yze,MR)=>{"use strict";var J0=Vj(),ZY=Ot("util"),H0=Ot("path"),FY=Ot("http"),VY=Ot("https"),BY=Ot("url").parse,WY=Ot("fs"),KY=Ot("stream").Stream,GY=Ot("crypto"),Q0=Qj(),HY=fA(),QY=RR(),Ss=Rh(),Y0=DR();function $t(e){if(!(this instanceof $t))return new $t(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],J0.call(this),e=e||{};for(var t in e)this[t]=e[t]}ZY.inherits($t,J0);$t.LINE_BREAK=`\r
42
+ `;$t.DEFAULT_CONTENT_TYPE="application/octet-stream";$t.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=J0.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(i),n(t),n(a),this._trackLength(i,t,r)};$t.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+$t.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ss(t,"httpVersion"))&&!(t instanceof KY))&&(r.knownLength||this._valuesToMeasure.push(t))};$t.prototype._lengthRetriever=function(e,t){Ss(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):WY.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ss(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ss(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};$t.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Y0(s,r.header);var o;for(var c in s)if(Ss(s,c)){if(o=s[c],o==null)continue;Array.isArray(o)||(o=[o]),o.length&&(a+=c+": "+o.join("; ")+$t.LINE_BREAK)}return"--"+this.getBoundary()+$t.LINE_BREAK+a+$t.LINE_BREAK};$t.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=H0.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=H0.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ss(e,"httpVersion")&&(r=H0.basename(e.client._httpMessage.path||"")),r)return'filename="'+r+'"'};$t.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=Q0.lookup(e.name)),!r&&e&&e.path&&(r=Q0.lookup(e.path)),!r&&e&&e.readable&&Ss(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Q0.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=$t.DEFAULT_CONTENT_TYPE),r};$t.prototype._multiPartFooter=function(){return function(e){var t=$t.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};$t.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+$t.LINE_BREAK};$t.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ss(e,t)&&(r[t.toLowerCase()]=e[t]);return r};$t.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};$t.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};$t.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from($t.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};$t.prototype._generateBoundary=function(){this._boundary="--------------------------"+GY.randomBytes(12).toString("hex")};$t.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};$t.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};$t.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}HY.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};$t.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=BY(e),n=Y0({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=Y0(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=VY.request(n):r=FY.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var o,c=function(u,l){return r.removeListener("error",c),r.removeListener("response",o),t.call(this,u,l)};o=c.bind(this,null),r.on("error",c),r.on("response",o)}}.bind(this)),r};$t.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};$t.prototype.toString=function(){return"[object FormData]"};QY($t.prototype,"FormData");MR.exports=$t});var qR,Lh,X0=P(()=>{qR=Yl(LR(),1),Lh=qR.default});function tw(e){return N.isPlainObject(e)||N.isArray(e)}function ZR(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function ew(e,t,r){return e?e.concat(t).map(function(i,a){return i=ZR(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function YY(e){return N.isArray(e)&&!e.some(tw)}function XY(e,t,r){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new(Lh||FormData),r=N.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!N.isUndefined(g[v])});let n=r.metaTokens,i=r.visitor||l,a=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(N.isDate(m))return m.toISOString();if(N.isBoolean(m))return m.toString();if(!c&&N.isBlob(m))throw new ce("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(m)||N.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,v,g){let h=m;if(N.isReactNative(t)&&N.isReactNativeBlob(m))return t.append(ew(g,v,a),u(m)),!1;if(m&&!g&&typeof m=="object"){if(N.endsWith(v,"{}"))v=n?v:v.slice(0,-2),m=JSON.stringify(m);else if(N.isArray(m)&&YY(m)||(N.isFileList(m)||N.endsWith(v,"[]"))&&(h=N.toArray(m)))return v=ZR(v),h.forEach(function(y,b){!(N.isUndefined(y)||y===null)&&t.append(s===!0?ew([v],b,a):s===null?v:v+"[]",u(y))}),!1}return tw(m)?!0:(t.append(ew(g,v,a),u(m)),!1)}let d=[],p=Object.assign(JY,{defaultVisitor:l,convertValue:u,isVisitable:tw});function f(m,v){if(!N.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(m),N.forEach(m,function(h,_){(!(N.isUndefined(h)||h===null)&&i.call(t,h,N.isString(_)?_.trim():_,v,p))===!0&&f(h,v?v.concat(_):[_])}),d.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return f(e),t}var JY,$s,Td=P(()=>{"use strict";Xt();Yn();X0();JY=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});$s=XY});function FR(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function VR(e,t){this._pairs=[],e&&$s(e,this,t)}var BR,WR,KR=P(()=>{"use strict";Td();BR=VR.prototype;BR.append=function(t,r){this._pairs.push([t,r])};BR.toString=function(t){let r=t?function(n){return t.call(this,n,FR)}:FR;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};WR=VR});function eJ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function yo(e,t,r){if(!t)return e;let n=r&&r.encode||eJ,i=N.isFunction(r)?{serialize:r}:r,a=i&&i.serialize,s;if(a?s=a(t,i):s=N.isURLSearchParams(t)?t.toString():new WR(t,i).toString(n),s){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var qh=P(()=>{"use strict";Xt();KR()});var rw,nw,GR=P(()=>{"use strict";Xt();rw=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){N.forEach(this.handlers,function(n){n!==null&&t(n)})}},nw=rw});var Es,Od=P(()=>{"use strict";Es={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0}});import tJ from"url";var HR,QR=P(()=>{"use strict";HR=tJ.URLSearchParams});import rJ from"crypto";var iw,YR,JR,nJ,XR,e4=P(()=>{QR();X0();iw="abcdefghijklmnopqrstuvwxyz",YR="0123456789",JR={DIGIT:YR,ALPHA:iw,ALPHA_DIGIT:iw+iw.toUpperCase()+YR},nJ=(e=16,t=JR.ALPHA_DIGIT)=>{let r="",{length:n}=t,i=new Uint32Array(e);rJ.randomFillSync(i);for(let a=0;a<e;a++)r+=t[i[a]%n];return r},XR={isNode:!0,classes:{URLSearchParams:HR,FormData:Lh,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:JR,generateString:nJ,protocols:["http","https","file","data"]}});var ow={};ga(ow,{hasBrowserEnv:()=>sw,hasStandardBrowserEnv:()=>iJ,hasStandardBrowserWebWorkerEnv:()=>aJ,navigator:()=>aw,origin:()=>sJ});var sw,aw,iJ,aJ,sJ,t4=P(()=>{sw=typeof window<"u"&&typeof document<"u",aw=typeof navigator=="object"&&navigator||void 0,iJ=sw&&(!aw||["ReactNative","NativeScript","NS"].indexOf(aw.product)<0),aJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sJ=sw&&window.location.href||"http://localhost"});var Rt,Ki=P(()=>{e4();t4();Rt={...ow,...XR}});function cw(e,t){return $s(e,new Rt.classes.URLSearchParams,{visitor:function(r,n,i,a){return Rt.isNode&&N.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}var r4=P(()=>{"use strict";Xt();Td();Ki()});function oJ(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function cJ(e){let t={},r=Object.keys(e),n,i=r.length,a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function uJ(e){function t(r,n,i,a){let s=r[a++];if(s==="__proto__")return!0;let o=Number.isFinite(+s),c=a>=r.length;return s=!s&&N.isArray(i)?i.length:s,c?(N.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o):((!i[s]||!N.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],a)&&N.isArray(i[s])&&(i[s]=cJ(i[s])),!o)}if(N.isFormData(e)&&N.isFunction(e.entries)){let r={};return N.forEachEntry(e,(n,i)=>{t(oJ(n),i,r,0)}),r}return null}var Zh,uw=P(()=>{"use strict";Xt();Zh=uJ});function lJ(e,t,r){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var lw,Xc,Fh=P(()=>{"use strict";Xt();Yn();Od();Td();r4();Ki();uw();lw={transitional:Es,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=N.isObject(t);if(a&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return i?JSON.stringify(Zh(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return cw(t,this.formSerializer).toString();if((o=N.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return $s(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),lJ(t)):t}],transformResponse:[function(t){let r=this.transitional||lw.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(n&&!this.responseType||i)){let s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(o){if(s)throw o.name==="SyntaxError"?ce.from(o,ce.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{lw.headers[e]={}});Xc=lw});var dJ,n4,i4=P(()=>{"use strict";Xt();dJ=N.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"]),n4=e=>{let t={},r,n,i;return e&&e.split(`
43
+ `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&dJ[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t}});function s4(e,t){if(!(e===!1||e==null)){if(N.isArray(e)){e.forEach(r=>s4(r,t));return}if(!pJ(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}}function zd(e){return e&&String(e).trim().toLowerCase()}function fJ(e){let t=e.length;for(;t>0;){let r=e.charCodeAt(t-1);if(r!==10&&r!==13)break;t-=1}return t===e.length?e:e.slice(0,t)}function Vh(e){return e===!1||e==null?e:N.isArray(e)?e.map(Vh):fJ(String(e))}function mJ(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function dw(e,t,r,n,i){if(N.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!N.isString(t)){if(N.isString(n))return t.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(t)}}function gJ(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function vJ(e,t){let r=N.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,s){return this[n].call(this,t,i,a,s)},configurable:!0})})}var a4,pJ,hJ,eu,fr,ba=P(()=>{"use strict";Xt();i4();a4=Symbol("internals"),pJ=e=>!/[\r\n]/.test(e);hJ=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());eu=class{constructor(t){t&&this.set(t)}set(t,r,n){let i=this;function a(o,c,u){let l=zd(c);if(!l)throw new Error("header name must be a non-empty string");let d=N.findKey(i,l);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(s4(o,c),i[d||c]=Vh(o))}let s=(o,c)=>N.forEach(o,(u,l)=>a(u,l,c));if(N.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(N.isString(t)&&(t=t.trim())&&!hJ(t))s(n4(t),r);else if(N.isObject(t)&&N.isIterable(t)){let o={},c,u;for(let l of t){if(!N.isArray(l))throw TypeError("Object iterator must return a key-value pair");o[u=l[0]]=(c=o[u])?N.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}s(o,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=zd(t),t){let n=N.findKey(this,t);if(n){let i=this[n];if(!r)return i;if(r===!0)return mJ(i);if(N.isFunction(r))return r.call(this,i,n);if(N.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=zd(t),t){let n=N.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||dw(this,this[n],n,r)))}return!1}delete(t,r){let n=this,i=!1;function a(s){if(s=zd(s),s){let o=N.findKey(n,s);o&&(!r||dw(n,n[o],o,r))&&(delete n[o],i=!0)}}return N.isArray(t)?t.forEach(a):a(t),i}clear(t){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let a=r[n];(!t||dw(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){let r=this,n={};return N.forEach(this,(i,a)=>{let s=N.findKey(n,a);if(s){r[s]=Vh(i),delete r[a];return}let o=t?gJ(a):String(a).trim();o!==a&&delete r[a],r[o]=Vh(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&N.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
44
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){let n=(this[a4]=this[a4]={accessors:{}}).accessors,i=this.prototype;function a(s){let o=zd(s);n[o]||(vJ(i,s),n[o]=!0)}return N.isArray(t)?t.forEach(a):a(t),this}};eu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(eu.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});N.freezeMethods(eu);fr=eu});function Cd(e,t){let r=this||Xc,n=t||r,i=fr.from(n.headers),a=n.data;return N.forEach(e,function(o){a=o.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}var o4=P(()=>{"use strict";Xt();Fh();ba()});function Nd(e){return!!(e&&e.__CANCEL__)}var pw=P(()=>{"use strict"});var fw,Jn,_o=P(()=>{"use strict";Yn();fw=class extends ce{constructor(t,r,n){super(t??"canceled",ce.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},Jn=fw});function xa(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ce("Request failed with status code "+r.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}var Bh=P(()=>{"use strict";Yn()});function mw(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}var c4=P(()=>{"use strict"});function hw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}var u4=P(()=>{"use strict"});function bo(e,t,r){let n=!mw(t);return e&&(n||r==!1)?hw(e,t):t}var Wh=P(()=>{"use strict";c4();u4()});function _J(e){try{return new URL(e)}catch{return null}}function l4(e){var t=(typeof e=="string"?_J(e):e)||{},r=t.protocol,n=t.host,i=t.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||yJ[r]||0,!bJ(n,i)))return"";var a=gw(r+"_proxy")||gw("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function bJ(e,t){var r=gw("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,s=i?parseInt(i[2]):0;return s&&s!==t?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!e.endsWith(a)):e!==a}):!0}function gw(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var yJ,d4=P(()=>{"use strict";yJ={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var f4=C((XCe,p4)=>{var tu=1e3,ru=tu*60,nu=ru*60,xo=nu*24,xJ=xo*7,wJ=xo*365.25;p4.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return kJ(e);if(r==="number"&&isFinite(e))return t.long?$J(e):SJ(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function kJ(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*wJ;case"weeks":case"week":case"w":return r*xJ;case"days":case"day":case"d":return r*xo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*nu;case"minutes":case"minute":case"mins":case"min":case"m":return r*ru;case"seconds":case"second":case"secs":case"sec":case"s":return r*tu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function SJ(e){var t=Math.abs(e);return t>=xo?Math.round(e/xo)+"d":t>=nu?Math.round(e/nu)+"h":t>=ru?Math.round(e/ru)+"m":t>=tu?Math.round(e/tu)+"s":e+"ms"}function $J(e){var t=Math.abs(e);return t>=xo?Kh(e,t,xo,"day"):t>=nu?Kh(e,t,nu,"hour"):t>=ru?Kh(e,t,ru,"minute"):t>=tu?Kh(e,t,tu,"second"):e+" ms"}function Kh(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var vw=C((eNe,m4)=>{function EJ(e){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=f4(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let d=0;for(let p=0;p<l.length;p++)d=(d<<5)-d+l.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(l){let d,p=null,f,m;function v(...g){if(!v.enabled)return;let h=v,_=Number(new Date),y=_-(d||_);h.diff=y,h.prev=d,h.curr=_,d=_,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let b=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(w,k)=>{if(w==="%%")return"%";b++;let E=r.formatters[k];if(typeof E=="function"){let O=g[b];w=E.call(h,O),g.splice(b,1),b--}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:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,m=r.enabled(l)),m),set:g=>{p=g}}),typeof r.init=="function"&&r.init(v),v}function n(l,d){let p=r(this.namespace+(typeof d>"u"?":":d)+l);return p.log=this.log,p}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 p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function a(l,d){let p=0,f=0,m=-1,v=0;for(;p<l.length;)if(f<d.length&&(d[f]===l[p]||d[f]==="*"))d[f]==="*"?(m=f,v=p,f++):(p++,f++);else if(m!==-1)f=m+1,v++,p=v;else return!1;for(;f<d.length&&d[f]==="*";)f++;return f===d.length}function s(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function o(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}m4.exports=EJ});var h4=C((zn,Gh)=>{zn.formatArgs=PJ;zn.save=TJ;zn.load=OJ;zn.useColors=IJ;zn.storage=zJ();zn.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})();zn.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 IJ(){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 e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function PJ(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Gh.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}zn.log=console.debug||console.log||(()=>{});function TJ(e){try{e?zn.storage.setItem("debug",e):zn.storage.removeItem("debug")}catch{}}function OJ(){let e;try{e=zn.storage.getItem("debug")||zn.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function zJ(){try{return localStorage}catch{}}Gh.exports=vw()(zn);var{formatters:CJ}=Gh.exports;CJ.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var v4=C((tNe,g4)=>{"use strict";g4.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var b4=C((rNe,_4)=>{"use strict";var NJ=Ot("os"),y4=Ot("tty"),hi=v4(),{env:Ur}=process,Is;hi("no-color")||hi("no-colors")||hi("color=false")||hi("color=never")?Is=0:(hi("color")||hi("colors")||hi("color=true")||hi("color=always"))&&(Is=1);"FORCE_COLOR"in Ur&&(Ur.FORCE_COLOR==="true"?Is=1:Ur.FORCE_COLOR==="false"?Is=0:Is=Ur.FORCE_COLOR.length===0?1:Math.min(parseInt(Ur.FORCE_COLOR,10),3));function yw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function _w(e,t){if(Is===0)return 0;if(hi("color=16m")||hi("color=full")||hi("color=truecolor"))return 3;if(hi("color=256"))return 2;if(e&&!t&&Is===void 0)return 0;let r=Is||0;if(Ur.TERM==="dumb")return r;if(process.platform==="win32"){let n=NJ.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ur)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ur)||Ur.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ur)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ur.TEAMCITY_VERSION)?1:0;if(Ur.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ur){let n=parseInt((Ur.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ur.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ur.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ur.TERM)||"COLORTERM"in Ur?1:r}function jJ(e){let t=_w(e,e&&e.isTTY);return yw(t)}_4.exports={supportsColor:jJ,stdout:yw(_w(!0,y4.isatty(1))),stderr:yw(_w(!0,y4.isatty(2)))}});var w4=C((Dr,Qh)=>{var AJ=Ot("tty"),Hh=Ot("util");Dr.init=ZJ;Dr.log=MJ;Dr.formatArgs=UJ;Dr.save=LJ;Dr.load=qJ;Dr.useColors=RJ;Dr.destroy=Hh.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Dr.colors=[6,2,3,4,5,1];try{let e=b4();e&&(e.stderr||e).level>=2&&(Dr.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{}Dr.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),n=process.env[t];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),e[r]=n,e},{});function RJ(){return"colors"in Dr.inspectOpts?!!Dr.inspectOpts.colors:AJ.isatty(process.stderr.fd)}function UJ(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),a=` ${i};1m${t} \x1B[0m`;e[0]=a+e[0].split(`
45
+ `).join(`
46
+ `+a),e.push(i+"m+"+Qh.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=DJ()+t+" "+e[0]}function DJ(){return Dr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function MJ(...e){return process.stderr.write(Hh.formatWithOptions(Dr.inspectOpts,...e)+`
47
+ `)}function LJ(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function qJ(){return process.env.DEBUG}function ZJ(e){e.inspectOpts={};let t=Object.keys(Dr.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Dr.inspectOpts[t[r]]}Qh.exports=vw()(Dr);var{formatters:x4}=Qh.exports;x4.o=function(e){return this.inspectOpts.colors=this.useColors,Hh.inspect(e,this.inspectOpts).split(`
48
+ `).map(t=>t.trim()).join(" ")};x4.O=function(e){return this.inspectOpts.colors=this.useColors,Hh.inspect(e,this.inspectOpts)}});var k4=C((nNe,bw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?bw.exports=h4():bw.exports=w4()});var $4=C((iNe,S4)=>{var jd;S4.exports=function(){if(!jd){try{jd=k4()("follow-redirects")}catch{}typeof jd!="function"&&(jd=function(){})}jd.apply(null,arguments)}});var O4=C((aNe,Cw)=>{var Rd=Ot("url"),Ad=Rd.URL,FJ=Ot("http"),VJ=Ot("https"),$w=Ot("stream").Writable,Ew=Ot("assert"),E4=$4();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=ko(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Iw=!1;try{Ew(new Ad(""))}catch(e){Iw=e.code==="ERR_INVALID_URL"}var BJ=["Authorization","Proxy-Authorization","Cookie"],WJ=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Pw=["abort","aborted","connect","error","socket","timeout"],Tw=Object.create(null);Pw.forEach(function(e){Tw[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var ww=Ud("ERR_INVALID_URL","Invalid URL",TypeError),kw=Ud("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),KJ=Ud("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",kw),GJ=Ud("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),HJ=Ud("ERR_STREAM_WRITE_AFTER_END","write after end"),QJ=$w.prototype.destroy||P4;function Cn(e,t){$w.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof kw?i:new kw({cause:i}))}},this._headerFilter=new RegExp("^(?:"+BJ.concat(e.sensitiveHeaders).map(rX).join("|")+")$","i"),this._performRequest()}Cn.prototype=Object.create($w.prototype);Cn.prototype.abort=function(){zw(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Cn.prototype.destroy=function(e){return zw(this._currentRequest,e),QJ.call(this,e),this};Cn.prototype.write=function(e,t,r){if(this._ending)throw new HJ;if(!wo(e)&&!eX(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ko(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new GJ),this.abort())};Cn.prototype.end=function(e,t,r){if(ko(e)?(r=e,e=t=null):ko(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(e,t,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Cn.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Cn.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Cn.prototype.setTimeout=function(e,t){var r=this;function n(s){s.setTimeout(e),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},e),n(s)}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),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),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(e){Cn.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Cn.prototype,e,{get:function(){return this._currentRequest[e]}})});Cn.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),XJ(e.sensitiveHeaders)||(e.sensitiveHeaders=[]),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Cn.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Pw)n.on(i,Tw[i]);if(this._currentUrl=/^\//.test(this._options.path)?Rd.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,o=this._requestBodyBuffers;(function c(u){if(n===s._currentRequest)if(u)s.emit("error",u);else if(a<o.length){var l=o[a++];n.finished||n.write(l.data,l.encoding,c)}else s._ended&&n.end()})()}};Cn.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(zw(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new KJ;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],xw(/^content-/i,this._options.headers));var s=xw(/^host$/i,this._options.headers),o=Ow(this._currentUrl),c=s||o.host,u=/^\w+:/.test(r)?this._currentUrl:Rd.format(Object.assign(o,{host:c})),l=YJ(r,u);if(E4("redirecting to",l.href),this._isRedirect=!0,Sw(l,this._options),(l.protocol!==o.protocol&&l.protocol!=="https:"||l.host!==c&&!JJ(l.host,c))&&xw(this._headerFilter,this._options.headers),ko(i)){var d={headers:e.headers,statusCode:t},p={url:u,method:a,headers:n};i(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function I4(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var i=n+":",a=r[i]=e[n],s=t[n]=Object.create(a);function o(u,l,d){return tX(u)?u=Sw(u):wo(u)?u=Sw(Ow(u)):(d=l,l=T4(u),u={protocol:i}),ko(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},u,l),l.nativeProtocols=r,!wo(l.host)&&!wo(l.hostname)&&(l.hostname="::1"),Ew.equal(l.protocol,i,"protocol mismatch"),E4("options",l),new Cn(l,d)}function c(u,l,d){var p=s.request(u,l,d);return p.end(),p}Object.defineProperties(s,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function P4(){}function Ow(e){var t;if(Iw)t=new Ad(e);else if(t=T4(Rd.parse(e)),!wo(t.protocol))throw new ww({input:e});return t}function YJ(e,t){return Iw?new Ad(e,t):Ow(Rd.resolve(t,e))}function T4(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new ww({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new ww({input:e.href||e});return e}function Sw(e,t){var r=t||{};for(var n of WJ)r[n]=e[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 xw(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Ud(e,t,r){function n(i){ko(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function zw(e,t){for(var r of Pw)e.removeListener(r,Tw[r]);e.on("error",P4),e.destroy(t)}function JJ(e,t){Ew(wo(e)&&wo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function XJ(e){return e instanceof Array}function wo(e){return typeof e=="string"||e instanceof String}function ko(e){return typeof e=="function"}function eX(e){return typeof e=="object"&&"length"in e}function tX(e){return Ad&&e instanceof Ad}function rX(e){return e.replace(/[\]\\/()*+?.$]/g,"\\$&")}Cw.exports=I4({http:FJ,https:VJ});Cw.exports.wrap=I4});var So,Yh=P(()=>{So="1.15.0"});function Dd(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var Nw=P(()=>{"use strict"});function jw(e,t,r){let n=r&&r.Blob||Rt.classes.Blob,i=Dd(e);if(t===void 0&&n&&(t=!0),i==="data"){e=i.length?e.slice(i.length+1):e;let a=nX.exec(e);if(!a)throw new ce("Invalid URL",ce.ERR_INVALID_URL);let s=a[1],o=a[2],c=a[3],u=Buffer.from(decodeURIComponent(c),o?"base64":"utf8");if(t){if(!n)throw new ce("Blob is not supported",ce.ERR_NOT_SUPPORT);return new n([u],{type:s})}return u}throw new ce("Unsupported protocol "+i,ce.ERR_NOT_SUPPORT)}var nX,z4=P(()=>{"use strict";Yn();Nw();Ki();nX=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});import iX from"stream";var Aw,Rw,Uw,C4=P(()=>{"use strict";Xt();Aw=Symbol("internals"),Rw=class extends iX.Transform{constructor(t){t=N.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,i)=>!N.isUndefined(i[n])),super({readableHighWaterMark:t.chunkSize});let r=this[Aw]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.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(t){let r=this[Aw];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let i=this[Aw],a=i.maxRate,s=this.readableHighWaterMark,o=i.timeWindow,c=1e3/o,u=a/c,l=i.minChunkSize!==!1?Math.max(i.minChunkSize,u*.01):0,d=(f,m)=>{let v=Buffer.byteLength(f);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(f)?process.nextTick(m):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(m)}},p=(f,m)=>{let v=Buffer.byteLength(f),g=null,h=s,_,y=0;if(a){let b=Date.now();(!i.ts||(y=b-i.ts)>=o)&&(i.ts=b,_=u-i.bytes,i.bytes=_<0?-_:0,y=0),_=u-i.bytes}if(a){if(_<=0)return setTimeout(()=>{m(null,f)},o-y);_<h&&(h=_)}h&&v>h&&v-h>l&&(g=f.subarray(h),f=f.subarray(0,h)),d(f,g?()=>{process.nextTick(m,null,g)}:m)};p(t,function f(m,v){if(m)return n(m);v?p(v,f):n(null)})}},Uw=Rw});var N4,aX,Jh,Dw=P(()=>{({asyncIterator:N4}=Symbol),aX=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[N4]?yield*e[N4]():yield e},Jh=aX});import sX from"util";import{Readable as oX}from"stream";var cX,Md,$o,uX,lX,Mw,dX,j4,A4=P(()=>{Xt();Dw();Ki();cX=Rt.ALPHABET.ALPHA_DIGIT+"-_",Md=typeof TextEncoder=="function"?new TextEncoder:new sX.TextEncoder,$o=`\r
49
+ `,uX=Md.encode($o),lX=2,Mw=class{constructor(t,r){let{escapeName:n}=this.constructor,i=N.isString(r),a=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${$o}`;i?r=Md.encode(String(r).replace(/\r?\n|\r\n?/g,$o)):a+=`Content-Type: ${r.type||"application/octet-stream"}${$o}`,this.headers=Md.encode(a+$o),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+lX,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;N.isTypedArray(t)?yield t:yield*Jh(t),yield uX}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},dX=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:a=n+"-"+Rt.generateString(i,cX)}=r||{};if(!N.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let s=Md.encode("--"+a+$o),o=Md.encode("--"+a+"--"+$o),c=o.byteLength,u=Array.from(e.entries()).map(([d,p])=>{let f=new Mw(d,p);return c+=f.size,f});c+=s.byteLength*u.length,c=N.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),oX.from((async function*(){for(let d of u)yield s,yield*d.encode();yield o})())},j4=dX});import pX from"stream";var Lw,R4,U4=P(()=>{"use strict";Lw=class extends pX.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(t,r,n)}},R4=Lw});var fX,D4,M4=P(()=>{Xt();fX=(e,t)=>N.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(a){n(a)}},n)}:e,D4=fX});function qw(e){let t;try{t=new URL(e)}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(t.port,10)||mX[t.protocol.split(":",1)[0]]||0,i=L4(t.hostname.toLowerCase());return r.split(/[\s,]+/).some(a=>{if(!a)return!1;let[s,o]=hX(a);return s=L4(s),!s||o&&o!==n?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?i.endsWith(s):i===s)})}var mX,hX,L4,q4=P(()=>{mX={http:80,https:443,ws:80,wss:443,ftp:21},hX=e=>{let t=e,r=0;if(t.charAt(0)==="["){let a=t.indexOf("]");if(a!==-1){let s=t.slice(1,a),o=t.slice(a+1);return o.charAt(0)===":"&&/^\d+$/.test(o.slice(1))&&(r=Number.parseInt(o.slice(1),10)),[s,r]}}let n=t.indexOf(":"),i=t.lastIndexOf(":");return n!==-1&&n===i&&/^\d+$/.test(t.slice(i+1))&&(r=Number.parseInt(t.slice(i+1),10),t=t.slice(0,i)),[t,r]},L4=e=>e&&(e.charAt(0)==="["&&e.charAt(e.length-1)==="]"&&(e=e.slice(1,-1)),e.replace(/\.+$/,""))});function gX(e,t){e=e||10;let r=new Array(e),n=new Array(e),i=0,a=0,s;return t=t!==void 0?t:1e3,function(c){let u=Date.now(),l=n[a];s||(s=u),r[i]=c,n[i]=u;let d=a,p=0;for(;d!==i;)p+=r[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-s<t)return;let f=l&&u-l;return f?Math.round(p*1e3/f):void 0}}var Z4,F4=P(()=>{"use strict";Z4=gX});function vX(e,t){let r=0,n=1e3/t,i,a,s=(u,l=Date.now())=>{r=l,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{let l=Date.now(),d=l-r;d>=n?s(u,l):(i=u,a||(a=setTimeout(()=>{a=null,s(i)},n-d)))},()=>i&&s(i)]}var V4,B4=P(()=>{V4=vX});var Za,iu,au,Xh=P(()=>{F4();B4();Xt();Za=(e,t,r=3)=>{let n=0,i=Z4(50,250);return V4(a=>{let s=a.loaded,o=a.lengthComputable?a.total:void 0,c=s-n,u=i(c),l=s<=o;n=s;let d={loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:u||void 0,estimated:u&&o&&l?(o-s)/u:void 0,event:a,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},r)},iu=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},au=e=>(...t)=>N.asap(()=>e(...t))});function Zw(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let a=n.length,s=n.length;for(let p=0;p<s;p++)if(n.charCodeAt(p)===37&&p+2<s){let f=n.charCodeAt(p+1),m=n.charCodeAt(p+2);(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(a-=2,p+=2)}let o=0,c=s-1,u=p=>p>=2&&n.charCodeAt(p-2)===37&&n.charCodeAt(p-1)===51&&(n.charCodeAt(p)===68||n.charCodeAt(p)===100);c>=0&&(n.charCodeAt(c)===61?(o++,c--):u(c)&&(o++,c-=3)),o===1&&c>=0&&(n.charCodeAt(c)===61||u(c))&&o++;let d=Math.floor(a/4)*3-(o||0);return d>0?d:0}return Buffer.byteLength(n,"utf8")}var W4=P(()=>{});import yX from"http";import _X from"https";import J4 from"http2";import X4 from"util";import Ts from"zlib";import Ps from"stream";import{EventEmitter as bX}from"events";function EX(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function tU(e,t,r){let n=t;if(!n&&n!==!1){let i=l4(r);i&&(qw(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 ce("Invalid proxy authorization",ce.ERR_BAD_OPTION,{proxy:n});let s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let i=n.hostname||n.host;e.hostname=i,e.host=i,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(a){tU(a,t,a.href)}}var eU,K4,xX,G4,wX,kX,SX,H4,Q4,Fw,$X,IX,PX,TX,Y4,OX,rU,nU=P(()=>{Xt();Bh();Wh();qh();d4();eU=Yl(O4(),1);Yh();Od();Yn();_o();Ki();z4();ba();C4();A4();Dw();U4();M4();q4();Xh();W4();K4={flush:Ts.constants.Z_SYNC_FLUSH,finishFlush:Ts.constants.Z_SYNC_FLUSH},xX={flush:Ts.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ts.constants.BROTLI_OPERATION_FLUSH},G4=N.isFunction(Ts.createBrotliDecompress),{http:wX,https:kX}=eU.default,SX=/https:?/,H4=Rt.protocols.map(e=>e+":"),Q4=(e,[t,r])=>(e.on("end",r).on("error",r),t),Fw=class{constructor(){this.sessions=Object.create(null)}getSession(t,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[t];if(n){let l=n.length;for(let d=0;d<l;d++){let[p,f]=n[d];if(!p.destroyed&&!p.closed&&X4.isDeepStrictEqual(f,r))return p}}let i=J4.connect(t,r),a,s=()=>{if(a)return;a=!0;let l=n,d=l.length,p=d;for(;p--;)if(l[p][0]===i){d===1?delete this.sessions[t]:l.splice(p,1),i.closed||i.close();return}},o=i.request,{sessionTimeout:c}=r;if(c!=null){let l,d=0;i.request=function(){let p=o.apply(this,arguments);return d++,l&&(clearTimeout(l),l=null),p.once("close",()=>{--d||(l=setTimeout(()=>{l=null,s()},c))}),p}}i.once("close",s);let u=[i,r];return n?n.push(u):n=this.sessions[t]=[u],i}},$X=new Fw;IX=typeof process<"u"&&N.kindOf(process)==="process",PX=e=>new Promise((t,r)=>{let n,i,a=(c,u)=>{i||(i=!0,n&&n(c,u))},s=c=>{a(c),t(c)},o=c=>{a(c,!0),r(c)};e(s,o,c=>n=c).catch(o)}),TX=({address:e,family:t})=>{if(!N.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},Y4=(e,t)=>TX(N.isObject(e)?e:{address:e,family:t}),OX={request(e,t){let r=e.protocol+"//"+e.hostname+":"+(e.port||(e.protocol==="https:"?443:80)),{http2Options:n,headers:i}=e,a=$X.getSession(r,n),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:o,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=J4.constants,l={[s]:e.protocol.replace(":",""),[o]:e.method,[c]:e.path};N.forEach(i,(p,f)=>{f.charAt(0)!==":"&&(l[f]=p)});let d=a.request(l);return d.once("response",p=>{let f=d;p=Object.assign({},p);let m=p[u];delete p[u],f.headers=p,f.statusCode=+m,t(f)}),d}},rU=IX&&function(t){return PX(async function(n,i,a){let{data:s,lookup:o,family:c,httpVersion:u=1,http2Options:l}=t,{responseType:d,responseEncoding:p}=t,f=t.method.toUpperCase(),m,v=!1,g;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let h=u===2;if(o){let V=D4(o,I=>N.isArray(I)?I:[I]);o=(I,B,A)=>{V(I,B,($,T,K)=>{if($)return A($);let se=N.isArray(T)?T.map(ge=>Y4(ge)):[Y4(T,K)];B.all?A($,se):A($,se[0].address,se[0].family)})}}let _=new bX;function y(V){try{_.emit("abort",!V||V.type?new Jn(null,t,g):V)}catch(I){console.warn("emit error",I)}}_.once("abort",i);let b=()=>{t.cancelToken&&t.cancelToken.unsubscribe(y),t.signal&&t.signal.removeEventListener("abort",y),_.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(y),t.signal&&(t.signal.aborted?y():t.signal.addEventListener("abort",y))),a((V,I)=>{if(m=!0,I){v=!0,b();return}let{data:B}=V;if(B instanceof Ps.Readable||B instanceof Ps.Duplex){let A=Ps.finished(B,()=>{A(),b()})}else b()});let x=bo(t.baseURL,t.url,t.allowAbsoluteUrls),w=new URL(x,Rt.hasBrowserEnv?Rt.origin:void 0),k=w.protocol||H4[0];if(k==="data:"){if(t.maxContentLength>-1){let I=String(t.url||x||"");if(Zw(I)>t.maxContentLength)return i(new ce("maxContentLength size of "+t.maxContentLength+" exceeded",ce.ERR_BAD_RESPONSE,t))}let V;if(f!=="GET")return xa(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{V=jw(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(I){throw ce.from(I,ce.ERR_BAD_REQUEST,t)}return d==="text"?(V=V.toString(p),(!p||p==="utf8")&&(V=N.stripBOM(V))):d==="stream"&&(V=Ps.Readable.from(V)),xa(n,i,{data:V,status:200,statusText:"OK",headers:new fr,config:t})}if(H4.indexOf(k)===-1)return i(new ce("Unsupported protocol "+k,ce.ERR_BAD_REQUEST,t));let E=fr.from(t.headers).normalize();E.set("User-Agent","axios/"+So,!1);let{onUploadProgress:O,onDownloadProgress:U}=t,z=t.maxRate,L,W;if(N.isSpecCompliantForm(s)){let V=E.getContentType(/boundary=([-_\w\d]{10,70})/i);s=j4(s,I=>{E.set(I)},{tag:`axios-${So}-boundary`,boundary:V&&V[1]||void 0})}else if(N.isFormData(s)&&N.isFunction(s.getHeaders)){if(E.set(s.getHeaders()),!E.hasContentLength())try{let V=await X4.promisify(s.getLength).call(s);Number.isFinite(V)&&V>=0&&E.setContentLength(V)}catch{}}else if(N.isBlob(s)||N.isFile(s))s.size&&E.setContentType(s.type||"application/octet-stream"),E.setContentLength(s.size||0),s=Ps.Readable.from(Jh(s));else if(s&&!N.isStream(s)){if(!Buffer.isBuffer(s))if(N.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else if(N.isString(s))s=Buffer.from(s,"utf-8");else return i(new ce("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ce.ERR_BAD_REQUEST,t));if(E.setContentLength(s.length,!1),t.maxBodyLength>-1&&s.length>t.maxBodyLength)return i(new ce("Request body larger than maxBodyLength limit",ce.ERR_BAD_REQUEST,t))}let R=N.toFiniteNumber(E.getContentLength());N.isArray(z)?(L=z[0],W=z[1]):L=W=z,s&&(O||L)&&(N.isStream(s)||(s=Ps.Readable.from(s,{objectMode:!1})),s=Ps.pipeline([s,new Uw({maxRate:N.toFiniteNumber(L)})],N.noop),O&&s.on("progress",Q4(s,iu(R,Za(au(O),!1,3)))));let re;if(t.auth){let V=t.auth.username||"",I=t.auth.password||"";re=V+":"+I}if(!re&&w.username){let V=w.username,I=w.password;re=V+":"+I}re&&E.delete("authorization");let Q;try{Q=yo(w.pathname+w.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(V){let I=new Error(V.message);return I.config=t,I.url=t.url,I.exists=!0,i(I)}E.set("Accept-Encoding","gzip, compress, deflate"+(G4?", br":""),!1);let we={path:Q,method:f,headers:E.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:re,protocol:k,family:c,beforeRedirect:EX,beforeRedirects:{},http2Options:l};!N.isUndefined(o)&&(we.lookup=o),t.socketPath?we.socketPath=t.socketPath:(we.hostname=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,we.port=w.port,tU(we,t.proxy,k+"//"+w.hostname+(w.port?":"+w.port:"")+we.path));let Ze,fe=SX.test(we.protocol);if(we.agent=fe?t.httpsAgent:t.httpAgent,h?Ze=OX:t.transport?Ze=t.transport:t.maxRedirects===0?Ze=fe?_X:yX:(t.maxRedirects&&(we.maxRedirects=t.maxRedirects),t.beforeRedirect&&(we.beforeRedirects.config=t.beforeRedirect),Ze=fe?kX:wX),t.maxBodyLength>-1?we.maxBodyLength=t.maxBodyLength:we.maxBodyLength=1/0,t.insecureHTTPParser&&(we.insecureHTTPParser=t.insecureHTTPParser),g=Ze.request(we,function(I){if(g.destroyed)return;let B=[I],A=N.toFiniteNumber(I.headers["content-length"]);if(U||W){let se=new Uw({maxRate:N.toFiniteNumber(W)});U&&se.on("progress",Q4(se,iu(A,Za(au(U),!0,3)))),B.push(se)}let $=I,T=I.req||g;if(t.decompress!==!1&&I.headers["content-encoding"])switch((f==="HEAD"||I.statusCode===204)&&delete I.headers["content-encoding"],(I.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":B.push(Ts.createUnzip(K4)),delete I.headers["content-encoding"];break;case"deflate":B.push(new R4),B.push(Ts.createUnzip(K4)),delete I.headers["content-encoding"];break;case"br":G4&&(B.push(Ts.createBrotliDecompress(xX)),delete I.headers["content-encoding"])}$=B.length>1?Ps.pipeline(B,N.noop):B[0];let K={status:I.statusCode,statusText:I.statusMessage,headers:new fr(I.headers),config:t,request:T};if(d==="stream")K.data=$,xa(n,i,K);else{let se=[],ge=0;$.on("data",function(Ce){se.push(Ce),ge+=Ce.length,t.maxContentLength>-1&&ge>t.maxContentLength&&(v=!0,$.destroy(),y(new ce("maxContentLength size of "+t.maxContentLength+" exceeded",ce.ERR_BAD_RESPONSE,t,T)))}),$.on("aborted",function(){if(v)return;let Ce=new ce("stream has been aborted",ce.ERR_BAD_RESPONSE,t,T);$.destroy(Ce),i(Ce)}),$.on("error",function(Ce){g.destroyed||i(ce.from(Ce,null,t,T))}),$.on("end",function(){try{let Ce=se.length===1?se[0]:Buffer.concat(se);d!=="arraybuffer"&&(Ce=Ce.toString(p),(!p||p==="utf8")&&(Ce=N.stripBOM(Ce))),K.data=Ce}catch(Ce){return i(ce.from(Ce,null,t,K.request,K))}xa(n,i,K)})}_.once("abort",se=>{$.destroyed||($.emit("error",se),$.destroy())})}),_.once("abort",V=>{g.close?g.close():g.destroy(V)}),g.on("error",function(I){i(ce.from(I,null,t,g))}),g.on("socket",function(I){I.setKeepAlive(!0,1e3*60)}),t.timeout){let V=parseInt(t.timeout,10);if(Number.isNaN(V)){y(new ce("error trying to parse `config.timeout` to int",ce.ERR_BAD_OPTION_VALUE,t,g));return}g.setTimeout(V,function(){if(m)return;let B=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",A=t.transitional||Es;t.timeoutErrorMessage&&(B=t.timeoutErrorMessage),y(new ce(B,A.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,t,g))})}else g.setTimeout(0);if(N.isStream(s)){let V=!1,I=!1;s.on("end",()=>{V=!0}),s.once("error",B=>{I=!0,g.destroy(B)}),s.on("close",()=>{!V&&!I&&y(new Jn("Request stream has been aborted",t,g))}),s.pipe(g)}else s&&g.write(s),g.end()})}});var iU,aU=P(()=>{Ki();iU=Rt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Rt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Rt.origin),Rt.navigator&&/(msie|trident)/i.test(Rt.navigator.userAgent)):()=>!0});var sU,oU=P(()=>{Xt();Ki();sU=Rt.hasStandardBrowserEnv?{write(e,t,r,n,i,a,s){if(typeof document>"u")return;let o=[`${e}=${encodeURIComponent(t)}`];N.isNumber(r)&&o.push(`expires=${new Date(r).toUTCString()}`),N.isString(n)&&o.push(`path=${n}`),N.isString(i)&&o.push(`domain=${i}`),a===!0&&o.push("secure"),N.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}}});function Gi(e,t){t=t||{};let r={};function n(u,l,d,p){return N.isPlainObject(u)&&N.isPlainObject(l)?N.merge.call({caseless:p},u,l):N.isPlainObject(l)?N.merge({},l):N.isArray(l)?l.slice():l}function i(u,l,d,p){if(N.isUndefined(l)){if(!N.isUndefined(u))return n(void 0,u,d,p)}else return n(u,l,d,p)}function a(u,l){if(!N.isUndefined(l))return n(void 0,l)}function s(u,l){if(N.isUndefined(l)){if(!N.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function o(u,l,d){if(d in t)return n(u,l);if(d in e)return n(void 0,u)}let c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(u,l,d)=>i(cU(u),cU(l),d,!0)};return N.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;let d=N.hasOwnProp(c,l)?c[l]:i,p=d(e[l],t[l],l);N.isUndefined(p)&&d!==o||(r[l]=p)}),r}var cU,eg=P(()=>{"use strict";Xt();ba();cU=e=>e instanceof fr?{...e}:e});var tg,Vw=P(()=>{Ki();Xt();aU();oU();Wh();eg();ba();qh();tg=e=>{let t=Gi({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:o}=t;if(t.headers=s=fr.from(s),t.url=yo(bo(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),N.isFormData(r)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(N.isFunction(r.getHeaders)){let c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&s.set(l,d)})}}if(Rt.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(t)),n||n!==!1&&iU(t.url))){let c=i&&a&&sU.read(a);c&&s.set(i,c)}return t}});var zX,uU,lU=P(()=>{Xt();Bh();Od();Yn();_o();Nw();Ki();ba();Xh();Vw();zX=typeof XMLHttpRequest<"u",uU=zX&&function(e){return new Promise(function(r,n){let i=tg(e),a=i.data,s=fr.from(i.headers).normalize(),{responseType:o,onUploadProgress:c,onDownloadProgress:u}=i,l,d,p,f,m;function v(){f&&f(),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=fr.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),x={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:e,request:g};xa(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 ce("Request aborted",ce.ECONNABORTED,e,g)),g=null)},g.onerror=function(b){let x=b&&b.message?b.message:"Network Error",w=new ce(x,ce.ERR_NETWORK,e,g);w.event=b||null,n(w),g=null},g.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",x=i.transitional||Es;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new ce(b,x.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,g)),g=null},a===void 0&&s.setContentType(null),"setRequestHeader"in g&&N.forEach(s.toJSON(),function(b,x){g.setRequestHeader(x,b)}),N.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),o&&o!=="json"&&(g.responseType=i.responseType),u&&([p,m]=Za(u,!0),g.addEventListener("progress",p)),c&&g.upload&&([d,f]=Za(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(l=y=>{g&&(n(!y||y.type?new Jn(null,e,g):y),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let _=Dd(i.url);if(_&&Rt.protocols.indexOf(_)===-1){n(new ce("Unsupported protocol "+_+":",ce.ERR_BAD_REQUEST,e));return}g.send(a||null)})}});var CX,dU,pU=P(()=>{_o();Yn();Xt();CX=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i,a=function(u){if(!i){i=!0,o();let l=u instanceof Error?u:this.reason;n.abort(l instanceof ce?l:new Jn(l instanceof Error?l.message:l))}},s=t&&setTimeout(()=>{s=null,a(new ce(`timeout of ${t}ms exceeded`,ce.ETIMEDOUT))},t),o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));let{signal:c}=n;return c.unsubscribe=()=>N.asap(o),c}},dU=CX});var NX,jX,AX,Bw,fU=P(()=>{NX=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},jX=async function*(e,t){for await(let r of AX(e))yield*NX(r,t)},AX=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Bw=(e,t,r,n)=>{let i=jX(e,t),a=0,s,o=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await i.next();if(u){o(),c.close();return}let d=l.byteLength;if(r){let p=a+=d;r(p)}c.enqueue(new Uint8Array(l))}catch(u){throw o(u),u}},cancel(c){return o(c),i.return()}},{highWaterMark:2})}});var mU,rg,RX,hU,gU,vU,UX,DX,Ww,Qje,yU=P(()=>{Ki();Xt();Yn();pU();fU();ba();Xh();Vw();Bh();mU=64*1024,{isFunction:rg}=N,RX=(({Request:e,Response:t})=>({Request:e,Response:t}))(N.global),{ReadableStream:hU,TextEncoder:gU}=N.global,vU=(e,...t)=>{try{return!!e(...t)}catch{return!1}},UX=e=>{e=N.merge.call({skipUndefined:!0},RX,e);let{fetch:t,Request:r,Response:n}=e,i=t?rg(t):typeof fetch=="function",a=rg(r),s=rg(n);if(!i)return!1;let o=i&&rg(hU),c=i&&(typeof gU=="function"?(m=>v=>m.encode(v))(new gU):async m=>new Uint8Array(await new r(m).arrayBuffer())),u=a&&o&&vU(()=>{let m=!1,v=new hU,g=new r(Rt.origin,{body:v,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return v.cancel(),m&&!g}),l=s&&o&&vU(()=>N.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 ce(`Response type '${m}' is not supported`,ce.ERR_NOT_SUPPORT,g)})});let p=async m=>{if(m==null)return 0;if(N.isBlob(m))return m.size;if(N.isSpecCompliantForm(m))return(await new r(Rt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(N.isArrayBufferView(m)||N.isArrayBuffer(m))return m.byteLength;if(N.isURLSearchParams(m)&&(m=m+""),N.isString(m))return(await c(m)).byteLength},f=async(m,v)=>{let g=N.toFiniteNumber(m.getContentLength());return g??p(v)};return async m=>{let{url:v,method:g,data:h,signal:_,cancelToken:y,timeout:b,onDownloadProgress:x,onUploadProgress:w,responseType:k,headers:E,withCredentials:O="same-origin",fetchOptions:U}=tg(m),z=t||fetch;k=k?(k+"").toLowerCase():"text";let L=dU([_,y&&y.toAbortSignal()],b),W=null,R=L&&L.unsubscribe&&(()=>{L.unsubscribe()}),re;try{if(w&&u&&g!=="get"&&g!=="head"&&(re=await f(E,h))!==0){let I=new r(v,{method:"POST",body:h,duplex:"half"}),B;if(N.isFormData(h)&&(B=I.headers.get("content-type"))&&E.setContentType(B),I.body){let[A,$]=iu(re,Za(au(w)));h=Bw(I.body,mU,A,$)}}N.isString(O)||(O=O?"include":"omit");let Q=a&&"credentials"in r.prototype,we={...U,signal:L,method:g.toUpperCase(),headers:E.normalize().toJSON(),body:h,duplex:"half",credentials:Q?O:void 0};W=a&&new r(v,we);let Ze=await(a?z(W,U):z(v,we)),fe=l&&(k==="stream"||k==="response");if(l&&(x||fe&&R)){let I={};["status","statusText","headers"].forEach(T=>{I[T]=Ze[T]});let B=N.toFiniteNumber(Ze.headers.get("content-length")),[A,$]=x&&iu(B,Za(au(x),!0))||[];Ze=new n(Bw(Ze.body,mU,A,()=>{$&&$(),R&&R()}),I)}k=k||"text";let V=await d[N.findKey(d,k)||"text"](Ze,m);return!fe&&R&&R(),await new Promise((I,B)=>{xa(I,B,{data:V,headers:fr.from(Ze.headers),status:Ze.status,statusText:Ze.statusText,config:m,request:W})})}catch(Q){throw R&&R(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,m,W,Q&&Q.response),{cause:Q.cause||Q}):ce.from(Q,Q&&Q.code,m,W,Q&&Q.response)}}},DX=new Map,Ww=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,a=[n,i,r],s=a.length,o=s,c,u,l=DX;for(;o--;)c=a[o],u=l.get(c),u===void 0&&l.set(c,u=o?new Map:UX(t)),l=u;return u},Qje=Ww()});function qX(e,t){e=N.isArray(e)?e:[e];let{length:r}=e,n,i,a={};for(let s=0;s<r;s++){n=e[s];let o;if(i=n,!LX(n)&&(i=Kw[(o=String(n)).toLowerCase()],i===void 0))throw new ce(`Unknown adapter '${o}'`);if(i&&(N.isFunction(i)||(i=i.get(t))))break;a[o||"#"+s]=i}if(!i){let s=Object.entries(a).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=r?s.length>1?`since :
50
+ `+s.map(_U).join(`
51
+ `):" "+_U(s[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i}var Kw,_U,LX,ng,Gw=P(()=>{Xt();nU();lU();yU();Yn();Kw={http:rU,xhr:uU,fetch:{get:Ww}};N.forEach(Kw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});_U=e=>`- ${e}`,LX=e=>N.isFunction(e)||e===null||e===!1;ng={getAdapter:qX,adapters:Kw}});function Hw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jn(null,e)}function ig(e){return Hw(e),e.headers=fr.from(e.headers),e.data=Cd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ng.getAdapter(e.adapter||Xc.adapter,e)(e).then(function(n){return Hw(e),n.data=Cd.call(e,e.transformResponse,n),n.headers=fr.from(n.headers),n},function(n){return Nd(n)||(Hw(e),n&&n.response&&(n.response.data=Cd.call(e,e.transformResponse,n.response),n.response.headers=fr.from(n.response.headers))),Promise.reject(n)})}var bU=P(()=>{"use strict";o4();pw();Fh();_o();ba();Gw()});function ZX(e,t,r){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let a=n[i],s=t[a];if(s){let o=e[a],c=o===void 0||s(o,a,e);if(c!==!0)throw new ce("option "+a+" must be "+c,ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}var ag,xU,Ld,wU=P(()=>{"use strict";Yh();Yn();ag={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ag[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});xU={};ag.transitional=function(t,r,n){function i(a,s){return"[Axios v"+So+"] Transitional option '"+a+"'"+s+(n?". "+n:"")}return(a,s,o)=>{if(t===!1)throw new ce(i(s," has been removed"+(r?" in "+r:"")),ce.ERR_DEPRECATED);return r&&!xU[s]&&(xU[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,s,o):!0}};ag.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};Ld={assertOptions:ZX,validators:ag}});var gi,su,qd,kU=P(()=>{"use strict";Xt();qh();GR();bU();eg();Wh();wU();ba();Od();gi=Ld.validators,su=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nw,response:new nw}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let a=(()=>{if(!i.stack)return"";let s=i.stack.indexOf(`
52
+ `);return s===-1?"":i.stack.slice(s+1)})();try{if(!n.stack)n.stack=a;else if(a){let s=a.indexOf(`
53
+ `),o=s===-1?-1:a.indexOf(`
54
+ `,s+1),c=o===-1?"":a.slice(o+1);String(n.stack).endsWith(c)||(n.stack+=`
55
+ `+a)}}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Gi(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Ld.assertOptions(n,{silentJSONParsing:gi.transitional(gi.boolean),forcedJSONParsing:gi.transitional(gi.boolean),clarifyTimeoutError:gi.transitional(gi.boolean),legacyInterceptorReqResOrdering:gi.transitional(gi.boolean)},!1),i!=null&&(N.isFunction(i)?r.paramsSerializer={serialize:i}:Ld.assertOptions(i,{encode:gi.function,serialize:gi.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ld.assertOptions(r,{baseUrl:gi.spelling("baseURL"),withXsrfToken:gi.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=a&&N.merge(a.common,a[r.method]);a&&N.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),r.headers=fr.concat(s,a);let o=[],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||Es;g&&g.legacyInterceptorReqResOrdering?o.unshift(v.fulfilled,v.rejected):o.push(v.fulfilled,v.rejected)});let u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let l,d=0,p;if(!c){let m=[ig.bind(this),void 0];for(m.unshift(...o),m.push(...u),p=m.length,l=Promise.resolve(r);d<p;)l=l.then(m[d++],m[d++]);return l}p=o.length;let f=r;for(;d<p;){let m=o[d++],v=o[d++];try{f=m(f)}catch(g){v.call(this,g);break}}try{l=ig.call(this,f)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=Gi(this.defaults,t);let r=bo(t.baseURL,t.url,t.allowAbsoluteUrls);return yo(r,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){su.prototype[t]=function(r,n){return this.request(Gi(n||{},{method:t,url:r,data:(n||{}).data}))}});N.forEach(["post","put","patch"],function(t){function r(n){return function(a,s,o){return this.request(Gi(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}su.prototype[t]=r(),su.prototype[t+"Form"]=r(!0)});qd=su});var Qw,SU,$U=P(()=>{"use strict";_o();Qw=class e{constructor(t){if(typeof t!="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,s=new Promise(o=>{n.subscribe(o),a=o}).then(i);return s.cancel=function(){n.unsubscribe(a)},s},t(function(a,s,o){n.reason||(n.reason=new Jn(a,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},SU=Qw});function Yw(e){return function(r){return e.apply(null,r)}}var EU=P(()=>{"use strict"});function Jw(e){return N.isObject(e)&&e.isAxiosError===!0}var IU=P(()=>{"use strict";Xt()});var Xw,PU,TU=P(()=>{Xw={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(Xw).forEach(([e,t])=>{Xw[t]=e});PU=Xw});function OU(e){let t=new qd(e),r=xd(qd.prototype.request,t);return N.extend(r,qd.prototype,t,{allOwnKeys:!0}),N.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return OU(Gi(e,i))},r}var $r,sg,zU=P(()=>{"use strict";Xt();z0();kU();eg();Fh();uw();_o();$U();pw();Yh();Td();Yn();EU();IU();ba();Gw();TU();$r=OU(Xc);$r.Axios=qd;$r.CanceledError=Jn;$r.CancelToken=SU;$r.isCancel=Nd;$r.VERSION=So;$r.toFormData=$s;$r.AxiosError=ce;$r.Cancel=$r.CanceledError;$r.all=function(t){return Promise.all(t)};$r.spread=Yw;$r.isAxiosError=Jw;$r.mergeConfig=Gi;$r.AxiosHeaders=fr;$r.formToJSON=e=>Zh(N.isHTMLForm(e)?new FormData(e):e);$r.getAdapter=ng.getAdapter;$r.HttpStatusCode=PU;$r.default=$r;sg=$r});var KAe,GAe,HAe,QAe,YAe,JAe,XAe,eRe,tRe,rRe,nRe,iRe,aRe,sRe,oRe,cRe,CU=P(()=>{zU();({Axios:KAe,AxiosError:GAe,CanceledError:HAe,isCancel:QAe,CancelToken:YAe,VERSION:JAe,all:XAe,Cancel:eRe,isAxiosError:tRe,spread:rRe,toFormData:nRe,AxiosHeaders:iRe,HttpStatusCode:aRe,formToJSON:sRe,getAdapter:oRe,mergeConfig:cRe}=sg)});function j(e,t,r){function n(o,c){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,c);let u=s.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let p=l[d];p in o||(o[p]=u[p].bind(o))}}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function s(o){var c;let u=r?.Parent?new a:this;n(u,o),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Pr(e){return e&&Object.assign(og,e),og}var NU,wa,Eo,og,ou=P(()=>{NU=Object.freeze({status:"aborted"});wa=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Eo=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},og={}});var X={};ga(X,{BIGINT_FORMAT_RANGES:()=>uk,Class:()=>tk,NUMBER_FORMAT_RANGES:()=>ck,aborted:()=>Ns,allowsEval:()=>ik,assert:()=>KX,assertEqual:()=>FX,assertIs:()=>BX,assertNever:()=>WX,assertNotEqual:()=>VX,assignProp:()=>zs,base64ToUint8Array:()=>qU,base64urlToUint8Array:()=>iee,cached:()=>uu,captureStackTrace:()=>ug,cleanEnum:()=>nee,cleanRegex:()=>Vd,clone:()=>hn,cloneDef:()=>HX,createTransparentProxy:()=>tee,defineLazy:()=>Je,esc:()=>cg,escapeRegex:()=>vi,extend:()=>UU,finalizeIssue:()=>Nn,floatSafeRemainder:()=>rk,getElementAtPath:()=>QX,getEnumValues:()=>Fd,getLengthableOrigin:()=>Kd,getParsedType:()=>eee,getSizableOrigin:()=>Wd,hexToUint8Array:()=>see,isObject:()=>Io,isPlainObject:()=>Cs,issue:()=>lu,joinValues:()=>je,jsonStringifyReplacer:()=>cu,merge:()=>ree,mergeDefs:()=>Fa,normalizeParams:()=>le,nullish:()=>Os,numKeys:()=>XX,objectClone:()=>GX,omit:()=>RU,optionalKeys:()=>ok,parsedType:()=>Ue,partial:()=>MU,pick:()=>AU,prefixIssues:()=>Xn,primitiveTypes:()=>sk,promiseAllObject:()=>YX,propertyKeyTypes:()=>Bd,randomString:()=>JX,required:()=>LU,safeExtend:()=>DU,shallowClone:()=>ak,slugify:()=>nk,stringifyPrimitive:()=>Ae,uint8ArrayToBase64:()=>ZU,uint8ArrayToBase64url:()=>aee,uint8ArrayToHex:()=>oee,unwrapMessage:()=>Zd});function FX(e){return e}function VX(e){return e}function BX(e){}function WX(e){throw new Error("Unexpected value in exhaustive check")}function KX(e){}function Fd(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function je(e,t="|"){return e.map(r=>Ae(r)).join(t)}function cu(e,t){return typeof t=="bigint"?t.toString():t}function uu(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Os(e){return e==null}function Vd(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function rk(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let a=r>i?r:i,s=Number.parseInt(e.toFixed(a).replace(".","")),o=Number.parseInt(t.toFixed(a).replace(".",""));return s%o/10**a}function Je(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==jU)return n===void 0&&(n=jU,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function GX(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function zs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Fa(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function HX(e){return Fa(e._zod.def)}function QX(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function YX(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<t.length;a++)i[t[a]]=n[a];return i})}function JX(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function cg(e){return JSON.stringify(e)}function nk(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Io(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cs(e){if(Io(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Io(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ak(e){return Cs(e)?{...e}:Array.isArray(e)?[...e]:e}function XX(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function vi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hn(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function le(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function tee(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,a){return t??(t=e()),Reflect.set(t,n,i,a)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function Ae(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ok(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function AU(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a=Fa(e._zod.def,{get shape(){let s={};for(let o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(s[o]=r.shape[o])}return zs(this,"shape",s),s},checks:[]});return hn(e,a)}function RU(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=Fa(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let o in t){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete s[o]}return zs(this,"shape",s),s},checks:[]});return hn(e,a)}function UU(e,t){if(!Cs(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let a=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(a,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Fa(e._zod.def,{get shape(){let a={...e._zod.def.shape,...t};return zs(this,"shape",a),a}});return hn(e,i)}function DU(e,t){if(!Cs(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Fa(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zs(this,"shape",n),n}});return hn(e,r)}function ree(e,t){let r=Fa(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return zs(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return hn(e,r)}function MU(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Fa(t._zod.def,{get shape(){let o=t._zod.def.shape,c={...o};if(r)for(let u in r){if(!(u in o))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:o[u]}):o[u])}else for(let u in o)c[u]=e?new e({type:"optional",innerType:o[u]}):o[u];return zs(this,"shape",c),c},checks:[]});return hn(t,s)}function LU(e,t,r){let n=Fa(t._zod.def,{get shape(){let i=t._zod.def.shape,a={...i};if(r)for(let s in r){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=new e({type:"nonoptional",innerType:i[s]}))}else for(let s in i)a[s]=new e({type:"nonoptional",innerType:i[s]});return zs(this,"shape",a),a}});return hn(t,n)}function Ns(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Xn(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Zd(e){return typeof e=="string"?e:e?.message}function Nn(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Zd(e.inst?._zod.def?.error?.(e))??Zd(t?.error?.(e))??Zd(r.customError?.(e))??Zd(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Wd(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Kd(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ue(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function lu(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function nee(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function qU(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function ZU(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function iee(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return qU(t+r)}function aee(e){return ZU(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function see(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function oee(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var jU,ug,ik,eee,Bd,sk,ck,uk,tk,Ee=P(()=>{jU=Symbol("evaluating");ug="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};ik=uu(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});eee=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Bd=new Set(["string","number","symbol"]),sk=new Set(["string","number","bigint","boolean","symbol","undefined"]);ck={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]},uk={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};tk=class{constructor(...t){}}});function dg(e,t=r=>r.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function pg(e,t=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(s=>n({issues:s}));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(t(a));else{let s=r,o=0;for(;o<a.path.length;){let c=a.path[o];o===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(a))):s[c]=s[c]||{_errors:[]},s=s[c],o++}}};return n(e),r}var FU,lg,Gd,lk=P(()=>{ou();Ee();FU=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,cu,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lg=j("$ZodError",FU),Gd=j("$ZodError",FU,{Parent:Error})});var Hd,Qd,Yd,Jd,Xd,du,ep,tp,VU,BU,WU,KU,GU,HU,QU,YU,dk=P(()=>{ou();lk();Ee();Hd=e=>(t,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new wa;if(s.issues.length){let o=new(i?.Err??e)(s.issues.map(c=>Nn(c,a,Pr())));throw ug(o,i?.callee),o}return s.value},Qd=Hd(Gd),Yd=e=>async(t,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let o=new(i?.Err??e)(s.issues.map(c=>Nn(c,a,Pr())));throw ug(o,i?.callee),o}return s.value},Jd=Yd(Gd),Xd=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new wa;return a.issues.length?{success:!1,error:new(e??lg)(a.issues.map(s=>Nn(s,i,Pr())))}:{success:!0,data:a.value}},du=Xd(Gd),ep=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Nn(s,i,Pr())))}:{success:!0,data:a.value}},tp=ep(Gd),VU=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Hd(e)(t,r,i)},BU=e=>(t,r,n)=>Hd(e)(t,r,n),WU=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Yd(e)(t,r,i)},KU=e=>async(t,r,n)=>Yd(e)(t,r,n),GU=e=>(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Xd(e)(t,r,i)},HU=e=>(t,r,n)=>Xd(e)(t,r,n),QU=e=>async(t,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ep(e)(t,r,i)},YU=e=>async(t,r,n)=>ep(e)(t,r,n)});var yi={};ga(yi,{base64:()=>Ik,base64url:()=>fg,bigint:()=>Nk,boolean:()=>Ak,browserEmail:()=>gee,cidrv4:()=>$k,cidrv6:()=>Ek,cuid:()=>pk,cuid2:()=>fk,date:()=>Tk,datetime:()=>zk,domain:()=>_ee,duration:()=>yk,e164:()=>Pk,email:()=>bk,emoji:()=>xk,extendedDuration:()=>uee,guid:()=>_k,hex:()=>bee,hostname:()=>yee,html5Email:()=>fee,idnEmail:()=>hee,integer:()=>jk,ipv4:()=>wk,ipv6:()=>kk,ksuid:()=>gk,lowercase:()=>Dk,mac:()=>Sk,md5_base64:()=>wee,md5_base64url:()=>kee,md5_hex:()=>xee,nanoid:()=>vk,null:()=>Rk,number:()=>mg,rfc5322Email:()=>mee,sha1_base64:()=>$ee,sha1_base64url:()=>Eee,sha1_hex:()=>See,sha256_base64:()=>Pee,sha256_base64url:()=>Tee,sha256_hex:()=>Iee,sha384_base64:()=>zee,sha384_base64url:()=>Cee,sha384_hex:()=>Oee,sha512_base64:()=>jee,sha512_base64url:()=>Aee,sha512_hex:()=>Nee,string:()=>Ck,time:()=>Ok,ulid:()=>mk,undefined:()=>Uk,unicodeEmail:()=>JU,uppercase:()=>Mk,uuid:()=>Po,uuid4:()=>lee,uuid6:()=>dee,uuid7:()=>pee,xid:()=>hk});function xk(){return new RegExp(vee,"u")}function eD(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ok(e){return new RegExp(`^${eD(e)}$`)}function zk(e){let t=eD({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${XU}T(?:${n})$`)}function rp(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function np(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var pk,fk,mk,hk,gk,vk,yk,uee,_k,Po,lee,dee,pee,bk,fee,mee,JU,hee,gee,vee,wk,kk,Sk,$k,Ek,Ik,fg,yee,_ee,Pk,XU,Tk,Ck,Nk,jk,mg,Ak,Rk,Uk,Dk,Mk,bee,xee,wee,kee,See,$ee,Eee,Iee,Pee,Tee,Oee,zee,Cee,Nee,jee,Aee,hg=P(()=>{Ee();pk=/^[cC][^\s-]{8,}$/,fk=/^[0-9a-z]+$/,mk=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hk=/^[0-9a-vA-V]{20}$/,gk=/^[A-Za-z0-9]{27}$/,vk=/^[a-zA-Z0-9_-]{21}$/,yk=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,uee=/^[-+]?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)?)??$/,_k=/^([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})$/,Po=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,lee=Po(4),dee=Po(6),pee=Po(7),bk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fee=/^[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])?)*$/,mee=/^(([^<>()\[\]\\.,;:\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,}))$/,JU=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,hee=JU,gee=/^[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])?)*$/,vee="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";wk=/^(?:(?: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])$/,kk=/^(([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}|:))$/,Sk=e=>{let t=vi(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},$k=/^((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])$/,Ek=/^(([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])$/,Ik=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fg=/^[A-Za-z0-9_-]*$/,yee=/^(?=.{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])?)*\.?$/,_ee=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Pk=/^\+[1-9]\d{6,14}$/,XU="(?:(?:\\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])))",Tk=new RegExp(`^${XU}$`);Ck=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Nk=/^-?\d+n?$/,jk=/^-?\d+$/,mg=/^-?\d+(?:\.\d+)?$/,Ak=/^(?:true|false)$/i,Rk=/^null$/i,Uk=/^undefined$/i,Dk=/^[^A-Z]*$/,Mk=/^[^a-z]*$/,bee=/^[0-9a-fA-F]*$/;xee=/^[0-9a-fA-F]{32}$/,wee=rp(22,"=="),kee=np(22),See=/^[0-9a-fA-F]{40}$/,$ee=rp(27,"="),Eee=np(27),Iee=/^[0-9a-fA-F]{64}$/,Pee=rp(43,"="),Tee=np(43),Oee=/^[0-9a-fA-F]{96}$/,zee=rp(64,""),Cee=np(64),Nee=/^[0-9a-fA-F]{128}$/,jee=rp(86,"=="),Aee=np(86)});function tD(e,t,r){e.issues.length&&t.issues.push(...Xn(r,e.issues))}var Bt,rD,Lk,qk,nD,iD,aD,sD,oD,cD,uD,lD,dD,ip,pD,fD,mD,hD,gD,vD,yD,_D,bD,gg=P(()=>{ou();hg();Ee();Bt=j("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rD={number:"number",bigint:"bigint",object:"date"},Lk=j("$ZodCheckLessThan",(e,t)=>{Bt.init(e,t);let r=rD[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,a=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qk=j("$ZodCheckGreaterThan",(e,t)=>{Bt.init(e,t);let r=rD[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,a=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nD=j("$ZodCheckMultipleOf",(e,t)=>{Bt.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):rk(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),iD=j("$ZodCheckNumberFormat",(e,t)=>{Bt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,a]=ck[t.format];e._zod.onattach.push(s=>{let o=s._zod.bag;o.format=t.format,o.minimum=i,o.maximum=a,r&&(o.pattern=jk)}),e._zod.check=s=>{let o=s.value;if(r){if(!Number.isInteger(o)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?s.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<i&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),aD=j("$ZodCheckBigIntFormat",(e,t)=>{Bt.init(e,t);let[r,n]=uk[t.format];e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,a.minimum=r,a.maximum=n}),e._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),sD=j("$ZodCheckMaxSize",(e,t)=>{var r;Bt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Os(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let i=n.value;i.size<=t.maximum||n.issues.push({origin:Wd(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),oD=j("$ZodCheckMinSize",(e,t)=>{var r;Bt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Os(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;i.size>=t.minimum||n.issues.push({origin:Wd(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),cD=j("$ZodCheckSizeEquals",(e,t)=>{var r;Bt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Os(i)&&i.size!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=n=>{let i=n.value,a=i.size;if(a===t.size)return;let s=a>t.size;n.issues.push({origin:Wd(i),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),uD=j("$ZodCheckMaxLength",(e,t)=>{var r;Bt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Os(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let i=n.value;if(i.length<=t.maximum)return;let s=Kd(i);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),lD=j("$ZodCheckMinLength",(e,t)=>{var r;Bt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Os(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let s=Kd(i);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),dD=j("$ZodCheckLengthEquals",(e,t)=>{var r;Bt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Os(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=n=>{let i=n.value,a=i.length;if(a===t.length)return;let s=Kd(i),o=a>t.length;n.issues.push({origin:s,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ip=j("$ZodCheckStringFormat",(e,t)=>{var r,n;Bt.init(e,t),e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),pD=j("$ZodCheckRegex",(e,t)=>{ip.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),fD=j("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dk),ip.init(e,t)}),mD=j("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Mk),ip.init(e,t)}),hD=j("$ZodCheckIncludes",(e,t)=>{Bt.init(e,t);let r=vi(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),gD=j("$ZodCheckStartsWith",(e,t)=>{Bt.init(e,t);let r=new RegExp(`^${vi(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),vD=j("$ZodCheckEndsWith",(e,t)=>{Bt.init(e,t);let r=new RegExp(`.*${vi(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});yD=j("$ZodCheckProperty",(e,t)=>{Bt.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>tD(i,r,t.property));tD(n,r,t.property)}}),_D=j("$ZodCheckMimeType",(e,t)=>{Bt.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),bD=j("$ZodCheckOverwrite",(e,t)=>{Bt.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var vg,Zk=P(()=>{vg=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
56
+ `).filter(s=>s),i=Math.min(...n.map(s=>s.length-s.trimStart().length)),a=n.map(s=>s.slice(i)).map(s=>" ".repeat(this.indent*2)+s);for(let s of a)this.content.push(s)}compile(){let t=Function,r=this?.args,i=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...r,i.join(`
57
+ `))}}});var wD,Fk=P(()=>{wD={major:4,minor:3,patch:6}});function jD(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function Ree(e){if(!fg.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return jD(r)}function Uee(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}function kD(e,t,r){e.issues.length&&t.issues.push(...Xn(r,e.issues)),t.value[r]=e.value}function wg(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Xn(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function AD(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=ok(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function RD(e,t,r,n,i,a){let s=[],o=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in t){if(o.has(d))continue;if(u==="never"){s.push(d);continue}let p=c.run({value:t[d],issues:[]},n);p instanceof Promise?e.push(p.then(f=>wg(f,r,d,t,l))):wg(p,r,d,t,l)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}function SD(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let i=e.filter(a=>!Ns(a));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>Nn(s,n,Pr())))}),t)}function $D(e,t,r,n){let i=e.filter(a=>a.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>Nn(s,n,Pr())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function Vk(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Cs(e)&&Cs(t)){let r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),i={...e,...t};for(let a of n){let s=Vk(e[a],t[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let i=e[n],a=t[n],s=Vk(i,a);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ED(e,t,r){let n=new Map,i;for(let o of t.issues)if(o.code==="unrecognized_keys"){i??(i=o);for(let c of o.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(o);for(let o of r.issues)if(o.code==="unrecognized_keys")for(let c of o.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(o);let a=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(a.length&&i&&e.issues.push({...i,keys:a}),Ns(e))return e;let s=Vk(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}function yg(e,t,r){e.issues.length&&t.issues.push(...Xn(r,e.issues)),t.value[r]=e.value}function ID(e,t,r,n,i,a,s){e.issues.length&&(Bd.has(typeof n)?r.issues.push(...Xn(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:e.issues.map(o=>Nn(o,s,Pr()))})),t.issues.length&&(Bd.has(typeof n)?r.issues.push(...Xn(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:t.issues.map(o=>Nn(o,s,Pr()))})),r.value.set(e.value,t.value)}function PD(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function TD(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function OD(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function zD(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function _g(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}function bg(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(a=>xg(e,a,t.out,r)):xg(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(a=>xg(e,a,t.in,r)):xg(e,i,t.in,r)}}function xg(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}function CD(e){return e.value=Object.freeze(e.value),e}function ND(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(lu(i))}}var We,To,Lt,Bk,Wk,Kk,Gk,Hk,Qk,Yk,Jk,Xk,eS,tS,rS,nS,iS,aS,sS,oS,cS,uS,lS,dS,pS,fS,mS,hS,kg,gS,ap,Sg,vS,yS,_S,bS,xS,wS,kS,SS,$S,ES,UD,DD,sp,IS,PS,TS,$g,OS,zS,CS,NS,jS,AS,RS,Eg,US,DS,MS,LS,qS,ZS,FS,VS,BS,op,WS,KS,GS,HS,QS,YS,JS=P(()=>{gg();ou();Zk();dk();hg();Ee();Fk();Ee();We=j("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wD;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let a of i._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,o,c)=>{let u=Ns(s),l;for(let d of o){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let p=s.issues.length,f=d._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new wa;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,s.issues.length!==p&&(u||(u=Ns(s,p)))});else{if(s.issues.length===p)continue;u||(u=Ns(s,p))}}return l?l.then(()=>s):s},a=(s,o,c)=>{if(Ns(s))return s.aborted=!0,s;let u=i(o,n,c);if(u instanceof Promise){if(c.async===!1)throw new wa;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if(o.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return u instanceof Promise?u.then(l=>a(l,s,o)):a(u,s,o)}let c=e._zod.parse(s,o);if(c instanceof Promise){if(o.async===!1)throw new wa;return c.then(u=>i(u,n,o))}return i(c,n,o)}}Je(e,"~standard",()=>({validate:i=>{try{let a=du(e,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return tp(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),To=j("$ZodString",(e,t)=>{We.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ck(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Lt=j("$ZodStringFormat",(e,t)=>{ip.init(e,t),To.init(e,t)}),Bk=j("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_k),Lt.init(e,t)}),Wk=j("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Po(n))}else t.pattern??(t.pattern=Po());Lt.init(e,t)}),Kk=j("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=bk),Lt.init(e,t)}),Gk=j("$ZodURL",(e,t)=>{Lt.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Hk=j("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xk()),Lt.init(e,t)}),Qk=j("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=vk),Lt.init(e,t)}),Yk=j("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pk),Lt.init(e,t)}),Jk=j("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=fk),Lt.init(e,t)}),Xk=j("$ZodULID",(e,t)=>{t.pattern??(t.pattern=mk),Lt.init(e,t)}),eS=j("$ZodXID",(e,t)=>{t.pattern??(t.pattern=hk),Lt.init(e,t)}),tS=j("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=gk),Lt.init(e,t)}),rS=j("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zk(t)),Lt.init(e,t)}),nS=j("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Tk),Lt.init(e,t)}),iS=j("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ok(t)),Lt.init(e,t)}),aS=j("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=yk),Lt.init(e,t)}),sS=j("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=wk),Lt.init(e,t),e._zod.bag.format="ipv4"}),oS=j("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kk),Lt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),cS=j("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Sk(t.delimiter)),Lt.init(e,t),e._zod.bag.format="mac"}),uS=j("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=$k),Lt.init(e,t)}),lS=j("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ek),Lt.init(e,t),e._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 s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});dS=j("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ik),Lt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{jD(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});pS=j("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=fg),Lt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Ree(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),fS=j("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Pk),Lt.init(e,t)});mS=j("$ZodJWT",(e,t)=>{Lt.init(e,t),e._zod.check=r=>{Uee(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),hS=j("$ZodCustomStringFormat",(e,t)=>{Lt.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),kg=j("$ZodNumber",(e,t)=>{We.init(e,t),e._zod.pattern=e._zod.bag.pattern??mg,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let 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:e,...a?{received:a}:{}}),r}}),gS=j("$ZodNumberFormat",(e,t)=>{iD.init(e,t),kg.init(e,t)}),ap=j("$ZodBoolean",(e,t)=>{We.init(e,t),e._zod.pattern=Ak,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Sg=j("$ZodBigInt",(e,t)=>{We.init(e,t),e._zod.pattern=Nk,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),vS=j("$ZodBigIntFormat",(e,t)=>{aD.init(e,t),Sg.init(e,t)}),yS=j("$ZodSymbol",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),r}}),_S=j("$ZodUndefined",(e,t)=>{We.init(e,t),e._zod.pattern=Uk,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),r}}),bS=j("$ZodNull",(e,t)=>{We.init(e,t),e._zod.pattern=Rk,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),xS=j("$ZodAny",(e,t)=>{We.init(e,t),e._zod.parse=r=>r}),wS=j("$ZodUnknown",(e,t)=>{We.init(e,t),e._zod.parse=r=>r}),kS=j("$ZodNever",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),SS=j("$ZodVoid",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),$S=j("$ZodDate",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{if(t.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:e}),r}});ES=j("$ZodArray",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let a=[];for(let s=0;s<i.length;s++){let o=i[s],c=t.element._zod.run({value:o,issues:[]},n);c instanceof Promise?a.push(c.then(u=>kD(u,r,s))):kD(c,r,s)}return a.length?Promise.all(a).then(()=>r):r}});UD=j("$ZodObject",(e,t)=>{if(We.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let o=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...o};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=uu(()=>AD(t));Je(e._zod,"propValues",()=>{let o=t.shape,c={};for(let u in o){let l=o[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=Io,a=t.catchall,s;e._zod.parse=(o,c)=>{s??(s=n.value);let u=o.value;if(!i(u))return o.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),o;o.value={};let l=[],d=s.shape;for(let p of s.keys){let f=d[p],m=f._zod.optout==="optional",v=f._zod.run({value:u[p],issues:[]},c);v instanceof Promise?l.push(v.then(g=>wg(g,o,p,u,m))):wg(v,o,p,u,m)}return a?RD(l,u,o,c,n.value,e):l.length?Promise.all(l).then(()=>o):o}}),DD=j("$ZodObjectJIT",(e,t)=>{UD.init(e,t);let r=e._zod.parse,n=uu(()=>AD(t)),i=p=>{let f=new vg(["shape","payload","ctx"]),m=n.value,v=y=>{let b=cg(y);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};f.write("const input = payload.value;");let g=Object.create(null),h=0;for(let y of m.keys)g[y]=`key_${h++}`;f.write("const newResult = {};");for(let y of m.keys){let b=g[y],x=cg(y),k=p[y]?._zod?.optout==="optional";f.write(`const ${b} = ${v(y)};`),k?f.write(`
58
+ if (${b}.issues.length) {
59
+ if (${x} in input) {
60
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
61
+ ...iss,
62
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
63
+ })));
64
+ }
65
+ }
66
+
67
+ if (${b}.value === undefined) {
68
+ if (${x} in input) {
69
+ newResult[${x}] = undefined;
70
+ }
71
+ } else {
72
+ newResult[${x}] = ${b}.value;
73
+ }
74
+
75
+ `):f.write(`
76
+ if (${b}.issues.length) {
77
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
78
+ ...iss,
79
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
80
+ })));
81
+ }
82
+
83
+ if (${b}.value === undefined) {
84
+ if (${x} in input) {
85
+ newResult[${x}] = undefined;
86
+ }
87
+ } else {
88
+ newResult[${x}] = ${b}.value;
89
+ }
90
+
91
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let _=f.compile();return(y,b)=>_(p,y,b)},a,s=Io,o=!og.jitless,u=o&&ik.value,l=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=n.value);let m=p.value;return s(m)?o&&u&&f?.async===!1&&f.jitless!==!0?(a||(a=i(t.shape)),p=a(p,f),l?RD([],m,p,f,d,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p)}});sp=j("$ZodUnion",(e,t)=>{We.init(e,t),Je(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Je(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Je(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Je(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${i.map(a=>Vd(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(r)return n(i,a);let s=!1,o=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},a);if(u instanceof Promise)o.push(u),s=!0;else{if(u.issues.length===0)return u;o.push(u)}}return s?Promise.all(o).then(c=>SD(c,i,e,a)):SD(o,i,e,a)}});IS=j("$ZodXor",(e,t)=>{sp.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(r)return n(i,a);let s=!1,o=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},a);u instanceof Promise?(o.push(u),s=!0):o.push(u)}return s?Promise.all(o).then(c=>$D(c,i,e,a)):$D(o,i,e,a)}}),PS=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,sp.init(e,t);let r=e._zod.parse;Je(e._zod,"propValues",()=>{let i={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[o,c]of Object.entries(s)){i[o]||(i[o]=new Set);for(let u of c)i[o].add(u)}}return i});let n=uu(()=>{let i=t.options,a=new Map;for(let s of i){let o=s._zod.propValues?.[t.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of o){if(a.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,s)}}return a});e._zod.parse=(i,a)=>{let s=i.value;if(!Io(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let o=n.value.get(s?.[t.discriminator]);return o?o._zod.run(i,a):t.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),i)}}),TS=j("$ZodIntersection",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value,a=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([c,u])=>ED(r,c,u)):ED(r,a,s)}});$g=j("$ZodTuple",(e,t)=>{We.init(e,t);let r=t.items;e._zod.parse=(n,i)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[],o=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=o===-1?0:r.length-o;if(!t.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:e,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?s.push(d.then(p=>yg(p,n,u))):yg(d,n,u)}if(t.rest){let l=a.slice(r.length);for(let d of l){u++;let p=t.rest._zod.run({value:d,issues:[]},i);p instanceof Promise?s.push(p.then(f=>yg(f,n,u))):yg(p,n,u)}}return s.length?Promise.all(s).then(()=>n):n}});OS=j("$ZodRecord",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Cs(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s){r.value={};let o=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){o.add(typeof u=="number"?u.toString():u);let l=t.valueType._zod.run({value:i[u],issues:[]},n);l instanceof Promise?a.push(l.then(d=>{d.issues.length&&r.issues.push(...Xn(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...Xn(u,l.issues)),r.value[u]=l.value)}let c;for(let u in i)o.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{r.value={};for(let o of Reflect.ownKeys(i)){if(o==="__proto__")continue;let c=t.keyType._zod.run({value:o,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&mg.test(o)&&c.issues.length){let d=t.keyType._zod.run({value:Number(o),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[o]=i[o]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>Nn(d,n,Pr())),input:o,path:[o],inst:e});continue}let l=t.valueType._zod.run({value:i[o],issues:[]},n);l instanceof Promise?a.push(l.then(d=>{d.issues.length&&r.issues.push(...Xn(o,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...Xn(o,l.issues)),r.value[c.value]=l.value)}}return a.length?Promise.all(a).then(()=>r):r}}),zS=j("$ZodMap",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let a=[];r.value=new Map;for(let[s,o]of i){let c=t.keyType._zod.run({value:s,issues:[]},n),u=t.valueType._zod.run({value:o,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([l,d])=>{ID(l,d,r,s,i,e,n)})):ID(c,u,r,s,i,e,n)}return a.length?Promise.all(a).then(()=>r):r}});CS=j("$ZodSet",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];r.value=new Set;for(let s of i){let o=t.valueType._zod.run({value:s,issues:[]},n);o instanceof Promise?a.push(o.then(c=>PD(c,r))):PD(o,r)}return a.length?Promise.all(a).then(()=>r):r}});NS=j("$ZodEnum",(e,t)=>{We.init(e,t);let r=Fd(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Bd.has(typeof i)).map(i=>typeof i=="string"?vi(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{let s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:r,input:s,inst:e}),i}}),jS=j("$ZodLiteral",(e,t)=>{if(We.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?vi(n):n?vi(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}}),AS=j("$ZodFile",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),RS=j("$ZodTransform",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Eo(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(r.value=s,r));if(i instanceof Promise)throw new wa;return r.value=i,r}});Eg=j("$ZodOptional",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Je(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Je(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vd(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>TD(a,r.value)):TD(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),US=j("$ZodExactOptional",(e,t)=>{Eg.init(e,t),Je(e._zod,"values",()=>t.innerType._zod.values),Je(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),DS=j("$ZodNullable",(e,t)=>{We.init(e,t),Je(e._zod,"optin",()=>t.innerType._zod.optin),Je(e._zod,"optout",()=>t.innerType._zod.optout),Je(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vd(r.source)}|null)$`):void 0}),Je(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),MS=j("$ZodDefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>OD(a,t)):OD(i,t)}});LS=j("$ZodPrefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),qS=j("$ZodNonOptional",(e,t)=>{We.init(e,t),Je(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>zD(a,e)):zD(i,e)}});ZS=j("$ZodSuccess",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Eo("ZodSuccess");let i=t.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)}}),FS=j("$ZodCatch",(e,t)=>{We.init(e,t),Je(e._zod,"optin",()=>t.innerType._zod.optin),Je(e._zod,"optout",()=>t.innerType._zod.optout),Je(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(s=>Nn(s,n,Pr()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>Nn(a,n,Pr()))},input:r.value}),r.issues=[]),r)}}),VS=j("$ZodNaN",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),BS=j("$ZodPipe",(e,t)=>{We.init(e,t),Je(e._zod,"values",()=>t.in._zod.values),Je(e._zod,"optin",()=>t.in._zod.optin),Je(e._zod,"optout",()=>t.out._zod.optout),Je(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>_g(s,t.in,n)):_g(a,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>_g(a,t.out,n)):_g(i,t.out,n)}});op=j("$ZodCodec",(e,t)=>{We.init(e,t),Je(e._zod,"values",()=>t.in._zod.values),Je(e._zod,"optin",()=>t.in._zod.optin),Je(e._zod,"optout",()=>t.out._zod.optout),Je(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let a=t.in._zod.run(r,n);return a instanceof Promise?a.then(s=>bg(s,t,n)):bg(a,t,n)}else{let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>bg(s,t,n)):bg(a,t,n)}}});WS=j("$ZodReadonly",(e,t)=>{We.init(e,t),Je(e._zod,"propValues",()=>t.innerType._zod.propValues),Je(e._zod,"values",()=>t.innerType._zod.values),Je(e._zod,"optin",()=>t.innerType?._zod?.optin),Je(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(CD):CD(i)}});KS=j("$ZodTemplateLiteral",(e,t)=>{We.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let a=i.startsWith("^")?1:0,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,s))}else if(n===null||sk.has(typeof n))r.push(vi(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),GS=j("$ZodFunction",(e,t)=>(We.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=e._def.input?Qd(e._def.input,n):n,a=Reflect.apply(r,this,i);return e._def.output?Qd(e._def.output,a):a}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=e._def.input?await Jd(e._def.input,n):n,a=await Reflect.apply(r,this,i);return e._def.output?await Jd(e._def.output,a):a}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new $g({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),HS=j("$ZodPromise",(e,t)=>{We.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),QS=j("$ZodLazy",(e,t)=>{We.init(e,t),Je(e._zod,"innerType",()=>t.getter()),Je(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Je(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Je(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Je(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),YS=j("$ZodCustom",(e,t)=>{Bt.init(e,t),We.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(a=>ND(a,r,n,e));ND(i,r,n,e)}})});var MD=P(()=>{Ee()});var LD=P(()=>{Ee()});var qD=P(()=>{Ee()});var ZD=P(()=>{Ee()});var FD=P(()=>{Ee()});var VD=P(()=>{Ee()});var BD=P(()=>{Ee()});var WD=P(()=>{Ee()});function XS(){return{localeError:Mee()}}var Mee,e$=P(()=>{Ee();Mee=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,s=Ue(i.input),o=n[s]??s;return`Invalid input: expected ${a}, received ${o}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${Ae(i.values[0])}`:`Invalid option: expected one of ${je(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${s.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":""}: ${je(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"}}}});var KD=P(()=>{Ee()});var GD=P(()=>{Ee()});var HD=P(()=>{Ee()});var QD=P(()=>{Ee()});var YD=P(()=>{Ee()});var JD=P(()=>{Ee()});var XD=P(()=>{Ee()});var e2=P(()=>{Ee()});var t2=P(()=>{Ee()});var r2=P(()=>{Ee()});var n2=P(()=>{Ee()});var i2=P(()=>{Ee()});var a2=P(()=>{Ee()});var s2=P(()=>{Ee()});var t$=P(()=>{Ee()});var o2=P(()=>{t$()});var c2=P(()=>{Ee()});var u2=P(()=>{Ee()});var l2=P(()=>{Ee()});var d2=P(()=>{Ee()});var p2=P(()=>{Ee()});var f2=P(()=>{Ee()});var m2=P(()=>{Ee()});var h2=P(()=>{Ee()});var g2=P(()=>{Ee()});var v2=P(()=>{Ee()});var y2=P(()=>{Ee()});var _2=P(()=>{Ee()});var b2=P(()=>{Ee()});var x2=P(()=>{Ee()});var w2=P(()=>{Ee()});var k2=P(()=>{Ee()});var r$=P(()=>{Ee()});var S2=P(()=>{r$()});var $2=P(()=>{Ee()});var E2=P(()=>{Ee()});var I2=P(()=>{Ee()});var P2=P(()=>{Ee()});var T2=P(()=>{Ee()});var O2=P(()=>{Ee()});var Ig=P(()=>{MD();LD();qD();ZD();FD();VD();BD();WD();e$();KD();GD();HD();QD();YD();JD();XD();e2();t2();r2();n2();i2();a2();s2();o2();t$();c2();u2();l2();d2();p2();f2();m2();h2();g2();v2();y2();_2();b2();x2();w2();k2();S2();r$();$2();E2();I2();P2();T2();O2()});function a$(){return new i$}var z2,i$,gn,cp=P(()=>{i$=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(z2=globalThis).__zod_globalRegistry??(z2.__zod_globalRegistry=a$());gn=globalThis.__zod_globalRegistry});function s$(e,t){return new e({type:"string",...le(t)})}function Pg(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...le(t)})}function up(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...le(t)})}function Tg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...le(t)})}function Og(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(t)})}function zg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(t)})}function Cg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(t)})}function lp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...le(t)})}function Ng(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...le(t)})}function jg(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(t)})}function Ag(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...le(t)})}function Rg(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(t)})}function Ug(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...le(t)})}function Dg(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...le(t)})}function Mg(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(t)})}function Lg(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(t)})}function qg(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(t)})}function o$(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...le(t)})}function Zg(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(t)})}function Fg(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(t)})}function Vg(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...le(t)})}function Bg(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...le(t)})}function Wg(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...le(t)})}function Kg(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...le(t)})}function c$(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(t)})}function u$(e,t){return new e({type:"string",format:"date",check:"string_format",...le(t)})}function l$(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...le(t)})}function d$(e,t){return new e({type:"string",format:"duration",check:"string_format",...le(t)})}function p$(e,t){return new e({type:"number",checks:[],...le(t)})}function f$(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...le(t)})}function m$(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...le(t)})}function h$(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...le(t)})}function g$(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...le(t)})}function v$(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...le(t)})}function y$(e,t){return new e({type:"boolean",...le(t)})}function _$(e,t){return new e({type:"bigint",...le(t)})}function b$(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...le(t)})}function x$(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...le(t)})}function w$(e,t){return new e({type:"symbol",...le(t)})}function k$(e,t){return new e({type:"undefined",...le(t)})}function S$(e,t){return new e({type:"null",...le(t)})}function $$(e){return new e({type:"any"})}function E$(e){return new e({type:"unknown"})}function I$(e,t){return new e({type:"never",...le(t)})}function P$(e,t){return new e({type:"void",...le(t)})}function T$(e,t){return new e({type:"date",...le(t)})}function O$(e,t){return new e({type:"nan",...le(t)})}function Va(e,t){return new Lk({check:"less_than",...le(t),value:e,inclusive:!1})}function ei(e,t){return new Lk({check:"less_than",...le(t),value:e,inclusive:!0})}function Ba(e,t){return new qk({check:"greater_than",...le(t),value:e,inclusive:!1})}function vn(e,t){return new qk({check:"greater_than",...le(t),value:e,inclusive:!0})}function z$(e){return Ba(0,e)}function C$(e){return Va(0,e)}function N$(e){return ei(0,e)}function j$(e){return vn(0,e)}function Oo(e,t){return new nD({check:"multiple_of",...le(t),value:e})}function zo(e,t){return new sD({check:"max_size",...le(t),maximum:e})}function Wa(e,t){return new oD({check:"min_size",...le(t),minimum:e})}function pu(e,t){return new cD({check:"size_equals",...le(t),size:e})}function fu(e,t){return new uD({check:"max_length",...le(t),maximum:e})}function js(e,t){return new lD({check:"min_length",...le(t),minimum:e})}function mu(e,t){return new dD({check:"length_equals",...le(t),length:e})}function dp(e,t){return new pD({check:"string_format",format:"regex",...le(t),pattern:e})}function pp(e){return new fD({check:"string_format",format:"lowercase",...le(e)})}function fp(e){return new mD({check:"string_format",format:"uppercase",...le(e)})}function mp(e,t){return new hD({check:"string_format",format:"includes",...le(t),includes:e})}function hp(e,t){return new gD({check:"string_format",format:"starts_with",...le(t),prefix:e})}function gp(e,t){return new vD({check:"string_format",format:"ends_with",...le(t),suffix:e})}function A$(e,t,r){return new yD({check:"property",property:e,schema:t,...le(r)})}function vp(e,t){return new _D({check:"mime_type",mime:e,...le(t)})}function ka(e){return new bD({check:"overwrite",tx:e})}function yp(e){return ka(t=>t.normalize(e))}function _p(){return ka(e=>e.trim())}function bp(){return ka(e=>e.toLowerCase())}function xp(){return ka(e=>e.toUpperCase())}function Gg(){return ka(e=>nk(e))}function C2(e,t,r){return new e({type:"array",element:t,...le(r)})}function R$(e,t){return new e({type:"file",...le(t)})}function U$(e,t,r){let n=le(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function D$(e,t,r){return new e({type:"custom",check:"custom",fn:t,...le(r)})}function M$(e){let t=Fee(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(lu(n,r.value,t._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(lu(i))}},e(r.value,r)));return t}function Fee(e,t){let r=new Bt({check:"custom",...le(t)});return r._zod.check=e,r}function L$(e){let t=new Bt({check:"describe"});return t._zod.onattach=[r=>{let n=gn.get(r)??{};gn.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function q$(e){let t=new Bt({check:"meta"});return t._zod.onattach=[r=>{let n=gn.get(r)??{};gn.add(r,{...n,...e})}],t._zod.check=()=>{},t}function Z$(e,t){let r=le(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let a=new Set(n),s=new Set(i),o=e.Codec??op,c=e.Boolean??ap,u=e.String??To,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),p=new o({type:"pipe",in:l,out:d,transform:((f,m)=>{let v=f;return r.case!=="sensitive"&&(v=v.toLowerCase()),a.has(v)?!0:s.has(v)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:m.value,inst:p,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?n[0]||"true":i[0]||"false"),error:r.error});return p}function hu(e,t,r,n={}){let i=le(n),a={...le(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:o=>r.test(o),...i};return r instanceof RegExp&&(a.pattern=r),new e(a)}var N2=P(()=>{gg();cp();JS();Ee()});function gu(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??gn,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qt(e,t,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let o=e._zod.toJSONSchema?.();if(o)s.schema=o;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let p=s.schema,f=t.processors[i.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);f(e,t,p,l)}let d=e._zod.parent;d&&(s.ref||(s.ref=d),qt(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&yn(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function vu(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let s of e.seen.entries()){let o=e.metadataRegistry.get(s[0])?.id;if(o){let c=n.get(o);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,s[0])}}let i=s=>{let o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(s[0])?.id,p=e.external.uri??(m=>m);if(d)return{ref:p(d)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${p("__shared")}#/${o}/${f}`}}if(s[1]===r)return{ref:"#"};let u=`#/${o}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},a=s=>{if(s[1].schema.$ref)return;let o=s[1],{ref:c,defId:u}=i(s);o.def={...o.schema},u&&(o.defId=u);let l=o.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let o=s[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
92
+
93
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let o=s[1];if(t===s[0]){a(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){a(s);continue}}if(e.metadataRegistry.get(s[0])?.id){a(s);continue}if(o.cycle){a(s);continue}if(o.count>1&&e.reused==="ref"){a(s);continue}}}function yu(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let o=e.seen.get(s);if(o.ref===null)return;let c=o.def??o.schema,u={...c},l=o.ref;if(o.ref=null,l){n(l);let p=e.seen.get(l),f=p.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,u),s._zod.parent===l)for(let v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(f.$ref&&p.def)for(let v in c)v==="$ref"||v==="allOf"||v in p.def&&JSON.stringify(c[v])===JSON.stringify(p.def[v])&&delete c[v]}let d=s._zod.parent;if(d&&d!==l){n(d);let p=e.seen.get(d);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}e.override({zodSchema:s,jsonSchema:c,path:o.path??[]})};for(let s of[...e.seen.entries()].reverse())n(s[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(s)}Object.assign(i,r.def??r.schema);let a=e.external?.defs??{};for(let s of e.seen.entries()){let o=s[1];o.def&&o.defId&&(a[o.defId]=o.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:wp(t,"input",e.processors),output:wp(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function yn(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return yn(n.element,r);if(n.type==="set")return yn(n.valueType,r);if(n.type==="lazy")return yn(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 yn(n.innerType,r);if(n.type==="intersection")return yn(n.left,r)||yn(n.right,r);if(n.type==="record"||n.type==="map")return yn(n.keyType,r)||yn(n.valueType,r);if(n.type==="pipe")return yn(n.in,r)||yn(n.out,r);if(n.type==="object"){for(let i in n.shape)if(yn(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(yn(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(yn(i,r))return!0;return!!(n.rest&&yn(n.rest,r))}return!1}var j2,wp,kp=P(()=>{cp();j2=(e,t={})=>r=>{let n=gu({...r,processors:t});return qt(e,n),vu(n,e),yu(n,e)},wp=(e,t,r={})=>n=>{let{libraryOptions:i,target:a}=n??{},s=gu({...i??{},target:a,io:t,processors:r});return qt(e,s),vu(s,e),yu(s,e)}});function _u(e,t){if("_idmap"in e){let n=e,i=gu({...t,processors:F$}),a={};for(let c of n._idmap.entries()){let[u,l]=c;qt(l,i)}let s={},o={registry:n,uri:t?.uri,defs:a};i.external=o;for(let c of n._idmap.entries()){let[u,l]=c;vu(i,l),s[u]=yu(i,l)}if(Object.keys(a).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:a}}return{schemas:s}}let r=gu({...t,processors:F$});return qt(e,r),vu(r,e),yu(r,e)}var Vee,V$,B$,W$,K$,G$,H$,Q$,Y$,J$,X$,eE,tE,rE,nE,iE,aE,sE,oE,cE,uE,lE,dE,pE,fE,mE,Hg,hE,gE,vE,yE,_E,bE,xE,wE,kE,SE,$E,Qg,EE,F$,bu=P(()=>{kp();Ee();Vee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},V$=(e,t,r,n)=>{let i=r;i.type="string";let{minimum:a,maximum:s,format:o,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof s=="number"&&(i.maxLength=s),o&&(i.format=Vee[o]??o,i.format===""&&delete i.format,o==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},B$=(e,t,r,n)=>{let i=r,{minimum:a,maximum:s,format:o,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof o=="string"&&o.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof a=="number"&&(i.minimum=a,typeof l=="number"&&t.target!=="draft-04"&&(l>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof s=="number"&&(i.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},W$=(e,t,r,n)=>{r.type="boolean"},K$=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},G$=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},H$=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Q$=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Y$=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},J$=(e,t,r,n)=>{r.not={}},X$=(e,t,r,n)=>{},eE=(e,t,r,n)=>{},tE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},rE=(e,t,r,n)=>{let i=e._zod.def,a=Fd(i.entries);a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),r.enum=a},nE=(e,t,r,n)=>{let i=e._zod.def,a=[];for(let s of i.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(s))}else a.push(s);if(a.length!==0)if(a.length===1){let s=a[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else a.every(s=>typeof s=="number")&&(r.type="number"),a.every(s=>typeof s=="string")&&(r.type="string"),a.every(s=>typeof s=="boolean")&&(r.type="boolean"),a.every(s=>s===null)&&(r.type="null"),r.enum=a},iE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},aE=(e,t,r,n)=>{let i=r,a=e._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=a.source},sE=(e,t,r,n)=>{let i=r,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:o,mime:c}=e._zod.bag;s!==void 0&&(a.minLength=s),o!==void 0&&(a.maxLength=o),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)},oE=(e,t,r,n)=>{r.type="boolean"},cE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},uE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},lE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},dE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},pE=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},fE=(e,t,r,n)=>{let i=r,a=e._zod.def,{minimum:s,maximum:o}=e._zod.bag;typeof s=="number"&&(i.minItems=s),typeof o=="number"&&(i.maxItems=o),i.type="array",i.items=qt(a.element,t,{...n,path:[...n.path,"items"]})},mE=(e,t,r,n)=>{let i=r,a=e._zod.def;i.type="object",i.properties={};let s=a.shape;for(let u in s)i.properties[u]=qt(s[u],t,{...n,path:[...n.path,"properties",u]});let o=new Set(Object.keys(s)),c=new Set([...o].filter(u=>{let l=a.shape[u]._zod;return t.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=qt(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},Hg=(e,t,r,n)=>{let i=e._zod.def,a=i.inclusive===!1,s=i.options.map((o,c)=>qt(o,t,{...n,path:[...n.path,a?"oneOf":"anyOf",c]}));a?r.oneOf=s:r.anyOf=s},hE=(e,t,r,n)=>{let i=e._zod.def,a=qt(i.left,t,{...n,path:[...n.path,"allOf",0]}),s=qt(i.right,t,{...n,path:[...n.path,"allOf",1]}),o=u=>"allOf"in u&&Object.keys(u).length===1,c=[...o(a)?a.allOf:[a],...o(s)?s.allOf:[s]];r.allOf=c},gE=(e,t,r,n)=>{let i=r,a=e._zod.def;i.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",o=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=a.items.map((p,f)=>qt(p,t,{...n,path:[...n.path,s,f]})),u=a.rest?qt(a.rest,t,{...n,path:[...n.path,o,...t.target==="openapi-3.0"?[a.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)},vE=(e,t,r,n)=>{let i=r,a=e._zod.def;i.type="object";let s=a.keyType,c=s._zod.bag?.patterns;if(a.mode==="loose"&&c&&c.size>0){let l=qt(a.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=qt(a.keyType,t,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=qt(a.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}},yE=(e,t,r,n)=>{let i=e._zod.def,a=qt(i.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},_E=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType},bE=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},xE=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},wE=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType;let s;try{s=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},kE=(e,t,r,n)=>{let i=e._zod.def,a=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;qt(a,t,n);let s=t.seen.get(e);s.ref=a},SE=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType,r.readOnly=!0},$E=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType},Qg=(e,t,r,n)=>{let i=e._zod.def;qt(i.innerType,t,n);let a=t.seen.get(e);a.ref=i.innerType},EE=(e,t,r,n)=>{let i=e._zod.innerType;qt(i,t,n);let a=t.seen.get(e);a.ref=i},F$={string:V$,number:B$,boolean:W$,bigint:K$,symbol:G$,null:H$,undefined:Q$,void:Y$,never:J$,any:X$,unknown:eE,date:tE,enum:rE,literal:nE,nan:iE,template_literal:aE,file:sE,success:oE,custom:cE,function:uE,transform:lE,map:dE,set:pE,array:fE,object:mE,union:Hg,intersection:hE,tuple:gE,record:vE,nullable:yE,nonoptional:_E,default:bE,prefault:xE,catch:wE,pipe:kE,readonly:SE,promise:$E,optional:Qg,lazy:EE}});var A2=P(()=>{bu();kp()});var R2=P(()=>{});var _r=P(()=>{ou();dk();lk();JS();gg();Fk();Ee();hg();Ig();cp();Zk();N2();kp();bu();A2();R2()});var Yg={};ga(Yg,{endsWith:()=>gp,gt:()=>Ba,gte:()=>vn,includes:()=>mp,length:()=>mu,lowercase:()=>pp,lt:()=>Va,lte:()=>ei,maxLength:()=>fu,maxSize:()=>zo,mime:()=>vp,minLength:()=>js,minSize:()=>Wa,multipleOf:()=>Oo,negative:()=>C$,nonnegative:()=>j$,nonpositive:()=>N$,normalize:()=>yp,overwrite:()=>ka,positive:()=>z$,property:()=>A$,regex:()=>dp,size:()=>pu,slugify:()=>Gg,startsWith:()=>hp,toLowerCase:()=>bp,toUpperCase:()=>xp,trim:()=>_p,uppercase:()=>fp});var Jg=P(()=>{_r()});var Co={};ga(Co,{ZodISODate:()=>TE,ZodISODateTime:()=>IE,ZodISODuration:()=>NE,ZodISOTime:()=>zE,date:()=>OE,datetime:()=>PE,duration:()=>jE,time:()=>CE});function PE(e){return c$(IE,e)}function OE(e){return u$(TE,e)}function CE(e){return l$(zE,e)}function jE(e){return d$(NE,e)}var IE,TE,zE,NE,Sp=P(()=>{_r();Ep();IE=j("ZodISODateTime",(e,t)=>{rS.init(e,t),Wt.init(e,t)});TE=j("ZodISODate",(e,t)=>{nS.init(e,t),Wt.init(e,t)});zE=j("ZodISOTime",(e,t)=>{iS.init(e,t),Wt.init(e,t)});NE=j("ZodISODuration",(e,t)=>{aS.init(e,t),Wt.init(e,t)})});var U2,EDe,ti,AE=P(()=>{_r();_r();Ee();U2=(e,t)=>{lg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>pg(e,r)},flatten:{value:r=>dg(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,cu,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,cu,2)}},isEmpty:{get(){return e.issues.length===0}}})},EDe=j("ZodError",U2),ti=j("ZodError",U2,{Parent:Error})});var D2,M2,L2,q2,Z2,F2,V2,B2,W2,K2,G2,H2,RE=P(()=>{_r();AE();D2=Hd(ti),M2=Yd(ti),L2=Xd(ti),q2=ep(ti),Z2=VU(ti),F2=BU(ti),V2=WU(ti),B2=KU(ti),W2=GU(ti),K2=HU(ti),G2=QU(ti),H2=YU(ti)});var $p={};ga($p,{ZodAny:()=>e6,ZodArray:()=>i6,ZodBase64:()=>YE,ZodBase64URL:()=>JE,ZodBigInt:()=>sv,ZodBigIntFormat:()=>tI,ZodBoolean:()=>av,ZodCIDRv4:()=>HE,ZodCIDRv6:()=>QE,ZodCUID:()=>ZE,ZodCUID2:()=>FE,ZodCatch:()=>S6,ZodCodec:()=>cI,ZodCustom:()=>pv,ZodCustomStringFormat:()=>Pp,ZodDate:()=>nI,ZodDefault:()=>y6,ZodDiscriminatedUnion:()=>s6,ZodE164:()=>XE,ZodEmail:()=>ME,ZodEmoji:()=>LE,ZodEnum:()=>Ip,ZodExactOptional:()=>h6,ZodFile:()=>f6,ZodFunction:()=>N6,ZodGUID:()=>Xg,ZodIPv4:()=>KE,ZodIPv6:()=>GE,ZodIntersection:()=>o6,ZodJWT:()=>eI,ZodKSUID:()=>WE,ZodLazy:()=>O6,ZodLiteral:()=>p6,ZodMAC:()=>Q2,ZodMap:()=>l6,ZodNaN:()=>E6,ZodNanoID:()=>qE,ZodNever:()=>r6,ZodNonOptional:()=>sI,ZodNull:()=>X2,ZodNullable:()=>v6,ZodNumber:()=>iv,ZodNumberFormat:()=>xu,ZodObject:()=>cv,ZodOptional:()=>aI,ZodPipe:()=>oI,ZodPrefault:()=>b6,ZodPromise:()=>C6,ZodReadonly:()=>I6,ZodRecord:()=>dv,ZodSet:()=>d6,ZodString:()=>rv,ZodStringFormat:()=>Wt,ZodSuccess:()=>k6,ZodSymbol:()=>Y2,ZodTemplateLiteral:()=>T6,ZodTransform:()=>m6,ZodTuple:()=>c6,ZodType:()=>Xe,ZodULID:()=>VE,ZodURL:()=>nv,ZodUUID:()=>Ka,ZodUndefined:()=>J2,ZodUnion:()=>uv,ZodUnknown:()=>t6,ZodVoid:()=>n6,ZodXID:()=>BE,ZodXor:()=>a6,_ZodString:()=>DE,_default:()=>_6,_function:()=>Gte,any:()=>Ote,array:()=>lt,base64:()=>fte,base64url:()=>mte,bigint:()=>$te,boolean:()=>Er,catch:()=>$6,check:()=>Hte,cidrv4:()=>dte,cidrv6:()=>pte,codec:()=>Bte,cuid:()=>nte,cuid2:()=>ite,custom:()=>uI,date:()=>Cte,describe:()=>Qte,discriminatedUnion:()=>lv,e164:()=>hte,email:()=>Kee,emoji:()=>tte,enum:()=>Xr,exactOptional:()=>g6,file:()=>qte,float32:()=>xte,float64:()=>wte,function:()=>Gte,guid:()=>Gee,hash:()=>bte,hex:()=>_te,hostname:()=>yte,httpUrl:()=>ete,instanceof:()=>Jte,int:()=>UE,int32:()=>kte,int64:()=>Ete,intersection:()=>Tp,ipv4:()=>cte,ipv6:()=>lte,json:()=>ere,jwt:()=>gte,keyof:()=>Nte,ksuid:()=>ote,lazy:()=>z6,literal:()=>Ie,looseObject:()=>Jr,looseRecord:()=>Ute,mac:()=>ute,map:()=>Dte,meta:()=>Yte,nan:()=>Vte,nanoid:()=>rte,nativeEnum:()=>Lte,never:()=>rI,nonoptional:()=>w6,null:()=>ov,nullable:()=>ev,nullish:()=>Zte,number:()=>Ut,object:()=>he,optional:()=>er,partialRecord:()=>Rte,pipe:()=>tv,prefault:()=>x6,preprocess:()=>fv,promise:()=>Kte,readonly:()=>P6,record:()=>Zt,refine:()=>j6,set:()=>Mte,strictObject:()=>jte,string:()=>G,stringFormat:()=>vte,stringbool:()=>Xte,success:()=>Fte,superRefine:()=>A6,symbol:()=>Pte,templateLiteral:()=>Wte,transform:()=>iI,tuple:()=>u6,uint32:()=>Ste,uint64:()=>Ite,ulid:()=>ate,undefined:()=>Tte,union:()=>Gt,unknown:()=>Kt,url:()=>Xee,uuid:()=>Hee,uuidv4:()=>Qee,uuidv6:()=>Yee,uuidv7:()=>Jee,void:()=>zte,xid:()=>ste,xor:()=>Ate});function G(e){return s$(rv,e)}function Kee(e){return Pg(ME,e)}function Gee(e){return up(Xg,e)}function Hee(e){return Tg(Ka,e)}function Qee(e){return Og(Ka,e)}function Yee(e){return zg(Ka,e)}function Jee(e){return Cg(Ka,e)}function Xee(e){return lp(nv,e)}function ete(e){return lp(nv,{protocol:/^https?$/,hostname:yi.domain,...X.normalizeParams(e)})}function tte(e){return Ng(LE,e)}function rte(e){return jg(qE,e)}function nte(e){return Ag(ZE,e)}function ite(e){return Rg(FE,e)}function ate(e){return Ug(VE,e)}function ste(e){return Dg(BE,e)}function ote(e){return Mg(WE,e)}function cte(e){return Lg(KE,e)}function ute(e){return o$(Q2,e)}function lte(e){return qg(GE,e)}function dte(e){return Zg(HE,e)}function pte(e){return Fg(QE,e)}function fte(e){return Vg(YE,e)}function mte(e){return Bg(JE,e)}function hte(e){return Wg(XE,e)}function gte(e){return Kg(eI,e)}function vte(e,t,r={}){return hu(Pp,e,t,r)}function yte(e){return hu(Pp,"hostname",yi.hostname,e)}function _te(e){return hu(Pp,"hex",yi.hex,e)}function bte(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,i=yi[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return hu(Pp,n,i,t)}function Ut(e){return p$(iv,e)}function UE(e){return f$(xu,e)}function xte(e){return m$(xu,e)}function wte(e){return h$(xu,e)}function kte(e){return g$(xu,e)}function Ste(e){return v$(xu,e)}function Er(e){return y$(av,e)}function $te(e){return _$(sv,e)}function Ete(e){return b$(tI,e)}function Ite(e){return x$(tI,e)}function Pte(e){return w$(Y2,e)}function Tte(e){return k$(J2,e)}function ov(e){return S$(X2,e)}function Ote(){return $$(e6)}function Kt(){return E$(t6)}function rI(e){return I$(r6,e)}function zte(e){return P$(n6,e)}function Cte(e){return T$(nI,e)}function lt(e,t){return C2(i6,e,t)}function Nte(e){let t=e._zod.def.shape;return Xr(Object.keys(t))}function he(e,t){let r={type:"object",shape:e??{},...X.normalizeParams(t)};return new cv(r)}function jte(e,t){return new cv({type:"object",shape:e,catchall:rI(),...X.normalizeParams(t)})}function Jr(e,t){return new cv({type:"object",shape:e,catchall:Kt(),...X.normalizeParams(t)})}function Gt(e,t){return new uv({type:"union",options:e,...X.normalizeParams(t)})}function Ate(e,t){return new a6({type:"union",options:e,inclusive:!1,...X.normalizeParams(t)})}function lv(e,t,r){return new s6({type:"union",options:t,discriminator:e,...X.normalizeParams(r)})}function Tp(e,t){return new o6({type:"intersection",left:e,right:t})}function u6(e,t,r){let n=t instanceof We,i=n?r:t,a=n?t:null;return new c6({type:"tuple",items:e,rest:a,...X.normalizeParams(i)})}function Zt(e,t,r){return new dv({type:"record",keyType:e,valueType:t,...X.normalizeParams(r)})}function Rte(e,t,r){let n=hn(e);return n._zod.values=void 0,new dv({type:"record",keyType:n,valueType:t,...X.normalizeParams(r)})}function Ute(e,t,r){return new dv({type:"record",keyType:e,valueType:t,mode:"loose",...X.normalizeParams(r)})}function Dte(e,t,r){return new l6({type:"map",keyType:e,valueType:t,...X.normalizeParams(r)})}function Mte(e,t){return new d6({type:"set",valueType:e,...X.normalizeParams(t)})}function Xr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Ip({type:"enum",entries:r,...X.normalizeParams(t)})}function Lte(e,t){return new Ip({type:"enum",entries:e,...X.normalizeParams(t)})}function Ie(e,t){return new p6({type:"literal",values:Array.isArray(e)?e:[e],...X.normalizeParams(t)})}function qte(e){return R$(f6,e)}function iI(e){return new m6({type:"transform",transform:e})}function er(e){return new aI({type:"optional",innerType:e})}function g6(e){return new h6({type:"optional",innerType:e})}function ev(e){return new v6({type:"nullable",innerType:e})}function Zte(e){return er(ev(e))}function _6(e,t){return new y6({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}function x6(e,t){return new b6({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}function w6(e,t){return new sI({type:"nonoptional",innerType:e,...X.normalizeParams(t)})}function Fte(e){return new k6({type:"success",innerType:e})}function $6(e,t){return new S6({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Vte(e){return O$(E6,e)}function tv(e,t){return new oI({type:"pipe",in:e,out:t})}function Bte(e,t,r){return new cI({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function P6(e){return new I6({type:"readonly",innerType:e})}function Wte(e,t){return new T6({type:"template_literal",parts:e,...X.normalizeParams(t)})}function z6(e){return new O6({type:"lazy",getter:e})}function Kte(e){return new C6({type:"promise",innerType:e})}function Gte(e){return new N6({type:"function",input:Array.isArray(e?.input)?u6(e?.input):e?.input??lt(Kt()),output:e?.output??Kt()})}function Hte(e){let t=new Bt({check:"custom"});return t._zod.check=e,t}function uI(e,t){return U$(pv,e??(()=>!0),t)}function j6(e,t={}){return D$(pv,e,t)}function A6(e){return M$(e)}function Jte(e,t={}){let r=new pv({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...X.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function ere(e){let t=z6(()=>Gt([G(e),Ut(),Er(),ov(),lt(t),Zt(G(),t)]));return t}function fv(e,t){return tv(iI(e),t)}var Xe,DE,rv,Wt,ME,Xg,Ka,nv,LE,qE,ZE,FE,VE,BE,WE,KE,Q2,GE,HE,QE,YE,JE,XE,eI,Pp,iv,xu,av,sv,tI,Y2,J2,X2,e6,t6,r6,n6,nI,i6,cv,uv,a6,s6,o6,c6,dv,l6,d6,Ip,p6,f6,m6,aI,h6,v6,y6,b6,sI,k6,S6,E6,oI,cI,I6,T6,O6,C6,N6,pv,Qte,Yte,Xte,Ep=P(()=>{_r();_r();bu();kp();Jg();Sp();RE();Xe=j("ZodType",(e,t)=>(We.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:wp(e,"input"),output:wp(e,"output")}}),e.toJSONSchema=j2(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(X.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>hn(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>D2(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>L2(e,r,n),e.parseAsync=async(r,n)=>M2(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>q2(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Z2(e,r,n),e.decode=(r,n)=>F2(e,r,n),e.encodeAsync=async(r,n)=>V2(e,r,n),e.decodeAsync=async(r,n)=>B2(e,r,n),e.safeEncode=(r,n)=>W2(e,r,n),e.safeDecode=(r,n)=>K2(e,r,n),e.safeEncodeAsync=async(r,n)=>G2(e,r,n),e.safeDecodeAsync=async(r,n)=>H2(e,r,n),e.refine=(r,n)=>e.check(j6(r,n)),e.superRefine=r=>e.check(A6(r)),e.overwrite=r=>e.check(ka(r)),e.optional=()=>er(e),e.exactOptional=()=>g6(e),e.nullable=()=>ev(e),e.nullish=()=>er(ev(e)),e.nonoptional=r=>w6(e,r),e.array=()=>lt(e),e.or=r=>Gt([e,r]),e.and=r=>Tp(e,r),e.transform=r=>tv(e,iI(r)),e.default=r=>_6(e,r),e.prefault=r=>x6(e,r),e.catch=r=>$6(e,r),e.pipe=r=>tv(e,r),e.readonly=()=>P6(e),e.describe=r=>{let n=e.clone();return gn.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return gn.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return gn.get(e);let n=e.clone();return gn.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),DE=j("_ZodString",(e,t)=>{To.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(n,i,a)=>V$(e,n,i,a);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(dp(...n)),e.includes=(...n)=>e.check(mp(...n)),e.startsWith=(...n)=>e.check(hp(...n)),e.endsWith=(...n)=>e.check(gp(...n)),e.min=(...n)=>e.check(js(...n)),e.max=(...n)=>e.check(fu(...n)),e.length=(...n)=>e.check(mu(...n)),e.nonempty=(...n)=>e.check(js(1,...n)),e.lowercase=n=>e.check(pp(n)),e.uppercase=n=>e.check(fp(n)),e.trim=()=>e.check(_p()),e.normalize=(...n)=>e.check(yp(...n)),e.toLowerCase=()=>e.check(bp()),e.toUpperCase=()=>e.check(xp()),e.slugify=()=>e.check(Gg())}),rv=j("ZodString",(e,t)=>{To.init(e,t),DE.init(e,t),e.email=r=>e.check(Pg(ME,r)),e.url=r=>e.check(lp(nv,r)),e.jwt=r=>e.check(Kg(eI,r)),e.emoji=r=>e.check(Ng(LE,r)),e.guid=r=>e.check(up(Xg,r)),e.uuid=r=>e.check(Tg(Ka,r)),e.uuidv4=r=>e.check(Og(Ka,r)),e.uuidv6=r=>e.check(zg(Ka,r)),e.uuidv7=r=>e.check(Cg(Ka,r)),e.nanoid=r=>e.check(jg(qE,r)),e.guid=r=>e.check(up(Xg,r)),e.cuid=r=>e.check(Ag(ZE,r)),e.cuid2=r=>e.check(Rg(FE,r)),e.ulid=r=>e.check(Ug(VE,r)),e.base64=r=>e.check(Vg(YE,r)),e.base64url=r=>e.check(Bg(JE,r)),e.xid=r=>e.check(Dg(BE,r)),e.ksuid=r=>e.check(Mg(WE,r)),e.ipv4=r=>e.check(Lg(KE,r)),e.ipv6=r=>e.check(qg(GE,r)),e.cidrv4=r=>e.check(Zg(HE,r)),e.cidrv6=r=>e.check(Fg(QE,r)),e.e164=r=>e.check(Wg(XE,r)),e.datetime=r=>e.check(PE(r)),e.date=r=>e.check(OE(r)),e.time=r=>e.check(CE(r)),e.duration=r=>e.check(jE(r))});Wt=j("ZodStringFormat",(e,t)=>{Lt.init(e,t),DE.init(e,t)}),ME=j("ZodEmail",(e,t)=>{Kk.init(e,t),Wt.init(e,t)});Xg=j("ZodGUID",(e,t)=>{Bk.init(e,t),Wt.init(e,t)});Ka=j("ZodUUID",(e,t)=>{Wk.init(e,t),Wt.init(e,t)});nv=j("ZodURL",(e,t)=>{Gk.init(e,t),Wt.init(e,t)});LE=j("ZodEmoji",(e,t)=>{Hk.init(e,t),Wt.init(e,t)});qE=j("ZodNanoID",(e,t)=>{Qk.init(e,t),Wt.init(e,t)});ZE=j("ZodCUID",(e,t)=>{Yk.init(e,t),Wt.init(e,t)});FE=j("ZodCUID2",(e,t)=>{Jk.init(e,t),Wt.init(e,t)});VE=j("ZodULID",(e,t)=>{Xk.init(e,t),Wt.init(e,t)});BE=j("ZodXID",(e,t)=>{eS.init(e,t),Wt.init(e,t)});WE=j("ZodKSUID",(e,t)=>{tS.init(e,t),Wt.init(e,t)});KE=j("ZodIPv4",(e,t)=>{sS.init(e,t),Wt.init(e,t)});Q2=j("ZodMAC",(e,t)=>{cS.init(e,t),Wt.init(e,t)});GE=j("ZodIPv6",(e,t)=>{oS.init(e,t),Wt.init(e,t)});HE=j("ZodCIDRv4",(e,t)=>{uS.init(e,t),Wt.init(e,t)});QE=j("ZodCIDRv6",(e,t)=>{lS.init(e,t),Wt.init(e,t)});YE=j("ZodBase64",(e,t)=>{dS.init(e,t),Wt.init(e,t)});JE=j("ZodBase64URL",(e,t)=>{pS.init(e,t),Wt.init(e,t)});XE=j("ZodE164",(e,t)=>{fS.init(e,t),Wt.init(e,t)});eI=j("ZodJWT",(e,t)=>{mS.init(e,t),Wt.init(e,t)});Pp=j("ZodCustomStringFormat",(e,t)=>{hS.init(e,t),Wt.init(e,t)});iv=j("ZodNumber",(e,t)=>{kg.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(n,i,a)=>B$(e,n,i,a),e.gt=(n,i)=>e.check(Ba(n,i)),e.gte=(n,i)=>e.check(vn(n,i)),e.min=(n,i)=>e.check(vn(n,i)),e.lt=(n,i)=>e.check(Va(n,i)),e.lte=(n,i)=>e.check(ei(n,i)),e.max=(n,i)=>e.check(ei(n,i)),e.int=n=>e.check(UE(n)),e.safe=n=>e.check(UE(n)),e.positive=n=>e.check(Ba(0,n)),e.nonnegative=n=>e.check(vn(0,n)),e.negative=n=>e.check(Va(0,n)),e.nonpositive=n=>e.check(ei(0,n)),e.multipleOf=(n,i)=>e.check(Oo(n,i)),e.step=(n,i)=>e.check(Oo(n,i)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});xu=j("ZodNumberFormat",(e,t)=>{gS.init(e,t),iv.init(e,t)});av=j("ZodBoolean",(e,t)=>{ap.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>W$(e,r,n,i)});sv=j("ZodBigInt",(e,t)=>{Sg.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(n,i,a)=>K$(e,n,i,a),e.gte=(n,i)=>e.check(vn(n,i)),e.min=(n,i)=>e.check(vn(n,i)),e.gt=(n,i)=>e.check(Ba(n,i)),e.gte=(n,i)=>e.check(vn(n,i)),e.min=(n,i)=>e.check(vn(n,i)),e.lt=(n,i)=>e.check(Va(n,i)),e.lte=(n,i)=>e.check(ei(n,i)),e.max=(n,i)=>e.check(ei(n,i)),e.positive=n=>e.check(Ba(BigInt(0),n)),e.negative=n=>e.check(Va(BigInt(0),n)),e.nonpositive=n=>e.check(ei(BigInt(0),n)),e.nonnegative=n=>e.check(vn(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(Oo(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});tI=j("ZodBigIntFormat",(e,t)=>{vS.init(e,t),sv.init(e,t)});Y2=j("ZodSymbol",(e,t)=>{yS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>G$(e,r,n,i)});J2=j("ZodUndefined",(e,t)=>{_S.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Q$(e,r,n,i)});X2=j("ZodNull",(e,t)=>{bS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>H$(e,r,n,i)});e6=j("ZodAny",(e,t)=>{xS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>X$(e,r,n,i)});t6=j("ZodUnknown",(e,t)=>{wS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>eE(e,r,n,i)});r6=j("ZodNever",(e,t)=>{kS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>J$(e,r,n,i)});n6=j("ZodVoid",(e,t)=>{SS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Y$(e,r,n,i)});nI=j("ZodDate",(e,t)=>{$S.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(n,i,a)=>tE(e,n,i,a),e.min=(n,i)=>e.check(vn(n,i)),e.max=(n,i)=>e.check(ei(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});i6=j("ZodArray",(e,t)=>{ES.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>fE(e,r,n,i),e.element=t.element,e.min=(r,n)=>e.check(js(r,n)),e.nonempty=r=>e.check(js(1,r)),e.max=(r,n)=>e.check(fu(r,n)),e.length=(r,n)=>e.check(mu(r,n)),e.unwrap=()=>e.element});cv=j("ZodObject",(e,t)=>{DD.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>mE(e,r,n,i),X.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Xr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Kt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Kt()}),e.strict=()=>e.clone({...e._zod.def,catchall:rI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>X.extend(e,r),e.safeExtend=r=>X.safeExtend(e,r),e.merge=r=>X.merge(e,r),e.pick=r=>X.pick(e,r),e.omit=r=>X.omit(e,r),e.partial=(...r)=>X.partial(aI,e,r[0]),e.required=(...r)=>X.required(sI,e,r[0])});uv=j("ZodUnion",(e,t)=>{sp.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hg(e,r,n,i),e.options=t.options});a6=j("ZodXor",(e,t)=>{uv.init(e,t),IS.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Hg(e,r,n,i),e.options=t.options});s6=j("ZodDiscriminatedUnion",(e,t)=>{uv.init(e,t),PS.init(e,t)});o6=j("ZodIntersection",(e,t)=>{TS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>hE(e,r,n,i)});c6=j("ZodTuple",(e,t)=>{$g.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>gE(e,r,n,i),e.rest=r=>e.clone({...e._zod.def,rest:r})});dv=j("ZodRecord",(e,t)=>{OS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>vE(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType});l6=j("ZodMap",(e,t)=>{zS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>dE(e,r,n,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Wa(...r)),e.nonempty=r=>e.check(Wa(1,r)),e.max=(...r)=>e.check(zo(...r)),e.size=(...r)=>e.check(pu(...r))});d6=j("ZodSet",(e,t)=>{CS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>pE(e,r,n,i),e.min=(...r)=>e.check(Wa(...r)),e.nonempty=r=>e.check(Wa(1,r)),e.max=(...r)=>e.check(zo(...r)),e.size=(...r)=>e.check(pu(...r))});Ip=j("ZodEnum",(e,t)=>{NS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(n,i,a)=>rE(e,n,i,a),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let a={};for(let s of n)if(r.has(s))a[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ip({...t,checks:[],...X.normalizeParams(i),entries:a})},e.exclude=(n,i)=>{let a={...t.entries};for(let s of n)if(r.has(s))delete a[s];else throw new Error(`Key ${s} not found in enum`);return new Ip({...t,checks:[],...X.normalizeParams(i),entries:a})}});p6=j("ZodLiteral",(e,t)=>{jS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>nE(e,r,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});f6=j("ZodFile",(e,t)=>{AS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>sE(e,r,n,i),e.min=(r,n)=>e.check(Wa(r,n)),e.max=(r,n)=>e.check(zo(r,n)),e.mime=(r,n)=>e.check(vp(Array.isArray(r)?r:[r],n))});m6=j("ZodTransform",(e,t)=>{RS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>lE(e,r,n,i),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Eo(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(X.issue(a,r.value,t));else{let s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(X.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});aI=j("ZodOptional",(e,t)=>{Eg.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qg(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});h6=j("ZodExactOptional",(e,t)=>{US.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>Qg(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});v6=j("ZodNullable",(e,t)=>{DS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>yE(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});y6=j("ZodDefault",(e,t)=>{MS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>bE(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});b6=j("ZodPrefault",(e,t)=>{LS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>xE(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});sI=j("ZodNonOptional",(e,t)=>{qS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>_E(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});k6=j("ZodSuccess",(e,t)=>{ZS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>oE(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});S6=j("ZodCatch",(e,t)=>{FS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>wE(e,r,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});E6=j("ZodNaN",(e,t)=>{VS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>iE(e,r,n,i)});oI=j("ZodPipe",(e,t)=>{BS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>kE(e,r,n,i),e.in=t.in,e.out=t.out});cI=j("ZodCodec",(e,t)=>{oI.init(e,t),op.init(e,t)});I6=j("ZodReadonly",(e,t)=>{WS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>SE(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});T6=j("ZodTemplateLiteral",(e,t)=>{KS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>aE(e,r,n,i)});O6=j("ZodLazy",(e,t)=>{QS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>EE(e,r,n,i),e.unwrap=()=>e._zod.def.getter()});C6=j("ZodPromise",(e,t)=>{HS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>$E(e,r,n,i),e.unwrap=()=>e._zod.def.innerType});N6=j("ZodFunction",(e,t)=>{GS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>uE(e,r,n,i)});pv=j("ZodCustom",(e,t)=>{YS.init(e,t),Xe.init(e,t),e._zod.processJSONSchema=(r,n,i)=>cE(e,r,n,i)});Qte=L$,Yte=q$;Xte=(...e)=>Z$({Codec:cI,Boolean:av,String:rv},...e)});var R6,D6=P(()=>{_r();_r();R6||(R6={})});var jDe,M6=P(()=>{cp();Jg();Sp();Ep();jDe={...$p,...Yg,iso:Co}});var L6=P(()=>{_r();Ep()});var Op=P(()=>{_r();Ep();Jg();AE();RE();D6();_r();e$();_r();bu();M6();Ig();Sp();Sp();L6();Pr(XS())});var Z6=P(()=>{Op();Op()});import{homedir as pre}from"os";import{join as fre}from"path";import{existsSync as mre,readFileSync as hre}from"fs";function gre(){if(process.env.OPENAI_PROXY_TOKEN)return q.debug("[Auth] Using OPENAI_PROXY_TOKEN (ECS execution)"),process.env.OPENAI_PROXY_TOKEN;if(process.env.ZIBBY_USER_TOKEN)return q.debug("[Auth] Using ZIBBY_USER_TOKEN (CI/CD PAT)"),process.env.ZIBBY_USER_TOKEN;try{let e=fre(pre(),".zibby","config.json");if(mre(e)){let t=JSON.parse(hre(e,"utf-8"));if(t.sessionToken)return q.debug("[Auth] Using session token from zibby login"),t.sessionToken}}catch(e){q.debug(`[Auth] Could not read zibby login session: ${e.message}`)}return null}function vre(){return process.env.OPENAI_PROXY_URL?process.env.OPENAI_PROXY_URL.replace(/\/v1\/?$/,""):"https://api-prod.zibby.app/openai-proxy"}function wu(e){if(!(typeof e!="object"||e===null)){if(Object.keys(e).length===0){e.type="object",e.additionalProperties=!0;return}if(e.type||(e.properties?e.type="object":e.items&&(e.type="array")),e.type==="object")if(e.properties){for(let[t,r]of Object.entries(e.properties))r.type==="object"&&r.additionalProperties&&r.additionalProperties!==!1&&(!r.properties||Object.keys(r.properties).length===0)&&(e.properties[t]={type:["object","null"]});e.additionalProperties=!1,e.required=Object.keys(e.properties),Object.values(e.properties).forEach(wu)}else"additionalProperties"in e||(e.additionalProperties=!0);e.type==="array"&&e.items&&wu(e.items),e.anyOf&&e.anyOf.forEach(wu),e.oneOf&&e.oneOf.forEach(wu),e.allOf&&e.allOf.forEach(wu)}}async function F6(e,t){q.info("\u{1F527} [OpenAI Proxy] Formatting structured output...");let r=gre();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=vre();q.info(`\u{1F517} Using OpenAI proxy: ${n}`);let i=_u(t),a=i;if(i.$ref&&i.definitions){let l=i.$ref.split("/").pop();a=i.definitions[l]||i,q.debug(`Extracted schema from $ref: ${l}`)}delete a.$schema,wu(a);let s=4e5,o=e;e.length>s&&(q.warn(`\u26A0\uFE0F [OpenAI Proxy] Raw text (${e.length} chars) exceeds limit, keeping last ${s} chars`),o=`... [truncated early content] ...
94
+ ${e.slice(-s)}`);let c=`Extract and format the following information into structured JSON matching the schema.
95
+
96
+ RAW CONTENT:
97
+ ${o}
98
+
99
+ 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:ln.OPENAI_POSTPROCESSING,messages:[{role:"user",content:c}],response_format:{type:"json_schema",json_schema:{name:"extract",schema:a,strict:!0}}};q.info(`\u{1F4E4} Sending to OpenAI proxy: model=${ln.OPENAI_POSTPROCESSING}, schema keys=${Object.keys(a.properties||{}).join(", ")}`),q.debug(` Schema size: ${JSON.stringify(a).length} chars`),q.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 p=(await sg.post(n,u,{headers:l,timeout:dh.OPENAI_REQUEST})).data?.choices?.[0]?.message?.content;if(!p)throw new Error("OpenAI proxy returned empty response");let f=JSON.parse(p);return q.info("\u2705 Successfully formatted with OpenAI proxy"),{structured:f,raw:e}}catch(l){if(l.response){let d=l.response.status,p=l.response.data;throw q.error(`\u274C OpenAI proxy request failed: ${d}`),q.error(` Status: ${d}`),q.error(` Response: ${JSON.stringify(p,null,2)}`),d===401||d===403?new Error(`Authentication failed for OpenAI proxy.
100
+ Run \`zibby login\` or set ZIBBY_USER_TOKEN environment variable.
101
+ Response: ${JSON.stringify(p)}`,{cause:l}):new Error(`Failed to format Cursor output: ${p?.error?.message||"Unknown error"}`,{cause:l})}throw q.error(`\u274C OpenAI proxy request failed: ${l.message}`),new Error(`Failed to format output: ${l.message}`,{cause:l})}}var V6=P(()=>{CU();Z6();qi();fo()});import{copyFileSync as yre,existsSync as lI,lstatSync as _re,mkdirSync as B6,rmSync as bre,symlinkSync as xre,unlinkSync as wre}from"fs";import{join as Ga}from"path";import{homedir as kre}from"os";import{randomBytes as Sre}from"crypto";function W6(e){return!(!e||typeof e!="string"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="1"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="true")}function K6(e){let t=Ga(e||process.cwd(),".zibby","tmp");B6(t,{recursive:!0});let r=`${process.pid}-${Date.now()}-${Sre(4).toString("hex")}`,n=Ga(t,`cursor-agent-home-${r}`),i=Ga(n,".cursor");B6(i,{recursive:!0});let a=kre(),s=Ga(a,".cursor");if(lI(s))for(let o of $re){let c=Ga(s,o);if(lI(c))try{yre(c,Ga(i,o))}catch{}}if(process.platform==="darwin"){let o=Ga(a,"Library");if(lI(o))try{xre(o,Ga(n,"Library"))}catch{}}return n}function G6(e){if(!(!e||typeof e!="string"))try{let t=Ga(e,"Library");try{_re(t).isSymbolicLink()&&wre(t)}catch{}bre(e,{recursive:!0,force:!0})}catch{}}var $re,H6=P(()=>{$re=["cli-config.json","config.json","auth.json","argv.json"]});import{spawn as Ere,execSync as No}from"child_process";import{writeFileSync as Q6,readFileSync as Y6,mkdirSync as J6,existsSync as zp,accessSync as X6,constants as eM,unlinkSync as Ire}from"fs";import{join as Qi,resolve as Pre}from"path";import{homedir as Cp}from"os";var Np,tM=P(()=>{ys();qi();fo();lh();ya();fx();O0();V6();Pc();H6();Np=class extends un{constructor(){super("cursor","Cursor (CLI)",100)}canHandle(t){let r=[Qi(Cp(),".local","bin","cursor-agent"),Qi(Cp(),".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("/")){X6(n,eM.X_OK);let i=No(`"${n}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(i&&i.length>0)return q.debug(`[Cursor] Found agent at: ${n} (version: ${i.trim().slice(0,50)})`),!0}else{let i=No(`which ${n}`,{encoding:"utf-8",timeout:2e3,stdio:"pipe"}).trim();if(!i)continue;let a=No(`${n} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(a&&a.length>0)return q.debug(`[Cursor] Found '${n}' in PATH at ${i} (version: ${a.trim().slice(0,50)})`),!0}}catch{continue}return q.warn("[Cursor] \u274C Cursor Agent CLI not found or not working. Run: agent --version"),!1}async invoke(t,r={}){let{workspace:n=process.cwd(),print:i=!1,schema:a=null,skills:s=null,sessionPath:o=null,nodeName:c=null,timeout:u=dh.CURSOR_AGENT_DEFAULT,config:l={}}=r,d=l?.agent?.strictMode||!1,p=r.model??l?.agent?.cursor?.model??ln.CURSOR;q.debug(`[Cursor] Invoking (model: ${p}, timeout: ${u/1e3}s, skills: ${JSON.stringify(s)})`);let m=(this._setupMcpConfig(o,n,l,s,c)||{}).isolatedMcpHome??null,v=[Qi(Cp(),".local","bin","cursor-agent"),Qi(Cp(),".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 U of v)try{if(U.startsWith("/"))X6(U,eM.X_OK),No(`"${U}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});else{if(!No(`which ${U}`,{encoding:"utf-8",timeout:2e3}).trim())throw new Error("not in PATH");No(`${U} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"})}g=U,q.debug(`[Agent] Using binary: ${U}`);break}catch(z){q.debug(`[Agent] Binary '${U}' check failed: ${z.message}`);continue}if(!g)throw new Error(`Cursor Agent CLI not found or not working.
102
+
103
+ Checked paths:
104
+ ${v.map(U=>` - ${U}`).join(`
105
+ `)}
106
+
107
+ Install cursor-agent:
108
+ curl https://cursor.com/install -fsS | bash
109
+
110
+ Then add to PATH:
111
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
112
+
113
+ Test with: agent --version`);let h=null;if(a){let U=`zibby-result-${Date.now()}.json`;h=Qi(n,".zibby","tmp",U);let z=Qi(n,".zibby","tmp");zp(z)||J6(z,{recursive:!0});let L=Wc.generateFileOutputInstructions(a,h);t=`${t}
114
+
115
+ ${L}`}let _=process.env.CURSOR_API_KEY,y=_?` | key: ***${_.slice(-4)}`:" | key: not set";console.log(`
116
+ \u25C6 Model: ${p||"auto"}${y}
117
+ `);let b=(await import("chalk")).default;console.log(`
118
+ ${b.bold("Prompt sent to LLM:")}`),console.log(b.dim("\u2500".repeat(60))),console.log(b.dim(t)),console.log(b.dim("\u2500".repeat(60)));let x=["--print","--force","--approve-mcps","--output-format","stream-json","--stream-partial-output","--model",p||"auto"];if(process.env.CURSOR_API_KEY&&x.push("--api-key",process.env.CURSOR_API_KEY),x.push(t),q.debug(`[Agent] Prompt: ${t.length} chars, model: ${p||"auto"}`),q.debug(`[Agent] Workspace: ${n}`),process.env.LOG_LEVEL==="debug"||process.env.ZIBBY_LOG_CURSOR_CLI==="1")try{console.log(`\u{1F527} Cursor CLI --model ${p||"auto"} (from .zibby.config.js agent.cursor.model)
119
+ `)}catch{}let w,k=null;try{let U=o||(process.env.ZIBBY_SESSION_PATH?String(process.env.ZIBBY_SESSION_PATH).trim():null);w=await this._spawnWithStreaming(g,x,n,u,null,U,m)}catch(U){k=U}let E=w?.stdout||"";if(a){let U=typeof a.parse=="function",z=null,L=!!(h&&zp(h));if(h&&q.info(`[Agent] Result file: ${L?"present":"missing"} at ${h}`),L)try{let R=Y6(h,"utf-8").trim();z=JSON.parse(R),q.info(`[Agent] Parsed JSON from result file OK (${R.length} chars) \u2192 object ready for validation`),k&&q.debug("[Agent] Agent exited non-zero but result file was written \u2014 recovering")}catch(R){q.warn(`\u26A0\uFE0F [Agent] Result file exists on disk but is not valid JSON: ${R.message}`)}else if(k)q.warn(`[Agent] Result file missing at ${h} (agent process error \u2014 may still recover if strictMode repairs)`);else throw q.error(`\u274C [Agent] Result file was never created at ${h}`),new Error(`Agent did not write required result file at ${h}`);if(z&&U)try{let R=a.parse(z);return q.info("\u2705 [Agent] Zod validation passed for structured result file"),d&&q.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:E,structured:R}}catch(R){q.warn(`\u26A0\uFE0F [Agent] JSON parsed but Zod rejected it (wrong types/shape): ${R.message?.slice(0,400)}`)}else{if(z)return q.info("\u2705 [Agent] File-based output extracted (no Zod parse fn) \u2014 accepting as structured"),d&&q.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:E,structured:z};L&&q.error("\u274C [Agent] Result file exists but produced no in-memory JSON (parse failed earlier)")}if(d&&!k){let R=w.parsedText,re=z?JSON.stringify(z):R;q.info(`[Agent] strictMode: calling OpenAI proxy to fix structured output (${re.length} chars in)`);try{let Q=await F6(re,a);if(U){let we=a.parse(Q.structured);return q.info("\u2705 [Agent] Proxy output passed Zod validation"),{raw:E,structured:we}}return{raw:E,...Q}}catch(Q){if(q.warn(`\u26A0\uFE0F [Agent] strictMode proxy failed: ${Q.message}`),z)return q.warn("[Agent] Using agent's original result file as fallback"),{raw:E,structured:z}}}if(k)throw k;let W=L?z==null?"file existed but JSON.parse failed \u2014 see WARN log above":U?"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 q.error(`\u274C [Agent] No validated structured output: ${W}`),q.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(E)||w?.parsedText||E}_extractFinalResult(t){if(!t)return null;let r=t.split(`
120
+ `),n=null;for(let i of r){let a=i.trim();if(a)try{let s=JSON.parse(a);if(s.type==="assistant"&&s.message?.content){let o=s.message.content;if(Array.isArray(o)){let c=o.filter(u=>u.type==="text"&&u.text).map(u=>u.text).join("");c&&(n=c)}else typeof o=="string"&&o&&(n=o)}}catch{}}return n?.trim()||null}_setupMcpConfig(t,r,n,i=null,a=null){let s=n?.headless,o=Qi(Cp(),".cursor"),c=Qi(o,"mcp.json"),u={};if(zp(c))try{u=JSON.parse(Y6(c,"utf-8"))}catch{}let l=u.mcpServers||{},d=n?.paths?.output||Tc,p=Qi(r||process.cwd(),d,vs),f=Array.isArray(i)?i.map(g=>Ar(g)).filter(Boolean):[...ph()].map(([,g])=>g),m=new Set;for(let g of f)typeof g.resolve=="function"&&(m.has(g.serverName)||(m.add(g.serverName),this._ensureSkillConfigured(l,g,t,p,a,s)));if(t){let g=Ar("browser");g&&typeof g.resolve=="function"&&!m.has(g.serverName)&&this._ensureSkillConfigured(l,g,t,p,"execute_live",s)}if(Object.keys(l).length===0)return q.debug("[MCP] No MCP servers configured - agent will run without tool access"),{isolatedMcpHome:null};let v=`${JSON.stringify({mcpServers:l},null,2)}
121
+ `;if(W6(t)){let g=K6(r||process.cwd()),h=Qi(g,".cursor","mcp.json");return Q6(h,v,"utf8"),q.debug(`[MCP] Isolated cursor-agent HOME (session-scoped mcp.json): ${g} | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:g}}return zp(o)||J6(o,{recursive:!0}),Q6(c,v,"utf8"),q.debug(`[MCP] Global ~/.cursor/mcp.json | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:null}}_ensureSkillConfigured(t,r,n,i,a=null,s){let o=r.cursorKey||r.serverName,c=t[o]?o:t[r.serverName]?r.serverName:null;if(c&&n){let l=typeof r.resolve=="function"?r.resolve({sessionPath:n,nodeName:a,headless:s}):null;l?.args?t[c].args=l.args:t[c].args=(t[c].args||[]).map(f=>f.startsWith("--output-dir=")?`--output-dir=${n}`:f);let d=l?.env||{},p=r.sessionEnvKey?{[r.sessionEnvKey]:i}:{};t[c].env={...t[c].env||{},...d,...p},q.debug(`[MCP] Updated ${c} session \u2192 ${n}`);return}if(c)return;let u=r.resolve({sessionPath:n,nodeName:a,headless:s});u&&(t[o]={...u,...r.sessionEnvKey&&{env:{...u.env||{},[r.sessionEnvKey]:i}}},q.debug(`[MCP] Configured ${o}`))}_spawnWithStreaming(t,r,n,i,a=null,s=null,o=null){return new Promise((c,u)=>{let l=Date.now(),d="",p="",f=Date.now(),m=0,v=!1,g=null,h=!1,_=!1,y=null;if(s)try{y=Qi(Pre(String(s)),uh)}catch{y=null}let b=!1,x=()=>{b||(b=!0,G6(o))},w={...process.env};o&&(w.HOME=o,process.platform==="win32"&&(w.USERPROFILE=o),q.debug(`[Agent] cursor-agent HOME=${o} (isolated MCP config)`));let k=Ere(t,r,{cwd:n,shell:!1,stdio:["pipe","pipe","pipe"],env:w});q.debug(`[Agent] PID: ${k.pid}`),k.stdin.on("error",R=>{R.code!=="EPIPE"&&q.warn(`[Agent] stdin error: ${R.message}`)}),k.stdout.on("error",R=>{R.code!=="EPIPE"&&q.warn(`[Agent] stdout error: ${R.message}`)}),k.stderr.on("error",R=>{R.code!=="EPIPE"&&q.warn(`[Agent] stderr error: ${R.message}`)}),a?(k.stdin.write(a,R=>{R&&R.code!=="EPIPE"&&q.warn(`[Agent] Failed to write to stdin: ${R.message}`),k.stdin.end()}),q.debug(`[Agent] Prompt also piped to stdin (${a.length} chars)`)):k.stdin.end();let E=null;y&&(E=setInterval(()=>{if(!(v||_))try{if(zp(y)){v=!0,g="studio-stop";try{Ire(y)}catch{}q.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 O=new Set,U=new Date(l).toISOString().replace(/\.\d+Z$/,""),z=setInterval(()=>{let R=Math.round((Date.now()-l)/1e3),re=Math.round((Date.now()-f)/1e3),Q=[];try{let Ze=Math.ceil(R/60)+1,fe=No(`find "${n}" -type f -mmin -${Ze} -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/target/*' 2>/dev/null | head -20`,{encoding:"utf-8",timeout:5e3}).trim();if(fe)for(let V of fe.split(`
122
+ `)){let I=V.replace(`${n}/`,"");O.has(I)||(O.add(I),Q.push(I))}}catch{}let we="";Q.length>0&&(we=` | \u{1F4C1} new: ${Q.map(fe=>fe.split("/").pop()).join(", ")}`),O.size>0&&(we+=` | \u{1F4E6} total: ${O.size} files`),q.debug(`\u{1F493} [Agent] Running for ${R}s | ${m} lines output${we}`),m===0&&R>=30&&O.size===0&&(R<35&&q.warn(`\u26A0\uFE0F [Agent] No output after ${R}s \u2014 agent may be stuck. Check your CURSOR_API_KEY.`),R>=60&&(v=!0,g=g||"stall",q.error(`\u274C [Agent] No response after ${R}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),L=setTimeout(()=>{v=!0,g=g||"timeout";let R=Math.round((Date.now()-l)/1e3);q.error(`\u23F1\uFE0F [Agent] Timeout after ${R}s \u2014 killing process (PID: ${k.pid})`),d.trim()&&q.warn(`\u{1F4E4} [Agent] Partial output (${d.length} chars) before timeout:
123
+ ${d.slice(-2e3)}`),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},5e3)},i),W=new Oc;W.onToolCall=(R,re)=>{let Q=R,we=re;if(R==="mcpToolCall"&&re?.name)Q=re.name.replace(/^mcp_+[^_]+_+/,""),Q.includes("-")&&Q.split("-")[0]===Q.split("-")[1]&&(Q=Q.split("-")[0]),we=re.args??re.input??re;else{if(R==="readToolCall"||R==="editToolCall"||R==="writeToolCall")return;(R.startsWith("mcp__")||R.includes("ToolCall"))&&(Q=R.replace(/^mcp_+[^_]+_+/,"").replace(/ToolCall$/,""))}if(Q.includes("memory")?rr.stepMemory(`Tool: ${Q}`):rr.stepTool(`Tool: ${Q}`),we!=null&&typeof we=="object"&&Object.keys(we).length>0&&!_){let fe=JSON.stringify(we),V=fe.length>100?`${fe.substring(0,100)}...`:fe;console.log(` Input: ${V}`)}},k.stdout.on("data",R=>{let re=R.toString();d+=re,f=Date.now(),h||(h=!0);let Q=W.processChunk(re);Q&&!_&&process.stdout.write(Q);let we=re.split(`
124
+ `).filter(Ze=>Ze.trim());m+=we.length}),k.stderr.on("data",R=>{let re=R.toString();p+=re,f=Date.now(),h||(h=!0);let Q=re.split(`
125
+ `).filter(we=>we.trim());for(let we of Q)q.warn(`\u26A0\uFE0F [Agent stderr] ${we}`)}),k.on("close",(R,re)=>{_=!0,x(),clearTimeout(L),clearInterval(z),E&&clearInterval(E),W.flush();let Q=Math.round((Date.now()-l)/1e3);if(q.debug(`[Agent] Exited: code=${R}, signal=${re}, elapsed=${Q}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 ${Q}s (limit: ${i/1e3}s). ${m} lines produced. Last output ${Math.round((Date.now()-f)/1e3)}s ago. ${d.trim()?`
126
+ Partial output (last 500 chars):
127
+ ${d.slice(-500)}`:"No output captured."}`));return}if(R!==0){u(new Error(`Cursor Agent failed: exit code ${R}, signal ${re}. ${p.trim()?`
128
+ Stderr: ${p.slice(-1e3)}`:""}${d.trim()?`
129
+ Stdout (last 500 chars): ${d.slice(-500)}`:""}`));return}let we=W.getResult(),Ze=we?JSON.stringify(we,null,2):W.getRawText()||d||"";c({stdout:d||p||"",parsedText:Ze})}),k.on("error",R=>{x(),clearTimeout(L),clearInterval(z),E&&clearInterval(E),u(new Error(`Cursor Agent spawn error: ${R.message}
130
+ Binary: ${t}
131
+ This usually means the binary is not in PATH. Try:
132
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc`))})})}}});import{execFile as Une}from"child_process";import{randomUUID as Dne}from"crypto";import{copyFile as Mne,mkdir as dI,readFile as Lne,rm as qne,writeFile as Nv}from"fs/promises";import{createRequire as Zne}from"module";import{homedir as EI,tmpdir as Fne}from"os";import{dirname as nM,isAbsolute as _L,join as Yi,relative as Vne,resolve as jv,sep as bL}from"path";import{fileURLToPath as Bne}from"url";import{setMaxListeners as Wne}from"events";import{spawn as Qne}from"child_process";import{createInterface as Yne}from"readline";import{homedir as Rae}from"os";import{join as Uae}from"path";import{randomUUID as Ise}from"crypto";import{appendFile as Pse,mkdir as Tse}from"fs/promises";import{join as jM}from"path";import{realpathSync as AM}from"fs";import{cwd as zse}from"process";import{randomUUID as GL}from"crypto";import{appendFile as Dse,mkdir as Mse,symlink as Lse,unlink as qse}from"fs/promises";import{dirname as HL,join as QL}from"path";import*as Ke from"fs";import{mkdir as Gse,open as Hse,readdir as Qse,readFile as UM,rename as Yse,rmdir as Jse,rm as Xse,stat as eoe,unlink as toe}from"fs/promises";import{execFile as koe}from"child_process";import{promisify as Soe}from"util";import{createHash as zoe}from"crypto";import{userInfo as Coe}from"os";function Nre(e){return this[e]}function Ure(e,t){this[e]=Rre.bind(null,t)}function xL(e=Kne){let t=new AbortController;return Wne(e,t.signal),t}function Gne(e,t,r){return new Promise((n,i)=>{if(t?.aborted){r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n();return}let a=setTimeout((o,c,u)=>{o?.removeEventListener("abort",c),u()},e,t,s,n);function s(){clearTimeout(a),r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n()}t?.addEventListener("abort",s,{once:!0}),r?.unref&&a.unref()})}function Hne(e,t){e(Error(t))}function pI(e,t,r){let n,i=new Promise((a,s)=>{n=setTimeout(Hne,t,s,r),typeof n=="object"&&n.unref?.()});return Promise.race([e,i]).finally(()=>{n!==void 0&&clearTimeout(n)})}function wL(){return process.versions.bun!==void 0}function aie(e){var t=nie.call(e,jp),r=e[jp];try{e[jp]=void 0;var n=!0}catch{}var i=iie.call(e);return n&&(t?e[jp]=r:delete e[jp]),i}function uie(e){return cie.call(e)}function fie(e){return e==null?e===void 0?pie:die:iM&&iM in Object(e)?sie(e):lie(e)}function hie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function bie(e){if(!SL(e))return!1;var t=mie(e);return t==vie||t==yie||t==gie||t==_ie}function kie(e){return!!aM&&aM in e}function Iie(e){if(e!=null){try{return Eie.call(e)}catch{}try{return e+""}catch{}}return""}function Rie(e){if(!SL(e)||Sie(e))return!1;var t=xie(e)?Aie:Oie;return t.test(Pie(e))}function Die(e,t){return e?.[t]}function Lie(e,t){var r=Mie(e,t);return Uie(r)?r:void 0}function Zie(){this.__data__=nf?nf(null):{},this.size=0}function Vie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Hie(e){var t=this.__data__;if(nf){var r=t[e];return r===Wie?void 0:r}return Gie.call(t,e)?t[e]:void 0}function Xie(e){var t=this.__data__;return nf?t[e]!==void 0:Jie.call(t,e)}function rae(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nf&&t===void 0?tae:t,this}function Xu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function iae(){this.__data__=[],this.size=0}function sae(e,t){return e===t||e!==e&&t!==t}function cae(e,t){for(var r=e.length;r--;)if(oae(e[r][0],t))return r;return-1}function dae(e){var t=this.__data__,r=Cy(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():lae.call(t,r,1),--this.size,!0}function fae(e){var t=this.__data__,r=Cy(t,e);return r<0?void 0:t[r][1]}function hae(e){return Cy(this.__data__,e)>-1}function vae(e,t){var r=this.__data__,n=Cy(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function el(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function wae(){this.size=0,this.__data__={hash:new sM,map:new(xae||_ae),string:new sM}}function Sae(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Eae(e,t){var r=e.__data__;return $ae(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Iae(e){var t=Ny(this,e).delete(e);return this.size-=t?1:0,t}function Tae(e){return Ny(this,e).get(e)}function zae(e){return Ny(this,e).has(e)}function Nae(e,t){var r=Ny(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function i1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(Aae);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(i1.Cache||EL),r}function Do(e){if(!e)return!1;if(typeof e=="boolean")return e;let t=String(e).toLowerCase().trim();return["1","true","yes","on"].includes(t)}function ve(e,t,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 t=="function"?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function Z(e,t,r,n){if(r==="a"&&!n)throw TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function af(e){return typeof e=="object"&&e!==null&&("name"in e&&e.name==="AbortError"||"message"in e&&String(e.message).includes("FetchRequestCanceledException"))}function TI(e){return typeof e!="object"?{}:e??{}}function cM(e){if(!e)return!0;for(let t in e)return!1;return!0}function Lae(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Vae(){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"}function Wae(){if(typeof navigator>"u"||!navigator)return null;let e=[{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:t,pattern:r}of e){let n=r.exec(navigator.userAgent);if(n){let i=n[1]||0,a=n[2]||0,s=n[3]||0;return{browser:t,version:`${i}.${a}.${s}`}}}return null}function Gae(){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 TL(...e){let t=globalThis.ReadableStream;if(typeof t>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function OL(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return TL({start(){},async pull(r){let{done:n,value:i}=await t.next();n?r.close():r.enqueue(i)},async cancel(){await t.return?.()}})}function s1(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let r=await t.read();return r?.done&&t.releaseLock(),r}catch(r){throw t.releaseLock(),r}},async return(){let r=t.cancel();return t.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function Hae(e){if(e===null||typeof e!="object")return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),r=t.cancel();t.releaseLock(),await r}function Yae(e){return Object.entries(e).filter(([t,r])=>typeof r<"u").map(([t,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(t)}=`;throw new Le(`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 Jae(e){let t=0;for(let i of e)t+=i.length;let r=new Uint8Array(t),n=0;for(let i of e)r.set(i,n),n+=i.length;return r}function o1(e){let t;return(pM??(t=new globalThis.TextEncoder,pM=t.encode.bind(t)))(e)}function mM(e){let t;return(fM??(t=new globalThis.TextDecoder,fM=t.decode.bind(t)))(e)}function Xae(e,t){for(let r=t??0;r<e.length;r++){if(e[r]===10)return{preceding:r,index:r+1,carriage:!1};if(e[r]===13)return{preceding:r,index:r+1,carriage:!0}}return null}function ese(e){for(let t=0;t<e.length-1;t++){if(e[t]===10&&e[t+1]===10||e[t]===13&&e[t+1]===13)return t+2;if(e[t]===13&&e[t+1]===10&&t+3<e.length&&e[t+2]===13&&e[t+3]===10)return t+4}return-1}function Yp(){}function mv(e,t,r){return!t||Yv[e]>Yv[r]?Yp:t[e].bind(t)}function _n(e){let t=e.logger,r=e.logLevel??"off";if(!t)return tse;let n=gM.get(t);if(n&&n[0]===r)return n[1];let i={error:mv("error",t,r),warn:mv("warn",t,r),info:mv("info",t,r),debug:mv("debug",t,r)};return gM.set(t,[r,i]),i}async function*rse(e,t){if(!e.body)throw t.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Le("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 Le("Attempted to iterate over a response with no body");let r=new OI,n=new Lo,i=s1(e.body);for await(let a of nse(i))for(let s of n.decode(a)){let o=r.decode(s);o&&(yield o)}for(let a of n.flush()){let s=r.decode(a);s&&(yield s)}}async function*nse(e){let t=new Uint8Array;for await(let r of e){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?o1(r):r,i=new Uint8Array(t.length+n.length);i.set(t),i.set(n,t.length),t=i;let a;for(;(a=ese(t))!==-1;)yield t.slice(0,a),t=t.slice(a)}t.length>0&&(yield t)}function ise(e,t){let r=e.indexOf(t);return r!==-1?[e.substring(0,r),t,e.substring(r+t.length)]:[e,"",""]}async function zL(e,t){let{response:r,requestLogID:n,retryOfRequestLogID:i,startTime:a}=t,s=await(async()=>{if(t.options.stream)return _n(e).debug("response",r.status,r.url,r.headers,r.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(r,t.controller):qo.fromSSEResponse(r,t.controller);if(r.status===204)return null;if(t.options.__binaryResponse)return r;let o=r.headers.get("content-type")?.split(";")[0]?.trim();if(o?.includes("application/json")||o?.endsWith("+json")){if(r.headers.get("content-length")==="0")return;let c=await r.json();return CL(c,r)}return await r.text()})();return _n(e).debug(`[${n}] response parsed`,Uo({retryOfRequestLogID:i,url:r.url,status:r.status,body:s,durationMs:Date.now()-a})),s}function CL(e,t){return!e||typeof e!="object"||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get("request-id"),enumerable:!1})}function Cu(e,t,r){return NL(),new File(e,t??"unknown_file",r)}function Av(e,t){let r=typeof e=="object"&&e!==null&&("name"in e&&e.name&&String(e.name)||"url"in e&&e.url&&String(e.url)||"filename"in e&&e.filename&&String(e.filename)||"path"in e&&e.path&&String(e.path))||"";return t?r.split(/[\\/]/).pop()||void 0:r}function ase(e){let t=typeof e=="function"?e:e.fetch,r=vM.get(t);if(r)return r;let n=(async()=>{try{let i="Response"in t?t.Response:(await t("data:,")).constructor,a=new FormData;return a.toString()!==await new i(a).text()}catch{return!0}})();return vM.set(t,n),n}async function lse(e,t,r){if(NL(),e=await e,t||(t=Av(e,!0)),cse(e))return e instanceof File&&t==null&&r==null?e:Cu([await e.arrayBuffer()],t??e.name,{type:e.type,lastModified:e.lastModified,...r});if(use(e)){let i=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),Cu(await NI(i),t,r)}let n=await NI(e);if(!r?.type){let i=n.find(a=>typeof a=="object"&&"type"in a&&a.type);typeof i=="string"&&(r={...r,type:i})}return Cu(n,t,r)}async function NI(e){let t=[];if(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(AL(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else if(jL(e))for await(let r of e)t.push(...await NI(r));else{let r=e?.constructor?.name;throw Error(`Unexpected data type: ${typeof e}${r?`; constructor: ${r}`:""}${dse(e)}`)}return t}function dse(e){return typeof e!="object"||e===null?"":`; props: [${Object.getOwnPropertyNames(e).map(t=>`"${t}"`).join(", ")}]`}function*pse(e){if(!e)return;if(RL in e){let{values:n,nulls:i}=e;yield*n.entries();for(let a of i)yield[a,null];return}let t=!1,r;e instanceof Headers?r=e.entries():oM(e)?r=e:(t=!0,r=Object.entries(e??{}));for(let n of r){let i=n[0];if(typeof i!="string")throw TypeError("expected header name to be a string");let a=oM(n[1])?n[1]:[n[1]],s=!1;for(let o of a)o!==void 0&&(t&&!s&&(s=!0,yield[i,null]),yield[i,o])}}function Rv(e){return typeof e=="object"&&e!==null&&tf in e}function UL(e,t){let r=new Set;if(e)for(let n of e)Rv(n)&&r.add(n[tf]);if(t){for(let n of t)if(Rv(n)&&r.add(n[tf]),Array.isArray(n.content))for(let i of n.content)Rv(i)&&r.add(i[tf])}return Array.from(r)}function DL(e,t){let r=UL(e,t);return r.length===0?{}:{"x-stainless-helper":r.join(", ")}}function fse(e){return Rv(e)?{"x-stainless-helper":e[tf]}:{}}function ML(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}function qL(e){return e?.output_format??e?.output_config?.format}function _M(e,t,r){let n=qL(t);return!t||!("parse"in(n??{}))?{...e,content:e.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}:ZL(e,t,r)}function ZL(e,t,r){let n=null,i=e.content.map(a=>{if(a.type==="text"){let s=hse(t,a.text);n===null&&(n=s);let o=Object.defineProperty({...a},"parsed_output",{value:s,enumerable:!1});return Object.defineProperty(o,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),s},enumerable:!1})}return a});return{...e,content:i,parsed_output:n}}function hse(e,t){let r=qL(e);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(t):JSON.parse(t)}catch(n){throw new Le(`Failed to parse structured output: ${n}`)}}function kM(e){return e.type==="tool_use"||e.type==="server_tool_use"||e.type==="mcp_tool_use"}function $M(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}async function xse(e,t=e.messages.at(-1)){if(!t||t.role!=="assistant"||!t.content||typeof t.content=="string")return null;let r=t.content.filter(n=>n.type==="tool_use");return r.length===0?null:{role:"user",content:await Promise.all(r.map(async n=>{let i=e.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 s=await i.run(a);return{type:"tool_result",tool_use_id:n.id,content:s}}catch(a){return{type:"tool_result",tool_use_id:n.id,content:a instanceof ny?a.content:`Error: ${a instanceof Error?a.message:String(a)}`,is_error:!0}}}))}}function IM(e){if(!e.output_format)return e;if(e.output_config?.format)throw new Le("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:t,...r}=e;return{...r,output_config:{...e.output_config,format:t}}}function VL(e){return e?.output_config?.format}function PM(e,t,r){let n=VL(t);return!t||!("parse"in(n??{}))?{...e,content:e.content.map(i=>i.type==="text"?Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1}):i),parsed_output:null}:BL(e,t,r)}function BL(e,t,r){let n=null,i=e.content.map(a=>{if(a.type==="text"){let s=kse(t,a.text);return n===null&&(n=s),Object.defineProperty({...a},"parsed_output",{value:s,enumerable:!1})}return a});return{...e,content:i,parsed_output:n}}function kse(e,t){let r=VL(e);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(t):JSON.parse(t)}catch(n){throw new Le(`Failed to parse structured output: ${n}`)}}function CM(e){return e.type==="tool_use"||e.type==="server_tool_use"}function KL(e){return e instanceof Error?e:Error(String(e))}function Dv(e){return e instanceof Error?e.message:String(e)}function rf(e){if(e&&typeof e=="object"&&"code"in e&&typeof e.code=="string")return e.code}function l1(e){return rf(e)==="ENOENT"}function Ose(){if(Eu)return Eu;if(!Do(process.env.DEBUG_CLAUDE_AGENT_SDK))return Nu=null,Eu=Promise.resolve(),Eu;let e=jM(a1(),"debug");return Nu=jM(e,`sdk-${Ise()}.txt`),process.stderr.write(`SDK debug logs: ${Nu}
133
+ `),Eu=Tse(e,{recursive:!0}).then(()=>{}).catch(()=>{}),Eu}function Sa(e){if(Nu===null)return;let t=`${new Date().toISOString()} ${e}
134
+ `;Ose().then(()=>{Nu&&Pse(Nu,t).catch(()=>{})})}function d1(){let e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},emit(...t){let r;for(let n of e)try{n(...t)}catch(i){(r??=[]).push(i)}if(r)throw r.length===1?r[0]:AggregateError(r,"Signal listener(s) threw")},clear(){e.clear()}}}function Cse(){let e="";if(typeof process<"u"&&typeof process.cwd=="function"&&typeof AM=="function"){let t=zse();try{e=AM(t).normalize("NFC")}catch{e=t.normalize("NFC")}}return{originalCwd:e,projectRoot:e,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:e,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:GL(),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}}function jse(){return Nse.sessionId}function Zse({writeFn:e,flushIntervalMs:t=1e3,maxBufferSize:r=100,maxBufferBytes:n=1/0,immediateMode:i=!1}){let a=[],s=0,o=null,c=null;function u(){o&&(clearTimeout(o),o=null)}function l(){c&&(e(c.join("")),c=null),a.length!==0&&(e(a.join("")),a=[],s=0,u())}function d(){o||(o=setTimeout(l,t))}function p(){if(c){c.push(...a),a=[],s=0,u();return}let f=a;a=[],s=0,u(),c=f,setImmediate(()=>{let m=c;c=null,m&&e(m.join(""))})}return{write(f){if(i){e(f);return}a.push(f),s+=f.length,d(),(a.length>=r||s>=n)&&p()},flush:l,dispose(){l()}}}function Fse(e){return RM.add(e),()=>RM.delete(e)}function Bse(e){let t=[],r=e.match(/^MCP server ["']([^"']+)["']/);if(r&&r[1])t.push("mcp"),t.push(r[1].toLowerCase());else{let a=e.match(/^([^:[]+):/);a&&a[1]&&t.push(a[1].trim().toLowerCase())}let n=e.match(/^\[([^\]]+)]/);n&&n[1]&&t.push(n[1].trim().toLowerCase()),e.toLowerCase().includes("1p event:")&&t.push("1p");let i=e.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i&&i[1]){let a=i[1].trim().toLowerCase();a.length<30&&!a.includes(" ")&&t.push(a)}return Array.from(new Set(t))}function Wse(e,t){return t?e.length===0?!1:t.isExclusive?!e.some(r=>t.exclude.includes(r)):e.some(r=>t.include.includes(r)):!0}function Kse(e,t){if(!t)return!0;let r=Bse(e);return Wse(r,t)}function DM(){return noe}function ioe(e,t){e.destroyed||e.write(t)}function aoe(e){ioe(process.stderr,e)}function uoe(e){if(!MI()||typeof process>"u"||typeof process.versions>"u"||typeof process.versions.node>"u")return!1;let t=coe();return Kse(e,t)}async function doe(e,t,r,n){e&&await Mse(t,{recursive:!0}).catch(()=>{}),await Dse(r,n),eq()}function poe(){}function foe(){if(!Ov){let e=null;Ov=Zse({writeFn:t=>{let r=XL(),n=HL(r),i=e!==n;if(e=n,MI()){if(i)try{DM().mkdirSync(n)}catch{}DM().appendFileSync(r,t),eq();return}kI=kI.then(doe.bind(null,i,n,r,t)).catch(poe)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:MI()}),Fse(async()=>{Ov?.dispose(),await kI})}return Ov}function ai(e,{level:t}={level:"debug"}){if(DI[t]<DI[soe()]||!uoe(e))return;loe&&e.includes(`
135
+ `)&&(e=jn(e));let r=`${new Date().toISOString()} [${t.toUpperCase()}] ${e.trim()}
136
+ `;if(YL()){aoe(r);return}foe().write(r)}function XL(){return JL()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??QL(a1(),"debug",`${jse()}.txt`)}function hoe(){return moe}function jn(e,t,r){let n=[];try{let s=hr(n,vr`JSON.stringify(${e})`,0);return JSON.stringify(e,t,r)}catch(s){var i=s,a=1}finally{gr(n,i,a)}}function goe(e){let t=e.trim();return t.startsWith("{")&&t.endsWith("}")}function voe(e,t){let r={...e};if(t){let n=t.enabled===!0&&t.failIfUnavailable===void 0?{...t,failIfUnavailable:!0}:t,i=r.settings;if(i&&!goe(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={...p1(i),sandbox:n}}catch{}r.settings=jn(a)}return r}function _oe(){for(let e of dy)e.killed||e.kill("SIGTERM")}function boe(e){dy.add(e),!MM&&(MM=!0,process.on("exit",_oe))}function xoe(e){return![".js",".mjs",".tsx",".ts",".jsx"].some(t=>e.endsWith(t))}function woe(e,t=process.platform,r=process.arch){let n;t==="linux"?n=[`@anthropic-ai/claude-agent-sdk-linux-${r}-musl/cli`,`@anthropic-ai/claude-agent-sdk-linux-${r}/cli`]:t==="win32"?n=[`@anthropic-ai/claude-agent-sdk-win32-${r}/cli.exe`]:n=[`@anthropic-ai/claude-agent-sdk-${t}-${r}/cli`];for(let i of n)try{return e(i)}catch{}return null}function $oe(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}function Ioe(e){return typeof e!="string"?null:Eoe.test(e)?e:null}function Poe(e){return Math.abs($oe(e)).toString(36)}function Toe(e){let t=e.replace(/[^a-zA-Z0-9]/g,"-");return t.length<=LM?t:`${t.slice(0,LM)}-${Poe(e)}`}function Noe(){return"prod"}function Moe(){let e=process.env.CLAUDE_LOCAL_OAUTH_API_BASE?.replace(/\/$/,"")??"http://localhost:8000",t=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:e,CONSOLE_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${t}/oauth/authorize`,CLAUDE_AI_ORIGIN:t,TOKEN_URL:`${e}/v1/oauth/token`,API_KEY_URL:`${e}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${e}/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}"}}function qoe(){let e=(()=>{switch(Noe()){case"local":return Moe();case"staging":return Doe??qM;case"prod":return qM}})(),t=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(t){let n=t.replace(/\/$/,"");if(!Loe.includes(n))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");e={...e,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&&(e={...e,CLIENT_ID:r}),e}function Foe(e=""){let t=a1(),r=process.env.CLAUDE_CONFIG_DIR?`-${zoe("sha256").update(t).digest("hex").substring(0,8)}`:"";return`Claude Code${qoe().OAUTH_FILE_SUFFIX}${e}${r}`}function Voe(){try{return process.env.USER||Coe().username}catch{return"claude-code-user"}}function BI(){return Woe}function de(e,t){let r=BI(),n=WI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===cf?void 0:cf].filter(i=>!!i)});e.common.issues.push(n)}function Qe(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{let{message:o}=e;return a.code==="invalid_enum_value"?{message:o??s.defaultError}:typeof s.data>"u"?{message:o??n??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:o??r??s.defaultError}},description:i}}function nq(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function uce(e){return new RegExp(`^${nq(e)}$`)}function lce(e){let t=`${rq}T${nq(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function dce(e,t){return!!((t==="v4"||!t)&&rce.test(e)||(t==="v6"||!t)&&ice.test(e))}function pce(e,t){if(!Joe.test(e))return!1;try{let[r]=e.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||t&&i.alg!==t)}catch{return!1}}function fce(e,t){return!!((t==="v4"||!t)&&nce.test(e)||(t==="v6"||!t)&&ace.test(e))}function mce(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}function Tu(e){if(e instanceof ui){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Ji.create(Tu(n))}return new ui({...e._def,shape:()=>t})}else return e instanceof Zs?new Zs({...e._def,type:Tu(e.element)}):e instanceof Ji?Ji.create(Tu(e.unwrap())):e instanceof ts?ts.create(Tu(e.unwrap())):e instanceof es?es.create(e.items.map(t=>Tu(t))):e}function GI(e,t){let r=Ds(e),n=Ds(t);if(e===t)return{valid:!0,data:e};if(r===_e.object&&n===_e.object){let i=zt.objectKeys(t),a=zt.objectKeys(e).filter(o=>i.indexOf(o)!==-1),s={...e,...t};for(let o of a){let c=GI(e[o],t[o]);if(!c.valid)return{valid:!1};s[o]=c.data}return{valid:!0,data:s}}else if(r===_e.array&&n===_e.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let a=0;a<e.length;a++){let s=e[a],o=t[a],c=GI(s,o);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===_e.date&&n===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function iq(e,t){return new Bu({values:e,typeName:Me.ZodEnum,...Qe(t)})}function D(e,t,r){function n(o,c){var u;Object.defineProperty(o,"_zod",{value:o._zod??{},enumerable:!1}),(u=o._zod).traits??(u.traits=new Set),o._zod.traits.add(e),t(o,c);for(let l in s.prototype)l in o||Object.defineProperty(o,l,{value:s.prototype[l].bind(o)});o._zod.constr=s,o._zod.def=c}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function s(o){var c;let u=r?.Parent?new a:this;n(u,o),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function kn(e){return e&&Object.assign(hy,e),hy}function hce(e){return e}function gce(e){return e}function vce(e){}function yce(e){throw Error()}function _ce(e){}function f1(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function oe(e,t="|"){return e.map(r=>et(r)).join(t)}function cq(e,t){return typeof t=="bigint"?t.toString():t}function jy(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error("cached value already set")}}}function Go(e){return e==null}function Ay(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function uq(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}function Mt(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}throw Error("cached value already set")},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function m1(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function bce(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function xce(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<t.length;a++)i[t[a]]=n[a];return i})}function wce(e=10){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return t}function Ou(e){return JSON.stringify(e)}function _f(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function bf(e){if(_f(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(_f(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function kce(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Ho(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function na(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function $ce(e){let t;return new Proxy({},{get(r,n,i){return t??(t=e()),Reflect.get(t,n,i)},set(r,n,i,a){return t??(t=e()),Reflect.set(t,n,i,a)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,i){return t??(t=e()),Reflect.defineProperty(t,n,i)}})}function et(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function pq(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Ece(e,t){let r={},n=e._zod.def;for(let i in t){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&(r[i]=n.shape[i])}return na(e,{...e._zod.def,shape:r,checks:[]})}function Ice(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let i in t){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&delete r[i]}return na(e,{...e._zod.def,shape:r,checks:[]})}function Pce(e,t){if(!bf(t))throw Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return m1(this,"shape",n),n},checks:[]};return na(e,r)}function Tce(e,t){return na(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return m1(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function Oce(e,t,r){let n=t._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]=e?new e({type:"optional",innerType:n[a]}):n[a])}else for(let a in n)i[a]=e?new e({type:"optional",innerType:n[a]}):n[a];return na(t,{...t._zod.def,shape:i,checks:[]})}function zce(e,t,r){let n=t._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 e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return na(t,{...t._zod.def,shape:i,checks:[]})}function ju(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function xi(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ef(e){return typeof e=="string"?e:e?.message}function ta(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=ef(e.inst?._zod.def?.error?.(e))??ef(t?.error?.(e))??ef(r.customError?.(e))??ef(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,!t?.reportInput&&delete n.input,n}function Ry(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Uy(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function hq(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function Cce(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function v1(e,t=r=>r.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function y1(e,t){let r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(let s of a.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>i({issues:o}));else if(s.code==="invalid_key")i({issues:s.issues});else if(s.code==="invalid_element")i({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let o=n,c=0;for(;c<s.path.length;){let u=s.path[c];c!==s.path.length-1?o[u]=o[u]||{_errors:[]}:(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(s))),o=o[u],c++}}};return i(e),n}function vq(e,t){let r=t||function(a){return a.message},n={errors:[]},i=(a,s=[])=>{var o,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=[...s,...u.path];if(l.length===0){n.errors.push(r(u));continue}let d=n,p=0;for(;p<l.length;){let f=l[p],m=p===l.length-1;typeof f=="string"?(d.properties??(d.properties={}),(o=d.properties)[f]??(o[f]={errors:[]}),d=d.properties[f]):(d.items??(d.items=[]),(c=d.items)[f]??(c[f]={errors:[]}),d=d.items[f]),m&&d.errors.push(r(u)),p++}}};return i(e),n}function yq(e){let t=[];for(let r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function _q(e){let t=[],r=[...e.issues].sort((n,i)=>n.path.length-i.path.length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${yq(n.path)}`);return t.join(`
137
+ `)}function Tq(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}function Mq(e){return typeof e.precision=="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.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{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Lq(e){return new RegExp(`^${Mq(e)}$`)}function qq(e){let t=Mq({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Uq}T(?:${n})$`)}function WM(e,t,r){e.issues.length&&t.issues.push(...xi(r,e.issues))}function T1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function UZ(e){if(!E1.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return T1(r)}function LZ(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}function KM(e,t,r){e.issues.length&&t.issues.push(...xi(r,e.issues)),t.value[r]=e.value}function zv(e,t,r){e.issues.length&&t.issues.push(...xi(r,e.issues)),t.value[r]=e.value}function GM(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...xi(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function HM(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>ta(a,n,kn())))}),t}function JI(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(bf(e)&&bf(t)){let r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),i={...e,...t};for(let a of n){let s=JI(e[a],t[a]);if(!s.valid)return{valid:!1,mergeErrorPath:[a,...s.mergeErrorPath]};i[a]=s.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let i=e[n],a=t[n],s=JI(i,a);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function QM(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),ju(e))return e;let n=JI(t.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}function Cv(e,t,r){e.issues.length&&t.issues.push(...xi(r,e.issues)),t.value[r]=e.value}function YM(e,t,r,n,i,a,s){e.issues.length&&(gy.has(typeof n)?r.issues.push(...xi(n,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:a,issues:e.issues.map(o=>ta(o,s,kn()))})),t.issues.length&&(gy.has(typeof n)?r.issues.push(...xi(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:t.issues.map(o=>ta(o,s,kn()))})),r.value.set(e.value,t.value)}function JM(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function XM(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function eL(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function tL(e,t,r){return ju(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}function rL(e){return e.value=Object.freeze(e.value),e}function nL(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(hq(i))}}function Vce(){return{localeError:Fce()}}function Wce(){return{localeError:Bce()}}function iL(e,t,r,n){let i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:a===1?t:a>=2&&a<=4?r:n}function Gce(){return{localeError:Kce()}}function Qce(){return{localeError:Hce()}}function Jce(){return{localeError:Yce()}}function eue(){return{localeError:Xce()}}function _F(){return{localeError:rue()}}function aue(){return{localeError:iue()}}function oue(){return{localeError:sue()}}function uue(){return{localeError:cue()}}function due(){return{localeError:lue()}}function fue(){return{localeError:pue()}}function hue(){return{localeError:mue()}}function vue(){return{localeError:gue()}}function _ue(){return{localeError:yue()}}function xue(){return{localeError:bue()}}function kue(){return{localeError:wue()}}function $ue(){return{localeError:Sue()}}function Iue(){return{localeError:Eue()}}function Tue(){return{localeError:Pue()}}function zue(){return{localeError:Oue()}}function Nue(){return{localeError:Cue()}}function Aue(){return{localeError:jue()}}function Uue(){return{localeError:Rue()}}function Mue(){return{localeError:Due()}}function que(){return{localeError:Lue()}}function Fue(){return{localeError:Zue()}}function Bue(){return{localeError:Vue()}}function aL(e,t,r,n){let i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:a===1?t:a>=2&&a<=4?r:n}function Kue(){return{localeError:Wue()}}function Hue(){return{localeError:Gue()}}function Yue(){return{localeError:Que()}}function Xue(){return{localeError:Jue()}}function tle(){return{localeError:ele()}}function ile(){return{localeError:nle()}}function sle(){return{localeError:ale()}}function cle(){return{localeError:ole()}}function lle(){return{localeError:ule()}}function ple(){return{localeError:dle()}}function mle(){return{localeError:fle()}}function M1(){return new xf}function wF(e,t){return new e({type:"string",...ne(t)})}function kF(e,t){return new e({type:"string",coerce:!0,...ne(t)})}function L1(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ne(t)})}function xy(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ne(t)})}function q1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ne(t)})}function Z1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ne(t)})}function F1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ne(t)})}function V1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ne(t)})}function B1(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ne(t)})}function W1(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ne(t)})}function K1(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ne(t)})}function G1(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ne(t)})}function H1(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ne(t)})}function Q1(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ne(t)})}function Y1(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ne(t)})}function J1(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ne(t)})}function X1(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ne(t)})}function eP(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ne(t)})}function tP(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ne(t)})}function rP(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ne(t)})}function nP(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ne(t)})}function iP(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ne(t)})}function aP(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ne(t)})}function sP(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ne(t)})}function $F(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ne(t)})}function EF(e,t){return new e({type:"string",format:"date",check:"string_format",...ne(t)})}function IF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ne(t)})}function PF(e,t){return new e({type:"string",format:"duration",check:"string_format",...ne(t)})}function TF(e,t){return new e({type:"number",checks:[],...ne(t)})}function OF(e,t){return new e({type:"number",coerce:!0,checks:[],...ne(t)})}function zF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ne(t)})}function CF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ne(t)})}function NF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ne(t)})}function jF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ne(t)})}function AF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ne(t)})}function RF(e,t){return new e({type:"boolean",...ne(t)})}function UF(e,t){return new e({type:"boolean",coerce:!0,...ne(t)})}function DF(e,t){return new e({type:"bigint",...ne(t)})}function MF(e,t){return new e({type:"bigint",coerce:!0,...ne(t)})}function LF(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ne(t)})}function qF(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ne(t)})}function ZF(e,t){return new e({type:"symbol",...ne(t)})}function FF(e,t){return new e({type:"undefined",...ne(t)})}function VF(e,t){return new e({type:"null",...ne(t)})}function BF(e){return new e({type:"any"})}function wy(e){return new e({type:"unknown"})}function WF(e,t){return new e({type:"never",...ne(t)})}function KF(e,t){return new e({type:"void",...ne(t)})}function GF(e,t){return new e({type:"date",...ne(t)})}function HF(e,t){return new e({type:"date",coerce:!0,...ne(t)})}function QF(e,t){return new e({type:"nan",...ne(t)})}function Bo(e,t){return new I1({check:"less_than",...ne(t),value:e,inclusive:!1})}function Xi(e,t){return new I1({check:"less_than",...ne(t),value:e,inclusive:!0})}function Wo(e,t){return new P1({check:"greater_than",...ne(t),value:e,inclusive:!1})}function si(e,t){return new P1({check:"greater_than",...ne(t),value:e,inclusive:!0})}function YF(e){return Wo(0,e)}function JF(e){return Bo(0,e)}function XF(e){return Xi(0,e)}function e9(e){return si(0,e)}function wf(e,t){return new Jq({check:"multiple_of",...ne(t),value:e})}function My(e,t){return new tZ({check:"max_size",...ne(t),maximum:e})}function kf(e,t){return new rZ({check:"min_size",...ne(t),minimum:e})}function oP(e,t){return new nZ({check:"size_equals",...ne(t),size:e})}function Ly(e,t){return new iZ({check:"max_length",...ne(t),maximum:e})}function Yu(e,t){return new aZ({check:"min_length",...ne(t),minimum:e})}function qy(e,t){return new sZ({check:"length_equals",...ne(t),length:e})}function cP(e,t){return new oZ({check:"string_format",format:"regex",...ne(t),pattern:e})}function uP(e){return new cZ({check:"string_format",format:"lowercase",...ne(e)})}function lP(e){return new uZ({check:"string_format",format:"uppercase",...ne(e)})}function dP(e,t){return new lZ({check:"string_format",format:"includes",...ne(t),includes:e})}function pP(e,t){return new dZ({check:"string_format",format:"starts_with",...ne(t),prefix:e})}function fP(e,t){return new pZ({check:"string_format",format:"ends_with",...ne(t),suffix:e})}function t9(e,t,r){return new fZ({check:"property",property:e,schema:t,...ne(r)})}function mP(e,t){return new mZ({check:"mime_type",mime:e,...ne(t)})}function Qo(e){return new hZ({check:"overwrite",tx:e})}function hP(e){return Qo(t=>t.normalize(e))}function gP(){return Qo(e=>e.trim())}function vP(){return Qo(e=>e.toLowerCase())}function yP(){return Qo(e=>e.toUpperCase())}function _P(e,t,r){return new e({type:"array",element:t,...ne(r)})}function hle(e,t,r){return new e({type:"union",options:t,...ne(r)})}function gle(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ne(n)})}function vle(e,t,r){return new e({type:"intersection",left:t,right:r})}function r9(e,t,r,n){let i=r instanceof Ge;return new e({type:"tuple",items:t,rest:i?r:null,...ne(i?n:r)})}function yle(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ne(n)})}function _le(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ne(n)})}function ble(e,t,r){return new e({type:"set",valueType:t,...ne(r)})}function xle(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:n,...ne(r)})}function wle(e,t,r){return new e({type:"enum",entries:t,...ne(r)})}function kle(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ne(r)})}function n9(e,t){return new e({type:"file",...ne(t)})}function Sle(e,t){return new e({type:"transform",transform:t})}function $le(e,t){return new e({type:"optional",innerType:t})}function Ele(e,t){return new e({type:"nullable",innerType:t})}function Ile(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():r}})}function Ple(e,t,r){return new e({type:"nonoptional",innerType:t,...ne(r)})}function Tle(e,t){return new e({type:"success",innerType:t})}function Ole(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function zle(e,t,r){return new e({type:"pipe",in:t,out:r})}function Cle(e,t){return new e({type:"readonly",innerType:t})}function Nle(e,t,r){return new e({type:"template_literal",parts:t,...ne(r)})}function jle(e,t){return new e({type:"lazy",getter:t})}function Ale(e,t){return new e({type:"promise",innerType:t})}function i9(e,t,r){let n=ne(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function a9(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ne(r)})}function s9(e,t){let r=ne(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let a=new Set(n),s=new Set(i),o=e.Pipe??U1,c=e.Boolean??z1,u=e.String??Pf,l=new(e.Transform??R1)({type:"transform",transform:(p,f)=>{let m=p;return r.case!=="sensitive"&&(m=m.toLowerCase()),a.has(m)?!0:s.has(m)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:f.value,inst:l}),{})},error:r.error}),d=new o({type:"pipe",in:new u({type:"string",error:r.error}),out:l,error:r.error});return new o({type:"pipe",in:d,out:new c({type:"boolean",error:r.error}),error:r.error})}function o9(e,t,r,n={}){let i=ne(n),a={...ne(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(a.pattern=r),new e(a)}function c9(e){return new ky({type:"function",input:Array.isArray(e?.input)?r9(Dy,e?.input):e?.input??_P(N1,wy(by)),output:e?.output??wy(by)})}function u9(e,t){if(e instanceof xf){let n=new Sf(t),i={};for(let o of e._idmap.entries()){let[c,u]=o;n.process(u)}let a={},s={registry:e,uri:t?.uri||(o=>o),defs:i};for(let o of e._idmap.entries()){let[c,u]=o;a[c]=n.emit(u,{...t,external:s})}if(Object.keys(i).length>0){let o=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[o]:i}}return{schemas:a}}let r=new Sf(t);return r.process(e),r.emit(e,t)}function Or(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._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 Or(n.element,r);case"object":{for(let i in n.shape)if(Or(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(Or(i,r))return!0;return!1}case"intersection":return Or(n.left,r)||Or(n.right,r);case"tuple":{for(let i of n.items)if(Or(i,r))return!0;return!!(n.rest&&Or(n.rest,r))}case"record":return Or(n.keyType,r)||Or(n.valueType,r);case"map":return Or(n.keyType,r)||Or(n.valueType,r);case"set":return Or(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Or(n.innerType,r);case"lazy":return Or(n.getter(),r);case"default":return Or(n.innerType,r);case"prefault":return Or(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Or(n.in,r)||Or(n.out,r);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${n.type}`)}function l9(e){return $F(xP,e)}function d9(e){return EF(wP,e)}function p9(e){return IF(kP,e)}function f9(e){return PF(SP,e)}function H(e){return wF(Zy,e)}function Mle(e){return L1(EP,e)}function Lle(e){return xy(Sy,e)}function qle(e){return q1(Xa,e)}function Zle(e){return Z1(Xa,e)}function Fle(e){return F1(Xa,e)}function Vle(e){return V1(Xa,e)}function Ble(e){return B1(IP,e)}function Wle(e){return W1(PP,e)}function Kle(e){return K1(TP,e)}function Gle(e){return G1(OP,e)}function Hle(e){return H1(zP,e)}function Qle(e){return Q1(CP,e)}function Yle(e){return Y1(NP,e)}function Jle(e){return J1(jP,e)}function Xle(e){return X1(AP,e)}function ede(e){return eP(RP,e)}function tde(e){return tP(UP,e)}function rde(e){return rP(DP,e)}function nde(e){return nP(MP,e)}function ide(e){return iP(LP,e)}function ade(e){return aP(qP,e)}function sde(e){return sP(ZP,e)}function ode(e,t,r={}){return o9(_9,e,t,r)}function Dt(e){return TF(Fy,e)}function XI(e){return zF(rl,e)}function cde(e){return CF(rl,e)}function ude(e){return NF(rl,e)}function lde(e){return jF(rl,e)}function dde(e){return AF(rl,e)}function zr(e){return RF(Vy,e)}function pde(e){return DF(By,e)}function fde(e){return LF(FP,e)}function mde(e){return qF(FP,e)}function hde(e){return ZF(b9,e)}function gde(e){return FF(x9,e)}function VP(e){return VF(w9,e)}function vde(){return BF(k9)}function lr(){return wy(S9)}function Wy(e){return WF($9,e)}function yde(e){return KF(E9,e)}function _de(e){return GF(BP,e)}function bt(e,t){return _P(I9,e,t)}function bde(e){let t=e._zod.def.shape;return Pe(Object.keys(t))}function ye(e,t){let r={type:"object",get shape(){return _t.assignProp(this,"shape",{...e}),this.shape},..._t.normalizeParams(t)};return new Ky(r)}function xde(e,t){return new Ky({type:"object",get shape(){return _t.assignProp(this,"shape",{...e}),this.shape},catchall:Wy(),..._t.normalizeParams(t)})}function bn(e,t){return new Ky({type:"object",get shape(){return _t.assignProp(this,"shape",{...e}),this.shape},catchall:lr(),..._t.normalizeParams(t)})}function Qt(e,t){return new WP({type:"union",options:e,..._t.normalizeParams(t)})}function KP(e,t,r){return new P9({type:"union",options:t,discriminator:e,..._t.normalizeParams(r)})}function Gy(e,t){return new T9({type:"intersection",left:e,right:t})}function wde(e,t,r){let n=t instanceof Ge,i=n?r:t;return new O9({type:"tuple",items:e,rest:n?t:null,..._t.normalizeParams(i)})}function Ht(e,t,r){return new GP({type:"record",keyType:e,valueType:t,..._t.normalizeParams(r)})}function kde(e,t,r){return new GP({type:"record",keyType:Qt([e,Wy()]),valueType:t,..._t.normalizeParams(r)})}function Sde(e,t,r){return new z9({type:"map",keyType:e,valueType:t,..._t.normalizeParams(r)})}function $de(e,t){return new C9({type:"set",valueType:e,..._t.normalizeParams(t)})}function Rn(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new $f({type:"enum",entries:r,..._t.normalizeParams(t)})}function Ede(e,t){return new $f({type:"enum",entries:e,..._t.normalizeParams(t)})}function Pe(e,t){return new N9({type:"literal",values:Array.isArray(e)?e:[e],..._t.normalizeParams(t)})}function Ide(e){return n9(j9,e)}function QP(e){return new HP({type:"transform",transform:e})}function ir(e){return new YP({type:"optional",innerType:e})}function $y(e){return new A9({type:"nullable",innerType:e})}function Pde(e){return ir($y(e))}function U9(e,t){return new R9({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function M9(e,t){return new D9({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function L9(e,t){return new JP({type:"nonoptional",innerType:e,..._t.normalizeParams(t)})}function Tde(e){return new q9({type:"success",innerType:e})}function F9(e,t){return new Z9({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Ode(e){return QF(V9,e)}function Ey(e,t){return new XP({type:"pipe",in:e,out:t})}function W9(e){return new B9({type:"readonly",innerType:e})}function zde(e,t){return new K9({type:"template_literal",parts:e,..._t.normalizeParams(t)})}function H9(e){return new G9({type:"lazy",getter:e})}function Cde(e){return new Q9({type:"promise",innerType:e})}function Y9(e,t){let r=new br({check:"custom",..._t.normalizeParams(t)});return r._zod.check=e,r}function J9(e,t){return i9(Hy,e??(()=>!0),t)}function X9(e,t={}){return a9(Hy,e,t)}function e3(e,t){let r=Y9(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(_t.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(_t.issue(a))}},e(n.value,n)),t);return r}function Nde(e,t={error:`Input not instance of ${e.name}`}){let r=new Hy({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,..._t.normalizeParams(t)});return r._zod.bag.Class=e,r}function Ade(e){let t=H9(()=>Qt([H(e),Dt(),zr(),VP(),bt(t),Ht(H(),t)]));return t}function eT(e,t){return Ey(QP(e),t)}function Ude(e){kn({customError:e})}function Dde(){return kn().customError}function Mde(e){return kF(Zy,e)}function Lde(e){return OF(Fy,e)}function qde(e){return UF(Vy,e)}function Zde(e){return MF(By,e)}function Fde(e){return HF(BP,e)}function jfe(e){let t;return()=>t??=e()}async function Afe(e,t){try{await Mne(e,t)}catch(r){if(!l1(r))throw r}}async function Rfe(e,t){if(!e)return;let r=e;try{let n=p1(e);n?.claudeAiOauth?.refreshToken&&(delete n.claudeAiOauth.refreshToken,r=jn(n))}catch{}await Nv(t,r,{mode:384})}function Ufe(){if(process.platform!=="darwin")return Promise.resolve(void 0);let e=Foe(Zoe);return new Promise(t=>{Une("security",["find-generic-password","-a",Voe(),"-w","-s",e],{encoding:"utf-8",timeout:5e3},(r,n)=>t(r?void 0:n.trim()||void 0))})}async function Dfe(e,t,r,n,i=6e4){if(!Ioe(t))return;let a=jv(r??"."),s=Toe(a),o=await pI(e.load({projectKey:s,sessionId:t}),i,`SessionStore.load() timed out after ${i}ms for session ${t}`);if(!o||o.length===0)return;let c=Yi(Fne(),`claude-resume-${Dne()}`);try{let u=Yi(c,"projects",s);await dI(u,{recursive:!0});let l=Yi(u,`${t}.jsonl`);await Nv(l,lL(o),{mode:384});let d=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,p=d??Yi(EI(),".claude"),f;try{f=await Lne(Yi(p,".credentials.json"),"utf-8")}catch(m){if(!l1(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)&&(f=await Ufe()??f),await Rfe(f,Yi(c,".credentials.json")),await Afe(Yi(d??EI(),".claude.json"),Yi(c,".claude.json")),e.listSubkeys){let m=Yi(u,t),v=await pI(e.listSubkeys({projectKey:s,sessionId:t}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${t}`);for(let g of v){let h=jv(m,g+".jsonl");if(!g||_L(g)||g.split(/[\\/]/).includes("..")||!h.startsWith(m+bL)){ai(`[SessionStore] skipping unsafe subpath from listSubkeys: ${g}`,{level:"warn"});continue}let _=await pI(e.load({projectKey:s,sessionId:t,subpath:g}),i,`SessionStore.load() timed out after ${i}ms for session ${t} subpath ${g}`);if(!_||_.length===0)continue;let y=[],b=[];for(let x of _)qfe(x)?y.push(x):b.push(x);if(b.length>0&&(await dI(nM(h),{recursive:!0}),await Nv(h,lL(b),{mode:384})),y.length>0){let x=y.at(-1),w=jv(m,g+".meta.json");await dI(nM(w),{recursive:!0});let{type:k,...E}=x;await Nv(w,jn(E),{mode:384})}}}return c}catch(u){throw await E3(c),u}}function cL(e,t,r,n){let{systemPrompt:i,settings:a,settingSources:s,sandbox:o,...c}=e??{},u,l,d;i===void 0?u="":typeof i=="string"?u=i:i.type==="preset"&&(l=i.append,d=i.excludeDynamicSections);let p=c.pathToClaudeCodeExecutable;if(!p){let Ic=Bne(import.meta.url),Ua=Zne(Ic),ch=woe(nx=>Ua.resolve(nx));if(ch)p=ch;else try{p=Ua.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:f=xL(),additionalDirectories:m=[],agent:v,agents:g,allowedTools:h=[],betas:_,canUseTool:y,continue:b,cwd:x,debug:w,debugFile:k,disallowedTools:E=[],tools:O,env:U,executable:z=wL()?"bun":"node",executableArgs:L=[],extraArgs:W={},fallbackModel:R,enableFileCheckpointing:re,toolConfig:Q,forkSession:we,hooks:Ze,includeHookEvents:fe,includePartialMessages:V,onElicitation:I,persistSession:B,sessionStore:A,thinking:$,effort:T,maxThinkingTokens:K,maxTurns:se,maxBudgetUsd:ge,taskBudget:mt,mcpServers:Ce,model:pr,outputFormat:M,permissionMode:F="default",allowDangerouslySkipPermissions:Y=!1,permissionPromptToolName:ie,plugins:$e,getOAuthToken:Ye,workload:kr,resume:Kn,resumeSessionAt:Hr,sessionId:Qr,stderr:Ir,strictMcpConfig:ms}=c;if(A&&B===!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 cn=M?.type==="json_schema"?M.schema:void 0,Gn=U?{...U}:{...process.env};Gn.CLAUDE_CODE_ENTRYPOINT||(Gn.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),re&&(Gn.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),Ye&&(Gn.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),Q?.askUserQuestion?.previewFormat&&(Gn.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=Q.askUserQuestion.previewFormat);let hs={},Ec=new Map;if(Ce)for(let[Ic,Ua]of Object.entries(Ce))Ua.type==="sdk"&&Ua.instance?Ec.set(Ic,Ua.instance):hs[Ic]=Ua;let gs;if($)switch($.type){case"adaptive":gs={type:"adaptive",display:$.display};break;case"enabled":gs={type:"enabled",budgetTokens:$.budgetTokens,display:$.display};break;case"disabled":gs={type:"disabled"};break}else K!==void 0&&(gs=K===0?{type:"disabled"}:{type:"enabled",budgetTokens:K});r&&(Gn.CLAUDE_CONFIG_DIR=r);let Ql=new LI({abortController:f,additionalDirectories:m,agent:v,betas:_,cwd:x,debug:w,debugFile:k,executable:z,executableArgs:L,extraArgs:kr?{...W,workload:kr}:W,pathToClaudeCodeExecutable:p,env:Gn,forkSession:we,stderr:Ir,thinkingConfig:gs,effort:T,maxTurns:se,maxBudgetUsd:ge,taskBudget:mt,model:pr,fallbackModel:R,jsonSchema:cn,permissionMode:F,allowDangerouslySkipPermissions:Y,permissionPromptToolName:ie,continueConversation:b,resume:Kn,resumeSessionAt:Hr,sessionId:Qr,settings:typeof a=="object"?jn(a):a,settingSources:s,allowedTools:h,disallowedTools:E,tools:O,mcpServers:hs,strictMcpConfig:ms,canUseTool:!!y,hooks:!!Ze,includeHookEvents:fe,includePartialMessages:V,persistSession:B,sessionMirror:!!A,plugins:$e,sandbox:o,spawnClaudeCodeProcess:c.spawnClaudeCodeProcess,deferSpawn:n}),rx={systemPrompt:u,appendSystemPrompt:l,excludeDynamicSections:d,agents:g,promptSuggestions:c.promptSuggestions,agentProgressSummaries:c.agentProgressSummaries},tj=new FI(Ql,t,y,Ze,f,Ec,cn,rx,I,Ye);if(A){let Ic=new VI(async(Ua,ch)=>{let nx=Yi(Gn.CLAUDE_CONFIG_DIR??Yi(EI(),".claude"),"projects"),rj=Zfe(Ua,nx);rj&&await A.append(rj,ch)});tj.setTranscriptMirrorBatcher(Ic)}return{queryInstance:tj,transport:Ql,abortController:f,processEnv:Gn}}function uL(e,t,r,n){typeof r=="string"?t.write(jn({type:"user",session_id:"",message:{role:"user",content:[{type:"text",text:r}]},parent_tool_use_id:null})+`
138
+ `):e.streamInput(r).catch(i=>n.abort(i))}async function E3(e){for(let t=0;;t++)try{return await qne(e,{recursive:!0,force:!0})}catch(r){if(t>=4||!Mfe.has(rf(r)??""))return;await Gne((t+1)*100)}}function Lfe(e,t){e.waitForExit().catch(()=>{}).finally(()=>E3(t))}function I3({prompt:e,options:t}){if(t?.resume&&t?.sessionStore){let{queryInstance:a,transport:s,abortController:o,processEnv:c}=cL({...t},typeof e=="string",void 0,!0),u=jv(t.cwd??".");return Dfe(t.sessionStore,t.resume,u,t.env,t.loadTimeoutMs).then(l=>{l&&(s.updateEnv({CLAUDE_CONFIG_DIR:l}),c.CLAUDE_CONFIG_DIR=l,a.addCleanupCallback(()=>Lfe(s,l))),a.isClosed()||s.spawn()}).catch(l=>{let d=KL(l);s.spawnAbort(d),a.setError(d)}),uL(a,s,e,o),a}let{queryInstance:r,transport:n,abortController:i}=cL(t,typeof e=="string");return uL(r,n,e,i),r}function lL(e){return e.map(t=>jn(t)).join(`
139
+ `)+`
140
+ `}function qfe(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="agent_metadata"}function Zfe(e,t){let r=Vne(t,e);if(r.startsWith("..")||_L(r))return null;let n=r.split(bL);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 s=n.slice(2),o=s.length-1;return s[o]=s.at(-1).replace(/\.jsonl$/,""),{projectKey:i,sessionId:a,subpath:s.join("/")}}return null}var Tre,Ore,$I,zre,Cre,jre,Are,dL,pe,Rre,Ko,Dre,Mre,hr,gr,Mv,rM,at,Ct,Vs,Py,Lre,pL,fL,Lv,qre,ra,Zre,Fre,mL,Vre,Ty,Oy,e1,zy,t1,Bre,Wre,Kre,Gre,Hre,Qre,Yre,Jre,Xre,ene,tne,rne,nne,ine,ane,sne,one,cne,r1,une,lne,dne,pne,hL,gL,fne,mne,hne,gne,vne,vL,yne,_ne,bne,xne,wne,kne,Sne,$ne,Ene,Ine,Pne,Tne,One,zne,Cne,Nne,yL,jne,Ane,Rne,Kne,Ms,Jne,Xne,eie,tie,n1,rie,qv,kL,nie,iie,jp,sie,oie,cie,lie,die,pie,iM,mie,SL,gie,vie,yie,_ie,xie,wie,fI,aM,Sie,$ie,Eie,Pie,Tie,Oie,zie,Cie,Nie,jie,Aie,Uie,Mie,$L,qie,nf,Fie,Bie,Wie,Kie,Gie,Qie,Yie,Jie,eae,tae,nae,sM,aae,oae,Cy,uae,lae,pae,mae,gae,yae,_ae,bae,xae,kae,$ae,Ny,Pae,Oae,Cae,jae,EL,Aae,Bs,a1,IL,II,Le,xn,oi,Au,Zv,Fv,Vv,Bv,Wv,Kv,Gv,Hv,Qv,Dae,Mae,PI,oM,qae,PL,Zae,Iu,Fae,Bae,uM,lM,dM,Kae,Qae,pM,fM,ni,ii,Lo,Yv,hM,tse,gM,Uo,Ap,qo,OI,Jp,Jv,hv,Xv,zI,Zo,ey,NL,jL,c1,vM,sse,ose,CI,AL,cse,use,ci,RL,xt,tf,yM,mse,Lr,ty,ry,LL,gse,Pu,vse,yse,FL,_i,As,ku,Rp,gv,Up,Dp,vv,Mp,Ha,Lp,yv,_v,jo,bv,xv,qp,mI,bM,wv,hI,gI,vI,xM,wM,jI,ny,_se,bse,Zp,Su,Ao,Tr,Fp,ri,Ja,Rs,Vp,SM,AI,iy,ay,sy,EM,wse,Fo,oy,sf,qs,cy,bi,Us,$u,Bp,kv,Wp,Kp,Sv,Gp,Qa,Hp,$v,Ev,Ro,Iv,Pv,Qp,yI,TM,_I,bI,xI,wI,OM,zM,RI,uy,of,NM,Sse,ly,Tv,UI,u1,Uv,WL,$se,Ese,yr,Ru,Nu,Eu,Nse,Ase,Z2e,Rse,F2e,Use,V2e,RM,Vse,roe,noe,DI,soe,ooe,MI,coe,YL,JL,loe,Ov,kI,eq,G2e,moe,vr,p1,yoe,dy,MM,LI,qI,ZI,FI,VI,Y2e,Eoe,LM,J2e,X2e,Ooe,e6e,joe,tq,Aoe,Roe,Uoe,n6e,qM,Doe,Loe,Zoe,zt,ZM,_e,Ds,ee,wi,Boe,cf,Woe,WI,wn,De,Xp,An,FM,VM,Uu,py,Se,ki,BM,st,Koe,Goe,Hoe,Qoe,Yoe,Joe,Xoe,ece,tce,SI,rce,nce,ice,ace,sce,oce,rq,cce,Du,uf,lf,df,pf,ff,Mu,Lu,mf,Ls,$a,hf,Zs,ui,qu,Ya,KI,Zu,es,HI,gf,vf,QI,Fu,Vu,Bu,Wu,Vo,ea,Ji,ts,Ku,Gu,yf,fy,my,Hu,i6e,Me,a6e,s6e,o6e,c6e,u6e,l6e,d6e,p6e,f6e,m6e,h6e,g6e,v6e,y6e,_6e,b6e,x6e,w6e,k6e,S6e,$6e,E6e,I6e,P6e,T6e,O6e,z6e,C6e,N6e,j6e,A6e,R6e,U6e,D6e,aq,sq,oq,Fs,hy,_t,h1,lq,Sce,gy,dq,fq,mq,YI,gq,g1,Ef,_1,vy,b1,yy,x1,w1,k1,S1,$1,bq,xq,wq,kq,Sq,$q,Eq,Nce,Iq,Qu,jce,Ace,Rce,Pq,Uce,Dce,Mce,Lce,qce,Oq,zq,Cq,Nq,jq,E1,Aq,Zce,Rq,Uq,Dq,Zq,Fq,Vq,Bq,Wq,Kq,Gq,Hq,Qq,br,Yq,I1,P1,Jq,Xq,eZ,tZ,rZ,nZ,iZ,aZ,sZ,If,oZ,cZ,uZ,lZ,dZ,pZ,fZ,mZ,hZ,_y,gZ,Ge,Pf,tr,vZ,yZ,_Z,bZ,xZ,wZ,kZ,SZ,$Z,EZ,IZ,PZ,TZ,OZ,zZ,CZ,NZ,jZ,AZ,RZ,DZ,MZ,qZ,ZZ,O1,FZ,z1,C1,VZ,BZ,WZ,KZ,GZ,by,HZ,QZ,YZ,N1,j1,A1,JZ,XZ,Dy,eF,tF,rF,nF,iF,aF,R1,sF,oF,cF,uF,lF,dF,pF,fF,U1,mF,hF,gF,vF,yF,D1,Fce,Bce,Kce,Hce,Yce,Xce,tue,rue,nue,iue,sue,cue,lue,pue,mue,gue,yue,bue,wue,Sue,Eue,Pue,Oue,Cue,jue,Rue,Due,Lue,Zue,Vue,Wue,Gue,Que,Jue,ele,rle,nle,ale,ole,ule,dle,fle,bF,xF,xf,Mo,SF,ky,Sf,Rle,Ule,M6e,zu,bP,xP,wP,kP,SP,m9,Dle,Tf,h9,g9,v9,y9,ot,$P,Zy,ar,EP,Sy,Xa,IP,PP,TP,OP,zP,CP,NP,jP,AP,RP,UP,DP,MP,LP,qP,ZP,_9,Fy,rl,Vy,By,FP,b9,x9,w9,k9,S9,$9,E9,BP,I9,Ky,WP,P9,T9,O9,GP,z9,C9,$f,N9,j9,HP,YP,A9,R9,D9,JP,q9,Z9,V9,XP,B9,K9,G9,Q9,Hy,jde,Rde,t3,Vde,Qy,Cr,r3,n3,L6e,Bde,Wde,tT,li,Yy,qr,Si,$i,Zr,Jy,Kde,Gde,i3,sL,a3,q6e,Z6e,s3,Hde,o3,Qde,Of,Ju,c3,Yde,Jde,Xde,epe,tpe,rpe,npe,ipe,ape,spe,u3,ope,cpe,l3,upe,zf,Cf,lpe,Nf,d3,dpe,p3,f3,m3,h3,F6e,g3,v3,y3,V6e,_3,b3,rT,x3,jf,nl,w3,ppe,fpe,mpe,hpe,gpe,nT,vpe,ype,_pe,bpe,xpe,wpe,kpe,Spe,$pe,Epe,Ipe,Ppe,Tpe,Ope,zpe,Cpe,iT,aT,sT,Npe,jpe,Ape,oT,Rpe,Upe,Dpe,Mpe,Lpe,k3,qpe,Zpe,S3,B6e,Fpe,Vpe,Bpe,W6e,$3,Wpe,Kpe,Gpe,Hpe,Qpe,Ype,Jpe,Xpe,efe,Iy,tfe,rfe,nfe,ife,afe,sfe,ofe,cfe,ufe,lfe,dfe,pfe,ffe,mfe,hfe,gfe,vfe,yfe,_fe,bfe,xfe,wfe,kfe,Sfe,$fe,Efe,Ife,Pfe,Tfe,Ofe,zfe,Cfe,Nfe,K6e,G6e,H6e,Q6e,Y6e,J6e,X6e,eMe,tMe,oL,rMe,Mfe,P3=P(()=>{Tre=Object.create,{getPrototypeOf:Ore,defineProperty:$I,getOwnPropertyNames:zre}=Object,Cre=Object.prototype.hasOwnProperty;dL=(e,t,r)=>{var n=e!=null&&typeof e=="object";if(n){var i=t?jre??=new WeakMap:Are??=new WeakMap,a=i.get(e);if(a)return a}r=e!=null?Tre(Ore(e)):{};let s=t||!e||!e.__esModule?$I(r,"default",{value:e,enumerable:!0}):r;for(let o of zre(e))Cre.call(s,o)||$I(s,o,{get:Nre.bind(e,o),enumerable:!0});return n&&i.set(e,s),s},pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rre=e=>e;Ko=(e,t)=>{for(var r in t)$I(e,r,{get:t[r],enumerable:!0,configurable:!0,set:Ure.bind(t,r)})},Dre=Symbol.dispose||Symbol.for("Symbol.dispose"),Mre=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),hr=(e,t,r)=>{if(t!=null){if(typeof t!="object"&&typeof t!="function")throw TypeError('Object expected to be assigned to "using" declaration');var n;if(r&&(n=t[Mre]),n===void 0&&(n=t[Dre]),typeof n!="function")throw TypeError("Object not disposable");e.push([r,n,t])}else r&&e.push([r]);return t},gr=(e,t,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(s,o,c,u){return u=Error(c),u.name="SuppressedError",u.error=s,u.suppressed=o,u},i=s=>t=r?new n(s,t,"An error was suppressed during disposal"):(r=!0,s),a=s=>{for(;s=e.pop();)try{var o=s[1]&&s[1].call(s[2]);if(s[0])return Promise.resolve(o).then(a,c=>(i(c),a()))}catch(c){i(c)}if(r)throw t};return a()},Mv=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(_){if(super(),!e.IDENTIFIER.test(_))throw Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((y,b)=>`${y}${b}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((y,b)=>(b instanceof r&&(y[b.str]=(y[b.str]||0)+1),y),{})}}e._Code=n,e.nil=new n("");function i(h,..._){let y=[h[0]],b=0;for(;b<_.length;)o(y,_[b]),y.push(h[++b]);return new n(y)}e._=i;var a=new n("+");function s(h,..._){let y=[f(h[0])],b=0;for(;b<_.length;)y.push(a),o(y,_[b]),y.push(a,f(h[++b]));return c(y),new n(y)}e.str=s;function o(h,_){_ instanceof n?h.push(..._._items):_ instanceof r?h.push(_):h.push(d(_))}e.addCodeArg=o;function c(h){let _=1;for(;_<h.length-1;){if(h[_]===a){let y=u(h[_-1],h[_+1]);if(y!==void 0){h.splice(_-1,3,y);continue}h[_++]="+"}_++}}function u(h,_){if(_==='""')return h;if(h==='""')return _;if(typeof h=="string")return _ instanceof r||h[h.length-1]!=='"'?void 0:typeof _!="string"?`${h.slice(0,-1)}${_}"`:_[0]==='"'?h.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(h instanceof r))return`"${h}${_.slice(1)}`}function l(h,_){return _.emptyStr()?h:h.emptyStr()?_:s`${h}${_}`}e.strConcat=l;function d(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:f(Array.isArray(h)?h.join(","):h)}function p(h){return new n(f(h))}e.stringify=p;function f(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=f;function m(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new n(`.${h}`):i`[${h}]`}e.getProperty=m;function v(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new n(`${h}`);throw Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=v;function g(h){return new n(h.toString())}e.regexpCode=g}),rM=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Mv();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||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.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}}}e.Scope=i;class a extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=t._`.${new t.Name(l)}[${d}]`}}e.ValueScopeName=a;var s=t._`\n`;class o extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?s:t.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 p=this.toName(u),{prefix:f}=p,m=(d=l.key)!==null&&d!==void 0?d:l.ref,v=this._values[f];if(v){let _=v.get(m);if(_)return _}else v=this._values[f]=new Map;v.set(m,p);let g=this._scope[f]||(this._scope[f]=[]),h=g.length;return g[h]=l.ref,p.setValue(l,{property:f,itemIndex:h}),p}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 t._`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,p=>{if(p.value===void 0)throw Error(`CodeGen: name "${p}" has no value`);return p.value.code},l,d)}_reduceValues(u,l,d={},p){let f=t.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 _=l(h);if(_){let y=this.opts.es5?e.varKinds.var:e.varKinds.const;f=t._`${f}${y} ${h} = ${_};${this.opts._n}`}else if(_=p?.(h))f=t._`${f}${_}${this.opts._n}`;else throw new r(h);g.set(h,n.Completed)})}return f}}e.ValueScope=o}),at=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Mv(),r=rM(),n=Mv();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=rM();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames($,T){return this}}class s extends a{constructor($,T,K){super(),this.varKind=$,this.name=T,this.rhs=K}render({es5:$,_n:T}){let K=$?r.varKinds.var:this.varKind,se=this.rhs===void 0?"":` = ${this.rhs}`;return`${K} ${this.name}${se};`+T}optimizeNames($,T){if($[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,$,T)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends a{constructor($,T,K){super(),this.lhs=$,this.rhs=T,this.sideEffects=K}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,T){if(!(this.lhs instanceof t.Name&&!$[this.lhs.str]&&!this.sideEffects))return this.rhs=R(this.rhs,$,T),this}get names(){let $=this.lhs instanceof t.Name?{}:{...this.lhs.names};return W($,this.rhs)}}class c extends o{constructor($,T,K,se){super($,K,se),this.op=T}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class u extends a{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class l extends a{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class d extends a{constructor($){super(),this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class p extends a{constructor($){super(),this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,T){return this.code=R(this.code,$,T),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends a{constructor($=[]){super(),this.nodes=$}render($){return this.nodes.reduce((T,K)=>T+K.render($),"")}optimizeNodes(){let{nodes:$}=this,T=$.length;for(;T--;){let K=$[T].optimizeNodes();Array.isArray(K)?$.splice(T,1,...K):K?$[T]=K:$.splice(T,1)}return $.length>0?this:void 0}optimizeNames($,T){let{nodes:K}=this,se=K.length;for(;se--;){let ge=K[se];ge.optimizeNames($,T)||(re($,ge.names),K.splice(se,1))}return K.length>0?this:void 0}get names(){return this.nodes.reduce(($,T)=>L($,T.names),{})}}class m extends f{render($){return"{"+$._n+super.render($)+"}"+$._n}}class v extends f{}class g extends m{}g.kind="else";class h extends m{constructor($,T){super(T),this.condition=$}render($){let T=`if(${this.condition})`+super.render($);return this.else&&(T+="else "+this.else.render($)),T}optimizeNodes(){super.optimizeNodes();let $=this.condition;if($===!0)return this.nodes;let T=this.else;if(T){let K=T.optimizeNodes();T=this.else=Array.isArray(K)?new g(K):K}if(T)return $===!1?T instanceof h?T:T.nodes:this.nodes.length?this:new h(Q($),T instanceof h?[T]:T.nodes);if(!($===!1||!this.nodes.length))return this}optimizeNames($,T){var K;if(this.else=(K=this.else)===null||K===void 0?void 0:K.optimizeNames($,T),!!(super.optimizeNames($,T)||this.else))return this.condition=R(this.condition,$,T),this}get names(){let $=super.names;return W($,this.condition),this.else&&L($,this.else.names),$}}h.kind="if";class _ extends m{}_.kind="for";class y extends _{constructor($){super(),this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,T){if(super.optimizeNames($,T))return this.iteration=R(this.iteration,$,T),this}get names(){return L(super.names,this.iteration.names)}}class b extends _{constructor($,T,K,se){super(),this.varKind=$,this.name=T,this.from=K,this.to=se}render($){let T=$.es5?r.varKinds.var:this.varKind,{name:K,from:se,to:ge}=this;return`for(${T} ${K}=${se}; ${K}<${ge}; ${K}++)`+super.render($)}get names(){let $=W(super.names,this.from);return W($,this.to)}}class x extends _{constructor($,T,K,se){super(),this.loop=$,this.varKind=T,this.name=K,this.iterable=se}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,T){if(super.optimizeNames($,T))return this.iterable=R(this.iterable,$,T),this}get names(){return L(super.names,this.iterable.names)}}class w extends m{constructor($,T,K){super(),this.name=$,this.args=T,this.async=K}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}w.kind="func";class k extends f{render($){return"return "+super.render($)}}k.kind="return";class E extends m{render($){let T="try"+super.render($);return this.catch&&(T+=this.catch.render($)),this.finally&&(T+=this.finally.render($)),T}optimizeNodes(){var $,T;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(T=this.finally)===null||T===void 0||T.optimizeNodes(),this}optimizeNames($,T){var K,se;return super.optimizeNames($,T),(K=this.catch)===null||K===void 0||K.optimizeNames($,T),(se=this.finally)===null||se===void 0||se.optimizeNames($,T),this}get names(){let $=super.names;return this.catch&&L($,this.catch.names),this.finally&&L($,this.finally.names),$}}class O extends m{constructor($){super(),this.error=$}render($){return`catch(${this.error})`+super.render($)}}O.kind="catch";class U extends m{render($){return"finally"+super.render($)}}U.kind="finally";class z{constructor($,T={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...T,_n:T.lines?`
141
+ `:""},this._extScope=$,this._scope=new r.Scope({parent:$}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,T){let K=this._extScope.value($,T);return(this._values[K.prefix]||(this._values[K.prefix]=new Set)).add(K),K}getScopeValue($,T){return this._extScope.getValue($,T)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,T,K,se){let ge=this._scope.toName(T);return K!==void 0&&se&&(this._constants[ge.str]=K),this._leafNode(new s($,ge,K)),ge}const($,T,K){return this._def(r.varKinds.const,$,T,K)}let($,T,K){return this._def(r.varKinds.let,$,T,K)}var($,T,K){return this._def(r.varKinds.var,$,T,K)}assign($,T,K){return this._leafNode(new o($,T,K))}add($,T){return this._leafNode(new c($,e.operators.ADD,T))}code($){return typeof $=="function"?$():$!==t.nil&&this._leafNode(new p($)),this}object(...$){let T=["{"];for(let[K,se]of $)T.length>1&&T.push(","),T.push(K),(K!==se||this.opts.es5)&&(T.push(":"),(0,t.addCodeArg)(T,se));return T.push("}"),new t._Code(T)}if($,T,K){if(this._blockNode(new h($)),T&&K)this.code(T).else().code(K).endIf();else if(T)this.code(T).endIf();else if(K)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new h($))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(h,g)}_for($,T){return this._blockNode($),T&&this.code(T).endFor(),this}for($,T){return this._for(new y($),T)}forRange($,T,K,se,ge=this.opts.es5?r.varKinds.var:r.varKinds.let){let mt=this._scope.toName($);return this._for(new b(ge,mt,T,K),()=>se(mt))}forOf($,T,K,se=r.varKinds.const){let ge=this._scope.toName($);if(this.opts.es5){let mt=T instanceof t.Name?T:this.var("_arr",T);return this.forRange("_i",0,t._`${mt}.length`,Ce=>{this.var(ge,t._`${mt}[${Ce}]`),K(ge)})}return this._for(new x("of",se,ge,T),()=>K(ge))}forIn($,T,K,se=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf($,t._`Object.keys(${T})`,K);let ge=this._scope.toName($);return this._for(new x("in",se,ge,T),()=>K(ge))}endFor(){return this._endBlockNode(_)}label($){return this._leafNode(new u($))}break($){return this._leafNode(new l($))}return($){let T=new k;if(this._blockNode(T),this.code($),T.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try($,T,K){if(!T&&!K)throw Error('CodeGen: "try" without "catch" and "finally"');let se=new E;if(this._blockNode(se),this.code($),T){let ge=this.name("e");this._currNode=se.catch=new O(ge),T(ge)}return K&&(this._currNode=se.finally=new U,this.code(K)),this._endBlockNode(O,U)}throw($){return this._leafNode(new d($))}block($,T){return this._blockStarts.push(this._nodes.length),$&&this.code($).endBlock(T),this}endBlock($){let T=this._blockStarts.pop();if(T===void 0)throw Error("CodeGen: not in self-balancing block");let K=this._nodes.length-T;if(K<0||$!==void 0&&K!==$)throw Error(`CodeGen: wrong number of nodes: ${K} vs ${$} expected`);return this._nodes.length=T,this}func($,T=t.nil,K,se){return this._blockNode(new w($,T,K)),se&&this.code(se).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize($=1){for(;$-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,T){let K=this._currNode;if(K instanceof $||T&&K instanceof T)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${T?`${$.kind}/${T.kind}`:$.kind}"`)}_elseNode($){let T=this._currNode;if(!(T instanceof h))throw Error('CodeGen: "else" without "if"');return this._currNode=T.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let T=this._nodes;T[T.length-1]=$}}e.CodeGen=z;function L(A,$){for(let T in $)A[T]=(A[T]||0)+($[T]||0);return A}function W(A,$){return $ instanceof t._CodeOrName?L(A,$.names):A}function R(A,$,T){if(A instanceof t.Name)return K(A);if(!se(A))return A;return new t._Code(A._items.reduce((ge,mt)=>(mt instanceof t.Name&&(mt=K(mt)),mt instanceof t._Code?ge.push(...mt._items):ge.push(mt),ge),[]));function K(ge){let mt=T[ge.str];return mt===void 0||$[ge.str]!==1?ge:(delete $[ge.str],mt)}function se(ge){return ge instanceof t._Code&&ge._items.some(mt=>mt instanceof t.Name&&$[mt.str]===1&&T[mt.str]!==void 0)}}function re(A,$){for(let T in $)A[T]=(A[T]||0)-($[T]||0)}function Q(A){return typeof A=="boolean"||typeof A=="number"||A===null?!A:t._`!${B(A)}`}e.not=Q;var we=I(e.operators.AND);function Ze(...A){return A.reduce(we)}e.and=Ze;var fe=I(e.operators.OR);function V(...A){return A.reduce(fe)}e.or=V;function I(A){return($,T)=>$===t.nil?T:T===t.nil?$:t._`${B($)} ${A} ${B(T)}`}function B(A){return A instanceof t.Name?A:t._`(${A})`}}),Ct=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=at(),r=Mv();function n(w){let k={};for(let E of w)k[E]=!0;return k}e.toHash=n;function i(w,k){return typeof k=="boolean"?k:Object.keys(k).length===0?!0:(a(w,k),!s(k,w.self.RULES.all))}e.alwaysValidSchema=i;function a(w,k=w.schema){let{opts:E,self:O}=w;if(!E.strictSchema||typeof k=="boolean")return;let U=O.RULES.keywords;for(let z in k)U[z]||x(w,`unknown keyword: "${z}"`)}e.checkUnknownRules=a;function s(w,k){if(typeof w=="boolean")return!w;for(let E in w)if(k[E])return!0;return!1}e.schemaHasRules=s;function o(w,k){if(typeof w=="boolean")return!w;for(let E in w)if(E!=="$ref"&&k.all[E])return!0;return!1}e.schemaHasRulesButRef=o;function c({topSchemaRef:w,schemaPath:k},E,O,U){if(!U){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return t._`${E}`}return t._`${w}${k}${(0,t.getProperty)(O)}`}e.schemaRefOrVal=c;function u(w){return p(decodeURIComponent(w))}e.unescapeFragment=u;function l(w){return encodeURIComponent(d(w))}e.escapeFragment=l;function d(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=d;function p(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=p;function f(w,k){if(Array.isArray(w))for(let E of w)k(E);else k(w)}e.eachItem=f;function m({mergeNames:w,mergeToName:k,mergeValues:E,resultToName:O}){return(U,z,L,W)=>{let R=L===void 0?z:L instanceof t.Name?(z instanceof t.Name?w(U,z,L):k(U,z,L),L):z instanceof t.Name?(k(U,L,z),z):E(z,L);return W===t.Name&&!(R instanceof t.Name)?O(U,R):R}}e.mergeEvaluated={props:m({mergeNames:(w,k,E)=>w.if(t._`${E} !== true && ${k} !== undefined`,()=>{w.if(t._`${k} === true`,()=>w.assign(E,!0),()=>w.assign(E,t._`${E} || {}`).code(t._`Object.assign(${E}, ${k})`))}),mergeToName:(w,k,E)=>w.if(t._`${E} !== true`,()=>{k===!0?w.assign(E,!0):(w.assign(E,t._`${E} || {}`),g(w,E,k))}),mergeValues:(w,k)=>w===!0?!0:{...w,...k},resultToName:v}),items:m({mergeNames:(w,k,E)=>w.if(t._`${E} !== true && ${k} !== undefined`,()=>w.assign(E,t._`${k} === true ? true : ${E} > ${k} ? ${E} : ${k}`)),mergeToName:(w,k,E)=>w.if(t._`${E} !== true`,()=>w.assign(E,k===!0?!0:t._`${E} > ${k} ? ${E} : ${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 E=w.var("props",t._`{}`);return k!==void 0&&g(w,E,k),E}e.evaluatedPropsToName=v;function g(w,k,E){Object.keys(E).forEach(O=>w.assign(t._`${k}${(0,t.getProperty)(O)}`,!0))}e.setEvaluated=g;var h={};function _(w,k){return w.scopeValue("func",{ref:k,code:h[k.code]||(h[k.code]=new r._Code(k.code))})}e.useFunc=_;var y;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(y||(e.Type=y={}));function b(w,k,E){if(w instanceof t.Name){let O=k===y.Num;return E?O?t._`"[" + ${w} + "]"`:t._`"['" + ${w} + "']"`:O?t._`"/" + ${w}`:t._`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,t.getProperty)(w).toString():"/"+d(w)}e.getErrorPath=b;function x(w,k,E=w.opts.strictSchema){if(E){if(k=`strict mode: ${k}`,E===!0)throw Error(k);w.self.logger.warn(k)}}e.checkStrictMode=x}),Vs=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};e.default=r}),Py=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=at(),r=Ct(),n=Vs();e.keywordError={message:({keyword:g})=>t.str`must pass "${g}" keyword validation`},e.keyword$DataError={message:({keyword:g,schemaType:h})=>h?t.str`"${g}" keyword must be ${h} ($data)`:t.str`"${g}" keyword is invalid ($data)`};function i(g,h=e.keywordError,_,y){let{it:b}=g,{gen:x,compositeRule:w,allErrors:k}=b,E=d(g,h,_);y??(w||k)?c(x,E):u(b,t._`[${E}]`)}e.reportError=i;function a(g,h=e.keywordError,_){let{it:y}=g,{gen:b,compositeRule:x,allErrors:w}=y,k=d(g,h,_);c(b,k),!(x||w)&&u(y,n.default.vErrors)}e.reportExtraError=a;function s(g,h){g.assign(n.default.errors,h),g.if(t._`${n.default.vErrors} !== null`,()=>g.if(h,()=>g.assign(t._`${n.default.vErrors}.length`,h),()=>g.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function o({gen:g,keyword:h,schemaValue:_,data:y,errsCount:b,it:x}){if(b===void 0)throw Error("ajv implementation error");let w=g.name("err");g.forRange("i",b,n.default.errors,k=>{g.const(w,t._`${n.default.vErrors}[${k}]`),g.if(t._`${w}.instancePath === undefined`,()=>g.assign(t._`${w}.instancePath`,(0,t.strConcat)(n.default.instancePath,x.errorPath))),g.assign(t._`${w}.schemaPath`,t.str`${x.errSchemaPath}/${h}`),x.opts.verbose&&(g.assign(t._`${w}.schema`,_),g.assign(t._`${w}.data`,y))})}e.extendErrors=o;function c(g,h){let _=g.const("err",h);g.if(t._`${n.default.vErrors} === null`,()=>g.assign(n.default.vErrors,t._`[${_}]`),t._`${n.default.vErrors}.push(${_})`),g.code(t._`${n.default.errors}++`)}function u(g,h){let{gen:_,validateName:y,schemaEnv:b}=g;b.$async?_.throw(t._`new ${g.ValidationError}(${h})`):(_.assign(t._`${y}.errors`,h),_.return(!1))}var l={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 d(g,h,_){let{createErrors:y}=g.it;return y===!1?t._`{}`:p(g,h,_)}function p(g,h,_={}){let{gen:y,it:b}=g,x=[f(b,_),m(g,_)];return v(g,h,x),y.object(...x)}function f({errorPath:g},{instancePath:h}){let _=h?t.str`${g}${(0,r.getErrorPath)(h,r.Type.Str)}`:g;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,_)]}function m({keyword:g,it:{errSchemaPath:h}},{schemaPath:_,parentSchema:y}){let b=y?h:t.str`${h}/${g}`;return _&&(b=t.str`${b}${(0,r.getErrorPath)(_,r.Type.Str)}`),[l.schemaPath,b]}function v(g,{params:h,message:_},y){let{keyword:b,data:x,schemaValue:w,it:k}=g,{opts:E,propertyName:O,topSchemaRef:U,schemaPath:z}=k;y.push([l.keyword,b],[l.params,typeof h=="function"?h(g):h||t._`{}`]),E.messages&&y.push([l.message,typeof _=="function"?_(g):_]),E.verbose&&y.push([l.schema,w],[l.parentSchema,t._`${U}${z}`],[n.default.data,x]),O&&y.push([l.propertyName,O])}}),Lre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Py(),r=at(),n=Vs(),i={message:"boolean schema is false"};function a(c){let{gen:u,schema:l,validateName:d}=c;l===!1?o(c,!1):typeof l=="object"&&l.$async===!0?u.return(n.default.data):(u.assign(r._`${d}.errors`,null),u.return(!0))}e.topBoolOrEmptySchema=a;function s(c,u){let{gen:l,schema:d}=c;d===!1?(l.var(u,!1),o(c)):l.var(u,!0)}e.boolOrEmptySchema=s;function o(c,u){let{gen:l,data:d}=c,p={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,t.reportError)(p,i,void 0,u)}}),pL=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=["string","number","integer","boolean","null","object","array"],r=new Set(t);function n(a){return typeof a=="string"&&r.has(a)}e.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:{}}}e.getRules=i}),fL=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:i,self:a},s){let o=a.RULES.types[s];return o&&o!==!0&&r(i,o)}e.schemaHasRulesForType=t;function r(i,a){return a.rules.some(s=>n(i,s))}e.shouldUseGroup=r;function n(i,a){var s;return i[a.keyword]!==void 0||((s=a.definition.implements)===null||s===void 0?void 0:s.some(o=>i[o]!==void 0))}e.shouldUseRule=n}),Lv=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=pL(),r=fL(),n=Py(),i=at(),a=Ct(),s;(function(y){y[y.Correct=0]="Correct",y[y.Wrong=1]="Wrong"})(s||(e.DataType=s={}));function o(y){let b=c(y.type);if(b.includes("null")){if(y.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!b.length&&y.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');y.nullable===!0&&b.push("null")}return b}e.getSchemaTypes=o;function c(y){let b=Array.isArray(y)?y:y?[y]:[];if(b.every(t.isJSONType))return b;throw Error("type must be JSONType or JSONType[]: "+b.join(","))}e.getJSONTypes=c;function u(y,b){let{gen:x,data:w,opts:k}=y,E=d(b,k.coerceTypes),O=b.length>0&&!(E.length===0&&b.length===1&&(0,r.schemaHasRulesForType)(y,b[0]));if(O){let U=v(b,w,k.strictNumbers,s.Wrong);x.if(U,()=>{E.length?p(y,b,E):h(y)})}return O}e.coerceAndCheckDataType=u;var l=new Set(["string","number","integer","boolean","null"]);function d(y,b){return b?y.filter(x=>l.has(x)||b==="array"&&x==="array"):[]}function p(y,b,x){let{gen:w,data:k,opts:E}=y,O=w.let("dataType",i._`typeof ${k}`),U=w.let("coerced",i._`undefined`);E.coerceTypes==="array"&&w.if(i._`${O} == 'object' && Array.isArray(${k}) && ${k}.length == 1`,()=>w.assign(k,i._`${k}[0]`).assign(O,i._`typeof ${k}`).if(v(b,k,E.strictNumbers),()=>w.assign(U,k))),w.if(i._`${U} !== undefined`);for(let L of x)(l.has(L)||L==="array"&&E.coerceTypes==="array")&&z(L);w.else(),h(y),w.endIf(),w.if(i._`${U} !== undefined`,()=>{w.assign(k,U),f(y,U)});function z(L){switch(L){case"string":w.elseIf(i._`${O} == "number" || ${O} == "boolean"`).assign(U,i._`"" + ${k}`).elseIf(i._`${k} === null`).assign(U,i._`""`);return;case"number":w.elseIf(i._`${O} == "boolean" || ${k} === null
142
+ || (${O} == "string" && ${k} && ${k} == +${k})`).assign(U,i._`+${k}`);return;case"integer":w.elseIf(i._`${O} === "boolean" || ${k} === null
143
+ || (${O} === "string" && ${k} && ${k} == +${k} && !(${k} % 1))`).assign(U,i._`+${k}`);return;case"boolean":w.elseIf(i._`${k} === "false" || ${k} === 0 || ${k} === null`).assign(U,!1).elseIf(i._`${k} === "true" || ${k} === 1`).assign(U,!0);return;case"null":w.elseIf(i._`${k} === "" || ${k} === 0 || ${k} === false`),w.assign(U,null);return;case"array":w.elseIf(i._`${O} === "string" || ${O} === "number"
144
+ || ${O} === "boolean" || ${k} === null`).assign(U,i._`[${k}]`)}}}function f({gen:y,parentData:b,parentDataProperty:x},w){y.if(i._`${b} !== undefined`,()=>y.assign(i._`${b}[${x}]`,w))}function m(y,b,x,w=s.Correct){let k=w===s.Correct?i.operators.EQ:i.operators.NEQ,E;switch(y){case"null":return i._`${b} ${k} null`;case"array":E=i._`Array.isArray(${b})`;break;case"object":E=i._`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":E=O(i._`!(${b} % 1) && !isNaN(${b})`);break;case"number":E=O();break;default:return i._`typeof ${b} ${k} ${y}`}return w===s.Correct?E:(0,i.not)(E);function O(U=i.nil){return(0,i.and)(i._`typeof ${b} == "number"`,U,x?i._`isFinite(${b})`:i.nil)}}e.checkDataType=m;function v(y,b,x,w){if(y.length===1)return m(y[0],b,x,w);let k,E=(0,a.toHash)(y);if(E.array&&E.object){let O=i._`typeof ${b} != "object"`;k=E.null?O:i._`!${b} || ${O}`,delete E.null,delete E.array,delete E.object}else k=i.nil;E.number&&delete E.integer;for(let O in E)k=(0,i.and)(k,m(O,b,x,w));return k}e.checkDataTypes=v;var g={message:({schema:y})=>`must be ${y}`,params:({schema:y,schemaValue:b})=>typeof y=="string"?i._`{type: ${y}}`:i._`{type: ${b}}`};function h(y){let b=_(y);(0,n.reportError)(b,g)}e.reportTypeError=h;function _(y){let{gen:b,data:x,schema:w}=y,k=(0,a.schemaRefOrVal)(y,w,"type");return{gen:b,keyword:"type",data:x,schema:w.type,schemaCode:k,schemaValue:k,parentSchema:w,params:{},it:y}}}),qre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=at(),r=Ct();function n(a,s){let{properties:o,items:c}=a.schema;if(s==="object"&&o)for(let u in o)i(a,u,o[u].default);else s==="array"&&Array.isArray(c)&&c.forEach((u,l)=>i(a,l,u.default))}e.assignDefaults=n;function i(a,s,o){let{gen:c,compositeRule:u,data:l,opts:d}=a;if(o===void 0)return;let p=t._`${l}${(0,t.getProperty)(s)}`;if(u){(0,r.checkStrictMode)(a,`default is ignored for: ${p}`);return}let f=t._`${p} === undefined`;d.useDefaults==="empty"&&(f=t._`${f} || ${p} === null || ${p} === ""`),c.if(f,t._`${p} = ${(0,t.stringify)(o)}`)}}),ra=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=at(),r=Ct(),n=Vs(),i=Ct();function a(y,b){let{gen:x,data:w,it:k}=y;x.if(d(x,w,b,k.opts.ownProperties),()=>{y.setParams({missingProperty:t._`${b}`},!0),y.error()})}e.checkReportMissingProp=a;function s({gen:y,data:b,it:{opts:x}},w,k){return(0,t.or)(...w.map(E=>(0,t.and)(d(y,b,E,x.ownProperties),t._`${k} = ${E}`)))}e.checkMissingProp=s;function o(y,b){y.setParams({missingProperty:b},!0),y.error()}e.reportMissingProp=o;function c(y){return y.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:t._`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function u(y,b,x){return t._`${c(y)}.call(${b}, ${x})`}e.isOwnProperty=u;function l(y,b,x,w){let k=t._`${b}${(0,t.getProperty)(x)} !== undefined`;return w?t._`${k} && ${u(y,b,x)}`:k}e.propertyInData=l;function d(y,b,x,w){let k=t._`${b}${(0,t.getProperty)(x)} === undefined`;return w?(0,t.or)(k,(0,t.not)(u(y,b,x))):k}e.noPropertyInData=d;function p(y){return y?Object.keys(y).filter(b=>b!=="__proto__"):[]}e.allSchemaProperties=p;function f(y,b){return p(b).filter(x=>!(0,r.alwaysValidSchema)(y,b[x]))}e.schemaProperties=f;function m({schemaCode:y,data:b,it:{gen:x,topSchemaRef:w,schemaPath:k,errorPath:E},it:O},U,z,L){let W=L?t._`${y}, ${b}, ${w}${k}`:b,R=[[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,E)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&R.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);let re=t._`${W}, ${x.object(...R)}`;return z!==t.nil?t._`${U}.call(${z}, ${re})`:t._`${U}(${re})`}e.callValidateCode=m;var v=t._`new RegExp`;function g({gen:y,it:{opts:b}},x){let w=b.unicodeRegExp?"u":"",{regExp:k}=b.code,E=k(x,w);return y.scopeValue("pattern",{key:E.toString(),ref:E,code:t._`${k.code==="new RegExp"?v:(0,i.useFunc)(y,k)}(${x}, ${w})`})}e.usePattern=g;function h(y){let{gen:b,data:x,keyword:w,it:k}=y,E=b.name("valid");if(k.allErrors){let U=b.let("valid",!0);return O(()=>b.assign(U,!1)),U}return b.var(E,!0),O(()=>b.break()),E;function O(U){let z=b.const("len",t._`${x}.length`);b.forRange("i",0,z,L=>{y.subschema({keyword:w,dataProp:L,dataPropType:r.Type.Num},E),b.if((0,t.not)(E),U)})}}e.validateArray=h;function _(y){let{gen:b,schema:x,keyword:w,it:k}=y;if(!Array.isArray(x))throw Error("ajv implementation error");if(x.some(U=>(0,r.alwaysValidSchema)(k,U))&&!k.opts.unevaluated)return;let E=b.let("valid",!1),O=b.name("_valid");b.block(()=>x.forEach((U,z)=>{let L=y.subschema({keyword:w,schemaProp:z,compositeRule:!0},O);b.assign(E,t._`${E} || ${O}`),!y.mergeValidEvaluated(L,O)&&b.if((0,t.not)(E))})),y.result(E,()=>y.reset(),()=>y.error(!0))}e.validateUnion=_}),Zre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=at(),r=Vs(),n=ra(),i=Py();function a(f,m){let{gen:v,keyword:g,schema:h,parentSchema:_,it:y}=f,b=m.macro.call(y.self,h,_,y),x=l(v,g,b);y.opts.validateSchema!==!1&&y.self.validateSchema(b,!0);let w=v.name("valid");f.subschema({schema:b,schemaPath:t.nil,errSchemaPath:`${y.errSchemaPath}/${g}`,topSchemaRef:x,compositeRule:!0},w),f.pass(w,()=>f.error(!0))}e.macroKeywordCode=a;function s(f,m){var v;let{gen:g,keyword:h,schema:_,parentSchema:y,$data:b,it:x}=f;u(x,m);let w=!b&&m.compile?m.compile.call(x.self,_,y,x):m.validate,k=l(g,h,w),E=g.let("valid");f.block$data(E,O),f.ok((v=m.valid)!==null&&v!==void 0?v:E);function O(){if(m.errors===!1)L(),m.modifying&&o(f),W(()=>f.error());else{let R=m.async?U():z();m.modifying&&o(f),W(()=>c(f,R))}}function U(){let R=g.let("ruleErrs",null);return g.try(()=>L(t._`await `),re=>g.assign(E,!1).if(t._`${re} instanceof ${x.ValidationError}`,()=>g.assign(R,t._`${re}.errors`),()=>g.throw(re))),R}function z(){let R=t._`${k}.errors`;return g.assign(R,null),L(t.nil),R}function L(R=m.async?t._`await `:t.nil){let re=x.opts.passContext?r.default.this:r.default.self,Q=!("compile"in m&&!b||m.schema===!1);g.assign(E,t._`${R}${(0,n.callValidateCode)(f,k,re,Q)}`,m.modifying)}function W(R){var re;g.if((0,t.not)((re=m.valid)!==null&&re!==void 0?re:E),R)}}e.funcKeywordCode=s;function o(f){let{gen:m,data:v,it:g}=f;m.if(g.parentData,()=>m.assign(v,t._`${g.parentData}[${g.parentDataProperty}]`))}function c(f,m){let{gen:v}=f;v.if(t._`Array.isArray(${m})`,()=>{v.assign(r.default.vErrors,t._`${r.default.vErrors} === null ? ${m} : ${r.default.vErrors}.concat(${m})`).assign(r.default.errors,t._`${r.default.vErrors}.length`),(0,i.extendErrors)(f)},()=>f.error())}function u({schemaEnv:f},m){if(m.async&&!f.$async)throw Error("async keyword in sync schema")}function l(f,m,v){if(v===void 0)throw Error(`keyword "${m}" failed to compile`);return f.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,t.stringify)(v)})}function d(f,m,v=!1){return!m.length||m.some(g=>g==="array"?Array.isArray(f):g==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==g||v&&typeof f>"u")}e.validSchemaType=d;function p({schema:f,opts:m,self:v,errSchemaPath:g},h,_){if(Array.isArray(h.keyword)?!h.keyword.includes(_):h.keyword!==_)throw Error("ajv implementation error");let y=h.dependencies;if(y?.some(b=>!Object.prototype.hasOwnProperty.call(f,b)))throw Error(`parent schema must have dependencies of ${_}: ${y.join(",")}`);if(h.validateSchema&&!h.validateSchema(f[_])){let b=`keyword "${_}" value is invalid at path "${g}": `+v.errorsText(h.validateSchema.errors);if(m.validateSchema==="log")v.logger.error(b);else throw Error(b)}}e.validateKeywordUsage=p}),Fre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=at(),r=Ct();function n(s,{keyword:o,schemaProp:c,schema:u,schemaPath:l,errSchemaPath:d,topSchemaRef:p}){if(o!==void 0&&u!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){let f=s.schema[o];return c===void 0?{schema:f,schemaPath:t._`${s.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${o}`}:{schema:f[c],schemaPath:t._`${s.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${o}/${(0,r.escapeFragment)(c)}`}}if(u!==void 0){if(l===void 0||d===void 0||p===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:p,errSchemaPath:d}}throw Error('either "keyword" or "schema" must be passed')}e.getSubschema=n;function i(s,o,{dataProp:c,dataPropType:u,data:l,dataTypes:d,propertyName:p}){if(l!==void 0&&c!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:f}=o;if(c!==void 0){let{errorPath:v,dataPathArr:g,opts:h}=o,_=f.let("data",t._`${o.data}${(0,t.getProperty)(c)}`,!0);m(_),s.errorPath=t.str`${v}${(0,r.getErrorPath)(c,u,h.jsPropertySyntax)}`,s.parentDataProperty=t._`${c}`,s.dataPathArr=[...g,s.parentDataProperty]}if(l!==void 0){let v=l instanceof t.Name?l:f.let("data",l,!0);m(v),p!==void 0&&(s.propertyName=p)}d&&(s.dataTypes=d);function m(v){s.data=v,s.dataLevel=o.dataLevel+1,s.dataTypes=[],o.definedProperties=new Set,s.parentData=o.data,s.dataNames=[...o.dataNames,v]}}e.extendSubschemaData=i;function a(s,{jtdDiscriminator:o,jtdMetadata:c,compositeRule:u,createErrors:l,allErrors:d}){u!==void 0&&(s.compositeRule=u),l!==void 0&&(s.createErrors=l),d!==void 0&&(s.allErrors=d),s.jtdDiscriminator=o,s.jtdMetadata=c}e.extendSubschemaMode=a}),mL=pe((e,t)=>{t.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,s,o;if(Array.isArray(n)){if(a=n.length,a!=i.length)return!1;for(s=a;s--!==0;)if(!r(n[s],i[s]))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(o=Object.keys(n),a=o.length,a!==Object.keys(i).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(i,o[s]))return!1;for(s=a;s--!==0;){var c=o[s];if(!r(n[c],i[c]))return!1}return!0}return n!==n&&i!==i}}),Vre=pe((e,t)=>{var r=t.exports=function(a,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var c=typeof o=="function"?o:o.pre||function(){},u=o.post||function(){};n(s,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,s,o,c,u,l,d,p,f,m){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,u,l,d,p,f,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,s,o,g[h],u+"/"+v+"/"+h,l,u,v,c,h)}else if(v in r.propsKeywords){if(g&&typeof g=="object")for(var _ in g)n(a,s,o,g[_],u+"/"+v+"/"+i(_),l,u,v,c,_)}else(v in r.keywords||a.allKeys&&!(v in r.skipKeywords))&&n(a,s,o,g,u+"/"+v,l,u,v,c)}o(c,u,l,d,p,f,m)}}function i(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}}),Ty=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=Ct(),r=mL(),n=Vre(),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?!o(g):h?c(g)<=h:!1}e.inlineRef=a;var s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(g){for(let h in g){if(s.has(h))return!0;let _=g[h];if(Array.isArray(_)&&_.some(o)||typeof _=="object"&&o(_))return!0}return!1}function c(g){let h=0;for(let _ in g){if(_==="$ref")return 1/0;if(h++,!i.has(_)&&(typeof g[_]=="object"&&(0,t.eachItem)(g[_],y=>h+=c(y)),h===1/0))return 1/0}return h}function u(g,h="",_){_!==!1&&(h=p(h));let y=g.parse(h);return l(g,y)}e.getFullPath=u;function l(g,h){return g.serialize(h).split("#")[0]+"#"}e._getFullPath=l;var d=/#\/?$/;function p(g){return g?g.replace(d,""):""}e.normalizeId=p;function f(g,h,_){return _=p(_),g.resolve(h,_)}e.resolveUrl=f;var m=/^[a-z_][-a-z0-9._]*$/i;function v(g,h){if(typeof g=="boolean")return{};let{schemaId:_,uriResolver:y}=this.opts,b=p(g[_]||h),x={"":b},w=u(y,b,!1),k={},E=new Set;return n(g,{allKeys:!0},(z,L,W,R)=>{if(R===void 0)return;let re=w+L,Q=x[R];typeof z[_]=="string"&&(Q=we.call(this,z[_])),Ze.call(this,z.$anchor),Ze.call(this,z.$dynamicAnchor),x[L]=Q;function we(fe){let V=this.opts.uriResolver.resolve;if(fe=p(Q?V(Q,fe):fe),E.has(fe))throw U(fe);E.add(fe);let I=this.refs[fe];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?O(z,I.schema,fe):fe!==p(re)&&(fe[0]==="#"?(O(z,k[fe],fe),k[fe]=z):this.refs[fe]=re),fe}function Ze(fe){if(typeof fe=="string"){if(!m.test(fe))throw Error(`invalid anchor "${fe}"`);we.call(this,`#${fe}`)}}}),k;function O(z,L,W){if(L!==void 0&&!r(z,L))throw U(W)}function U(z){return Error(`reference "${z}" resolves to more than one schema`)}}e.getSchemaRefs=v}),Oy=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Lre(),r=Lv(),n=fL(),i=Lv(),a=qre(),s=Zre(),o=Fre(),c=at(),u=Vs(),l=Ty(),d=Ct(),p=Py();function f(M){if(w(M)&&(E(M),x(M))){h(M);return}m(M,()=>(0,t.topBoolOrEmptySchema)(M))}e.validateFunctionCode=f;function m({gen:M,validateName:F,schema:Y,schemaEnv:ie,opts:$e},Ye){$e.code.es5?M.func(F,c._`${u.default.data}, ${u.default.valCxt}`,ie.$async,()=>{M.code(c._`"use strict"; ${y(Y,$e)}`),g(M,$e),M.code(Ye)}):M.func(F,c._`${u.default.data}, ${v($e)}`,ie.$async,()=>M.code(y(Y,$e)).code(Ye))}function v(M){return c._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${M.dynamicRef?c._`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function g(M,F){M.if(u.default.valCxt,()=>{M.var(u.default.instancePath,c._`${u.default.valCxt}.${u.default.instancePath}`),M.var(u.default.parentData,c._`${u.default.valCxt}.${u.default.parentData}`),M.var(u.default.parentDataProperty,c._`${u.default.valCxt}.${u.default.parentDataProperty}`),M.var(u.default.rootData,c._`${u.default.valCxt}.${u.default.rootData}`),F.dynamicRef&&M.var(u.default.dynamicAnchors,c._`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{M.var(u.default.instancePath,c._`""`),M.var(u.default.parentData,c._`undefined`),M.var(u.default.parentDataProperty,c._`undefined`),M.var(u.default.rootData,u.default.data),F.dynamicRef&&M.var(u.default.dynamicAnchors,c._`{}`)})}function h(M){let{schema:F,opts:Y,gen:ie}=M;m(M,()=>{Y.$comment&&F.$comment&&R(M),z(M),ie.let(u.default.vErrors,null),ie.let(u.default.errors,0),Y.unevaluated&&_(M),O(M),re(M)})}function _(M){let{gen:F,validateName:Y}=M;M.evaluated=F.const("evaluated",c._`${Y}.evaluated`),F.if(c._`${M.evaluated}.dynamicProps`,()=>F.assign(c._`${M.evaluated}.props`,c._`undefined`)),F.if(c._`${M.evaluated}.dynamicItems`,()=>F.assign(c._`${M.evaluated}.items`,c._`undefined`))}function y(M,F){let Y=typeof M=="object"&&M[F.schemaId];return Y&&(F.code.source||F.code.process)?c._`/*# sourceURL=${Y} */`:c.nil}function b(M,F){if(w(M)&&(E(M),x(M))){k(M,F);return}(0,t.boolOrEmptySchema)(M,F)}function x({schema:M,self:F}){if(typeof M=="boolean")return!M;for(let Y in M)if(F.RULES.all[Y])return!0;return!1}function w(M){return typeof M.schema!="boolean"}function k(M,F){let{schema:Y,gen:ie,opts:$e}=M;$e.$comment&&Y.$comment&&R(M),L(M),W(M);let Ye=ie.const("_errs",u.default.errors);O(M,Ye),ie.var(F,c._`${Ye} === ${u.default.errors}`)}function E(M){(0,d.checkUnknownRules)(M),U(M)}function O(M,F){if(M.opts.jtd)return we(M,[],!1,F);let Y=(0,r.getSchemaTypes)(M.schema),ie=(0,r.coerceAndCheckDataType)(M,Y);we(M,Y,!ie,F)}function U(M){let{schema:F,errSchemaPath:Y,opts:ie,self:$e}=M;F.$ref&&ie.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(F,$e.RULES)&&$e.logger.warn(`$ref: keywords ignored in schema at path "${Y}"`)}function z(M){let{schema:F,opts:Y}=M;F.default!==void 0&&Y.useDefaults&&Y.strictSchema&&(0,d.checkStrictMode)(M,"default is ignored in the schema root")}function L(M){let F=M.schema[M.opts.schemaId];F&&(M.baseId=(0,l.resolveUrl)(M.opts.uriResolver,M.baseId,F))}function W(M){if(M.schema.$async&&!M.schemaEnv.$async)throw Error("async schema in sync schema")}function R({gen:M,schemaEnv:F,schema:Y,errSchemaPath:ie,opts:$e}){let Ye=Y.$comment;if($e.$comment===!0)M.code(c._`${u.default.self}.logger.log(${Ye})`);else if(typeof $e.$comment=="function"){let kr=c.str`${ie}/$comment`,Kn=M.scopeValue("root",{ref:F.root});M.code(c._`${u.default.self}.opts.$comment(${Ye}, ${kr}, ${Kn}.schema)`)}}function re(M){let{gen:F,schemaEnv:Y,validateName:ie,ValidationError:$e,opts:Ye}=M;Y.$async?F.if(c._`${u.default.errors} === 0`,()=>F.return(u.default.data),()=>F.throw(c._`new ${$e}(${u.default.vErrors})`)):(F.assign(c._`${ie}.errors`,u.default.vErrors),Ye.unevaluated&&Q(M),F.return(c._`${u.default.errors} === 0`))}function Q({gen:M,evaluated:F,props:Y,items:ie}){Y instanceof c.Name&&M.assign(c._`${F}.props`,Y),ie instanceof c.Name&&M.assign(c._`${F}.items`,ie)}function we(M,F,Y,ie){let{gen:$e,schema:Ye,data:kr,allErrors:Kn,opts:Hr,self:Qr}=M,{RULES:Ir}=Qr;if(Ye.$ref&&(Hr.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(Ye,Ir))){$e.block(()=>ge(M,"$ref",Ir.all.$ref.definition));return}Hr.jtd||fe(M,F),$e.block(()=>{for(let cn of Ir.rules)ms(cn);ms(Ir.post)});function ms(cn){(0,n.shouldUseGroup)(Ye,cn)&&(cn.type?($e.if((0,i.checkDataType)(cn.type,kr,Hr.strictNumbers)),Ze(M,cn),F.length===1&&F[0]===cn.type&&Y&&($e.else(),(0,i.reportTypeError)(M)),$e.endIf()):Ze(M,cn),Kn||$e.if(c._`${u.default.errors} === ${ie||0}`))}}function Ze(M,F){let{gen:Y,schema:ie,opts:{useDefaults:$e}}=M;$e&&(0,a.assignDefaults)(M,F.type),Y.block(()=>{for(let Ye of F.rules)(0,n.shouldUseRule)(ie,Ye)&&ge(M,Ye.keyword,Ye.definition,F.type)})}function fe(M,F){M.schemaEnv.meta||!M.opts.strictTypes||(V(M,F),!M.opts.allowUnionTypes&&I(M,F),B(M,M.dataTypes))}function V(M,F){if(F.length){if(!M.dataTypes.length){M.dataTypes=F;return}F.forEach(Y=>{$(M.dataTypes,Y)||K(M,`type "${Y}" not allowed by context "${M.dataTypes.join(",")}"`)}),T(M,F)}}function I(M,F){F.length>1&&!(F.length===2&&F.includes("null"))&&K(M,"use allowUnionTypes to allow union type keyword")}function B(M,F){let Y=M.self.RULES.all;for(let ie in Y){let $e=Y[ie];if(typeof $e=="object"&&(0,n.shouldUseRule)(M.schema,$e)){let{type:Ye}=$e.definition;Ye.length&&!Ye.some(kr=>A(F,kr))&&K(M,`missing type "${Ye.join(",")}" for keyword "${ie}"`)}}}function A(M,F){return M.includes(F)||F==="number"&&M.includes("integer")}function $(M,F){return M.includes(F)||F==="integer"&&M.includes("number")}function T(M,F){let Y=[];for(let ie of M.dataTypes)$(F,ie)?Y.push(ie):F.includes("integer")&&ie==="number"&&Y.push("integer");M.dataTypes=Y}function K(M,F){let Y=M.schemaEnv.baseId+M.errSchemaPath;F+=` at "${Y}" (strictTypes)`,(0,d.checkStrictMode)(M,F,M.opts.strictTypes)}class se{constructor(F,Y,ie){if((0,s.validateKeywordUsage)(F,Y,ie),this.gen=F.gen,this.allErrors=F.allErrors,this.keyword=ie,this.data=F.data,this.schema=F.schema[ie],this.$data=Y.$data&&F.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(F,this.schema,ie,this.$data),this.schemaType=Y.schemaType,this.parentSchema=F.schema,this.params={},this.it=F,this.def=Y,this.$data)this.schemaCode=F.gen.const("vSchema",pr(this.$data,F));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,Y.schemaType,Y.allowUndefined))throw Error(`${ie} value must be ${JSON.stringify(Y.schemaType)}`);("code"in Y?Y.trackErrors:Y.errors!==!1)&&(this.errsCount=F.gen.const("_errs",u.default.errors))}result(F,Y,ie){this.failResult((0,c.not)(F),Y,ie)}failResult(F,Y,ie){this.gen.if(F),ie?ie():this.error(),Y?(this.gen.else(),Y(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(F,Y){this.failResult((0,c.not)(F),void 0,Y)}fail(F){if(F===void 0){this.error(),!this.allErrors&&this.gen.if(!1);return}this.gen.if(F),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(F){if(!this.$data)return this.fail(F);let{schemaCode:Y}=this;this.fail(c._`${Y} !== undefined && (${(0,c.or)(this.invalid$data(),F)})`)}error(F,Y,ie){if(Y){this.setParams(Y),this._error(F,ie),this.setParams({});return}this._error(F,ie)}_error(F,Y){(F?p.reportExtraError:p.reportError)(this,this.def.error,Y)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(F){this.allErrors||this.gen.if(F)}setParams(F,Y){Y?Object.assign(this.params,F):this.params=F}block$data(F,Y,ie=c.nil){this.gen.block(()=>{this.check$data(F,ie),Y()})}check$data(F=c.nil,Y=c.nil){if(!this.$data)return;let{gen:ie,schemaCode:$e,schemaType:Ye,def:kr}=this;ie.if((0,c.or)(c._`${$e} === undefined`,Y)),F!==c.nil&&ie.assign(F,!0),(Ye.length||kr.validateSchema)&&(ie.elseIf(this.invalid$data()),this.$dataError(),F!==c.nil&&ie.assign(F,!1)),ie.else()}invalid$data(){let{gen:F,schemaCode:Y,schemaType:ie,def:$e,it:Ye}=this;return(0,c.or)(kr(),Kn());function kr(){if(ie.length){if(!(Y instanceof c.Name))throw Error("ajv implementation error");let Hr=Array.isArray(ie)?ie:[ie];return c._`${(0,i.checkDataTypes)(Hr,Y,Ye.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function Kn(){if($e.validateSchema){let Hr=F.scopeValue("validate$data",{ref:$e.validateSchema});return c._`!${Hr}(${Y})`}return c.nil}}subschema(F,Y){let ie=(0,o.getSubschema)(this.it,F);(0,o.extendSubschemaData)(ie,this.it,F),(0,o.extendSubschemaMode)(ie,F);let $e={...this.it,...ie,items:void 0,props:void 0};return b($e,Y),$e}mergeEvaluated(F,Y){let{it:ie,gen:$e}=this;ie.opts.unevaluated&&(ie.props!==!0&&F.props!==void 0&&(ie.props=d.mergeEvaluated.props($e,F.props,ie.props,Y)),ie.items!==!0&&F.items!==void 0&&(ie.items=d.mergeEvaluated.items($e,F.items,ie.items,Y)))}mergeValidEvaluated(F,Y){let{it:ie,gen:$e}=this;if(ie.opts.unevaluated&&(ie.props!==!0||ie.items!==!0))return $e.if(Y,()=>this.mergeEvaluated(F,c.Name)),!0}}e.KeywordCxt=se;function ge(M,F,Y,ie){let $e=new se(M,Y,F);"code"in Y?Y.code($e,ie):$e.$data&&Y.validate?(0,s.funcKeywordCode)($e,Y):"macro"in Y?(0,s.macroKeywordCode)($e,Y):(Y.compile||Y.validate)&&(0,s.funcKeywordCode)($e,Y)}var mt=/^\/(?:[^~]|~0|~1)*$/,Ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pr(M,{dataLevel:F,dataNames:Y,dataPathArr:ie}){let $e,Ye;if(M==="")return u.default.rootData;if(M[0]==="/"){if(!mt.test(M))throw Error(`Invalid JSON-pointer: ${M}`);$e=M,Ye=u.default.rootData}else{let Qr=Ce.exec(M);if(!Qr)throw Error(`Invalid JSON-pointer: ${M}`);let Ir=+Qr[1];if($e=Qr[2],$e==="#"){if(Ir>=F)throw Error(Hr("property/index",Ir));return ie[F-Ir]}if(Ir>F)throw Error(Hr("data",Ir));if(Ye=Y[F-Ir],!$e)return Ye}let kr=Ye,Kn=$e.split("/");for(let Qr of Kn)Qr&&(Ye=c._`${Ye}${(0,c.getProperty)((0,d.unescapeJsonPointer)(Qr))}`,kr=c._`${kr} && ${Ye}`);return kr;function Hr(Qr,Ir){return`Cannot access ${Qr} ${Ir} levels up, current level is ${F}`}}e.getData=pr}),e1=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});class t extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}e.default=t}),zy=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ty();class r extends Error{constructor(i,a,s,o){super(o||`can't resolve reference ${s} from id ${a}`),this.missingRef=(0,t.resolveUrl)(i,a,s),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(i,this.missingRef))}}e.default=r}),t1=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=at(),r=e1(),n=Vs(),i=Ty(),a=Ct(),s=Oy();class o{constructor(_){var y;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(y=_.baseId)!==null&&y!==void 0?y:(0,i.normalizeId)(b?.[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b?.$async,this.refs={}}}e.SchemaEnv=o;function c(h){let _=d.call(this,h);if(_)return _;let y=(0,i.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:b,lines:x}=this.opts.code,{ownProperties:w}=this.opts,k=new t.CodeGen(this.scope,{es5:b,lines:x,ownProperties:w}),E;h.$async&&(E=k.scopeValue("Error",{ref:r.default,code:t._`require("ajv/dist/runtime/validation_error").default`}));let O=k.scopeName("validate");h.validateName=O;let U={gen:k,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:k.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,t.stringify)(h.schema)}:{ref:h.schema}),validateName:O,ValidationError:E,schema:h.schema,schemaEnv:h,rootId:y,baseId:h.baseId||y,schemaPath:t.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:t._`""`,opts:this.opts,self:this},z;try{this._compilations.add(h),(0,s.validateFunctionCode)(U),k.optimize(this.opts.code.optimize);let L=k.toString();z=`${k.scopeRefs(n.default.scope)}return ${L}`,this.opts.code.process&&(z=this.opts.code.process(z,h));let W=Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(O,{ref:W}),W.errors=null,W.schema=h.schema,W.schemaEnv=h,h.$async&&(W.$async=!0),this.opts.code.source===!0&&(W.source={validateName:O,validateCode:L,scopeValues:k._values}),this.opts.unevaluated){let{props:R,items:re}=U;W.evaluated={props:R instanceof t.Name?void 0:R,items:re instanceof t.Name?void 0:re,dynamicProps:R instanceof t.Name,dynamicItems:re instanceof t.Name},W.source&&(W.source.evaluated=(0,t.stringify)(W.evaluated))}return h.validate=W,h}catch(L){throw delete h.validate,delete h.validateName,z&&this.logger.error("Error compiling schema, function code:",z),L}finally{this._compilations.delete(h)}}e.compileSchema=c;function u(h,_,y){var b;y=(0,i.resolveUrl)(this.opts.uriResolver,_,y);let x=h.refs[y];if(x)return x;let w=f.call(this,h,y);if(w===void 0){let k=(b=h.localRefs)===null||b===void 0?void 0:b[y],{schemaId:E}=this.opts;k&&(w=new o({schema:k,schemaId:E,root:h,baseId:_}))}if(w!==void 0)return h.refs[y]=l.call(this,w)}e.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 _ of this._compilations)if(p(_,h))return _}e.getCompilingSchema=d;function p(h,_){return h.schema===_.schema&&h.root===_.root&&h.baseId===_.baseId}function f(h,_){let y;for(;typeof(y=this.refs[_])=="string";)_=y;return y||this.schemas[_]||m.call(this,h,_)}function m(h,_){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&&b===x)return g.call(this,y,h);let w=(0,i.normalizeId)(b),k=this.refs[w]||this.schemas[w];if(typeof k=="string"){let E=m.call(this,h,k);return typeof E?.schema!="object"?void 0:g.call(this,y,E)}if(typeof k?.schema=="object"){if(k.validate||c.call(this,k),w===(0,i.normalizeId)(_)){let{schema:E}=k,{schemaId:O}=this.opts,U=E[O];return U&&(x=(0,i.resolveUrl)(this.opts.uriResolver,x,U)),new o({schema:E,schemaId:O,root:h,baseId:x})}return g.call(this,y,k)}}e.resolveSchema=m;var v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(h,{baseId:_,schema:y,root:b}){var x;if(((x=h.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(let E of h.fragment.slice(1).split("/")){if(typeof y=="boolean")return;let O=y[(0,a.unescapeFragment)(E)];if(O===void 0)return;y=O;let U=typeof y=="object"&&y[this.opts.schemaId];!v.has(E)&&U&&(_=(0,i.resolveUrl)(this.opts.uriResolver,_,U))}let w;if(typeof y!="boolean"&&y.$ref&&!(0,a.schemaHasRulesButRef)(y,this.RULES)){let E=(0,i.resolveUrl)(this.opts.uriResolver,_,y.$ref);w=m.call(this,b,E)}let{schemaId:k}=this.opts;if(w=w||new o({schema:y,schemaId:k,root:b,baseId:_}),w.schema!==w.root.schema)return w}}),Bre=pe((e,t)=>{t.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}}),Wre=pe((e,t)=>{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};t.exports={HEX:r}}),Kre=pe((e,t)=>{var{HEX:r}=Wre(),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 _=h.match(n)||[],[y]=_;return y?{host:c(y,"."),isIPV4:!0}:{host:h,isIPV4:!1}}function a(h,_=!1){let y="",b=!0;for(let x of h){if(r[x]===void 0)return;x!=="0"&&b===!0&&(b=!1),b||(y+=x)}return _&&y.length===0&&(y="0"),y}function s(h){let _=0,y={error:!1,address:"",zone:""},b=[],x=[],w=!1,k=!1,E=!1;function O(){if(x.length){if(w===!1){let U=a(x);if(U!==void 0)b.push(U);else return y.error=!0,!1}x.length=0}return!0}for(let U=0;U<h.length;U++){let z=h[U];if(!(z==="["||z==="]"))if(z===":"){if(k===!0&&(E=!0),!O())break;if(_++,b.push(":"),_>7){y.error=!0;break}U-1>=0&&h[U-1]===":"&&(k=!0);continue}else if(z==="%"){if(!O())break;w=!0}else{x.push(z);continue}}return x.length&&(w?y.zone=x.join(""):E?b.push(x.join("")):b.push(a(x))),y.address=b.join(""),y}function o(h){if(u(h,":")<2)return{host:h,isIPV6:!1};let _=s(h);if(_.error)return{host:h,isIPV6:!1};{let{address:y,address:b}=_;return _.zone&&(y+="%"+_.zone,b+="%25"+_.zone),{host:y,escapedHost:b,isIPV6:!0}}}function c(h,_){let y="",b=!0,x=h.length;for(let w=0;w<x;w++){let k=h[w];k==="0"&&b?(w+1<=x&&h[w+1]===_||w+1===x)&&(y+=k,b=!1):(k===_?b=!0:b=!1,y+=k)}return y}function u(h,_){let y=0;for(let b=0;b<h.length;b++)h[b]===_&&y++;return y}var l=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,p=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;function m(h){let _=[];for(;h.length;)if(h.match(l))h=h.replace(l,"");else if(h.match(d))h=h.replace(d,"/");else if(h.match(p))h=h.replace(p,"/"),_.pop();else if(h==="."||h==="..")h="";else{let y=h.match(f);if(y){let b=y[0];h=h.slice(b.length),_.push(b)}else throw Error("Unexpected dot segment condition")}return _.join("")}function v(h,_){let y=_!==!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 _=[];if(h.userinfo!==void 0&&(_.push(h.userinfo),_.push("@")),h.host!==void 0){let y=unescape(h.host),b=i(y);if(b.isIPV4)y=b.host;else{let x=o(b.host);x.isIPV6===!0?y=`[${x.escapedHost}]`:y=h.host}_.push(y)}return(typeof h.port=="number"||typeof h.port=="string")&&(_.push(":"),_.push(String(h.port))),_.length?_.join(""):void 0}t.exports={recomposeAuthority:g,normalizeComponentEncoding:v,removeDotSegments:m,normalizeIPv4:i,normalizeIPv6:o,stringArrayToHexStripped:a}}),Gre=pe((e,t)=>{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(b){return typeof b.secure=="boolean"?b.secure:String(b.scheme).toLowerCase()==="wss"}function a(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function s(b){let x=String(b.scheme).toLowerCase()==="https";return(b.port===(x?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function o(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function c(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){let[x,w]=b.resourceName.split("?");b.path=x&&x!=="/"?x:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function u(b,x){if(!b.path)return b.error="URN can not be parsed",b;let w=b.path.match(n);if(w){let k=x.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];let E=`${k}:${x.nid||b.nid}`,O=y[E];b.path=void 0,O&&(b=O.parse(b,x))}else b.error=b.error||"URN can not be parsed.";return b}function l(b,x){let w=x.scheme||b.scheme||"urn",k=b.nid.toLowerCase(),E=`${w}:${x.nid||k}`,O=y[E];O&&(b=O.serialize(b,x));let U=b,z=b.nss;return U.path=`${k||x.nid}:${z}`,x.skipEscape=!0,U}function d(b,x){let w=b;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 p(b){let x=b;return x.nss=(b.uuid||"").toLowerCase(),x}var f={scheme:"http",domainHost:!0,parse:a,serialize:s},m={scheme:"https",domainHost:f.domainHost,parse:a,serialize:s},v={scheme:"ws",domainHost:!0,parse:o,serialize:c},g={scheme:"wss",domainHost:v.domainHost,parse:v.parse,serialize:v.serialize},h={scheme:"urn",parse:u,serialize:l,skipNormalize:!0},_={scheme:"urn:uuid",parse:d,serialize:p,skipNormalize:!0},y={http:f,https:m,ws:v,wss:g,urn:h,"urn:uuid":_};t.exports=y}),Hre=pe((e,t)=>{var{normalizeIPv6:r,normalizeIPv4:n,removeDotSegments:i,recomposeAuthority:a,normalizeComponentEncoding:s}=Kre(),o=Gre();function c(_,y){return typeof _=="string"?_=p(g(_,y),y):typeof _=="object"&&(_=g(p(_,y),y)),_}function u(_,y,b){let x=Object.assign({scheme:"null"},b),w=l(g(_,x),g(y,x),x,!0);return p(w,{...x,skipEscape:!0})}function l(_,y,b,x){let w={};return x||(_=g(p(_,b),b),y=g(p(y,b),b)),b=b||{},!b.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):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?w.path="/"+y.path:_.path?w.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+y.path:w.path=y.path,w.path=i(w.path)),w.query=y.query):(w.path=_.path,y.query!==void 0?w.query=y.query:w.query=_.query),w.userinfo=_.userinfo,w.host=_.host,w.port=_.port),w.scheme=_.scheme),w.fragment=y.fragment,w}function d(_,y,b){return typeof _=="string"?(_=unescape(_),_=p(s(g(_,b),!0),{...b,skipEscape:!0})):typeof _=="object"&&(_=p(s(_,!0),{...b,skipEscape:!0})),typeof y=="string"?(y=unescape(y),y=p(s(g(y,b),!0),{...b,skipEscape:!0})):typeof y=="object"&&(y=p(s(y,!0),{...b,skipEscape:!0})),_.toLowerCase()===y.toLowerCase()}function p(_,y){let b={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},x=Object.assign({},y),w=[],k=o[(x.scheme||b.scheme||"").toLowerCase()];k&&k.serialize&&k.serialize(b,x),b.path!==void 0&&(x.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),x.reference!=="suffix"&&b.scheme&&w.push(b.scheme,":");let E=a(b);if(E!==void 0&&(x.reference!=="suffix"&&w.push("//"),w.push(E),b.path&&b.path.charAt(0)!=="/"&&w.push("/")),b.path!==void 0){let O=b.path;!x.absolutePath&&(!k||!k.absolutePath)&&(O=i(O)),E===void 0&&(O=O.replace(/^\/\//u,"/%2F")),w.push(O)}return b.query!==void 0&&w.push("?",b.query),b.fragment!==void 0&&w.push("#",b.fragment),w.join("")}var f=Array.from({length:127},(_,y)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(y)));function m(_){let y=0;for(let b=0,x=_.length;b<x;++b)if(y=_.charCodeAt(b),y>126||f[y])return!0;return!1}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(_,y){let b=Object.assign({},y),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=_.indexOf("%")!==-1,k=!1;b.reference==="suffix"&&(_=(b.scheme?b.scheme+":":"")+"//"+_);let E=_.match(v);if(E){if(x.scheme=E[1],x.userinfo=E[3],x.host=E[4],x.port=parseInt(E[5],10),x.path=E[6]||"",x.query=E[7],x.fragment=E[8],isNaN(x.port)&&(x.port=E[5]),x.host){let U=n(x.host);if(U.isIPV4===!1){let z=r(U.host);x.host=z.host.toLowerCase(),k=z.isIPV6}else x.host=U.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",b.reference&&b.reference!=="suffix"&&b.reference!==x.reference&&(x.error=x.error||"URI is not a "+b.reference+" reference.");let O=o[(b.scheme||x.scheme||"").toLowerCase()];if(!b.unicodeSupport&&(!O||!O.unicodeSupport)&&x.host&&(b.domainHost||O&&O.domainHost)&&k===!1&&m(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase())}catch(U){x.error=x.error||"Host's domain name can not be converted to ASCII: "+U}(!O||O&&!O.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)))),O&&O.parse&&O.parse(x,b)}else x.error=x.error||"URI can not be parsed.";return x}var h={SCHEMES:o,normalize:c,resolve:u,resolveComponents:l,equal:d,serialize:p,parse:g};t.exports=h,t.exports.default=h,t.exports.fastUri=h}),Qre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Hre();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),Yre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Oy();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=at();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=e1(),i=zy(),a=pL(),s=t1(),o=at(),c=Ty(),u=Lv(),l=Ct(),d=Bre(),p=Qre(),f=(V,I)=>new RegExp(V,I);f.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.'},_=200;function y(V){var I,B,A,$,T,K,se,ge,mt,Ce,pr,M,F,Y,ie,$e,Ye,kr,Kn,Hr,Qr,Ir,ms,cn,Gn;let hs=V.strict,Ec=(I=V.code)===null||I===void 0?void 0:I.optimize,gs=Ec===!0||Ec===void 0?1:Ec||0,Ql=(A=(B=V.code)===null||B===void 0?void 0:B.regExp)!==null&&A!==void 0?A:f,rx=($=V.uriResolver)!==null&&$!==void 0?$:p.default;return{strictSchema:(K=(T=V.strictSchema)!==null&&T!==void 0?T:hs)!==null&&K!==void 0?K:!0,strictNumbers:(ge=(se=V.strictNumbers)!==null&&se!==void 0?se:hs)!==null&&ge!==void 0?ge:!0,strictTypes:(Ce=(mt=V.strictTypes)!==null&&mt!==void 0?mt:hs)!==null&&Ce!==void 0?Ce:"log",strictTuples:(M=(pr=V.strictTuples)!==null&&pr!==void 0?pr:hs)!==null&&M!==void 0?M:"log",strictRequired:(Y=(F=V.strictRequired)!==null&&F!==void 0?F:hs)!==null&&Y!==void 0?Y:!1,code:V.code?{...V.code,optimize:gs,regExp:Ql}:{optimize:gs,regExp:Ql},loopRequired:(ie=V.loopRequired)!==null&&ie!==void 0?ie:_,loopEnum:($e=V.loopEnum)!==null&&$e!==void 0?$e:_,meta:(Ye=V.meta)!==null&&Ye!==void 0?Ye:!0,messages:(kr=V.messages)!==null&&kr!==void 0?kr:!0,inlineRefs:(Kn=V.inlineRefs)!==null&&Kn!==void 0?Kn:!0,schemaId:(Hr=V.schemaId)!==null&&Hr!==void 0?Hr:"$id",addUsedSchema:(Qr=V.addUsedSchema)!==null&&Qr!==void 0?Qr:!0,validateSchema:(Ir=V.validateSchema)!==null&&Ir!==void 0?Ir:!0,validateFormats:(ms=V.validateFormats)!==null&&ms!==void 0?ms:!0,unicodeRegExp:(cn=V.unicodeRegExp)!==null&&cn!==void 0?cn:!0,int32range:(Gn=V.int32range)!==null&&Gn!==void 0?Gn:!0,uriResolver:rx}}class b{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:B,lines:A}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:v,es5:B,lines:A}),this.logger=L(I.logger);let $=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=U.call(this),I.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&O.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),k.call(this),I.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:I,meta:B,schemaId:A}=this.opts,$=d;A==="id"&&($={...d},$.id=$.$id,delete $.$id),B&&I&&this.addMetaSchema($,$[A],!1)}defaultMeta(){let{meta:I,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[B]||I:void 0}validate(I,B){let A;if(typeof I=="string"){if(A=this.getSchema(I),!A)throw Error(`no schema with key or ref "${I}"`)}else A=this.compile(I);let $=A(B);return"$async"in A||(this.errors=A.errors),$}compile(I,B){let A=this._addSchema(I,B);return A.validate||this._compileSchemaEnv(A)}compileAsync(I,B){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:A}=this.opts;return $.call(this,I,B);async function $(Ce,pr){await T.call(this,Ce.$schema);let M=this._addSchema(Ce,pr);return M.validate||K.call(this,M)}async function T(Ce){Ce&&!this.getSchema(Ce)&&await $.call(this,{$ref:Ce},!0)}async function K(Ce){try{return this._compileSchemaEnv(Ce)}catch(pr){if(!(pr instanceof i.default))throw pr;return se.call(this,pr),await ge.call(this,pr.missingSchema),K.call(this,Ce)}}function se({missingSchema:Ce,missingRef:pr}){if(this.refs[Ce])throw Error(`AnySchema ${Ce} is loaded but ${pr} cannot be resolved`)}async function ge(Ce){let pr=await mt.call(this,Ce);this.refs[Ce]||await T.call(this,pr.$schema),this.refs[Ce]||this.addSchema(pr,Ce,B)}async function mt(Ce){let pr=this._loading[Ce];if(pr)return pr;try{return await(this._loading[Ce]=A(Ce))}finally{delete this._loading[Ce]}}}addSchema(I,B,A,$=this.opts.validateSchema){if(Array.isArray(I)){for(let K of I)this.addSchema(K,void 0,A,$);return this}let T;if(typeof I=="object"){let{schemaId:K}=this.opts;if(T=I[K],T!==void 0&&typeof T!="string")throw Error(`schema ${K} must be string`)}return B=(0,c.normalizeId)(B||T),this._checkUnique(B),this.schemas[B]=this._addSchema(I,A,B,$,!0),this}addMetaSchema(I,B,A=this.opts.validateSchema){return this.addSchema(I,B,!0,A),this}validateSchema(I,B){if(typeof I=="boolean")return!0;let A;if(A=I.$schema,A!==void 0&&typeof A!="string")throw Error("$schema must be a string");if(A=A||this.opts.defaultMeta||this.defaultMeta(),!A)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let $=this.validate(A,I);if(!$&&B){let T="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(T);else throw Error(T)}return $}getSchema(I){let B;for(;typeof(B=w.call(this,I))=="string";)I=B;if(B===void 0){let{schemaId:A}=this.opts,$=new s.SchemaEnv({schema:{},schemaId:A});if(B=s.resolveSchema.call(this,$,I),!B)return;this.refs[I]=B}return B.validate||this._compileSchemaEnv(B)}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 B=w.call(this,I);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{let B=I;this._cache.delete(B);let A=I[this.opts.schemaId];return A&&(A=(0,c.normalizeId)(A),delete this.schemas[A],delete this.refs[A]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(let B of I)this.addKeyword(B);return this}addKeyword(I,B){let A;if(typeof I=="string")A=I,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=A);else if(typeof I=="object"&&B===void 0){if(B=I,A=B.keyword,Array.isArray(A)&&!A.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R.call(this,A,B),!B)return(0,l.eachItem)(A,T=>re.call(this,T)),this;we.call(this,B);let $={...B,type:(0,u.getJSONTypes)(B.type),schemaType:(0,u.getJSONTypes)(B.schemaType)};return(0,l.eachItem)(A,$.type.length===0?T=>re.call(this,T,$):T=>$.type.forEach(K=>re.call(this,T,$,K))),this}getKeyword(I){let B=this.RULES.all[I];return typeof B=="object"?B.definition:!!B}removeKeyword(I){let{RULES:B}=this;delete B.keywords[I],delete B.all[I];for(let A of B.rules){let $=A.rules.findIndex(T=>T.keyword===I);$>=0&&A.rules.splice($,1)}return this}addFormat(I,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[I]=B,this}errorsText(I=this.errors,{separator:B=", ",dataVar:A="data"}={}){return!I||I.length===0?"No errors":I.map($=>`${A}${$.instancePath} ${$.message}`).reduce(($,T)=>$+B+T)}$dataMetaSchema(I,B){let A=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(let $ of B){let T=$.split("/").slice(1),K=I;for(let se of T)K=K[se];for(let se in A){let ge=A[se];if(typeof ge!="object")continue;let{$data:mt}=ge.definition,Ce=K[se];mt&&Ce&&(K[se]=fe(Ce))}}return I}_removeAllSchemas(I,B){for(let A in I){let $=I[A];(!B||B.test(A))&&(typeof $=="string"?delete I[A]:$&&!$.meta&&(this._cache.delete($.schema),delete I[A]))}}_addSchema(I,B,A,$=this.opts.validateSchema,T=this.opts.addUsedSchema){let K,{schemaId:se}=this.opts;if(typeof I=="object")K=I[se];else{if(this.opts.jtd)throw Error("schema must be object");if(typeof I!="boolean")throw Error("schema must be object or boolean")}let ge=this._cache.get(I);if(ge!==void 0)return ge;A=(0,c.normalizeId)(K||A);let mt=c.getSchemaRefs.call(this,I,A);return ge=new s.SchemaEnv({schema:I,schemaId:se,meta:B,baseId:A,localRefs:mt}),this._cache.set(ge.schema,ge),T&&!A.startsWith("#")&&(A&&this._checkUnique(A),this.refs[A]=ge),$&&this.validateSchema(I,!0),ge}_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):s.compileSchema.call(this,I),!I.validate)throw Error("ajv implementation error");return I.validate}_compileMetaSchema(I){let B=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,I)}finally{this.opts=B}}}b.ValidationError=n.default,b.MissingRefError=i.default,e.default=b;function x(V,I,B,A="error"){for(let $ in V){let T=$;T in I&&this.logger[A](`${B}: option ${$}. ${V[T]}`)}}function w(V){return V=(0,c.normalizeId)(V),this.schemas[V]||this.refs[V]}function k(){let V=this.opts.schemas;if(V)if(Array.isArray(V))this.addSchema(V);else for(let I in V)this.addSchema(V[I],I)}function E(){for(let V in this.opts.formats){let I=this.opts.formats[V];I&&this.addFormat(V,I)}}function O(V){if(Array.isArray(V)){this.addVocabulary(V);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let I in V){let B=V[I];B.keyword||(B.keyword=I),this.addKeyword(B)}}function U(){let V={...this.opts};for(let I of m)delete V[I];return V}var z={log(){},warn(){},error(){}};function L(V){if(V===!1)return z;if(V===void 0)return console;if(V.log&&V.warn&&V.error)return V;throw Error("logger must implement log, warn and error methods")}var W=/^[a-z_$][a-z0-9_$:-]*$/i;function R(V,I){let{RULES:B}=this;if((0,l.eachItem)(V,A=>{if(B.keywords[A])throw Error(`Keyword ${A} is already defined`);if(!W.test(A))throw Error(`Keyword ${A} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw Error('$data keyword must have "code" or "validate" function')}function re(V,I,B){var A;let $=I?.post;if(B&&$)throw Error('keyword with "post" flag cannot have "type"');let{RULES:T}=this,K=$?T.post:T.rules.find(({type:ge})=>ge===B);if(K||(K={type:B,rules:[]},T.rules.push(K)),T.keywords[V]=!0,!I)return;let se={keyword:V,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?Q.call(this,K,se,I.before):K.rules.push(se),T.all[V]=se,(A=I.implements)===null||A===void 0||A.forEach(ge=>this.addKeyword(ge))}function Q(V,I,B){let A=V.rules.findIndex($=>$.keyword===B);A>=0?V.rules.splice(A,0,I):(V.rules.push(I),this.logger.warn(`rule ${B} is not defined`))}function we(V){let{metaSchema:I}=V;I!==void 0&&(V.$data&&this.opts.$data&&(I=fe(I)),V.validateSchema=this.compile(I,!0))}var Ze={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(V){return{anyOf:[V,Ze]}}}),Jre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t}),Xre=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=zy(),r=ra(),n=at(),i=Vs(),a=t1(),s=Ct(),o={keyword:"$ref",schemaType:"string",code(l){let{gen:d,schema:p,it:f}=l,{baseId:m,schemaEnv:v,validateName:g,opts:h,self:_}=f,{root:y}=v;if((p==="#"||p==="#/")&&m===y.baseId)return x();let b=a.resolveRef.call(_,y,m,p);if(b===void 0)throw new t.default(f.opts.uriResolver,m,p);if(b instanceof a.SchemaEnv)return w(b);return k(b);function x(){if(v===y)return u(l,g,v,v.$async);let E=d.scopeValue("root",{ref:y});return u(l,n._`${E}.validate`,y,y.$async)}function w(E){let O=c(l,E);u(l,O,E,E.$async)}function k(E){let O=d.scopeValue("schema",h.code.source===!0?{ref:E,code:(0,n.stringify)(E)}:{ref:E}),U=d.name("valid"),z=l.subschema({schema:E,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:p},U);l.mergeEvaluated(z),l.ok(U)}}};function c(l,d){let{gen:p}=l;return d.validate?p.scopeValue("validate",{ref:d.validate}):n._`${p.scopeValue("wrapper",{ref:d})}.validate`}e.getValidate=c;function u(l,d,p,f){let{gen:m,it:v}=l,{allErrors:g,schemaEnv:h,opts:_}=v,y=_.passContext?i.default.this:n.nil;f?b():x();function b(){if(!h.$async)throw Error("async schema referenced by sync schema");let E=m.let("valid");m.try(()=>{m.code(n._`await ${(0,r.callValidateCode)(l,d,y)}`),k(d),!g&&m.assign(E,!0)},O=>{m.if(n._`!(${O} instanceof ${v.ValidationError})`,()=>m.throw(O)),w(O),!g&&m.assign(E,!1)}),l.ok(E)}function x(){l.result((0,r.callValidateCode)(l,d,y),()=>k(d),()=>w(d))}function w(E){let O=n._`${E}.errors`;m.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${O} : ${i.default.vErrors}.concat(${O})`),m.assign(i.default.errors,n._`${i.default.vErrors}.length`)}function k(E){var O;if(!v.opts.unevaluated)return;let U=(O=p?.validate)===null||O===void 0?void 0:O.evaluated;if(v.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&(v.props=s.mergeEvaluated.props(m,U.props,v.props));else{let z=m.var("props",n._`${E}.evaluated.props`);v.props=s.mergeEvaluated.props(m,z,v.props,n.Name)}if(v.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&(v.items=s.mergeEvaluated.items(m,U.items,v.items));else{let z=m.var("items",n._`${E}.evaluated.items`);v.items=s.mergeEvaluated.items(m,z,v.items,n.Name)}}}e.callRef=u,e.default=o}),ene=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Jre(),r=Xre(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default];e.default=n}),tne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=t.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:s,schemaCode:o})=>t.str`must be ${n[s].okStr} ${o}`,params:({keyword:s,schemaCode:o})=>t._`{comparison: ${n[s].okStr}, limit: ${o}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(s){let{keyword:o,data:c,schemaCode:u}=s;s.fail$data(t._`${c} ${n[o].fail} ${u} || isNaN(${c})`)}};e.default=a}),rne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r={message:({schemaCode:i})=>t.str`must be multiple of ${i}`,params:({schemaCode:i})=>t._`{multipleOf: ${i}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(i){let{gen:a,data:s,schemaCode:o,it:c}=i,u=c.opts.multipleOfPrecision,l=a.let("res"),d=u?t._`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:t._`${l} !== parseInt(${l})`;i.fail$data(t._`(${o} === 0 || (${l} = ${s}/${o}, ${d}))`)}};e.default=n}),nne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(r){let n=r.length,i=0,a=0,s;for(;a<n;)i++,s=r.charCodeAt(a++),s>=55296&&s<=56319&&a<n&&(s=r.charCodeAt(a),(s&64512)===56320&&a++);return i}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'}),ine=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n=nne(),i={message({keyword:s,schemaCode:o}){let c=s==="maxLength"?"more":"fewer";return t.str`must NOT have ${c} than ${o} characters`},params:({schemaCode:s})=>t._`{limit: ${s}}`},a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:i,code(s){let{keyword:o,data:c,schemaCode:u,it:l}=s,d=o==="maxLength"?t.operators.GT:t.operators.LT,p=l.opts.unicode===!1?t._`${c}.length`:t._`${(0,r.useFunc)(s.gen,n.default)}(${c})`;s.fail$data(t._`${p} ${d} ${u}`)}};e.default=a}),ane=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ra(),r=Ct(),n=at(),i={message:({schemaCode:s})=>n.str`must match pattern "${s}"`,params:({schemaCode:s})=>n._`{pattern: ${s}}`},a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i,code(s){let{gen:o,data:c,$data:u,schema:l,schemaCode:d,it:p}=s,f=p.opts.unicodeRegExp?"u":"";if(u){let{regExp:m}=p.opts.code,v=m.code==="new RegExp"?n._`new RegExp`:(0,r.useFunc)(o,m),g=o.let("valid");o.try(()=>o.assign(g,n._`${v}(${d}, ${f}).test(${c})`),()=>o.assign(g,!1)),s.fail$data(n._`!${g}`)}else{let m=(0,t.usePattern)(s,l);s.fail$data(n._`!${m}.test(${c})`)}}};e.default=a}),sne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r={message({keyword:i,schemaCode:a}){let s=i==="maxProperties"?"more":"fewer";return t.str`must NOT have ${s} than ${a} properties`},params:({schemaCode:i})=>t._`{limit: ${i}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(i){let{keyword:a,data:s,schemaCode:o}=i,c=a==="maxProperties"?t.operators.GT:t.operators.LT;i.fail$data(t._`Object.keys(${s}).length ${c} ${o}`)}};e.default=n}),one=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ra(),r=at(),n=Ct(),i={message:({params:{missingProperty:s}})=>r.str`must have required property '${s}'`,params:({params:{missingProperty:s}})=>r._`{missingProperty: ${s}}`},a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:i,code(s){let{gen:o,schema:c,schemaCode:u,data:l,$data:d,it:p}=s,{opts:f}=p;if(!d&&c.length===0)return;let m=c.length>=f.loopRequired;if(p.allErrors?v():g(),f.strictRequired){let y=s.parentSchema.properties,{definedProperties:b}=s.it;for(let x of c)if(y?.[x]===void 0&&!b.has(x)){let w=p.schemaEnv.baseId+p.errSchemaPath,k=`required property "${x}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(p,k,p.opts.strictRequired)}}function v(){if(m||d)s.block$data(r.nil,h);else for(let y of c)(0,t.checkReportMissingProp)(s,y)}function g(){let y=o.let("missing");if(m||d){let b=o.let("valid",!0);s.block$data(b,()=>_(y,b)),s.ok(b)}else o.if((0,t.checkMissingProp)(s,c,y)),(0,t.reportMissingProp)(s,y),o.else()}function h(){o.forOf("prop",u,y=>{s.setParams({missingProperty:y}),o.if((0,t.noPropertyInData)(o,l,y,f.ownProperties),()=>s.error())})}function _(y,b){s.setParams({missingProperty:y}),o.forOf(y,u,()=>{o.assign(b,(0,t.propertyInData)(o,l,y,f.ownProperties)),o.if((0,r.not)(b),()=>{s.error(),o.break()})},r.nil)}}};e.default=a}),cne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r={message({keyword:i,schemaCode:a}){let s=i==="maxItems"?"more":"fewer";return t.str`must NOT have ${s} than ${a} items`},params:({schemaCode:i})=>t._`{limit: ${i}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(i){let{keyword:a,data:s,schemaCode:o}=i,c=a==="maxItems"?t.operators.GT:t.operators.LT;i.fail$data(t._`${s}.length ${c} ${o}`)}};e.default=n}),r1=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=mL();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),une=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Lv(),r=at(),n=Ct(),i=r1(),a={message:({params:{i:o,j:c}})=>r.str`must NOT have duplicate items (items ## ${c} and ${o} are identical)`,params:({params:{i:o,j:c}})=>r._`{i: ${o}, j: ${c}}`},s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(o){let{gen:c,data:u,$data:l,schema:d,parentSchema:p,schemaCode:f,it:m}=o;if(!l&&!d)return;let v=c.let("valid"),g=p.items?(0,t.getSchemaTypes)(p.items):[];o.block$data(v,h,r._`${f} === false`),o.ok(v);function h(){let x=c.let("i",r._`${u}.length`),w=c.let("j");o.setParams({i:x,j:w}),c.assign(v,!0),c.if(r._`${x} > 1`,()=>(_()?y:b)(x,w))}function _(){return g.length>0&&!g.some(x=>x==="object"||x==="array")}function y(x,w){let k=c.name("item"),E=(0,t.checkDataTypes)(g,k,m.opts.strictNumbers,t.DataType.Wrong),O=c.const("indices",r._`{}`);c.for(r._`;${x}--;`,()=>{c.let(k,r._`${u}[${x}]`),c.if(E,r._`continue`),g.length>1&&c.if(r._`typeof ${k} == "string"`,r._`${k} += "_"`),c.if(r._`typeof ${O}[${k}] == "number"`,()=>{c.assign(w,r._`${O}[${k}]`),o.error(),c.assign(v,!1).break()}).code(r._`${O}[${k}] = ${x}`)})}function b(x,w){let k=(0,n.useFunc)(c,i.default),E=c.name("outer");c.label(E).for(r._`;${x}--;`,()=>c.for(r._`${w} = ${x}; ${w}--;`,()=>c.if(r._`${k}(${u}[${x}], ${u}[${w}])`,()=>{o.error(),c.assign(v,!1).break(E)})))}}};e.default=s}),lne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n=r1(),i={message:"must be equal to constant",params:({schemaCode:s})=>t._`{allowedValue: ${s}}`},a={keyword:"const",$data:!0,error:i,code(s){let{gen:o,data:c,$data:u,schemaCode:l,schema:d}=s;u||d&&typeof d=="object"?s.fail$data(t._`!${(0,r.useFunc)(o,n.default)}(${c}, ${l})`):s.fail(t._`${d} !== ${c}`)}};e.default=a}),dne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n=r1(),i={message:"must be equal to one of the allowed values",params:({schemaCode:s})=>t._`{allowedValues: ${s}}`},a={keyword:"enum",schemaType:"array",$data:!0,error:i,code(s){let{gen:o,data:c,$data:u,schema:l,schemaCode:d,it:p}=s;if(!u&&l.length===0)throw Error("enum must have non-empty array");let f=l.length>=p.opts.loopEnum,m,v=()=>m??(m=(0,r.useFunc)(o,n.default)),g;if(f||u)g=o.let("valid"),s.block$data(g,h);else{if(!Array.isArray(l))throw Error("ajv implementation error");let y=o.const("vSchema",d);g=(0,t.or)(...l.map((b,x)=>_(y,x)))}s.pass(g);function h(){o.assign(g,!1),o.forOf("v",d,y=>o.if(t._`${v()}(${c}, ${y})`,()=>o.assign(g,!0).break()))}function _(y,b){let x=l[b];return typeof x=="object"&&x!==null?t._`${v()}(${c}, ${y}[${b}])`:t._`${c} === ${x}`}}};e.default=a}),pne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=tne(),r=rne(),n=ine(),i=ane(),a=sne(),s=one(),o=cne(),c=une(),u=lne(),l=dne(),d=[t.default,r.default,n.default,i.default,a.default,s.default,o.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];e.default=d}),hL=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=at(),r=Ct(),n={message:({params:{len:s}})=>t.str`must NOT have more than ${s} items`,params:({params:{len:s}})=>t._`{limit: ${s}}`},i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(s){let{parentSchema:o,it:c}=s,{items:u}=o;if(!Array.isArray(u)){(0,r.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(s,u)}};function a(s,o){let{gen:c,schema:u,data:l,keyword:d,it:p}=s;p.items=!0;let f=c.const("len",t._`${l}.length`);if(u===!1)s.setParams({len:o.length}),s.pass(t._`${f} <= ${o.length}`);else if(typeof u=="object"&&!(0,r.alwaysValidSchema)(p,u)){let v=c.var("valid",t._`${f} <= ${o.length}`);c.if((0,t.not)(v),()=>m(v)),s.ok(v)}function m(v){c.forRange("i",o.length,f,g=>{s.subschema({keyword:d,dataProp:g,dataPropType:r.Type.Num},v),!p.allErrors&&c.if((0,t.not)(v),()=>c.break())})}}e.validateAdditionalItems=a,e.default=i}),gL=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=at(),r=Ct(),n=ra(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){let{schema:o,it:c}=s;if(Array.isArray(o))return a(s,"additionalItems",o);c.items=!0,!(0,r.alwaysValidSchema)(c,o)&&s.ok((0,n.validateArray)(s))}};function a(s,o,c=s.schema){let{gen:u,parentSchema:l,data:d,keyword:p,it:f}=s;g(l),f.opts.unevaluated&&c.length&&f.items!==!0&&(f.items=r.mergeEvaluated.items(u,c.length,f.items));let m=u.name("valid"),v=u.const("len",t._`${d}.length`);c.forEach((h,_)=>{(0,r.alwaysValidSchema)(f,h)||(u.if(t._`${v} > ${_}`,()=>s.subschema({keyword:p,schemaProp:_,dataProp:_},m)),s.ok(m))});function g(h){let{opts:_,errSchemaPath:y}=f,b=c.length,x=b===h.minItems&&(b===h.maxItems||h[o]===!1);if(_.strictTuples&&!x){let w=`"${p}" is ${b}-tuple, but minItems or maxItems/${o} are not specified or different at path "${y}"`;(0,r.checkStrictMode)(f,w,_.strictTuples)}}}e.validateTuple=a,e.default=i}),fne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gL(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,t.validateTuple)(n,"items")};e.default=r}),mne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n=ra(),i=hL(),a={message:({params:{len:o}})=>t.str`must NOT have more than ${o} items`,params:({params:{len:o}})=>t._`{limit: ${o}}`},s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:a,code(o){let{schema:c,parentSchema:u,it:l}=o,{prefixItems:d}=u;l.items=!0,!(0,r.alwaysValidSchema)(l,c)&&(d?(0,i.validateAdditionalItems)(o,d):o.ok((0,n.validateArray)(o)))}};e.default=s}),hne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n={message:({params:{min:a,max:s}})=>s===void 0?t.str`must contain at least ${a} valid item(s)`:t.str`must contain at least ${a} and no more than ${s} valid item(s)`,params:({params:{min:a,max:s}})=>s===void 0?t._`{minContains: ${a}}`:t._`{minContains: ${a}, maxContains: ${s}}`},i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(a){let{gen:s,schema:o,parentSchema:c,data:u,it:l}=a,d,p,{minContains:f,maxContains:m}=c;l.opts.next?(d=f===void 0?1:f,p=m):d=1;let v=s.const("len",t._`${u}.length`);if(a.setParams({min:d,max:p}),p===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,r.alwaysValidSchema)(l,o)){let b=t._`${v} >= ${d}`;p!==void 0&&(b=t._`${b} && ${v} <= ${p}`),a.pass(b);return}l.items=!0;let g=s.name("valid");p===void 0&&d===1?_(g,()=>s.if(g,()=>s.break())):d===0?(s.let(g,!0),p!==void 0&&s.if(t._`${u}.length > 0`,h)):(s.let(g,!1),h()),a.result(g,()=>a.reset());function h(){let b=s.name("_valid"),x=s.let("count",0);_(b,()=>s.if(b,()=>y(x)))}function _(b,x){s.forRange("i",0,v,w=>{a.subschema({keyword:"contains",dataProp:w,dataPropType:r.Type.Num,compositeRule:!0},b),x()})}function y(b){s.code(t._`${b}++`),p===void 0?s.if(t._`${b} >= ${d}`,()=>s.assign(g,!0).break()):(s.if(t._`${b} > ${p}`,()=>s.assign(g,!1).break()),d===1?s.assign(g,!0):s.if(t._`${b} >= ${d}`,()=>s.assign(g,!0)))}}};e.default=i}),gne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=at(),r=Ct(),n=ra();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{let d=u===1?"property":"properties";return t.str`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>t._`{property: ${c},
145
+ missingProperty: ${d},
146
+ depsCount: ${u},
147
+ deps: ${l}}`};var i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[u,l]=a(c);s(c,u),o(c,l)}};function a({schema:c}){let u={},l={};for(let d in c){if(d==="__proto__")continue;let p=Array.isArray(c[d])?u:l;p[d]=c[d]}return[u,l]}function s(c,u=c.schema){let{gen:l,data:d,it:p}=c;if(Object.keys(u).length===0)return;let f=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,p.opts.ownProperties);c.setParams({property:m,depsCount:v.length,deps:v.join(", ")}),p.allErrors?l.if(g,()=>{for(let h of v)(0,n.checkReportMissingProp)(c,h)}):(l.if(t._`${g} && (${(0,n.checkMissingProp)(c,v,f)})`),(0,n.reportMissingProp)(c,f),l.else())}}e.validatePropertyDeps=s;function o(c,u=c.schema){let{gen:l,data:d,keyword:p,it:f}=c,m=l.name("valid");for(let v in u)(0,r.alwaysValidSchema)(f,u[v])||(l.if((0,n.propertyInData)(l,d,v,f.opts.ownProperties),()=>{let g=c.subschema({keyword:p,schemaProp:v},m);c.mergeValidEvaluated(g,m)},()=>l.var(m,!0)),c.ok(m))}e.validateSchemaDeps=o,e.default=i}),vne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n={message:"property name must be valid",params:({params:a})=>t._`{propertyName: ${a.propertyName}}`},i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(a){let{gen:s,schema:o,data:c,it:u}=a;if((0,r.alwaysValidSchema)(u,o))return;let l=s.name("valid");s.forIn("key",c,d=>{a.setParams({propertyName:d}),a.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),s.if((0,t.not)(l),()=>{a.error(!0),!u.allErrors&&s.break()})}),a.ok(l)}};e.default=i}),vL=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ra(),r=at(),n=Vs(),i=Ct(),a={message:"must NOT have additional properties",params:({params:o})=>r._`{additionalProperty: ${o.additionalProperty}}`},s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:a,code(o){let{gen:c,schema:u,parentSchema:l,data:d,errsCount:p,it:f}=o;if(!p)throw Error("ajv implementation error");let{allErrors:m,opts:v}=f;if(f.props=!0,v.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(f,u))return;let g=(0,t.allSchemaProperties)(l.properties),h=(0,t.allSchemaProperties)(l.patternProperties);_(),o.ok(r._`${p} === ${n.default.errors}`);function _(){c.forIn("key",d,k=>{!g.length&&!h.length?x(k):c.if(y(k),()=>x(k))})}function y(k){let E;if(g.length>8){let O=(0,i.schemaRefOrVal)(f,l.properties,"properties");E=(0,t.isOwnProperty)(c,O,k)}else g.length?E=(0,r.or)(...g.map(O=>r._`${k} === ${O}`)):E=r.nil;return h.length&&(E=(0,r.or)(E,...h.map(O=>r._`${(0,t.usePattern)(o,O)}.test(${k})`))),(0,r.not)(E)}function b(k){c.code(r._`delete ${d}[${k}]`)}function x(k){if(v.removeAdditional==="all"||v.removeAdditional&&u===!1){b(k);return}if(u===!1){o.setParams({additionalProperty:k}),o.error(),!m&&c.break();return}if(typeof u=="object"&&!(0,i.alwaysValidSchema)(f,u)){let E=c.name("valid");v.removeAdditional==="failing"?(w(k,E,!1),c.if((0,r.not)(E),()=>{o.reset(),b(k)})):(w(k,E),!m&&c.if((0,r.not)(E),()=>c.break()))}}function w(k,E,O){let U={keyword:"additionalProperties",dataProp:k,dataPropType:i.Type.Str};O===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(U,E)}}};e.default=s}),yne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Oy(),r=ra(),n=Ct(),i=vL(),a={keyword:"properties",type:"object",schemaType:"object",code(s){let{gen:o,schema:c,parentSchema:u,data:l,it:d}=s;d.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(d,i.default,"additionalProperties"));let p=(0,r.allSchemaProperties)(c);for(let h of p)d.definedProperties.add(h);d.opts.unevaluated&&p.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(o,(0,n.toHash)(p),d.props));let f=p.filter(h=>!(0,n.alwaysValidSchema)(d,c[h]));if(f.length===0)return;let m=o.name("valid");for(let h of f)v(h)?g(h):(o.if((0,r.propertyInData)(o,l,h,d.opts.ownProperties)),g(h),!d.allErrors&&o.else().var(m,!0),o.endIf()),s.it.definedProperties.add(h),s.ok(m);function v(h){return d.opts.useDefaults&&!d.compositeRule&&c[h].default!==void 0}function g(h){s.subschema({keyword:"properties",schemaProp:h,dataProp:h},m)}}};e.default=a}),_ne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ra(),r=at(),n=Ct(),i=Ct(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(s){let{gen:o,schema:c,data:u,parentSchema:l,it:d}=s,{opts:p}=d,f=(0,t.allSchemaProperties)(c),m=f.filter(x=>(0,n.alwaysValidSchema)(d,c[x]));if(f.length===0||m.length===f.length&&(!d.opts.unevaluated||d.props===!0))return;let v=p.strictSchema&&!p.allowMatchingProperties&&l.properties,g=o.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,i.evaluatedPropsToName)(o,d.props));let{props:h}=d;_();function _(){for(let x of f)v&&y(x),d.allErrors?b(x):(o.var(g,!0),b(x),o.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 b(x){o.forIn("key",u,w=>{o.if(r._`${(0,t.usePattern)(s,x)}.test(${w})`,()=>{let k=m.includes(x);k||s.subschema({keyword:"patternProperties",schemaProp:x,dataProp:w,dataPropType:i.Type.Str},g),d.opts.unevaluated&&h!==!0?o.assign(r._`${h}[${w}]`,!0):!k&&!d.allErrors&&o.if((0,r.not)(g),()=>o.break())})})}}};e.default=a}),bne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ct(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){let{gen:i,schema:a,it:s}=n;if((0,t.alwaysValidSchema)(s,a)){n.fail();return}let o=i.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),n.failResult(o,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};e.default=r}),xne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ra(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:t.validateUnion,error:{message:"must match a schema in anyOf"}};e.default=r}),wne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n={message:"must match exactly one schema in oneOf",params:({params:a})=>t._`{passingSchemas: ${a.passing}}`},i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(a){let{gen:s,schema:o,parentSchema:c,it:u}=a;if(!Array.isArray(o))throw Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;let l=o,d=s.let("valid",!1),p=s.let("passing",null),f=s.name("_valid");a.setParams({passing:p}),s.block(m),a.result(d,()=>a.reset(),()=>a.error(!0));function m(){l.forEach((v,g)=>{let h;(0,r.alwaysValidSchema)(u,v)?s.var(f,!0):h=a.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},f),g>0&&s.if(t._`${f} && ${d}`).assign(d,!1).assign(p,t._`[${p}, ${g}]`).else(),s.if(f,()=>{s.assign(d,!0),s.assign(p,g),h&&a.mergeEvaluated(h,t.Name)})})}}};e.default=i}),kne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ct(),r={keyword:"allOf",schemaType:"array",code(n){let{gen:i,schema:a,it:s}=n;if(!Array.isArray(a))throw Error("ajv implementation error");let o=i.name("valid");a.forEach((c,u)=>{if((0,t.alwaysValidSchema)(s,c))return;let l=n.subschema({keyword:"allOf",schemaProp:u},o);n.ok(o),n.mergeEvaluated(l)})}};e.default=r}),Sne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=Ct(),n={message:({params:s})=>t.str`must match "${s.ifClause}" schema`,params:({params:s})=>t._`{failingKeyword: ${s.ifClause}}`},i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(s){let{gen:o,parentSchema:c,it:u}=s;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 p=o.let("valid",!0),f=o.name("_valid");if(m(),s.reset(),l&&d){let g=o.let("ifClause");s.setParams({ifClause:g}),o.if(f,v("then",g),v("else",g))}else l?o.if(f,v("then")):o.if((0,t.not)(f),v("else"));s.pass(p,()=>s.error(!0));function m(){let g=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);s.mergeEvaluated(g)}function v(g,h){return()=>{let _=s.subschema({keyword:g},f);o.assign(p,f),s.mergeValidEvaluated(_,p),h?o.assign(h,t._`${g}`):s.setParams({ifClause:g})}}}};function a(s,o){let c=s.schema[o];return c!==void 0&&!(0,r.alwaysValidSchema)(s,c)}e.default=i}),$ne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ct(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:a}){i.if===void 0&&(0,t.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};e.default=r}),Ene=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=hL(),r=fne(),n=gL(),i=mne(),a=hne(),s=gne(),o=vne(),c=vL(),u=yne(),l=_ne(),d=bne(),p=xne(),f=wne(),m=kne(),v=Sne(),g=$ne();function h(_=!1){let y=[d.default,p.default,f.default,m.default,v.default,g.default,o.default,c.default,s.default,u.default,l.default];return _?y.push(r.default,i.default):y.push(t.default,n.default),y.push(a.default),y}e.default=h}),Ine=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r={message:({schemaCode:i})=>t.str`must match format "${i}"`,params:({schemaCode:i})=>t._`{format: ${i}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(i,a){let{gen:s,data:o,$data:c,schema:u,schemaCode:l,it:d}=i,{opts:p,errSchemaPath:f,schemaEnv:m,self:v}=d;if(!p.validateFormats)return;c?g():h();function g(){let _=s.scopeValue("formats",{ref:v.formats,code:p.code.formats}),y=s.const("fDef",t._`${_}[${l}]`),b=s.let("fType"),x=s.let("format");s.if(t._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>s.assign(b,t._`${y}.type || "string"`).assign(x,t._`${y}.validate`),()=>s.assign(b,t._`"string"`).assign(x,y)),i.fail$data((0,t.or)(w(),k()));function w(){return p.strictSchema===!1?t.nil:t._`${l} && !${x}`}function k(){let E=m.$async?t._`(${y}.async ? await ${x}(${o}) : ${x}(${o}))`:t._`${x}(${o})`,O=t._`(typeof ${x} == "function" ? ${E} : ${x}.test(${o}))`;return t._`${x} && ${x} !== true && ${b} === ${a} && !${O}`}}function h(){let _=v.formats[u];if(!_){w();return}if(_===!0)return;let[y,b,x]=k(_);y===a&&i.pass(E());function w(){if(p.strictSchema===!1){v.logger.warn(O());return}throw Error(O());function O(){return`unknown format "${u}" ignored in schema at path "${f}"`}}function k(O){let U=O instanceof RegExp?(0,t.regexpCode)(O):p.code.formats?t._`${p.code.formats}${(0,t.getProperty)(u)}`:void 0,z=s.scopeValue("formats",{key:u,ref:O,code:U});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,t._`${z}.validate`]:["string",O,z]}function E(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!m.$async)throw Error("async format in sync schema");return t._`await ${x}(${o})`}return typeof b=="function"?t._`${x}(${o})`:t._`${x}.test(${o})`}}}};e.default=n}),Pne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ine(),r=[t.default];e.default=r}),Tne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),One=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ene(),r=pne(),n=Ene(),i=Pne(),a=Tne(),s=[t.default,r.default,(0,n.default)(),i.default,a.metadataVocabulary,a.contentVocabulary];e.default=s}),zne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(r){r.Tag="tag",r.Mapping="mapping"})(t||(e.DiscrError=t={}))}),Cne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=at(),r=zne(),n=t1(),i=zy(),a=Ct(),s={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}})=>t._`{error: ${c}, tag: ${l}, tagValue: ${u}}`},o={keyword:"discriminator",type:"object",schemaType:"object",error:s,code(c){let{gen:u,data:l,schema:d,parentSchema:p,it:f}=c,{oneOf:m}=p;if(!f.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",t._`${l}${(0,t.getProperty)(v)}`);u.if(t._`typeof ${h} == "string"`,()=>_(),()=>c.error(!1,{discrError:r.DiscrError.Tag,tag:h,tagName:v})),c.ok(g);function _(){let x=b();u.if(!1);for(let w in x)u.elseIf(t._`${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,t.Name),w}function b(){var x;let w={},k=O(p),E=!0;for(let L=0;L<m.length;L++){let W=m[L];if(W?.$ref&&!(0,a.schemaHasRulesButRef)(W,f.self.RULES)){let re=W.$ref;if(W=n.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,re),W instanceof n.SchemaEnv&&(W=W.schema),W===void 0)throw new i.default(f.opts.uriResolver,f.baseId,re)}let R=(x=W?.properties)===null||x===void 0?void 0:x[v];if(typeof R!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);E=E&&(k||O(W)),U(R,L)}if(!E)throw Error(`discriminator: "${v}" must be required`);return w;function O({required:L}){return Array.isArray(L)&&L.includes(v)}function U(L,W){if(L.const)z(L.const,W);else if(L.enum)for(let R of L.enum)z(R,W);else throw Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function z(L,W){if(typeof L!="string"||L in w)throw Error(`discriminator: "${v}" values must be unique strings`);w[L]=W}}}};e.default=o}),Nne=pe((e,t)=>{t.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}}),yL=pe((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var r=Yre(),n=One(),i=Cne(),a=Nne(),s=["/properties"],o="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,s):a;this.addMetaSchema(m,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Oy();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=at();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=e1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=zy();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),jne=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(z,L){return{validate:z,compare:L}}e.fullFormats={date:t(a,s),time:t(c(!0),u),"date-time":t(p(!0),f),"iso-time":t(c(),l),"iso-date-time":t(p(),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:U,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:E},double:{type:"number",validate:E},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":t(/^\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,f),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\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},e.formatNames=Object.keys(e.fullFormats);function r(z){return z%4===0&&(z%100!==0||z%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(z){let L=n.exec(z);if(!L)return!1;let W=+L[1],R=+L[2],re=+L[3];return R>=1&&R<=12&&re>=1&&re<=(R===2&&r(W)?29:i[R])}function s(z,L){if(z&&L)return z>L?1:z<L?-1:0}var o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(z){return function(L){let W=o.exec(L);if(!W)return!1;let R=+W[1],re=+W[2],Q=+W[3],we=W[4],Ze=W[5]==="-"?-1:1,fe=+(W[6]||0),V=+(W[7]||0);if(fe>23||V>59||z&&!we)return!1;if(R<=23&&re<=59&&Q<60)return!0;let I=re-V*Ze,B=R-fe*Ze-(I<0?1:0);return(B===23||B===-1)&&(I===59||I===-1)&&Q<61}}function u(z,L){if(!(z&&L))return;let W=new Date("2020-01-01T"+z).valueOf(),R=new Date("2020-01-01T"+L).valueOf();if(W&&R)return W-R}function l(z,L){if(!(z&&L))return;let W=o.exec(z),R=o.exec(L);if(W&&R)return z=W[1]+W[2]+W[3],L=R[1]+R[2]+R[3],z>L?1:z<L?-1:0}var d=/t|\s/i;function p(z){let L=c(z);return function(W){let R=W.split(d);return R.length===2&&a(R[0])&&L(R[1])}}function f(z,L){if(!(z&&L))return;let W=new Date(z).valueOf(),R=new Date(L).valueOf();if(W&&R)return W-R}function m(z,L){if(!(z&&L))return;let[W,R]=z.split(d),[re,Q]=L.split(d),we=s(W,re);if(we!==void 0)return we||u(R,Q)}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(z){return v.test(z)&&g.test(z)}var _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(z){return _.lastIndex=0,_.test(z)}var b=-2147483648,x=2147483647;function w(z){return Number.isInteger(z)&&z<=x&&z>=b}function k(z){return Number.isInteger(z)}function E(){return!0}var O=/[^\\]\\Z/;function U(z){if(O.test(z))return!1;try{return new RegExp(z),!0}catch{return!1}}}),Ane=pe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=yL(),r=at(),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:o,schemaCode:c})=>r.str`should be ${i[o].okStr} ${c}`,params:({keyword:o,schemaCode:c})=>r._`{comparison: ${i[o].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(o){let{gen:c,data:u,schemaCode:l,keyword:d,it:p}=o,{opts:f,self:m}=p;if(!f.validateFormats)return;let v=new t.KeywordCxt(p,m.RULES.all.format.definition,"format");v.$data?g():h();function g(){let y=c.scopeValue("formats",{ref:m.formats,code:f.code.formats}),b=c.const("fmt",r._`${y}[${v.schemaCode}]`);o.fail$data((0,r.or)(r._`typeof ${b} != "object"`,r._`${b} instanceof RegExp`,r._`typeof ${b}.compare != "function"`,_(b)))}function h(){let y=v.schema,b=m.formats[y];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw Error(`"${d}": format "${y}" does not define "compare" function`);let x=c.scopeValue("formats",{key:y,ref:b,code:f.code.formats?r._`${f.code.formats}${(0,r.getProperty)(y)}`:void 0});o.fail$data(_(x))}function _(y){return r._`${y}.compare(${u}, ${l}) ${i[d].fail} 0`}},dependencies:["format"]};var s=o=>(o.addKeyword(e.formatLimitDefinition),o);e.default=s}),Rne=pe((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=jne(),n=Ane(),i=at(),a=new i.Name("fullFormats"),s=new i.Name("fastFormats"),o=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,a),u;let[d,p]=l.mode==="fast"?[r.fastFormats,s]:[r.fullFormats,a],f=l.formats||r.formatNames;return c(u,f,d,p),l.keywords&&(0,n.default)(u),u};o.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,p){var f,m;(f=(m=u.opts.code).formats)!==null&&f!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${p}`);for(let v of l)u.addFormat(v,d[v])}t.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}),Kne=50;Ms=class extends Error{};Jne=typeof global=="object"&&global&&global.Object===Object&&global,Xne=Jne,eie=typeof self=="object"&&self&&self.Object===Object&&self,tie=Xne||eie||Function("return this")(),n1=tie,rie=n1.Symbol,qv=rie,kL=Object.prototype,nie=kL.hasOwnProperty,iie=kL.toString,jp=qv?qv.toStringTag:void 0;sie=aie,oie=Object.prototype,cie=oie.toString;lie=uie,die="[object Null]",pie="[object Undefined]",iM=qv?qv.toStringTag:void 0;mie=fie;SL=hie,gie="[object AsyncFunction]",vie="[object Function]",yie="[object GeneratorFunction]",_ie="[object Proxy]";xie=bie,wie=n1["__core-js_shared__"],fI=wie,aM=(function(){var e=/[^.]+$/.exec(fI&&fI.keys&&fI.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();Sie=kie,$ie=Function.prototype,Eie=$ie.toString;Pie=Iie,Tie=/[\\^$.*+?()[\]{}|]/g,Oie=/^\[object .+?Constructor\]$/,zie=Function.prototype,Cie=Object.prototype,Nie=zie.toString,jie=Cie.hasOwnProperty,Aie=RegExp("^"+Nie.call(jie).replace(Tie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Uie=Rie;Mie=Die;$L=Lie,qie=$L(Object,"create"),nf=qie;Fie=Zie;Bie=Vie,Wie="__lodash_hash_undefined__",Kie=Object.prototype,Gie=Kie.hasOwnProperty;Qie=Hie,Yie=Object.prototype,Jie=Yie.hasOwnProperty;eae=Xie,tae="__lodash_hash_undefined__";nae=rae;Xu.prototype.clear=Fie;Xu.prototype.delete=Bie;Xu.prototype.get=Qie;Xu.prototype.has=eae;Xu.prototype.set=nae;sM=Xu;aae=iae;oae=sae;Cy=cae,uae=Array.prototype,lae=uae.splice;pae=dae;mae=fae;gae=hae;yae=vae;el.prototype.clear=aae;el.prototype.delete=pae;el.prototype.get=mae;el.prototype.has=gae;el.prototype.set=yae;_ae=el,bae=$L(n1,"Map"),xae=bae;kae=wae;$ae=Sae;Ny=Eae;Pae=Iae;Oae=Tae;Cae=zae;jae=Nae;tl.prototype.clear=kae;tl.prototype.delete=Pae;tl.prototype.get=Oae;tl.prototype.has=Cae;tl.prototype.set=jae;EL=tl,Aae="Expected a function";i1.Cache=EL;Bs=i1,a1=Bs(()=>(process.env.CLAUDE_CONFIG_DIR??Uae(Rae(),".claude")).normalize("NFC"),()=>process.env.CLAUDE_CONFIG_DIR);IL=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return IL=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),r=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))};II=e=>{if(e instanceof Error)return e;if(typeof e=="object"&&e!==null){try{if(Object.prototype.toString.call(e)==="[object Error]"){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)},Le=class extends Error{},xn=class e extends Le{constructor(t,r,n,i,a){super(`${e.makeMessage(t,r,n)}`),this.status=t,this.headers=i,this.requestID=i?.get("request-id"),this.error=r,this.type=a??null}static makeMessage(t,r,n){let i=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return t&&i?`${t} ${i}`:t?`${t} status code (no body)`:i||"(no status code or body)"}static generate(t,r,n,i){if(!t||!i)return new Au({message:n,cause:II(r)});let a=r,s=a?.error?.type;return t===400?new Fv(t,a,n,i,s):t===401?new Vv(t,a,n,i,s):t===403?new Bv(t,a,n,i,s):t===404?new Wv(t,a,n,i,s):t===409?new Kv(t,a,n,i,s):t===422?new Gv(t,a,n,i,s):t===429?new Hv(t,a,n,i,s):t>=500?new Qv(t,a,n,i,s):new e(t,a,n,i,s)}},oi=class extends xn{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0)}},Au=class extends xn{constructor({message:t,cause:r}){super(void 0,void 0,t||"Connection error.",void 0),r&&(this.cause=r)}},Zv=class extends Au{constructor({message:t}={}){super({message:t??"Request timed out."})}},Fv=class extends xn{},Vv=class extends xn{},Bv=class extends xn{},Wv=class extends xn{},Kv=class extends xn{},Gv=class extends xn{},Hv=class extends xn{},Qv=class extends xn{},Dae=/^[a-z][a-z0-9+.-]*:/i,Mae=e=>Dae.test(e),PI=e=>(PI=Array.isArray,PI(e)),oM=PI;qae=(e,t)=>{if(typeof t!="number"||!Number.isInteger(t))throw new Le(`${e} must be an integer`);if(t<0)throw new Le(`${e} must be a positive integer`);return t},PL=e=>{try{return JSON.parse(e)}catch{return}},Zae=e=>new Promise(t=>setTimeout(t,e)),Iu="0.81.0",Fae=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";Bae=()=>{let e=Vae();if(e==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Iu,"X-Stainless-OS":lM(Deno.build.os),"X-Stainless-Arch":uM(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":Iu,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(e==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Iu,"X-Stainless-OS":lM(globalThis.process.platform??"unknown"),"X-Stainless-Arch":uM(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let t=Wae();return t?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Iu,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Iu,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};uM=e=>e==="x32"?"x32":e==="x86_64"||e==="x64"?"x64":e==="arm"?"arm":e==="aarch64"||e==="arm64"?"arm64":e?`other:${e}`:"unknown",lM=e=>(e=e.toLowerCase(),e.includes("ios")?"iOS":e==="android"?"Android":e==="darwin"?"MacOS":e==="win32"?"Windows":e==="freebsd"?"FreeBSD":e==="openbsd"?"OpenBSD":e==="linux"?"Linux":e?`Other:${e}`:"Unknown"),Kae=()=>dM??(dM=Bae());Qae=({headers:e,body:t})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(t)});Lo=class{constructor(){ni.set(this,void 0),ii.set(this,void 0),ve(this,ni,new Uint8Array,"f"),ve(this,ii,null,"f")}decode(t){if(t==null)return[];let r=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?o1(t):t;ve(this,ni,Jae([Z(this,ni,"f"),r]),"f");let n=[],i;for(;(i=Xae(Z(this,ni,"f"),Z(this,ii,"f")))!=null;){if(i.carriage&&Z(this,ii,"f")==null){ve(this,ii,i.index,"f");continue}if(Z(this,ii,"f")!=null&&(i.index!==Z(this,ii,"f")+1||i.carriage)){n.push(mM(Z(this,ni,"f").subarray(0,Z(this,ii,"f")-1))),ve(this,ni,Z(this,ni,"f").subarray(Z(this,ii,"f")),"f"),ve(this,ii,null,"f");continue}let a=Z(this,ii,"f")!==null?i.preceding-1:i.preceding,s=mM(Z(this,ni,"f").subarray(0,a));n.push(s),ve(this,ni,Z(this,ni,"f").subarray(i.index),"f"),ve(this,ii,null,"f")}return n}flush(){return Z(this,ni,"f").length?this.decode(`
148
+ `):[]}};ni=new WeakMap,ii=new WeakMap;Lo.NEWLINE_CHARS=new Set([`
149
+ `,"\r"]);Lo.NEWLINE_REGEXP=/\r\n|[\n\r]/g;Yv={off:0,error:200,warn:300,info:400,debug:500},hM=(e,t,r)=>{if(e){if(Lae(Yv,e))return e;_n(r).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(Yv))}`)}};tse={error:Yp,warn:Yp,info:Yp,debug:Yp},gM=new WeakMap;Uo=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([t,r])=>[t,t.toLowerCase()==="x-api-key"||t.toLowerCase()==="authorization"||t.toLowerCase()==="cookie"||t.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e),qo=class e{constructor(t,r,n){this.iterator=t,Ap.set(this,void 0),this.controller=r,ve(this,Ap,n,"f")}static fromSSEResponse(t,r,n){let i=!1,a=n?_n(n):console;async function*s(){if(i)throw new Le("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let o=!1;try{for await(let c of rse(t,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=PL(c.data)??c.data,l=u?.error?.type;throw new xn(void 0,u,void 0,t.headers,l)}}o=!0}catch(c){if(af(c))return;throw c}finally{o||r.abort()}}return new e(s,r,n)}static fromReadableStream(t,r,n){let i=!1;async function*a(){let o=new Lo,c=s1(t);for await(let u of c)for(let l of o.decode(u))yield l;for(let u of o.flush())yield u}async function*s(){if(i)throw new Le("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let o=!1;try{for await(let c of a())o||c&&(yield JSON.parse(c));o=!0}catch(c){if(af(c))return;throw c}finally{o||r.abort()}}return new e(s,r,n)}[(Ap=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],r=[],n=this.iterator(),i=a=>({next:()=>{if(a.length===0){let s=n.next();t.push(s),r.push(s)}return a.shift()}});return[new e(()=>i(t),this.controller,Z(this,Ap,"f")),new e(()=>i(r),this.controller,Z(this,Ap,"f"))]}toReadableStream(){let t=this,r;return TL({async start(){r=t[Symbol.asyncIterator]()},async pull(n){try{let{value:i,done:a}=await r.next();if(a)return n.close();let s=o1(JSON.stringify(i)+`
150
+ `);n.enqueue(s)}catch(i){n.error(i)}},async cancel(){await r.return?.()}})}};OI=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(t){if(t.endsWith("\r")&&(t=t.substring(0,t.length-1)),!t){if(!this.event&&!this.data.length)return null;let a={event:this.event,data:this.data.join(`
151
+ `),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],a}if(this.chunks.push(t),t.startsWith(":"))return null;let[r,n,i]=ise(t,":");return i.startsWith(" ")&&(i=i.substring(1)),r==="event"?this.event=i:r==="data"&&this.data.push(i),null}};Jv=class e extends Promise{constructor(t,r,n=zL){super(i=>{i(null)}),this.responsePromise=r,this.parseResponse=n,Jp.set(this,void 0),ve(this,Jp,t,"f")}_thenUnwrap(t){return new e(Z(this,Jp,"f"),this.responsePromise,async(r,n)=>CL(t(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(t=>t.response)}async withResponse(){let[t,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:t,response:r,request_id:r.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(t=>this.parseResponse(Z(this,Jp,"f"),t))),this.parsedPromise}then(t,r){return this.parse().then(t,r)}catch(t){return this.parse().catch(t)}finally(t){return this.parse().finally(t)}};Jp=new WeakMap;Xv=class{constructor(t,r,n,i){hv.set(this,void 0),ve(this,hv,t,"f"),this.options=i,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let t=this.nextPageRequestOptions();if(!t)throw new Le("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Z(this,hv,"f").requestAPIList(this.constructor,t)}async*iterPages(){let t=this;for(yield t;t.hasNextPage();)t=await t.getNextPage(),yield t}async*[(hv=new WeakMap,Symbol.asyncIterator)](){for await(let t of this.iterPages())for(let r of t.getPaginatedItems())yield r}},zI=class extends Jv{constructor(t,r,n){super(t,r,async(i,a)=>new n(i,a.response,await zL(i,a),a.options))}async*[Symbol.asyncIterator](){let t=await this;for await(let r of t)yield r}},Zo=class extends Xv{constructor(t,r,n,i){super(t,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:{...TI(this.options.query),before_id:r}}:null}let t=this.last_id;return t?{...this.options,query:{...TI(this.options.query),after_id:t}}:null}},ey=class extends Xv{constructor(t,r,n,i){super(t,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 t=this.next_page;return t?{...this.options,query:{...TI(this.options.query),page:t}}:null}},NL=()=>{if(typeof File>"u"){let{process:e}=globalThis,t=typeof e?.versions?.node=="string"&&parseInt(e.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(t?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};jL=e=>e!=null&&typeof e=="object"&&typeof e[Symbol.asyncIterator]=="function",c1=async(e,t,r=!0)=>({...e,body:await sse(e.body,t,r)}),vM=new WeakMap;sse=async(e,t,r=!0)=>{if(!await ase(t))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(e||{}).map(([i,a])=>CI(n,i,a,r))),n},ose=e=>e instanceof Blob&&"name"in e,CI=async(e,t,r,n)=>{if(r!==void 0){if(r==null)throw TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")e.append(t,String(r));else if(r instanceof Response){let i={},a=r.headers.get("Content-Type");a&&(i={type:a}),e.append(t,Cu([await r.blob()],Av(r,n),i))}else if(jL(r))e.append(t,Cu([await new Response(OL(r)).blob()],Av(r,n)));else if(ose(r))e.append(t,Cu([r],Av(r,n),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(i=>CI(e,t+"[]",i,n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([i,a])=>CI(e,`${t}[${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`)}},AL=e=>e!=null&&typeof e=="object"&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.text=="function"&&typeof e.slice=="function"&&typeof e.arrayBuffer=="function",cse=e=>e!=null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.lastModified=="number"&&AL(e),use=e=>e!=null&&typeof e=="object"&&typeof e.url=="string"&&typeof e.blob=="function";ci=class{constructor(t){this._client=t}},RL=Symbol.for("brand.privateNullableHeaders");xt=e=>{let t=new Headers,r=new Set;for(let n of e){let i=new Set;for(let[a,s]of pse(n)){let o=a.toLowerCase();i.has(o)||(t.delete(a),i.add(o)),s===null?(t.delete(a),r.add(o)):(t.append(a,s),r.delete(o))}}return{[RL]:!0,values:t,nulls:r}},tf=Symbol("anthropic.sdk.stainlessHelper");yM=Object.freeze(Object.create(null)),mse=(e=ML)=>function(t,...r){if(t.length===1)return t[0];let n=!1,i=[],a=t.reduce((u,l,d)=>{/[?#]/.test(l)&&(n=!0);let p=r[d],f=(n?encodeURIComponent:e)(""+p);return d!==r.length&&(p==null||typeof p=="object"&&p.toString===Object.getPrototypeOf(Object.getPrototypeOf(p.hasOwnProperty??yM)??yM)?.toString)&&(f=p+"",i.push({start:u.length+l.length,length:f.length,error:`Value of type ${Object.prototype.toString.call(p).slice(8,-1)} is not a valid path parameter`})),u+l+(d===r.length?"":f)},""),s=a.split(/[?#]/,1)[0],o=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=o.exec(s))!==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,p)=>{let f=" ".repeat(p.start-u),m="^".repeat(p.length);return u=p.start+p.length,d+f+m},"");throw new Le(`Path parameters result in path with invalid segments:
152
+ ${i.map(d=>d.error).join(`
153
+ `)}
154
+ ${a}
155
+ ${l}`)}return a},Lr=mse(ML),ty=class extends ci{list(t={},r){let{betas:n,...i}=t??{};return this._client.getAPIList("/v1/files",Zo,{query:i,...r,headers:xt([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])})}delete(t,r={},n){let{betas:i}=r??{};return this._client.delete(Lr`/v1/files/${t}`,{...n,headers:xt([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}download(t,r={},n){let{betas:i}=r??{};return this._client.get(Lr`/v1/files/${t}/content`,{...n,headers:xt([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}retrieveMetadata(t,r={},n){let{betas:i}=r??{};return this._client.get(Lr`/v1/files/${t}`,{...n,headers:xt([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}upload(t,r){let{betas:n,...i}=t;return this._client.post("/v1/files",c1({body:i,...r,headers:xt([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},fse(i.file),r?.headers])},this._client))}},ry=class extends ci{retrieve(t,r={},n){let{betas:i}=r??{};return this._client.get(Lr`/v1/models/${t}?beta=true`,{...n,headers:xt([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(t={},r){let{betas:n,...i}=t??{};return this._client.getAPIList("/v1/models?beta=true",Zo,{query:i,...r,headers:xt([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},LL={"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};gse=e=>{let t=0,r=[];for(;t<e.length;){let n=e[t];if(n==="\\"){t++;continue}if(n==="{"){r.push({type:"brace",value:"{"}),t++;continue}if(n==="}"){r.push({type:"brace",value:"}"}),t++;continue}if(n==="["){r.push({type:"paren",value:"["}),t++;continue}if(n==="]"){r.push({type:"paren",value:"]"}),t++;continue}if(n===":"){r.push({type:"separator",value:":"}),t++;continue}if(n===","){r.push({type:"delimiter",value:","}),t++;continue}if(n==='"'){let s="",o=!1;for(n=e[++t];n!=='"';){if(t===e.length){o=!0;break}if(n==="\\"){if(t++,t===e.length){o=!0;break}s+=n+e[t],n=e[++t]}else s+=n,n=e[++t]}n=e[++t],!o&&r.push({type:"string",value:s});continue}if(n&&/\s/.test(n)){t++;continue}let i=/[0-9]/;if(n&&i.test(n)||n==="-"||n==="."){let s="";for(n==="-"&&(s+=n,n=e[++t]);n&&i.test(n)||n===".";)s+=n,n=e[++t];r.push({type:"number",value:s});continue}let a=/[a-z]/i;if(n&&a.test(n)){let s="";for(;n&&a.test(n)&&t!==e.length;)s+=n,n=e[++t];if(s=="true"||s=="false"||s==="null")r.push({type:"name",value:s});else{t++;continue}continue}t++}return r},Pu=e=>{if(e.length===0)return e;let t=e[e.length-1];switch(t.type){case"separator":return e=e.slice(0,e.length-1),Pu(e);case"number":let r=t.value[t.value.length-1];if(r==="."||r==="-")return e=e.slice(0,e.length-1),Pu(e);case"string":let n=e[e.length-2];if(n?.type==="delimiter")return e=e.slice(0,e.length-1),Pu(e);if(n?.type==="brace"&&n.value==="{")return e=e.slice(0,e.length-1),Pu(e);break;case"delimiter":return e=e.slice(0,e.length-1),Pu(e)}return e},vse=e=>{let t=[];return e.map(r=>{r.type==="brace"&&(r.value==="{"?t.push("}"):t.splice(t.lastIndexOf("}"),1)),r.type==="paren"&&(r.value==="["?t.push("]"):t.splice(t.lastIndexOf("]"),1))}),t.length>0&&t.reverse().map(r=>{r==="}"?e.push({type:"brace",value:"}"}):r==="]"&&e.push({type:"paren",value:"]"})}),e},yse=e=>{let t="";return e.map(r=>{r.type==="string"?t+='"'+r.value+'"':t+=r.value}),t},FL=e=>JSON.parse(yse(vse(Pu(gse(e))))),wM="__json_buf";jI=class e{constructor(t,r){_i.add(this),this.messages=[],this.receivedMessages=[],As.set(this,void 0),ku.set(this,null),this.controller=new AbortController,Rp.set(this,void 0),gv.set(this,()=>{}),Up.set(this,()=>{}),Dp.set(this,void 0),vv.set(this,()=>{}),Mp.set(this,()=>{}),Ha.set(this,{}),Lp.set(this,!1),yv.set(this,!1),_v.set(this,!1),jo.set(this,!1),bv.set(this,void 0),xv.set(this,void 0),qp.set(this,void 0),wv.set(this,n=>{if(ve(this,yv,!0,"f"),af(n)&&(n=new oi),n instanceof oi)return ve(this,_v,!0,"f"),this._emit("abort",n);if(n instanceof Le)return this._emit("error",n);if(n instanceof Error){let i=new Le(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Le(String(n)))}),ve(this,Rp,new Promise((n,i)=>{ve(this,gv,n,"f"),ve(this,Up,i,"f")}),"f"),ve(this,Dp,new Promise((n,i)=>{ve(this,vv,n,"f"),ve(this,Mp,i,"f")}),"f"),Z(this,Rp,"f").catch(()=>{}),Z(this,Dp,"f").catch(()=>{}),ve(this,ku,t,"f"),ve(this,qp,r?.logger??console,"f")}get response(){return Z(this,bv,"f")}get request_id(){return Z(this,xv,"f")}async withResponse(){ve(this,jo,!0,"f");let t=await Z(this,Rp,"f");if(!t)throw Error("Could not resolve a `Response` object");return{data:this,response:t,request_id:t.headers.get("request-id")}}static fromReadableStream(t){let r=new e(null);return r._run(()=>r._fromReadableStream(t)),r}static createMessage(t,r,n,{logger:i}={}){let a=new e(r,{logger:i});for(let s of r.messages)a._addMessageParam(s);return ve(a,ku,{...r,stream:!0},"f"),a._run(()=>a._createMessage(t,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(t){t().then(()=>{this._emitFinal(),this._emit("end")},Z(this,wv,"f"))}_addMessageParam(t){this.messages.push(t)}_addMessage(t,r=!0){this.receivedMessages.push(t),r&&this._emit("message",t)}async _createMessage(t,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{Z(this,_i,"m",hI).call(this);let{response:s,data:o}=await t.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(s);for await(let c of o)Z(this,_i,"m",gI).call(this,c);if(o.controller.signal?.aborted)throw new oi;Z(this,_i,"m",vI).call(this)}finally{i&&a&&i.removeEventListener("abort",a)}}_connected(t){this.ended||(ve(this,bv,t,"f"),ve(this,xv,t?.headers.get("request-id"),"f"),Z(this,gv,"f").call(this,t),this._emit("connect"))}get ended(){return Z(this,Lp,"f")}get errored(){return Z(this,yv,"f")}get aborted(){return Z(this,_v,"f")}abort(){this.controller.abort()}on(t,r){return(Z(this,Ha,"f")[t]||(Z(this,Ha,"f")[t]=[])).push({listener:r}),this}off(t,r){let n=Z(this,Ha,"f")[t];if(!n)return this;let i=n.findIndex(a=>a.listener===r);return i>=0&&n.splice(i,1),this}once(t,r){return(Z(this,Ha,"f")[t]||(Z(this,Ha,"f")[t]=[])).push({listener:r,once:!0}),this}emitted(t){return new Promise((r,n)=>{ve(this,jo,!0,"f"),t!=="error"&&this.once("error",n),this.once(t,r)})}async done(){ve(this,jo,!0,"f"),await Z(this,Dp,"f")}get currentMessage(){return Z(this,As,"f")}async finalMessage(){return await this.done(),Z(this,_i,"m",mI).call(this)}async finalText(){return await this.done(),Z(this,_i,"m",bM).call(this)}_emit(t,...r){if(Z(this,Lp,"f"))return;t==="end"&&(ve(this,Lp,!0,"f"),Z(this,vv,"f").call(this));let n=Z(this,Ha,"f")[t];if(n&&(Z(this,Ha,"f")[t]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),t==="abort"){let i=r[0];!Z(this,jo,"f")&&!n?.length&&Promise.reject(i),Z(this,Up,"f").call(this,i),Z(this,Mp,"f").call(this,i),this._emit("end");return}if(t==="error"){let i=r[0];!Z(this,jo,"f")&&!n?.length&&Promise.reject(i),Z(this,Up,"f").call(this,i),Z(this,Mp,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Z(this,_i,"m",mI).call(this))}async _fromReadableStream(t,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{Z(this,_i,"m",hI).call(this),this._connected(null);let a=qo.fromReadableStream(t,this.controller);for await(let s of a)Z(this,_i,"m",gI).call(this,s);if(a.controller.signal?.aborted)throw new oi;Z(this,_i,"m",vI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(As=new WeakMap,ku=new WeakMap,Rp=new WeakMap,gv=new WeakMap,Up=new WeakMap,Dp=new WeakMap,vv=new WeakMap,Mp=new WeakMap,Ha=new WeakMap,Lp=new WeakMap,yv=new WeakMap,_v=new WeakMap,jo=new WeakMap,bv=new WeakMap,xv=new WeakMap,qp=new WeakMap,wv=new WeakMap,_i=new WeakSet,mI=function(){if(this.receivedMessages.length===0)throw new Le("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},bM=function(){if(this.receivedMessages.length===0)throw new Le("stream ended without producing a Message with role=assistant");let t=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(t.length===0)throw new Le("stream ended without producing a content block with type=text");return t.join(" ")},hI=function(){this.ended||ve(this,As,void 0,"f")},gI=function(t){if(this.ended)return;let r=Z(this,_i,"m",xM).call(this,t);switch(this._emit("streamEvent",t,r),t.type){case"content_block_delta":{let n=r.content.at(-1);switch(t.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",t.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",t.delta.citation,n.citations??[]);break}case"input_json_delta":{kM(n)&&n.input&&this._emit("inputJson",t.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",t.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:t.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(_M(r,Z(this,ku,"f"),{logger:Z(this,qp,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{ve(this,As,r,"f");break}case"content_block_start":case"message_delta":break}},vI=function(){if(this.ended)throw new Le("stream has ended, this shouldn't happen");let t=Z(this,As,"f");if(!t)throw new Le("request ended without sending any chunks");return ve(this,As,void 0,"f"),_M(t,Z(this,ku,"f"),{logger:Z(this,qp,"f")})},xM=function(t){let r=Z(this,As,"f");if(t.type==="message_start"){if(r)throw new Le(`Unexpected event order, got ${t.type} before receiving "message_stop"`);return t.message}if(!r)throw new Le(`Unexpected event order, got ${t.type} before "message_start"`);switch(t.type){case"message_stop":return r;case"message_delta":return r.container=t.delta.container,r.stop_reason=t.delta.stop_reason,r.stop_sequence=t.delta.stop_sequence,r.usage.output_tokens=t.usage.output_tokens,r.context_management=t.context_management,t.usage.input_tokens!=null&&(r.usage.input_tokens=t.usage.input_tokens),t.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=t.usage.cache_creation_input_tokens),t.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=t.usage.cache_read_input_tokens),t.usage.server_tool_use!=null&&(r.usage.server_tool_use=t.usage.server_tool_use),t.usage.iterations!=null&&(r.usage.iterations=t.usage.iterations),r;case"content_block_start":return r.content.push(t.content_block),r;case"content_block_delta":{let n=r.content.at(t.index);switch(t.delta.type){case"text_delta":{n?.type==="text"&&(r.content[t.index]={...n,text:(n.text||"")+t.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[t.index]={...n,citations:[...n.citations??[],t.delta.citation]});break}case"input_json_delta":{if(n&&kM(n)){let i=n[wM]||"";i+=t.delta.partial_json;let a={...n};if(Object.defineProperty(a,wM,{value:i,enumerable:!1,writable:!0}),i)try{a.input=FL(i)}catch(s){let o=new Le(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${s}. JSON: ${i}`);Z(this,wv,"f").call(this,o)}r.content[t.index]=a}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[t.index]={...n,thinking:n.thinking+t.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[t.index]={...n,signature:t.delta.signature});break}case"compaction_delta":{n?.type==="compaction"&&(r.content[t.index]={...n,content:(n.content||"")+t.delta.content});break}default:t.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let t=[],r=[],n=!1;return this.on("streamEvent",i=>{let a=r.shift();a?a.resolve(i):t.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()=>t.length?{value:t.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 qo(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},ny=class extends Error{constructor(t){let r=typeof t=="string"?t:t.map(n=>n.type==="text"?n.text:`[${n.type}]`).join(" ");super(r),this.name="ToolError",this.content=t}},_se=1e5,bse=`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:
156
+ 1. Task Overview
157
+ The user's core request and success criteria
158
+ Any clarifications or constraints they specified
159
+ 2. Current State
160
+ What has been completed so far
161
+ Files created, modified, or analyzed (with paths if relevant)
162
+ Key outputs or artifacts produced
163
+ 3. Important Discoveries
164
+ Technical constraints or requirements uncovered
165
+ Decisions made and their rationale
166
+ Errors encountered and how they were resolved
167
+ What approaches were tried that didn't work (and why)
168
+ 4. Next Steps
169
+ Specific actions needed to complete the task
170
+ Any blockers or open questions to resolve
171
+ Priority order if multiple steps remain
172
+ 5. Context to Preserve
173
+ User preferences or style requirements
174
+ Domain-specific details that aren't obvious
175
+ Any promises made to the user
176
+ 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.
177
+ Wrap your summary in <summary></summary> tags.`;iy=class{constructor(t,r,n){Zp.add(this),this.client=t,Su.set(this,!1),Ao.set(this,!1),Tr.set(this,void 0),Fp.set(this,void 0),ri.set(this,void 0),Ja.set(this,void 0),Rs.set(this,void 0),Vp.set(this,0),ve(this,Tr,{params:{...r,messages:structuredClone(r.messages)}},"f");let i=["BetaToolRunner",...UL(r.tools,r.messages)].join(", ");ve(this,Fp,{...n,headers:xt([{"x-stainless-helper":i},n?.headers])},"f"),ve(this,Rs,$M(),"f")}async*[(Su=new WeakMap,Ao=new WeakMap,Tr=new WeakMap,Fp=new WeakMap,ri=new WeakMap,Ja=new WeakMap,Rs=new WeakMap,Vp=new WeakMap,Zp=new WeakSet,SM=async function(){let t=Z(this,Tr,"f").params.compactionControl;if(!t||!t.enabled)return!1;let r=0;if(Z(this,ri,"f")!==void 0)try{let c=await Z(this,ri,"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=t.contextTokenThreshold??_se;if(r<n)return!1;let i=t.model??Z(this,Tr,"f").params.model,a=t.summaryPrompt??bse,s=Z(this,Tr,"f").params.messages;if(s[s.length-1].role==="assistant"){let c=s[s.length-1];if(Array.isArray(c.content)){let u=c.content.filter(l=>l.type!=="tool_use");u.length===0?s.pop():c.content=u}}let o=await this.client.beta.messages.create({model:i,messages:[...s,{role:"user",content:[{type:"text",text:a}]}],max_tokens:Z(this,Tr,"f").params.max_tokens},{headers:{"x-stainless-helper":"compaction"}});if(o.content[0]?.type!=="text")throw new Le("Expected text response for compaction");return Z(this,Tr,"f").params.messages=[{role:"user",content:o.content}],!0},Symbol.asyncIterator)](){var t;if(Z(this,Su,"f"))throw new Le("Cannot iterate over a consumed stream");ve(this,Su,!0,"f"),ve(this,Ao,!0,"f"),ve(this,Ja,void 0,"f");try{for(;;){let r;try{if(Z(this,Tr,"f").params.max_iterations&&Z(this,Vp,"f")>=Z(this,Tr,"f").params.max_iterations)break;ve(this,Ao,!1,"f"),ve(this,Ja,void 0,"f"),ve(this,Vp,(t=Z(this,Vp,"f"),t++,t),"f"),ve(this,ri,void 0,"f");let{max_iterations:n,compactionControl:i,...a}=Z(this,Tr,"f").params;if(a.stream?(r=this.client.beta.messages.stream({...a},Z(this,Fp,"f")),ve(this,ri,r.finalMessage(),"f"),Z(this,ri,"f").catch(()=>{}),yield r):(ve(this,ri,this.client.beta.messages.create({...a,stream:!1},Z(this,Fp,"f")),"f"),yield Z(this,ri,"f")),!await Z(this,Zp,"m",SM).call(this)){if(!Z(this,Ao,"f")){let{role:o,content:c}=await Z(this,ri,"f");Z(this,Tr,"f").params.messages.push({role:o,content:c})}let s=await Z(this,Zp,"m",AI).call(this,Z(this,Tr,"f").params.messages.at(-1));if(s)Z(this,Tr,"f").params.messages.push(s);else if(!Z(this,Ao,"f"))break}}finally{r&&r.abort()}}if(!Z(this,ri,"f"))throw new Le("ToolRunner concluded without a message from the server");Z(this,Rs,"f").resolve(await Z(this,ri,"f"))}catch(r){throw ve(this,Su,!1,"f"),Z(this,Rs,"f").promise.catch(()=>{}),Z(this,Rs,"f").reject(r),ve(this,Rs,$M(),"f"),r}}setMessagesParams(t){typeof t=="function"?Z(this,Tr,"f").params=t(Z(this,Tr,"f").params):Z(this,Tr,"f").params=t,ve(this,Ao,!0,"f"),ve(this,Ja,void 0,"f")}async generateToolResponse(){let t=await Z(this,ri,"f")??this.params.messages.at(-1);return t?Z(this,Zp,"m",AI).call(this,t):null}done(){return Z(this,Rs,"f").promise}async runUntilDone(){if(!Z(this,Su,"f"))for await(let t of this);return this.done()}get params(){return Z(this,Tr,"f").params}pushMessages(...t){this.setMessagesParams(r=>({...r,messages:[...r.messages,...t]}))}then(t,r){return this.runUntilDone().then(t,r)}};AI=async function(e){return Z(this,Ja,"f")!==void 0?Z(this,Ja,"f"):(ve(this,Ja,xse(Z(this,Tr,"f").params,e),"f"),Z(this,Ja,"f"))};ay=class e{constructor(t,r){this.iterator=t,this.controller=r}async*decoder(){let t=new Lo;for await(let r of this.iterator)for(let n of t.decode(r))yield JSON.parse(n);for(let r of t.flush())yield JSON.parse(r)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(t,r){if(!t.body)throw r.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Le("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 Le("Attempted to iterate over a response with no body");return new e(s1(t.body),r)}},sy=class extends ci{create(t,r){let{betas:n,...i}=t;return this._client.post("/v1/messages/batches?beta=true",{body:i,...r,headers:xt([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}retrieve(t,r={},n){let{betas:i}=r??{};return this._client.get(Lr`/v1/messages/batches/${t}?beta=true`,{...n,headers:xt([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}list(t={},r){let{betas:n,...i}=t??{};return this._client.getAPIList("/v1/messages/batches?beta=true",Zo,{query:i,...r,headers:xt([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}delete(t,r={},n){let{betas:i}=r??{};return this._client.delete(Lr`/v1/messages/batches/${t}?beta=true`,{...n,headers:xt([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}cancel(t,r={},n){let{betas:i}=r??{};return this._client.post(Lr`/v1/messages/batches/${t}/cancel?beta=true`,{...n,headers:xt([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}async results(t,r={},n){let i=await this.retrieve(t);if(!i.results_url)throw new Le(`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:xt([{"anthropic-beta":[...a??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((s,o)=>ay.fromResponse(o.response,o.controller))}},EM={"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"},wse=["claude-opus-4-6"],Fo=class extends ci{constructor(){super(...arguments),this.batches=new sy(this._client)}create(t,r){let n=IM(t),{betas:i,...a}=n;a.model in EM&&console.warn(`The model '${a.model}' is deprecated and will reach end-of-life on ${EM[a.model]}
178
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),a.model in wse&&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 s=this._client._options.timeout;if(!a.stream&&s==null){let c=LL[a.model]??void 0;s=this._client.calculateNonstreamingTimeout(a.max_tokens,c)}let o=DL(a.tools,a.messages);return this._client.post("/v1/messages?beta=true",{body:a,timeout:s??6e5,...r,headers:xt([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},o,r?.headers]),stream:n.stream??!1})}parse(t,r){return r={...r,headers:xt([{"anthropic-beta":[...t.betas??[],"structured-outputs-2025-12-15"].toString()},r?.headers])},this.create(t,r).then(n=>ZL(n,t,{logger:this._client.logger??console}))}stream(t,r){return jI.createMessage(this,t,r)}countTokens(t,r){let n=IM(t),{betas:i,...a}=n;return this._client.post("/v1/messages/count_tokens?beta=true",{body:a,...r,headers:xt([{"anthropic-beta":[...i??[],"token-counting-2024-11-01"].toString()},r?.headers])})}toolRunner(t,r){return new iy(this._client,t,r)}};Fo.Batches=sy;Fo.BetaToolRunner=iy;Fo.ToolError=ny;oy=class extends ci{create(t,r={},n){let{betas:i,...a}=r??{};return this._client.post(Lr`/v1/skills/${t}/versions?beta=true`,c1({body:a,...n,headers:xt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])},this._client))}retrieve(t,r,n){let{skill_id:i,betas:a}=r;return this._client.get(Lr`/v1/skills/${i}/versions/${t}?beta=true`,{...n,headers:xt([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},n?.headers])})}list(t,r={},n){let{betas:i,...a}=r??{};return this._client.getAPIList(Lr`/v1/skills/${t}/versions?beta=true`,ey,{query:a,...n,headers:xt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}delete(t,r,n){let{skill_id:i,betas:a}=r;return this._client.delete(Lr`/v1/skills/${i}/versions/${t}?beta=true`,{...n,headers:xt([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},n?.headers])})}},sf=class extends ci{constructor(){super(...arguments),this.versions=new oy(this._client)}create(t={},r){let{betas:n,...i}=t??{};return this._client.post("/v1/skills?beta=true",c1({body:i,...r,headers:xt([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])},this._client,!1))}retrieve(t,r={},n){let{betas:i}=r??{};return this._client.get(Lr`/v1/skills/${t}?beta=true`,{...n,headers:xt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}list(t={},r){let{betas:n,...i}=t??{};return this._client.getAPIList("/v1/skills?beta=true",ey,{query:i,...r,headers:xt([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])})}delete(t,r={},n){let{betas:i}=r??{};return this._client.delete(Lr`/v1/skills/${t}?beta=true`,{...n,headers:xt([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}};sf.Versions=oy;qs=class extends ci{constructor(){super(...arguments),this.models=new ry(this._client),this.messages=new Fo(this._client),this.files=new ty(this._client),this.skills=new sf(this._client)}};qs.Models=ry;qs.Messages=Fo;qs.Files=ty;qs.Skills=sf;cy=class extends ci{create(t,r){let{betas:n,...i}=t;return this._client.post("/v1/complete",{body:i,timeout:this._client._options.timeout??6e5,...r,headers:xt([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:t.stream??!1})}};zM="__json_buf";RI=class e{constructor(t,r){bi.add(this),this.messages=[],this.receivedMessages=[],Us.set(this,void 0),$u.set(this,null),this.controller=new AbortController,Bp.set(this,void 0),kv.set(this,()=>{}),Wp.set(this,()=>{}),Kp.set(this,void 0),Sv.set(this,()=>{}),Gp.set(this,()=>{}),Qa.set(this,{}),Hp.set(this,!1),$v.set(this,!1),Ev.set(this,!1),Ro.set(this,!1),Iv.set(this,void 0),Pv.set(this,void 0),Qp.set(this,void 0),_I.set(this,n=>{if(ve(this,$v,!0,"f"),af(n)&&(n=new oi),n instanceof oi)return ve(this,Ev,!0,"f"),this._emit("abort",n);if(n instanceof Le)return this._emit("error",n);if(n instanceof Error){let i=new Le(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Le(String(n)))}),ve(this,Bp,new Promise((n,i)=>{ve(this,kv,n,"f"),ve(this,Wp,i,"f")}),"f"),ve(this,Kp,new Promise((n,i)=>{ve(this,Sv,n,"f"),ve(this,Gp,i,"f")}),"f"),Z(this,Bp,"f").catch(()=>{}),Z(this,Kp,"f").catch(()=>{}),ve(this,$u,t,"f"),ve(this,Qp,r?.logger??console,"f")}get response(){return Z(this,Iv,"f")}get request_id(){return Z(this,Pv,"f")}async withResponse(){ve(this,Ro,!0,"f");let t=await Z(this,Bp,"f");if(!t)throw Error("Could not resolve a `Response` object");return{data:this,response:t,request_id:t.headers.get("request-id")}}static fromReadableStream(t){let r=new e(null);return r._run(()=>r._fromReadableStream(t)),r}static createMessage(t,r,n,{logger:i}={}){let a=new e(r,{logger:i});for(let s of r.messages)a._addMessageParam(s);return ve(a,$u,{...r,stream:!0},"f"),a._run(()=>a._createMessage(t,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(t){t().then(()=>{this._emitFinal(),this._emit("end")},Z(this,_I,"f"))}_addMessageParam(t){this.messages.push(t)}_addMessage(t,r=!0){this.receivedMessages.push(t),r&&this._emit("message",t)}async _createMessage(t,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{Z(this,bi,"m",bI).call(this);let{response:s,data:o}=await t.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(s);for await(let c of o)Z(this,bi,"m",xI).call(this,c);if(o.controller.signal?.aborted)throw new oi;Z(this,bi,"m",wI).call(this)}finally{i&&a&&i.removeEventListener("abort",a)}}_connected(t){this.ended||(ve(this,Iv,t,"f"),ve(this,Pv,t?.headers.get("request-id"),"f"),Z(this,kv,"f").call(this,t),this._emit("connect"))}get ended(){return Z(this,Hp,"f")}get errored(){return Z(this,$v,"f")}get aborted(){return Z(this,Ev,"f")}abort(){this.controller.abort()}on(t,r){return(Z(this,Qa,"f")[t]||(Z(this,Qa,"f")[t]=[])).push({listener:r}),this}off(t,r){let n=Z(this,Qa,"f")[t];if(!n)return this;let i=n.findIndex(a=>a.listener===r);return i>=0&&n.splice(i,1),this}once(t,r){return(Z(this,Qa,"f")[t]||(Z(this,Qa,"f")[t]=[])).push({listener:r,once:!0}),this}emitted(t){return new Promise((r,n)=>{ve(this,Ro,!0,"f"),t!=="error"&&this.once("error",n),this.once(t,r)})}async done(){ve(this,Ro,!0,"f"),await Z(this,Kp,"f")}get currentMessage(){return Z(this,Us,"f")}async finalMessage(){return await this.done(),Z(this,bi,"m",yI).call(this)}async finalText(){return await this.done(),Z(this,bi,"m",TM).call(this)}_emit(t,...r){if(Z(this,Hp,"f"))return;t==="end"&&(ve(this,Hp,!0,"f"),Z(this,Sv,"f").call(this));let n=Z(this,Qa,"f")[t];if(n&&(Z(this,Qa,"f")[t]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),t==="abort"){let i=r[0];!Z(this,Ro,"f")&&!n?.length&&Promise.reject(i),Z(this,Wp,"f").call(this,i),Z(this,Gp,"f").call(this,i),this._emit("end");return}if(t==="error"){let i=r[0];!Z(this,Ro,"f")&&!n?.length&&Promise.reject(i),Z(this,Wp,"f").call(this,i),Z(this,Gp,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Z(this,bi,"m",yI).call(this))}async _fromReadableStream(t,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{Z(this,bi,"m",bI).call(this),this._connected(null);let a=qo.fromReadableStream(t,this.controller);for await(let s of a)Z(this,bi,"m",xI).call(this,s);if(a.controller.signal?.aborted)throw new oi;Z(this,bi,"m",wI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(Us=new WeakMap,$u=new WeakMap,Bp=new WeakMap,kv=new WeakMap,Wp=new WeakMap,Kp=new WeakMap,Sv=new WeakMap,Gp=new WeakMap,Qa=new WeakMap,Hp=new WeakMap,$v=new WeakMap,Ev=new WeakMap,Ro=new WeakMap,Iv=new WeakMap,Pv=new WeakMap,Qp=new WeakMap,_I=new WeakMap,bi=new WeakSet,yI=function(){if(this.receivedMessages.length===0)throw new Le("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},TM=function(){if(this.receivedMessages.length===0)throw new Le("stream ended without producing a Message with role=assistant");let t=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(t.length===0)throw new Le("stream ended without producing a content block with type=text");return t.join(" ")},bI=function(){this.ended||ve(this,Us,void 0,"f")},xI=function(t){if(this.ended)return;let r=Z(this,bi,"m",OM).call(this,t);switch(this._emit("streamEvent",t,r),t.type){case"content_block_delta":{let n=r.content.at(-1);switch(t.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",t.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",t.delta.citation,n.citations??[]);break}case"input_json_delta":{CM(n)&&n.input&&this._emit("inputJson",t.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",t.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:t.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(PM(r,Z(this,$u,"f"),{logger:Z(this,Qp,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{ve(this,Us,r,"f");break}case"content_block_start":case"message_delta":break}},wI=function(){if(this.ended)throw new Le("stream has ended, this shouldn't happen");let t=Z(this,Us,"f");if(!t)throw new Le("request ended without sending any chunks");return ve(this,Us,void 0,"f"),PM(t,Z(this,$u,"f"),{logger:Z(this,Qp,"f")})},OM=function(t){let r=Z(this,Us,"f");if(t.type==="message_start"){if(r)throw new Le(`Unexpected event order, got ${t.type} before receiving "message_stop"`);return t.message}if(!r)throw new Le(`Unexpected event order, got ${t.type} before "message_start"`);switch(t.type){case"message_stop":return r;case"message_delta":return r.stop_reason=t.delta.stop_reason,r.stop_sequence=t.delta.stop_sequence,r.usage.output_tokens=t.usage.output_tokens,t.usage.input_tokens!=null&&(r.usage.input_tokens=t.usage.input_tokens),t.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=t.usage.cache_creation_input_tokens),t.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=t.usage.cache_read_input_tokens),t.usage.server_tool_use!=null&&(r.usage.server_tool_use=t.usage.server_tool_use),r;case"content_block_start":return r.content.push({...t.content_block}),r;case"content_block_delta":{let n=r.content.at(t.index);switch(t.delta.type){case"text_delta":{n?.type==="text"&&(r.content[t.index]={...n,text:(n.text||"")+t.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[t.index]={...n,citations:[...n.citations??[],t.delta.citation]});break}case"input_json_delta":{if(n&&CM(n)){let i=n[zM]||"";i+=t.delta.partial_json;let a={...n};Object.defineProperty(a,zM,{value:i,enumerable:!1,writable:!0}),i&&(a.input=FL(i)),r.content[t.index]=a}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[t.index]={...n,thinking:n.thinking+t.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[t.index]={...n,signature:t.delta.signature});break}default:t.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let t=[],r=[],n=!1;return this.on("streamEvent",i=>{let a=r.shift();a?a.resolve(i):t.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()=>t.length?{value:t.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 qo(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},uy=class extends ci{create(t,r){return this._client.post("/v1/messages/batches",{body:t,...r})}retrieve(t,r){return this._client.get(Lr`/v1/messages/batches/${t}`,r)}list(t={},r){return this._client.getAPIList("/v1/messages/batches",Zo,{query:t,...r})}delete(t,r){return this._client.delete(Lr`/v1/messages/batches/${t}`,r)}cancel(t,r){return this._client.post(Lr`/v1/messages/batches/${t}/cancel`,r)}async results(t,r){let n=await this.retrieve(t);if(!n.results_url)throw new Le(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...r,headers:xt([{Accept:"application/binary"},r?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((i,a)=>ay.fromResponse(a.response,a.controller))}},of=class extends ci{constructor(){super(...arguments),this.batches=new uy(this._client)}create(t,r){t.model in NM&&console.warn(`The model '${t.model}' is deprecated and will reach end-of-life on ${NM[t.model]}
179
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),t.model in Sse&&t.thinking&&t.thinking.type==="enabled"&&console.warn(`Using Claude with ${t.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(!t.stream&&n==null){let a=LL[t.model]??void 0;n=this._client.calculateNonstreamingTimeout(t.max_tokens,a)}let i=DL(t.tools,t.messages);return this._client.post("/v1/messages",{body:t,timeout:n??6e5,...r,headers:xt([i,r?.headers]),stream:t.stream??!1})}parse(t,r){return this.create(t,r).then(n=>BL(n,t,{logger:this._client.logger??console}))}stream(t,r){return RI.createMessage(this,t,r,{logger:this._client.logger??console})}countTokens(t,r){return this._client.post("/v1/messages/count_tokens",{body:t,...r})}},NM={"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"},Sse=["claude-opus-4-6"];of.Batches=uy;ly=class extends ci{retrieve(t,r={},n){let{betas:i}=r??{};return this._client.get(Lr`/v1/models/${t}`,{...n,headers:xt([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(t={},r){let{betas:n,...i}=t??{};return this._client.getAPIList("/v1/models",Zo,{query:i,...r,headers:xt([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},Tv=e=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[e]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(e)?.trim()},$se="\\n\\nHuman:",Ese="\\n\\nAssistant:",yr=class{constructor({baseURL:t=Tv("ANTHROPIC_BASE_URL"),apiKey:r=Tv("ANTHROPIC_API_KEY")??null,authToken:n=Tv("ANTHROPIC_AUTH_TOKEN")??null,...i}={}){UI.add(this),Uv.set(this,void 0);let a={apiKey:r,authToken:n,...i,baseURL:t||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&Fae())throw new Le(`It looks like you're running in a browser-like environment.
180
+
181
+ This is disabled by default, as it risks exposing your secret API credentials to attackers.
182
+ If you understand the risks and have appropriate mitigations in place,
183
+ you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
184
+
185
+ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
186
+ `);this.baseURL=a.baseURL,this.timeout=a.timeout??u1.DEFAULT_TIMEOUT,this.logger=a.logger??console;let s="warn";this.logLevel=s,this.logLevel=hM(a.logLevel,"ClientOptions.logLevel",this)??hM(Tv("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??s,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??Gae(),ve(this,Uv,Qae,"f"),this._options=a,this.apiKey=typeof r=="string"?r:null,this.authToken=n}withOptions(t){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,...t})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:t,nulls:r}){if(!(t.get("x-api-key")||t.get("authorization"))&&!(this.apiKey&&t.get("x-api-key"))&&!r.has("x-api-key")&&!(this.authToken&&t.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(t){return xt([await this.apiKeyAuth(t),await this.bearerAuth(t)])}async apiKeyAuth(t){if(this.apiKey!=null)return xt([{"X-Api-Key":this.apiKey}])}async bearerAuth(t){if(this.authToken!=null)return xt([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(t){return Yae(t)}getUserAgent(){return`${this.constructor.name}/JS ${Iu}`}defaultIdempotencyKey(){return`stainless-node-retry-${IL()}`}makeStatusError(t,r,n,i){return xn.generate(t,r,n,i)}buildURL(t,r,n){let i=!Z(this,UI,"m",WL).call(this)&&n||this.baseURL,a=Mae(t)?new URL(t):new URL(i+(i.endsWith("/")&&t.startsWith("/")?t.slice(1):t)),s=this.defaultQuery(),o=Object.fromEntries(a.searchParams);return(!cM(s)||!cM(o))&&(r={...o,...s,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(a.search=this.stringifyQuery(r)),a.toString()}_calculateNonstreamingTimeout(t){if(3600*t/128e3>600)throw new Le("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(t){}async prepareRequest(t,{url:r,options:n}){}get(t,r){return this.methodRequest("get",t,r)}post(t,r){return this.methodRequest("post",t,r)}patch(t,r){return this.methodRequest("patch",t,r)}put(t,r){return this.methodRequest("put",t,r)}delete(t,r){return this.methodRequest("delete",t,r)}methodRequest(t,r,n){return this.request(Promise.resolve(n).then(i=>({method:t,path:r,...i})))}request(t,r=null){return new Jv(this,this.makeRequest(t,r,void 0))}async makeRequest(t,r,n){let i=await t,a=i.maxRetries??this.maxRetries;r==null&&(r=a),await this.prepareOptions(i);let{req:s,url:o,timeout:c}=await this.buildRequest(i,{retryCount:a-r});await this.prepareRequest(s,{url:o,options:i});let u="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),l=n===void 0?"":`, retryOf: ${n}`,d=Date.now();if(_n(this).debug(`[${u}] sending request`,Uo({retryOfRequestLogID:n,method:i.method,url:o,options:i,headers:s.headers})),i.signal?.aborted)throw new oi;let p=new AbortController,f=await this.fetchWithTimeout(o,s,c,p).catch(II),m=Date.now();if(f instanceof globalThis.Error){let h=`retrying, ${r} attempts remaining`;if(i.signal?.aborted)throw new oi;let _=af(f)||/timed? ?out/i.test(String(f)+("cause"in f?String(f.cause):""));if(r)return _n(this).info(`[${u}] connection ${_?"timed out":"failed"} - ${h}`),_n(this).debug(`[${u}] connection ${_?"timed out":"failed"} (${h})`,Uo({retryOfRequestLogID:n,url:o,durationMs:m-d,message:f.message})),this.retryRequest(i,r,n??u);throw _n(this).info(`[${u}] connection ${_?"timed out":"failed"} - error; no more retries left`),_n(this).debug(`[${u}] connection ${_?"timed out":"failed"} (error; no more retries left)`,Uo({retryOfRequestLogID:n,url:o,durationMs:m-d,message:f.message})),_?new Zv:new Au({cause:f})}let v=[...f.headers.entries()].filter(([h])=>h==="request-id").map(([h,_])=>", "+h+": "+JSON.stringify(_)).join(""),g=`[${u}${l}${v}] ${s.method} ${o} ${f.ok?"succeeded":"failed"} with status ${f.status} in ${m-d}ms`;if(!f.ok){let h=await this.shouldRetry(f);if(r&&h){let w=`retrying, ${r} attempts remaining`;return await Hae(f.body),_n(this).info(`${g} - ${w}`),_n(this).debug(`[${u}] response error (${w})`,Uo({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,durationMs:m-d})),this.retryRequest(i,r,n??u,f.headers)}let _=h?"error; no more retries left":"error; not retryable";_n(this).info(`${g} - ${_}`);let y=await f.text().catch(w=>II(w).message),b=PL(y),x=b?void 0:y;throw _n(this).debug(`[${u}] response error (${_})`,Uo({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,message:x,durationMs:Date.now()-d})),this.makeStatusError(f.status,b,x,f.headers)}return _n(this).info(g),_n(this).debug(`[${u}] response start`,Uo({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,durationMs:m-d})),{response:f,options:i,controller:p,requestLogID:u,retryOfRequestLogID:n,startTime:d}}getAPIList(t,r,n){return this.requestAPIList(r,n&&"then"in n?n.then(i=>({method:"get",path:t,...i})):{method:"get",path:t,...n})}requestAPIList(t,r){let n=this.makeRequest(r,null,void 0);return new zI(this,n,t)}async fetchWithTimeout(t,r,n,i){let{signal:a,method:s,...o}=r||{},c=this._makeAbort(i);a&&a.addEventListener("abort",c,{once:!0});let u=setTimeout(c,n),l=globalThis.ReadableStream&&o.body instanceof globalThis.ReadableStream||typeof o.body=="object"&&o.body!==null&&Symbol.asyncIterator in o.body,d={signal:i.signal,...l?{duplex:"half"}:{},method:"GET",...o};s&&(d.method=s.toUpperCase());try{return await this.fetch.call(void 0,t,d)}finally{clearTimeout(u)}}async shouldRetry(t){let r=t.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:t.status===408||t.status===409||t.status===429||t.status>=500}async retryRequest(t,r,n,i){let a,s=i?.get("retry-after-ms");if(s){let c=parseFloat(s);Number.isNaN(c)||(a=c)}let o=i?.get("retry-after");if(o&&!a){let c=parseFloat(o);Number.isNaN(c)?a=Date.parse(o)-Date.now():a=c*1e3}if(a===void 0){let c=t.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(r,c)}return await Zae(a),this.makeRequest(t,r-1,n)}calculateDefaultRetryTimeoutMillis(t,r){let n=r-t,i=Math.min(.5*Math.pow(2,n),8),a=1-Math.random()*.25;return i*a*1e3}calculateNonstreamingTimeout(t,r){if(36e5*t/128e3>6e5||r!=null&&t>r)throw new Le("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(t,{retryCount:r=0}={}){let n={...t},{method:i,path:a,query:s,defaultBaseURL:o}=n,c=this.buildURL(a,s,o);"timeout"in n&&qae("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:u,body:l}=this.buildBody({options:n}),d=await this.buildHeaders({options:t,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:t,method:r,bodyHeaders:n,retryCount:i}){let a={};this.idempotencyHeader&&r!=="get"&&(t.idempotencyKey||(t.idempotencyKey=this.defaultIdempotencyKey()),a[this.idempotencyHeader]=t.idempotencyKey);let s=xt([a,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(i),...t.timeout?{"X-Stainless-Timeout":String(Math.trunc(t.timeout/1e3))}:{},...Kae(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(t),this._options.defaultHeaders,n,t.headers]);return this.validateHeaders(s),s.values}_makeAbort(t){return()=>t.abort()}buildBody({options:{body:t,headers:r}}){if(!t)return{bodyHeaders:void 0,body:void 0};let n=xt([r]);return ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof DataView||typeof t=="string"&&n.values.has("content-type")||globalThis.Blob&&t instanceof globalThis.Blob||t instanceof FormData||t instanceof URLSearchParams||globalThis.ReadableStream&&t instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:t}:typeof t=="object"&&(Symbol.asyncIterator in t||Symbol.iterator in t&&"next"in t&&typeof t.next=="function")?{bodyHeaders:void 0,body:OL(t)}:typeof t=="object"&&n.values.get("content-type")==="application/x-www-form-urlencoded"?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(t)}:Z(this,Uv,"f").call(this,{body:t,headers:n})}};u1=yr,Uv=new WeakMap,UI=new WeakSet,WL=function(){return this.baseURL!=="https://api.anthropic.com"};yr.Anthropic=u1;yr.HUMAN_PROMPT=$se;yr.AI_PROMPT=Ese;yr.DEFAULT_TIMEOUT=6e5;yr.AnthropicError=Le;yr.APIError=xn;yr.APIConnectionError=Au;yr.APIConnectionTimeoutError=Zv;yr.APIUserAbortError=oi;yr.NotFoundError=Wv;yr.ConflictError=Kv;yr.RateLimitError=Hv;yr.BadRequestError=Fv;yr.AuthenticationError=Vv;yr.InternalServerError=Qv;yr.PermissionDeniedError=Bv;yr.UnprocessableEntityError=Gv;yr.toFile=lse;Ru=class extends yr{constructor(){super(...arguments),this.completions=new cy(this),this.messages=new of(this),this.models=new ly(this),this.beta=new qs(this)}};Ru.Completions=cy;Ru.Messages=of;Ru.Models=ly;Ru.Beta=qs;Eu=null;Nse=Cse();Ase=d1(),Z2e=Ase.subscribe,Rse=d1(),F2e=Rse.subscribe,Use=d1(),V2e=Use.subscribe;RM=new Set;Vse=Bs(e=>{if(!e||e.trim()==="")return null;let t=e.split(",").map(a=>a.trim()).filter(Boolean);if(t.length===0)return null;let r=t.some(a=>a.startsWith("!")),n=t.some(a=>!a.startsWith("!"));if(r&&n)return null;let i=t.map(a=>a.replace(/^!/,"").toLowerCase());return{include:r?[]:i,exclude:r?i:[],isExclusive:r}});roe={cwd(){return process.cwd()},existsSync(e){let t=[];try{let i=hr(t,vr`fs.existsSync(${e})`,0);return Ke.existsSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},async stat(e){return eoe(e)},async readdir(e){return Qse(e,{withFileTypes:!0})},async unlink(e){return toe(e)},async rmdir(e){return Jse(e)},async rm(e,t){return Xse(e,t)},async mkdir(e,t){try{await Gse(e,{recursive:!0,...t})}catch(r){if(rf(r)!=="EEXIST")throw r}},async readFile(e,t){return UM(e,{encoding:t.encoding})},async rename(e,t){return Yse(e,t)},statSync(e){let t=[];try{let i=hr(t,vr`fs.statSync(${e})`,0);return Ke.statSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},lstatSync(e){let t=[];try{let i=hr(t,vr`fs.lstatSync(${e})`,0);return Ke.lstatSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},readFileSync(e,t){let r=[];try{let a=hr(r,vr`fs.readFileSync(${e})`,0);return Ke.readFileSync(e,{encoding:t.encoding})}catch(a){var n=a,i=1}finally{gr(r,n,i)}},readFileBytesSync(e){let t=[];try{let i=hr(t,vr`fs.readFileBytesSync(${e})`,0);return Ke.readFileSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},readSync(e,t){let r=[];try{let a=hr(r,vr`fs.readSync(${e}, ${t.length} bytes)`,0),s;try{s=Ke.openSync(e,"r");let o=Buffer.alloc(t.length),c=Ke.readSync(s,o,0,t.length,0);return{buffer:o,bytesRead:c}}finally{s&&Ke.closeSync(s)}}catch(a){var n=a,i=1}finally{gr(r,n,i)}},appendFileSync(e,t,r){let n=[];try{let s=hr(n,vr`fs.appendFileSync(${e}, ${t.length} chars)`,0);if(r?.mode!==void 0)try{let o=Ke.openSync(e,"ax",r.mode);try{Ke.appendFileSync(o,t)}finally{Ke.closeSync(o)}return}catch(o){if(rf(o)!=="EEXIST")throw o}Ke.appendFileSync(e,t)}catch(s){var i=s,a=1}finally{gr(n,i,a)}},copyFileSync(e,t){let r=[];try{let a=hr(r,vr`fs.copyFileSync(${e} → ${t})`,0);Ke.copyFileSync(e,t)}catch(a){var n=a,i=1}finally{gr(r,n,i)}},unlinkSync(e){let t=[];try{let i=hr(t,vr`fs.unlinkSync(${e})`,0);Ke.unlinkSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},renameSync(e,t){let r=[];try{let a=hr(r,vr`fs.renameSync(${e} → ${t})`,0);Ke.renameSync(e,t)}catch(a){var n=a,i=1}finally{gr(r,n,i)}},linkSync(e,t){let r=[];try{let a=hr(r,vr`fs.linkSync(${e} → ${t})`,0);Ke.linkSync(e,t)}catch(a){var n=a,i=1}finally{gr(r,n,i)}},symlinkSync(e,t,r){let n=[];try{let s=hr(n,vr`fs.symlinkSync(${e} → ${t})`,0);Ke.symlinkSync(e,t,r)}catch(s){var i=s,a=1}finally{gr(n,i,a)}},readlinkSync(e){let t=[];try{let i=hr(t,vr`fs.readlinkSync(${e})`,0);return Ke.readlinkSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},realpathSync(e){let t=[];try{let i=hr(t,vr`fs.realpathSync(${e})`,0);return Ke.realpathSync(e).normalize("NFC")}catch(i){var r=i,n=1}finally{gr(t,r,n)}},mkdirSync(e,t){let r=[];try{let a=hr(r,vr`fs.mkdirSync(${e})`,0),s={recursive:!0};t?.mode!==void 0&&(s.mode=t.mode);try{Ke.mkdirSync(e,s)}catch(o){if(rf(o)!=="EEXIST")throw o}}catch(a){var n=a,i=1}finally{gr(r,n,i)}},readdirSync(e){let t=[];try{let i=hr(t,vr`fs.readdirSync(${e})`,0);return Ke.readdirSync(e,{withFileTypes:!0})}catch(i){var r=i,n=1}finally{gr(t,r,n)}},readdirStringSync(e){let t=[];try{let i=hr(t,vr`fs.readdirStringSync(${e})`,0);return Ke.readdirSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},isDirEmptySync(e){let t=[];try{let i=hr(t,vr`fs.isDirEmptySync(${e})`,0);return this.readdirSync(e).length===0}catch(i){var r=i,n=1}finally{gr(t,r,n)}},rmdirSync(e){let t=[];try{let i=hr(t,vr`fs.rmdirSync(${e})`,0);Ke.rmdirSync(e)}catch(i){var r=i,n=1}finally{gr(t,r,n)}},rmSync(e,t){let r=[];try{let a=hr(r,vr`fs.rmSync(${e})`,0);Ke.rmSync(e,t)}catch(a){var n=a,i=1}finally{gr(r,n,i)}},createWriteStream(e){return Ke.createWriteStream(e)},async readFileBytes(e,t){if(t===void 0)return UM(e);let r=await Hse(e,"r");try{let{size:n}=await r.stat(),i=Math.min(n,t),a=Buffer.allocUnsafe(i),s=0;for(;s<i;){let{bytesRead:o}=await r.read(a,s,i-s,s);if(o===0)break;s+=o}return s<i?a.subarray(0,s):a}finally{await r.close()}}},noe=roe;DI={verbose:0,debug:1,info:2,warn:3,error:4},soe=Bs(()=>{let e=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return e&&Object.hasOwn(DI,e)?e:"debug"}),ooe=!1,MI=Bs(()=>ooe||Do(process.env.DEBUG)||Do(process.env.DEBUG_SDK)||process.argv.includes("--debug")||process.argv.includes("-d")||YL()||process.argv.some(e=>e.startsWith("--debug="))||JL()!==null),coe=Bs(()=>{let e=process.argv.find(r=>r.startsWith("--debug="));if(!e)return null;let t=e.substring(8);return Vse(t)}),YL=Bs(()=>process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e")),JL=Bs(()=>{for(let e=0;e<process.argv.length;e++){let t=process.argv[e];if(t.startsWith("--debug-file="))return t.substring(13);if(t==="--debug-file"&&e+1<process.argv.length)return process.argv[e+1]}return null});loe=!1,Ov=null,kI=Promise.resolve();eq=Bs(async()=>{try{let e=XL(),t=HL(e),r=QL(t,"latest");await qse(r).catch(()=>{}),await Lse(e,r)}catch{}}),G2e=(()=>{let e=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(e!==void 0){let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t}return 1/0})(),moe={[Symbol.dispose](){}};vr=hoe;p1=(e,t)=>{let r=[];try{let a=hr(r,vr`JSON.parse(${e})`,0);return typeof t>"u"?JSON.parse(e):JSON.parse(e,t)}catch(a){var n=a,i=1}finally{gr(r,n,i)}};yoe=2e3,dy=new Set,MM=!1;LI=class{options;process;processStdin;processStdout;ready=!1;abortController;exitError;exitListeners=[];abortHandler;pendingWrites=[];pendingEndInput=!1;spawnResolve;spawnReject;spawnPromise;constructor(t){this.options=t,this.abortController=t.abortController||xL(),t.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(KL(r)),r}let t=this.pendingWrites;this.pendingWrites=[],this.spawnResolve&&(this.spawnResolve(),this.spawnResolve=void 0,this.spawnReject=void 0);for(let r of t)this.write(r);this.pendingEndInput&&(this.pendingEndInput=!1,this.processStdin?.end())}spawnAbort(t){this.spawnReject&&(this.spawnReject(t),this.spawnReject=void 0,this.spawnResolve=void 0,this.pendingWrites=[])}updateEnv(t){this.options.env?Object.assign(this.options.env,t):this.options.env={...t}}getDefaultExecutable(){return wL()?"bun":"node"}spawnLocalProcess(t){let{command:r,args:n,cwd:i,env:a,signal:s}=t,o=Do(a.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr?"pipe":"ignore",c=Qne(r,n,{cwd:i,stdio:["pipe","pipe",o],signal:s,env:a,windowsHide:!0});return(Do(a.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr)&&c.stderr.on("data",u=>{let l=u.toString();Sa(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:t=[],agent:r,betas:n,cwd:i,executable:a=this.getDefaultExecutable(),executableArgs:s=[],extraArgs:o={},pathToClaudeCodeExecutable:c,env:u={...process.env},thinkingConfig:l,maxTurns:d,maxBudgetUsd:p,taskBudget:f,model:m,fallbackModel:v,jsonSchema:g,permissionMode:h,allowDangerouslySkipPermissions:_,permissionPromptToolName:y,continueConversation:b,resume:x,settingSources:w,allowedTools:k=[],disallowedTools:E=[],tools:O,mcpServers:U,strictMcpConfig:z,canUseTool:L,includePartialMessages:W,plugins:R,sandbox:re}=this.options,Q=["--output-format","stream-json","--verbose","--input-format","stream-json"];if(l){switch(l.type){case"enabled":l.budgetTokens===void 0?Q.push("--thinking","adaptive"):Q.push("--max-thinking-tokens",l.budgetTokens.toString());break;case"disabled":Q.push("--thinking","disabled");break;case"adaptive":Q.push("--thinking","adaptive");break}l.type!=="disabled"&&l.display&&Q.push("--thinking-display",l.display)}if(this.options.effort&&Q.push("--effort",this.options.effort),d&&Q.push("--max-turns",d.toString()),p!==void 0&&Q.push("--max-budget-usd",p.toString()),f&&Q.push("--task-budget",f.total.toString()),m&&Q.push("--model",m),r&&Q.push("--agent",r),n&&n.length>0&&Q.push("--betas",n.join(",")),g&&Q.push("--json-schema",jn(g)),this.options.debugFile?Q.push("--debug-file",this.options.debugFile):this.options.debug&&Q.push("--debug"),Do(u.DEBUG_CLAUDE_AGENT_SDK)&&Q.push("--debug-to-stderr"),L){if(y)throw Error("canUseTool callback cannot be used with permissionPromptToolName. Please use one or the other.");Q.push("--permission-prompt-tool","stdio")}else y&&Q.push("--permission-prompt-tool",y);if(b&&Q.push("--continue"),x&&Q.push("--resume",x),this.options.assistant&&Q.push("--assistant"),this.options.channels&&this.options.channels.length>0&&Q.push("--channels",...this.options.channels),k.length>0&&Q.push("--allowedTools",k.join(",")),E.length>0&&Q.push("--disallowedTools",E.join(",")),O!==void 0&&(Array.isArray(O)?O.length===0?Q.push("--tools",""):Q.push("--tools",O.join(",")):Q.push("--tools","default")),U&&Object.keys(U).length>0&&Q.push("--mcp-config",jn({mcpServers:U})),w!==void 0&&Q.push(`--setting-sources=${w.join(",")}`),z&&Q.push("--strict-mcp-config"),h&&Q.push("--permission-mode",h),_&&Q.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.");Q.push("--fallback-model",v)}this.options.includeHookEvents&&Q.push("--include-hook-events"),W&&Q.push("--include-partial-messages"),this.options.sessionMirror&&Q.push("--session-mirror");for(let A of t)Q.push("--add-dir",A);if(R&&R.length>0)for(let A of R)if(A.type==="local")Q.push("--plugin-dir",A.path);else throw Error(`Unsupported plugin type: ${A.type}`);this.options.forkSession&&Q.push("--fork-session"),this.options.resumeSessionAt&&Q.push("--resume-session-at",this.options.resumeSessionAt),this.options.sessionId&&Q.push("--session-id",this.options.sessionId),this.options.persistSession===!1&&Q.push("--no-session-persistence");let we={...o??{}};this.options.settings&&(we.settings=this.options.settings);let Ze=voe(we,re);for(let[A,$]of Object.entries(Ze))$===null?Q.push(`--${A}`):Q.push(`--${A}`,$);u.CLAUDE_CODE_ENTRYPOINT||(u.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),delete u.NODE_OPTIONS,Do(u.DEBUG_CLAUDE_AGENT_SDK)?u.DEBUG="1":delete u.DEBUG;let fe=xoe(c),V=fe?c:a,I=fe?[...s,...Q]:[...s,c,...Q],B={command:V,args:I,cwd:i,env:u,signal:this.abortController.signal};this.options.spawnClaudeCodeProcess?(Sa(`Spawning Claude Code (custom): ${V} ${I.join(" ")}`),this.process=this.options.spawnClaudeCodeProcess(B)):(Sa(`Spawning Claude Code: ${V} ${I.join(" ")}`),this.process=this.spawnLocalProcess(B)),this.processStdin=this.process.stdin,this.processStdout=this.process.stdout,boe(this.process),this.abortHandler=()=>{this.process&&!this.process.killed&&this.process.kill("SIGTERM")},this.abortController.signal.addEventListener("abort",this.abortHandler),this.process.on("error",A=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new Ms("Claude Code process aborted by user");else if(l1(A)){let $=fe?`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($),Sa(this.exitError.message)}else this.exitError=Error(`Failed to spawn Claude Code process: ${A.message}`),Sa(this.exitError.message)}),this.process.on("exit",(A,$)=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new Ms("Claude Code process aborted by user");else{let T=this.getProcessExitError(A,$);T&&(this.exitError=T,Sa(T.message))}}),this.ready=!0}catch(t){throw this.ready=!1,t}}getProcessExitError(t,r){if(t!==0&&t!==null)return Error(`Claude Code process exited with code ${t}`);if(r)return Error(`Claude Code process terminated by signal ${r}`)}write(t){if(this.abortController.signal.aborted)throw new Ms("Operation aborted");if(this.spawnResolve){this.pendingWrites.push(t);return}if(!this.ready||!this.processStdin)throw Error("ProcessTransport is not ready for writing");if(this.processStdin.writableEnded){Sa("[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}`);Sa(`[ProcessTransport] Writing to stdin: ${t.substring(0,100)}`);try{this.processStdin.write(t)||Sa("[ProcessTransport] Write buffer full, data queued")}catch(r){throw this.ready=!1,Error(`Failed to write to process stdin: ${Dv(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 t=this.process;t&&!t.killed&&t.exitCode===null?(setTimeout(r=>{r.killed||r.exitCode!==null||(r.kill("SIGTERM"),setTimeout(n=>{n.exitCode===null&&n.kill("SIGKILL")},5e3,r).unref())},yoe,t).unref(),t.once("exit",()=>dy.delete(t))):t&&dy.delete(t),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 t=Yne({input:this.processStdout}),r=this.process?(()=>{let n=this.process,i=()=>t.close();return n.on("error",i),()=>n.off("error",i)})():void 0;this.exitError&&t.close();try{for await(let n of t)if(n.trim()){let i;try{i=p1(n)}catch{Sa(`Non-JSON stdout: ${n}`);continue}yield i}if(this.exitError)throw this.exitError;await this.waitForExit()}catch(n){throw n}finally{r?.(),t.close()}}endInput(){if(this.spawnResolve){this.pendingEndInput=!0;return}this.processStdin&&this.processStdin.end()}getInputStream(){return this.processStdin}onExit(t){if(!this.process)return()=>{};let r=(n,i)=>{let a=this.getProcessExitError(n,i);t(a)};return this.process.on("exit",r),this.exitListeners.push({callback:t,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((t,r)=>{let n=(a,s)=>{if(this.abortController.signal.aborted){r(new Ms("Operation aborted"));return}let o=this.getProcessExitError(a,s);o?r(o):t()};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)})})}};qI=class{returned;queue=[];readResolve;readReject;isDone=!1;hasError;started=!1;constructor(t){this.returned=t}[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((t,r)=>{this.readResolve=t,this.readReject=r})}enqueue(t){if(this.readResolve){let r=this.readResolve;this.readResolve=void 0,this.readReject=void 0,r({done:!1,value:t})}else this.queue.push(t)}done(){if(this.isDone=!0,this.readResolve){let t=this.readResolve;this.readResolve=void 0,this.readReject=void 0,t({done:!0,value:void 0})}}error(t){if(this.hasError=t,this.readReject){let r=this.readReject;this.readResolve=void 0,this.readReject=void 0,r(t)}}return(){return this.isDone=!0,this.returned&&this.returned(),Promise.resolve({done:!0,value:void 0})}},ZI=class{sendMcpMessage;isClosed=!1;constructor(t){this.sendMcpMessage=t}onclose;onerror;onmessage;async start(){}async send(t){if(this.isClosed)throw Error("Transport is closed");this.sendMcpMessage(t)}async close(){this.isClosed||(this.isClosed=!0,this.onclose?.())}},FI=class{transport;isSingleUserTurn;canUseTool;hooks;abortController;jsonSchema;initConfig;onElicitation;getOAuthToken;pendingControlResponses=new Map;cleanupPerformed=!1;sdkMessages;inputStream=new qI;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(t){this.isSingleUserTurn=t}setTranscriptMirrorBatcher(t){this.transcriptMirrorBatcher=t}addCleanupCallback(t){this.cleanupPerformed?t():this.cleanupCallbacks.push(t)}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(t,r,n,i,a,s=new Map,o,c,u,l){this.transport=t,this.isSingleUserTurn=r,this.canUseTool=n,this.hooks=i,this.abortController=a,this.jsonSchema=o,this.initConfig=c,this.onElicitation=u,this.getOAuthToken=l;for(let[d,p]of s)this.connectSdkMcpServer(d,p);this.sdkMessages=this.readSdkMessages(),this.readMessages(),this.initialization=this.initialize(),this.initialization.catch(()=>{})}setError(t){this.inputStream.error(t)}async stopTask(t){await this.request({subtype:"stop_task",task_id:t})}close(){this.cleanup()}cleanup(t){return this.cleanupPromise?this.cleanupPromise:(this.cleanupPerformed=!0,this.cleanupPromise=this.performCleanup(t),this.cleanupPromise)}async performCleanup(t){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=t??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(),t?this.inputStream.error(t):this.inputStream.done()}catch{}}next(...[t]){return this.sdkMessages.next(t)}async return(t){return await this.cleanup(),this.sdkMessages.return(t)}async throw(t){return await this.cleanup(),this.sdkMessages.throw(t)}[Symbol.asyncIterator](){return this.sdkMessages}async[Symbol.asyncDispose](){await this.cleanup()}async readMessages(){try{for await(let t of this.transport.readMessages()){if(t.type==="control_response"){let r=this.pendingControlResponses.get(t.response.request_id);r&&r.handler(t.response);continue}else if(t.type==="control_request"){this.handleControlRequest(t);continue}else if(t.type==="control_cancel_request"){this.handleControlCancelRequest(t);continue}else{if(t.type==="keep_alive")continue;if(t.type==="transcript_mirror"){this.transcriptMirrorBatcher?.enqueue(t.filePath,t.entries);continue}}t.type==="system"&&t.subtype==="post_turn_summary"||(t.type==="result"?(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.lastErrorResultText=t.is_error?t.subtype==="success"?t.result:t.errors.join("; "):void 0,this.firstResultReceived=!0,this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.isSingleUserTurn&&(ai("[Query.readMessages] First result received for single-turn query, closing stdin"),this.transport.endInput())):t.type==="system"&&t.subtype==="session_state_changed"||(this.lastErrorResultText=void 0),this.inputStream.enqueue(t))}this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.inputStream.done(),this.cleanup()}catch(t){if(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.lastErrorResultText!==void 0&&!(t instanceof Ms)){let r=Error(`Claude Code returned an error result: ${this.lastErrorResultText}`);ai(`[Query.readMessages] Replacing exit error with result text. Original: ${Dv(t)}`),this.inputStream.error(r),this.cleanup(r);return}this.inputStream.error(t),this.cleanup(t)}}async handleControlRequest(t){let r=new AbortController;this.cancelControllers.set(t.request_id,r);try{let n=await this.processControlRequest(t,r.signal);if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"success",request_id:t.request_id,response:n}};await Promise.resolve(this.transport.write(jn(i)+`
187
+ `))}catch(n){if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"error",request_id:t.request_id,error:Dv(n)}};try{await Promise.resolve(this.transport.write(jn(i)+`
188
+ `))}catch(a){ai(`[Query.handleControlRequest] Error-response write failed: ${Dv(a)}`,{level:"error"})}}finally{this.cancelControllers.delete(t.request_id)}}handleControlCancelRequest(t){let r=this.cancelControllers.get(t.request_id);r&&(r.abort(),this.cancelControllers.delete(t.request_id))}async processControlRequest(t,r){if(t.request.subtype==="can_use_tool"){if(!this.canUseTool)throw Error("canUseTool callback is not provided.");return{...await this.canUseTool(t.request.tool_name,t.request.input,{signal:r,suggestions:t.request.permission_suggestions,blockedPath:t.request.blocked_path,decisionReason:t.request.decision_reason,title:t.request.title,displayName:t.request.display_name,description:t.request.description,toolUseID:t.request.tool_use_id,agentID:t.request.agent_id}),toolUseID:t.request.tool_use_id}}else{if(t.request.subtype==="hook_callback")return await this.handleHookCallbacks(t.request.callback_id,t.request.input,t.request.tool_use_id,r);if(t.request.subtype==="mcp_message"){let n=t.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(t.request.subtype==="elicitation"){let n=t.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(t.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: "+t.request.subtype)}async*readSdkMessages(){try{for await(let t of this.inputStream)yield t}finally{await this.cleanup()}}async initialize(){let t;if(this.hooks){t={};for(let[i,a]of Object.entries(this.hooks))a.length>0&&(t[i]=a.map(s=>{let o=[];for(let c of s.hooks){let u=`hook_${this.nextCallbackId++}`;this.hookCallbacks.set(u,c),o.push(u)}return{matcher:s.matcher,hookCallbackIds:o,timeout:s.timeout}}))}let r=this.sdkMcpTransports.size>0?Array.from(this.sdkMcpTransports.keys()):void 0,n={subtype:"initialize",hooks:t,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(t){await this.request({subtype:"set_permission_mode",mode:t})}async setModel(t){await this.request({subtype:"set_model",model:t})}async setMaxThinkingTokens(t){await this.request({subtype:"set_max_thinking_tokens",max_thinking_tokens:t})}async applyFlagSettings(t){await this.request({subtype:"apply_flag_settings",settings:t})}async getSettings(){return(await this.request({subtype:"get_settings"})).response}async rewindFiles(t,r){return(await this.request({subtype:"rewind_files",user_message_id:t,dry_run:r?.dryRun})).response}async cancelAsyncMessage(t){return(await this.request({subtype:"cancel_async_message",message_uuid:t})).response.cancelled}async seedReadState(t,r){await this.request({subtype:"seed_read_state",path:t,mtime:r})}async enableRemoteControl(t,r){return(await this.request({subtype:"remote_control",enabled:t,...r!==void 0&&{name:r}})).response}async generateSessionTitle(t,r){return(await this.request({subtype:"generate_session_title",description:t,persist:r?.persist})).response.title}async askSideQuestion(t){let r=(await this.request({subtype:"side_question",question:t})).response;return r.response===null?null:{response:r.response,synthetic:r.synthetic??!1}}processPendingPermissionRequests(t){for(let r of t)r.request.subtype==="can_use_tool"&&this.handleControlRequest(r).catch(()=>{})}request(t){let r=Math.random().toString(36).substring(2,15),n={request_id:r,type:"control_request",request:t};return new Promise((i,a)=>{this.pendingControlResponses.set(r,{handler:s=>{this.pendingControlResponses.delete(r),s.subtype==="success"?i(s):(a(Error(s.error)),s.pending_permission_requests&&this.processPendingPermissionRequests(s.pending_permission_requests))},reject:a}),Promise.resolve(this.transport.write(jn(n)+`
189
+ `)).catch(s=>{this.pendingControlResponses.delete(r),a(s)})})}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(t){await this.request({subtype:"mcp_reconnect",serverName:t})}async toggleMcpServer(t,r){await this.request({subtype:"mcp_toggle",serverName:t,enabled:r})}async enableChannel(t){await this.request({subtype:"channel_enable",serverName:t})}async mcpAuthenticate(t){return(await this.request({subtype:"mcp_authenticate",serverName:t})).response}async mcpClearAuth(t){return(await this.request({subtype:"mcp_clear_auth",serverName:t})).response}async mcpSubmitOAuthCallbackUrl(t,r){return(await this.request({subtype:"mcp_oauth_callback_url",serverName:t,callbackUrl:r})).response}async claudeAuthenticate(t){return(await this.request({subtype:"claude_authenticate",loginWithClaudeAi:t})).response}async claudeOAuthCallback(t,r){return(await this.request({subtype:"claude_oauth_callback",authorizationCode:t,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(t){let r={},n={};for(let[o,c]of Object.entries(t))c.type==="sdk"&&"instance"in c?r[o]=c.instance:n[o]=c;let i=new Set(this.sdkMcpServerInstances.keys()),a=new Set(Object.keys(r));for(let o of i)a.has(o)||await this.disconnectSdkMcpServer(o);for(let[o,c]of Object.entries(r))i.has(o)||this.connectSdkMcpServer(o,c);let s={};for(let o of Object.keys(r))s[o]={type:"sdk",name:o};return(await this.request({subtype:"mcp_set_servers",servers:{...n,...s}})).response}async accountInfo(){return(await this.initialization).account}async streamInput(t){ai("[Query.streamInput] Starting to process input stream");try{let r=0;for await(let n of t){if(r++,ai(`[Query.streamInput] Processing message ${r}: ${n.type}`),this.abortController?.signal.aborted)break;await Promise.resolve(this.transport.write(jn(n)+`
190
+ `))}ai(`[Query.streamInput] Finished processing ${r} messages from input stream`),r>0&&this.hasBidirectionalNeeds()&&(ai("[Query.streamInput] Has bidirectional needs, waiting for first result"),await this.waitForFirstResult()),ai("[Query] Calling transport.endInput() to close stdin to CLI process"),this.transport.endInput()}catch(r){if(!(r instanceof Ms))throw r}}waitForFirstResult(){return this.firstResultReceived?(ai("[Query.waitForFirstResult] Result already received, returning immediately"),Promise.resolve()):new Promise(t=>{if(this.abortController?.signal.aborted){t();return}this.abortController?.signal.addEventListener("abort",()=>t(),{once:!0}),this.firstResultReceivedResolve=t})}handleHookCallbacks(t,r,n,i){let a=this.hookCallbacks.get(t);if(!a)throw Error(`No hook callback found for ID: ${t}`);return a(r,n,{signal:i})}connectSdkMcpServer(t,r){let n=new ZI(i=>this.sendMcpServerMessageToCli(t,i));this.sdkMcpTransports.set(t,n),this.sdkMcpServerInstances.set(t,r),r.connect(n).catch(i=>{this.sdkMcpTransports.get(t)===n&&this.sdkMcpTransports.delete(t),this.sdkMcpServerInstances.get(t)===r&&this.sdkMcpServerInstances.delete(t),ai(`[Query.connectSdkMcpServer] Failed to connect MCP server '${t}': ${i}`,{level:"error"})})}async disconnectSdkMcpServer(t){let r=this.sdkMcpTransports.get(t);r&&(await r.close(),this.sdkMcpTransports.delete(t)),this.sdkMcpServerInstances.delete(t)}sendMcpServerMessageToCli(t,r){if("id"in r&&r.id!==null&&r.id!==void 0){let i=`${t}:${r.id}`,a=this.pendingMcpResponses.get(i);if(a){a.resolve(r),this.pendingMcpResponses.delete(i);return}}let n={type:"control_request",request_id:GL(),request:{subtype:"mcp_message",server_name:t,message:r}};Promise.resolve(this.transport.write(jn(n)+`
191
+ `)).catch(i=>{ai(`[Query.sendMcpServerMessageToCli] Transport write failed: ${i}`,{level:"error"})})}handleMcpControlRequest(t,r,n){let i="id"in r.message?r.message.id:null,a=`${t}:${i}`;return new Promise((s,o)=>{let c=()=>{this.pendingMcpResponses.delete(a)},u=d=>{c(),s(d)},l=d=>{c(),o(d)};if(this.pendingMcpResponses.set(a,{resolve:u,reject:l}),n.onmessage)n.onmessage(r.message);else{c(),o(Error("No message handler registered"));return}})}},VI=class{send;pending=[];flushPromise=null;constructor(t){this.send=t}enqueue(t,r){this.pending.push({filePath:t,entries:r})}async flush(){this.flushPromise&&await this.flushPromise;let t=this.pending.splice(0);t.length!==0&&(this.flushPromise=this.doFlush(t),await this.flushPromise,this.flushPromise=null)}async doFlush(t){let r=new Map;for(let n of t){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){ai(`[TranscriptMirrorBatcher] flush failed for ${n}: ${a}`,{level:"error"})}}},Y2e=Soe(koe);Eoe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;LM=200;J2e=Buffer.from('{"type":"attribution-snapshot"'),X2e=Buffer.from('{"type":"system"'),Ooe=10,e6e=Buffer.from([Ooe]);joe="user:inference",tq="user:profile",Aoe="org:create_api_key",Roe=[Aoe,tq],Uoe=[tq,joe,"user:sessions:claude_code","user:mcp_servers","user:file_upload"],n6e=Array.from(new Set([...Roe,...Uoe])),qM={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}"},Doe=void 0;Loe=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];Zoe="-credentials";(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw Error()}e.assertNever=r,e.arrayToEnum=i=>{let a={};for(let s of i)a[s]=s;return a},e.getValidEnumValues=i=>{let a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(let o of a)s[o]=i[o];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(let s of i)if(a(s))return s},e.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(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(zt||(zt={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ZM||(ZM={}));_e=zt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ds=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return Number.isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},ee=zt.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"]),wi=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(let s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let o=n,c=0;for(;c<s.path.length;){let u=s.path[c];c!==s.path.length-1?o[u]=o[u]||{_errors:[]}:(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(s))),o=o[u],c++}}};return i(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,zt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=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(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};wi.create=e=>new wi(e);Boe=(e,t)=>{let r;switch(e.code){case ee.invalid_type:e.received===_e.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,zt.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${zt.joinValues(e.keys,", ")}`;break;case ee.invalid_union:r="Invalid input";break;case ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${zt.joinValues(e.options)}`;break;case ee.invalid_enum_value:r=`Invalid enum value. Expected ${zt.joinValues(e.options)}, received '${e.received}'`;break;case ee.invalid_arguments:r="Invalid function arguments";break;case ee.invalid_return_type:r="Invalid function return type";break;case ee.invalid_date:r="Invalid date";break;case ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:zt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ee.custom:r="Invalid input";break;case ee.invalid_intersection_types:r="Intersection results could not be merged";break;case ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,zt.assertNever(e)}return{message:r}},cf=Boe,Woe=cf;WI=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)o=u(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};wn=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return De;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let a=await i.key,s=await i.value;n.push({key:a,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return De;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[a.value]=s.value)}return{status:t.value,value:n}}},De=Object.freeze({status:"aborted"}),Xp=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),FM=e=>e.status==="aborted",VM=e=>e.status==="dirty",Uu=e=>e.status==="valid",py=e=>typeof Promise<"u"&&e instanceof Promise;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Se||(Se={}));ki=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,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}},BM=(e,t)=>{if(Uu(t))return{success:!0,data:t.value};if(!e.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 wi(e.common.issues);return this._error=r,this._error}}};st=class{get description(){return this._def.description}_getType(t){return Ds(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ds(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new wn,ctx:{common:t.parent.common,data:t.data,parsedType:Ds(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(py(r))throw Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ds(t)},i=this._parseSync({data:t,path:n.path,parent:n});return BM(n,i)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ds(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Uu(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:t,path:[],parent:r}).then(n=>Uu(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ds(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(py(i)?i:Promise.resolve(i));return BM(n,a)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let s=t(i),o=()=>a.addIssue({code:ee.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new ea({schema:this,typeName:Me.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Ji.create(this,this._def)}nullable(){return ts.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zs.create(this)}promise(){return Vo.create(this,this._def)}or(t){return qu.create([this,t],this._def)}and(t){return Zu.create(this,t,this._def)}transform(t){return new ea({...Qe(this._def),schema:this,typeName:Me.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Ku({...Qe(this._def),innerType:this,defaultValue:r,typeName:Me.ZodDefault})}brand(){return new fy({typeName:Me.ZodBranded,type:this,...Qe(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Gu({...Qe(this._def),innerType:this,catchValue:r,typeName:Me.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return my.create(this,t)}readonly(){return Hu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Koe=/^c[^\s-]{8,}$/i,Goe=/^[0-9a-z]+$/,Hoe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qoe=/^[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,Yoe=/^[a-z0-9_-]{21}$/i,Joe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Xoe=/^[-+]?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)?)??$/,ece=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tce="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",rce=/^(?:(?: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])$/,nce=/^(?:(?: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])$/,ice=/^(([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]))$/,ace=/^(([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])$/,sce=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,rq="((\\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])))",cce=new RegExp(`^${rq}$`);Du=class e extends st{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){let i=this._getOrReturnCtx(t);return de(i,{code:ee.invalid_type,expected:_e.string,received:i.parsedType}),De}let r=new wn,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),de(n,{code:ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),de(n,{code:ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(n=this._getOrReturnCtx(t,n),a?de(n,{code:ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&de(n,{code:ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")ece.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"email",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")SI||(SI=new RegExp(tce,"u")),SI.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"emoji",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Qoe.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"uuid",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Yoe.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"nanoid",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Koe.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"cuid",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Goe.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"cuid2",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Hoe.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"ulid",code:ee.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),de(n,{validation:"url",code:ee.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,!i.regex.test(t.data)&&(n=this._getOrReturnCtx(t,n),de(n,{validation:"regex",code:ee.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),de(n,{code:ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),de(n,{code:ee.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),de(n,{code:ee.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?lce(i).test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{code:ee.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?cce.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{code:ee.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?uce(i).test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{code:ee.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Xoe.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"duration",code:ee.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?dce(t.data,i.version)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"ip",code:ee.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?pce(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"jwt",code:ee.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?fce(t.data,i.version)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"cidr",code:ee.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?sce.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"base64",code:ee.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?oce.test(t.data)||(n=this._getOrReturnCtx(t,n),de(n,{validation:"base64url",code:ee.invalid_string,message:i.message}),r.dirty()):zt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:ee.invalid_string,...Se.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Se.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Se.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Se.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Se.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Se.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Se.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Se.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Se.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Se.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Se.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Se.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Se.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Se.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Se.errToObj(r)})}nonempty(t){return this.min(1,Se.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Du.create=e=>new Du({checks:[],typeName:Me.ZodString,coerce:e?.coerce??!1,...Qe(e)});uf=class e extends st{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_e.number){let i=this._getOrReturnCtx(t);return de(i,{code:ee.invalid_type,expected:_e.number,received:i.parsedType}),De}let r,n=new wn;for(let i of this._def.checks)i.kind==="int"?zt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:ee.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?mce(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),de(r,{code:ee.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),de(r,{code:ee.not_finite,message:i.message}),n.dirty()):zt.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Se.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Se.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Se.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Se.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Se.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&zt.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};uf.create=e=>new uf({checks:[],typeName:Me.ZodNumber,coerce:e?.coerce||!1,...Qe(e)});lf=class e extends st{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_e.bigint)return this._getInvalidInput(t);let r,n=new wn;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),de(r,{code:ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),de(r,{code:ee.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):zt.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.bigint,received:r.parsedType}),De}gte(t,r){return this.setLimit("min",t,!0,Se.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Se.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Se.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Se.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Se.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};lf.create=e=>new lf({checks:[],typeName:Me.ZodBigInt,coerce:e?.coerce??!1,...Qe(e)});df=class extends st{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.boolean,received:r.parsedType}),De}return An(t.data)}};df.create=e=>new df({typeName:Me.ZodBoolean,coerce:e?.coerce||!1,...Qe(e)});pf=class e extends st{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){let i=this._getOrReturnCtx(t);return de(i,{code:ee.invalid_type,expected:_e.date,received:i.parsedType}),De}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return de(i,{code:ee.invalid_date}),De}let r=new wn,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),de(n,{code:ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),de(n,{code:ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):zt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Se.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Se.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};pf.create=e=>new pf({checks:[],coerce:e?.coerce||!1,typeName:Me.ZodDate,...Qe(e)});ff=class extends st{_parse(t){if(this._getType(t)!==_e.symbol){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.symbol,received:r.parsedType}),De}return An(t.data)}};ff.create=e=>new ff({typeName:Me.ZodSymbol,...Qe(e)});Mu=class extends st{_parse(t){if(this._getType(t)!==_e.undefined){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.undefined,received:r.parsedType}),De}return An(t.data)}};Mu.create=e=>new Mu({typeName:Me.ZodUndefined,...Qe(e)});Lu=class extends st{_parse(t){if(this._getType(t)!==_e.null){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.null,received:r.parsedType}),De}return An(t.data)}};Lu.create=e=>new Lu({typeName:Me.ZodNull,...Qe(e)});mf=class extends st{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}};mf.create=e=>new mf({typeName:Me.ZodAny,...Qe(e)});Ls=class extends st{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}};Ls.create=e=>new Ls({typeName:Me.ZodUnknown,...Qe(e)});$a=class extends st{_parse(t){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.never,received:r.parsedType}),De}};$a.create=e=>new $a({typeName:Me.ZodNever,...Qe(e)});hf=class extends st{_parse(t){if(this._getType(t)!==_e.undefined){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.void,received:r.parsedType}),De}return An(t.data)}};hf.create=e=>new hf({typeName:Me.ZodVoid,...Qe(e)});Zs=class e extends st{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==_e.array)return de(r,{code:ee.invalid_type,expected:_e.array,received:r.parsedType}),De;if(i.exactLength!==null){let s=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(s||o)&&(de(r,{code:s?ee.too_big:ee.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?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&&(de(r,{code:ee.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&&(de(r,{code:ee.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((s,o)=>i.type._parseAsync(new ki(r,s,r.path,o)))).then(s=>wn.mergeArray(n,s));let a=[...r.data].map((s,o)=>i.type._parseSync(new ki(r,s,r.path,o)));return wn.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Se.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Se.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Se.toString(r)}})}nonempty(t){return this.min(1,t)}};Zs.create=(e,t)=>new Zs({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Me.ZodArray,...Qe(t)});ui=class e extends st{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=zt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==_e.object){let c=this._getOrReturnCtx(t);return de(c,{code:ee.invalid_type,expected:_e.object,received:c.parsedType}),De}let{status:r,ctx:n}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof $a&&this._def.unknownKeys==="strip"))for(let c in n.data)a.includes(c)||s.push(c);let o=[];for(let c of a){let u=i[c],l=n.data[c];o.push({key:{status:"valid",value:c},value:u._parse(new ki(n,l,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof $a){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)o.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")s.length>0&&(de(n,{code:ee.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let l=n.data[u];o.push({key:{status:"valid",value:u},value:c._parse(new ki(n,l,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of o){let l=await u.key,d=await u.value;c.push({key:l,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>wn.mergeObjectSync(r,c)):wn.mergeObjectSync(r,o)}get shape(){return this._def.shape()}strict(t){return Se.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Se.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Me.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of zt.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of zt.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Tu(this)}partial(t){let r={};for(let n of zt.objectKeys(this.shape)){let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of zt.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ji;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return iq(zt.objectKeys(this.shape))}};ui.create=(e,t)=>new ui({shape:()=>e,unknownKeys:"strip",catchall:$a.create(),typeName:Me.ZodObject,...Qe(t)});ui.strictCreate=(e,t)=>new ui({shape:()=>e,unknownKeys:"strict",catchall:$a.create(),typeName:Me.ZodObject,...Qe(t)});ui.lazycreate=(e,t)=>new ui({shape:e,unknownKeys:"strip",catchall:$a.create(),typeName:Me.ZodObject,...Qe(t)});qu=class extends st{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(o=>new wi(o.ctx.common.issues));return de(r,{code:ee.invalid_union,unionErrors:s}),De}if(r.common.async)return Promise.all(n.map(async a=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let a,s=[];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&&s.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(c=>new wi(c));return de(r,{code:ee.invalid_union,unionErrors:o}),De}}get options(){return this._def.options}};qu.create=(e,t)=>new qu({options:e,typeName:Me.ZodUnion,...Qe(t)});Ya=e=>e instanceof Fu?Ya(e.schema):e instanceof ea?Ya(e.innerType()):e instanceof Vu?[e.value]:e instanceof Bu?e.options:e instanceof Wu?zt.objectValues(e.enum):e instanceof Ku?Ya(e._def.innerType):e instanceof Mu?[void 0]:e instanceof Lu?[null]:e instanceof Ji?[void 0,...Ya(e.unwrap())]:e instanceof ts?[null,...Ya(e.unwrap())]:e instanceof fy||e instanceof Hu?Ya(e.unwrap()):e instanceof Gu?Ya(e._def.innerType):[],KI=class e extends st{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.object)return de(r,{code:ee.invalid_type,expected:_e.object,received:r.parsedType}),De;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}):(de(r,{code:ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let a of r){let s=Ya(a.shape[t]);if(!s.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let o of s){if(i.has(o))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,a)}}return new e({typeName:Me.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...Qe(n)})}};Zu=class extends st{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(a,s)=>{if(FM(a)||FM(s))return De;let o=GI(a.value,s.value);return o.valid?((VM(a)||VM(s))&&r.dirty(),{status:r.value,value:o.data}):(de(n,{code:ee.invalid_intersection_types}),De)};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,s])=>i(a,s)):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}))}};Zu.create=(e,t,r)=>new Zu({left:e,right:t,typeName:Me.ZodIntersection,...Qe(r)});es=class e extends st{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.array)return de(n,{code:ee.invalid_type,expected:_e.array,received:n.parsedType}),De;if(n.data.length<this._def.items.length)return de(n,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),De;!this._def.rest&&n.data.length>this._def.items.length&&(de(n,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((a,s)=>{let o=this._def.items[s]||this._def.rest;return o?o._parse(new ki(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>wn.mergeArray(r,a)):wn.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};es.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new es({items:e,typeName:Me.ZodTuple,rest:null,...Qe(t)})};HI=class e extends st{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.object)return de(n,{code:ee.invalid_type,expected:_e.object,received:n.parsedType}),De;let i=[],a=this._def.keyType,s=this._def.valueType;for(let o in n.data)i.push({key:a._parse(new ki(n,o,n.path,o)),value:s._parse(new ki(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?wn.mergeObjectAsync(r,i):wn.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof st?new e({keyType:t,valueType:r,typeName:Me.ZodRecord,...Qe(n)}):new e({keyType:Du.create(),valueType:t,typeName:Me.ZodRecord,...Qe(r)})}},gf=class extends st{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.map)return de(n,{code:ee.invalid_type,expected:_e.map,received:n.parsedType}),De;let i=this._def.keyType,a=this._def.valueType,s=[...n.data.entries()].map(([o,c],u)=>({key:i._parse(new ki(n,o,n.path,[u,"key"])),value:a._parse(new ki(n,c,n.path,[u,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return De;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(u.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let c of s){let{key:u,value:l}=c;if(u.status==="aborted"||l.status==="aborted")return De;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(u.value,l.value)}return{status:r.value,value:o}}}};gf.create=(e,t,r)=>new gf({valueType:t,keyType:e,typeName:Me.ZodMap,...Qe(r)});vf=class e extends st{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.set)return de(n,{code:ee.invalid_type,expected:_e.set,received:n.parsedType}),De;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(de(n,{code:ee.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&&(de(n,{code:ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let a=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return De;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let o=[...n.data.values()].map((c,u)=>a._parse(new ki(n,c,n.path,u)));return n.common.async?Promise.all(o).then(c=>s(c)):s(o)}min(t,r){return new e({...this._def,minSize:{value:t,message:Se.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Se.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};vf.create=(e,t)=>new vf({valueType:e,minSize:null,maxSize:null,typeName:Me.ZodSet,...Qe(t)});QI=class e extends st{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.function)return de(r,{code:ee.invalid_type,expected:_e.function,received:r.parsedType}),De;function n(o,c){return WI({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,BI(),cf].filter(u=>!!u),issueData:{code:ee.invalid_arguments,argumentsError:c}})}function i(o,c){return WI({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,BI(),cf].filter(u=>!!u),issueData:{code:ee.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Vo){let o=this;return An(async function(...c){let u=new wi([]),l=await o._def.args.parseAsync(c,a).catch(p=>{throw u.addIssue(n(c,p)),u}),d=await Reflect.apply(s,this,l);return await o._def.returns._def.type.parseAsync(d,a).catch(p=>{throw u.addIssue(i(d,p)),u})})}else{let o=this;return An(function(...c){let u=o._def.args.safeParse(c,a);if(!u.success)throw new wi([n(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=o._def.returns.safeParse(l,a);if(!d.success)throw new wi([i(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:es.create(t).rest(Ls.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||es.create([]).rest(Ls.create()),returns:r||Ls.create(),typeName:Me.ZodFunction,...Qe(n)})}},Fu=class extends st{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Fu.create=(e,t)=>new Fu({getter:e,typeName:Me.ZodLazy,...Qe(t)});Vu=class extends st{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return de(r,{received:r.data,code:ee.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}};Vu.create=(e,t)=>new Vu({value:e,typeName:Me.ZodLiteral,...Qe(t)});Bu=class e extends st{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return de(r,{expected:zt.joinValues(n),received:r.parsedType,code:ee.invalid_type}),De}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return de(r,{received:r.data,code:ee.invalid_enum_value,options:n}),De}return An(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Bu.create=iq;Wu=class extends st{_parse(t){let r=zt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==_e.string&&n.parsedType!==_e.number){let i=zt.objectValues(r);return de(n,{expected:zt.joinValues(i),received:n.parsedType,code:ee.invalid_type}),De}if(this._cache||(this._cache=new Set(zt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let i=zt.objectValues(r);return de(n,{received:n.data,code:ee.invalid_enum_value,options:i}),De}return An(t.data)}get enum(){return this._def.values}};Wu.create=(e,t)=>new Wu({values:e,typeName:Me.ZodNativeEnum,...Qe(t)});Vo=class extends st{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.promise&&r.common.async===!1)return de(r,{code:ee.invalid_type,expected:_e.promise,received:r.parsedType}),De;let n=r.parsedType===_e.promise?r.data:Promise.resolve(r.data);return An(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Vo.create=(e,t)=>new Vo({type:e,typeName:Me.ZodPromise,...Qe(t)});ea=class extends st{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:s=>{de(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let s=i.transform(n.data,a);if(n.common.async)return Promise.resolve(s).then(async o=>{if(r.value==="aborted")return De;let c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?De:c.status==="dirty"||r.value==="dirty"?Xp(c.value):c});{if(r.value==="aborted")return De;let o=this._def.schema._parseSync({data:s,path:n.path,parent:n});return o.status==="aborted"?De:o.status==="dirty"||r.value==="dirty"?Xp(o.value):o}}if(i.type==="refinement"){let s=o=>{let c=i.refinement(o,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 o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?De:(o.status==="dirty"&&r.dirty(),s(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?De:(o.status==="dirty"&&r.dirty(),s(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Uu(s))return De;let o=i.transform(s.value,a);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Uu(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:r.value,value:o})):De);zt.assertNever(i)}};ea.create=(e,t,r)=>new ea({schema:e,typeName:Me.ZodEffects,effect:t,...Qe(r)});ea.createWithPreprocess=(e,t,r)=>new ea({schema:t,effect:{type:"preprocess",transform:e},typeName:Me.ZodEffects,...Qe(r)});Ji=class extends st{_parse(t){return this._getType(t)===_e.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ji.create=(e,t)=>new Ji({innerType:e,typeName:Me.ZodOptional,...Qe(t)});ts=class extends st{_parse(t){return this._getType(t)===_e.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ts.create=(e,t)=>new ts({innerType:e,typeName:Me.ZodNullable,...Qe(t)});Ku=class extends st{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===_e.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ku.create=(e,t)=>new Ku({innerType:e,typeName:Me.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Qe(t)});Gu=class extends st{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return py(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new wi(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Gu.create=(e,t)=>new Gu({innerType:e,typeName:Me.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Qe(t)});yf=class extends st{_parse(t){if(this._getType(t)!==_e.nan){let r=this._getOrReturnCtx(t);return de(r,{code:ee.invalid_type,expected:_e.nan,received:r.parsedType}),De}return{status:"valid",value:t.data}}};yf.create=e=>new yf({typeName:Me.ZodNaN,...Qe(e)});fy=class extends st{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},my=class e extends st{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?De:i.status==="dirty"?(r.dirty(),Xp(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"?De:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:Me.ZodPipeline})}},Hu=class extends st{_parse(t){let r=this._def.innerType._parse(t),n=i=>(Uu(i)&&(i.value=Object.freeze(i.value)),i);return py(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};Hu.create=(e,t)=>new Hu({innerType:e,typeName:Me.ZodReadonly,...Qe(t)});i6e={object:ui.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Me||(Me={}));a6e=Du.create,s6e=uf.create,o6e=yf.create,c6e=lf.create,u6e=df.create,l6e=pf.create,d6e=ff.create,p6e=Mu.create,f6e=Lu.create,m6e=mf.create,h6e=Ls.create,g6e=$a.create,v6e=hf.create,y6e=Zs.create,_6e=ui.create,b6e=ui.strictCreate,x6e=qu.create,w6e=KI.create,k6e=Zu.create,S6e=es.create,$6e=HI.create,E6e=gf.create,I6e=vf.create,P6e=QI.create,T6e=Fu.create,O6e=Vu.create,z6e=Bu.create,C6e=Wu.create,N6e=Vo.create,j6e=ea.create,A6e=Ji.create,R6e=ts.create,U6e=ea.createWithPreprocess,D6e=my.create,aq={};Ko(aq,{version:()=>gZ,util:()=>_t,treeifyError:()=>vq,toJSONSchema:()=>u9,toDotPath:()=>yq,safeParseAsync:()=>S1,safeParse:()=>w1,registry:()=>M1,regexes:()=>$1,prettifyError:()=>_q,parseAsync:()=>yy,parse:()=>vy,locales:()=>D1,isValidJWT:()=>LZ,isValidBase64URL:()=>UZ,isValidBase64:()=>T1,globalRegistry:()=>Mo,globalConfig:()=>hy,function:()=>c9,formatError:()=>y1,flattenError:()=>v1,config:()=>kn,clone:()=>na,_xid:()=>Y1,_void:()=>KF,_uuidv7:()=>V1,_uuidv6:()=>F1,_uuidv4:()=>Z1,_uuid:()=>q1,_url:()=>B1,_uppercase:()=>lP,_unknown:()=>wy,_union:()=>hle,_undefined:()=>FF,_ulid:()=>Q1,_uint64:()=>qF,_uint32:()=>AF,_tuple:()=>r9,_trim:()=>gP,_transform:()=>Sle,_toUpperCase:()=>yP,_toLowerCase:()=>vP,_templateLiteral:()=>Nle,_symbol:()=>ZF,_success:()=>Tle,_stringbool:()=>s9,_stringFormat:()=>o9,_string:()=>wF,_startsWith:()=>pP,_size:()=>oP,_set:()=>ble,_safeParseAsync:()=>k1,_safeParse:()=>x1,_regex:()=>cP,_refine:()=>a9,_record:()=>yle,_readonly:()=>Cle,_property:()=>t9,_promise:()=>Ale,_positive:()=>YF,_pipe:()=>zle,_parseAsync:()=>b1,_parse:()=>_1,_overwrite:()=>Qo,_optional:()=>$le,_number:()=>TF,_nullable:()=>Ele,_null:()=>VF,_normalize:()=>hP,_nonpositive:()=>XF,_nonoptional:()=>Ple,_nonnegative:()=>e9,_never:()=>WF,_negative:()=>JF,_nativeEnum:()=>wle,_nanoid:()=>K1,_nan:()=>QF,_multipleOf:()=>wf,_minSize:()=>kf,_minLength:()=>Yu,_min:()=>si,_mime:()=>mP,_maxSize:()=>My,_maxLength:()=>Ly,_max:()=>Xi,_map:()=>_le,_lte:()=>Xi,_lt:()=>Bo,_lowercase:()=>uP,_literal:()=>kle,_length:()=>qy,_lazy:()=>jle,_ksuid:()=>J1,_jwt:()=>sP,_isoTime:()=>IF,_isoDuration:()=>PF,_isoDateTime:()=>$F,_isoDate:()=>EF,_ipv6:()=>eP,_ipv4:()=>X1,_intersection:()=>vle,_int64:()=>LF,_int32:()=>jF,_int:()=>zF,_includes:()=>dP,_guid:()=>xy,_gte:()=>si,_gt:()=>Wo,_float64:()=>NF,_float32:()=>CF,_file:()=>n9,_enum:()=>xle,_endsWith:()=>fP,_emoji:()=>W1,_email:()=>L1,_e164:()=>aP,_discriminatedUnion:()=>gle,_default:()=>Ile,_date:()=>GF,_custom:()=>i9,_cuid2:()=>H1,_cuid:()=>G1,_coercedString:()=>kF,_coercedNumber:()=>OF,_coercedDate:()=>HF,_coercedBoolean:()=>UF,_coercedBigint:()=>MF,_cidrv6:()=>rP,_cidrv4:()=>tP,_catch:()=>Ole,_boolean:()=>RF,_bigint:()=>DF,_base64url:()=>iP,_base64:()=>nP,_array:()=>_P,_any:()=>BF,TimePrecision:()=>SF,NEVER:()=>sq,JSONSchemaGenerator:()=>Sf,JSONSchema:()=>Rle,Doc:()=>_y,$output:()=>bF,$input:()=>xF,$constructor:()=>D,$brand:()=>oq,$ZodXID:()=>EZ,$ZodVoid:()=>QZ,$ZodUnknown:()=>by,$ZodUnion:()=>A1,$ZodUndefined:()=>WZ,$ZodUUID:()=>yZ,$ZodURL:()=>bZ,$ZodULID:()=>$Z,$ZodType:()=>Ge,$ZodTuple:()=>Dy,$ZodTransform:()=>R1,$ZodTemplateLiteral:()=>hF,$ZodSymbol:()=>BZ,$ZodSuccess:()=>dF,$ZodStringFormat:()=>tr,$ZodString:()=>Pf,$ZodSet:()=>rF,$ZodRegistry:()=>xf,$ZodRecord:()=>eF,$ZodRealError:()=>Ef,$ZodReadonly:()=>mF,$ZodPromise:()=>gF,$ZodPrefault:()=>uF,$ZodPipe:()=>U1,$ZodOptional:()=>sF,$ZodObject:()=>j1,$ZodNumberFormat:()=>FZ,$ZodNumber:()=>O1,$ZodNullable:()=>oF,$ZodNull:()=>KZ,$ZodNonOptional:()=>lF,$ZodNever:()=>HZ,$ZodNanoID:()=>wZ,$ZodNaN:()=>fF,$ZodMap:()=>tF,$ZodLiteral:()=>iF,$ZodLazy:()=>vF,$ZodKSUID:()=>IZ,$ZodJWT:()=>qZ,$ZodIntersection:()=>XZ,$ZodISOTime:()=>OZ,$ZodISODuration:()=>zZ,$ZodISODateTime:()=>PZ,$ZodISODate:()=>TZ,$ZodIPv6:()=>NZ,$ZodIPv4:()=>CZ,$ZodGUID:()=>vZ,$ZodFunction:()=>ky,$ZodFile:()=>aF,$ZodError:()=>g1,$ZodEnum:()=>nF,$ZodEmoji:()=>xZ,$ZodEmail:()=>_Z,$ZodE164:()=>MZ,$ZodDiscriminatedUnion:()=>JZ,$ZodDefault:()=>cF,$ZodDate:()=>YZ,$ZodCustomStringFormat:()=>ZZ,$ZodCustom:()=>yF,$ZodCheckUpperCase:()=>uZ,$ZodCheckStringFormat:()=>If,$ZodCheckStartsWith:()=>dZ,$ZodCheckSizeEquals:()=>nZ,$ZodCheckRegex:()=>oZ,$ZodCheckProperty:()=>fZ,$ZodCheckOverwrite:()=>hZ,$ZodCheckNumberFormat:()=>Xq,$ZodCheckMultipleOf:()=>Jq,$ZodCheckMinSize:()=>rZ,$ZodCheckMinLength:()=>aZ,$ZodCheckMimeType:()=>mZ,$ZodCheckMaxSize:()=>tZ,$ZodCheckMaxLength:()=>iZ,$ZodCheckLowerCase:()=>cZ,$ZodCheckLessThan:()=>I1,$ZodCheckLengthEquals:()=>sZ,$ZodCheckIncludes:()=>lZ,$ZodCheckGreaterThan:()=>P1,$ZodCheckEndsWith:()=>pZ,$ZodCheckBigIntFormat:()=>eZ,$ZodCheck:()=>br,$ZodCatch:()=>pF,$ZodCUID2:()=>SZ,$ZodCUID:()=>kZ,$ZodCIDRv6:()=>AZ,$ZodCIDRv4:()=>jZ,$ZodBoolean:()=>z1,$ZodBigIntFormat:()=>VZ,$ZodBigInt:()=>C1,$ZodBase64URL:()=>DZ,$ZodBase64:()=>RZ,$ZodAsyncError:()=>Fs,$ZodArray:()=>N1,$ZodAny:()=>GZ});sq=Object.freeze({status:"aborted"});oq=Symbol("zod_brand"),Fs=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},hy={};_t={};Ko(_t,{unwrapMessage:()=>ef,stringifyPrimitive:()=>et,required:()=>zce,randomString:()=>wce,propertyKeyTypes:()=>gy,promiseAllObject:()=>xce,primitiveTypes:()=>dq,prefixIssues:()=>xi,pick:()=>Ece,partial:()=>Oce,optionalKeys:()=>pq,omit:()=>Ice,numKeys:()=>kce,nullish:()=>Go,normalizeParams:()=>ne,merge:()=>Tce,jsonStringifyReplacer:()=>cq,joinValues:()=>oe,issue:()=>hq,isPlainObject:()=>bf,isObject:()=>_f,getSizableOrigin:()=>Ry,getParsedType:()=>Sce,getLengthableOrigin:()=>Uy,getEnumValues:()=>f1,getElementAtPath:()=>bce,floatSafeRemainder:()=>uq,finalizeIssue:()=>ta,extend:()=>Pce,escapeRegex:()=>Ho,esc:()=>Ou,defineLazy:()=>Mt,createTransparentProxy:()=>$ce,clone:()=>na,cleanRegex:()=>Ay,cleanEnum:()=>Cce,captureStackTrace:()=>h1,cached:()=>jy,assignProp:()=>m1,assertNotEqual:()=>gce,assertNever:()=>yce,assertIs:()=>vce,assertEqual:()=>hce,assert:()=>_ce,allowsEval:()=>lq,aborted:()=>ju,NUMBER_FORMAT_RANGES:()=>fq,Class:()=>YI,BIGINT_FORMAT_RANGES:()=>mq});h1=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};lq=jy(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});Sce=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw Error(`Unknown data type: ${t}`)}},gy=new Set(["string","number","symbol"]),dq=new Set(["string","number","bigint","boolean","symbol","undefined"]);fq={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]},mq={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};YI=class{constructor(...t){}},gq=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,cq,2)},enumerable:!0})},g1=D("$ZodError",gq),Ef=D("$ZodError",gq,{Parent:Error});_1=e=>(t,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Fs;if(s.issues.length){let o=new(i?.Err??e)(s.issues.map(c=>ta(c,a,kn())));throw h1(o,i?.callee),o}return s.value},vy=_1(Ef),b1=e=>async(t,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let o=new(i?.Err??e)(s.issues.map(c=>ta(c,a,kn())));throw h1(o,i?.callee),o}return s.value},yy=b1(Ef),x1=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Fs;return a.issues.length?{success:!1,error:new(e??g1)(a.issues.map(s=>ta(s,i,kn())))}:{success:!0,data:a.value}},w1=x1(Ef),k1=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>ta(s,i,kn())))}:{success:!0,data:a.value}},S1=k1(Ef),$1={};Ko($1,{xid:()=>kq,uuid7:()=>Rce,uuid6:()=>Ace,uuid4:()=>jce,uuid:()=>Qu,uppercase:()=>Qq,unicodeEmail:()=>Mce,undefined:()=>Gq,ulid:()=>wq,time:()=>Lq,string:()=>Zq,rfc5322Email:()=>Dce,number:()=>Bq,null:()=>Kq,nanoid:()=>$q,lowercase:()=>Hq,ksuid:()=>Sq,ipv6:()=>zq,ipv4:()=>Oq,integer:()=>Vq,html5Email:()=>Uce,hostname:()=>Aq,guid:()=>Iq,extendedDuration:()=>Nce,emoji:()=>Tq,email:()=>Pq,e164:()=>Rq,duration:()=>Eq,domain:()=>Zce,datetime:()=>qq,date:()=>Dq,cuid2:()=>xq,cuid:()=>bq,cidrv6:()=>Nq,cidrv4:()=>Cq,browserEmail:()=>Lce,boolean:()=>Wq,bigint:()=>Fq,base64url:()=>E1,base64:()=>jq,_emoji:()=>qce});bq=/^[cC][^\s-]{8,}$/,xq=/^[0-9a-z]+$/,wq=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kq=/^[0-9a-vA-V]{20}$/,Sq=/^[A-Za-z0-9]{27}$/,$q=/^[a-zA-Z0-9_-]{21}$/,Eq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nce=/^[-+]?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)?)??$/,Iq=/^([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})$/,Qu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,jce=Qu(4),Ace=Qu(6),Rce=Qu(7),Pq=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uce=/^[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])?)*$/,Dce=/^(([^<>()\[\]\\.,;:\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,}))$/,Mce=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Lce=/^[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])?)*$/,qce="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Oq=/^(?:(?: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])$/,zq=/^(([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})$/,Cq=/^((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])$/,Nq=/^(([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])$/,jq=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,E1=/^[A-Za-z0-9_-]*$/,Aq=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Zce=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Rq=/^\+(?:[0-9]){6,14}[0-9]$/,Uq="(?:(?:\\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])))",Dq=new RegExp(`^${Uq}$`);Zq=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Fq=/^\d+n?$/,Vq=/^\d+$/,Bq=/^-?\d+(?:\.\d+)?/i,Wq=/true|false/i,Kq=/null/i,Gq=/undefined/i,Hq=/^[^A-Z]*$/,Qq=/^[^a-z]*$/,br=D("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Yq={number:"number",bigint:"bigint",object:"date"},I1=D("$ZodCheckLessThan",(e,t)=>{br.init(e,t);let r=Yq[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,a=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),P1=D("$ZodCheckGreaterThan",(e,t)=>{br.init(e,t);let r=Yq[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,a=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jq=D("$ZodCheckMultipleOf",(e,t)=>{br.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):uq(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Xq=D("$ZodCheckNumberFormat",(e,t)=>{br.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,a]=fq[t.format];e._zod.onattach.push(s=>{let o=s._zod.bag;o.format=t.format,o.minimum=i,o.maximum=a,r&&(o.pattern=Vq)}),e._zod.check=s=>{let o=s.value;if(r){if(!Number.isInteger(o)){s.issues.push({expected:n,format:t.format,code:"invalid_type",input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?s.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}o<i&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inst:e})}}),eZ=D("$ZodCheckBigIntFormat",(e,t)=>{br.init(e,t);let[r,n]=mq[t.format];e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,a.minimum=r,a.maximum=n}),e._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inst:e})}}),tZ=D("$ZodCheckMaxSize",(e,t)=>{br.init(e,t),e._zod.when=r=>{let n=r.value;return!Go(n)&&n.size!==void 0},e._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value;n.size<=t.maximum||r.issues.push({origin:Ry(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),rZ=D("$ZodCheckMinSize",(e,t)=>{br.init(e,t),e._zod.when=r=>{let n=r.value;return!Go(n)&&n.size!==void 0},e._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value;n.size>=t.minimum||r.issues.push({origin:Ry(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),nZ=D("$ZodCheckSizeEquals",(e,t)=>{br.init(e,t),e._zod.when=r=>{let n=r.value;return!Go(n)&&n.size!==void 0},e._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=r=>{let n=r.value,i=n.size;if(i===t.size)return;let a=i>t.size;r.issues.push({origin:Ry(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),iZ=D("$ZodCheckMaxLength",(e,t)=>{br.init(e,t),e._zod.when=r=>{let n=r.value;return!Go(n)&&n.length!==void 0},e._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value;if(n.length<=t.maximum)return;let i=Uy(n);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),aZ=D("$ZodCheckMinLength",(e,t)=>{br.init(e,t),e._zod.when=r=>{let n=r.value;return!Go(n)&&n.length!==void 0},e._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value;if(n.length>=t.minimum)return;let i=Uy(n);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),sZ=D("$ZodCheckLengthEquals",(e,t)=>{br.init(e,t),e._zod.when=r=>{let n=r.value;return!Go(n)&&n.length!==void 0},e._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=r=>{let n=r.value,i=n.length;if(i===t.length)return;let a=Uy(n),s=i>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),If=D("$ZodCheckStringFormat",(e,t)=>{var r,n;br.init(e,t),e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),oZ=D("$ZodCheckRegex",(e,t)=>{If.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cZ=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Hq),If.init(e,t)}),uZ=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qq),If.init(e,t)}),lZ=D("$ZodCheckIncludes",(e,t)=>{br.init(e,t);let r=Ho(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),dZ=D("$ZodCheckStartsWith",(e,t)=>{br.init(e,t);let r=new RegExp(`^${Ho(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pZ=D("$ZodCheckEndsWith",(e,t)=>{br.init(e,t);let r=new RegExp(`.*${Ho(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});fZ=D("$ZodCheckProperty",(e,t)=>{br.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>WM(i,r,t.property));WM(n,r,t.property)}}),mZ=D("$ZodCheckMimeType",(e,t)=>{br.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e})}}),hZ=D("$ZodCheckOverwrite",(e,t)=>{br.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),_y=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
192
+ `).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 t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
193
+ `))}},gZ={major:4,minor:0,patch:0},Ge=D("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gZ;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let a of i._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(a,s,o)=>{let c=ju(a),u;for(let l of s){if(l._zod.when){if(!l._zod.when(a))continue}else if(c)continue;let d=a.issues.length,p=l._zod.check(a);if(p instanceof Promise&&o?.async===!1)throw new Fs;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,a.issues.length!==d&&(c||(c=ju(a,d)))});else{if(a.issues.length===d)continue;c||(c=ju(a,d))}}return u?u.then(()=>a):a};e._zod.run=(a,s)=>{let o=e._zod.parse(a,s);if(o instanceof Promise){if(s.async===!1)throw new Fs;return o.then(c=>i(c,n,s))}return i(o,n,s)}}e["~standard"]={validate:i=>{try{let a=w1(e,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return S1(e,i).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Pf=D("$ZodString",(e,t)=>{Ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zq(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),tr=D("$ZodStringFormat",(e,t)=>{If.init(e,t),Pf.init(e,t)}),vZ=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Iq),tr.init(e,t)}),yZ=D("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Qu(r))}else t.pattern??(t.pattern=Qu());tr.init(e,t)}),_Z=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Pq),tr.init(e,t)}),bZ=D("$ZodURL",(e,t)=>{tr.init(e,t),e._zod.check=r=>{try{let n=r.value,i=new URL(n),a=i.href;t.hostname&&(t.hostname.lastIndex=0,!t.hostname.test(i.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Aq.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,!t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!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:e,continue:!t.abort})}}}),xZ=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Tq()),tr.init(e,t)}),wZ=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$q),tr.init(e,t)}),kZ=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=bq),tr.init(e,t)}),SZ=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=xq),tr.init(e,t)}),$Z=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=wq),tr.init(e,t)}),EZ=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=kq),tr.init(e,t)}),IZ=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sq),tr.init(e,t)}),PZ=D("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qq(t)),tr.init(e,t)}),TZ=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Dq),tr.init(e,t)}),OZ=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Lq(t)),tr.init(e,t)}),zZ=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Eq),tr.init(e,t)}),CZ=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Oq),tr.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),NZ=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zq),tr.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),jZ=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Cq),tr.init(e,t)}),AZ=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Nq),tr.init(e,t),e._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:e,continue:!t.abort})}}});RZ=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=jq),tr.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{T1(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});DZ=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=E1),tr.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{UZ(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),MZ=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Rq),tr.init(e,t)});qZ=D("$ZodJWT",(e,t)=>{tr.init(e,t),e._zod.check=r=>{LZ(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ZZ=D("$ZodCustomStringFormat",(e,t)=>{tr.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),O1=D("$ZodNumber",(e,t)=>{Ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??Bq,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let 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:e,...a?{received:a}:{}}),r}}),FZ=D("$ZodNumber",(e,t)=>{Xq.init(e,t),O1.init(e,t)}),z1=D("$ZodBoolean",(e,t)=>{Ge.init(e,t),e._zod.pattern=Wq,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),C1=D("$ZodBigInt",(e,t)=>{Ge.init(e,t),e._zod.pattern=Fq,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),VZ=D("$ZodBigInt",(e,t)=>{eZ.init(e,t),C1.init(e,t)}),BZ=D("$ZodSymbol",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),r}}),WZ=D("$ZodUndefined",(e,t)=>{Ge.init(e,t),e._zod.pattern=Gq,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),r}}),KZ=D("$ZodNull",(e,t)=>{Ge.init(e,t),e._zod.pattern=Kq,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),r}}),GZ=D("$ZodAny",(e,t)=>{Ge.init(e,t),e._zod.parse=r=>r}),by=D("$ZodUnknown",(e,t)=>{Ge.init(e,t),e._zod.parse=r=>r}),HZ=D("$ZodNever",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),QZ=D("$ZodVoid",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),YZ=D("$ZodDate",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{if(t.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:e}),r}});N1=D("$ZodArray",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let a=[];for(let s=0;s<i.length;s++){let o=i[s],c=t.element._zod.run({value:o,issues:[]},n);c instanceof Promise?a.push(c.then(u=>KM(u,r,s))):KM(c,r,s)}return a.length?Promise.all(a).then(()=>r):r}});j1=D("$ZodObject",(e,t)=>{Ge.init(e,t);let r=jy(()=>{let l=Object.keys(t.shape);for(let p of l)if(!(t.shape[p]instanceof Ge))throw Error(`Invalid element at key "${p}": expected a Zod schema`);let d=pq(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});Mt(e._zod,"propValues",()=>{let l=t.shape,d={};for(let p in l){let f=l[p]._zod;if(f.values){d[p]??(d[p]=new Set);for(let m of f.values)d[p].add(m)}}return d});let n=l=>{let d=new _y(["shape","payload","ctx"]),p=r.value,f=h=>{let _=Ou(h);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),v=0;for(let h of p.keys)m[h]=`key_${v++}`;d.write("const newResult = {}");for(let h of p.keys)if(p.optionalKeys.has(h)){let _=m[h];d.write(`const ${_} = ${f(h)};`);let y=Ou(h);d.write(`
194
+ if (${_}.issues.length) {
195
+ if (input[${y}] === undefined) {
196
+ if (${y} in input) {
197
+ newResult[${y}] = undefined;
198
+ }
199
+ } else {
200
+ payload.issues = payload.issues.concat(
201
+ ${_}.issues.map((iss) => ({
202
+ ...iss,
203
+ path: iss.path ? [${y}, ...iss.path] : [${y}],
204
+ }))
205
+ );
206
+ }
207
+ } else if (${_}.value === undefined) {
208
+ if (${y} in input) newResult[${y}] = undefined;
209
+ } else {
210
+ newResult[${y}] = ${_}.value;
211
+ }
212
+ `)}else{let _=m[h];d.write(`const ${_} = ${f(h)};`),d.write(`
213
+ if (${_}.issues.length) payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
214
+ ...iss,
215
+ path: iss.path ? [${Ou(h)}, ...iss.path] : [${Ou(h)}]
216
+ })));`),d.write(`newResult[${Ou(h)}] = ${_}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let g=d.compile();return(h,_)=>g(l,h,_)},i,a=_f,s=!hy.jitless,o=s&&lq.value,c=t.catchall,u;e._zod.parse=(l,d)=>{u??(u=r.value);let p=l.value;if(!a(p))return l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l;let f=[];if(s&&o&&d?.async===!1&&d.jitless!==!0)i||(i=n(t.shape)),l=i(l,d);else{l.value={};let _=u.shape;for(let y of u.keys){let b=_[y],x=b._zod.run({value:p[y],issues:[]},d),w=b._zod.optin==="optional"&&b._zod.optout==="optional";x instanceof Promise?f.push(x.then(k=>w?GM(k,l,y,p):zv(k,l,y))):w?GM(x,l,y,p):zv(x,l,y)}}if(!c)return f.length?Promise.all(f).then(()=>l):l;let m=[],v=u.keySet,g=c._zod,h=g.def.type;for(let _ of Object.keys(p)){if(v.has(_))continue;if(h==="never"){m.push(_);continue}let y=g.run({value:p[_],issues:[]},d);y instanceof Promise?f.push(y.then(b=>zv(b,l,_))):zv(y,l,_)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:p,inst:e}),f.length?Promise.all(f).then(()=>l):l}});A1=D("$ZodUnion",(e,t)=>{Ge.init(e,t),Mt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Mt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Mt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Mt(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>Ay(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let i=!1,a=[];for(let s of t.options){let o=s._zod.run({value:r.value,issues:[]},n);if(o instanceof Promise)a.push(o),i=!0;else{if(o.issues.length===0)return o;a.push(o)}}return i?Promise.all(a).then(s=>HM(s,r,e,n)):HM(a,r,e,n)}}),JZ=D("$ZodDiscriminatedUnion",(e,t)=>{A1.init(e,t);let r=e._zod.parse;Mt(e._zod,"propValues",()=>{let i={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[o,c]of Object.entries(s)){i[o]||(i[o]=new Set);for(let u of c)i[o].add(u)}}return i});let n=jy(()=>{let i=t.options,a=new Map;for(let s of i){let o=s._zod.propValues[t.discriminator];if(!o||o.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of o){if(a.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,s)}}return a});e._zod.parse=(i,a)=>{let s=i.value;if(!_f(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let o=n.value.get(s?.[t.discriminator]);return o?o._zod.run(i,a):t.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),i)}}),XZ=D("$ZodIntersection",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value,a=t.left._zod.run({value:i,issues:[]},n),s=t.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||s instanceof Promise?Promise.all([a,s]).then(([o,c])=>QM(r,o,c)):QM(r,a,s)}});Dy=D("$ZodTuple",(e,t)=>{Ge.init(e,t);let r=t.items,n=r.length-[...r].reverse().findIndex(i=>i._zod.optin!=="optional");e._zod.parse=(i,a)=>{let s=i.value;if(!Array.isArray(s))return i.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let o=[];if(!t.rest){let u=s.length>r.length,l=s.length<n-1;if(u||l)return i.issues.push({input:s,inst:e,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>=s.length&&c>=n)continue;let l=u._zod.run({value:s[c],issues:[]},a);l instanceof Promise?o.push(l.then(d=>Cv(d,i,c))):Cv(l,i,c)}if(t.rest){let u=s.slice(r.length);for(let l of u){c++;let d=t.rest._zod.run({value:l,issues:[]},a);d instanceof Promise?o.push(d.then(p=>Cv(p,i,c))):Cv(d,i,c)}}return o.length?Promise.all(o).then(()=>i):i}});eF=D("$ZodRecord",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!bf(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let a=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:i[c],issues:[]},n);u instanceof Promise?a.push(u.then(l=>{l.issues.length&&r.issues.push(...xi(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...xi(c,u.issues)),r.value[c]=u.value)}let o;for(let c in i)s.has(c)||(o=o??[],o.push(c));o&&o.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:o})}else{r.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__")continue;let o=t.keyType._zod.run({value:s,issues:[]},n);if(o instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(o.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:o.issues.map(u=>ta(u,n,kn())),input:s,path:[s],inst:e}),r.value[o.value]=o.value;continue}let c=t.valueType._zod.run({value:i[s],issues:[]},n);c instanceof Promise?a.push(c.then(u=>{u.issues.length&&r.issues.push(...xi(s,u.issues)),r.value[o.value]=u.value})):(c.issues.length&&r.issues.push(...xi(s,c.issues)),r.value[o.value]=c.value)}}return a.length?Promise.all(a).then(()=>r):r}}),tF=D("$ZodMap",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let a=[];r.value=new Map;for(let[s,o]of i){let c=t.keyType._zod.run({value:s,issues:[]},n),u=t.valueType._zod.run({value:o,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([l,d])=>{YM(l,d,r,s,i,e,n)})):YM(c,u,r,s,i,e,n)}return a.length?Promise.all(a).then(()=>r):r}});rF=D("$ZodSet",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];r.value=new Set;for(let s of i){let o=t.valueType._zod.run({value:s,issues:[]},n);o instanceof Promise?a.push(o.then(c=>JM(c,r))):JM(o,r)}return a.length?Promise.all(a).then(()=>r):r}});nF=D("$ZodEnum",(e,t)=>{Ge.init(e,t);let r=f1(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>gy.has(typeof n)).map(n=>typeof n=="string"?Ho(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return e._zod.values.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),iF=D("$ZodLiteral",(e,t)=>{Ge.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Ho(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),aF=D("$ZodFile",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),r}}),R1=D("$ZodTransform",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=t.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 Fs;return r.value=i,r}}),sF=D("$ZodOptional",(e,t)=>{Ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Mt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Mt(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ay(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),oF=D("$ZodNullable",(e,t)=>{Ge.init(e,t),Mt(e._zod,"optin",()=>t.innerType._zod.optin),Mt(e._zod,"optout",()=>t.innerType._zod.optout),Mt(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ay(r.source)}|null)$`):void 0}),Mt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),cF=D("$ZodDefault",(e,t)=>{Ge.init(e,t),e._zod.optin="optional",Mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>XM(a,t)):XM(i,t)}});uF=D("$ZodPrefault",(e,t)=>{Ge.init(e,t),e._zod.optin="optional",Mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),lF=D("$ZodNonOptional",(e,t)=>{Ge.init(e,t),Mt(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>eL(a,e)):eL(i,e)}});dF=D("$ZodSuccess",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>{let i=t.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)}}),pF=D("$ZodCatch",(e,t)=>{Ge.init(e,t),e._zod.optin="optional",Mt(e._zod,"optout",()=>t.innerType._zod.optout),Mt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(s=>ta(s,n,kn()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>ta(a,n,kn()))},input:r.value}),r.issues=[]),r)}}),fF=D("$ZodNaN",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),U1=D("$ZodPipe",(e,t)=>{Ge.init(e,t),Mt(e._zod,"values",()=>t.in._zod.values),Mt(e._zod,"optin",()=>t.in._zod.optin),Mt(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>tL(a,t,n)):tL(i,t,n)}});mF=D("$ZodReadonly",(e,t)=>{Ge.init(e,t),Mt(e._zod,"propValues",()=>t.innerType._zod.propValues),Mt(e._zod,"values",()=>t.innerType._zod.values),Mt(e._zod,"optin",()=>t.innerType._zod.optin),Mt(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(rL):rL(i)}});hF=D("$ZodTemplateLiteral",(e,t)=>{Ge.init(e,t);let r=[];for(let n of t.parts)if(n instanceof Ge){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,s=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,s))}else if(n===null||dq.has(typeof n))r.push(Ho(`${n}`));else throw Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:"template_literal",pattern:e._zod.pattern.source}),n)}),gF=D("$ZodPromise",(e,t)=>{Ge.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>t.innerType._zod.run({value:i,issues:[]},n))}),vF=D("$ZodLazy",(e,t)=>{Ge.init(e,t),Mt(e._zod,"innerType",()=>t.getter()),Mt(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Mt(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Mt(e._zod,"optin",()=>e._zod.innerType._zod.optin),Mt(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),yF=D("$ZodCustom",(e,t)=>{br.init(e,t),Ge.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(a=>nL(a,r,n,e));nL(i,r,n,e)}});D1={};Ko(D1,{zhTW:()=>mle,zhCN:()=>ple,vi:()=>lle,ur:()=>cle,ua:()=>sle,tr:()=>ile,th:()=>tle,ta:()=>Xue,sv:()=>Yue,sl:()=>Hue,ru:()=>Kue,pt:()=>Bue,ps:()=>que,pl:()=>Fue,ota:()=>Mue,no:()=>Uue,nl:()=>Aue,ms:()=>Nue,mk:()=>zue,ko:()=>Tue,kh:()=>Iue,ja:()=>$ue,it:()=>kue,id:()=>xue,hu:()=>_ue,he:()=>vue,frCA:()=>hue,fr:()=>fue,fi:()=>due,fa:()=>uue,es:()=>oue,eo:()=>aue,en:()=>_F,de:()=>eue,cs:()=>Jce,ca:()=>Qce,be:()=>Gce,az:()=>Wce,ar:()=>Vce});Fce=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(i){return e[i]??null}let r=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 ${et(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: ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?` \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()} ${s.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?">=":">",s=t(i.origin);return s?`\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()} ${s.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":""}: ${oe(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"}}};Bce=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};Kce=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);if(s){let o=Number(i.maximum),c=iL(o,s.unit.one,s.unit.few,s.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 ${s.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?">=":">",s=t(i.origin);if(s){let o=Number(i.minimum),c=iL(o,s.unit.one,s.unit.few,s.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 ${s.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"}: ${oe(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"}}};Hce=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${oe(i.values," o ")}`;case"too_big":{let a=i.inclusive?"com a m\xE0xim":"menys de",s=t(i.origin);return s?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${a} ${i.maximum.toString()} ${s.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",s=t(i.origin);return s?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${a} ${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};Yce=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.minimum.toString()} ${s.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: ${oe(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"}}};Xce=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ist`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};tue=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},rue=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[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 ${tue(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${et(n.values[0])}`:`Invalid option: expected one of ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(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=t(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":""}: ${oe(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"}}};nue=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},iue=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[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 ${nue(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${et(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(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=t(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":""}: ${oe(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"}}};sue=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Demasiado grande: se esperaba que ${i.origin??"valor"} tuviera ${a}${i.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i.origin??"valor"} fuera ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Demasiado peque\xF1o: se esperaba que ${i.origin} tuviera ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};cue=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${s.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: ${oe(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"}}};lue=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${a}${i.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};pue=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r=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 : ${et(i.values[0])} attendu`:`Option invalide : une valeur parmi ${oe(i.values,"|")} attendue`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Trop grand : ${i.origin??"valeur"} doit ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Trop petit : ${i.origin} doit ${s.verb} ${a}${i.minimum.toString()} ${s.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":""} : ${oe(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"}}};mue=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u2264":"<",s=t(i.origin);return s?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${a}${i.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u2265":">",s=t(i.origin);return s?`Trop petit : attendu que ${i.origin} ait ${a}${i.minimum.toString()} ${s.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":""} : ${oe(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"}}};gue=()=>{let e={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 t(i){return e[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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};yue=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};bue=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${a}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: diharapkan ${i.origin} memiliki ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};wue=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Opzione non valida: atteso uno tra ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Troppo grande: ${i.origin??"valore"} deve avere ${a}${i.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Troppo piccolo: ${i.origin} deve avere ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};Sue=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(i){return e[i]??null}let r=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: ${et(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${oe(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",s=t(i.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${s.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",s=t(i.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${s.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":""}: ${oe(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"}}};Eue=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\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()} ${s.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?">=":">",s=t(i.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()} ${s.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 ${oe(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"}}};Pue=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${oe(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=a==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",o=t(i.origin),c=o?.unit??"\uC694\uC18C";return o?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${a}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${a}${s}`}case"too_small":{let a=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=a==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",o=t(i.origin),c=o?.unit??"\uC694\uC18C";return o?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${a}${s}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${a}${s}`}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: ${oe(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"}}};Oue=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\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()} ${s.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?">=":">",s=t(i.origin);return s?`\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()} ${s.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"}: ${oe(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"}}};Cue=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Terlalu besar: dijangka ${i.origin??"nilai"} ${s.verb} ${a}${i.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Terlalu kecil: dijangka ${i.origin} ${s.verb} ${a}${i.minimum.toString()} ${s.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: ${oe(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"}}};jue=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(i){return e[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 ${et(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} is`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};Rue=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Ugyldig valg: forventet en av ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};Due=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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."}}};Lue=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${oe(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};Zue=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};Vue=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${a}${i.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Muito pequeno: esperado que ${i.origin} tivesse ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};Wue=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);if(s){let o=Number(i.maximum),c=aL(o,s.unit.one,s.unit.few,s.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?">=":">",s=t(i.origin);if(s){let o=Number(i.minimum),c=aL(o,s.unit.one,s.unit.few,s.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":""}: ${oe(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"}}};Gue=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${a}${i.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",s=t(i.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};Que=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()} ${s.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"}: ${oe(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"}}};Jue=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\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()} ${s.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?">=":">",s=t(i.origin);return s?`\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()} ${s.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":""}: ${oe(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"}}};ele=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(i.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.maximum.toString()} ${s.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",s=t(i.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.minimum.toString()} ${s.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: ${oe(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"}}};rle=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},nle=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[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 ${rle(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${et(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(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=t(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":""}: ${oe(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"}}};ale=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\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"} ${s.verb} ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\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} ${s.verb} ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};ole=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(i){return e[i]??null}let r=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: ${et(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${oe(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?"<=":"<",s=t(i.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${a}${i.minimum.toString()} ${s.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":""}: ${oe(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"}}};ule=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(i){return e[i]??null}let r=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 ${et(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 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${s.verb} ${a}${i.minimum.toString()} ${s.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: ${oe(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"}}};dle=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()} ${s.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): ${oe(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"}}};fle=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(i){return e[i]??null}let r=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 ${et(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${oe(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",s=t(i.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()} ${s.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?">=":">",s=t(i.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()} ${s.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${oe(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"}}};bF=Symbol("ZodOutput"),xF=Symbol("ZodInput"),xf=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,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,t)}return this}remove(t){return this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};Mo=M1();SF={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};ky=class{constructor(t){this._def=t,this.def=t}implement(t){if(typeof t!="function")throw Error("implement() must be called with a function");let r=(...n)=>{let i=this._def.input?vy(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=t(...i);return this._def.output?vy(this._def.output,a,void 0,{callee:r}):a};return r}implementAsync(t){if(typeof t!="function")throw Error("implement() must be called with a function");let r=async(...n)=>{let i=this._def.input?await yy(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 t(...i);return this._def.output?yy(this._def.output,a,void 0,{callee:r}):a};return r}input(...t){let r=this.constructor;return Array.isArray(t[0])?new r({type:"function",input:new Dy({type:"tuple",items:t[0],rest:t[1]}),output:this._def.output}):new r({type:"function",input:t[0],output:this._def.output})}output(t){return new this.constructor({type:"function",input:this._def.input,output:t})}};Sf=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Mo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,o);let c=t._zod.toJSONSchema?.();if(c)o.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path},d=t._zod.parent;if(d)o.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let p=o.schema;switch(i.type){case"string":{let f=p;f.type="string";let{minimum:m,maximum:v,format:g,patterns:h,contentEncoding:_}=t._zod.bag;if(typeof m=="number"&&(f.minLength=m),typeof v=="number"&&(f.maxLength=v),g&&(f.format=a[g]??g,f.format===""&&delete f.format),_&&(f.contentEncoding=_),h&&h.size>0){let y=[...h];y.length===1?f.pattern=y[0].source:y.length>1&&(o.schema.allOf=[...y.map(b=>({...this.target==="draft-7"?{type:"string"}:{},pattern:b.source}))])}break}case"number":{let f=p,{minimum:m,maximum:v,format:g,multipleOf:h,exclusiveMaximum:_,exclusiveMinimum:y}=t._zod.bag;typeof g=="string"&&g.includes("int")?f.type="integer":f.type="number",typeof y=="number"&&(f.exclusiveMinimum=y),typeof m=="number"&&(f.minimum=m,typeof y=="number"&&(y>=m?delete f.minimum:delete f.exclusiveMinimum)),typeof _=="number"&&(f.exclusiveMaximum=_),typeof v=="number"&&(f.maximum=v,typeof _=="number"&&(_<=v?delete f.maximum:delete f.exclusiveMaximum)),typeof h=="number"&&(f.multipleOf=h);break}case"boolean":{let f=p;f.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":{p.type="null";break}case"any":break;case"unknown":break;case"undefined":case"never":{p.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 f=p,{minimum:m,maximum:v}=t._zod.bag;typeof m=="number"&&(f.minItems=m),typeof v=="number"&&(f.maxItems=v),f.type="array",f.items=this.process(i.element,{...l,path:[...l.path,"items"]});break}case"object":{let f=p;f.type="object",f.properties={};let m=i.shape;for(let h in m)f.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 _=i.shape[h]._zod;return this.io==="input"?_.optin===void 0:_.optout===void 0}));g.size>0&&(f.required=Array.from(g)),i.catchall?._zod.def.type==="never"?f.additionalProperties=!1:i.catchall?i.catchall&&(f.additionalProperties=this.process(i.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{let f=p;f.anyOf=i.options.map((m,v)=>this.process(m,{...l,path:[...l.path,"anyOf",v]}));break}case"intersection":{let f=p,m=this.process(i.left,{...l,path:[...l.path,"allOf",0]}),v=this.process(i.right,{...l,path:[...l.path,"allOf",1]}),g=_=>"allOf"in _&&Object.keys(_).length===1,h=[...g(m)?m.allOf:[m],...g(v)?v.allOf:[v]];f.allOf=h;break}case"tuple":{let f=p;f.type="array";let m=i.items.map((h,_)=>this.process(h,{...l,path:[...l.path,"prefixItems",_]}));if(this.target==="draft-2020-12"?f.prefixItems=m:f.items=m,i.rest){let h=this.process(i.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?f.items=h:f.additionalItems=h}i.rest&&(f.items=this.process(i.rest,{...l,path:[...l.path,"items"]}));let{minimum:v,maximum:g}=t._zod.bag;typeof v=="number"&&(f.minItems=v),typeof g=="number"&&(f.maxItems=g);break}case"record":{let f=p;f.type="object",f.propertyNames=this.process(i.keyType,{...l,path:[...l.path,"propertyNames"]}),f.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 f=p,m=f1(i.entries);m.every(v=>typeof v=="number")&&(f.type="number"),m.every(v=>typeof v=="string")&&(f.type="string"),f.enum=m;break}case"literal":{let f=p,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];f.type=v===null?"null":typeof v,f.const=v}else m.every(v=>typeof v=="number")&&(f.type="number"),m.every(v=>typeof v=="string")&&(f.type="string"),m.every(v=>typeof v=="boolean")&&(f.type="string"),m.every(v=>v===null)&&(f.type="null"),f.enum=m;break}case"file":{let f=p,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:g,mime:h}=t._zod.bag;v!==void 0&&(m.minLength=v),g!==void 0&&(m.maxLength=g),h?h.length===1?(m.contentMediaType=h[0],Object.assign(f,m)):f.anyOf=h.map(_=>({...m,contentMediaType:_})):Object.assign(f,m);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let f=this.process(i.innerType,l);p.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,l),o.ref=i.innerType;break}case"success":{let f=p;f.type="boolean";break}case"default":{this.process(i.innerType,l),o.ref=i.innerType,p.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,l),o.ref=i.innerType,this.io==="input"&&(p._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,l),o.ref=i.innerType;let f;try{f=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}p.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let f=p,m=t._zod.pattern;if(!m)throw Error("Pattern not found in template literal");f.type="string",f.pattern=m.source;break}case"pipe":{let f=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(f,l),o.ref=f;break}case"readonly":{this.process(i.innerType,l),o.ref=i.innerType,p.readOnly=!0;break}case"promise":{this.process(i.innerType,l),o.ref=i.innerType;break}case"optional":{this.process(i.innerType,l),o.ref=i.innerType;break}case"lazy":{let f=t._zod.innerType;this.process(f,l),o.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(o.schema,u),this.io==="input"&&Or(t)&&(delete o.schema.examples,delete o.schema.default),this.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(t).schema}emit(t,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},i=this.seen.get(t);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 p=`#/${d}/`,f=l[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:p+f}},s=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:p,defId:f}=a(l);d.def={...d.schema},f&&(d.defId=f);let m=d.schema;for(let v in m)delete m[v];m.$ref=p};for(let l of this.seen.entries()){let d=l[1];if(t===l[0]){s(l);continue}if(n.external){let p=n.external.registry.get(l[0])?.id;if(t!==l[0]&&p){s(l);continue}}if(this.metadataRegistry.get(l[0])?.id){s(l);continue}if(d.cycle){if(n.cycles==="throw")throw Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
217
+
218
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);n.cycles==="ref"&&s(l);continue}if(d.count>1&&n.reused==="ref"){s(l);continue}}let o=(l,d)=>{let p=this.seen.get(l),f=p.def??p.schema,m={...f};if(p.ref===null)return;let v=p.ref;if(p.ref=null,v){o(v,d);let g=this.seen.get(v).schema;g.$ref&&d.target==="draft-7"?(f.allOf=f.allOf??[],f.allOf.push(g)):(Object.assign(f,g),Object.assign(f,m))}p.isParent||this.override({zodSchema:l,jsonSchema:f,path:p.path??[]})};for(let l of[...this.seen.entries()].reverse())o(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.")}}};Rle={},Ule=D("ZodMiniType",(e,t)=>{if(!e._zod)throw Error("Uninitialized schema in ZodMiniType.");Ge.init(e,t),e.def=t,e.parse=(r,n)=>vy(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>w1(e,r,n),e.parseAsync=async(r,n)=>yy(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>S1(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>na(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e)}),M6e=D("ZodMiniObject",(e,t)=>{j1.init(e,t),Ule.init(e,t),_t.defineLazy(e,"shape",()=>t.shape)}),zu={};Ko(zu,{xid:()=>Yle,void:()=>yde,uuidv7:()=>Vle,uuidv6:()=>Fle,uuidv4:()=>Zle,uuid:()=>qle,url:()=>Ble,uppercase:()=>lP,unknown:()=>lr,union:()=>Qt,undefined:()=>gde,ulid:()=>Qle,uint64:()=>mde,uint32:()=>dde,tuple:()=>wde,trim:()=>gP,treeifyError:()=>vq,transform:()=>QP,toUpperCase:()=>yP,toLowerCase:()=>vP,toJSONSchema:()=>u9,templateLiteral:()=>zde,symbol:()=>hde,superRefine:()=>e3,success:()=>Tde,stringbool:()=>jde,stringFormat:()=>ode,string:()=>H,strictObject:()=>xde,startsWith:()=>pP,size:()=>oP,setErrorMap:()=>Ude,set:()=>$de,safeParseAsync:()=>y9,safeParse:()=>v9,registry:()=>M1,regexes:()=>$1,regex:()=>cP,refine:()=>X9,record:()=>Ht,readonly:()=>W9,property:()=>t9,promise:()=>Cde,prettifyError:()=>_q,preprocess:()=>eT,prefault:()=>M9,positive:()=>YF,pipe:()=>Ey,partialRecord:()=>kde,parseAsync:()=>g9,parse:()=>h9,overwrite:()=>Qo,optional:()=>ir,object:()=>ye,number:()=>Dt,nullish:()=>Pde,nullable:()=>$y,null:()=>VP,normalize:()=>hP,nonpositive:()=>XF,nonoptional:()=>L9,nonnegative:()=>e9,never:()=>Wy,negative:()=>JF,nativeEnum:()=>Ede,nanoid:()=>Kle,nan:()=>Ode,multipleOf:()=>wf,minSize:()=>kf,minLength:()=>Yu,mime:()=>mP,maxSize:()=>My,maxLength:()=>Ly,map:()=>Sde,lte:()=>Xi,lt:()=>Bo,lowercase:()=>uP,looseObject:()=>bn,locales:()=>D1,literal:()=>Pe,length:()=>qy,lazy:()=>H9,ksuid:()=>Jle,keyof:()=>bde,jwt:()=>sde,json:()=>Ade,iso:()=>bP,ipv6:()=>ede,ipv4:()=>Xle,intersection:()=>Gy,int64:()=>fde,int32:()=>lde,int:()=>XI,instanceof:()=>Nde,includes:()=>dP,guid:()=>Lle,gte:()=>si,gt:()=>Wo,globalRegistry:()=>Mo,getErrorMap:()=>Dde,function:()=>c9,formatError:()=>y1,float64:()=>ude,float32:()=>cde,flattenError:()=>v1,file:()=>Ide,enum:()=>Rn,endsWith:()=>fP,emoji:()=>Wle,email:()=>Mle,e164:()=>ade,discriminatedUnion:()=>KP,date:()=>_de,custom:()=>J9,cuid2:()=>Hle,cuid:()=>Gle,core:()=>aq,config:()=>kn,coerce:()=>t3,clone:()=>na,cidrv6:()=>rde,cidrv4:()=>tde,check:()=>Y9,catch:()=>F9,boolean:()=>zr,bigint:()=>pde,base64url:()=>ide,base64:()=>nde,array:()=>bt,any:()=>vde,_default:()=>U9,_ZodString:()=>$P,ZodXID:()=>NP,ZodVoid:()=>E9,ZodUnknown:()=>S9,ZodUnion:()=>WP,ZodUndefined:()=>x9,ZodUUID:()=>Xa,ZodURL:()=>IP,ZodULID:()=>CP,ZodType:()=>ot,ZodTuple:()=>O9,ZodTransform:()=>HP,ZodTemplateLiteral:()=>K9,ZodSymbol:()=>b9,ZodSuccess:()=>q9,ZodStringFormat:()=>ar,ZodString:()=>Zy,ZodSet:()=>C9,ZodRecord:()=>GP,ZodRealError:()=>Tf,ZodReadonly:()=>B9,ZodPromise:()=>Q9,ZodPrefault:()=>D9,ZodPipe:()=>XP,ZodOptional:()=>YP,ZodObject:()=>Ky,ZodNumberFormat:()=>rl,ZodNumber:()=>Fy,ZodNullable:()=>A9,ZodNull:()=>w9,ZodNonOptional:()=>JP,ZodNever:()=>$9,ZodNanoID:()=>TP,ZodNaN:()=>V9,ZodMap:()=>z9,ZodLiteral:()=>N9,ZodLazy:()=>G9,ZodKSUID:()=>jP,ZodJWT:()=>ZP,ZodIssueCode:()=>Rde,ZodIntersection:()=>T9,ZodISOTime:()=>kP,ZodISODuration:()=>SP,ZodISODateTime:()=>xP,ZodISODate:()=>wP,ZodIPv6:()=>RP,ZodIPv4:()=>AP,ZodGUID:()=>Sy,ZodFile:()=>j9,ZodError:()=>Dle,ZodEnum:()=>$f,ZodEmoji:()=>PP,ZodEmail:()=>EP,ZodE164:()=>qP,ZodDiscriminatedUnion:()=>P9,ZodDefault:()=>R9,ZodDate:()=>BP,ZodCustomStringFormat:()=>_9,ZodCustom:()=>Hy,ZodCatch:()=>Z9,ZodCUID2:()=>zP,ZodCUID:()=>OP,ZodCIDRv6:()=>DP,ZodCIDRv4:()=>UP,ZodBoolean:()=>Vy,ZodBigIntFormat:()=>FP,ZodBigInt:()=>By,ZodBase64URL:()=>LP,ZodBase64:()=>MP,ZodArray:()=>I9,ZodAny:()=>k9,TimePrecision:()=>SF,NEVER:()=>sq,$output:()=>bF,$input:()=>xF,$brand:()=>oq});bP={};Ko(bP,{time:()=>p9,duration:()=>f9,datetime:()=>l9,date:()=>d9,ZodISOTime:()=>kP,ZodISODuration:()=>SP,ZodISODateTime:()=>xP,ZodISODate:()=>wP});xP=D("ZodISODateTime",(e,t)=>{PZ.init(e,t),ar.init(e,t)});wP=D("ZodISODate",(e,t)=>{TZ.init(e,t),ar.init(e,t)});kP=D("ZodISOTime",(e,t)=>{OZ.init(e,t),ar.init(e,t)});SP=D("ZodISODuration",(e,t)=>{zZ.init(e,t),ar.init(e,t)});m9=(e,t)=>{g1.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>y1(e,r)},flatten:{value:r=>v1(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},Dle=D("ZodError",m9),Tf=D("ZodError",m9,{Parent:Error}),h9=_1(Tf),g9=b1(Tf),v9=x1(Tf),y9=k1(Tf),ot=D("ZodType",(e,t)=>(Ge.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>na(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.parse=(r,n)=>h9(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>v9(e,r,n),e.parseAsync=async(r,n)=>g9(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>y9(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(X9(r,n)),e.superRefine=r=>e.check(e3(r)),e.overwrite=r=>e.check(Qo(r)),e.optional=()=>ir(e),e.nullable=()=>$y(e),e.nullish=()=>ir($y(e)),e.nonoptional=r=>L9(e,r),e.array=()=>bt(e),e.or=r=>Qt([e,r]),e.and=r=>Gy(e,r),e.transform=r=>Ey(e,QP(r)),e.default=r=>U9(e,r),e.prefault=r=>M9(e,r),e.catch=r=>F9(e,r),e.pipe=r=>Ey(e,r),e.readonly=()=>W9(e),e.describe=r=>{let n=e.clone();return Mo.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Mo.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Mo.get(e);let n=e.clone();return Mo.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$P=D("_ZodString",(e,t)=>{Pf.init(e,t),ot.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(cP(...n)),e.includes=(...n)=>e.check(dP(...n)),e.startsWith=(...n)=>e.check(pP(...n)),e.endsWith=(...n)=>e.check(fP(...n)),e.min=(...n)=>e.check(Yu(...n)),e.max=(...n)=>e.check(Ly(...n)),e.length=(...n)=>e.check(qy(...n)),e.nonempty=(...n)=>e.check(Yu(1,...n)),e.lowercase=n=>e.check(uP(n)),e.uppercase=n=>e.check(lP(n)),e.trim=()=>e.check(gP()),e.normalize=(...n)=>e.check(hP(...n)),e.toLowerCase=()=>e.check(vP()),e.toUpperCase=()=>e.check(yP())}),Zy=D("ZodString",(e,t)=>{Pf.init(e,t),$P.init(e,t),e.email=r=>e.check(L1(EP,r)),e.url=r=>e.check(B1(IP,r)),e.jwt=r=>e.check(sP(ZP,r)),e.emoji=r=>e.check(W1(PP,r)),e.guid=r=>e.check(xy(Sy,r)),e.uuid=r=>e.check(q1(Xa,r)),e.uuidv4=r=>e.check(Z1(Xa,r)),e.uuidv6=r=>e.check(F1(Xa,r)),e.uuidv7=r=>e.check(V1(Xa,r)),e.nanoid=r=>e.check(K1(TP,r)),e.guid=r=>e.check(xy(Sy,r)),e.cuid=r=>e.check(G1(OP,r)),e.cuid2=r=>e.check(H1(zP,r)),e.ulid=r=>e.check(Q1(CP,r)),e.base64=r=>e.check(nP(MP,r)),e.base64url=r=>e.check(iP(LP,r)),e.xid=r=>e.check(Y1(NP,r)),e.ksuid=r=>e.check(J1(jP,r)),e.ipv4=r=>e.check(X1(AP,r)),e.ipv6=r=>e.check(eP(RP,r)),e.cidrv4=r=>e.check(tP(UP,r)),e.cidrv6=r=>e.check(rP(DP,r)),e.e164=r=>e.check(aP(qP,r)),e.datetime=r=>e.check(l9(r)),e.date=r=>e.check(d9(r)),e.time=r=>e.check(p9(r)),e.duration=r=>e.check(f9(r))});ar=D("ZodStringFormat",(e,t)=>{tr.init(e,t),$P.init(e,t)}),EP=D("ZodEmail",(e,t)=>{_Z.init(e,t),ar.init(e,t)});Sy=D("ZodGUID",(e,t)=>{vZ.init(e,t),ar.init(e,t)});Xa=D("ZodUUID",(e,t)=>{yZ.init(e,t),ar.init(e,t)});IP=D("ZodURL",(e,t)=>{bZ.init(e,t),ar.init(e,t)});PP=D("ZodEmoji",(e,t)=>{xZ.init(e,t),ar.init(e,t)});TP=D("ZodNanoID",(e,t)=>{wZ.init(e,t),ar.init(e,t)});OP=D("ZodCUID",(e,t)=>{kZ.init(e,t),ar.init(e,t)});zP=D("ZodCUID2",(e,t)=>{SZ.init(e,t),ar.init(e,t)});CP=D("ZodULID",(e,t)=>{$Z.init(e,t),ar.init(e,t)});NP=D("ZodXID",(e,t)=>{EZ.init(e,t),ar.init(e,t)});jP=D("ZodKSUID",(e,t)=>{IZ.init(e,t),ar.init(e,t)});AP=D("ZodIPv4",(e,t)=>{CZ.init(e,t),ar.init(e,t)});RP=D("ZodIPv6",(e,t)=>{NZ.init(e,t),ar.init(e,t)});UP=D("ZodCIDRv4",(e,t)=>{jZ.init(e,t),ar.init(e,t)});DP=D("ZodCIDRv6",(e,t)=>{AZ.init(e,t),ar.init(e,t)});MP=D("ZodBase64",(e,t)=>{RZ.init(e,t),ar.init(e,t)});LP=D("ZodBase64URL",(e,t)=>{DZ.init(e,t),ar.init(e,t)});qP=D("ZodE164",(e,t)=>{MZ.init(e,t),ar.init(e,t)});ZP=D("ZodJWT",(e,t)=>{qZ.init(e,t),ar.init(e,t)});_9=D("ZodCustomStringFormat",(e,t)=>{ZZ.init(e,t),ar.init(e,t)});Fy=D("ZodNumber",(e,t)=>{O1.init(e,t),ot.init(e,t),e.gt=(n,i)=>e.check(Wo(n,i)),e.gte=(n,i)=>e.check(si(n,i)),e.min=(n,i)=>e.check(si(n,i)),e.lt=(n,i)=>e.check(Bo(n,i)),e.lte=(n,i)=>e.check(Xi(n,i)),e.max=(n,i)=>e.check(Xi(n,i)),e.int=n=>e.check(XI(n)),e.safe=n=>e.check(XI(n)),e.positive=n=>e.check(Wo(0,n)),e.nonnegative=n=>e.check(si(0,n)),e.negative=n=>e.check(Bo(0,n)),e.nonpositive=n=>e.check(Xi(0,n)),e.multipleOf=(n,i)=>e.check(wf(n,i)),e.step=(n,i)=>e.check(wf(n,i)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});rl=D("ZodNumberFormat",(e,t)=>{FZ.init(e,t),Fy.init(e,t)});Vy=D("ZodBoolean",(e,t)=>{z1.init(e,t),ot.init(e,t)});By=D("ZodBigInt",(e,t)=>{C1.init(e,t),ot.init(e,t),e.gte=(n,i)=>e.check(si(n,i)),e.min=(n,i)=>e.check(si(n,i)),e.gt=(n,i)=>e.check(Wo(n,i)),e.gte=(n,i)=>e.check(si(n,i)),e.min=(n,i)=>e.check(si(n,i)),e.lt=(n,i)=>e.check(Bo(n,i)),e.lte=(n,i)=>e.check(Xi(n,i)),e.max=(n,i)=>e.check(Xi(n,i)),e.positive=n=>e.check(Wo(BigInt(0),n)),e.negative=n=>e.check(Bo(BigInt(0),n)),e.nonpositive=n=>e.check(Xi(BigInt(0),n)),e.nonnegative=n=>e.check(si(BigInt(0),n)),e.multipleOf=(n,i)=>e.check(wf(n,i));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});FP=D("ZodBigIntFormat",(e,t)=>{VZ.init(e,t),By.init(e,t)});b9=D("ZodSymbol",(e,t)=>{BZ.init(e,t),ot.init(e,t)});x9=D("ZodUndefined",(e,t)=>{WZ.init(e,t),ot.init(e,t)});w9=D("ZodNull",(e,t)=>{KZ.init(e,t),ot.init(e,t)});k9=D("ZodAny",(e,t)=>{GZ.init(e,t),ot.init(e,t)});S9=D("ZodUnknown",(e,t)=>{by.init(e,t),ot.init(e,t)});$9=D("ZodNever",(e,t)=>{HZ.init(e,t),ot.init(e,t)});E9=D("ZodVoid",(e,t)=>{QZ.init(e,t),ot.init(e,t)});BP=D("ZodDate",(e,t)=>{YZ.init(e,t),ot.init(e,t),e.min=(n,i)=>e.check(si(n,i)),e.max=(n,i)=>e.check(Xi(n,i));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});I9=D("ZodArray",(e,t)=>{N1.init(e,t),ot.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Yu(r,n)),e.nonempty=r=>e.check(Yu(1,r)),e.max=(r,n)=>e.check(Ly(r,n)),e.length=(r,n)=>e.check(qy(r,n)),e.unwrap=()=>e.element});Ky=D("ZodObject",(e,t)=>{j1.init(e,t),ot.init(e,t),_t.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Rn(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:lr()}),e.loose=()=>e.clone({...e._zod.def,catchall:lr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wy()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>_t.extend(e,r),e.merge=r=>_t.merge(e,r),e.pick=r=>_t.pick(e,r),e.omit=r=>_t.omit(e,r),e.partial=(...r)=>_t.partial(YP,e,r[0]),e.required=(...r)=>_t.required(JP,e,r[0])});WP=D("ZodUnion",(e,t)=>{A1.init(e,t),ot.init(e,t),e.options=t.options});P9=D("ZodDiscriminatedUnion",(e,t)=>{WP.init(e,t),JZ.init(e,t)});T9=D("ZodIntersection",(e,t)=>{XZ.init(e,t),ot.init(e,t)});O9=D("ZodTuple",(e,t)=>{Dy.init(e,t),ot.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});GP=D("ZodRecord",(e,t)=>{eF.init(e,t),ot.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});z9=D("ZodMap",(e,t)=>{tF.init(e,t),ot.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});C9=D("ZodSet",(e,t)=>{rF.init(e,t),ot.init(e,t),e.min=(...r)=>e.check(kf(...r)),e.nonempty=r=>e.check(kf(1,r)),e.max=(...r)=>e.check(My(...r)),e.size=(...r)=>e.check(oP(...r))});$f=D("ZodEnum",(e,t)=>{nF.init(e,t),ot.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,i)=>{let a={};for(let s of n)if(r.has(s))a[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new $f({...t,checks:[],..._t.normalizeParams(i),entries:a})},e.exclude=(n,i)=>{let a={...t.entries};for(let s of n)if(r.has(s))delete a[s];else throw Error(`Key ${s} not found in enum`);return new $f({...t,checks:[],..._t.normalizeParams(i),entries:a})}});N9=D("ZodLiteral",(e,t)=>{iF.init(e,t),ot.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});j9=D("ZodFile",(e,t)=>{aF.init(e,t),ot.init(e,t),e.min=(r,n)=>e.check(kf(r,n)),e.max=(r,n)=>e.check(My(r,n)),e.mime=(r,n)=>e.check(mP(Array.isArray(r)?r:[r],n))});HP=D("ZodTransform",(e,t)=>{R1.init(e,t),ot.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=a=>{if(typeof a=="string")r.issues.push(_t.issue(a,r.value,t));else{let s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(_t.issue(s))}};let i=t.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});YP=D("ZodOptional",(e,t)=>{sF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType});A9=D("ZodNullable",(e,t)=>{oF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType});R9=D("ZodDefault",(e,t)=>{cF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});D9=D("ZodPrefault",(e,t)=>{uF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType});JP=D("ZodNonOptional",(e,t)=>{lF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType});q9=D("ZodSuccess",(e,t)=>{dF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType});Z9=D("ZodCatch",(e,t)=>{pF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});V9=D("ZodNaN",(e,t)=>{fF.init(e,t),ot.init(e,t)});XP=D("ZodPipe",(e,t)=>{U1.init(e,t),ot.init(e,t),e.in=t.in,e.out=t.out});B9=D("ZodReadonly",(e,t)=>{mF.init(e,t),ot.init(e,t)});K9=D("ZodTemplateLiteral",(e,t)=>{hF.init(e,t),ot.init(e,t)});G9=D("ZodLazy",(e,t)=>{vF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.getter()});Q9=D("ZodPromise",(e,t)=>{gF.init(e,t),ot.init(e,t),e.unwrap=()=>e._zod.def.innerType});Hy=D("ZodCustom",(e,t)=>{yF.init(e,t),ot.init(e,t)});jde=(...e)=>s9({Pipe:XP,Boolean:Vy,String:Zy,Transform:HP},...e);Rde={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"};t3={};Ko(t3,{string:()=>Mde,number:()=>Lde,date:()=>Fde,boolean:()=>qde,bigint:()=>Zde});kn(_F());Vde="io.modelcontextprotocol/related-task",Qy="2.0",Cr=J9(e=>e!==null&&(typeof e=="object"||typeof e=="function")),r3=Qt([H(),Dt().int()]),n3=H(),L6e=bn({ttl:Dt().optional(),pollInterval:Dt().optional()}),Bde=ye({ttl:Dt().optional()}),Wde=ye({taskId:H()}),tT=bn({progressToken:r3.optional(),[Vde]:Wde.optional()}),li=ye({_meta:tT.optional()}),Yy=li.extend({task:Bde.optional()}),qr=ye({method:H(),params:li.loose().optional()}),Si=ye({_meta:tT.optional()}),$i=ye({method:H(),params:Si.loose().optional()}),Zr=bn({_meta:tT.optional()}),Jy=Qt([H(),Dt().int()]),Kde=ye({jsonrpc:Pe(Qy),id:Jy,...qr.shape}).strict(),Gde=ye({jsonrpc:Pe(Qy),...$i.shape}).strict(),i3=ye({jsonrpc:Pe(Qy),id:Jy,result:Zr}).strict();(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(sL||(sL={}));a3=ye({jsonrpc:Pe(Qy),id:Jy.optional(),error:ye({code:Dt().int(),message:H(),data:lr().optional()})}).strict(),q6e=Qt([Kde,Gde,i3,a3]),Z6e=Qt([i3,a3]),s3=Zr.strict(),Hde=Si.extend({requestId:Jy.optional(),reason:H().optional()}),o3=$i.extend({method:Pe("notifications/cancelled"),params:Hde}),Qde=ye({src:H(),mimeType:H().optional(),sizes:bt(H()).optional(),theme:Rn(["light","dark"]).optional()}),Of=ye({icons:bt(Qde).optional()}),Ju=ye({name:H(),title:H().optional()}),c3=Ju.extend({...Ju.shape,...Of.shape,version:H(),websiteUrl:H().optional(),description:H().optional()}),Yde=Gy(ye({applyDefaults:zr().optional()}),Ht(H(),lr())),Jde=eT(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Gy(ye({form:Yde.optional(),url:Cr.optional()}),Ht(H(),lr()).optional())),Xde=bn({list:Cr.optional(),cancel:Cr.optional(),requests:bn({sampling:bn({createMessage:Cr.optional()}).optional(),elicitation:bn({create:Cr.optional()}).optional()}).optional()}),epe=bn({list:Cr.optional(),cancel:Cr.optional(),requests:bn({tools:bn({call:Cr.optional()}).optional()}).optional()}),tpe=ye({experimental:Ht(H(),Cr).optional(),sampling:ye({context:Cr.optional(),tools:Cr.optional()}).optional(),elicitation:Jde.optional(),roots:ye({listChanged:zr().optional()}).optional(),tasks:Xde.optional(),extensions:Ht(H(),Cr).optional()}),rpe=li.extend({protocolVersion:H(),capabilities:tpe,clientInfo:c3}),npe=qr.extend({method:Pe("initialize"),params:rpe}),ipe=ye({experimental:Ht(H(),Cr).optional(),logging:Cr.optional(),completions:Cr.optional(),prompts:ye({listChanged:zr().optional()}).optional(),resources:ye({subscribe:zr().optional(),listChanged:zr().optional()}).optional(),tools:ye({listChanged:zr().optional()}).optional(),tasks:epe.optional(),extensions:Ht(H(),Cr).optional()}),ape=Zr.extend({protocolVersion:H(),capabilities:ipe,serverInfo:c3,instructions:H().optional()}),spe=$i.extend({method:Pe("notifications/initialized"),params:Si.optional()}),u3=qr.extend({method:Pe("ping"),params:li.optional()}),ope=ye({progress:Dt(),total:ir(Dt()),message:ir(H())}),cpe=ye({...Si.shape,...ope.shape,progressToken:r3}),l3=$i.extend({method:Pe("notifications/progress"),params:cpe}),upe=li.extend({cursor:n3.optional()}),zf=qr.extend({params:upe.optional()}),Cf=Zr.extend({nextCursor:n3.optional()}),lpe=Rn(["working","input_required","completed","failed","cancelled"]),Nf=ye({taskId:H(),status:lpe,ttl:Qt([Dt(),VP()]),createdAt:H(),lastUpdatedAt:H(),pollInterval:ir(Dt()),statusMessage:ir(H())}),d3=Zr.extend({task:Nf}),dpe=Si.merge(Nf),p3=$i.extend({method:Pe("notifications/tasks/status"),params:dpe}),f3=qr.extend({method:Pe("tasks/get"),params:li.extend({taskId:H()})}),m3=Zr.merge(Nf),h3=qr.extend({method:Pe("tasks/result"),params:li.extend({taskId:H()})}),F6e=Zr.loose(),g3=zf.extend({method:Pe("tasks/list")}),v3=Cf.extend({tasks:bt(Nf)}),y3=qr.extend({method:Pe("tasks/cancel"),params:li.extend({taskId:H()})}),V6e=Zr.merge(Nf),_3=ye({uri:H(),mimeType:ir(H()),_meta:Ht(H(),lr()).optional()}),b3=_3.extend({text:H()}),rT=H().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),x3=_3.extend({blob:rT}),jf=Rn(["user","assistant"]),nl=ye({audience:bt(jf).optional(),priority:Dt().min(0).max(1).optional(),lastModified:bP.datetime({offset:!0}).optional()}),w3=ye({...Ju.shape,...Of.shape,uri:H(),description:ir(H()),mimeType:ir(H()),size:ir(Dt()),annotations:nl.optional(),_meta:ir(bn({}))}),ppe=ye({...Ju.shape,...Of.shape,uriTemplate:H(),description:ir(H()),mimeType:ir(H()),annotations:nl.optional(),_meta:ir(bn({}))}),fpe=zf.extend({method:Pe("resources/list")}),mpe=Cf.extend({resources:bt(w3)}),hpe=zf.extend({method:Pe("resources/templates/list")}),gpe=Cf.extend({resourceTemplates:bt(ppe)}),nT=li.extend({uri:H()}),vpe=nT,ype=qr.extend({method:Pe("resources/read"),params:vpe}),_pe=Zr.extend({contents:bt(Qt([b3,x3]))}),bpe=$i.extend({method:Pe("notifications/resources/list_changed"),params:Si.optional()}),xpe=nT,wpe=qr.extend({method:Pe("resources/subscribe"),params:xpe}),kpe=nT,Spe=qr.extend({method:Pe("resources/unsubscribe"),params:kpe}),$pe=Si.extend({uri:H()}),Epe=$i.extend({method:Pe("notifications/resources/updated"),params:$pe}),Ipe=ye({name:H(),description:ir(H()),required:ir(zr())}),Ppe=ye({...Ju.shape,...Of.shape,description:ir(H()),arguments:ir(bt(Ipe)),_meta:ir(bn({}))}),Tpe=zf.extend({method:Pe("prompts/list")}),Ope=Cf.extend({prompts:bt(Ppe)}),zpe=li.extend({name:H(),arguments:Ht(H(),H()).optional()}),Cpe=qr.extend({method:Pe("prompts/get"),params:zpe}),iT=ye({type:Pe("text"),text:H(),annotations:nl.optional(),_meta:Ht(H(),lr()).optional()}),aT=ye({type:Pe("image"),data:rT,mimeType:H(),annotations:nl.optional(),_meta:Ht(H(),lr()).optional()}),sT=ye({type:Pe("audio"),data:rT,mimeType:H(),annotations:nl.optional(),_meta:Ht(H(),lr()).optional()}),Npe=ye({type:Pe("tool_use"),name:H(),id:H(),input:Ht(H(),lr()),_meta:Ht(H(),lr()).optional()}),jpe=ye({type:Pe("resource"),resource:Qt([b3,x3]),annotations:nl.optional(),_meta:Ht(H(),lr()).optional()}),Ape=w3.extend({type:Pe("resource_link")}),oT=Qt([iT,aT,sT,Ape,jpe]),Rpe=ye({role:jf,content:oT}),Upe=Zr.extend({description:H().optional(),messages:bt(Rpe)}),Dpe=$i.extend({method:Pe("notifications/prompts/list_changed"),params:Si.optional()}),Mpe=ye({title:H().optional(),readOnlyHint:zr().optional(),destructiveHint:zr().optional(),idempotentHint:zr().optional(),openWorldHint:zr().optional()}),Lpe=ye({taskSupport:Rn(["required","optional","forbidden"]).optional()}),k3=ye({...Ju.shape,...Of.shape,description:H().optional(),inputSchema:ye({type:Pe("object"),properties:Ht(H(),Cr).optional(),required:bt(H()).optional()}).catchall(lr()),outputSchema:ye({type:Pe("object"),properties:Ht(H(),Cr).optional(),required:bt(H()).optional()}).catchall(lr()).optional(),annotations:Mpe.optional(),execution:Lpe.optional(),_meta:Ht(H(),lr()).optional()}),qpe=zf.extend({method:Pe("tools/list")}),Zpe=Cf.extend({tools:bt(k3)}),S3=Zr.extend({content:bt(oT).default([]),structuredContent:Ht(H(),lr()).optional(),isError:zr().optional()}),B6e=S3.or(Zr.extend({toolResult:lr()})),Fpe=Yy.extend({name:H(),arguments:Ht(H(),lr()).optional()}),Vpe=qr.extend({method:Pe("tools/call"),params:Fpe}),Bpe=$i.extend({method:Pe("notifications/tools/list_changed"),params:Si.optional()}),W6e=ye({autoRefresh:zr().default(!0),debounceMs:Dt().int().nonnegative().default(300)}),$3=Rn(["debug","info","notice","warning","error","critical","alert","emergency"]),Wpe=li.extend({level:$3}),Kpe=qr.extend({method:Pe("logging/setLevel"),params:Wpe}),Gpe=Si.extend({level:$3,logger:H().optional(),data:lr()}),Hpe=$i.extend({method:Pe("notifications/message"),params:Gpe}),Qpe=ye({name:H().optional()}),Ype=ye({hints:bt(Qpe).optional(),costPriority:Dt().min(0).max(1).optional(),speedPriority:Dt().min(0).max(1).optional(),intelligencePriority:Dt().min(0).max(1).optional()}),Jpe=ye({mode:Rn(["auto","required","none"]).optional()}),Xpe=ye({type:Pe("tool_result"),toolUseId:H().describe("The unique identifier for the corresponding tool call."),content:bt(oT).default([]),structuredContent:ye({}).loose().optional(),isError:zr().optional(),_meta:Ht(H(),lr()).optional()}),efe=KP("type",[iT,aT,sT]),Iy=KP("type",[iT,aT,sT,Npe,Xpe]),tfe=ye({role:jf,content:Qt([Iy,bt(Iy)]),_meta:Ht(H(),lr()).optional()}),rfe=Yy.extend({messages:bt(tfe),modelPreferences:Ype.optional(),systemPrompt:H().optional(),includeContext:Rn(["none","thisServer","allServers"]).optional(),temperature:Dt().optional(),maxTokens:Dt().int(),stopSequences:bt(H()).optional(),metadata:Cr.optional(),tools:bt(k3).optional(),toolChoice:Jpe.optional()}),nfe=qr.extend({method:Pe("sampling/createMessage"),params:rfe}),ife=Zr.extend({model:H(),stopReason:ir(Rn(["endTurn","stopSequence","maxTokens"]).or(H())),role:jf,content:efe}),afe=Zr.extend({model:H(),stopReason:ir(Rn(["endTurn","stopSequence","maxTokens","toolUse"]).or(H())),role:jf,content:Qt([Iy,bt(Iy)])}),sfe=ye({type:Pe("boolean"),title:H().optional(),description:H().optional(),default:zr().optional()}),ofe=ye({type:Pe("string"),title:H().optional(),description:H().optional(),minLength:Dt().optional(),maxLength:Dt().optional(),format:Rn(["email","uri","date","date-time"]).optional(),default:H().optional()}),cfe=ye({type:Rn(["number","integer"]),title:H().optional(),description:H().optional(),minimum:Dt().optional(),maximum:Dt().optional(),default:Dt().optional()}),ufe=ye({type:Pe("string"),title:H().optional(),description:H().optional(),enum:bt(H()),default:H().optional()}),lfe=ye({type:Pe("string"),title:H().optional(),description:H().optional(),oneOf:bt(ye({const:H(),title:H()})),default:H().optional()}),dfe=ye({type:Pe("string"),title:H().optional(),description:H().optional(),enum:bt(H()),enumNames:bt(H()).optional(),default:H().optional()}),pfe=Qt([ufe,lfe]),ffe=ye({type:Pe("array"),title:H().optional(),description:H().optional(),minItems:Dt().optional(),maxItems:Dt().optional(),items:ye({type:Pe("string"),enum:bt(H())}),default:bt(H()).optional()}),mfe=ye({type:Pe("array"),title:H().optional(),description:H().optional(),minItems:Dt().optional(),maxItems:Dt().optional(),items:ye({anyOf:bt(ye({const:H(),title:H()}))}),default:bt(H()).optional()}),hfe=Qt([ffe,mfe]),gfe=Qt([dfe,pfe,hfe]),vfe=Qt([gfe,sfe,ofe,cfe]),yfe=Yy.extend({mode:Pe("form").optional(),message:H(),requestedSchema:ye({type:Pe("object"),properties:Ht(H(),vfe),required:bt(H()).optional()})}),_fe=Yy.extend({mode:Pe("url"),message:H(),elicitationId:H(),url:H().url()}),bfe=Qt([yfe,_fe]),xfe=qr.extend({method:Pe("elicitation/create"),params:bfe}),wfe=Si.extend({elicitationId:H()}),kfe=$i.extend({method:Pe("notifications/elicitation/complete"),params:wfe}),Sfe=Zr.extend({action:Rn(["accept","decline","cancel"]),content:eT(e=>e===null?void 0:e,Ht(H(),Qt([H(),Dt(),zr(),bt(H())])).optional())}),$fe=ye({type:Pe("ref/resource"),uri:H()}),Efe=ye({type:Pe("ref/prompt"),name:H()}),Ife=li.extend({ref:Qt([Efe,$fe]),argument:ye({name:H(),value:H()}),context:ye({arguments:Ht(H(),H()).optional()}).optional()}),Pfe=qr.extend({method:Pe("completion/complete"),params:Ife}),Tfe=Zr.extend({completion:bn({values:bt(H()).max(100),total:ir(Dt().int()),hasMore:ir(zr())})}),Ofe=ye({uri:H().startsWith("file://"),name:H().optional(),_meta:Ht(H(),lr()).optional()}),zfe=qr.extend({method:Pe("roots/list"),params:li.optional()}),Cfe=Zr.extend({roots:bt(Ofe)}),Nfe=$i.extend({method:Pe("notifications/roots/list_changed"),params:Si.optional()}),K6e=Qt([u3,npe,Pfe,Kpe,Cpe,Tpe,fpe,hpe,ype,wpe,Spe,Vpe,qpe,f3,h3,g3,y3]),G6e=Qt([o3,l3,spe,Nfe,p3]),H6e=Qt([s3,ife,afe,Sfe,Cfe,m3,v3,d3]),Q6e=Qt([u3,nfe,xfe,zfe,f3,h3,g3,y3]),Y6e=Qt([o3,l3,Hpe,Epe,bpe,Bpe,Dpe,p3,kfe]),J6e=Qt([s3,ape,Tfe,Upe,Ope,mpe,gpe,_pe,S3,Zpe,m3,v3,d3]),X6e=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),eMe=dL(yL(),1),tMe=dL(Rne(),1);(function(e){e.Completable="McpCompletable"})(oL||(oL={}));rMe=jfe(()=>zu.object({session_id:zu.string(),ws_url:zu.string(),work_dir:zu.string().optional(),session_key:zu.string().optional()}));Mfe=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"])});var Af,T3=P(()=>{ys();P3();ks();qi();Pc();fo();ya();Af=class extends un{constructor(){super("claude","Claude (Anthropic API)",50)}canHandle(t){let r=!!process.env.ANTHROPIC_API_KEY;return r||q.debug("ClaudeAgentStrategy: ANTHROPIC_API_KEY not set"),r}async invoke(t,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,images:s=[],skills:o=null,sessionPath:c=null,nodeName:u=null,timeout:l,config:d={}}=r,p=n;(!p||p==="auto")&&(q.debug(`Model is '${p||"undefined"}', using default: ${ln.CLAUDE}`),p=ln.CLAUDE);let f=lx[p]||p;lx[p]&&p!==f&&q.debug(`Mapped model: ${p} \u2192 ${f}`),q.debug(`Invoking Claude Agent SDK with model: ${f}, skills: ${JSON.stringify(o)}`);let m=process.env.ANTHROPIC_API_KEY,v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
219
+ \u25C6 Model: ${f}${v}
220
+ `);let g=(await import("chalk")).default;console.log(`
221
+ ${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(t)),console.log(g.dim("\u2500".repeat(60)));let{allowedTools:h,mcpServers:_}=this._resolveSkills(o,{sessionPath:c,workspace:i,nodeName:u});try{let y={cwd:i,allowedTools:h,permissionMode:"bypassPermissions",model:f,...Object.keys(_).length>0&&{mcpServers:_}};if(a){let L=typeof a.parse=="function"?fn(a,{target:"openApi3"}):a;y.outputFormat={type:"json_schema",schema:L},q.debug("Structured output enforced via SDK outputFormat")}q.debug(`Agent SDK options: ${JSON.stringify({cwd:y.cwd,toolCount:h.length,permissionMode:y.permissionMode,model:y.model,hasOutputFormat:!!y.outputFormat})}`);let b="",x=0,w=[];q.debug("Starting Claude Agent SDK query stream");let k;try{k=I3({prompt:t,options:y})}catch(z){throw q.error(`Failed to initialize Claude Agent SDK: ${z.message}`),z}let E=null,O=0,U=3;try{for await(let z of k){if(w.push(z),z.type==="error"||z.error){let W=z.error?.message||z.error||z.message||"Unknown API error";throw new Error(typeof W=="string"?W:JSON.stringify(W))}let L=JSON.stringify(z.message?.content||z.text||"").slice(0,200);if(L===E){if(O++,O>=U){let W=(z.message?.content?.[0]?.text||z.text||"unknown").slice(0,100);throw new Error(`API stuck in loop (${O}x repeated): ${W}`)}}else E=L,O=1;if(z.type==="assistant"||z.constructor?.name==="AssistantMessage"){let W=z.message?.content||z.content||[];for(let R of W)if(R.type==="thinking"&&R.thinking)console.log(`${R.thinking.substring(0,200)}${R.thinking.length>200?"...":""}`);else if(R.type==="text"&&R.text)b+=R.text,R.text.length<500?console.log(`${R.text}`):console.log(`${R.text.substring(0,200)}... (${R.text.length} chars)`);else if(R.type==="tool_use"){x++,R.name.includes("memory")?rr.stepMemory(`Tool: ${R.name}`):rr.stepTool(`Tool: ${R.name}`);let Q=JSON.stringify(R.input).substring(0,100);console.log(` Input: ${Q}${JSON.stringify(R.input).length>100?"...":""}`)}}else if(!(z.type==="user"&&z.tool_use_result)){if(z.type==="result"||z.constructor?.name==="ResultMessage"){let W=z.result||z.text||z.content||b;if(a){if(z.structured_output){q.debug("Using SDK native structured_output");let re=typeof a.parse=="function"?a.parse(z.structured_output):z.structured_output;return{raw:W,structured:re}}if(W){let R=this._extractJson(W,a);if(R)return{raw:W,structured:R}}q.warn(`Could not extract structured output \u2014 returning raw text (${(W||"").length} chars)`)}return W||""}}}if(q.warn(`Agent SDK ended without result. Collected ${w.length} messages`),b.length>0)return q.debug("Returning accumulated text from messages"),b;throw new Error("Claude Agent SDK query ended without result")}catch(z){throw q.error(`Error during query stream: ${z.message}`),z}}catch(y){throw q.error("Claude Agent SDK call failed",{error:y.message}),y}}_resolveSkills(t,r){if(t===null)return q.debug("No skills \u2014 pure LLM mode"),{allowedTools:[],mcpServers:{}};if(!Array.isArray(t)||t.length===0)return q.debug("Default IDE skills for code generation"),{allowedTools:["Read","Write","Bash","Grep","Glob"],mcpServers:{}};let n=[],i={};for(let a of t){let s=Ar(a);if(!s){q.warn(`Unknown skill "${a}" \u2014 skipping`);continue}if(s.allowedTools&&n.push(...s.allowedTools),typeof s.resolve=="function"){let o=s.resolve(r);o&&(i[s.serverName]=o,q.debug(`MCP: ${s.serverName} \u2192 ${o.command} ${o.args[0]}`))}}return{allowedTools:n,mcpServers:i}}_extractJson(t,r){let n=[()=>{if(t.includes("===JSON_START===")){let i=t.indexOf("===JSON_START===")+16,a=t.indexOf("===JSON_END===");return t.substring(i,a).trim()}},()=>t.match(/```json\s*\n([\s\S]*?)\n```/)?.[1]?.trim(),()=>{if(!t.startsWith("{"))return t.match(/```\s*\n([\s\S]*?)\n```/)?.[1]?.trim()},()=>t.trim(),()=>{let i=t.indexOf("{"),a=t.lastIndexOf("}");if(i!==-1&&a>i)return t.substring(i,a+1)}];for(let i of n)try{let a=i();if(!a)continue;let s=JSON.parse(a);if(typeof s!="object"||s===null)continue;return typeof r.parse=="function"?r.parse(s):s}catch{}return null}}});var A3={};ga(A3,{Codex:()=>nme,Thread:()=>uT});import{promises as cT}from"fs";import Ffe from"os";import O3 from"path";import{spawn as Kfe}from"child_process";import Xy from"path";import Gfe from"readline";import{createRequire as N3}from"module";async function Vfe(e){if(e===void 0)return{cleanup:async()=>{}};if(!Bfe(e))throw new Error("outputSchema must be a plain JSON object");let t=await cT.mkdtemp(O3.join(Ffe.tmpdir(),"codex-output-schema-")),r=O3.join(t,"schema.json"),n=async()=>{try{await cT.rm(t,{recursive:!0,force:!0})}catch{}};try{return await cT.writeFile(r,JSON.stringify(e),"utf8"),{schemaPath:r,cleanup:n}}catch(i){throw await n(),i}}function Bfe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Wfe(e){if(typeof e=="string")return{prompt:e,images:[]};let t=[],r=[];for(let n of e)n.type==="text"?t.push(n.text):n.type==="local_image"&&r.push(n.path);return{prompt:t.join(`
222
+
223
+ `),images:r}}function Xfe(e){let t=[];return j3(e,"",t),t}function j3(e,t,r){if(!lT(e))if(t){r.push(`${t}=${Rf(e,t)}`);return}else throw new Error("Codex config overrides must be a plain object");let n=Object.entries(e);if(!(!t&&n.length===0)){if(t&&n.length===0){r.push(`${t}={}`);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 s=t?`${t}.${i}`:i;lT(a)?j3(a,s,r):r.push(`${s}=${Rf(a,s)}`)}}}function Rf(e,t){if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`Codex config override at ${t} must be a finite number`);return`${e}`}else{if(typeof e=="boolean")return e?"true":"false";if(Array.isArray(e))return`[${e.map((n,i)=>Rf(n,`${t}[${i}]`)).join(", ")}]`;if(lT(e)){let r=[];for(let[n,i]of Object.entries(e)){if(!n)throw new Error("Codex config override keys must be non-empty strings");i!==void 0&&r.push(`${tme(n)} = ${Rf(i,`${t}.${n}`)}`)}return`{${r.join(", ")}}`}else{if(e===null)throw new Error(`Codex config override at ${t} cannot be null`);{let r=typeof e;throw new Error(`Unsupported Codex config override value at ${t}: ${r}`)}}}}function tme(e){return eme.test(e)?e:JSON.stringify(e)}function lT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function rme(){let{platform:e,arch:t}=process,r=null;switch(e){case"linux":case"android":switch(t){case"x64":r="x86_64-unknown-linux-musl";break;case"arm64":r="aarch64-unknown-linux-musl";break;default:break}break;case"darwin":switch(t){case"x64":r="x86_64-apple-darwin";break;case"arm64":r="aarch64-apple-darwin";break;default:break}break;case"win32":switch(t){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: ${e} (${t})`);let n=Qfe[r];if(!n)throw new Error(`Unsupported target triple: ${r}`);let i;try{let c=Yfe.resolve(`${C3}/package.json`),l=N3(c).resolve(`${n}/package.json`);i=Xy.join(Xy.dirname(l),"vendor")}catch{throw new Error(`Unable to locate Codex CLI binaries. Ensure ${C3} is installed with optional dependencies.`)}let a=Xy.join(i,r),s=process.platform==="win32"?"codex.exe":"codex";return Xy.join(a,"codex",s)}var uT,z3,Hfe,C3,Qfe,Yfe,Jfe,eme,nme,R3=P(()=>{uT=class{_exec;_options;_id;_threadOptions;get id(){return this._id}constructor(e,t,r,n=null){this._exec=e,this._options=t,this._id=n,this._threadOptions=r}async runStreamed(e,t={}){return{events:this.runStreamedInternal(e,t)}}async*runStreamedInternal(e,t={}){let{schemaPath:r,cleanup:n}=await Vfe(t.outputSchema),i=this._threadOptions,{prompt:a,images:s}=Wfe(e),o=this._exec.run({input:a,baseUrl:this._options.baseUrl,apiKey:this._options.apiKey,threadId:this._id,images:s,model:i?.model,sandboxMode:i?.sandboxMode,workingDirectory:i?.workingDirectory,skipGitRepoCheck:i?.skipGitRepoCheck,outputSchemaFile:r,modelReasoningEffort:i?.modelReasoningEffort,signal:t.signal,networkAccessEnabled:i?.networkAccessEnabled,webSearchMode:i?.webSearchMode,webSearchEnabled:i?.webSearchEnabled,approvalPolicy:i?.approvalPolicy,additionalDirectories:i?.additionalDirectories});try{for await(let c of o){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(e,t={}){let r=this.runStreamedInternal(e,t),n=[],i="",a=null,s=null;for await(let o of r)if(o.type==="item.completed")o.item.type==="agent_message"&&(i=o.item.text),n.push(o.item);else if(o.type==="turn.completed")a=o.usage;else if(o.type==="turn.failed"){s=o.error;break}if(s)throw new Error(s.message);return{items:n,finalResponse:i,usage:a}}};z3="CODEX_INTERNAL_ORIGINATOR_OVERRIDE",Hfe="codex_sdk_ts",C3="@openai/codex",Qfe={"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"},Yfe=N3(import.meta.url),Jfe=class{executablePath;envOverride;configOverrides;constructor(e=null,t,r){this.executablePath=e||rme(),this.envOverride=t,this.configOverrides=r}async*run(e){let t=["exec","--experimental-json"];if(this.configOverrides)for(let c of Xfe(this.configOverrides))t.push("--config",c);if(e.baseUrl&&t.push("--config",`openai_base_url=${Rf(e.baseUrl,"openai_base_url")}`),e.model&&t.push("--model",e.model),e.sandboxMode&&t.push("--sandbox",e.sandboxMode),e.workingDirectory&&t.push("--cd",e.workingDirectory),e.additionalDirectories?.length)for(let c of e.additionalDirectories)t.push("--add-dir",c);if(e.skipGitRepoCheck&&t.push("--skip-git-repo-check"),e.outputSchemaFile&&t.push("--output-schema",e.outputSchemaFile),e.modelReasoningEffort&&t.push("--config",`model_reasoning_effort="${e.modelReasoningEffort}"`),e.networkAccessEnabled!==void 0&&t.push("--config",`sandbox_workspace_write.network_access=${e.networkAccessEnabled}`),e.webSearchMode?t.push("--config",`web_search="${e.webSearchMode}"`):e.webSearchEnabled===!0?t.push("--config",'web_search="live"'):e.webSearchEnabled===!1&&t.push("--config",'web_search="disabled"'),e.approvalPolicy&&t.push("--config",`approval_policy="${e.approvalPolicy}"`),e.threadId&&t.push("resume",e.threadId),e.images?.length)for(let c of e.images)t.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[z3]||(r[z3]=Hfe),e.apiKey&&(r.CODEX_API_KEY=e.apiKey);let n=Kfe(this.executablePath,t,{env:r,signal:e.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(e.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 s=new Promise(c=>{n.once("exit",(u,l)=>{c({code:u,signal:l})})}),o=Gfe.createInterface({input:n.stdout,crlfDelay:1/0});try{for await(let l of o)yield l;if(i)throw i;let{code:c,signal:u}=await s;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{o.close(),n.removeAllListeners();try{n.killed||n.kill()}catch{}}}};eme=/^[A-Za-z0-9_-]+$/;nme=class{exec;options;constructor(e={}){let{codexPathOverride:t,env:r,config:n}=e;this.exec=new Jfe(t,r,n),this.options=e}startThread(e={}){return new uT(this.exec,this.options,e)}resumeThread(e,t={}){return new uT(this.exec,this.options,t,e)}}});import{execSync as ime}from"child_process";var Uf,U3=P(()=>{ys();ks();qi();Pc();fo();ya();Uf=class extends un{constructor(){super("codex","Codex (OpenAI)",75)}canHandle(t){if(!!!(process.env.OPENAI_API_KEY||process.env.CODEX_API_KEY))return q.debug("CodexAgentStrategy: OPENAI_API_KEY or CODEX_API_KEY not set"),!1;try{return ime("codex --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return q.warn("[Codex] codex CLI not found. Install: npm install -g @openai/codex"),!1}}async invoke(t,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,skills:s=null,sessionPath:o=null,nodeName:c=null,timeout:u,config:l={}}=r,{Codex:d}=await Promise.resolve().then(()=>(R3(),A3)),p=n;(!p||p==="auto")&&(q.debug(`Model is '${p||"undefined"}', using default: ${ln.CODEX}`),p=ln.CODEX);let f=dx[p]||p;dx[p]&&p!==f&&q.debug(`Mapped model: ${p} \u2192 ${f}`),q.debug(`Invoking Codex SDK with model: ${f}, skills: ${JSON.stringify(s)}`);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(`
224
+ \u25C6 Model: ${f}${v}
225
+ `);let g=(await import("chalk")).default;console.log(`
226
+ ${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(t)),console.log(g.dim("\u2500".repeat(60)));let h=this._resolveSkillsToMcp(s,{sessionPath:o,workspace:i,nodeName:c}),_={};Object.keys(h).length>0&&(_.mcp_servers=h,q.debug(`[Codex] MCP servers: ${Object.keys(h).join(", ")}`));let b=new d({...Object.keys(_).length>0&&{config:_}}).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?fn(a,{target:"openAi"}):a;w.outputSchema=k,q.debug("Structured output via SDK outputSchema")}catch(k){q.warn(`[Codex] Schema conversion failed, will extract from text: ${k.message}`)}try{let{events:k}=await b.runStreamed(t,w),E=0,O="";for await(let U of k){let z=U.type;if(z==="item.completed"){let L=U.item,W=L?.type;if(W==="mcp_tool_call"){E++;let R=`${L.server}/${L.tool}`;if(rr.stepTool(`Tool: ${R}`),L.arguments){let re=JSON.stringify(L.arguments),Q=re.length>100?`${re.substring(0,100)}...`:re;console.log(` Input: ${Q}`)}}else if(W==="tool_call"||W==="function_call"||W==="command_execution"){E++;let R=L.name||L.tool||L.command||"unknown";rr.stepTool(`Tool: ${R}`)}else W==="agent_message"&&(O=L.text||"",O.length<500?console.log(O):console.log(`${O.substring(0,200)}... (${O.length} chars)`))}else z==="turn.completed"?q.debug(`[Codex] Turn completed. Usage: ${JSON.stringify(U.usage||{})}`):q.debug(`[Codex] Event: ${z} ${JSON.stringify(U).slice(0,300)}`)}if(q.debug(`[Codex] Last agent message (${O.length} chars): ${O.slice(0,500)}`),a){if(!O)throw new Error("Codex agent returned no response");let U=JSON.parse(O),z=x?a.parse(U):U;return q.debug("\u2705 [Codex] Structured output validated"),{raw:O,structured:z}}return O||""}catch(k){let E=k.message||String(k);throw q.error(`\u274C [Codex] SDK call failed: ${E}`),E.includes("exited with code")&&(q.error("\u{1F4A1} [Codex] Verify: codex --version && echo $OPENAI_API_KEY"),q.error("\u{1F4A1} [Codex] If codex is missing: npm install -g @openai/codex")),k}}_resolveSkillsToMcp(t,r={}){if(!Array.isArray(t)||t.length===0)return{};let n={};for(let i of t){let a=Ar(i);if(!a){q.warn(`[Codex] Unknown skill "${i}" \u2014 skipping`);continue}if(typeof a.resolve!="function")continue;let s=a.resolve(r);if(!s)continue;let o=a.serverName||i,c={command:s.command};s.args?.length&&(c.args=s.args),s.env&&Object.keys(s.env).length>0&&(c.env=s.env),n[o]=c,q.debug(`[Codex] MCP: ${o} \u2192 ${s.command} ${(s.args||[]).join(" ")}`)}return n}}});import{execSync as ame,spawn as sme}from"child_process";import{existsSync as D3,mkdirSync as M3,readFileSync as L3,rmSync as ome,writeFileSync as q3}from"fs";import{join as Yo}from"path";function cme(e){if(!e)return null;let t=String(e),r=t.match(/```(?:json)?\s*([\s\S]*?)```/i);if(r?.[1])try{return JSON.parse(r[1].trim())}catch{}let n=t.indexOf("{");if(n<0)return null;let i=0,a=!1,s=!1,o=-1;for(let c=n;c<t.length;c++){let u=t[c];if(a){s?s=!1:u==="\\"?s=!0:u==='"'&&(a=!1);continue}if(u==='"'){a=!0;continue}if(u==="{"){i===0&&(o=c),i+=1;continue}if(u==="}"){if(i===0)continue;if(i-=1,i===0&&o>=0){let l=t.slice(o,c+1);try{return JSON.parse(l)}catch{o=-1}}}}return null}function ume(e){let t=String(e||"").trim();if(!t)return null;try{return JSON.parse(t)}catch{return cme(t)}}function lme(e){try{let t=JSON.parse(e);if(typeof t=="string")return t;if(typeof t?.response=="string")return t.response;if(typeof t?.text=="string")return t.text;if(typeof t?.output=="string")return t.output;if(Array.isArray(t?.candidates)&&t.candidates.length>0){let r=t.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 e}var Df,Z3=P(()=>{ys();ks();qi();fo();ya();O0();fx();Df=class extends un{constructor(){super("gemini","Gemini (Google)",70)}canHandle(t){if(!!!(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY))return q.debug("GeminiAgentStrategy: GEMINI_API_KEY or GOOGLE_API_KEY not set"),!1;try{return ame("gemini --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return q.warn("[Gemini] gemini CLI not found. Install: npm install -g @google/gemini-cli"),!1}}async invoke(t,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,skills:s=null,sessionPath:o=null,nodeName:c=null,timeout:u=600*1e3}=r,l=n;(!l||l==="auto")&&(l=ln.GEMINI);let d=pj[l]||l,p=String(process.env.GEMINI_API_KEY||"").trim(),f=String(process.env.GOOGLE_API_KEY||"").trim(),m=this._resolveSkillsToMcp(s,{sessionPath:o,workspace:i,nodeName:c}),v=Object.keys(m).length>0,g=t,h=a&&typeof a.parse=="function",_=null;if(a){let L;try{let W=h?fn(a,{target:"openAi"}):a;L=JSON.stringify(W,null,2)}catch{L="{}"}if(v){g+=`
227
+
228
+ Write valid JSON that matches this schema:
229
+ ${L}`;let W=`zibby-result-${Date.now()}.json`,R=Yo(i,".zibby","tmp");_=Yo(R,W),M3(R,{recursive:!0}),g+=Wc.generateFileOutputInstructions(a,_)}else g+=`
230
+
231
+ Return ONLY valid JSON (no markdown, no commentary) that matches this schema:
232
+ ${L}`}let y=this._createGeminiConfigDir(i,m),b=["--output-format","json"];d&&d!=="auto"&&b.push("--model",d);let x=Object.keys(m);if(x.length>0){b.push("--approval-mode","yolo");for(let L of x)b.push("--allowed-mcp-server-names",L);q.info(`[Gemini] Enabling MCP servers: ${x.join(", ")}`)}else s&&s.length>0&&q.warn(`[Gemini] Skills requested but no MCP servers configured: ${s.join(", ")}`);b.push("-p",g);let w={...process.env,GEMINI_CLI_HOME:y};p?(w.GEMINI_API_KEY=p,delete w.GOOGLE_API_KEY):f&&(w.GOOGLE_API_KEY=f,delete w.GEMINI_API_KEY),q.debug(`[Gemini] Command: gemini ${b.slice(0,8).join(" ")}... (${b.length} total args)`),q.debug(`[Gemini] Config home: ${y}`),q.debug(`[Gemini] GEMINI_CLI_HOME env: ${w.GEMINI_CLI_HOME}`);let k="",E=null;try{k=await new Promise((W,R)=>{let re=sme("gemini",b,{cwd:i,env:w,stdio:["ignore","pipe","pipe"]}),Q="",we="",Ze=setTimeout(()=>{try{re.kill("SIGTERM")}catch{}},u);re.stdout.on("data",fe=>{Q+=fe.toString()}),re.stderr.on("data",fe=>{we+=fe.toString()}),re.on("error",fe=>{clearTimeout(Ze),R(fe)}),re.on("close",fe=>{if(clearTimeout(Ze),fe===0)return W(Q.trim());R(new Error(`gemini failed with code ${fe}: ${(we||Q).trim()}`))})})}catch(L){E=L}finally{try{ome(y,{recursive:!0,force:!0})}catch{}}let O=lme(k).trim();if(!a){if(E)throw E;return O}if(_){let L=D3(_);if(q.info(`[Gemini] Result file: ${L?"present":"missing"} at ${_}`),L)try{let W=L3(_,"utf-8").trim(),R=JSON.parse(W),re=h?a.parse(R):R;return q.info("[Gemini] Structured output recovered from result file"),{raw:O,structured:re}}catch(W){q.warn(`[Gemini] Result file parse/validation failed: ${W.message}`)}else E||q.warn("[Gemini] Result file missing; falling back to stream-parsed JSON")}let U=null;if(a){let L=new Oc;L.zodSchema=a,L.processChunk(O),L.flush(),U=L.getResult()}if(q.info(`[Gemini] Raw stdout length: ${k.length} chars`),q.info(`[Gemini] Extracted text length: ${O.length} chars`),q.info(`[Gemini] StreamParser result: ${U?"extracted":"null"}`),U||(O.length<2e3?q.info(`[Gemini] Raw text preview:
233
+ ${O}`):q.info(`[Gemini] Raw text preview (first 1000 chars):
234
+ ${O.slice(0,1e3)}`),U=ume(O)),!U)throw E||(q.error("[Gemini] Failed to extract valid JSON from output"),q.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 z=h?a.parse(U):U;return{raw:O,structured:z}}_resolveSkillsToMcp(t,r={}){if(!Array.isArray(t)||t.length===0)return{};let n={};for(let i of t){let a=Ar(i);if(!a||typeof a.resolve!="function")continue;let s=a.resolve(r);if(!s)continue;let o=a.cursorKey||a.serverName||i,c={command:s.command};s.args?.length&&(c.args=s.args),s.env&&Object.keys(s.env).length>0&&(c.env=s.env),s.cwd&&(c.cwd=s.cwd),n[o]=c}return n}_createGeminiConfigDir(t,r){let n=`${Date.now()}-${Math.random().toString(16).slice(2,10)}`,i=Yo(t||process.cwd(),".zibby","tmp",`gemini-home-${n}`),a=Yo(i,".gemini");M3(a,{recursive:!0});let s=Yo(a,"settings.json"),o={},c=Yo(process.env.HOME||"",".gemini","settings.json");if(D3(c))try{o=JSON.parse(L3(c,"utf-8"))}catch{o={}}let u={...o,mcpServers:{...o.mcpServers&&typeof o.mcpServers=="object"?o.mcpServers:{},...r||{}}};q3(s,`${JSON.stringify(u,null,2)}
235
+ `,"utf-8");let l=Yo(t||process.cwd(),".zibby","tmp","gemini-settings-debug.json");try{q3(l,`${JSON.stringify(u,null,2)}
236
+ `,"utf-8")}catch{}return q.debug(`[Gemini] Created isolated config with ${Object.keys(u.mcpServers||{}).length} MCP servers`),q.debug(`[Gemini] MCP servers: ${JSON.stringify(Object.keys(u.mcpServers||{}),null,2)}`),i}}});var Mf,dT=P(()=>{Mf=class{formatTools(t){throw new Error("formatTools() must be implemented")}hasToolCalls(t){throw new Error("hasToolCalls() must be implemented")}parseToolCalls(t){throw new Error("parseToolCalls() must be implemented")}getTextContent(t){throw new Error("getTextContent() must be implemented")}buildAssistantMessage(t){throw new Error("buildAssistantMessage() must be implemented")}buildToolResultMessage(t,r){throw new Error("buildToolResultMessage() must be implemented")}injectToolsIntoBody(t,r){throw new Error("injectToolsIntoBody() must be implemented")}}});var il,F3=P(()=>{dT();il=class extends Mf{formatTools(t){return t.map(r=>({type:"function",function:{name:r.name,description:r.description,parameters:r.parameters||r.input_schema||{type:"object",properties:{}}}}))}hasToolCalls(t){let r=t.choices?.[0]?.message;return!!(r?.tool_calls&&r.tool_calls.length>0)}parseToolCalls(t){return(t.choices?.[0]?.message?.tool_calls||[]).map(n=>({id:n.id,name:n.function.name,args:JSON.parse(n.function.arguments||"{}")}))}getTextContent(t){return t.choices?.[0]?.message?.content||""}buildAssistantMessage(t){return t.choices?.[0]?.message}buildToolResultMessage(t,r){return{role:"tool",tool_call_id:t,content:typeof r=="string"?r:JSON.stringify(r)}}injectToolsIntoBody(t,r){return r.length>0&&(t.tools=r),t}}});var Lf,pT=P(()=>{Lf=class{async fetchCompletion(t,r,n={}){throw new Error("fetchCompletion() must be implemented")}async fetchStreamingCompletion(t,r,n={}){throw new Error("fetchStreamingCompletion() must be implemented")}}});function e_(e){return Buffer.byteLength(JSON.stringify(e),"utf8")}function t_(e,t){let r=String(e||"");if(r.length<=t)return r;let n=Math.max(0,t-28);return`${r.slice(0,n)}
237
+
238
+ [truncated for size budget]`}function fT(e,t=0){if(!e||typeof e!="object"||t>8)return e;if(Array.isArray(e))return e.map(n=>fT(n,t+1));let r={};for(let[n,i]of Object.entries(e))n==="description"||n==="title"||n==="examples"||n==="default"||(r[n]=fT(i,t+1));return r}function dme(e=[]){return e.map(t=>({...t,function:{...t.function,description:t_(t.function?.description||"",180),parameters:fT(t.function?.parameters||{type:"object",properties:{}})}}))}function V3(e){let t=new Set;for(let i of e)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let a of i.tool_calls)t.add(a.id);let r=e.filter(i=>i.role==="tool"?t.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:s,...o}=i;return{...o,content:o.content||""}})}function mT(e,t={}){let r=t.maxBytes||49e3,n=t.systemMaxChars||12e3,i={...e,messages:Array.isArray(e.messages)?[...e.messages]:[],tools:Array.isArray(e.tools)?dme(e.tools):e.tools};i.messages.length>0&&i.messages[0]?.role==="system"&&(i.messages[0]={...i.messages[0],content:t_(i.messages[0].content,n)});let a=!1;for(;e_(i)>r&&i.messages.length>2;)i.messages.splice(1,1),a=!0;if(a&&(i.messages=V3(i.messages)),e_(i)>r&&i.messages.length>0&&(i.messages[0]={...i.messages[0],content:t_(i.messages[0].content,6e3)},a=!0),e_(i)>r){let s=i.messages.find(c=>c.role==="system")||i.messages[0],o=i.messages.slice(-2);i.messages=V3([s,...o].filter(Boolean).map((c,u)=>({...c,content:t_(c.content,u===0?4e3:8e3)}))),a=!0}return{body:i,meta:{bytes:e_(i),trimmed:a,maxBytes:r,messageCount:i.messages.length}}}var B3=P(()=>{});var W3,al,K3=P(()=>{pT();B3();W3=e=>Buffer.byteLength(JSON.stringify(e),"utf8"),al=class extends Lf{async fetchCompletion(t,r,n={}){let i=W3(t),{body:a,meta:s}=mT(t,n.payloadCompaction);n.onBudget?.({streaming:!1,beforeBytes:i,meta:s});let o=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:o});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(t,r,n={}){let i={...t,stream:!0},a=W3(i),{body:s,meta:o}=mT(i,n.payloadCompaction);n.onBudget?.({streaming:!0,beforeBytes:a,meta:o});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(s),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(),p=new TextDecoder,f="",m="",v=new Map;for(;;){let{done:g,value:h}=await d.read();if(g)break;f+=p.decode(h,{stream:!0});let _=f.split(`
239
+ `);f=_.pop();for(let y of _){if(!y.startsWith("data: "))continue;let b=y.slice(6).trim();if(b==="[DONE]")continue;let x;try{x=JSON.parse(b)}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 E=k.index??0;v.has(E)||v.set(E,{id:"",name:"",args:""});let O=v.get(E);k.id&&(O.id=k.id),k.function?.name&&(O.name=k.function.name),k.function?.arguments!=null&&(O.args+=k.function.arguments)}}}if(v.size>0){let g=[...v.entries()].sort(([h],[_])=>h-_).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(t={}){let r=[t.signal,t.timeout?AbortSignal.timeout(t.timeout):null].filter(Boolean);return r.length>1?AbortSignal.any(r):r[0]||void 0}}});var G3=P(()=>{dT();F3();pT();K3()});var hT=P(()=>{_r()});var r_=P(()=>{_r();Ee();hT()});var Q3=P(()=>{_r()});var gT=P(()=>{_r();r_()});var Y3=P(()=>{_r();r_()});var vT=P(()=>{_r();hT();r_();Q3();_r();bu();Ig();gT();gT();Y3()});var yT=P(()=>{vT();vT()});function sl(e){return!!e._zod}function ia(e,t){return sl(e)?du(e,t):e.safeParse(t)}function n_(e){if(!e)return;let t;if(sl(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function X3(e){if(sl(e)){let a=e._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=e._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=e.value;if(n!==void 0)return n}var i_=P(()=>{vd();yT()});var _T=P(()=>{Op();Op()});var eV=P(()=>{_T();_T()});var xT,tV,Ws,s_,Nr,rV,nV,ALe,vme,yme,wT,di,qf,iV,Fr,Ei,Ii,Vr,o_,aV,kT,sV,oV,ST,Zf,qe,$T,cV,uV,RLe,Jo,_me,c_,bme,Ff,ol,lV,xme,wme,kme,Sme,$me,Eme,Ime,Pme,ET,Tme,u_,Ome,zme,l_,Cme,Vf,Bf,Nme,Wf,Xo,jme,Kf,d_,p_,f_,ULe,m_,h_,g_,dV,pV,fV,IT,mV,Gf,cl,hV,Ame,Rme,PT,Ume,TT,OT,Dme,Mme,zT,CT,Lme,qme,Zme,Fme,Vme,Bme,Wme,Kme,Gme,NT,Hme,Qme,jT,AT,RT,Yme,Jme,Xme,UT,ehe,DT,MT,the,rhe,gV,nhe,LT,ul,DLe,ihe,ahe,qT,vV,yV,she,ohe,che,uhe,lhe,dhe,phe,fhe,mhe,a_,hhe,ghe,ZT,FT,VT,vhe,yhe,_he,bhe,xhe,whe,khe,She,$he,Ehe,Ihe,Phe,The,Ohe,zhe,BT,Che,Nhe,WT,jhe,Ahe,Rhe,Uhe,KT,Dhe,Mhe,Lhe,qhe,MLe,LLe,qLe,ZLe,FLe,VLe,ze,bT,Hf=P(()=>{eV();xT="2025-11-25",tV=[xT,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ws="io.modelcontextprotocol/related-task",s_="2.0",Nr=uI(e=>e!==null&&(typeof e=="object"||typeof e=="function")),rV=Gt([G(),Ut().int()]),nV=G(),ALe=Jr({ttl:Ut().optional(),pollInterval:Ut().optional()}),vme=he({ttl:Ut().optional()}),yme=he({taskId:G()}),wT=Jr({progressToken:rV.optional(),[Ws]:yme.optional()}),di=he({_meta:wT.optional()}),qf=di.extend({task:vme.optional()}),iV=e=>qf.safeParse(e).success,Fr=he({method:G(),params:di.loose().optional()}),Ei=he({_meta:wT.optional()}),Ii=he({method:G(),params:Ei.loose().optional()}),Vr=Jr({_meta:wT.optional()}),o_=Gt([G(),Ut().int()]),aV=he({jsonrpc:Ie(s_),id:o_,...Fr.shape}).strict(),kT=e=>aV.safeParse(e).success,sV=he({jsonrpc:Ie(s_),...Ii.shape}).strict(),oV=e=>sV.safeParse(e).success,ST=he({jsonrpc:Ie(s_),id:o_,result:Vr}).strict(),Zf=e=>ST.safeParse(e).success;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(qe||(qe={}));$T=he({jsonrpc:Ie(s_),id:o_.optional(),error:he({code:Ut().int(),message:G(),data:Kt().optional()})}).strict(),cV=e=>$T.safeParse(e).success,uV=Gt([aV,sV,ST,$T]),RLe=Gt([ST,$T]),Jo=Vr.strict(),_me=Ei.extend({requestId:o_.optional(),reason:G().optional()}),c_=Ii.extend({method:Ie("notifications/cancelled"),params:_me}),bme=he({src:G(),mimeType:G().optional(),sizes:lt(G()).optional(),theme:Xr(["light","dark"]).optional()}),Ff=he({icons:lt(bme).optional()}),ol=he({name:G(),title:G().optional()}),lV=ol.extend({...ol.shape,...Ff.shape,version:G(),websiteUrl:G().optional(),description:G().optional()}),xme=Tp(he({applyDefaults:Er().optional()}),Zt(G(),Kt())),wme=fv(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Tp(he({form:xme.optional(),url:Nr.optional()}),Zt(G(),Kt()).optional())),kme=Jr({list:Nr.optional(),cancel:Nr.optional(),requests:Jr({sampling:Jr({createMessage:Nr.optional()}).optional(),elicitation:Jr({create:Nr.optional()}).optional()}).optional()}),Sme=Jr({list:Nr.optional(),cancel:Nr.optional(),requests:Jr({tools:Jr({call:Nr.optional()}).optional()}).optional()}),$me=he({experimental:Zt(G(),Nr).optional(),sampling:he({context:Nr.optional(),tools:Nr.optional()}).optional(),elicitation:wme.optional(),roots:he({listChanged:Er().optional()}).optional(),tasks:kme.optional(),extensions:Zt(G(),Nr).optional()}),Eme=di.extend({protocolVersion:G(),capabilities:$me,clientInfo:lV}),Ime=Fr.extend({method:Ie("initialize"),params:Eme}),Pme=he({experimental:Zt(G(),Nr).optional(),logging:Nr.optional(),completions:Nr.optional(),prompts:he({listChanged:Er().optional()}).optional(),resources:he({subscribe:Er().optional(),listChanged:Er().optional()}).optional(),tools:he({listChanged:Er().optional()}).optional(),tasks:Sme.optional(),extensions:Zt(G(),Nr).optional()}),ET=Vr.extend({protocolVersion:G(),capabilities:Pme,serverInfo:lV,instructions:G().optional()}),Tme=Ii.extend({method:Ie("notifications/initialized"),params:Ei.optional()}),u_=Fr.extend({method:Ie("ping"),params:di.optional()}),Ome=he({progress:Ut(),total:er(Ut()),message:er(G())}),zme=he({...Ei.shape,...Ome.shape,progressToken:rV}),l_=Ii.extend({method:Ie("notifications/progress"),params:zme}),Cme=di.extend({cursor:nV.optional()}),Vf=Fr.extend({params:Cme.optional()}),Bf=Vr.extend({nextCursor:nV.optional()}),Nme=Xr(["working","input_required","completed","failed","cancelled"]),Wf=he({taskId:G(),status:Nme,ttl:Gt([Ut(),ov()]),createdAt:G(),lastUpdatedAt:G(),pollInterval:er(Ut()),statusMessage:er(G())}),Xo=Vr.extend({task:Wf}),jme=Ei.merge(Wf),Kf=Ii.extend({method:Ie("notifications/tasks/status"),params:jme}),d_=Fr.extend({method:Ie("tasks/get"),params:di.extend({taskId:G()})}),p_=Vr.merge(Wf),f_=Fr.extend({method:Ie("tasks/result"),params:di.extend({taskId:G()})}),ULe=Vr.loose(),m_=Vf.extend({method:Ie("tasks/list")}),h_=Bf.extend({tasks:lt(Wf)}),g_=Fr.extend({method:Ie("tasks/cancel"),params:di.extend({taskId:G()})}),dV=Vr.merge(Wf),pV=he({uri:G(),mimeType:er(G()),_meta:Zt(G(),Kt()).optional()}),fV=pV.extend({text:G()}),IT=G().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),mV=pV.extend({blob:IT}),Gf=Xr(["user","assistant"]),cl=he({audience:lt(Gf).optional(),priority:Ut().min(0).max(1).optional(),lastModified:Co.datetime({offset:!0}).optional()}),hV=he({...ol.shape,...Ff.shape,uri:G(),description:er(G()),mimeType:er(G()),size:er(Ut()),annotations:cl.optional(),_meta:er(Jr({}))}),Ame=he({...ol.shape,...Ff.shape,uriTemplate:G(),description:er(G()),mimeType:er(G()),annotations:cl.optional(),_meta:er(Jr({}))}),Rme=Vf.extend({method:Ie("resources/list")}),PT=Bf.extend({resources:lt(hV)}),Ume=Vf.extend({method:Ie("resources/templates/list")}),TT=Bf.extend({resourceTemplates:lt(Ame)}),OT=di.extend({uri:G()}),Dme=OT,Mme=Fr.extend({method:Ie("resources/read"),params:Dme}),zT=Vr.extend({contents:lt(Gt([fV,mV]))}),CT=Ii.extend({method:Ie("notifications/resources/list_changed"),params:Ei.optional()}),Lme=OT,qme=Fr.extend({method:Ie("resources/subscribe"),params:Lme}),Zme=OT,Fme=Fr.extend({method:Ie("resources/unsubscribe"),params:Zme}),Vme=Ei.extend({uri:G()}),Bme=Ii.extend({method:Ie("notifications/resources/updated"),params:Vme}),Wme=he({name:G(),description:er(G()),required:er(Er())}),Kme=he({...ol.shape,...Ff.shape,description:er(G()),arguments:er(lt(Wme)),_meta:er(Jr({}))}),Gme=Vf.extend({method:Ie("prompts/list")}),NT=Bf.extend({prompts:lt(Kme)}),Hme=di.extend({name:G(),arguments:Zt(G(),G()).optional()}),Qme=Fr.extend({method:Ie("prompts/get"),params:Hme}),jT=he({type:Ie("text"),text:G(),annotations:cl.optional(),_meta:Zt(G(),Kt()).optional()}),AT=he({type:Ie("image"),data:IT,mimeType:G(),annotations:cl.optional(),_meta:Zt(G(),Kt()).optional()}),RT=he({type:Ie("audio"),data:IT,mimeType:G(),annotations:cl.optional(),_meta:Zt(G(),Kt()).optional()}),Yme=he({type:Ie("tool_use"),name:G(),id:G(),input:Zt(G(),Kt()),_meta:Zt(G(),Kt()).optional()}),Jme=he({type:Ie("resource"),resource:Gt([fV,mV]),annotations:cl.optional(),_meta:Zt(G(),Kt()).optional()}),Xme=hV.extend({type:Ie("resource_link")}),UT=Gt([jT,AT,RT,Xme,Jme]),ehe=he({role:Gf,content:UT}),DT=Vr.extend({description:G().optional(),messages:lt(ehe)}),MT=Ii.extend({method:Ie("notifications/prompts/list_changed"),params:Ei.optional()}),the=he({title:G().optional(),readOnlyHint:Er().optional(),destructiveHint:Er().optional(),idempotentHint:Er().optional(),openWorldHint:Er().optional()}),rhe=he({taskSupport:Xr(["required","optional","forbidden"]).optional()}),gV=he({...ol.shape,...Ff.shape,description:G().optional(),inputSchema:he({type:Ie("object"),properties:Zt(G(),Nr).optional(),required:lt(G()).optional()}).catchall(Kt()),outputSchema:he({type:Ie("object"),properties:Zt(G(),Nr).optional(),required:lt(G()).optional()}).catchall(Kt()).optional(),annotations:the.optional(),execution:rhe.optional(),_meta:Zt(G(),Kt()).optional()}),nhe=Vf.extend({method:Ie("tools/list")}),LT=Bf.extend({tools:lt(gV)}),ul=Vr.extend({content:lt(UT).default([]),structuredContent:Zt(G(),Kt()).optional(),isError:Er().optional()}),DLe=ul.or(Vr.extend({toolResult:Kt()})),ihe=qf.extend({name:G(),arguments:Zt(G(),Kt()).optional()}),ahe=Fr.extend({method:Ie("tools/call"),params:ihe}),qT=Ii.extend({method:Ie("notifications/tools/list_changed"),params:Ei.optional()}),vV=he({autoRefresh:Er().default(!0),debounceMs:Ut().int().nonnegative().default(300)}),yV=Xr(["debug","info","notice","warning","error","critical","alert","emergency"]),she=di.extend({level:yV}),ohe=Fr.extend({method:Ie("logging/setLevel"),params:she}),che=Ei.extend({level:yV,logger:G().optional(),data:Kt()}),uhe=Ii.extend({method:Ie("notifications/message"),params:che}),lhe=he({name:G().optional()}),dhe=he({hints:lt(lhe).optional(),costPriority:Ut().min(0).max(1).optional(),speedPriority:Ut().min(0).max(1).optional(),intelligencePriority:Ut().min(0).max(1).optional()}),phe=he({mode:Xr(["auto","required","none"]).optional()}),fhe=he({type:Ie("tool_result"),toolUseId:G().describe("The unique identifier for the corresponding tool call."),content:lt(UT).default([]),structuredContent:he({}).loose().optional(),isError:Er().optional(),_meta:Zt(G(),Kt()).optional()}),mhe=lv("type",[jT,AT,RT]),a_=lv("type",[jT,AT,RT,Yme,fhe]),hhe=he({role:Gf,content:Gt([a_,lt(a_)]),_meta:Zt(G(),Kt()).optional()}),ghe=qf.extend({messages:lt(hhe),modelPreferences:dhe.optional(),systemPrompt:G().optional(),includeContext:Xr(["none","thisServer","allServers"]).optional(),temperature:Ut().optional(),maxTokens:Ut().int(),stopSequences:lt(G()).optional(),metadata:Nr.optional(),tools:lt(gV).optional(),toolChoice:phe.optional()}),ZT=Fr.extend({method:Ie("sampling/createMessage"),params:ghe}),FT=Vr.extend({model:G(),stopReason:er(Xr(["endTurn","stopSequence","maxTokens"]).or(G())),role:Gf,content:mhe}),VT=Vr.extend({model:G(),stopReason:er(Xr(["endTurn","stopSequence","maxTokens","toolUse"]).or(G())),role:Gf,content:Gt([a_,lt(a_)])}),vhe=he({type:Ie("boolean"),title:G().optional(),description:G().optional(),default:Er().optional()}),yhe=he({type:Ie("string"),title:G().optional(),description:G().optional(),minLength:Ut().optional(),maxLength:Ut().optional(),format:Xr(["email","uri","date","date-time"]).optional(),default:G().optional()}),_he=he({type:Xr(["number","integer"]),title:G().optional(),description:G().optional(),minimum:Ut().optional(),maximum:Ut().optional(),default:Ut().optional()}),bhe=he({type:Ie("string"),title:G().optional(),description:G().optional(),enum:lt(G()),default:G().optional()}),xhe=he({type:Ie("string"),title:G().optional(),description:G().optional(),oneOf:lt(he({const:G(),title:G()})),default:G().optional()}),whe=he({type:Ie("string"),title:G().optional(),description:G().optional(),enum:lt(G()),enumNames:lt(G()).optional(),default:G().optional()}),khe=Gt([bhe,xhe]),She=he({type:Ie("array"),title:G().optional(),description:G().optional(),minItems:Ut().optional(),maxItems:Ut().optional(),items:he({type:Ie("string"),enum:lt(G())}),default:lt(G()).optional()}),$he=he({type:Ie("array"),title:G().optional(),description:G().optional(),minItems:Ut().optional(),maxItems:Ut().optional(),items:he({anyOf:lt(he({const:G(),title:G()}))}),default:lt(G()).optional()}),Ehe=Gt([She,$he]),Ihe=Gt([whe,khe,Ehe]),Phe=Gt([Ihe,vhe,yhe,_he]),The=qf.extend({mode:Ie("form").optional(),message:G(),requestedSchema:he({type:Ie("object"),properties:Zt(G(),Phe),required:lt(G()).optional()})}),Ohe=qf.extend({mode:Ie("url"),message:G(),elicitationId:G(),url:G().url()}),zhe=Gt([The,Ohe]),BT=Fr.extend({method:Ie("elicitation/create"),params:zhe}),Che=Ei.extend({elicitationId:G()}),Nhe=Ii.extend({method:Ie("notifications/elicitation/complete"),params:Che}),WT=Vr.extend({action:Xr(["accept","decline","cancel"]),content:fv(e=>e===null?void 0:e,Zt(G(),Gt([G(),Ut(),Er(),lt(G())])).optional())}),jhe=he({type:Ie("ref/resource"),uri:G()}),Ahe=he({type:Ie("ref/prompt"),name:G()}),Rhe=di.extend({ref:Gt([Ahe,jhe]),argument:he({name:G(),value:G()}),context:he({arguments:Zt(G(),G()).optional()}).optional()}),Uhe=Fr.extend({method:Ie("completion/complete"),params:Rhe}),KT=Vr.extend({completion:Jr({values:lt(G()).max(100),total:er(Ut().int()),hasMore:er(Er())})}),Dhe=he({uri:G().startsWith("file://"),name:G().optional(),_meta:Zt(G(),Kt()).optional()}),Mhe=Fr.extend({method:Ie("roots/list"),params:di.optional()}),Lhe=Vr.extend({roots:lt(Dhe)}),qhe=Ii.extend({method:Ie("notifications/roots/list_changed"),params:Ei.optional()}),MLe=Gt([u_,Ime,Uhe,ohe,Qme,Gme,Rme,Ume,Mme,qme,Fme,ahe,nhe,d_,f_,m_,g_]),LLe=Gt([c_,l_,Tme,qhe,Kf]),qLe=Gt([Jo,FT,VT,WT,Lhe,p_,h_,Xo]),ZLe=Gt([u_,ZT,BT,Mhe,d_,f_,m_,g_]),FLe=Gt([c_,l_,uhe,Bme,CT,qT,MT,Kf,Nhe]),VLe=Gt([Jo,ET,KT,DT,NT,PT,TT,zT,ul,LT,p_,h_,Xo]),ze=class e extends Error{constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,r,n){if(t===qe.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new bT(i.elicitations,r)}return new e(t,r,n)}},bT=class extends ze{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(qe.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}});function Ks(e){return e==="completed"||e==="failed"||e==="cancelled"}var _V=P(()=>{});function GT(e){let r=n_(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=X3(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function HT(e,t){let r=ia(e,t);if(!r.success)throw r.error;return r.data}var bV=P(()=>{yT();i_();ks()});function xV(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function wV(e,t){let r={...e};for(let n in t){let i=n,a=t[i];if(a===void 0)continue;let s=r[i];xV(s)&&xV(a)?r[i]={...s,...a}:r[i]=a}return r}var Zhe,v_,kV=P(()=>{i_();Hf();_V();bV();Zhe=6e4,v_=class{constructor(t){this._options=t,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(c_,r=>{this._oncancel(r)}),this.setNotificationHandler(l_,r=>{this._onprogress(r)}),this.setRequestHandler(u_,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(d_,async(r,n)=>{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new ze(qe.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(f_,async(r,n)=>{let i=async()=>{let a=r.params.taskId;if(this._taskMessageQueue){let o;for(;o=await this._taskMessageQueue.dequeue(a,n.sessionId);){if(o.type==="response"||o.type==="error"){let c=o.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),o.type==="response")l(c);else{let d=c,p=new ze(d.error.code,d.error.message,d.error.data);l(p)}else{let d=o.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(o.message,{relatedRequestId:n.requestId})}}let s=await this._taskStore.getTask(a,n.sessionId);if(!s)throw new ze(qe.InvalidParams,`Task not found: ${a}`);if(!Ks(s.status))return await this._waitForTaskUpdate(a,n.signal),await i();if(Ks(s.status)){let o=await this._taskStore.getTaskResult(a,n.sessionId);return this._clearTaskQueue(a),{...o,_meta:{...o._meta,[Ws]:{taskId:a}}}}return await i()};return await i()}),this.setRequestHandler(m_,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 ze(qe.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(g_,async(r,n)=>{try{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new ze(qe.InvalidParams,`Task not found: ${r.params.taskId}`);if(Ks(i.status))throw new ze(qe.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 ze(qe.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...a}}catch(i){throw i instanceof ze?i:new ze(qe.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,n,i,a=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:a,onTimeout:i})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),ze.fromError(qe.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){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=t;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,s)=>{i?.(a,s),Zf(a)||cV(a)?this._onresponse(a):kT(a)?this._onrequest(a,s):oV(a)?this._onnotification(a):this._onerror(new Error(`Unknown message type: ${JSON.stringify(a)}`))},await this._transport.start()}_onclose(){let t=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=ze.fromError(qe.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of t.values())n(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,r){let n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,i=this._transport,a=t.params?._meta?.[Ws]?.taskId;if(n===void 0){let l={jsonrpc:"2.0",id:t.id,error:{code:qe.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 s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let o=iV(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,i?.sessionId):void 0,u={signal:s.signal,sessionId:i?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(s.signal.aborted)return;let d={relatedRequestId:t.id};a&&(d.relatedTask={taskId:a}),await this.notification(l,d)},sendRequest:async(l,d,p)=>{if(s.signal.aborted)throw new ze(qe.ConnectionClosed,"Request was cancelled");let f={...p,relatedRequestId:t.id};a&&!f.relatedTask&&(f.relatedTask={taskId:a});let m=f.relatedTask?.taskId??a;return m&&c&&await c.updateTaskStatus(m,"input_required"),await this.request(l,d,f)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:a,taskStore:c,taskRequestedTtl:o?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,u)).then(async l=>{if(s.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:t.id};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"response",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)},async l=>{if(s.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:qe.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(t.id)===s&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.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(t)}`));return}let s=this._responseHandlers.get(i),o=this._timeoutInfo.get(i);if(o&&s&&o.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(c){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),s(c);return}a(n)}_onresponse(t){let r=Number(t.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Zf(t))n(t);else{let s=new ze(t.error.code,t.error.message,t.error.data);n(s)}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(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let a=!1;if(Zf(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let o=s.task;typeof o.taskId=="string"&&(a=!0,this._taskProgressTokens.set(o.taskId,r))}}if(a||this._progressHandlers.delete(r),Zf(t))i(t);else{let s=ze.fromError(t.error.code,t.error.message,t.error.data);i(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,n){let{task:i}=n??{};if(!i){try{yield{type:"result",result:await this.request(t,r,n)}}catch(s){yield{type:"error",error:s instanceof ze?s:new ze(qe.InternalError,String(s))}}return}let a;try{let s=await this.request(t,Xo,n);if(s.task)a=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new ze(qe.InternalError,"Task creation did not return a task");for(;;){let o=await this.getTask({taskId:a},n);if(yield{type:"taskStatus",task:o},Ks(o.status)){o.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:a},r,n)}:o.status==="failed"?yield{type:"error",error:new ze(qe.InternalError,`Task ${a} failed`)}:o.status==="cancelled"&&(yield{type:"error",error:new ze(qe.InternalError,`Task ${a} was cancelled`)});return}if(o.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:a},r,n)};return}let c=o.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof ze?s:new ze(qe.InternalError,String(s))}}}request(t,r,n){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:s,task:o,relatedTask:c}=n??{};return new Promise((u,l)=>{let d=_=>{l(_)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),o&&this.assertTaskCapability(t.method)}catch(_){d(_);return}n?.signal?.throwIfAborted();let p=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:p};n?.onprogress&&(this._progressHandlers.set(p,n.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:p}}),o&&(f.params={...f.params,task:o}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Ws]:c}});let m=_=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(_)}},{relatedRequestId:i,resumptionToken:a,onresumptiontoken:s}).catch(b=>this._onerror(new Error(`Failed to send cancellation: ${b}`)));let y=_ instanceof ze?_:new ze(qe.RequestTimeout,String(_));l(y)};this._responseHandlers.set(p,_=>{if(!n?.signal?.aborted){if(_ instanceof Error)return l(_);try{let y=ia(r,_.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??Zhe,g=()=>m(ze.fromError(qe.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(p,v,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let h=c?.taskId;if(h){let _=y=>{let b=this._responseHandlers.get(p);b?b(y):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,_),this._enqueueTaskMessage(h,{type:"request",message:f,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(p),l(y)})}else this._transport.send(f,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:s}).catch(_=>{this._cleanupTimeout(p),l(_)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},p_,r)}async getTaskResult(t,r,n){return this.request({method:"tasks/result",params:t},r,n)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},h_,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},dV,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n=r?.relatedTask?.taskId;if(n){let o={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Ws]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:o,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let o={...t,jsonrpc:"2.0"};r?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[Ws]:r.relatedTask}}}),this._transport?.send(o,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Ws]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=GT(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,a)=>{let s=HT(t,i);return Promise.resolve(r(s,a))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let n=GT(t);this._notificationHandlers.set(n,i=>{let a=HT(t,i);return Promise.resolve(r(a))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,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(t,r,n,i)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(t,r);for(let i of n)if(i.type==="request"&&kT(i.message)){let a=i.message.id,s=this._requestResolvers.get(a);s?(s(new ze(qe.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(a)):this._onerror(new Error(`Resolver missing for request ${a} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let i=await this._taskStore?.getTask(t);i?.pollInterval&&(n=i.pollInterval)}catch{}return new Promise((i,a)=>{if(r.aborted){a(new ze(qe.InvalidRequest,"Request cancelled"));return}let s=setTimeout(i,n);r.addEventListener("abort",()=>{clearTimeout(s),a(new ze(qe.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!t)throw new Error("No request provided");return await n.createTask(i,t.id,{method:t.method,params:t.params},r)},getTask:async i=>{let a=await n.getTask(i,r);if(!a)throw new ze(qe.InvalidParams,"Failed to retrieve task: Task not found");return a},storeTaskResult:async(i,a,s)=>{await n.storeTaskResult(i,a,s,r);let o=await n.getTask(i,r);if(o){let c=Kf.parse({method:"notifications/tasks/status",params:o});await this.notification(c),Ks(o.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,a,s)=>{let o=await n.getTask(i,r);if(!o)throw new ze(qe.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(Ks(o.status))throw new ze(qe.InvalidParams,`Cannot update task "${i}" from terminal status "${o.status}" to "${a}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,a,s,r);let c=await n.getTask(i,r);if(c){let u=Kf.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Ks(c.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}}});var Jf=C(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.regexpCode=Nt.getEsmExportName=Nt.getProperty=Nt.safeStringify=Nt.stringify=Nt.strConcat=Nt.addCodeArg=Nt.str=Nt._=Nt.nil=Nt._Code=Nt.Name=Nt.IDENTIFIER=Nt._CodeOrName=void 0;var Qf=class{};Nt._CodeOrName=Qf;Nt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ec=class extends Qf{constructor(t){if(super(),!Nt.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Nt.Name=ec;var Pi=class extends Qf{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof ec&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Nt._Code=Pi;Nt.nil=new Pi("");function SV(e,...t){let r=[e[0]],n=0;for(;n<t.length;)YT(r,t[n]),r.push(e[++n]);return new Pi(r)}Nt._=SV;var QT=new Pi("+");function $V(e,...t){let r=[Yf(e[0])],n=0;for(;n<t.length;)r.push(QT),YT(r,t[n]),r.push(QT,Yf(e[++n]));return Fhe(r),new Pi(r)}Nt.str=$V;function YT(e,t){t instanceof Pi?e.push(...t._items):t instanceof ec?e.push(t):e.push(Whe(t))}Nt.addCodeArg=YT;function Fhe(e){let t=1;for(;t<e.length-1;){if(e[t]===QT){let r=Vhe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Vhe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof ec||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof ec))return`"${e}${t.slice(1)}`}function Bhe(e,t){return t.emptyStr()?e:e.emptyStr()?t:$V`${e}${t}`}Nt.strConcat=Bhe;function Whe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Yf(Array.isArray(e)?e.join(","):e)}function Khe(e){return new Pi(Yf(e))}Nt.stringify=Khe;function Yf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Nt.safeStringify=Yf;function Ghe(e){return typeof e=="string"&&Nt.IDENTIFIER.test(e)?new Pi(`.${e}`):SV`[${e}]`}Nt.getProperty=Ghe;function Hhe(e){if(typeof e=="string"&&Nt.IDENTIFIER.test(e))return new Pi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Nt.getEsmExportName=Hhe;function Qhe(e){return new Pi(e.toString())}Nt.regexpCode=Qhe});var eO=C(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ValueScope=Dn.ValueScopeName=Dn.Scope=Dn.varKinds=Dn.UsedValueState=void 0;var Un=Jf(),JT=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},y_;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(y_||(Dn.UsedValueState=y_={}));Dn.varKinds={const:new Un.Name("const"),let:new Un.Name("let"),var:new Un.Name("var")};var __=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Un.Name?t:this.name(t)}name(t){return new Un.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Dn.Scope=__;var b_=class extends Un.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Un._)`.${new Un.Name(r)}[${n}]`}};Dn.ValueScopeName=b_;var Yhe=(0,Un._)`\n`,XT=class extends __{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Yhe:Un.nil}}get(){return this._scope}name(t){return new b_(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:a}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,o=this._values[a];if(o){let l=o.get(s);if(l)return l}else o=this._values[a]=new Map;o.set(s,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(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Un._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let a=Un.nil;for(let s in t){let o=t[s];if(!o)continue;let c=n[s]=n[s]||new Map;o.forEach(u=>{if(c.has(u))return;c.set(u,y_.Started);let l=r(u);if(l){let d=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const;a=(0,Un._)`${a}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))a=(0,Un._)`${a}${l}${this.opts._n}`;else throw new JT(u);c.set(u,y_.Completed)})}return a}};Dn.ValueScope=XT});var dt=C(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.or=ct.and=ct.not=ct.CodeGen=ct.operators=ct.varKinds=ct.ValueScopeName=ct.ValueScope=ct.Scope=ct.Name=ct.regexpCode=ct.stringify=ct.getProperty=ct.nil=ct.strConcat=ct.str=ct._=void 0;var wt=Jf(),aa=eO(),Gs=Jf();Object.defineProperty(ct,"_",{enumerable:!0,get:function(){return Gs._}});Object.defineProperty(ct,"str",{enumerable:!0,get:function(){return Gs.str}});Object.defineProperty(ct,"strConcat",{enumerable:!0,get:function(){return Gs.strConcat}});Object.defineProperty(ct,"nil",{enumerable:!0,get:function(){return Gs.nil}});Object.defineProperty(ct,"getProperty",{enumerable:!0,get:function(){return Gs.getProperty}});Object.defineProperty(ct,"stringify",{enumerable:!0,get:function(){return Gs.stringify}});Object.defineProperty(ct,"regexpCode",{enumerable:!0,get:function(){return Gs.regexpCode}});Object.defineProperty(ct,"Name",{enumerable:!0,get:function(){return Gs.Name}});var S_=eO();Object.defineProperty(ct,"Scope",{enumerable:!0,get:function(){return S_.Scope}});Object.defineProperty(ct,"ValueScope",{enumerable:!0,get:function(){return S_.ValueScope}});Object.defineProperty(ct,"ValueScopeName",{enumerable:!0,get:function(){return S_.ValueScopeName}});Object.defineProperty(ct,"varKinds",{enumerable:!0,get:function(){return S_.varKinds}});ct.operators={GT:new wt._Code(">"),GTE:new wt._Code(">="),LT:new wt._Code("<"),LTE:new wt._Code("<="),EQ:new wt._Code("==="),NEQ:new wt._Code("!=="),NOT:new wt._Code("!"),OR:new wt._Code("||"),AND:new wt._Code("&&"),ADD:new wt._Code("+")};var rs=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},tO=class extends rs{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?aa.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=dl(this.rhs,t,r)),this}get names(){return this.rhs instanceof wt._CodeOrName?this.rhs.names:{}}},x_=class extends rs{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof wt.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=dl(this.rhs,t,r),this}get names(){let t=this.lhs instanceof wt.Name?{}:{...this.lhs.names};return k_(t,this.rhs)}},rO=class extends x_{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},nO=class extends rs{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},iO=class extends rs{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},aO=class extends rs{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},sO=class extends rs{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=dl(this.code,t,r),this}get names(){return this.code instanceof wt._CodeOrName?this.code.names:{}}},Xf=class extends rs{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let a=n[i];a.optimizeNames(t,r)||(Jhe(t,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>nc(t,r.names),{})}},ns=class extends Xf{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},oO=class extends Xf{},ll=class extends ns{};ll.kind="else";var tc=class e extends ns{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ll(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(EV(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=dl(this.condition,t,r),this}get names(){let t=super.names;return k_(t,this.condition),this.else&&nc(t,this.else.names),t}};tc.kind="if";var rc=class extends ns{};rc.kind="for";var cO=class extends rc{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=dl(this.iteration,t,r),this}get names(){return nc(super.names,this.iteration.names)}},uO=class extends rc{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?aa.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${r} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(t)}get names(){let t=k_(super.names,this.from);return k_(t,this.to)}},w_=class extends rc{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=dl(this.iterable,t,r),this}get names(){return nc(super.names,this.iterable.names)}},em=class extends ns{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};em.kind="func";var tm=class extends Xf{render(t){return"return "+super.render(t)}};tm.kind="return";var lO=class extends ns{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&nc(t,this.catch.names),this.finally&&nc(t,this.finally.names),t}},rm=class extends ns{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};rm.kind="catch";var nm=class extends ns{render(t){return"finally"+super.render(t)}};nm.kind="finally";var dO=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
240
+ `:""},this._extScope=t,this._scope=new aa.Scope({parent:t}),this._nodes=[new oO]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new tO(t,a,n)),a}const(t,r,n){return this._def(aa.varKinds.const,t,r,n)}let(t,r,n){return this._def(aa.varKinds.let,t,r,n)}var(t,r,n){return this._def(aa.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new x_(t,r,n))}add(t,r){return this._leafNode(new rO(t,ct.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==wt.nil&&this._leafNode(new sO(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,wt.addCodeArg)(r,i));return r.push("}"),new wt._Code(r)}if(t,r,n){if(this._blockNode(new tc(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new tc(t))}else(){return this._elseNode(new ll)}endIf(){return this._endBlockNode(tc,ll)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new cO(t),r)}forRange(t,r,n,i,a=this.opts.es5?aa.varKinds.var:aa.varKinds.let){let s=this._scope.toName(t);return this._for(new uO(a,s,r,n),()=>i(s))}forOf(t,r,n,i=aa.varKinds.const){let a=this._scope.toName(t);if(this.opts.es5){let s=r instanceof wt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,wt._)`${s}.length`,o=>{this.var(a,(0,wt._)`${s}[${o}]`),n(a)})}return this._for(new w_("of",i,a,r),()=>n(a))}forIn(t,r,n,i=this.opts.es5?aa.varKinds.var:aa.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,wt._)`Object.keys(${r})`,n);let a=this._scope.toName(t);return this._for(new w_("in",i,a,r),()=>n(a))}endFor(){return this._endBlockNode(rc)}label(t){return this._leafNode(new nO(t))}break(t){return this._leafNode(new iO(t))}return(t){let r=new tm;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(tm)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new lO;if(this._blockNode(i),this.code(t),r){let a=this.name("e");this._currNode=i.catch=new rm(a),r(a)}return n&&(this._currNode=i.finally=new nm,this.code(n)),this._endBlockNode(rm,nm)}throw(t){return this._leafNode(new aO(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=wt.nil,n,i){return this._blockNode(new em(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(em)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof tc))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ct.CodeGen=dO;function nc(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function k_(e,t){return t instanceof wt._CodeOrName?nc(e,t.names):e}function dl(e,t,r){if(e instanceof wt.Name)return n(e);if(!i(e))return e;return new wt._Code(e._items.reduce((a,s)=>(s instanceof wt.Name&&(s=n(s)),s instanceof wt._Code?a.push(...s._items):a.push(s),a),[]));function n(a){let s=r[a.str];return s===void 0||t[a.str]!==1?a:(delete t[a.str],s)}function i(a){return a instanceof wt._Code&&a._items.some(s=>s instanceof wt.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function Jhe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function EV(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,wt._)`!${pO(e)}`}ct.not=EV;var Xhe=IV(ct.operators.AND);function ege(...e){return e.reduce(Xhe)}ct.and=ege;var tge=IV(ct.operators.OR);function rge(...e){return e.reduce(tge)}ct.or=rge;function IV(e){return(t,r)=>t===wt.nil?r:r===wt.nil?t:(0,wt._)`${pO(t)} ${e} ${pO(r)}`}function pO(e){return e instanceof wt.Name?e:(0,wt._)`(${e})`}});var Et=C(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.checkStrictMode=pt.getErrorPath=pt.Type=pt.useFunc=pt.setEvaluated=pt.evaluatedPropsToName=pt.mergeEvaluated=pt.eachItem=pt.unescapeJsonPointer=pt.escapeJsonPointer=pt.escapeFragment=pt.unescapeFragment=pt.schemaRefOrVal=pt.schemaHasRulesButRef=pt.schemaHasRules=pt.checkUnknownRules=pt.alwaysValidSchema=pt.toHash=void 0;var Yt=dt(),nge=Jf();function ige(e){let t={};for(let r of e)t[r]=!0;return t}pt.toHash=ige;function age(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(OV(e,t),!zV(t,e.self.RULES.all))}pt.alwaysValidSchema=age;function OV(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let a in t)i[a]||jV(e,`unknown keyword: "${a}"`)}pt.checkUnknownRules=OV;function zV(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}pt.schemaHasRules=zV;function sge(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}pt.schemaHasRulesButRef=sge;function oge({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Yt._)`${r}`}return(0,Yt._)`${e}${t}${(0,Yt.getProperty)(n)}`}pt.schemaRefOrVal=oge;function cge(e){return CV(decodeURIComponent(e))}pt.unescapeFragment=cge;function uge(e){return encodeURIComponent(mO(e))}pt.escapeFragment=uge;function mO(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}pt.escapeJsonPointer=mO;function CV(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}pt.unescapeJsonPointer=CV;function lge(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}pt.eachItem=lge;function PV({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,a,s,o)=>{let c=s===void 0?a:s instanceof Yt.Name?(a instanceof Yt.Name?e(i,a,s):t(i,a,s),s):a instanceof Yt.Name?(t(i,s,a),a):r(a,s);return o===Yt.Name&&!(c instanceof Yt.Name)?n(i,c):c}}pt.mergeEvaluated={props:PV({mergeNames:(e,t,r)=>e.if((0,Yt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Yt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Yt._)`${r} || {}`).code((0,Yt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Yt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Yt._)`${r} || {}`),hO(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:NV}),items:PV({mergeNames:(e,t,r)=>e.if((0,Yt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Yt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Yt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Yt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function NV(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Yt._)`{}`);return t!==void 0&&hO(e,r,t),r}pt.evaluatedPropsToName=NV;function hO(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Yt._)`${t}${(0,Yt.getProperty)(n)}`,!0))}pt.setEvaluated=hO;var TV={};function dge(e,t){return e.scopeValue("func",{ref:t,code:TV[t.code]||(TV[t.code]=new nge._Code(t.code))})}pt.useFunc=dge;var fO;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(fO||(pt.Type=fO={}));function pge(e,t,r){if(e instanceof Yt.Name){let n=t===fO.Num;return r?n?(0,Yt._)`"[" + ${e} + "]"`:(0,Yt._)`"['" + ${e} + "']"`:n?(0,Yt._)`"/" + ${e}`:(0,Yt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Yt.getProperty)(e).toString():"/"+mO(e)}pt.getErrorPath=pge;function jV(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}pt.checkStrictMode=jV});var is=C(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});var en=dt(),fge={data:new en.Name("data"),valCxt:new en.Name("valCxt"),instancePath:new en.Name("instancePath"),parentData:new en.Name("parentData"),parentDataProperty:new en.Name("parentDataProperty"),rootData:new en.Name("rootData"),dynamicAnchors:new en.Name("dynamicAnchors"),vErrors:new en.Name("vErrors"),errors:new en.Name("errors"),this:new en.Name("this"),self:new en.Name("self"),scope:new en.Name("scope"),json:new en.Name("json"),jsonPos:new en.Name("jsonPos"),jsonLen:new en.Name("jsonLen"),jsonPart:new en.Name("jsonPart")};gO.default=fge});var im=C(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.extendErrors=tn.resetErrorsCount=tn.reportExtraError=tn.reportError=tn.keyword$DataError=tn.keywordError=void 0;var It=dt(),$_=Et(),Sn=is();tn.keywordError={message:({keyword:e})=>(0,It.str)`must pass "${e}" keyword validation`};tn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,It.str)`"${e}" keyword must be ${t} ($data)`:(0,It.str)`"${e}" keyword is invalid ($data)`};function mge(e,t=tn.keywordError,r,n){let{it:i}=e,{gen:a,compositeRule:s,allErrors:o}=i,c=UV(e,t,r);n??(s||o)?AV(a,c):RV(i,(0,It._)`[${c}]`)}tn.reportError=mge;function hge(e,t=tn.keywordError,r){let{it:n}=e,{gen:i,compositeRule:a,allErrors:s}=n,o=UV(e,t,r);AV(i,o),a||s||RV(n,Sn.default.vErrors)}tn.reportExtraError=hge;function gge(e,t){e.assign(Sn.default.errors,t),e.if((0,It._)`${Sn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,It._)`${Sn.default.vErrors}.length`,t),()=>e.assign(Sn.default.vErrors,null)))}tn.resetErrorsCount=gge;function vge({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",i,Sn.default.errors,o=>{e.const(s,(0,It._)`${Sn.default.vErrors}[${o}]`),e.if((0,It._)`${s}.instancePath === undefined`,()=>e.assign((0,It._)`${s}.instancePath`,(0,It.strConcat)(Sn.default.instancePath,a.errorPath))),e.assign((0,It._)`${s}.schemaPath`,(0,It.str)`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign((0,It._)`${s}.schema`,r),e.assign((0,It._)`${s}.data`,n))})}tn.extendErrors=vge;function AV(e,t){let r=e.const("err",t);e.if((0,It._)`${Sn.default.vErrors} === null`,()=>e.assign(Sn.default.vErrors,(0,It._)`[${r}]`),(0,It._)`${Sn.default.vErrors}.push(${r})`),e.code((0,It._)`${Sn.default.errors}++`)}function RV(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,It._)`new ${e.ValidationError}(${t})`):(r.assign((0,It._)`${n}.errors`,t),r.return(!1))}var ic={keyword:new It.Name("keyword"),schemaPath:new It.Name("schemaPath"),params:new It.Name("params"),propertyName:new It.Name("propertyName"),message:new It.Name("message"),schema:new It.Name("schema"),parentSchema:new It.Name("parentSchema")};function UV(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,It._)`{}`:yge(e,t,r)}function yge(e,t,r={}){let{gen:n,it:i}=e,a=[_ge(i,r),bge(e,r)];return xge(e,t,a),n.object(...a)}function _ge({errorPath:e},{instancePath:t}){let r=t?(0,It.str)`${e}${(0,$_.getErrorPath)(t,$_.Type.Str)}`:e;return[Sn.default.instancePath,(0,It.strConcat)(Sn.default.instancePath,r)]}function bge({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,It.str)`${t}/${e}`;return r&&(i=(0,It.str)`${i}${(0,$_.getErrorPath)(r,$_.Type.Str)}`),[ic.schemaPath,i]}function xge(e,{params:t,message:r},n){let{keyword:i,data:a,schemaValue:s,it:o}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=o;n.push([ic.keyword,i],[ic.params,typeof t=="function"?t(e):t||(0,It._)`{}`]),c.messages&&n.push([ic.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([ic.schema,s],[ic.parentSchema,(0,It._)`${l}${d}`],[Sn.default.data,a]),u&&n.push([ic.propertyName,u])}});var MV=C(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.boolOrEmptySchema=pl.topBoolOrEmptySchema=void 0;var wge=im(),kge=dt(),Sge=is(),$ge={message:"boolean schema is false"};function Ege(e){let{gen:t,schema:r,validateName:n}=e;r===!1?DV(e,!1):typeof r=="object"&&r.$async===!0?t.return(Sge.default.data):(t.assign((0,kge._)`${n}.errors`,null),t.return(!0))}pl.topBoolOrEmptySchema=Ege;function Ige(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),DV(e)):r.var(t,!0)}pl.boolOrEmptySchema=Ige;function DV(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,wge.reportError)(i,$ge,void 0,t)}});var vO=C(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.getRules=fl.isJSONType=void 0;var Pge=["string","number","integer","boolean","null","object","array"],Tge=new Set(Pge);function Oge(e){return typeof e=="string"&&Tge.has(e)}fl.isJSONType=Oge;function zge(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fl.getRules=zge});var yO=C(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.shouldUseRule=Hs.shouldUseGroup=Hs.schemaHasRulesForType=void 0;function Cge({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&LV(e,n)}Hs.schemaHasRulesForType=Cge;function LV(e,t){return t.rules.some(r=>qV(e,r))}Hs.shouldUseGroup=LV;function qV(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Hs.shouldUseRule=qV});var am=C(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.reportTypeError=rn.checkDataTypes=rn.checkDataType=rn.coerceAndCheckDataType=rn.getJSONTypes=rn.getSchemaTypes=rn.DataType=void 0;var Nge=vO(),jge=yO(),Age=im(),tt=dt(),ZV=Et(),ml;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ml||(rn.DataType=ml={}));function Rge(e){let t=FV(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}rn.getSchemaTypes=Rge;function FV(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Nge.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}rn.getJSONTypes=FV;function Uge(e,t){let{gen:r,data:n,opts:i}=e,a=Dge(t,i.coerceTypes),s=t.length>0&&!(a.length===0&&t.length===1&&(0,jge.schemaHasRulesForType)(e,t[0]));if(s){let o=bO(t,n,i.strictNumbers,ml.Wrong);r.if(o,()=>{a.length?Mge(e,t,a):xO(e)})}return s}rn.coerceAndCheckDataType=Uge;var VV=new Set(["string","number","integer","boolean","null"]);function Dge(e,t){return t?e.filter(r=>VV.has(r)||t==="array"&&r==="array"):[]}function Mge(e,t,r){let{gen:n,data:i,opts:a}=e,s=n.let("dataType",(0,tt._)`typeof ${i}`),o=n.let("coerced",(0,tt._)`undefined`);a.coerceTypes==="array"&&n.if((0,tt._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,tt._)`${i}[0]`).assign(s,(0,tt._)`typeof ${i}`).if(bO(t,i,a.strictNumbers),()=>n.assign(o,i))),n.if((0,tt._)`${o} !== undefined`);for(let u of r)(VV.has(u)||u==="array"&&a.coerceTypes==="array")&&c(u);n.else(),xO(e),n.endIf(),n.if((0,tt._)`${o} !== undefined`,()=>{n.assign(i,o),Lge(e,o)});function c(u){switch(u){case"string":n.elseIf((0,tt._)`${s} == "number" || ${s} == "boolean"`).assign(o,(0,tt._)`"" + ${i}`).elseIf((0,tt._)`${i} === null`).assign(o,(0,tt._)`""`);return;case"number":n.elseIf((0,tt._)`${s} == "boolean" || ${i} === null
241
+ || (${s} == "string" && ${i} && ${i} == +${i})`).assign(o,(0,tt._)`+${i}`);return;case"integer":n.elseIf((0,tt._)`${s} === "boolean" || ${i} === null
242
+ || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(o,(0,tt._)`+${i}`);return;case"boolean":n.elseIf((0,tt._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(o,!1).elseIf((0,tt._)`${i} === "true" || ${i} === 1`).assign(o,!0);return;case"null":n.elseIf((0,tt._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(o,null);return;case"array":n.elseIf((0,tt._)`${s} === "string" || ${s} === "number"
243
+ || ${s} === "boolean" || ${i} === null`).assign(o,(0,tt._)`[${i}]`)}}}function Lge({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,tt._)`${t} !== undefined`,()=>e.assign((0,tt._)`${t}[${r}]`,n))}function _O(e,t,r,n=ml.Correct){let i=n===ml.Correct?tt.operators.EQ:tt.operators.NEQ,a;switch(e){case"null":return(0,tt._)`${t} ${i} null`;case"array":a=(0,tt._)`Array.isArray(${t})`;break;case"object":a=(0,tt._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s((0,tt._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return(0,tt._)`typeof ${t} ${i} ${e}`}return n===ml.Correct?a:(0,tt.not)(a);function s(o=tt.nil){return(0,tt.and)((0,tt._)`typeof ${t} == "number"`,o,r?(0,tt._)`isFinite(${t})`:tt.nil)}}rn.checkDataType=_O;function bO(e,t,r,n){if(e.length===1)return _O(e[0],t,r,n);let i,a=(0,ZV.toHash)(e);if(a.array&&a.object){let s=(0,tt._)`typeof ${t} != "object"`;i=a.null?s:(0,tt._)`!${t} || ${s}`,delete a.null,delete a.array,delete a.object}else i=tt.nil;a.number&&delete a.integer;for(let s in a)i=(0,tt.and)(i,_O(s,t,r,n));return i}rn.checkDataTypes=bO;var qge={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,tt._)`{type: ${e}}`:(0,tt._)`{type: ${t}}`};function xO(e){let t=Zge(e);(0,Age.reportError)(t,qge)}rn.reportTypeError=xO;function Zge(e){let{gen:t,data:r,schema:n}=e,i=(0,ZV.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var WV=C(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});E_.assignDefaults=void 0;var hl=dt(),Fge=Et();function Vge(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)BV(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,a)=>BV(e,a,i.default))}E_.assignDefaults=Vge;function BV(e,t,r){let{gen:n,compositeRule:i,data:a,opts:s}=e;if(r===void 0)return;let o=(0,hl._)`${a}${(0,hl.getProperty)(t)}`;if(i){(0,Fge.checkStrictMode)(e,`default is ignored for: ${o}`);return}let c=(0,hl._)`${o} === undefined`;s.useDefaults==="empty"&&(c=(0,hl._)`${c} || ${o} === null || ${o} === ""`),n.if(c,(0,hl._)`${o} = ${(0,hl.stringify)(r)}`)}});var Ti=C(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.validateUnion=Ft.validateArray=Ft.usePattern=Ft.callValidateCode=Ft.schemaProperties=Ft.allSchemaProperties=Ft.noPropertyInData=Ft.propertyInData=Ft.isOwnProperty=Ft.hasPropFunc=Ft.reportMissingProp=Ft.checkMissingProp=Ft.checkReportMissingProp=void 0;var sr=dt(),wO=Et(),Qs=is(),Bge=Et();function Wge(e,t){let{gen:r,data:n,it:i}=e;r.if(SO(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,sr._)`${t}`},!0),e.error()})}Ft.checkReportMissingProp=Wge;function Kge({gen:e,data:t,it:{opts:r}},n,i){return(0,sr.or)(...n.map(a=>(0,sr.and)(SO(e,t,a,r.ownProperties),(0,sr._)`${i} = ${a}`)))}Ft.checkMissingProp=Kge;function Gge(e,t){e.setParams({missingProperty:t},!0),e.error()}Ft.reportMissingProp=Gge;function KV(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,sr._)`Object.prototype.hasOwnProperty`})}Ft.hasPropFunc=KV;function kO(e,t,r){return(0,sr._)`${KV(e)}.call(${t}, ${r})`}Ft.isOwnProperty=kO;function Hge(e,t,r,n){let i=(0,sr._)`${t}${(0,sr.getProperty)(r)} !== undefined`;return n?(0,sr._)`${i} && ${kO(e,t,r)}`:i}Ft.propertyInData=Hge;function SO(e,t,r,n){let i=(0,sr._)`${t}${(0,sr.getProperty)(r)} === undefined`;return n?(0,sr.or)(i,(0,sr.not)(kO(e,t,r))):i}Ft.noPropertyInData=SO;function GV(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Ft.allSchemaProperties=GV;function Qge(e,t){return GV(t).filter(r=>!(0,wO.alwaysValidSchema)(e,t[r]))}Ft.schemaProperties=Qge;function Yge({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:s},o,c,u){let l=u?(0,sr._)`${e}, ${t}, ${n}${i}`:t,d=[[Qs.default.instancePath,(0,sr.strConcat)(Qs.default.instancePath,a)],[Qs.default.parentData,s.parentData],[Qs.default.parentDataProperty,s.parentDataProperty],[Qs.default.rootData,Qs.default.rootData]];s.opts.dynamicRef&&d.push([Qs.default.dynamicAnchors,Qs.default.dynamicAnchors]);let p=(0,sr._)`${l}, ${r.object(...d)}`;return c!==sr.nil?(0,sr._)`${o}.call(${c}, ${p})`:(0,sr._)`${o}(${p})`}Ft.callValidateCode=Yge;var Jge=(0,sr._)`new RegExp`;function Xge({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,sr._)`${i.code==="new RegExp"?Jge:(0,Bge.useFunc)(e,i)}(${r}, ${n})`})}Ft.usePattern=Xge;function eve(e){let{gen:t,data:r,keyword:n,it:i}=e,a=t.name("valid");if(i.allErrors){let o=t.let("valid",!0);return s(()=>t.assign(o,!1)),o}return t.var(a,!0),s(()=>t.break()),a;function s(o){let c=t.const("len",(0,sr._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:wO.Type.Num},a),t.if((0,sr.not)(a),o)})}}Ft.validateArray=eve;function tve(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,wO.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=t.let("valid",!1),o=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},o);t.assign(s,(0,sr._)`${s} || ${o}`),e.mergeValidEvaluated(l,o)||t.if((0,sr.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Ft.validateUnion=tve});var YV=C(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.validateKeywordUsage=Ea.validSchemaType=Ea.funcKeywordCode=Ea.macroKeywordCode=void 0;var $n=dt(),ac=is(),rve=Ti(),nve=im();function ive(e,t){let{gen:r,keyword:n,schema:i,parentSchema:a,it:s}=e,o=t.macro.call(s.self,i,a,s),c=QV(r,n,o);s.opts.validateSchema!==!1&&s.self.validateSchema(o,!0);let u=r.name("valid");e.subschema({schema:o,schemaPath:$n.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Ea.macroKeywordCode=ive;function ave(e,t){var r;let{gen:n,keyword:i,schema:a,parentSchema:s,$data:o,it:c}=e;ove(c,t);let u=!o&&t.compile?t.compile.call(c.self,a,s,c):t.validate,l=QV(n,i,u),d=n.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)v(),t.modifying&&HV(e),g(()=>e.error());else{let h=t.async?f():m();t.modifying&&HV(e),g(()=>sve(e,h))}}function f(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,$n._)`await `),_=>n.assign(d,!1).if((0,$n._)`${_} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,$n._)`${_}.errors`),()=>n.throw(_))),h}function m(){let h=(0,$n._)`${l}.errors`;return n.assign(h,null),v($n.nil),h}function v(h=t.async?(0,$n._)`await `:$n.nil){let _=c.opts.passContext?ac.default.this:ac.default.self,y=!("compile"in t&&!o||t.schema===!1);n.assign(d,(0,$n._)`${h}${(0,rve.callValidateCode)(e,l,_,y)}`,t.modifying)}function g(h){var _;n.if((0,$n.not)((_=t.valid)!==null&&_!==void 0?_:d),h)}}Ea.funcKeywordCode=ave;function HV(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,$n._)`${n.parentData}[${n.parentDataProperty}]`))}function sve(e,t){let{gen:r}=e;r.if((0,$n._)`Array.isArray(${t})`,()=>{r.assign(ac.default.vErrors,(0,$n._)`${ac.default.vErrors} === null ? ${t} : ${ac.default.vErrors}.concat(${t})`).assign(ac.default.errors,(0,$n._)`${ac.default.vErrors}.length`),(0,nve.extendErrors)(e)},()=>e.error())}function ove({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function QV(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,$n.stringify)(r)})}function cve(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Ea.validSchemaType=cve;function uve({schema:e,opts:t,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 s=i.dependencies;if(s?.some(o=>!Object.prototype.hasOwnProperty.call(e,o)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[a])){let c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Ea.validateKeywordUsage=uve});var XV=C(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.extendSubschemaMode=Ys.extendSubschemaData=Ys.getSubschema=void 0;var Ia=dt(),JV=Et();function lve(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let o=e.schema[t];return r===void 0?{schema:o,schemaPath:(0,Ia._)`${e.schemaPath}${(0,Ia.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:(0,Ia._)`${e.schemaPath}${(0,Ia.getProperty)(t)}${(0,Ia.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,JV.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Ys.getSubschema=lve;function dve(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,p=o.let("data",(0,Ia._)`${t.data}${(0,Ia.getProperty)(r)}`,!0);c(p),e.errorPath=(0,Ia.str)`${u}${(0,JV.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Ia._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(i!==void 0){let u=i instanceof Ia.Name?i:o.let("data",i,!0);c(u),s!==void 0&&(e.propertyName=s)}a&&(e.dataTypes=a);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}Ys.extendSubschemaData=dve;function pve(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}Ys.extendSubschemaMode=pve});var sm=C((hqe,eB)=>{"use strict";eB.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),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 s=a[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var rB=C((gqe,tB)=>{"use strict";var Js=tB.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};I_(t,n,i,e,"",e)};Js.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Js.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Js.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Js.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 I_(e,t,r,n,i,a,s,o,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,a,s,o,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Js.arrayKeywords)for(var p=0;p<d.length;p++)I_(e,t,r,d[p],i+"/"+l+"/"+p,a,i,l,n,p)}else if(l in Js.propsKeywords){if(d&&typeof d=="object")for(var f in d)I_(e,t,r,d[f],i+"/"+l+"/"+fve(f),a,i,l,n,f)}else(l in Js.keywords||e.allKeys&&!(l in Js.skipKeywords))&&I_(e,t,r,d,i+"/"+l,a,i,l,n)}r(n,i,a,s,o,c,u)}}function fve(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var om=C(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.getSchemaRefs=Mn.resolveUrl=Mn.normalizeId=Mn._getFullPath=Mn.getFullPath=Mn.inlineRef=void 0;var mve=Et(),hve=sm(),gve=rB(),vve=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function yve(e,t=!0){return typeof e=="boolean"?!0:t===!0?!$O(e):t?nB(e)<=t:!1}Mn.inlineRef=yve;var _ve=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function $O(e){for(let t in e){if(_ve.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some($O)||typeof r=="object"&&$O(r))return!0}return!1}function nB(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!vve.has(r)&&(typeof e[r]=="object"&&(0,mve.eachItem)(e[r],n=>t+=nB(n)),t===1/0))return 1/0}return t}function iB(e,t="",r){r!==!1&&(t=gl(t));let n=e.parse(t);return aB(e,n)}Mn.getFullPath=iB;function aB(e,t){return e.serialize(t).split("#")[0]+"#"}Mn._getFullPath=aB;var bve=/#\/?$/;function gl(e){return e?e.replace(bve,""):""}Mn.normalizeId=gl;function xve(e,t,r){return r=gl(r),e.resolve(t,r)}Mn.resolveUrl=xve;var wve=/^[a-z_][-a-z0-9._]*$/i;function kve(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=gl(e[r]||t),a={"":i},s=iB(n,i,!1),o={},c=new Set;return gve(e,{allKeys:!0},(d,p,f,m)=>{if(m===void 0)return;let v=s+p,g=a[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),_.call(this,d.$anchor),_.call(this,d.$dynamicAnchor),a[p]=g;function h(y){let b=this.opts.uriResolver.resolve;if(y=gl(g?b(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!==gl(v)&&(y[0]==="#"?(u(d,o[y],y),o[y]=d):this.refs[y]=v),y}function _(y){if(typeof y=="string"){if(!wve.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),o;function u(d,p,f){if(p!==void 0&&!hve(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Mn.getSchemaRefs=kve});var lm=C(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.getData=Xs.KeywordCxt=Xs.validateFunctionCode=void 0;var lB=MV(),sB=am(),IO=yO(),P_=am(),Sve=WV(),um=YV(),EO=XV(),Te=dt(),Fe=is(),$ve=om(),as=Et(),cm=im();function Eve(e){if(fB(e)&&(mB(e),pB(e))){Tve(e);return}dB(e,()=>(0,lB.topBoolOrEmptySchema)(e))}Xs.validateFunctionCode=Eve;function dB({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},a){i.code.es5?e.func(t,(0,Te._)`${Fe.default.data}, ${Fe.default.valCxt}`,n.$async,()=>{e.code((0,Te._)`"use strict"; ${oB(r,i)}`),Pve(e,i),e.code(a)}):e.func(t,(0,Te._)`${Fe.default.data}, ${Ive(i)}`,n.$async,()=>e.code(oB(r,i)).code(a))}function Ive(e){return(0,Te._)`{${Fe.default.instancePath}="", ${Fe.default.parentData}, ${Fe.default.parentDataProperty}, ${Fe.default.rootData}=${Fe.default.data}${e.dynamicRef?(0,Te._)`, ${Fe.default.dynamicAnchors}={}`:Te.nil}}={}`}function Pve(e,t){e.if(Fe.default.valCxt,()=>{e.var(Fe.default.instancePath,(0,Te._)`${Fe.default.valCxt}.${Fe.default.instancePath}`),e.var(Fe.default.parentData,(0,Te._)`${Fe.default.valCxt}.${Fe.default.parentData}`),e.var(Fe.default.parentDataProperty,(0,Te._)`${Fe.default.valCxt}.${Fe.default.parentDataProperty}`),e.var(Fe.default.rootData,(0,Te._)`${Fe.default.valCxt}.${Fe.default.rootData}`),t.dynamicRef&&e.var(Fe.default.dynamicAnchors,(0,Te._)`${Fe.default.valCxt}.${Fe.default.dynamicAnchors}`)},()=>{e.var(Fe.default.instancePath,(0,Te._)`""`),e.var(Fe.default.parentData,(0,Te._)`undefined`),e.var(Fe.default.parentDataProperty,(0,Te._)`undefined`),e.var(Fe.default.rootData,Fe.default.data),t.dynamicRef&&e.var(Fe.default.dynamicAnchors,(0,Te._)`{}`)})}function Tve(e){let{schema:t,opts:r,gen:n}=e;dB(e,()=>{r.$comment&&t.$comment&&gB(e),jve(e),n.let(Fe.default.vErrors,null),n.let(Fe.default.errors,0),r.unevaluated&&Ove(e),hB(e),Uve(e)})}function Ove(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Te._)`${r}.evaluated`),t.if((0,Te._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Te._)`${e.evaluated}.props`,(0,Te._)`undefined`)),t.if((0,Te._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Te._)`${e.evaluated}.items`,(0,Te._)`undefined`))}function oB(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Te._)`/*# sourceURL=${r} */`:Te.nil}function zve(e,t){if(fB(e)&&(mB(e),pB(e))){Cve(e,t);return}(0,lB.boolOrEmptySchema)(e,t)}function pB({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function fB(e){return typeof e.schema!="boolean"}function Cve(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&gB(e),Ave(e),Rve(e);let a=n.const("_errs",Fe.default.errors);hB(e,a),n.var(t,(0,Te._)`${a} === ${Fe.default.errors}`)}function mB(e){(0,as.checkUnknownRules)(e),Nve(e)}function hB(e,t){if(e.opts.jtd)return cB(e,[],!1,t);let r=(0,sB.getSchemaTypes)(e.schema),n=(0,sB.coerceAndCheckDataType)(e,r);cB(e,r,!n,t)}function Nve(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,as.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function jve(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,as.checkStrictMode)(e,"default is ignored in the schema root")}function Ave(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$ve.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Rve(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function gB({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let a=r.$comment;if(i.$comment===!0)e.code((0,Te._)`${Fe.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){let s=(0,Te.str)`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,Te._)`${Fe.default.self}.opts.$comment(${a}, ${s}, ${o}.schema)`)}}function Uve(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=e;r.$async?t.if((0,Te._)`${Fe.default.errors} === 0`,()=>t.return(Fe.default.data),()=>t.throw((0,Te._)`new ${i}(${Fe.default.vErrors})`)):(t.assign((0,Te._)`${n}.errors`,Fe.default.vErrors),a.unevaluated&&Dve(e),t.return((0,Te._)`${Fe.default.errors} === 0`))}function Dve({gen:e,evaluated:t,props:r,items:n}){r instanceof Te.Name&&e.assign((0,Te._)`${t}.props`,r),n instanceof Te.Name&&e.assign((0,Te._)`${t}.items`,n)}function cB(e,t,r,n){let{gen:i,schema:a,data:s,allErrors:o,opts:c,self:u}=e,{RULES:l}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,as.schemaHasRulesButRef)(a,l))){i.block(()=>yB(e,"$ref",l.all.$ref.definition));return}c.jtd||Mve(e,t),i.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,IO.shouldUseGroup)(a,p)&&(p.type?(i.if((0,P_.checkDataType)(p.type,s,c.strictNumbers)),uB(e,p),t.length===1&&t[0]===p.type&&r&&(i.else(),(0,P_.reportTypeError)(e)),i.endIf()):uB(e,p),o||i.if((0,Te._)`${Fe.default.errors} === ${n||0}`))}}function uB(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,Sve.assignDefaults)(e,t.type),r.block(()=>{for(let a of t.rules)(0,IO.shouldUseRule)(n,a)&&yB(e,a.keyword,a.definition,t.type)})}function Mve(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Lve(e,t),e.opts.allowUnionTypes||qve(e,t),Zve(e,e.dataTypes))}function Lve(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{vB(e.dataTypes,r)||PO(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Vve(e,t)}}function qve(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&PO(e,"use allowUnionTypes to allow union type keyword")}function Zve(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,IO.shouldUseRule)(e.schema,i)){let{type:a}=i.definition;a.length&&!a.some(s=>Fve(t,s))&&PO(e,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function Fve(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function vB(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Vve(e,t){let r=[];for(let n of e.dataTypes)vB(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function PO(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,as.checkStrictMode)(e,t,e.opts.strictTypes)}var T_=class{constructor(t,r,n){if((0,um.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,as.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",_B(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,um.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Fe.default.errors))}result(t,r,n){this.failResult((0,Te.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Te.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,Te._)`${r} !== undefined && (${(0,Te.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?cm.reportExtraError:cm.reportError)(this,this.def.error,r)}$dataError(){(0,cm.reportError)(this,this.def.$dataError||cm.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,cm.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Te.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Te.nil,r=Te.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:a,def:s}=this;n.if((0,Te.or)((0,Te._)`${i} === undefined`,r)),t!==Te.nil&&n.assign(t,!0),(a.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Te.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,Te.or)(s(),o());function s(){if(n.length){if(!(r instanceof Te.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,Te._)`${(0,P_.checkDataTypes)(c,r,a.opts.strictNumbers,P_.DataType.Wrong)}`}return Te.nil}function o(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Te._)`!${c}(${r})`}return Te.nil}}subschema(t,r){let n=(0,EO.getSubschema)(this.it,t);(0,EO.extendSubschemaData)(n,this.it,t),(0,EO.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return zve(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=as.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=as.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,Te.Name)),!0}};Xs.KeywordCxt=T_;function yB(e,t,r,n){let i=new T_(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,um.funcKeywordCode)(i,r):"macro"in r?(0,um.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,um.funcKeywordCode)(i,r)}var Bve=/^\/(?:[^~]|~0|~1)*$/,Wve=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function _B(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,a;if(e==="")return Fe.default.rootData;if(e[0]==="/"){if(!Bve.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,a=Fe.default.rootData}else{let u=Wve.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=t)throw new Error(c("property/index",l));return n[t-l]}if(l>t)throw new Error(c("data",l));if(a=r[t-l],!i)return a}let s=a,o=i.split("/");for(let u of o)u&&(a=(0,Te._)`${a}${(0,Te.getProperty)((0,as.unescapeJsonPointer)(u))}`,s=(0,Te._)`${s} && ${a}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}Xs.getData=_B});var O_=C(OO=>{"use strict";Object.defineProperty(OO,"__esModule",{value:!0});var TO=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};OO.default=TO});var dm=C(NO=>{"use strict";Object.defineProperty(NO,"__esModule",{value:!0});var zO=om(),CO=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,zO.resolveUrl)(t,r,n),this.missingSchema=(0,zO.normalizeId)((0,zO.getFullPath)(t,this.missingRef))}};NO.default=CO});var C_=C(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.resolveSchema=Oi.getCompilingSchema=Oi.resolveRef=Oi.compileSchema=Oi.SchemaEnv=void 0;var sa=dt(),Kve=O_(),sc=is(),oa=om(),bB=Et(),Gve=lm(),vl=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,oa.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Oi.SchemaEnv=vl;function AO(e){let t=xB.call(this,e);if(t)return t;let r=(0,oa.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,s=new sa.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),o;e.$async&&(o=s.scopeValue("Error",{ref:Kve.default,code:(0,sa._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:sc.default.data,parentData:sc.default.parentData,parentDataProperty:sc.default.parentDataProperty,dataNames:[sc.default.data],dataPathArr:[sa.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,sa.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:sa.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,sa._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,Gve.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(sc.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let f=new Function(`${sc.default.self}`,`${sc.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:m,items:v}=u;f.evaluated={props:m instanceof sa.Name?void 0:m,items:v instanceof sa.Name?void 0:v,dynamicProps:m instanceof sa.Name,dynamicItems:v instanceof sa.Name},f.source&&(f.source.evaluated=(0,sa.stringify)(f.evaluated))}return e.validate=f,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Oi.compileSchema=AO;function Hve(e,t,r){var n;r=(0,oa.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let a=Jve.call(this,e,r);if(a===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;s&&(a=new vl({schema:s,schemaId:o,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=Qve.call(this,a)}Oi.resolveRef=Hve;function Qve(e){return(0,oa.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:AO.call(this,e)}function xB(e){for(let t of this._compilations)if(Yve(t,e))return t}Oi.getCompilingSchema=xB;function Yve(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Jve(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||z_.call(this,e,t)}function z_(e,t){let r=this.opts.uriResolver.parse(t),n=(0,oa._getFullPath)(this.opts.uriResolver,r),i=(0,oa.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return jO.call(this,r,e);let a=(0,oa.normalizeId)(n),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){let o=z_.call(this,e,s);return typeof o?.schema!="object"?void 0:jO.call(this,r,o)}if(typeof s?.schema=="object"){if(s.validate||AO.call(this,s),a===(0,oa.normalizeId)(t)){let{schema:o}=s,{schemaId:c}=this.opts,u=o[c];return u&&(i=(0,oa.resolveUrl)(this.opts.uriResolver,i,u)),new vl({schema:o,schemaId:c,root:e,baseId:i})}return jO.call(this,r,s)}}Oi.resolveSchema=z_;var Xve=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function jO(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let o of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,bB.unescapeFragment)(o)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Xve.has(o)&&u&&(t=(0,oa.resolveUrl)(this.opts.uriResolver,t,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,bB.schemaHasRulesButRef)(r,this.RULES)){let o=(0,oa.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=z_.call(this,n,o)}let{schemaId:s}=this.opts;if(a=a||new vl({schema:r,schemaId:s,root:n,baseId:t}),a.schema!==a.root.schema)return a}});var wB=C((wqe,eye)=>{eye.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 UO=C((kqe,EB)=>{"use strict";var tye=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),SB=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 RO(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var rye=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function kB(e){return e.length=0,!0}function nye(e,t,r){if(e.length){let n=RO(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function iye(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],a=!1,s=!1,o=nye;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(a===!0&&(s=!0),!o(i,n,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(a=!0),n.push(":");continue}else if(u==="%"){if(!o(i,n,r))break;o=kB}else{i.push(u);continue}}return i.length&&(o===kB?r.zone=i.join(""):s?n.push(i.join("")):n.push(RO(i))),r.address=n.join(""),r}function $B(e){if(aye(e,":")<2)return{host:e,isIPV6:!1};let t=iye(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function aye(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function sye(e){let t=e,r=[],n=-1,i=0;for(;i=t.length;){if(i===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(i===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(i===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function oye(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function cye(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!SB(r)){let n=$B(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}EB.exports={nonSimpleDomain:rye,recomposeAuthority:cye,normalizeComponentEncoding:oye,removeDotSegments:sye,isIPv4:SB,isUUID:tye,normalizeIPv6:$B,stringArrayToHexStripped:RO}});var zB=C((Sqe,OB)=>{"use strict";var{isUUID:uye}=UO(),lye=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,dye=["http","https","ws","wss","urn","urn:uuid"];function pye(e){return dye.indexOf(e)!==-1}function DO(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function IB(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function PB(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function fye(e){return e.secure=DO(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function mye(e){if((e.port===(DO(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function hye(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(lye);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,a=MO(i);e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function gye(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,a=MO(i);a&&(e=a.serialize(e,t));let s=e,o=e.nss;return s.path=`${n||t.nid}:${o}`,t.skipEscape=!0,s}function vye(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!uye(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function yye(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var TB={scheme:"http",domainHost:!0,parse:IB,serialize:PB},_ye={scheme:"https",domainHost:TB.domainHost,parse:IB,serialize:PB},N_={scheme:"ws",domainHost:!0,parse:fye,serialize:mye},bye={scheme:"wss",domainHost:N_.domainHost,parse:N_.parse,serialize:N_.serialize},xye={scheme:"urn",parse:hye,serialize:gye,skipNormalize:!0},wye={scheme:"urn:uuid",parse:vye,serialize:yye,skipNormalize:!0},j_={http:TB,https:_ye,ws:N_,wss:bye,urn:xye,"urn:uuid":wye};Object.setPrototypeOf(j_,null);function MO(e){return e&&(j_[e]||j_[e.toLowerCase()])||void 0}OB.exports={wsIsSecure:DO,SCHEMES:j_,isValidSchemeName:pye,getSchemeHandler:MO}});var qO=C(($qe,R_)=>{"use strict";var{normalizeIPv6:kye,removeDotSegments:pm,recomposeAuthority:Sye,normalizeComponentEncoding:A_,isIPv4:$ye,nonSimpleDomain:Eye}=UO(),{SCHEMES:Iye,getSchemeHandler:CB}=zB();function Pye(e,t){return typeof e=="string"?e=Pa(ss(e,t),t):typeof e=="object"&&(e=ss(Pa(e,t),t)),e}function Tye(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=NB(ss(e,n),ss(t,n),n,!0);return n.skipEscape=!0,Pa(i,n)}function NB(e,t,r,n){let i={};return n||(e=ss(Pa(e,r),r),t=ss(Pa(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=pm(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=pm(t.path||""),i.query=t.query):(t.path?(t.path[0]==="/"?i.path=pm(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=pm(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function Oye(e,t,r){return typeof e=="string"?(e=unescape(e),e=Pa(A_(ss(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Pa(A_(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Pa(A_(ss(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Pa(A_(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Pa(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],a=CB(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 s=Sye(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let o=r.path;!n.absolutePath&&(!a||!a.absolutePath)&&(o=pm(o)),s===void 0&&o[0]==="/"&&o[1]==="/"&&(o="/%2F"+o.slice(2)),i.push(o)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var zye=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ss(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let a=e.match(zye);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($ye(n.host)===!1){let c=kye(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 s=CB(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&i===!1&&Eye(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(o){n.error=n.error||"Host's domain name can not be converted to ASCII: "+o}(!s||s&&!s.skipNormalize)&&(e.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)))),s&&s.parse&&s.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var LO={SCHEMES:Iye,normalize:Pye,resolve:Tye,resolveComponent:NB,equal:Oye,serialize:Pa,parse:ss};R_.exports=LO;R_.exports.default=LO;R_.exports.fastUri=LO});var AB=C(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0});var jB=qO();jB.code='require("ajv/dist/runtime/uri").default';ZO.default=jB});var FB=C(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.CodeGen=Br.Name=Br.nil=Br.stringify=Br.str=Br._=Br.KeywordCxt=void 0;var Cye=lm();Object.defineProperty(Br,"KeywordCxt",{enumerable:!0,get:function(){return Cye.KeywordCxt}});var yl=dt();Object.defineProperty(Br,"_",{enumerable:!0,get:function(){return yl._}});Object.defineProperty(Br,"str",{enumerable:!0,get:function(){return yl.str}});Object.defineProperty(Br,"stringify",{enumerable:!0,get:function(){return yl.stringify}});Object.defineProperty(Br,"nil",{enumerable:!0,get:function(){return yl.nil}});Object.defineProperty(Br,"Name",{enumerable:!0,get:function(){return yl.Name}});Object.defineProperty(Br,"CodeGen",{enumerable:!0,get:function(){return yl.CodeGen}});var Nye=O_(),LB=dm(),jye=vO(),fm=C_(),Aye=dt(),mm=om(),U_=am(),VO=Et(),RB=wB(),Rye=AB(),qB=(e,t)=>new RegExp(e,t);qB.code="new RegExp";var Uye=["removeAdditional","useDefaults","coerceTypes"],Dye=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Mye={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."},Lye={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},UB=200;function qye(e){var t,r,n,i,a,s,o,c,u,l,d,p,f,m,v,g,h,_,y,b,x,w,k,E,O;let U=e.strict,z=(t=e.code)===null||t===void 0?void 0:t.optimize,L=z===!0||z===void 0?1:z||0,W=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:qB,R=(i=e.uriResolver)!==null&&i!==void 0?i:Rye.default;return{strictSchema:(s=(a=e.strictSchema)!==null&&a!==void 0?a:U)!==null&&s!==void 0?s:!0,strictNumbers:(c=(o=e.strictNumbers)!==null&&o!==void 0?o:U)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:U)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:U)!==null&&p!==void 0?p:"log",strictRequired:(m=(f=e.strictRequired)!==null&&f!==void 0?f:U)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:L,regExp:W}:{optimize:L,regExp:W},loopRequired:(v=e.loopRequired)!==null&&v!==void 0?v:UB,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:UB,meta:(h=e.meta)!==null&&h!==void 0?h:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(y=e.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(b=e.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(x=e.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=e.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(E=e.unicodeRegExp)!==null&&E!==void 0?E:!0,int32range:(O=e.int32range)!==null&&O!==void 0?O:!0,uriResolver:R}}var hm=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...qye(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new Aye.ValueScope({scope:{},prefixes:Dye,es5:r,lines:n}),this.logger=Kye(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,jye.getRules)(),DB.call(this,Mye,t,"NOT SUPPORTED"),DB.call(this,Lye,t,"DEPRECATED","warn"),this._metaOpts=Bye.call(this),t.formats&&Fye.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&Vye.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),Zye.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=RB;n==="id"&&(i={...RB},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(l,d){await a.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||s.call(this,p)}async function a(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof LB.default))throw d;return o.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function o({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(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,i);return this}let a;if(typeof t=="object"){let{schemaId:s}=this.opts;if(a=t[s],a!==void 0&&typeof a!="string")throw new Error(`schema ${s} must be string`)}return r=(0,mm.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}getSchema(t){let r;for(;typeof(r=MB.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new fm.SchemaEnv({schema:{},schemaId:n});if(r=fm.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=MB.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,mm.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Hye.call(this,n,r),!r)return(0,VO.eachItem)(n,a=>FO.call(this,a)),this;Yye.call(this,r);let i={...r,type:(0,U_.getJSONTypes)(r.type),schemaType:(0,U_.getJSONTypes)(r.schemaType)};return(0,VO.eachItem)(n,i.type.length===0?a=>FO.call(this,a,i):a=>i.type.forEach(s=>FO.call(this,a,i,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(a=>a.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,a)=>i+r+a)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let a=i.split("/").slice(1),s=t;for(let o of a)s=s[o];for(let o in n){let c=n[o];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[o];u&&l&&(s[o]=ZB(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,a=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof t=="object")s=t[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,mm.normalizeId)(s||n);let u=mm.getSchemaRefs.call(this,t,n);return c=new fm.SchemaEnv({schema:t,schemaId:o,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(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):fm.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{fm.compileSchema.call(this,t)}finally{this.opts=r}}};hm.ValidationError=Nye.default;hm.MissingRefError=LB.default;Br.default=hm;function DB(e,t,r,n="error"){for(let i in e){let a=i;a in t&&this.logger[n](`${r}: option ${i}. ${e[a]}`)}}function MB(e){return e=(0,mm.normalizeId)(e),this.schemas[e]||this.refs[e]}function Zye(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Fye(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function Vye(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function Bye(){let e={...this.opts};for(let t of Uye)delete e[t];return e}var Wye={log(){},warn(){},error(){}};function Kye(e){if(e===!1)return Wye;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var Gye=/^[a-z_$][a-z0-9_$:-]*$/i;function Hye(e,t){let{RULES:r}=this;if((0,VO.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Gye.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function FO(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,s=i?a.post:a.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},a.rules.push(s)),a.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,U_.getJSONTypes)(t.type),schemaType:(0,U_.getJSONTypes)(t.schemaType)}};t.before?Qye.call(this,s,o,t.before):s.rules.push(o),a.all[e]=o,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function Qye(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function Yye(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=ZB(t)),e.validateSchema=this.compile(t,!0))}var Jye={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ZB(e){return{anyOf:[e,Jye]}}});var VB=C(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});var Xye={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};BO.default=Xye});var GB=C(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.callRef=oc.getValidate=void 0;var e_e=dm(),BB=Ti(),Ln=dt(),_l=is(),WB=C_(),D_=Et(),t_e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:a,validateName:s,opts:o,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=WB.resolveRef.call(c,u,i,r);if(l===void 0)throw new e_e.default(n.opts.uriResolver,i,r);if(l instanceof WB.SchemaEnv)return p(l);return f(l);function d(){if(a===u)return M_(e,s,a,a.$async);let m=t.scopeValue("root",{ref:u});return M_(e,(0,Ln._)`${m}.validate`,u,u.$async)}function p(m){let v=KB(e,m);M_(e,v,m,m.$async)}function f(m){let v=t.scopeValue("schema",o.code.source===!0?{ref:m,code:(0,Ln.stringify)(m)}:{ref:m}),g=t.name("valid"),h=e.subschema({schema:m,dataTypes:[],schemaPath:Ln.nil,topSchemaRef:v,errSchemaPath:r},g);e.mergeEvaluated(h),e.ok(g)}}};function KB(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ln._)`${r.scopeValue("wrapper",{ref:t})}.validate`}oc.getValidate=KB;function M_(e,t,r,n){let{gen:i,it:a}=e,{allErrors:s,schemaEnv:o,opts:c}=a,u=c.passContext?_l.default.this:Ln.nil;n?l():d();function l(){if(!o.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Ln._)`await ${(0,BB.callValidateCode)(e,t,u)}`),f(t),s||i.assign(m,!0)},v=>{i.if((0,Ln._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),p(v),s||i.assign(m,!1)}),e.ok(m)}function d(){e.result((0,BB.callValidateCode)(e,t,u),()=>f(t),()=>p(t))}function p(m){let v=(0,Ln._)`${m}.errors`;i.assign(_l.default.vErrors,(0,Ln._)`${_l.default.vErrors} === null ? ${v} : ${_l.default.vErrors}.concat(${v})`),i.assign(_l.default.errors,(0,Ln._)`${_l.default.vErrors}.length`)}function f(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=D_.mergeEvaluated.props(i,g.props,a.props));else{let h=i.var("props",(0,Ln._)`${m}.evaluated.props`);a.props=D_.mergeEvaluated.props(i,h,a.props,Ln.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=D_.mergeEvaluated.items(i,g.items,a.items));else{let h=i.var("items",(0,Ln._)`${m}.evaluated.items`);a.items=D_.mergeEvaluated.items(i,h,a.items,Ln.Name)}}}oc.callRef=M_;oc.default=t_e});var HB=C(WO=>{"use strict";Object.defineProperty(WO,"__esModule",{value:!0});var r_e=VB(),n_e=GB(),i_e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r_e.default,n_e.default];WO.default=i_e});var QB=C(KO=>{"use strict";Object.defineProperty(KO,"__esModule",{value:!0});var L_=dt(),eo=L_.operators,q_={maximum:{okStr:"<=",ok:eo.LTE,fail:eo.GT},minimum:{okStr:">=",ok:eo.GTE,fail:eo.LT},exclusiveMaximum:{okStr:"<",ok:eo.LT,fail:eo.GTE},exclusiveMinimum:{okStr:">",ok:eo.GT,fail:eo.LTE}},a_e={message:({keyword:e,schemaCode:t})=>(0,L_.str)`must be ${q_[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,L_._)`{comparison: ${q_[e].okStr}, limit: ${t}}`},s_e={keyword:Object.keys(q_),type:"number",schemaType:"number",$data:!0,error:a_e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,L_._)`${r} ${q_[t].fail} ${n} || isNaN(${r})`)}};KO.default=s_e});var YB=C(GO=>{"use strict";Object.defineProperty(GO,"__esModule",{value:!0});var gm=dt(),o_e={message:({schemaCode:e})=>(0,gm.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,gm._)`{multipleOf: ${e}}`},c_e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:o_e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),o=a?(0,gm._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,gm._)`${s} !== parseInt(${s})`;e.fail$data((0,gm._)`(${n} === 0 || (${s} = ${r}/${n}, ${o}))`)}};GO.default=c_e});var XB=C(HO=>{"use strict";Object.defineProperty(HO,"__esModule",{value:!0});function JB(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}HO.default=JB;JB.code='require("ajv/dist/runtime/ucs2length").default'});var eW=C(QO=>{"use strict";Object.defineProperty(QO,"__esModule",{value:!0});var cc=dt(),u_e=Et(),l_e=XB(),d_e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,cc.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,cc._)`{limit: ${e}}`},p_e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:d_e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,a=t==="maxLength"?cc.operators.GT:cc.operators.LT,s=i.opts.unicode===!1?(0,cc._)`${r}.length`:(0,cc._)`${(0,u_e.useFunc)(e.gen,l_e.default)}(${r})`;e.fail$data((0,cc._)`${s} ${a} ${n}`)}};QO.default=p_e});var tW=C(YO=>{"use strict";Object.defineProperty(YO,"__esModule",{value:!0});var f_e=Ti(),m_e=Et(),bl=dt(),h_e={message:({schemaCode:e})=>(0,bl.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,bl._)`{pattern: ${e}}`},g_e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:h_e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:a,it:s}=e,o=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,u=c.code==="new RegExp"?(0,bl._)`new RegExp`:(0,m_e.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,bl._)`${u}(${a}, ${o}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,bl._)`!${l}`)}else{let c=(0,f_e.usePattern)(e,i);e.fail$data((0,bl._)`!${c}.test(${r})`)}}};YO.default=g_e});var rW=C(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:!0});var vm=dt(),v_e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,vm.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,vm._)`{limit: ${e}}`},y_e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:v_e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?vm.operators.GT:vm.operators.LT;e.fail$data((0,vm._)`Object.keys(${r}).length ${i} ${n}`)}};JO.default=y_e});var nW=C(XO=>{"use strict";Object.defineProperty(XO,"__esModule",{value:!0});var ym=Ti(),_m=dt(),__e=Et(),b_e={message:({params:{missingProperty:e}})=>(0,_m.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,_m._)`{missingProperty: ${e}}`},x_e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:b_e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:a,it:s}=e,{opts:o}=s;if(!a&&r.length===0)return;let c=r.length>=o.loopRequired;if(s.allErrors?u():l(),o.strictRequired){let f=e.parentSchema.properties,{definedProperties:m}=e.it;for(let v of r)if(f?.[v]===void 0&&!m.has(v)){let g=s.schemaEnv.baseId+s.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,__e.checkStrictMode)(s,h,s.opts.strictRequired)}}function u(){if(c||a)e.block$data(_m.nil,d);else for(let f of r)(0,ym.checkReportMissingProp)(e,f)}function l(){let f=t.let("missing");if(c||a){let m=t.let("valid",!0);e.block$data(m,()=>p(f,m)),e.ok(m)}else t.if((0,ym.checkMissingProp)(e,r,f)),(0,ym.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,ym.noPropertyInData)(t,i,f,o.ownProperties),()=>e.error())})}function p(f,m){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(m,(0,ym.propertyInData)(t,i,f,o.ownProperties)),t.if((0,_m.not)(m),()=>{e.error(),t.break()})},_m.nil)}}};XO.default=x_e});var iW=C(ez=>{"use strict";Object.defineProperty(ez,"__esModule",{value:!0});var bm=dt(),w_e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,bm.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,bm._)`{limit: ${e}}`},k_e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:w_e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?bm.operators.GT:bm.operators.LT;e.fail$data((0,bm._)`${r}.length ${i} ${n}`)}};ez.default=k_e});var Z_=C(tz=>{"use strict";Object.defineProperty(tz,"__esModule",{value:!0});var aW=sm();aW.code='require("ajv/dist/runtime/equal").default';tz.default=aW});var sW=C(nz=>{"use strict";Object.defineProperty(nz,"__esModule",{value:!0});var rz=am(),Wr=dt(),S_e=Et(),$_e=Z_(),E_e={message:({params:{i:e,j:t}})=>(0,Wr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Wr._)`{i: ${e}, j: ${t}}`},I_e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:E_e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:a,schemaCode:s,it:o}=e;if(!n&&!i)return;let c=t.let("valid"),u=a.items?(0,rz.getSchemaTypes)(a.items):[];e.block$data(c,l,(0,Wr._)`${s} === false`),e.ok(c);function l(){let m=t.let("i",(0,Wr._)`${r}.length`),v=t.let("j");e.setParams({i:m,j:v}),t.assign(c,!0),t.if((0,Wr._)`${m} > 1`,()=>(d()?p:f)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function p(m,v){let g=t.name("item"),h=(0,rz.checkDataTypes)(u,g,o.opts.strictNumbers,rz.DataType.Wrong),_=t.const("indices",(0,Wr._)`{}`);t.for((0,Wr._)`;${m}--;`,()=>{t.let(g,(0,Wr._)`${r}[${m}]`),t.if(h,(0,Wr._)`continue`),u.length>1&&t.if((0,Wr._)`typeof ${g} == "string"`,(0,Wr._)`${g} += "_"`),t.if((0,Wr._)`typeof ${_}[${g}] == "number"`,()=>{t.assign(v,(0,Wr._)`${_}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,Wr._)`${_}[${g}] = ${m}`)})}function f(m,v){let g=(0,S_e.useFunc)(t,$_e.default),h=t.name("outer");t.label(h).for((0,Wr._)`;${m}--;`,()=>t.for((0,Wr._)`${v} = ${m}; ${v}--;`,()=>t.if((0,Wr._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{e.error(),t.assign(c,!1).break(h)})))}}};nz.default=I_e});var oW=C(az=>{"use strict";Object.defineProperty(az,"__esModule",{value:!0});var iz=dt(),P_e=Et(),T_e=Z_(),O_e={message:"must be equal to constant",params:({schemaCode:e})=>(0,iz._)`{allowedValue: ${e}}`},z_e={keyword:"const",$data:!0,error:O_e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:a}=e;n||a&&typeof a=="object"?e.fail$data((0,iz._)`!${(0,P_e.useFunc)(t,T_e.default)}(${r}, ${i})`):e.fail((0,iz._)`${a} !== ${r}`)}};az.default=z_e});var cW=C(sz=>{"use strict";Object.defineProperty(sz,"__esModule",{value:!0});var xm=dt(),C_e=Et(),N_e=Z_(),j_e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,xm._)`{allowedValues: ${e}}`},A_e={keyword:"enum",schemaType:"array",$data:!0,error:j_e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:a,it:s}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let o=i.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,C_e.useFunc)(t,N_e.default)),l;if(o||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let f=t.const("vSchema",a);l=(0,xm.or)(...i.map((m,v)=>p(f,v)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",a,f=>t.if((0,xm._)`${u()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function p(f,m){let v=i[m];return typeof v=="object"&&v!==null?(0,xm._)`${u()}(${r}, ${f}[${m}])`:(0,xm._)`${r} === ${v}`}}};sz.default=A_e});var uW=C(oz=>{"use strict";Object.defineProperty(oz,"__esModule",{value:!0});var R_e=QB(),U_e=YB(),D_e=eW(),M_e=tW(),L_e=rW(),q_e=nW(),Z_e=iW(),F_e=sW(),V_e=oW(),B_e=cW(),W_e=[R_e.default,U_e.default,D_e.default,M_e.default,L_e.default,q_e.default,Z_e.default,F_e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},V_e.default,B_e.default];oz.default=W_e});var uz=C(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.validateAdditionalItems=void 0;var uc=dt(),cz=Et(),K_e={message:({params:{len:e}})=>(0,uc.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,uc._)`{limit: ${e}}`},G_e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:K_e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,cz.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}lW(e,n)}};function lW(e,t){let{gen:r,schema:n,data:i,keyword:a,it:s}=e;s.items=!0;let o=r.const("len",(0,uc._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,uc._)`${o} <= ${t.length}`);else if(typeof n=="object"&&!(0,cz.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,uc._)`${o} <= ${t.length}`);r.if((0,uc.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,o,l=>{e.subschema({keyword:a,dataProp:l,dataPropType:cz.Type.Num},u),s.allErrors||r.if((0,uc.not)(u),()=>r.break())})}}wm.validateAdditionalItems=lW;wm.default=G_e});var lz=C(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.validateTuple=void 0;var dW=dt(),F_=Et(),H_e=Ti(),Q_e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return pW(e,"additionalItems",t);r.items=!0,!(0,F_.alwaysValidSchema)(r,t)&&e.ok((0,H_e.validateArray)(e))}};function pW(e,t,r=e.schema){let{gen:n,parentSchema:i,data:a,keyword:s,it:o}=e;l(i),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=F_.mergeEvaluated.items(n,r.length,o.items));let c=n.name("valid"),u=n.const("len",(0,dW._)`${a}.length`);r.forEach((d,p)=>{(0,F_.alwaysValidSchema)(o,d)||(n.if((0,dW._)`${u} > ${p}`,()=>e.subschema({keyword:s,schemaProp:p,dataProp:p},c)),e.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=o,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(p.strictTuples&&!v){let g=`"${s}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,F_.checkStrictMode)(o,g,p.strictTuples)}}}km.validateTuple=pW;km.default=Q_e});var fW=C(dz=>{"use strict";Object.defineProperty(dz,"__esModule",{value:!0});var Y_e=lz(),J_e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Y_e.validateTuple)(e,"items")};dz.default=J_e});var hW=C(pz=>{"use strict";Object.defineProperty(pz,"__esModule",{value:!0});var mW=dt(),X_e=Et(),ebe=Ti(),tbe=uz(),rbe={message:({params:{len:e}})=>(0,mW.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,mW._)`{limit: ${e}}`},nbe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:rbe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,X_e.alwaysValidSchema)(n,t)&&(i?(0,tbe.validateAdditionalItems)(e,i):e.ok((0,ebe.validateArray)(e)))}};pz.default=nbe});var gW=C(fz=>{"use strict";Object.defineProperty(fz,"__esModule",{value:!0});var zi=dt(),V_=Et(),ibe={message:({params:{min:e,max:t}})=>t===void 0?(0,zi.str)`must contain at least ${e} valid item(s)`:(0,zi.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,zi._)`{minContains: ${e}}`:(0,zi._)`{minContains: ${e}, maxContains: ${t}}`},abe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:ibe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:a}=e,s,o,{minContains:c,maxContains:u}=n;a.opts.next?(s=c===void 0?1:c,o=u):s=1;let l=t.const("len",(0,zi._)`${i}.length`);if(e.setParams({min:s,max:o}),o===void 0&&s===0){(0,V_.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&s>o){(0,V_.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,V_.alwaysValidSchema)(a,r)){let v=(0,zi._)`${l} >= ${s}`;o!==void 0&&(v=(0,zi._)`${v} && ${l} <= ${o}`),e.pass(v);return}a.items=!0;let d=t.name("valid");o===void 0&&s===1?f(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),o!==void 0&&t.if((0,zi._)`${i}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let v=t.name("_valid"),g=t.let("count",0);f(v,()=>t.if(v,()=>m(g)))}function f(v,g){t.forRange("i",0,l,h=>{e.subschema({keyword:"contains",dataProp:h,dataPropType:V_.Type.Num,compositeRule:!0},v),g()})}function m(v){t.code((0,zi._)`${v}++`),o===void 0?t.if((0,zi._)`${v} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,zi._)`${v} > ${o}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,zi._)`${v} >= ${s}`,()=>t.assign(d,!0)))}}};fz.default=abe});var _W=C(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.validateSchemaDeps=Ta.validatePropertyDeps=Ta.error=void 0;var mz=dt(),sbe=Et(),Sm=Ti();Ta.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,mz.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,mz._)`{property: ${e},
244
+ missingProperty: ${n},
245
+ depsCount: ${t},
246
+ deps: ${r}}`};var obe={keyword:"dependencies",type:"object",schemaType:"object",error:Ta.error,code(e){let[t,r]=cbe(e);vW(e,t),yW(e,r)}};function cbe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function vW(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let a=r.let("missing");for(let s in t){let o=t[s];if(o.length===0)continue;let c=(0,Sm.propertyInData)(r,n,s,i.opts.ownProperties);e.setParams({property:s,depsCount:o.length,deps:o.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of o)(0,Sm.checkReportMissingProp)(e,u)}):(r.if((0,mz._)`${c} && (${(0,Sm.checkMissingProp)(e,o,a)})`),(0,Sm.reportMissingProp)(e,a),r.else())}}Ta.validatePropertyDeps=vW;function yW(e,t=e.schema){let{gen:r,data:n,keyword:i,it:a}=e,s=r.name("valid");for(let o in t)(0,sbe.alwaysValidSchema)(a,t[o])||(r.if((0,Sm.propertyInData)(r,n,o,a.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:o},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}Ta.validateSchemaDeps=yW;Ta.default=obe});var xW=C(hz=>{"use strict";Object.defineProperty(hz,"__esModule",{value:!0});var bW=dt(),ube=Et(),lbe={message:"property name must be valid",params:({params:e})=>(0,bW._)`{propertyName: ${e.propertyName}}`},dbe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:lbe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,ube.alwaysValidSchema)(i,r))return;let a=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),t.if((0,bW.not)(a),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(a)}};hz.default=dbe});var vz=C(gz=>{"use strict";Object.defineProperty(gz,"__esModule",{value:!0});var B_=Ti(),ca=dt(),pbe=is(),W_=Et(),fbe={message:"must NOT have additional properties",params:({params:e})=>(0,ca._)`{additionalProperty: ${e.additionalProperty}}`},mbe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:fbe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");let{allErrors:o,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,W_.alwaysValidSchema)(s,r))return;let u=(0,B_.allSchemaProperties)(n.properties),l=(0,B_.allSchemaProperties)(n.patternProperties);d(),e.ok((0,ca._)`${a} === ${pbe.default.errors}`);function d(){t.forIn("key",i,g=>{!u.length&&!l.length?m(g):t.if(p(g),()=>m(g))})}function p(g){let h;if(u.length>8){let _=(0,W_.schemaRefOrVal)(s,n.properties,"properties");h=(0,B_.isOwnProperty)(t,_,g)}else u.length?h=(0,ca.or)(...u.map(_=>(0,ca._)`${g} === ${_}`)):h=ca.nil;return l.length&&(h=(0,ca.or)(h,...l.map(_=>(0,ca._)`${(0,B_.usePattern)(e,_)}.test(${g})`))),(0,ca.not)(h)}function f(g){t.code((0,ca._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),o||t.break();return}if(typeof r=="object"&&!(0,W_.alwaysValidSchema)(s,r)){let h=t.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),t.if((0,ca.not)(h),()=>{e.reset(),f(g)})):(v(g,h),o||t.if((0,ca.not)(h),()=>t.break()))}}function v(g,h,_){let y={keyword:"additionalProperties",dataProp:g,dataPropType:W_.Type.Str};_===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(y,h)}}};gz.default=mbe});var SW=C(_z=>{"use strict";Object.defineProperty(_z,"__esModule",{value:!0});var hbe=lm(),wW=Ti(),yz=Et(),kW=vz(),gbe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:a}=e;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&kW.default.code(new hbe.KeywordCxt(a,kW.default,"additionalProperties"));let s=(0,wW.allSchemaProperties)(r);for(let d of s)a.definedProperties.add(d);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=yz.mergeEvaluated.props(t,(0,yz.toHash)(s),a.props));let o=s.filter(d=>!(0,yz.alwaysValidSchema)(a,r[d]));if(o.length===0)return;let c=t.name("valid");for(let d of o)u(d)?l(d):(t.if((0,wW.propertyInData)(t,i,d,a.opts.ownProperties)),l(d),a.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};_z.default=gbe});var PW=C(bz=>{"use strict";Object.defineProperty(bz,"__esModule",{value:!0});var $W=Ti(),K_=dt(),EW=Et(),IW=Et(),vbe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:a}=e,{opts:s}=a,o=(0,$W.allSchemaProperties)(r),c=o.filter(v=>(0,EW.alwaysValidSchema)(a,r[v]));if(o.length===0||c.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,l=t.name("valid");a.props!==!0&&!(a.props instanceof K_.Name)&&(a.props=(0,IW.evaluatedPropsToName)(t,a.props));let{props:d}=a;p();function p(){for(let v of o)u&&f(v),a.allErrors?m(v):(t.var(l,!0),m(v),t.if(l))}function f(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){t.forIn("key",n,g=>{t.if((0,K_._)`${(0,$W.usePattern)(e,v)}.test(${g})`,()=>{let h=c.includes(v);h||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:IW.Type.Str},l),a.opts.unevaluated&&d!==!0?t.assign((0,K_._)`${d}[${g}]`,!0):!h&&!a.allErrors&&t.if((0,K_.not)(l),()=>t.break())})})}}};bz.default=vbe});var TW=C(xz=>{"use strict";Object.defineProperty(xz,"__esModule",{value:!0});var ybe=Et(),_be={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,ybe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};xz.default=_be});var OW=C(wz=>{"use strict";Object.defineProperty(wz,"__esModule",{value:!0});var bbe=Ti(),xbe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:bbe.validateUnion,error:{message:"must match a schema in anyOf"}};wz.default=xbe});var zW=C(kz=>{"use strict";Object.defineProperty(kz,"__esModule",{value:!0});var G_=dt(),wbe=Et(),kbe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,G_._)`{passingSchemas: ${e.passing}}`},Sbe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:kbe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let a=r,s=t.let("valid",!1),o=t.let("passing",null),c=t.name("_valid");e.setParams({passing:o}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){a.forEach((l,d)=>{let p;(0,wbe.alwaysValidSchema)(i,l)?t.var(c,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,G_._)`${c} && ${s}`).assign(s,!1).assign(o,(0,G_._)`[${o}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(o,d),p&&e.mergeEvaluated(p,G_.Name)})})}}};kz.default=Sbe});var CW=C(Sz=>{"use strict";Object.defineProperty(Sz,"__esModule",{value:!0});var $be=Et(),Ebe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((a,s)=>{if((0,$be.alwaysValidSchema)(n,a))return;let o=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(o)})}};Sz.default=Ebe});var AW=C($z=>{"use strict";Object.defineProperty($z,"__esModule",{value:!0});var H_=dt(),jW=Et(),Ibe={message:({params:e})=>(0,H_.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,H_._)`{failingKeyword: ${e.ifClause}}`},Pbe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Ibe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,jW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=NW(n,"then"),a=NW(n,"else");if(!i&&!a)return;let s=t.let("valid",!0),o=t.name("_valid");if(c(),e.reset(),i&&a){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(o,u("then",l),u("else",l))}else i?t.if(o,u("then")):t.if((0,H_.not)(o),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(l)}function u(l,d){return()=>{let p=e.subschema({keyword:l},o);t.assign(s,o),e.mergeValidEvaluated(p,s),d?t.assign(d,(0,H_._)`${l}`):e.setParams({ifClause:l})}}}};function NW(e,t){let r=e.schema[t];return r!==void 0&&!(0,jW.alwaysValidSchema)(e,r)}$z.default=Pbe});var RW=C(Ez=>{"use strict";Object.defineProperty(Ez,"__esModule",{value:!0});var Tbe=Et(),Obe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Tbe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Ez.default=Obe});var UW=C(Iz=>{"use strict";Object.defineProperty(Iz,"__esModule",{value:!0});var zbe=uz(),Cbe=fW(),Nbe=lz(),jbe=hW(),Abe=gW(),Rbe=_W(),Ube=xW(),Dbe=vz(),Mbe=SW(),Lbe=PW(),qbe=TW(),Zbe=OW(),Fbe=zW(),Vbe=CW(),Bbe=AW(),Wbe=RW();function Kbe(e=!1){let t=[qbe.default,Zbe.default,Fbe.default,Vbe.default,Bbe.default,Wbe.default,Ube.default,Dbe.default,Rbe.default,Mbe.default,Lbe.default];return e?t.push(Cbe.default,jbe.default):t.push(zbe.default,Nbe.default),t.push(Abe.default),t}Iz.default=Kbe});var DW=C(Pz=>{"use strict";Object.defineProperty(Pz,"__esModule",{value:!0});var xr=dt(),Gbe={message:({schemaCode:e})=>(0,xr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,xr._)`{format: ${e}}`},Hbe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Gbe,code(e,t){let{gen:r,data:n,$data:i,schema:a,schemaCode:s,it:o}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=o;if(!c.validateFormats)return;i?p():f();function p(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,xr._)`${m}[${s}]`),g=r.let("fType"),h=r.let("format");r.if((0,xr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,xr._)`${v}.type || "string"`).assign(h,(0,xr._)`${v}.validate`),()=>r.assign(g,(0,xr._)`"string"`).assign(h,v)),e.fail$data((0,xr.or)(_(),y()));function _(){return c.strictSchema===!1?xr.nil:(0,xr._)`${s} && !${h}`}function y(){let b=l.$async?(0,xr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,xr._)`${h}(${n})`,x=(0,xr._)`(typeof ${h} == "function" ? ${b} : ${h}.test(${n}))`;return(0,xr._)`${h} && ${h} !== true && ${g} === ${t} && !${x}`}}function f(){let m=d.formats[a];if(!m){_();return}if(m===!0)return;let[v,g,h]=y(m);v===t&&e.pass(b());function _(){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,xr.regexpCode)(x):c.code.formats?(0,xr._)`${c.code.formats}${(0,xr.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,xr._)`${k}.validate`]:["string",x,k]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,xr._)`await ${h}(${n})`}return typeof g=="function"?(0,xr._)`${h}(${n})`:(0,xr._)`${h}.test(${n})`}}}};Pz.default=Hbe});var MW=C(Tz=>{"use strict";Object.defineProperty(Tz,"__esModule",{value:!0});var Qbe=DW(),Ybe=[Qbe.default];Tz.default=Ybe});var LW=C(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.contentVocabulary=xl.metadataVocabulary=void 0;xl.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];xl.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ZW=C(Oz=>{"use strict";Object.defineProperty(Oz,"__esModule",{value:!0});var Jbe=HB(),Xbe=uW(),exe=UW(),txe=MW(),qW=LW(),rxe=[Jbe.default,Xbe.default,(0,exe.default)(),txe.default,qW.metadataVocabulary,qW.contentVocabulary];Oz.default=rxe});var VW=C(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});Q_.DiscrError=void 0;var FW;(function(e){e.Tag="tag",e.Mapping="mapping"})(FW||(Q_.DiscrError=FW={}))});var WW=C(Cz=>{"use strict";Object.defineProperty(Cz,"__esModule",{value:!0});var wl=dt(),zz=VW(),BW=C_(),nxe=dm(),ixe=Et(),axe={message:({params:{discrError:e,tagName:t}})=>e===zz.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,wl._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},sxe={keyword:"discriminator",type:"object",schemaType:"object",error:axe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:a}=e,{oneOf:s}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,wl._)`${r}${(0,wl.getProperty)(o)}`);t.if((0,wl._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:zz.DiscrError.Tag,tag:u,tagName:o})),e.ok(c);function l(){let f=p();t.if(!1);for(let m in f)t.elseIf((0,wl._)`${u} === ${m}`),t.assign(c,d(f[m]));t.else(),e.error(!1,{discrError:zz.DiscrError.Mapping,tag:u,tagName:o}),t.endIf()}function d(f){let m=t.name("valid"),v=e.subschema({keyword:"oneOf",schemaProp:f},m);return e.mergeEvaluated(v,wl.Name),m}function p(){var f;let m={},v=h(i),g=!0;for(let b=0;b<s.length;b++){let x=s[b];if(x?.$ref&&!(0,ixe.schemaHasRulesButRef)(x,a.self.RULES)){let k=x.$ref;if(x=BW.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,k),x instanceof BW.SchemaEnv&&(x=x.schema),x===void 0)throw new nxe.default(a.opts.uriResolver,a.baseId,k)}let w=(f=x?.properties)===null||f===void 0?void 0:f[o];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);g=g&&(v||h(x)),_(w,b)}if(!g)throw new Error(`discriminator: "${o}" must be required`);return m;function h({required:b}){return Array.isArray(b)&&b.includes(o)}function _(b,x){if(b.const)y(b.const,x);else if(b.enum)for(let w of b.enum)y(w,x);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function y(b,x){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${o}" values must be unique strings`);m[b]=x}}}};Cz.default=sxe});var KW=C((fZe,oxe)=>{oxe.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 HW=C((or,Nz)=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.MissingRefError=or.ValidationError=or.CodeGen=or.Name=or.nil=or.stringify=or.str=or._=or.KeywordCxt=or.Ajv=void 0;var cxe=FB(),uxe=ZW(),lxe=WW(),GW=KW(),dxe=["/properties"],Y_="http://json-schema.org/draft-07/schema",kl=class extends cxe.default{_addVocabularies(){super._addVocabularies(),uxe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(lxe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(GW,dxe):GW;this.addMetaSchema(t,Y_,!1),this.refs["http://json-schema.org/schema"]=Y_}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Y_)?Y_:void 0)}};or.Ajv=kl;Nz.exports=or=kl;Nz.exports.Ajv=kl;Object.defineProperty(or,"__esModule",{value:!0});or.default=kl;var pxe=lm();Object.defineProperty(or,"KeywordCxt",{enumerable:!0,get:function(){return pxe.KeywordCxt}});var Sl=dt();Object.defineProperty(or,"_",{enumerable:!0,get:function(){return Sl._}});Object.defineProperty(or,"str",{enumerable:!0,get:function(){return Sl.str}});Object.defineProperty(or,"stringify",{enumerable:!0,get:function(){return Sl.stringify}});Object.defineProperty(or,"nil",{enumerable:!0,get:function(){return Sl.nil}});Object.defineProperty(or,"Name",{enumerable:!0,get:function(){return Sl.Name}});Object.defineProperty(or,"CodeGen",{enumerable:!0,get:function(){return Sl.CodeGen}});var fxe=O_();Object.defineProperty(or,"ValidationError",{enumerable:!0,get:function(){return fxe.default}});var mxe=dm();Object.defineProperty(or,"MissingRefError",{enumerable:!0,get:function(){return mxe.default}})});var n5=C(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.formatNames=za.fastFormats=za.fullFormats=void 0;function Oa(e,t){return{validate:e,compare:t}}za.fullFormats={date:Oa(XW,Uz),time:Oa(Az(!0),Dz),"date-time":Oa(QW(!0),t5),"iso-time":Oa(Az(),e5),"iso-date-time":Oa(QW(),r5),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:bxe,"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:Ixe,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:xxe,int32:{type:"number",validate:Sxe},int64:{type:"number",validate:$xe},float:{type:"number",validate:JW},double:{type:"number",validate:JW},password:!0,binary:!0};za.fastFormats={...za.fullFormats,date:Oa(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Uz),time:Oa(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Dz),"date-time":Oa(/^\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,t5),"iso-time":Oa(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,e5),"iso-date-time":Oa(/^\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,r5),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};za.formatNames=Object.keys(za.fullFormats);function hxe(e){return e%4===0&&(e%100!==0||e%400===0)}var gxe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,vxe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function XW(e){let t=gxe.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&hxe(r)?29:vxe[n])}function Uz(e,t){if(e&&t)return e>t?1:e<t?-1:0}var jz=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Az(e){return function(r){let n=jz.exec(r);if(!n)return!1;let i=+n[1],a=+n[2],s=+n[3],o=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),l=+(n[7]||0);if(u>23||l>59||e&&!o)return!1;if(i<=23&&a<=59&&s<60)return!0;let d=a-l*c,p=i-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&s<61}}function Dz(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function e5(e,t){if(!(e&&t))return;let r=jz.exec(e),n=jz.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Rz=/t|\s/i;function QW(e){let t=Az(e);return function(n){let i=n.split(Rz);return i.length===2&&XW(i[0])&&t(i[1])}}function t5(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function r5(e,t){if(!(e&&t))return;let[r,n]=e.split(Rz),[i,a]=t.split(Rz),s=Uz(r,i);if(s!==void 0)return s||Dz(n,a)}var yxe=/\/|:/,_xe=/^(?:[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 bxe(e){return yxe.test(e)&&_xe.test(e)}var YW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function xxe(e){return YW.lastIndex=0,YW.test(e)}var wxe=-(2**31),kxe=2**31-1;function Sxe(e){return Number.isInteger(e)&&e<=kxe&&e>=wxe}function $xe(e){return Number.isInteger(e)}function JW(){return!0}var Exe=/[^\\]\\Z/;function Ixe(e){if(Exe.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Im=C(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.regexpCode=jt.getEsmExportName=jt.getProperty=jt.safeStringify=jt.stringify=jt.strConcat=jt.addCodeArg=jt.str=jt._=jt.nil=jt._Code=jt.Name=jt.IDENTIFIER=jt._CodeOrName=void 0;var $m=class{};jt._CodeOrName=$m;jt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var lc=class extends $m{constructor(t){if(super(),!jt.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};jt.Name=lc;var Ci=class extends $m{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof lc&&(r[n.str]=(r[n.str]||0)+1),r),{})}};jt._Code=Ci;jt.nil=new Ci("");function i5(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Lz(r,t[n]),r.push(e[++n]);return new Ci(r)}jt._=i5;var Mz=new Ci("+");function a5(e,...t){let r=[Em(e[0])],n=0;for(;n<t.length;)r.push(Mz),Lz(r,t[n]),r.push(Mz,Em(e[++n]));return Pxe(r),new Ci(r)}jt.str=a5;function Lz(e,t){t instanceof Ci?e.push(...t._items):t instanceof lc?e.push(t):e.push(zxe(t))}jt.addCodeArg=Lz;function Pxe(e){let t=1;for(;t<e.length-1;){if(e[t]===Mz){let r=Txe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Txe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof lc||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof lc))return`"${e}${t.slice(1)}`}function Oxe(e,t){return t.emptyStr()?e:e.emptyStr()?t:a5`${e}${t}`}jt.strConcat=Oxe;function zxe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Em(Array.isArray(e)?e.join(","):e)}function Cxe(e){return new Ci(Em(e))}jt.stringify=Cxe;function Em(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}jt.safeStringify=Em;function Nxe(e){return typeof e=="string"&&jt.IDENTIFIER.test(e)?new Ci(`.${e}`):i5`[${e}]`}jt.getProperty=Nxe;function jxe(e){if(typeof e=="string"&&jt.IDENTIFIER.test(e))return new Ci(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}jt.getEsmExportName=jxe;function Axe(e){return new Ci(e.toString())}jt.regexpCode=Axe});var Fz=C(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ValueScope=Zn.ValueScopeName=Zn.Scope=Zn.varKinds=Zn.UsedValueState=void 0;var qn=Im(),qz=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},J_;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(J_||(Zn.UsedValueState=J_={}));Zn.varKinds={const:new qn.Name("const"),let:new qn.Name("let"),var:new qn.Name("var")};var X_=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof qn.Name?t:this.name(t)}name(t){return new qn.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Zn.Scope=X_;var eb=class extends qn.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,qn._)`.${new qn.Name(r)}[${n}]`}};Zn.ValueScopeName=eb;var Rxe=(0,qn._)`\n`,Zz=class extends X_{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Rxe:qn.nil}}get(){return this._scope}name(t){return new eb(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:a}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,o=this._values[a];if(o){let l=o.get(s);if(l)return l}else o=this._values[a]=new Map;o.set(s,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(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,qn._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let a=qn.nil;for(let s in t){let o=t[s];if(!o)continue;let c=n[s]=n[s]||new Map;o.forEach(u=>{if(c.has(u))return;c.set(u,J_.Started);let l=r(u);if(l){let d=this.opts.es5?Zn.varKinds.var:Zn.varKinds.const;a=(0,qn._)`${a}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))a=(0,qn._)`${a}${l}${this.opts._n}`;else throw new qz(u);c.set(u,J_.Completed)})}return a}};Zn.ValueScope=Zz});var nt=C(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.or=ut.and=ut.not=ut.CodeGen=ut.operators=ut.varKinds=ut.ValueScopeName=ut.ValueScope=ut.Scope=ut.Name=ut.regexpCode=ut.stringify=ut.getProperty=ut.nil=ut.strConcat=ut.str=ut._=void 0;var kt=Im(),ua=Fz(),to=Im();Object.defineProperty(ut,"_",{enumerable:!0,get:function(){return to._}});Object.defineProperty(ut,"str",{enumerable:!0,get:function(){return to.str}});Object.defineProperty(ut,"strConcat",{enumerable:!0,get:function(){return to.strConcat}});Object.defineProperty(ut,"nil",{enumerable:!0,get:function(){return to.nil}});Object.defineProperty(ut,"getProperty",{enumerable:!0,get:function(){return to.getProperty}});Object.defineProperty(ut,"stringify",{enumerable:!0,get:function(){return to.stringify}});Object.defineProperty(ut,"regexpCode",{enumerable:!0,get:function(){return to.regexpCode}});Object.defineProperty(ut,"Name",{enumerable:!0,get:function(){return to.Name}});var ib=Fz();Object.defineProperty(ut,"Scope",{enumerable:!0,get:function(){return ib.Scope}});Object.defineProperty(ut,"ValueScope",{enumerable:!0,get:function(){return ib.ValueScope}});Object.defineProperty(ut,"ValueScopeName",{enumerable:!0,get:function(){return ib.ValueScopeName}});Object.defineProperty(ut,"varKinds",{enumerable:!0,get:function(){return ib.varKinds}});ut.operators={GT:new kt._Code(">"),GTE:new kt._Code(">="),LT:new kt._Code("<"),LTE:new kt._Code("<="),EQ:new kt._Code("==="),NEQ:new kt._Code("!=="),NOT:new kt._Code("!"),OR:new kt._Code("||"),AND:new kt._Code("&&"),ADD:new kt._Code("+")};var os=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Vz=class extends os{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?ua.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=El(this.rhs,t,r)),this}get names(){return this.rhs instanceof kt._CodeOrName?this.rhs.names:{}}},tb=class extends os{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof kt.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=El(this.rhs,t,r),this}get names(){let t=this.lhs instanceof kt.Name?{}:{...this.lhs.names};return nb(t,this.rhs)}},Bz=class extends tb{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Wz=class extends os{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Kz=class extends os{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Gz=class extends os{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Hz=class extends os{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=El(this.code,t,r),this}get names(){return this.code instanceof kt._CodeOrName?this.code.names:{}}},Pm=class extends os{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let a=n[i];a.optimizeNames(t,r)||(Uxe(t,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>fc(t,r.names),{})}},cs=class extends Pm{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Qz=class extends Pm{},$l=class extends cs{};$l.kind="else";var dc=class e extends cs{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new $l(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(s5(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=El(this.condition,t,r),this}get names(){let t=super.names;return nb(t,this.condition),this.else&&fc(t,this.else.names),t}};dc.kind="if";var pc=class extends cs{};pc.kind="for";var Yz=class extends pc{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=El(this.iteration,t,r),this}get names(){return fc(super.names,this.iteration.names)}},Jz=class extends pc{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?ua.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${r} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(t)}get names(){let t=nb(super.names,this.from);return nb(t,this.to)}},rb=class extends pc{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=El(this.iterable,t,r),this}get names(){return fc(super.names,this.iterable.names)}},Tm=class extends cs{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Tm.kind="func";var Om=class extends Pm{render(t){return"return "+super.render(t)}};Om.kind="return";var Xz=class extends cs{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&fc(t,this.catch.names),this.finally&&fc(t,this.finally.names),t}},zm=class extends cs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};zm.kind="catch";var Cm=class extends cs{render(t){return"finally"+super.render(t)}};Cm.kind="finally";var eC=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
247
+ `:""},this._extScope=t,this._scope=new ua.Scope({parent:t}),this._nodes=[new Qz]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new Vz(t,a,n)),a}const(t,r,n){return this._def(ua.varKinds.const,t,r,n)}let(t,r,n){return this._def(ua.varKinds.let,t,r,n)}var(t,r,n){return this._def(ua.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new tb(t,r,n))}add(t,r){return this._leafNode(new Bz(t,ut.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==kt.nil&&this._leafNode(new Hz(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,kt.addCodeArg)(r,i));return r.push("}"),new kt._Code(r)}if(t,r,n){if(this._blockNode(new dc(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new dc(t))}else(){return this._elseNode(new $l)}endIf(){return this._endBlockNode(dc,$l)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Yz(t),r)}forRange(t,r,n,i,a=this.opts.es5?ua.varKinds.var:ua.varKinds.let){let s=this._scope.toName(t);return this._for(new Jz(a,s,r,n),()=>i(s))}forOf(t,r,n,i=ua.varKinds.const){let a=this._scope.toName(t);if(this.opts.es5){let s=r instanceof kt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,kt._)`${s}.length`,o=>{this.var(a,(0,kt._)`${s}[${o}]`),n(a)})}return this._for(new rb("of",i,a,r),()=>n(a))}forIn(t,r,n,i=this.opts.es5?ua.varKinds.var:ua.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,kt._)`Object.keys(${r})`,n);let a=this._scope.toName(t);return this._for(new rb("in",i,a,r),()=>n(a))}endFor(){return this._endBlockNode(pc)}label(t){return this._leafNode(new Wz(t))}break(t){return this._leafNode(new Kz(t))}return(t){let r=new Om;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Om)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Xz;if(this._blockNode(i),this.code(t),r){let a=this.name("e");this._currNode=i.catch=new zm(a),r(a)}return n&&(this._currNode=i.finally=new Cm,this.code(n)),this._endBlockNode(zm,Cm)}throw(t){return this._leafNode(new Gz(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=kt.nil,n,i){return this._blockNode(new Tm(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Tm)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof dc))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ut.CodeGen=eC;function fc(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function nb(e,t){return t instanceof kt._CodeOrName?fc(e,t.names):e}function El(e,t,r){if(e instanceof kt.Name)return n(e);if(!i(e))return e;return new kt._Code(e._items.reduce((a,s)=>(s instanceof kt.Name&&(s=n(s)),s instanceof kt._Code?a.push(...s._items):a.push(s),a),[]));function n(a){let s=r[a.str];return s===void 0||t[a.str]!==1?a:(delete t[a.str],s)}function i(a){return a instanceof kt._Code&&a._items.some(s=>s instanceof kt.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function Uxe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function s5(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,kt._)`!${tC(e)}`}ut.not=s5;var Dxe=o5(ut.operators.AND);function Mxe(...e){return e.reduce(Dxe)}ut.and=Mxe;var Lxe=o5(ut.operators.OR);function qxe(...e){return e.reduce(Lxe)}ut.or=qxe;function o5(e){return(t,r)=>t===kt.nil?r:r===kt.nil?t:(0,kt._)`${tC(t)} ${e} ${tC(r)}`}function tC(e){return e instanceof kt.Name?e:(0,kt._)`(${e})`}});var Pt=C(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.checkStrictMode=ft.getErrorPath=ft.Type=ft.useFunc=ft.setEvaluated=ft.evaluatedPropsToName=ft.mergeEvaluated=ft.eachItem=ft.unescapeJsonPointer=ft.escapeJsonPointer=ft.escapeFragment=ft.unescapeFragment=ft.schemaRefOrVal=ft.schemaHasRulesButRef=ft.schemaHasRules=ft.checkUnknownRules=ft.alwaysValidSchema=ft.toHash=void 0;var Jt=nt(),Zxe=Im();function Fxe(e){let t={};for(let r of e)t[r]=!0;return t}ft.toHash=Fxe;function Vxe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(l5(e,t),!d5(t,e.self.RULES.all))}ft.alwaysValidSchema=Vxe;function l5(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let a in t)i[a]||m5(e,`unknown keyword: "${a}"`)}ft.checkUnknownRules=l5;function d5(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ft.schemaHasRules=d5;function Bxe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ft.schemaHasRulesButRef=Bxe;function Wxe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Jt._)`${r}`}return(0,Jt._)`${e}${t}${(0,Jt.getProperty)(n)}`}ft.schemaRefOrVal=Wxe;function Kxe(e){return p5(decodeURIComponent(e))}ft.unescapeFragment=Kxe;function Gxe(e){return encodeURIComponent(nC(e))}ft.escapeFragment=Gxe;function nC(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ft.escapeJsonPointer=nC;function p5(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ft.unescapeJsonPointer=p5;function Hxe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ft.eachItem=Hxe;function c5({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,a,s,o)=>{let c=s===void 0?a:s instanceof Jt.Name?(a instanceof Jt.Name?e(i,a,s):t(i,a,s),s):a instanceof Jt.Name?(t(i,s,a),a):r(a,s);return o===Jt.Name&&!(c instanceof Jt.Name)?n(i,c):c}}ft.mergeEvaluated={props:c5({mergeNames:(e,t,r)=>e.if((0,Jt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Jt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Jt._)`${r} || {}`).code((0,Jt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Jt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Jt._)`${r} || {}`),iC(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:f5}),items:c5({mergeNames:(e,t,r)=>e.if((0,Jt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Jt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Jt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Jt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function f5(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Jt._)`{}`);return t!==void 0&&iC(e,r,t),r}ft.evaluatedPropsToName=f5;function iC(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Jt._)`${t}${(0,Jt.getProperty)(n)}`,!0))}ft.setEvaluated=iC;var u5={};function Qxe(e,t){return e.scopeValue("func",{ref:t,code:u5[t.code]||(u5[t.code]=new Zxe._Code(t.code))})}ft.useFunc=Qxe;var rC;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(rC||(ft.Type=rC={}));function Yxe(e,t,r){if(e instanceof Jt.Name){let n=t===rC.Num;return r?n?(0,Jt._)`"[" + ${e} + "]"`:(0,Jt._)`"['" + ${e} + "']"`:n?(0,Jt._)`"/" + ${e}`:(0,Jt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Jt.getProperty)(e).toString():"/"+nC(e)}ft.getErrorPath=Yxe;function m5(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ft.checkStrictMode=m5});var us=C(aC=>{"use strict";Object.defineProperty(aC,"__esModule",{value:!0});var nn=nt(),Jxe={data:new nn.Name("data"),valCxt:new nn.Name("valCxt"),instancePath:new nn.Name("instancePath"),parentData:new nn.Name("parentData"),parentDataProperty:new nn.Name("parentDataProperty"),rootData:new nn.Name("rootData"),dynamicAnchors:new nn.Name("dynamicAnchors"),vErrors:new nn.Name("vErrors"),errors:new nn.Name("errors"),this:new nn.Name("this"),self:new nn.Name("self"),scope:new nn.Name("scope"),json:new nn.Name("json"),jsonPos:new nn.Name("jsonPos"),jsonLen:new nn.Name("jsonLen"),jsonPart:new nn.Name("jsonPart")};aC.default=Jxe});var Nm=C(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.extendErrors=an.resetErrorsCount=an.reportExtraError=an.reportError=an.keyword$DataError=an.keywordError=void 0;var Tt=nt(),ab=Pt(),En=us();an.keywordError={message:({keyword:e})=>(0,Tt.str)`must pass "${e}" keyword validation`};an.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,Tt.str)`"${e}" keyword must be ${t} ($data)`:(0,Tt.str)`"${e}" keyword is invalid ($data)`};function Xxe(e,t=an.keywordError,r,n){let{it:i}=e,{gen:a,compositeRule:s,allErrors:o}=i,c=v5(e,t,r);n??(s||o)?h5(a,c):g5(i,(0,Tt._)`[${c}]`)}an.reportError=Xxe;function e0e(e,t=an.keywordError,r){let{it:n}=e,{gen:i,compositeRule:a,allErrors:s}=n,o=v5(e,t,r);h5(i,o),a||s||g5(n,En.default.vErrors)}an.reportExtraError=e0e;function t0e(e,t){e.assign(En.default.errors,t),e.if((0,Tt._)`${En.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,Tt._)`${En.default.vErrors}.length`,t),()=>e.assign(En.default.vErrors,null)))}an.resetErrorsCount=t0e;function r0e({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",i,En.default.errors,o=>{e.const(s,(0,Tt._)`${En.default.vErrors}[${o}]`),e.if((0,Tt._)`${s}.instancePath === undefined`,()=>e.assign((0,Tt._)`${s}.instancePath`,(0,Tt.strConcat)(En.default.instancePath,a.errorPath))),e.assign((0,Tt._)`${s}.schemaPath`,(0,Tt.str)`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign((0,Tt._)`${s}.schema`,r),e.assign((0,Tt._)`${s}.data`,n))})}an.extendErrors=r0e;function h5(e,t){let r=e.const("err",t);e.if((0,Tt._)`${En.default.vErrors} === null`,()=>e.assign(En.default.vErrors,(0,Tt._)`[${r}]`),(0,Tt._)`${En.default.vErrors}.push(${r})`),e.code((0,Tt._)`${En.default.errors}++`)}function g5(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,Tt._)`new ${e.ValidationError}(${t})`):(r.assign((0,Tt._)`${n}.errors`,t),r.return(!1))}var mc={keyword:new Tt.Name("keyword"),schemaPath:new Tt.Name("schemaPath"),params:new Tt.Name("params"),propertyName:new Tt.Name("propertyName"),message:new Tt.Name("message"),schema:new Tt.Name("schema"),parentSchema:new Tt.Name("parentSchema")};function v5(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,Tt._)`{}`:n0e(e,t,r)}function n0e(e,t,r={}){let{gen:n,it:i}=e,a=[i0e(i,r),a0e(e,r)];return s0e(e,t,a),n.object(...a)}function i0e({errorPath:e},{instancePath:t}){let r=t?(0,Tt.str)`${e}${(0,ab.getErrorPath)(t,ab.Type.Str)}`:e;return[En.default.instancePath,(0,Tt.strConcat)(En.default.instancePath,r)]}function a0e({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,Tt.str)`${t}/${e}`;return r&&(i=(0,Tt.str)`${i}${(0,ab.getErrorPath)(r,ab.Type.Str)}`),[mc.schemaPath,i]}function s0e(e,{params:t,message:r},n){let{keyword:i,data:a,schemaValue:s,it:o}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=o;n.push([mc.keyword,i],[mc.params,typeof t=="function"?t(e):t||(0,Tt._)`{}`]),c.messages&&n.push([mc.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([mc.schema,s],[mc.parentSchema,(0,Tt._)`${l}${d}`],[En.default.data,a]),u&&n.push([mc.propertyName,u])}});var _5=C(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.boolOrEmptySchema=Il.topBoolOrEmptySchema=void 0;var o0e=Nm(),c0e=nt(),u0e=us(),l0e={message:"boolean schema is false"};function d0e(e){let{gen:t,schema:r,validateName:n}=e;r===!1?y5(e,!1):typeof r=="object"&&r.$async===!0?t.return(u0e.default.data):(t.assign((0,c0e._)`${n}.errors`,null),t.return(!0))}Il.topBoolOrEmptySchema=d0e;function p0e(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),y5(e)):r.var(t,!0)}Il.boolOrEmptySchema=p0e;function y5(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,o0e.reportError)(i,l0e,void 0,t)}});var sC=C(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.getRules=Pl.isJSONType=void 0;var f0e=["string","number","integer","boolean","null","object","array"],m0e=new Set(f0e);function h0e(e){return typeof e=="string"&&m0e.has(e)}Pl.isJSONType=h0e;function g0e(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Pl.getRules=g0e});var oC=C(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.shouldUseRule=ro.shouldUseGroup=ro.schemaHasRulesForType=void 0;function v0e({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&b5(e,n)}ro.schemaHasRulesForType=v0e;function b5(e,t){return t.rules.some(r=>x5(e,r))}ro.shouldUseGroup=b5;function x5(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}ro.shouldUseRule=x5});var jm=C(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.reportTypeError=sn.checkDataTypes=sn.checkDataType=sn.coerceAndCheckDataType=sn.getJSONTypes=sn.getSchemaTypes=sn.DataType=void 0;var y0e=sC(),_0e=oC(),b0e=Nm(),rt=nt(),w5=Pt(),Tl;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Tl||(sn.DataType=Tl={}));function x0e(e){let t=k5(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}sn.getSchemaTypes=x0e;function k5(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(y0e.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}sn.getJSONTypes=k5;function w0e(e,t){let{gen:r,data:n,opts:i}=e,a=k0e(t,i.coerceTypes),s=t.length>0&&!(a.length===0&&t.length===1&&(0,_0e.schemaHasRulesForType)(e,t[0]));if(s){let o=uC(t,n,i.strictNumbers,Tl.Wrong);r.if(o,()=>{a.length?S0e(e,t,a):lC(e)})}return s}sn.coerceAndCheckDataType=w0e;var S5=new Set(["string","number","integer","boolean","null"]);function k0e(e,t){return t?e.filter(r=>S5.has(r)||t==="array"&&r==="array"):[]}function S0e(e,t,r){let{gen:n,data:i,opts:a}=e,s=n.let("dataType",(0,rt._)`typeof ${i}`),o=n.let("coerced",(0,rt._)`undefined`);a.coerceTypes==="array"&&n.if((0,rt._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,rt._)`${i}[0]`).assign(s,(0,rt._)`typeof ${i}`).if(uC(t,i,a.strictNumbers),()=>n.assign(o,i))),n.if((0,rt._)`${o} !== undefined`);for(let u of r)(S5.has(u)||u==="array"&&a.coerceTypes==="array")&&c(u);n.else(),lC(e),n.endIf(),n.if((0,rt._)`${o} !== undefined`,()=>{n.assign(i,o),$0e(e,o)});function c(u){switch(u){case"string":n.elseIf((0,rt._)`${s} == "number" || ${s} == "boolean"`).assign(o,(0,rt._)`"" + ${i}`).elseIf((0,rt._)`${i} === null`).assign(o,(0,rt._)`""`);return;case"number":n.elseIf((0,rt._)`${s} == "boolean" || ${i} === null
248
+ || (${s} == "string" && ${i} && ${i} == +${i})`).assign(o,(0,rt._)`+${i}`);return;case"integer":n.elseIf((0,rt._)`${s} === "boolean" || ${i} === null
249
+ || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(o,(0,rt._)`+${i}`);return;case"boolean":n.elseIf((0,rt._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(o,!1).elseIf((0,rt._)`${i} === "true" || ${i} === 1`).assign(o,!0);return;case"null":n.elseIf((0,rt._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(o,null);return;case"array":n.elseIf((0,rt._)`${s} === "string" || ${s} === "number"
250
+ || ${s} === "boolean" || ${i} === null`).assign(o,(0,rt._)`[${i}]`)}}}function $0e({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,rt._)`${t} !== undefined`,()=>e.assign((0,rt._)`${t}[${r}]`,n))}function cC(e,t,r,n=Tl.Correct){let i=n===Tl.Correct?rt.operators.EQ:rt.operators.NEQ,a;switch(e){case"null":return(0,rt._)`${t} ${i} null`;case"array":a=(0,rt._)`Array.isArray(${t})`;break;case"object":a=(0,rt._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s((0,rt._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return(0,rt._)`typeof ${t} ${i} ${e}`}return n===Tl.Correct?a:(0,rt.not)(a);function s(o=rt.nil){return(0,rt.and)((0,rt._)`typeof ${t} == "number"`,o,r?(0,rt._)`isFinite(${t})`:rt.nil)}}sn.checkDataType=cC;function uC(e,t,r,n){if(e.length===1)return cC(e[0],t,r,n);let i,a=(0,w5.toHash)(e);if(a.array&&a.object){let s=(0,rt._)`typeof ${t} != "object"`;i=a.null?s:(0,rt._)`!${t} || ${s}`,delete a.null,delete a.array,delete a.object}else i=rt.nil;a.number&&delete a.integer;for(let s in a)i=(0,rt.and)(i,cC(s,t,r,n));return i}sn.checkDataTypes=uC;var E0e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,rt._)`{type: ${e}}`:(0,rt._)`{type: ${t}}`};function lC(e){let t=I0e(e);(0,b0e.reportError)(t,E0e)}sn.reportTypeError=lC;function I0e(e){let{gen:t,data:r,schema:n}=e,i=(0,w5.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var E5=C(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});sb.assignDefaults=void 0;var Ol=nt(),P0e=Pt();function T0e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)$5(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,a)=>$5(e,a,i.default))}sb.assignDefaults=T0e;function $5(e,t,r){let{gen:n,compositeRule:i,data:a,opts:s}=e;if(r===void 0)return;let o=(0,Ol._)`${a}${(0,Ol.getProperty)(t)}`;if(i){(0,P0e.checkStrictMode)(e,`default is ignored for: ${o}`);return}let c=(0,Ol._)`${o} === undefined`;s.useDefaults==="empty"&&(c=(0,Ol._)`${c} || ${o} === null || ${o} === ""`),n.if(c,(0,Ol._)`${o} = ${(0,Ol.stringify)(r)}`)}});var Ni=C(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.validateUnion=Vt.validateArray=Vt.usePattern=Vt.callValidateCode=Vt.schemaProperties=Vt.allSchemaProperties=Vt.noPropertyInData=Vt.propertyInData=Vt.isOwnProperty=Vt.hasPropFunc=Vt.reportMissingProp=Vt.checkMissingProp=Vt.checkReportMissingProp=void 0;var cr=nt(),dC=Pt(),no=us(),O0e=Pt();function z0e(e,t){let{gen:r,data:n,it:i}=e;r.if(fC(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,cr._)`${t}`},!0),e.error()})}Vt.checkReportMissingProp=z0e;function C0e({gen:e,data:t,it:{opts:r}},n,i){return(0,cr.or)(...n.map(a=>(0,cr.and)(fC(e,t,a,r.ownProperties),(0,cr._)`${i} = ${a}`)))}Vt.checkMissingProp=C0e;function N0e(e,t){e.setParams({missingProperty:t},!0),e.error()}Vt.reportMissingProp=N0e;function I5(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,cr._)`Object.prototype.hasOwnProperty`})}Vt.hasPropFunc=I5;function pC(e,t,r){return(0,cr._)`${I5(e)}.call(${t}, ${r})`}Vt.isOwnProperty=pC;function j0e(e,t,r,n){let i=(0,cr._)`${t}${(0,cr.getProperty)(r)} !== undefined`;return n?(0,cr._)`${i} && ${pC(e,t,r)}`:i}Vt.propertyInData=j0e;function fC(e,t,r,n){let i=(0,cr._)`${t}${(0,cr.getProperty)(r)} === undefined`;return n?(0,cr.or)(i,(0,cr.not)(pC(e,t,r))):i}Vt.noPropertyInData=fC;function P5(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Vt.allSchemaProperties=P5;function A0e(e,t){return P5(t).filter(r=>!(0,dC.alwaysValidSchema)(e,t[r]))}Vt.schemaProperties=A0e;function R0e({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:s},o,c,u){let l=u?(0,cr._)`${e}, ${t}, ${n}${i}`:t,d=[[no.default.instancePath,(0,cr.strConcat)(no.default.instancePath,a)],[no.default.parentData,s.parentData],[no.default.parentDataProperty,s.parentDataProperty],[no.default.rootData,no.default.rootData]];s.opts.dynamicRef&&d.push([no.default.dynamicAnchors,no.default.dynamicAnchors]);let p=(0,cr._)`${l}, ${r.object(...d)}`;return c!==cr.nil?(0,cr._)`${o}.call(${c}, ${p})`:(0,cr._)`${o}(${p})`}Vt.callValidateCode=R0e;var U0e=(0,cr._)`new RegExp`;function D0e({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,cr._)`${i.code==="new RegExp"?U0e:(0,O0e.useFunc)(e,i)}(${r}, ${n})`})}Vt.usePattern=D0e;function M0e(e){let{gen:t,data:r,keyword:n,it:i}=e,a=t.name("valid");if(i.allErrors){let o=t.let("valid",!0);return s(()=>t.assign(o,!1)),o}return t.var(a,!0),s(()=>t.break()),a;function s(o){let c=t.const("len",(0,cr._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:dC.Type.Num},a),t.if((0,cr.not)(a),o)})}}Vt.validateArray=M0e;function L0e(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,dC.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=t.let("valid",!1),o=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},o);t.assign(s,(0,cr._)`${s} || ${o}`),e.mergeValidEvaluated(l,o)||t.if((0,cr.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Vt.validateUnion=L0e});var z5=C(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.validateKeywordUsage=Ca.validSchemaType=Ca.funcKeywordCode=Ca.macroKeywordCode=void 0;var In=nt(),hc=us(),q0e=Ni(),Z0e=Nm();function F0e(e,t){let{gen:r,keyword:n,schema:i,parentSchema:a,it:s}=e,o=t.macro.call(s.self,i,a,s),c=O5(r,n,o);s.opts.validateSchema!==!1&&s.self.validateSchema(o,!0);let u=r.name("valid");e.subschema({schema:o,schemaPath:In.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Ca.macroKeywordCode=F0e;function V0e(e,t){var r;let{gen:n,keyword:i,schema:a,parentSchema:s,$data:o,it:c}=e;W0e(c,t);let u=!o&&t.compile?t.compile.call(c.self,a,s,c):t.validate,l=O5(n,i,u),d=n.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)v(),t.modifying&&T5(e),g(()=>e.error());else{let h=t.async?f():m();t.modifying&&T5(e),g(()=>B0e(e,h))}}function f(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,In._)`await `),_=>n.assign(d,!1).if((0,In._)`${_} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,In._)`${_}.errors`),()=>n.throw(_))),h}function m(){let h=(0,In._)`${l}.errors`;return n.assign(h,null),v(In.nil),h}function v(h=t.async?(0,In._)`await `:In.nil){let _=c.opts.passContext?hc.default.this:hc.default.self,y=!("compile"in t&&!o||t.schema===!1);n.assign(d,(0,In._)`${h}${(0,q0e.callValidateCode)(e,l,_,y)}`,t.modifying)}function g(h){var _;n.if((0,In.not)((_=t.valid)!==null&&_!==void 0?_:d),h)}}Ca.funcKeywordCode=V0e;function T5(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,In._)`${n.parentData}[${n.parentDataProperty}]`))}function B0e(e,t){let{gen:r}=e;r.if((0,In._)`Array.isArray(${t})`,()=>{r.assign(hc.default.vErrors,(0,In._)`${hc.default.vErrors} === null ? ${t} : ${hc.default.vErrors}.concat(${t})`).assign(hc.default.errors,(0,In._)`${hc.default.vErrors}.length`),(0,Z0e.extendErrors)(e)},()=>e.error())}function W0e({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function O5(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,In.stringify)(r)})}function K0e(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Ca.validSchemaType=K0e;function G0e({schema:e,opts:t,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 s=i.dependencies;if(s?.some(o=>!Object.prototype.hasOwnProperty.call(e,o)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[a])){let c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Ca.validateKeywordUsage=G0e});var N5=C(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.extendSubschemaMode=io.extendSubschemaData=io.getSubschema=void 0;var Na=nt(),C5=Pt();function H0e(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let o=e.schema[t];return r===void 0?{schema:o,schemaPath:(0,Na._)`${e.schemaPath}${(0,Na.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:(0,Na._)`${e.schemaPath}${(0,Na.getProperty)(t)}${(0,Na.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,C5.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}io.getSubschema=H0e;function Q0e(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,p=o.let("data",(0,Na._)`${t.data}${(0,Na.getProperty)(r)}`,!0);c(p),e.errorPath=(0,Na.str)`${u}${(0,C5.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Na._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(i!==void 0){let u=i instanceof Na.Name?i:o.let("data",i,!0);c(u),s!==void 0&&(e.propertyName=s)}a&&(e.dataTypes=a);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}io.extendSubschemaData=Q0e;function Y0e(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}io.extendSubschemaMode=Y0e});var A5=C((TZe,j5)=>{"use strict";var ao=j5.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};ob(t,n,i,e,"",e)};ao.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ao.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ao.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ao.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 ob(e,t,r,n,i,a,s,o,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,a,s,o,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in ao.arrayKeywords)for(var p=0;p<d.length;p++)ob(e,t,r,d[p],i+"/"+l+"/"+p,a,i,l,n,p)}else if(l in ao.propsKeywords){if(d&&typeof d=="object")for(var f in d)ob(e,t,r,d[f],i+"/"+l+"/"+J0e(f),a,i,l,n,f)}else(l in ao.keywords||e.allKeys&&!(l in ao.skipKeywords))&&ob(e,t,r,d,i+"/"+l,a,i,l,n)}r(n,i,a,s,o,c,u)}}function J0e(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Am=C(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.getSchemaRefs=Fn.resolveUrl=Fn.normalizeId=Fn._getFullPath=Fn.getFullPath=Fn.inlineRef=void 0;var X0e=Pt(),ewe=sm(),twe=A5(),rwe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function nwe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!mC(e):t?R5(e)<=t:!1}Fn.inlineRef=nwe;var iwe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function mC(e){for(let t in e){if(iwe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(mC)||typeof r=="object"&&mC(r))return!0}return!1}function R5(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!rwe.has(r)&&(typeof e[r]=="object"&&(0,X0e.eachItem)(e[r],n=>t+=R5(n)),t===1/0))return 1/0}return t}function U5(e,t="",r){r!==!1&&(t=zl(t));let n=e.parse(t);return D5(e,n)}Fn.getFullPath=U5;function D5(e,t){return e.serialize(t).split("#")[0]+"#"}Fn._getFullPath=D5;var awe=/#\/?$/;function zl(e){return e?e.replace(awe,""):""}Fn.normalizeId=zl;function swe(e,t,r){return r=zl(r),e.resolve(t,r)}Fn.resolveUrl=swe;var owe=/^[a-z_][-a-z0-9._]*$/i;function cwe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=zl(e[r]||t),a={"":i},s=U5(n,i,!1),o={},c=new Set;return twe(e,{allKeys:!0},(d,p,f,m)=>{if(m===void 0)return;let v=s+p,g=a[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),_.call(this,d.$anchor),_.call(this,d.$dynamicAnchor),a[p]=g;function h(y){let b=this.opts.uriResolver.resolve;if(y=zl(g?b(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!==zl(v)&&(y[0]==="#"?(u(d,o[y],y),o[y]=d):this.refs[y]=v),y}function _(y){if(typeof y=="string"){if(!owe.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),o;function u(d,p,f){if(p!==void 0&&!ewe(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Fn.getSchemaRefs=cwe});var Dm=C(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getData=so.KeywordCxt=so.validateFunctionCode=void 0;var F5=_5(),M5=jm(),gC=oC(),cb=jm(),uwe=E5(),Um=z5(),hC=N5(),Oe=nt(),Ve=us(),lwe=Am(),ls=Pt(),Rm=Nm();function dwe(e){if(W5(e)&&(K5(e),B5(e))){mwe(e);return}V5(e,()=>(0,F5.topBoolOrEmptySchema)(e))}so.validateFunctionCode=dwe;function V5({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},a){i.code.es5?e.func(t,(0,Oe._)`${Ve.default.data}, ${Ve.default.valCxt}`,n.$async,()=>{e.code((0,Oe._)`"use strict"; ${L5(r,i)}`),fwe(e,i),e.code(a)}):e.func(t,(0,Oe._)`${Ve.default.data}, ${pwe(i)}`,n.$async,()=>e.code(L5(r,i)).code(a))}function pwe(e){return(0,Oe._)`{${Ve.default.instancePath}="", ${Ve.default.parentData}, ${Ve.default.parentDataProperty}, ${Ve.default.rootData}=${Ve.default.data}${e.dynamicRef?(0,Oe._)`, ${Ve.default.dynamicAnchors}={}`:Oe.nil}}={}`}function fwe(e,t){e.if(Ve.default.valCxt,()=>{e.var(Ve.default.instancePath,(0,Oe._)`${Ve.default.valCxt}.${Ve.default.instancePath}`),e.var(Ve.default.parentData,(0,Oe._)`${Ve.default.valCxt}.${Ve.default.parentData}`),e.var(Ve.default.parentDataProperty,(0,Oe._)`${Ve.default.valCxt}.${Ve.default.parentDataProperty}`),e.var(Ve.default.rootData,(0,Oe._)`${Ve.default.valCxt}.${Ve.default.rootData}`),t.dynamicRef&&e.var(Ve.default.dynamicAnchors,(0,Oe._)`${Ve.default.valCxt}.${Ve.default.dynamicAnchors}`)},()=>{e.var(Ve.default.instancePath,(0,Oe._)`""`),e.var(Ve.default.parentData,(0,Oe._)`undefined`),e.var(Ve.default.parentDataProperty,(0,Oe._)`undefined`),e.var(Ve.default.rootData,Ve.default.data),t.dynamicRef&&e.var(Ve.default.dynamicAnchors,(0,Oe._)`{}`)})}function mwe(e){let{schema:t,opts:r,gen:n}=e;V5(e,()=>{r.$comment&&t.$comment&&H5(e),_we(e),n.let(Ve.default.vErrors,null),n.let(Ve.default.errors,0),r.unevaluated&&hwe(e),G5(e),wwe(e)})}function hwe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Oe._)`${r}.evaluated`),t.if((0,Oe._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Oe._)`${e.evaluated}.props`,(0,Oe._)`undefined`)),t.if((0,Oe._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Oe._)`${e.evaluated}.items`,(0,Oe._)`undefined`))}function L5(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Oe._)`/*# sourceURL=${r} */`:Oe.nil}function gwe(e,t){if(W5(e)&&(K5(e),B5(e))){vwe(e,t);return}(0,F5.boolOrEmptySchema)(e,t)}function B5({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function W5(e){return typeof e.schema!="boolean"}function vwe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&H5(e),bwe(e),xwe(e);let a=n.const("_errs",Ve.default.errors);G5(e,a),n.var(t,(0,Oe._)`${a} === ${Ve.default.errors}`)}function K5(e){(0,ls.checkUnknownRules)(e),ywe(e)}function G5(e,t){if(e.opts.jtd)return q5(e,[],!1,t);let r=(0,M5.getSchemaTypes)(e.schema),n=(0,M5.coerceAndCheckDataType)(e,r);q5(e,r,!n,t)}function ywe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,ls.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function _we(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,ls.checkStrictMode)(e,"default is ignored in the schema root")}function bwe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,lwe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function xwe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function H5({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let a=r.$comment;if(i.$comment===!0)e.code((0,Oe._)`${Ve.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){let s=(0,Oe.str)`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,Oe._)`${Ve.default.self}.opts.$comment(${a}, ${s}, ${o}.schema)`)}}function wwe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=e;r.$async?t.if((0,Oe._)`${Ve.default.errors} === 0`,()=>t.return(Ve.default.data),()=>t.throw((0,Oe._)`new ${i}(${Ve.default.vErrors})`)):(t.assign((0,Oe._)`${n}.errors`,Ve.default.vErrors),a.unevaluated&&kwe(e),t.return((0,Oe._)`${Ve.default.errors} === 0`))}function kwe({gen:e,evaluated:t,props:r,items:n}){r instanceof Oe.Name&&e.assign((0,Oe._)`${t}.props`,r),n instanceof Oe.Name&&e.assign((0,Oe._)`${t}.items`,n)}function q5(e,t,r,n){let{gen:i,schema:a,data:s,allErrors:o,opts:c,self:u}=e,{RULES:l}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,ls.schemaHasRulesButRef)(a,l))){i.block(()=>Y5(e,"$ref",l.all.$ref.definition));return}c.jtd||Swe(e,t),i.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,gC.shouldUseGroup)(a,p)&&(p.type?(i.if((0,cb.checkDataType)(p.type,s,c.strictNumbers)),Z5(e,p),t.length===1&&t[0]===p.type&&r&&(i.else(),(0,cb.reportTypeError)(e)),i.endIf()):Z5(e,p),o||i.if((0,Oe._)`${Ve.default.errors} === ${n||0}`))}}function Z5(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,uwe.assignDefaults)(e,t.type),r.block(()=>{for(let a of t.rules)(0,gC.shouldUseRule)(n,a)&&Y5(e,a.keyword,a.definition,t.type)})}function Swe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||($we(e,t),e.opts.allowUnionTypes||Ewe(e,t),Iwe(e,e.dataTypes))}function $we(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Q5(e.dataTypes,r)||vC(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Twe(e,t)}}function Ewe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&vC(e,"use allowUnionTypes to allow union type keyword")}function Iwe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,gC.shouldUseRule)(e.schema,i)){let{type:a}=i.definition;a.length&&!a.some(s=>Pwe(t,s))&&vC(e,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function Pwe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Q5(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Twe(e,t){let r=[];for(let n of e.dataTypes)Q5(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function vC(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,ls.checkStrictMode)(e,t,e.opts.strictTypes)}var ub=class{constructor(t,r,n){if((0,Um.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ls.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",J5(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Um.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ve.default.errors))}result(t,r,n){this.failResult((0,Oe.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Oe.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,Oe._)`${r} !== undefined && (${(0,Oe.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Rm.reportExtraError:Rm.reportError)(this,this.def.error,r)}$dataError(){(0,Rm.reportError)(this,this.def.$dataError||Rm.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Rm.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Oe.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Oe.nil,r=Oe.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:a,def:s}=this;n.if((0,Oe.or)((0,Oe._)`${i} === undefined`,r)),t!==Oe.nil&&n.assign(t,!0),(a.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Oe.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,Oe.or)(s(),o());function s(){if(n.length){if(!(r instanceof Oe.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,Oe._)`${(0,cb.checkDataTypes)(c,r,a.opts.strictNumbers,cb.DataType.Wrong)}`}return Oe.nil}function o(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Oe._)`!${c}(${r})`}return Oe.nil}}subschema(t,r){let n=(0,hC.getSubschema)(this.it,t);(0,hC.extendSubschemaData)(n,this.it,t),(0,hC.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return gwe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=ls.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=ls.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,Oe.Name)),!0}};so.KeywordCxt=ub;function Y5(e,t,r,n){let i=new ub(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Um.funcKeywordCode)(i,r):"macro"in r?(0,Um.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Um.funcKeywordCode)(i,r)}var Owe=/^\/(?:[^~]|~0|~1)*$/,zwe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function J5(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,a;if(e==="")return Ve.default.rootData;if(e[0]==="/"){if(!Owe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,a=Ve.default.rootData}else{let u=zwe.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=t)throw new Error(c("property/index",l));return n[t-l]}if(l>t)throw new Error(c("data",l));if(a=r[t-l],!i)return a}let s=a,o=i.split("/");for(let u of o)u&&(a=(0,Oe._)`${a}${(0,Oe.getProperty)((0,ls.unescapeJsonPointer)(u))}`,s=(0,Oe._)`${s} && ${a}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}so.getData=J5});var lb=C(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});var yC=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};_C.default=yC});var Mm=C(wC=>{"use strict";Object.defineProperty(wC,"__esModule",{value:!0});var bC=Am(),xC=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,bC.resolveUrl)(t,r,n),this.missingSchema=(0,bC.normalizeId)((0,bC.getFullPath)(t,this.missingRef))}};wC.default=xC});var pb=C(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.resolveSchema=ji.getCompilingSchema=ji.resolveRef=ji.compileSchema=ji.SchemaEnv=void 0;var la=nt(),Cwe=lb(),gc=us(),da=Am(),X5=Pt(),Nwe=Dm(),Cl=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,da.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};ji.SchemaEnv=Cl;function SC(e){let t=eK.call(this,e);if(t)return t;let r=(0,da.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,s=new la.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),o;e.$async&&(o=s.scopeValue("Error",{ref:Cwe.default,code:(0,la._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:gc.default.data,parentData:gc.default.parentData,parentDataProperty:gc.default.parentDataProperty,dataNames:[gc.default.data],dataPathArr:[la.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,la.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:la.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,la._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,Nwe.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(gc.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let f=new Function(`${gc.default.self}`,`${gc.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:m,items:v}=u;f.evaluated={props:m instanceof la.Name?void 0:m,items:v instanceof la.Name?void 0:v,dynamicProps:m instanceof la.Name,dynamicItems:v instanceof la.Name},f.source&&(f.source.evaluated=(0,la.stringify)(f.evaluated))}return e.validate=f,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}ji.compileSchema=SC;function jwe(e,t,r){var n;r=(0,da.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let a=Uwe.call(this,e,r);if(a===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;s&&(a=new Cl({schema:s,schemaId:o,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=Awe.call(this,a)}ji.resolveRef=jwe;function Awe(e){return(0,da.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:SC.call(this,e)}function eK(e){for(let t of this._compilations)if(Rwe(t,e))return t}ji.getCompilingSchema=eK;function Rwe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Uwe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||db.call(this,e,t)}function db(e,t){let r=this.opts.uriResolver.parse(t),n=(0,da._getFullPath)(this.opts.uriResolver,r),i=(0,da.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return kC.call(this,r,e);let a=(0,da.normalizeId)(n),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){let o=db.call(this,e,s);return typeof o?.schema!="object"?void 0:kC.call(this,r,o)}if(typeof s?.schema=="object"){if(s.validate||SC.call(this,s),a===(0,da.normalizeId)(t)){let{schema:o}=s,{schemaId:c}=this.opts,u=o[c];return u&&(i=(0,da.resolveUrl)(this.opts.uriResolver,i,u)),new Cl({schema:o,schemaId:c,root:e,baseId:i})}return kC.call(this,r,s)}}ji.resolveSchema=db;var Dwe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function kC(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let o of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,X5.unescapeFragment)(o)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Dwe.has(o)&&u&&(t=(0,da.resolveUrl)(this.opts.uriResolver,t,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,X5.schemaHasRulesButRef)(r,this.RULES)){let o=(0,da.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=db.call(this,n,o)}let{schemaId:s}=this.opts;if(a=a||new Cl({schema:r,schemaId:s,root:n,baseId:t}),a.schema!==a.root.schema)return a}});var tK=C((AZe,Mwe)=>{Mwe.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 nK=C($C=>{"use strict";Object.defineProperty($C,"__esModule",{value:!0});var rK=qO();rK.code='require("ajv/dist/runtime/uri").default';$C.default=rK});var dK=C(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.CodeGen=Kr.Name=Kr.nil=Kr.stringify=Kr.str=Kr._=Kr.KeywordCxt=void 0;var Lwe=Dm();Object.defineProperty(Kr,"KeywordCxt",{enumerable:!0,get:function(){return Lwe.KeywordCxt}});var Nl=nt();Object.defineProperty(Kr,"_",{enumerable:!0,get:function(){return Nl._}});Object.defineProperty(Kr,"str",{enumerable:!0,get:function(){return Nl.str}});Object.defineProperty(Kr,"stringify",{enumerable:!0,get:function(){return Nl.stringify}});Object.defineProperty(Kr,"nil",{enumerable:!0,get:function(){return Nl.nil}});Object.defineProperty(Kr,"Name",{enumerable:!0,get:function(){return Nl.Name}});Object.defineProperty(Kr,"CodeGen",{enumerable:!0,get:function(){return Nl.CodeGen}});var qwe=lb(),cK=Mm(),Zwe=sC(),Lm=pb(),Fwe=nt(),qm=Am(),fb=jm(),IC=Pt(),iK=tK(),Vwe=nK(),uK=(e,t)=>new RegExp(e,t);uK.code="new RegExp";var Bwe=["removeAdditional","useDefaults","coerceTypes"],Wwe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Kwe={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."},Gwe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},aK=200;function Hwe(e){var t,r,n,i,a,s,o,c,u,l,d,p,f,m,v,g,h,_,y,b,x,w,k,E,O;let U=e.strict,z=(t=e.code)===null||t===void 0?void 0:t.optimize,L=z===!0||z===void 0?1:z||0,W=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:uK,R=(i=e.uriResolver)!==null&&i!==void 0?i:Vwe.default;return{strictSchema:(s=(a=e.strictSchema)!==null&&a!==void 0?a:U)!==null&&s!==void 0?s:!0,strictNumbers:(c=(o=e.strictNumbers)!==null&&o!==void 0?o:U)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:U)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:U)!==null&&p!==void 0?p:"log",strictRequired:(m=(f=e.strictRequired)!==null&&f!==void 0?f:U)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:L,regExp:W}:{optimize:L,regExp:W},loopRequired:(v=e.loopRequired)!==null&&v!==void 0?v:aK,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:aK,meta:(h=e.meta)!==null&&h!==void 0?h:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(y=e.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(b=e.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(x=e.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=e.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(E=e.unicodeRegExp)!==null&&E!==void 0?E:!0,int32range:(O=e.int32range)!==null&&O!==void 0?O:!0,uriResolver:R}}var Zm=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...Hwe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new Fwe.ValueScope({scope:{},prefixes:Wwe,es5:r,lines:n}),this.logger=tke(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,Zwe.getRules)(),sK.call(this,Kwe,t,"NOT SUPPORTED"),sK.call(this,Gwe,t,"DEPRECATED","warn"),this._metaOpts=Xwe.call(this),t.formats&&Ywe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&Jwe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),Qwe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=iK;n==="id"&&(i={...iK},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(l,d){await a.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||s.call(this,p)}async function a(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof cK.default))throw d;return o.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function o({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(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,i);return this}let a;if(typeof t=="object"){let{schemaId:s}=this.opts;if(a=t[s],a!==void 0&&typeof a!="string")throw new Error(`schema ${s} must be string`)}return r=(0,qm.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}getSchema(t){let r;for(;typeof(r=oK.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Lm.SchemaEnv({schema:{},schemaId:n});if(r=Lm.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=oK.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,qm.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(nke.call(this,n,r),!r)return(0,IC.eachItem)(n,a=>EC.call(this,a)),this;ake.call(this,r);let i={...r,type:(0,fb.getJSONTypes)(r.type),schemaType:(0,fb.getJSONTypes)(r.schemaType)};return(0,IC.eachItem)(n,i.type.length===0?a=>EC.call(this,a,i):a=>i.type.forEach(s=>EC.call(this,a,i,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(a=>a.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,a)=>i+r+a)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let a=i.split("/").slice(1),s=t;for(let o of a)s=s[o];for(let o in n){let c=n[o];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[o];u&&l&&(s[o]=lK(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,a=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof t=="object")s=t[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,qm.normalizeId)(s||n);let u=qm.getSchemaRefs.call(this,t,n);return c=new Lm.SchemaEnv({schema:t,schemaId:o,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(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Lm.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Lm.compileSchema.call(this,t)}finally{this.opts=r}}};Zm.ValidationError=qwe.default;Zm.MissingRefError=cK.default;Kr.default=Zm;function sK(e,t,r,n="error"){for(let i in e){let a=i;a in t&&this.logger[n](`${r}: option ${i}. ${e[a]}`)}}function oK(e){return e=(0,qm.normalizeId)(e),this.schemas[e]||this.refs[e]}function Qwe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Ywe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function Jwe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function Xwe(){let e={...this.opts};for(let t of Bwe)delete e[t];return e}var eke={log(){},warn(){},error(){}};function tke(e){if(e===!1)return eke;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var rke=/^[a-z_$][a-z0-9_$:-]*$/i;function nke(e,t){let{RULES:r}=this;if((0,IC.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!rke.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function EC(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,s=i?a.post:a.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},a.rules.push(s)),a.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,fb.getJSONTypes)(t.type),schemaType:(0,fb.getJSONTypes)(t.schemaType)}};t.before?ike.call(this,s,o,t.before):s.rules.push(o),a.all[e]=o,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function ike(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function ake(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=lK(t)),e.validateSchema=this.compile(t,!0))}var ske={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function lK(e){return{anyOf:[e,ske]}}});var pK=C(PC=>{"use strict";Object.defineProperty(PC,"__esModule",{value:!0});var oke={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};PC.default=oke});var gK=C(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.callRef=vc.getValidate=void 0;var cke=Mm(),fK=Ni(),Vn=nt(),jl=us(),mK=pb(),mb=Pt(),uke={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:a,validateName:s,opts:o,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=mK.resolveRef.call(c,u,i,r);if(l===void 0)throw new cke.default(n.opts.uriResolver,i,r);if(l instanceof mK.SchemaEnv)return p(l);return f(l);function d(){if(a===u)return hb(e,s,a,a.$async);let m=t.scopeValue("root",{ref:u});return hb(e,(0,Vn._)`${m}.validate`,u,u.$async)}function p(m){let v=hK(e,m);hb(e,v,m,m.$async)}function f(m){let v=t.scopeValue("schema",o.code.source===!0?{ref:m,code:(0,Vn.stringify)(m)}:{ref:m}),g=t.name("valid"),h=e.subschema({schema:m,dataTypes:[],schemaPath:Vn.nil,topSchemaRef:v,errSchemaPath:r},g);e.mergeEvaluated(h),e.ok(g)}}};function hK(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Vn._)`${r.scopeValue("wrapper",{ref:t})}.validate`}vc.getValidate=hK;function hb(e,t,r,n){let{gen:i,it:a}=e,{allErrors:s,schemaEnv:o,opts:c}=a,u=c.passContext?jl.default.this:Vn.nil;n?l():d();function l(){if(!o.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Vn._)`await ${(0,fK.callValidateCode)(e,t,u)}`),f(t),s||i.assign(m,!0)},v=>{i.if((0,Vn._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),p(v),s||i.assign(m,!1)}),e.ok(m)}function d(){e.result((0,fK.callValidateCode)(e,t,u),()=>f(t),()=>p(t))}function p(m){let v=(0,Vn._)`${m}.errors`;i.assign(jl.default.vErrors,(0,Vn._)`${jl.default.vErrors} === null ? ${v} : ${jl.default.vErrors}.concat(${v})`),i.assign(jl.default.errors,(0,Vn._)`${jl.default.vErrors}.length`)}function f(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=mb.mergeEvaluated.props(i,g.props,a.props));else{let h=i.var("props",(0,Vn._)`${m}.evaluated.props`);a.props=mb.mergeEvaluated.props(i,h,a.props,Vn.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=mb.mergeEvaluated.items(i,g.items,a.items));else{let h=i.var("items",(0,Vn._)`${m}.evaluated.items`);a.items=mb.mergeEvaluated.items(i,h,a.items,Vn.Name)}}}vc.callRef=hb;vc.default=uke});var vK=C(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});var lke=pK(),dke=gK(),pke=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",lke.default,dke.default];TC.default=pke});var yK=C(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});var gb=nt(),oo=gb.operators,vb={maximum:{okStr:"<=",ok:oo.LTE,fail:oo.GT},minimum:{okStr:">=",ok:oo.GTE,fail:oo.LT},exclusiveMaximum:{okStr:"<",ok:oo.LT,fail:oo.GTE},exclusiveMinimum:{okStr:">",ok:oo.GT,fail:oo.LTE}},fke={message:({keyword:e,schemaCode:t})=>(0,gb.str)`must be ${vb[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,gb._)`{comparison: ${vb[e].okStr}, limit: ${t}}`},mke={keyword:Object.keys(vb),type:"number",schemaType:"number",$data:!0,error:fke,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,gb._)`${r} ${vb[t].fail} ${n} || isNaN(${r})`)}};OC.default=mke});var _K=C(zC=>{"use strict";Object.defineProperty(zC,"__esModule",{value:!0});var Fm=nt(),hke={message:({schemaCode:e})=>(0,Fm.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Fm._)`{multipleOf: ${e}}`},gke={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:hke,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),o=a?(0,Fm._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,Fm._)`${s} !== parseInt(${s})`;e.fail$data((0,Fm._)`(${n} === 0 || (${s} = ${r}/${n}, ${o}))`)}};zC.default=gke});var xK=C(CC=>{"use strict";Object.defineProperty(CC,"__esModule",{value:!0});function bK(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}CC.default=bK;bK.code='require("ajv/dist/runtime/ucs2length").default'});var wK=C(NC=>{"use strict";Object.defineProperty(NC,"__esModule",{value:!0});var yc=nt(),vke=Pt(),yke=xK(),_ke={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,yc.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,yc._)`{limit: ${e}}`},bke={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_ke,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,a=t==="maxLength"?yc.operators.GT:yc.operators.LT,s=i.opts.unicode===!1?(0,yc._)`${r}.length`:(0,yc._)`${(0,vke.useFunc)(e.gen,yke.default)}(${r})`;e.fail$data((0,yc._)`${s} ${a} ${n}`)}};NC.default=bke});var kK=C(jC=>{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});var xke=Ni(),wke=Pt(),Al=nt(),kke={message:({schemaCode:e})=>(0,Al.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Al._)`{pattern: ${e}}`},Ske={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:kke,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:a,it:s}=e,o=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,u=c.code==="new RegExp"?(0,Al._)`new RegExp`:(0,wke.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,Al._)`${u}(${a}, ${o}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,Al._)`!${l}`)}else{let c=(0,xke.usePattern)(e,i);e.fail$data((0,Al._)`!${c}.test(${r})`)}}};jC.default=Ske});var SK=C(AC=>{"use strict";Object.defineProperty(AC,"__esModule",{value:!0});var Vm=nt(),$ke={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Vm.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Vm._)`{limit: ${e}}`},Eke={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:$ke,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Vm.operators.GT:Vm.operators.LT;e.fail$data((0,Vm._)`Object.keys(${r}).length ${i} ${n}`)}};AC.default=Eke});var $K=C(RC=>{"use strict";Object.defineProperty(RC,"__esModule",{value:!0});var Bm=Ni(),Wm=nt(),Ike=Pt(),Pke={message:({params:{missingProperty:e}})=>(0,Wm.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Wm._)`{missingProperty: ${e}}`},Tke={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Pke,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:a,it:s}=e,{opts:o}=s;if(!a&&r.length===0)return;let c=r.length>=o.loopRequired;if(s.allErrors?u():l(),o.strictRequired){let f=e.parentSchema.properties,{definedProperties:m}=e.it;for(let v of r)if(f?.[v]===void 0&&!m.has(v)){let g=s.schemaEnv.baseId+s.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,Ike.checkStrictMode)(s,h,s.opts.strictRequired)}}function u(){if(c||a)e.block$data(Wm.nil,d);else for(let f of r)(0,Bm.checkReportMissingProp)(e,f)}function l(){let f=t.let("missing");if(c||a){let m=t.let("valid",!0);e.block$data(m,()=>p(f,m)),e.ok(m)}else t.if((0,Bm.checkMissingProp)(e,r,f)),(0,Bm.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,Bm.noPropertyInData)(t,i,f,o.ownProperties),()=>e.error())})}function p(f,m){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(m,(0,Bm.propertyInData)(t,i,f,o.ownProperties)),t.if((0,Wm.not)(m),()=>{e.error(),t.break()})},Wm.nil)}}};RC.default=Tke});var EK=C(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});var Km=nt(),Oke={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Km.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Km._)`{limit: ${e}}`},zke={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Oke,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Km.operators.GT:Km.operators.LT;e.fail$data((0,Km._)`${r}.length ${i} ${n}`)}};UC.default=zke});var yb=C(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});var IK=sm();IK.code='require("ajv/dist/runtime/equal").default';DC.default=IK});var PK=C(LC=>{"use strict";Object.defineProperty(LC,"__esModule",{value:!0});var MC=jm(),Gr=nt(),Cke=Pt(),Nke=yb(),jke={message:({params:{i:e,j:t}})=>(0,Gr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Gr._)`{i: ${e}, j: ${t}}`},Ake={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:jke,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:a,schemaCode:s,it:o}=e;if(!n&&!i)return;let c=t.let("valid"),u=a.items?(0,MC.getSchemaTypes)(a.items):[];e.block$data(c,l,(0,Gr._)`${s} === false`),e.ok(c);function l(){let m=t.let("i",(0,Gr._)`${r}.length`),v=t.let("j");e.setParams({i:m,j:v}),t.assign(c,!0),t.if((0,Gr._)`${m} > 1`,()=>(d()?p:f)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function p(m,v){let g=t.name("item"),h=(0,MC.checkDataTypes)(u,g,o.opts.strictNumbers,MC.DataType.Wrong),_=t.const("indices",(0,Gr._)`{}`);t.for((0,Gr._)`;${m}--;`,()=>{t.let(g,(0,Gr._)`${r}[${m}]`),t.if(h,(0,Gr._)`continue`),u.length>1&&t.if((0,Gr._)`typeof ${g} == "string"`,(0,Gr._)`${g} += "_"`),t.if((0,Gr._)`typeof ${_}[${g}] == "number"`,()=>{t.assign(v,(0,Gr._)`${_}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,Gr._)`${_}[${g}] = ${m}`)})}function f(m,v){let g=(0,Cke.useFunc)(t,Nke.default),h=t.name("outer");t.label(h).for((0,Gr._)`;${m}--;`,()=>t.for((0,Gr._)`${v} = ${m}; ${v}--;`,()=>t.if((0,Gr._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{e.error(),t.assign(c,!1).break(h)})))}}};LC.default=Ake});var TK=C(ZC=>{"use strict";Object.defineProperty(ZC,"__esModule",{value:!0});var qC=nt(),Rke=Pt(),Uke=yb(),Dke={message:"must be equal to constant",params:({schemaCode:e})=>(0,qC._)`{allowedValue: ${e}}`},Mke={keyword:"const",$data:!0,error:Dke,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:a}=e;n||a&&typeof a=="object"?e.fail$data((0,qC._)`!${(0,Rke.useFunc)(t,Uke.default)}(${r}, ${i})`):e.fail((0,qC._)`${a} !== ${r}`)}};ZC.default=Mke});var OK=C(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});var Gm=nt(),Lke=Pt(),qke=yb(),Zke={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Gm._)`{allowedValues: ${e}}`},Fke={keyword:"enum",schemaType:"array",$data:!0,error:Zke,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:a,it:s}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let o=i.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,Lke.useFunc)(t,qke.default)),l;if(o||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let f=t.const("vSchema",a);l=(0,Gm.or)(...i.map((m,v)=>p(f,v)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",a,f=>t.if((0,Gm._)`${u()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function p(f,m){let v=i[m];return typeof v=="object"&&v!==null?(0,Gm._)`${u()}(${r}, ${f}[${m}])`:(0,Gm._)`${r} === ${v}`}}};FC.default=Fke});var zK=C(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});var Vke=yK(),Bke=_K(),Wke=wK(),Kke=kK(),Gke=SK(),Hke=$K(),Qke=EK(),Yke=PK(),Jke=TK(),Xke=OK(),eSe=[Vke.default,Bke.default,Wke.default,Kke.default,Gke.default,Hke.default,Qke.default,Yke.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Jke.default,Xke.default];VC.default=eSe});var WC=C(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.validateAdditionalItems=void 0;var _c=nt(),BC=Pt(),tSe={message:({params:{len:e}})=>(0,_c.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,_c._)`{limit: ${e}}`},rSe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:tSe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,BC.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}CK(e,n)}};function CK(e,t){let{gen:r,schema:n,data:i,keyword:a,it:s}=e;s.items=!0;let o=r.const("len",(0,_c._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,_c._)`${o} <= ${t.length}`);else if(typeof n=="object"&&!(0,BC.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,_c._)`${o} <= ${t.length}`);r.if((0,_c.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,o,l=>{e.subschema({keyword:a,dataProp:l,dataPropType:BC.Type.Num},u),s.allErrors||r.if((0,_c.not)(u),()=>r.break())})}}Hm.validateAdditionalItems=CK;Hm.default=rSe});var KC=C(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.validateTuple=void 0;var NK=nt(),_b=Pt(),nSe=Ni(),iSe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return jK(e,"additionalItems",t);r.items=!0,!(0,_b.alwaysValidSchema)(r,t)&&e.ok((0,nSe.validateArray)(e))}};function jK(e,t,r=e.schema){let{gen:n,parentSchema:i,data:a,keyword:s,it:o}=e;l(i),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=_b.mergeEvaluated.items(n,r.length,o.items));let c=n.name("valid"),u=n.const("len",(0,NK._)`${a}.length`);r.forEach((d,p)=>{(0,_b.alwaysValidSchema)(o,d)||(n.if((0,NK._)`${u} > ${p}`,()=>e.subschema({keyword:s,schemaProp:p,dataProp:p},c)),e.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=o,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(p.strictTuples&&!v){let g=`"${s}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,_b.checkStrictMode)(o,g,p.strictTuples)}}}Qm.validateTuple=jK;Qm.default=iSe});var AK=C(GC=>{"use strict";Object.defineProperty(GC,"__esModule",{value:!0});var aSe=KC(),sSe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,aSe.validateTuple)(e,"items")};GC.default=sSe});var UK=C(HC=>{"use strict";Object.defineProperty(HC,"__esModule",{value:!0});var RK=nt(),oSe=Pt(),cSe=Ni(),uSe=WC(),lSe={message:({params:{len:e}})=>(0,RK.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,RK._)`{limit: ${e}}`},dSe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:lSe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,oSe.alwaysValidSchema)(n,t)&&(i?(0,uSe.validateAdditionalItems)(e,i):e.ok((0,cSe.validateArray)(e)))}};HC.default=dSe});var DK=C(QC=>{"use strict";Object.defineProperty(QC,"__esModule",{value:!0});var Ai=nt(),bb=Pt(),pSe={message:({params:{min:e,max:t}})=>t===void 0?(0,Ai.str)`must contain at least ${e} valid item(s)`:(0,Ai.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ai._)`{minContains: ${e}}`:(0,Ai._)`{minContains: ${e}, maxContains: ${t}}`},fSe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:pSe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:a}=e,s,o,{minContains:c,maxContains:u}=n;a.opts.next?(s=c===void 0?1:c,o=u):s=1;let l=t.const("len",(0,Ai._)`${i}.length`);if(e.setParams({min:s,max:o}),o===void 0&&s===0){(0,bb.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&s>o){(0,bb.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,bb.alwaysValidSchema)(a,r)){let v=(0,Ai._)`${l} >= ${s}`;o!==void 0&&(v=(0,Ai._)`${v} && ${l} <= ${o}`),e.pass(v);return}a.items=!0;let d=t.name("valid");o===void 0&&s===1?f(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),o!==void 0&&t.if((0,Ai._)`${i}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let v=t.name("_valid"),g=t.let("count",0);f(v,()=>t.if(v,()=>m(g)))}function f(v,g){t.forRange("i",0,l,h=>{e.subschema({keyword:"contains",dataProp:h,dataPropType:bb.Type.Num,compositeRule:!0},v),g()})}function m(v){t.code((0,Ai._)`${v}++`),o===void 0?t.if((0,Ai._)`${v} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Ai._)`${v} > ${o}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Ai._)`${v} >= ${s}`,()=>t.assign(d,!0)))}}};QC.default=fSe});var qK=C(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.validateSchemaDeps=ja.validatePropertyDeps=ja.error=void 0;var YC=nt(),mSe=Pt(),Ym=Ni();ja.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,YC.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,YC._)`{property: ${e},
251
+ missingProperty: ${n},
252
+ depsCount: ${t},
253
+ deps: ${r}}`};var hSe={keyword:"dependencies",type:"object",schemaType:"object",error:ja.error,code(e){let[t,r]=gSe(e);MK(e,t),LK(e,r)}};function gSe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function MK(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let a=r.let("missing");for(let s in t){let o=t[s];if(o.length===0)continue;let c=(0,Ym.propertyInData)(r,n,s,i.opts.ownProperties);e.setParams({property:s,depsCount:o.length,deps:o.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of o)(0,Ym.checkReportMissingProp)(e,u)}):(r.if((0,YC._)`${c} && (${(0,Ym.checkMissingProp)(e,o,a)})`),(0,Ym.reportMissingProp)(e,a),r.else())}}ja.validatePropertyDeps=MK;function LK(e,t=e.schema){let{gen:r,data:n,keyword:i,it:a}=e,s=r.name("valid");for(let o in t)(0,mSe.alwaysValidSchema)(a,t[o])||(r.if((0,Ym.propertyInData)(r,n,o,a.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:o},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}ja.validateSchemaDeps=LK;ja.default=hSe});var FK=C(JC=>{"use strict";Object.defineProperty(JC,"__esModule",{value:!0});var ZK=nt(),vSe=Pt(),ySe={message:"property name must be valid",params:({params:e})=>(0,ZK._)`{propertyName: ${e.propertyName}}`},_Se={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ySe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,vSe.alwaysValidSchema)(i,r))return;let a=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),t.if((0,ZK.not)(a),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(a)}};JC.default=_Se});var eN=C(XC=>{"use strict";Object.defineProperty(XC,"__esModule",{value:!0});var xb=Ni(),pa=nt(),bSe=us(),wb=Pt(),xSe={message:"must NOT have additional properties",params:({params:e})=>(0,pa._)`{additionalProperty: ${e.additionalProperty}}`},wSe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:xSe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");let{allErrors:o,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,wb.alwaysValidSchema)(s,r))return;let u=(0,xb.allSchemaProperties)(n.properties),l=(0,xb.allSchemaProperties)(n.patternProperties);d(),e.ok((0,pa._)`${a} === ${bSe.default.errors}`);function d(){t.forIn("key",i,g=>{!u.length&&!l.length?m(g):t.if(p(g),()=>m(g))})}function p(g){let h;if(u.length>8){let _=(0,wb.schemaRefOrVal)(s,n.properties,"properties");h=(0,xb.isOwnProperty)(t,_,g)}else u.length?h=(0,pa.or)(...u.map(_=>(0,pa._)`${g} === ${_}`)):h=pa.nil;return l.length&&(h=(0,pa.or)(h,...l.map(_=>(0,pa._)`${(0,xb.usePattern)(e,_)}.test(${g})`))),(0,pa.not)(h)}function f(g){t.code((0,pa._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),o||t.break();return}if(typeof r=="object"&&!(0,wb.alwaysValidSchema)(s,r)){let h=t.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),t.if((0,pa.not)(h),()=>{e.reset(),f(g)})):(v(g,h),o||t.if((0,pa.not)(h),()=>t.break()))}}function v(g,h,_){let y={keyword:"additionalProperties",dataProp:g,dataPropType:wb.Type.Str};_===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(y,h)}}};XC.default=wSe});var WK=C(rN=>{"use strict";Object.defineProperty(rN,"__esModule",{value:!0});var kSe=Dm(),VK=Ni(),tN=Pt(),BK=eN(),SSe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:a}=e;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&BK.default.code(new kSe.KeywordCxt(a,BK.default,"additionalProperties"));let s=(0,VK.allSchemaProperties)(r);for(let d of s)a.definedProperties.add(d);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=tN.mergeEvaluated.props(t,(0,tN.toHash)(s),a.props));let o=s.filter(d=>!(0,tN.alwaysValidSchema)(a,r[d]));if(o.length===0)return;let c=t.name("valid");for(let d of o)u(d)?l(d):(t.if((0,VK.propertyInData)(t,i,d,a.opts.ownProperties)),l(d),a.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};rN.default=SSe});var QK=C(nN=>{"use strict";Object.defineProperty(nN,"__esModule",{value:!0});var KK=Ni(),kb=nt(),GK=Pt(),HK=Pt(),$Se={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:a}=e,{opts:s}=a,o=(0,KK.allSchemaProperties)(r),c=o.filter(v=>(0,GK.alwaysValidSchema)(a,r[v]));if(o.length===0||c.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,l=t.name("valid");a.props!==!0&&!(a.props instanceof kb.Name)&&(a.props=(0,HK.evaluatedPropsToName)(t,a.props));let{props:d}=a;p();function p(){for(let v of o)u&&f(v),a.allErrors?m(v):(t.var(l,!0),m(v),t.if(l))}function f(v){for(let g in u)new RegExp(v).test(g)&&(0,GK.checkStrictMode)(a,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){t.forIn("key",n,g=>{t.if((0,kb._)`${(0,KK.usePattern)(e,v)}.test(${g})`,()=>{let h=c.includes(v);h||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:HK.Type.Str},l),a.opts.unevaluated&&d!==!0?t.assign((0,kb._)`${d}[${g}]`,!0):!h&&!a.allErrors&&t.if((0,kb.not)(l),()=>t.break())})})}}};nN.default=$Se});var YK=C(iN=>{"use strict";Object.defineProperty(iN,"__esModule",{value:!0});var ESe=Pt(),ISe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,ESe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};iN.default=ISe});var JK=C(aN=>{"use strict";Object.defineProperty(aN,"__esModule",{value:!0});var PSe=Ni(),TSe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:PSe.validateUnion,error:{message:"must match a schema in anyOf"}};aN.default=TSe});var XK=C(sN=>{"use strict";Object.defineProperty(sN,"__esModule",{value:!0});var Sb=nt(),OSe=Pt(),zSe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Sb._)`{passingSchemas: ${e.passing}}`},CSe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:zSe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let a=r,s=t.let("valid",!1),o=t.let("passing",null),c=t.name("_valid");e.setParams({passing:o}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){a.forEach((l,d)=>{let p;(0,OSe.alwaysValidSchema)(i,l)?t.var(c,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Sb._)`${c} && ${s}`).assign(s,!1).assign(o,(0,Sb._)`[${o}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(o,d),p&&e.mergeEvaluated(p,Sb.Name)})})}}};sN.default=CSe});var eG=C(oN=>{"use strict";Object.defineProperty(oN,"__esModule",{value:!0});var NSe=Pt(),jSe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((a,s)=>{if((0,NSe.alwaysValidSchema)(n,a))return;let o=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(o)})}};oN.default=jSe});var nG=C(cN=>{"use strict";Object.defineProperty(cN,"__esModule",{value:!0});var $b=nt(),rG=Pt(),ASe={message:({params:e})=>(0,$b.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,$b._)`{failingKeyword: ${e.ifClause}}`},RSe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ASe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,rG.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=tG(n,"then"),a=tG(n,"else");if(!i&&!a)return;let s=t.let("valid",!0),o=t.name("_valid");if(c(),e.reset(),i&&a){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(o,u("then",l),u("else",l))}else i?t.if(o,u("then")):t.if((0,$b.not)(o),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(l)}function u(l,d){return()=>{let p=e.subschema({keyword:l},o);t.assign(s,o),e.mergeValidEvaluated(p,s),d?t.assign(d,(0,$b._)`${l}`):e.setParams({ifClause:l})}}}};function tG(e,t){let r=e.schema[t];return r!==void 0&&!(0,rG.alwaysValidSchema)(e,r)}cN.default=RSe});var iG=C(uN=>{"use strict";Object.defineProperty(uN,"__esModule",{value:!0});var USe=Pt(),DSe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,USe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};uN.default=DSe});var aG=C(lN=>{"use strict";Object.defineProperty(lN,"__esModule",{value:!0});var MSe=WC(),LSe=AK(),qSe=KC(),ZSe=UK(),FSe=DK(),VSe=qK(),BSe=FK(),WSe=eN(),KSe=WK(),GSe=QK(),HSe=YK(),QSe=JK(),YSe=XK(),JSe=eG(),XSe=nG(),e$e=iG();function t$e(e=!1){let t=[HSe.default,QSe.default,YSe.default,JSe.default,XSe.default,e$e.default,BSe.default,WSe.default,VSe.default,KSe.default,GSe.default];return e?t.push(LSe.default,ZSe.default):t.push(MSe.default,qSe.default),t.push(FSe.default),t}lN.default=t$e});var sG=C(dN=>{"use strict";Object.defineProperty(dN,"__esModule",{value:!0});var wr=nt(),r$e={message:({schemaCode:e})=>(0,wr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,wr._)`{format: ${e}}`},n$e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r$e,code(e,t){let{gen:r,data:n,$data:i,schema:a,schemaCode:s,it:o}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=o;if(!c.validateFormats)return;i?p():f();function p(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,wr._)`${m}[${s}]`),g=r.let("fType"),h=r.let("format");r.if((0,wr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,wr._)`${v}.type || "string"`).assign(h,(0,wr._)`${v}.validate`),()=>r.assign(g,(0,wr._)`"string"`).assign(h,v)),e.fail$data((0,wr.or)(_(),y()));function _(){return c.strictSchema===!1?wr.nil:(0,wr._)`${s} && !${h}`}function y(){let b=l.$async?(0,wr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,wr._)`${h}(${n})`,x=(0,wr._)`(typeof ${h} == "function" ? ${b} : ${h}.test(${n}))`;return(0,wr._)`${h} && ${h} !== true && ${g} === ${t} && !${x}`}}function f(){let m=d.formats[a];if(!m){_();return}if(m===!0)return;let[v,g,h]=y(m);v===t&&e.pass(b());function _(){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,wr.regexpCode)(x):c.code.formats?(0,wr._)`${c.code.formats}${(0,wr.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,wr._)`${k}.validate`]:["string",x,k]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,wr._)`await ${h}(${n})`}return typeof g=="function"?(0,wr._)`${h}(${n})`:(0,wr._)`${h}.test(${n})`}}}};dN.default=n$e});var oG=C(pN=>{"use strict";Object.defineProperty(pN,"__esModule",{value:!0});var i$e=sG(),a$e=[i$e.default];pN.default=a$e});var cG=C(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.contentVocabulary=Rl.metadataVocabulary=void 0;Rl.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Rl.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var lG=C(fN=>{"use strict";Object.defineProperty(fN,"__esModule",{value:!0});var s$e=vK(),o$e=zK(),c$e=aG(),u$e=oG(),uG=cG(),l$e=[s$e.default,o$e.default,(0,c$e.default)(),u$e.default,uG.metadataVocabulary,uG.contentVocabulary];fN.default=l$e});var pG=C(Eb=>{"use strict";Object.defineProperty(Eb,"__esModule",{value:!0});Eb.DiscrError=void 0;var dG;(function(e){e.Tag="tag",e.Mapping="mapping"})(dG||(Eb.DiscrError=dG={}))});var mG=C(hN=>{"use strict";Object.defineProperty(hN,"__esModule",{value:!0});var Ul=nt(),mN=pG(),fG=pb(),d$e=Mm(),p$e=Pt(),f$e={message:({params:{discrError:e,tagName:t}})=>e===mN.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ul._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},m$e={keyword:"discriminator",type:"object",schemaType:"object",error:f$e,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:a}=e,{oneOf:s}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Ul._)`${r}${(0,Ul.getProperty)(o)}`);t.if((0,Ul._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:mN.DiscrError.Tag,tag:u,tagName:o})),e.ok(c);function l(){let f=p();t.if(!1);for(let m in f)t.elseIf((0,Ul._)`${u} === ${m}`),t.assign(c,d(f[m]));t.else(),e.error(!1,{discrError:mN.DiscrError.Mapping,tag:u,tagName:o}),t.endIf()}function d(f){let m=t.name("valid"),v=e.subschema({keyword:"oneOf",schemaProp:f},m);return e.mergeEvaluated(v,Ul.Name),m}function p(){var f;let m={},v=h(i),g=!0;for(let b=0;b<s.length;b++){let x=s[b];if(x?.$ref&&!(0,p$e.schemaHasRulesButRef)(x,a.self.RULES)){let k=x.$ref;if(x=fG.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,k),x instanceof fG.SchemaEnv&&(x=x.schema),x===void 0)throw new d$e.default(a.opts.uriResolver,a.baseId,k)}let w=(f=x?.properties)===null||f===void 0?void 0:f[o];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);g=g&&(v||h(x)),_(w,b)}if(!g)throw new Error(`discriminator: "${o}" must be required`);return m;function h({required:b}){return Array.isArray(b)&&b.includes(o)}function _(b,x){if(b.const)y(b.const,x);else if(b.enum)for(let w of b.enum)y(w,x);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function y(b,x){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${o}" values must be unique strings`);m[b]=x}}}};hN.default=m$e});var hG=C((kFe,h$e)=>{h$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}});var vG=C((ur,gN)=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.MissingRefError=ur.ValidationError=ur.CodeGen=ur.Name=ur.nil=ur.stringify=ur.str=ur._=ur.KeywordCxt=ur.Ajv=void 0;var g$e=dK(),v$e=lG(),y$e=mG(),gG=hG(),_$e=["/properties"],Ib="http://json-schema.org/draft-07/schema",Dl=class extends g$e.default{_addVocabularies(){super._addVocabularies(),v$e.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(y$e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(gG,_$e):gG;this.addMetaSchema(t,Ib,!1),this.refs["http://json-schema.org/schema"]=Ib}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ib)?Ib:void 0)}};ur.Ajv=Dl;gN.exports=ur=Dl;gN.exports.Ajv=Dl;Object.defineProperty(ur,"__esModule",{value:!0});ur.default=Dl;var b$e=Dm();Object.defineProperty(ur,"KeywordCxt",{enumerable:!0,get:function(){return b$e.KeywordCxt}});var Ml=nt();Object.defineProperty(ur,"_",{enumerable:!0,get:function(){return Ml._}});Object.defineProperty(ur,"str",{enumerable:!0,get:function(){return Ml.str}});Object.defineProperty(ur,"stringify",{enumerable:!0,get:function(){return Ml.stringify}});Object.defineProperty(ur,"nil",{enumerable:!0,get:function(){return Ml.nil}});Object.defineProperty(ur,"Name",{enumerable:!0,get:function(){return Ml.Name}});Object.defineProperty(ur,"CodeGen",{enumerable:!0,get:function(){return Ml.CodeGen}});var x$e=lb();Object.defineProperty(ur,"ValidationError",{enumerable:!0,get:function(){return x$e.default}});var w$e=Mm();Object.defineProperty(ur,"MissingRefError",{enumerable:!0,get:function(){return w$e.default}})});var yG=C(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.formatLimitDefinition=void 0;var k$e=vG(),fa=nt(),co=fa.operators,Pb={formatMaximum:{okStr:"<=",ok:co.LTE,fail:co.GT},formatMinimum:{okStr:">=",ok:co.GTE,fail:co.LT},formatExclusiveMaximum:{okStr:"<",ok:co.LT,fail:co.GTE},formatExclusiveMinimum:{okStr:">",ok:co.GT,fail:co.LTE}},S$e={message:({keyword:e,schemaCode:t})=>(0,fa.str)`should be ${Pb[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,fa._)`{comparison: ${Pb[e].okStr}, limit: ${t}}`};Ll.formatLimitDefinition={keyword:Object.keys(Pb),type:"string",schemaType:"string",$data:!0,error:S$e,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:a}=e,{opts:s,self:o}=a;if(!s.validateFormats)return;let c=new k$e.KeywordCxt(a,o.RULES.all.format.definition,"format");c.$data?u():l();function u(){let p=t.scopeValue("formats",{ref:o.formats,code:s.code.formats}),f=t.const("fmt",(0,fa._)`${p}[${c.schemaCode}]`);e.fail$data((0,fa.or)((0,fa._)`typeof ${f} != "object"`,(0,fa._)`${f} instanceof RegExp`,(0,fa._)`typeof ${f}.compare != "function"`,d(f)))}function l(){let p=c.schema,f=o.formats[p];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${i}": format "${p}" does not define "compare" function`);let m=t.scopeValue("formats",{key:p,ref:f,code:s.code.formats?(0,fa._)`${s.code.formats}${(0,fa.getProperty)(p)}`:void 0});e.fail$data(d(m))}function d(p){return(0,fa._)`${p}.compare(${r}, ${n}) ${Pb[i].fail} 0`}},dependencies:["format"]};var $$e=e=>(e.addKeyword(Ll.formatLimitDefinition),e);Ll.default=$$e});var wG=C((Jm,xG)=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var ql=n5(),E$e=yG(),vN=nt(),_G=new vN.Name("fullFormats"),I$e=new vN.Name("fastFormats"),yN=(e,t={keywords:!0})=>{if(Array.isArray(t))return bG(e,t,ql.fullFormats,_G),e;let[r,n]=t.mode==="fast"?[ql.fastFormats,I$e]:[ql.fullFormats,_G],i=t.formats||ql.formatNames;return bG(e,i,r,n),t.keywords&&(0,E$e.default)(e),e};yN.get=(e,t="full")=>{let n=(t==="fast"?ql.fastFormats:ql.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function bG(e,t,r,n){var i,a;(i=(a=e.opts.code).formats)!==null&&i!==void 0||(a.formats=(0,vN._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}xG.exports=Jm=yN;Object.defineProperty(Jm,"__esModule",{value:!0});Jm.default=yN});function P$e(){let e=new kG.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,SG.default)(e),e}var kG,SG,Tb,$G=P(()=>{kG=Yl(HW(),1),SG=Yl(wG(),1);Tb=class{constructor(t){this._ajv=t??P$e()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}});var Ob,EG=P(()=>{Hf();Ob=class{constructor(t){this._client=t}async*callToolStream(t,r=ul,n){let i=this._client,a={...n,task:n?.task??(i.isToolTask(t.name)?{}:void 0)},s=i.requestStream({method:"tools/call",params:t},r,a),o=i.getToolOutputValidator(t.name);for await(let c of s){if(c.type==="result"&&o){let u=c.result;if(!u.structuredContent&&!u.isError){yield{type:"error",error:new ze(qe.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(u.structuredContent)try{let l=o(u.structuredContent);if(!l.valid){yield{type:"error",error:new ze(qe.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof ze){yield{type:"error",error:l};return}yield{type:"error",error:new ze(qe.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield c}}async getTask(t,r){return this._client.getTask({taskId:t},r)}async getTaskResult(t,r,n){return this._client.getTaskResult({taskId:t},r,n)}async listTasks(t,r){return this._client.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._client.cancelTask({taskId:t},r)}requestStream(t,r,n){return this._client.requestStream(t,r,n)}}});function IG(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function PG(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var TG=P(()=>{});function zb(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){let r=t,n=e.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&&zb(a,r[i])}}if(Array.isArray(e.anyOf))for(let r of e.anyOf)typeof r!="boolean"&&zb(r,t);if(Array.isArray(e.oneOf))for(let r of e.oneOf)typeof r!="boolean"&&zb(r,t)}}function T$e(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}var Cb,OG=P(()=>{kV();Hf();$G();i_();EG();TG();Cb=class extends v_{constructor(t,r){super(r),this._clientInfo=t,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 Tb,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",qT,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",MT,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",CT,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Ob(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=wV(this._capabilities,t)}setRequestHandler(t,r){let i=n_(t)?.method;if(!i)throw new Error("Schema is missing a method literal");let a;if(sl(i)){let o=i;a=o._zod?.def?.value??o.value}else{let o=i;a=o._def?.value??o.value}if(typeof a!="string")throw new Error("Schema method literal must be a string");let s=a;if(s==="elicitation/create"){let o=async(c,u)=>{let l=ia(BT,c);if(!l.success){let _=l.error instanceof Error?l.error.message:String(l.error);throw new ze(qe.InvalidParams,`Invalid elicitation request: ${_}`)}let{params:d}=l.data;d.mode=d.mode??"form";let{supportsFormMode:p,supportsUrlMode:f}=T$e(this._capabilities.elicitation);if(d.mode==="form"&&!p)throw new ze(qe.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!f)throw new ze(qe.InvalidParams,"Client does not support URL-mode elicitation requests");let m=await Promise.resolve(r(c,u));if(d.task){let _=ia(Xo,m);if(!_.success){let y=_.error instanceof Error?_.error.message:String(_.error);throw new ze(qe.InvalidParams,`Invalid task creation result: ${y}`)}return _.data}let v=ia(WT,m);if(!v.success){let _=v.error instanceof Error?v.error.message:String(v.error);throw new ze(qe.InvalidParams,`Invalid elicitation result: ${_}`)}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{zb(h,g.content)}catch{}return g};return super.setRequestHandler(t,o)}if(s==="sampling/createMessage"){let o=async(c,u)=>{let l=ia(ZT,c);if(!l.success){let g=l.error instanceof Error?l.error.message:String(l.error);throw new ze(qe.InvalidParams,`Invalid sampling request: ${g}`)}let{params:d}=l.data,p=await Promise.resolve(r(c,u));if(d.task){let g=ia(Xo,p);if(!g.success){let h=g.error instanceof Error?g.error.message:String(g.error);throw new ze(qe.InvalidParams,`Invalid task creation result: ${h}`)}return g.data}let m=d.tools||d.toolChoice?VT:FT,v=ia(m,p);if(!v.success){let g=v.error instanceof Error?v.error.message:String(v.error);throw new ze(qe.InvalidParams,`Invalid sampling result: ${g}`)}return v.data};return super.setRequestHandler(t,o)}return super.setRequestHandler(t,r)}assertCapability(t,r){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${r})`)}async connect(t,r){if(await super.connect(t),t.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:xT,capabilities:this._capabilities,clientInfo:this._clientInfo}},ET,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!tV.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,t.setProtocolVersion&&t.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(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);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 ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);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 ${t})`);break;case"ping":break}}assertTaskCapability(t){IG(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&PG(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Jo,t)}async complete(t,r){return this.request({method:"completion/complete",params:t},KT,r)}async setLoggingLevel(t,r){return this.request({method:"logging/setLevel",params:{level:t}},Jo,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},DT,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},NT,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},PT,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},TT,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},zT,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},Jo,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},Jo,r)}async callTool(t,r=ul,n){if(this.isToolTaskRequired(t.name))throw new ze(qe.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let i=await this.request({method:"tools/call",params:t},r,n),a=this.getToolOutputValidator(t.name);if(a){if(!i.structuredContent&&!i.isError)throw new ze(qe.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(i.structuredContent)try{let s=a(i.structuredContent);if(!s.valid)throw new ze(qe.InvalidParams,`Structured content does not match the tool's output schema: ${s.errorMessage}`)}catch(s){throw s instanceof ze?s:new ze(qe.InvalidParams,`Failed to validate structured content: ${s instanceof Error?s.message:String(s)}`)}}return i}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of t){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(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,r){let n=await this.request({method:"tools/list",params:t},LT,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(t,r,n,i){let a=vV.safeParse(n);if(!a.success)throw new Error(`Invalid ${t} listChanged options: ${a.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);let{autoRefresh:s,debounceMs:o}=a.data,{onChanged:c}=n,u=async()=>{if(!s){c(null,null);return}try{let d=await i();c(null,d)}catch(d){let p=d instanceof Error?d:new Error(String(d));c(p,null)}},l=()=>{if(o){let d=this._listChangedDebounceTimers.get(t);d&&clearTimeout(d);let p=setTimeout(u,o);this._listChangedDebounceTimers.set(t,p)}else u()};this.setNotificationHandler(r,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var AG=C((RFe,jG)=>{jG.exports=NG;NG.sync=z$e;var zG=Ot("fs");function O$e(e,t){var r=t.pathExt!==void 0?t.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&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function CG(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:O$e(t,r)}function NG(e,t,r){zG.stat(e,function(n,i){r(n,n?!1:CG(i,e,t))})}function z$e(e,t){return CG(zG.statSync(e),e,t)}});var LG=C((UFe,MG)=>{MG.exports=UG;UG.sync=C$e;var RG=Ot("fs");function UG(e,t,r){RG.stat(e,function(n,i){r(n,n?!1:DG(i,t))})}function C$e(e,t){return DG(RG.statSync(e),t)}function DG(e,t){return e.isFile()&&N$e(e,t)}function N$e(e,t){var r=e.mode,n=e.uid,i=e.gid,a=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=o|c,d=r&u||r&c&&i===s||r&o&&n===a||r&l&&a===0;return d}});var ZG=C((MFe,qG)=>{var DFe=Ot("fs"),Nb;process.platform==="win32"||global.TESTING_WINDOWS?Nb=AG():Nb=LG();qG.exports=_N;_N.sync=j$e;function _N(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){_N(e,t||{},function(a,s){a?i(a):n(s)})})}Nb(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function j$e(e,t){try{return Nb.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var HG=C((LFe,GG)=>{var Zl=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",FG=Ot("path"),A$e=Zl?";":":",VG=ZG(),BG=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),WG=(e,t)=>{let r=t.colon||A$e,n=e.match(/\//)||Zl&&e.match(/\\/)?[""]:[...Zl?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=Zl?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=Zl?i.split(r):[""];return Zl&&e.indexOf(".")!==-1&&a[0]!==""&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:i}},KG=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:a}=WG(e,t),s=[],o=u=>new Promise((l,d)=>{if(u===n.length)return t.all&&s.length?l(s):d(BG(e));let p=n[u],f=/^".*"$/.test(p)?p.slice(1,-1):p,m=FG.join(f,e),v=!f&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;l(c(v,u,0))}),c=(u,l,d)=>new Promise((p,f)=>{if(d===i.length)return p(o(l+1));let m=i[d];VG(u+m,{pathExt:a},(v,g)=>{if(!v&&g)if(t.all)s.push(u+m);else return p(u+m);return p(c(u,l,d+1))})});return r?o(0).then(u=>r(null,u),r):o(0)},R$e=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=WG(e,t),a=[];for(let s=0;s<r.length;s++){let o=r[s],c=/^".*"$/.test(o)?o.slice(1,-1):o,u=FG.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let d=0;d<n.length;d++){let p=l+n[d];try{if(VG.sync(p,{pathExt:i}))if(t.all)a.push(p);else return p}catch{}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw BG(e)};GG.exports=KG;KG.sync=R$e});var YG=C((qFe,bN)=>{"use strict";var QG=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};bN.exports=QG;bN.exports.default=QG});var tH=C((ZFe,eH)=>{"use strict";var JG=Ot("path"),U$e=HG(),D$e=YG();function XG(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,a=i&&process.chdir!==void 0&&!process.chdir.disabled;if(a)try{process.chdir(e.options.cwd)}catch{}let s;try{s=U$e.sync(e.command,{path:r[D$e({env:r})],pathExt:t?JG.delimiter:void 0})}catch{}finally{a&&process.chdir(n)}return s&&(s=JG.resolve(i?e.options.cwd:"",s)),s}function M$e(e){return XG(e)||XG(e,!0)}eH.exports=M$e});var rH=C((FFe,wN)=>{"use strict";var xN=/([()\][%!^"`<>&|;, *?])/g;function L$e(e){return e=e.replace(xN,"^$1"),e}function q$e(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(xN,"^$1"),t&&(e=e.replace(xN,"^$1")),e}wN.exports.command=L$e;wN.exports.argument=q$e});var iH=C((VFe,nH)=>{"use strict";nH.exports=/^#!(.*)/});var sH=C((BFe,aH)=>{"use strict";var Z$e=iH();aH.exports=(e="")=>{let t=e.match(Z$e);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var cH=C((WFe,oH)=>{"use strict";var kN=Ot("fs"),F$e=sH();function V$e(e){let r=Buffer.alloc(150),n;try{n=kN.openSync(e,"r"),kN.readSync(n,r,0,150,0),kN.closeSync(n)}catch{}return F$e(r.toString())}oH.exports=V$e});var pH=C((KFe,dH)=>{"use strict";var B$e=Ot("path"),uH=tH(),lH=rH(),W$e=cH(),K$e=process.platform==="win32",G$e=/\.(?:com|exe)$/i,H$e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Q$e(e){e.file=uH(e);let t=e.file&&W$e(e.file);return t?(e.args.unshift(e.file),e.command=t,uH(e)):e.file}function Y$e(e){if(!K$e)return e;let t=Q$e(e),r=!G$e.test(t);if(e.options.forceShell||r){let n=H$e.test(t);e.command=B$e.normalize(e.command),e.command=lH.command(e.command),e.args=e.args.map(a=>lH.argument(a,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function J$e(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Y$e(n)}dH.exports=J$e});var hH=C((GFe,mH)=>{"use strict";var SN=process.platform==="win32";function $N(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function X$e(e,t){if(!SN)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let a=fH(i,t);if(a)return r.call(e,"error",a)}return r.apply(e,arguments)}}function fH(e,t){return SN&&e===1&&!t.file?$N(t.original,"spawn"):null}function eEe(e,t){return SN&&e===1&&!t.file?$N(t.original,"spawnSync"):null}mH.exports={hookChildProcess:X$e,verifyENOENT:fH,verifyENOENTSync:eEe,notFoundError:$N}});var yH=C((HFe,Fl)=>{"use strict";var gH=Ot("child_process"),EN=pH(),IN=hH();function vH(e,t,r){let n=EN(e,t,r),i=gH.spawn(n.command,n.args,n.options);return IN.hookChildProcess(i,n),i}function tEe(e,t,r){let n=EN(e,t,r),i=gH.spawnSync(n.command,n.args,n.options);return i.error=i.error||IN.verifyENOENTSync(i.status,n),i}Fl.exports=vH;Fl.exports.spawn=vH;Fl.exports.sync=tEe;Fl.exports._parse=EN;Fl.exports._enoent=IN});function rEe(e){return uV.parse(JSON.parse(e))}function _H(e){return JSON.stringify(e)+`
254
+ `}var jb,bH=P(()=>{Hf();jb=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
255
+ `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),rEe(r)}clear(){this._buffer=void 0}}});import PN from"node:process";import{PassThrough as nEe}from"node:stream";function aEe(){let e={};for(let t of iEe){let r=PN.env[t];r!==void 0&&(r.startsWith("()")||(e[t]=r))}return e}var xH,iEe,Ab,wH=P(()=>{xH=Yl(yH(),1);bH();iEe=PN.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];Ab=class{constructor(t){this._readBuffer=new jb,this._stderrStream=null,this._serverParams=t,(t.stderr==="pipe"||t.stderr==="overlapped")&&(this._stderrStream=new nEe)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,r)=>{this._process=(0,xH.default)(this._serverParams.command,this._serverParams.args??[],{env:{...aEe(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:PN.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{t()}),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 t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){if(this._process){let t=this._process;this._process=void 0;let r=new Promise(n=>{t.once("close",()=>{n()})});try{t.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),t.exitCode===null){try{t.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(t.exitCode===null)try{t.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(t){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=_H(t);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}}});var Rb,kH=P(()=>{OG();wH();qi();Rb=class{#e=new Map;async ensureServer(t,r){if(this.#e.has(t))return this.#e.get(t);let{command:n,args:i=[],env:a={}}=r;q.debug(`[MCP] Starting ${t}: ${n} ${i.join(" ")}`);let s=new Ab({command:n,args:i,env:{...process.env,...a}}),o=new Cb({name:`zibby-chat-${t}`,version:"1.0.0"},{capabilities:{}});await o.connect(s);let c={client:o,transport:s,serverConfig:r};return this.#e.set(t,c),c}async callTool(t,r,n={}){let i=this.#e.get(t);if(!i)throw new Error(`MCP server "${t}" not running`);q.debug(`[MCP] ${t}.${r}(${JSON.stringify(n).slice(0,200)})`);let a=await i.client.callTool({name:r,arguments:n});return{text:a.content?.filter(o=>o.type==="text").map(o=>o.text).join(`
256
+ `)||"",isError:a.isError||!1}}isRunning(t){return this.#e.has(t)}async stopServer(t){let r=this.#e.get(t);if(r){try{await r.client.close()}catch(n){q.debug(`[MCP] Error closing ${t}: ${n.message}`)}this.#e.delete(t)}}async stopAll(){let t=[...this.#e.keys()];await Promise.allSettled(t.map(r=>this.stopServer(r)))}}});import{existsSync as sEe,readFileSync as oEe}from"fs";import{join as cEe}from"path";import{homedir as uEe}from"os";function lEe(){try{let e=cEe(uEe(),".zibby","config.json");return sEe(e)?JSON.parse(oEe(e,"utf-8")):{}}catch{return{}}}function Ub(e){return String(e||"").replace(/\/v1\/?$/,"")}function dEe(e,t){let r=process.env.OPENAI_PROXY_URL;if(r)return Ub(r);if(e==="session")return t.proxyUrl?Ub(t.proxyUrl):`${(process.env.ZIBBY_API_URL||"https://api-prod.zibby.app").replace(/\/$/,"")}/openai-proxy`;if(e==="byok"){let n=process.env.OPENAI_BASE_URL;return Ub(n||"https://api.openai.com")}return Ub(r||"")}function TN(){let e=lEe(),t=process.env.ZIBBY_USER_TOKEN||e.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,s="session";n==="byok"||n==="local"||n==="session"?s=n:t?s="session":r?s="byok":a&&i&&(s="local");let o=dEe(s,e),c={"Content-Type":"application/json"};if(s==="session"){if(!t)return{ok:!1,mode:s,reason:"missing_session_token"};c.Authorization=`Bearer ${t}`}else if(s==="byok"){if(!r)return{ok:!1,mode:s,reason:"missing_openai_api_key"};c.Authorization=`Bearer ${r}`}else if(s==="local"){if(!o)return{ok:!1,mode:s,reason:"missing_openai_proxy_url"};!i&&r&&(c.Authorization=`Bearer ${r}`)}return o?{ok:!0,mode:s,baseUrl:o,headers:c,tokenPreview:c.Authorization?`***${c.Authorization.slice(-4)}`:"none"}:{ok:!1,mode:s,reason:"missing_base_url"}}var SH=P(()=>{});function Db(e,t){let r=String(e??"");return r.length<=t?r:`${r.slice(0,Math.max(0,t-30))}
257
+
258
+ [tool result truncated for size]`}function pEe(e,t){if(typeof e=="string")return Db(e,t);try{return Db(JSON.stringify(e),t)}catch{return Db(String(e),t)}}function $H(e){let t=new Set;for(let i of e)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let a of i.tool_calls)t.add(a.id);let r=e.filter(i=>i.role==="tool"?t.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:s,...o}=i;return{...o,content:o.content||""}})}function fEe(e){let t=Array.isArray(e?.messages)?e.messages:[],r=t.find(a=>a.role==="system"),n=t.slice(-4).map(a=>({...a,content:Db(a.content,a.role==="tool"?1200:2500)}));n=$H(n);let i={...e,messages:[r,...n].filter(Boolean)};return delete i.tools,i}async function mEe({body:e,streaming:t,auth:r,options:n,fetchCompletion:i,fetchStreamingCompletion:a,onFallbackLog:s}){try{return t?await a(e,r,n):await i(e,r,n)}catch(o){let c=String(o?.message||o||"");if(!/proxy error 413|payload too large/i.test(c))throw o;let u=fEe(e);return typeof s=="function"&&s(e,u),{data:t?await a(u,r,n):await i(u,r,n),fallback:u}}}async function EH({body:e,auth:t,options:r,streaming:n,toolContext:i,activeSkills:a,round:s,verbose:o,dependencies:c,config:u={}}){let l=u.maxToolResultChars||3e3,{fetchCompletion:d,fetchStreamingCompletion:p,onFallbackLog:f,hasToolCalls:m,getTextContent:v,parseToolCalls:g,buildAssistantMessage:h,buildToolResultMessage:_,executeTool:y,onToolCallLog:b,injectTools:x}=c;Array.isArray(e?.messages)&&(e.messages=$H(e.messages));let w=await mEe({body:e,streaming:n,auth:t,options:r,fetchCompletion:d,fetchStreamingCompletion:p,onFallbackLog:f}),k=w?.data||w;if(!m(k))return{done:!0,text:v(k),body:w?.fallback||e};let E=g(k),O=w?.fallback||e;O.messages.push(h(k)),o&&typeof b=="function"&&b(E);let U=await Promise.all(E.map((z,L)=>(typeof r.onToolCall=="function"&&r.onToolCall(z.name,z.args,{round:s,index:L,total:E.length}),y(z,i))));for(let z=0;z<E.length;z++){let W=E[z].name==="get_skill_context"?typeof U[z]=="string"?U[z]:JSON.stringify(U[z]):pEe(U[z],l);O.messages.push(_(E[z].id,W))}return typeof r.onToolCall=="function"&&r.onToolCall(null),x(O,a),{done:!1,body:O}}var IH=P(()=>{});function Bl(e){!e||typeof e!="object"||(e.type==="object"&&e.properties&&(e.required=Object.keys(e.properties),e.additionalProperties=!1,Object.values(e.properties).forEach(Bl)),e.type==="array"&&e.items&&Bl(e.items),e.anyOf&&e.anyOf.forEach(Bl),e.oneOf&&e.oneOf.forEach(Bl),e.allOf&&e.allOf.forEach(Bl))}function Mb(e){return Array.isArray(e)?new Set(e.map(t=>String(t||"").trim()).filter(Boolean)):new Set}function yEe(e){return Array.isArray(e)?e.map(t=>String(t||"").trim()).filter(Boolean):[]}var hEe,gEe,ON,PH,Vl,vEe,Xm,TH=P(()=>{ys();qi();fo();G3();kH();ya();SH();IH();hEe=ln.ASSISTANT,gEe=15,ON="get_skill_context";PH={maxBytes:49e3,systemMaxChars:12e3},Vl=()=>process.env.ZIBBY_VERBOSE==="true"||process.env.ZIBBY_DEBUG==="true",vEe=e=>Buffer.byteLength(JSON.stringify(e),"utf8");Xm=class extends un{#e;#t;#r=new Rb;constructor(t=null){super("assistant","Zibby Assistant",200),t&&typeof t=="object"&&(t.toolProvider||t.completionProvider)?(this.#e=t.toolProvider||new il,this.#t=t.completionProvider||new al):(this.#e=t||new il,this.#t=new al)}canHandle(t){return TN().ok}async invoke(t,r={}){let n=r.model&&r.model!=="auto"?r.model:hEe,i=TN();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:t}],s=i.baseUrl,o=Vl();if(o?await this.#m(a,n,s,i.tokenPreview||"none"):q.debug(`[Assistant] ${s} | 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),p=this.#l(r),f={...r,payloadCompaction:p},m={activeSkills:l,options:f,executionRegistry:d,capabilityPolicy:u},v=!!r.stream,g={model:n,messages:[...a],stream:!1};this.#i(g,l,u);for(let h=0;h<gEe;h++){if(r.signal?.aborted)throw new Error("Aborted");let _=await EH({body:g,auth:i,options:f,streaming:v,toolContext:m,activeSkills:l,round:h,verbose:o,dependencies:{fetchCompletion:this.#a.bind(this),fetchStreamingCompletion:this.#c.bind(this),onFallbackLog:(y,b)=>{Vl()&&console.log(`413 fallback: messages ${y.messages.length} -> ${b.messages.length}, bytes=${vEe(b)}`)},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,b)=>this.#e.buildToolResultMessage(y,b),executeTool:(y,b)=>this.#o(y,b),onToolCallLog:async y=>{let b=(await import("chalk")).default;console.log(b.dim(` ${y.map(x=>`${x.name}(${JSON.stringify(x.args).slice(0,80)})`).join(", ")}`))},injectTools:(y,b)=>this.#i(y,b,u)},config:{maxToolResultChars:r.maxToolResultChars||3e3}});if(_.done)return _.text;g.messages=_.body.messages,_.body.tools?g.tools=_.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(t,r,n=null){let i=this.#s(r,n),a=this.#e.formatTools(i);this.#e.injectToolsIntoBody(t,a)}#s(t,r=null){let n=[],i=new Set;for(let a of t){let s=Ar(a);if(s?.tools?.length)for(let o of s.tools)this.#n(o.name,r)&&(i.has(o.name)||(i.add(o.name),n.push({name:o.name,description:o.description,parameters:o.parameters||o.input_schema||{type:"object",properties:{}}})))}return!r?.disableSkillContextTool&&this.#n(ON,r)&&n.push({name:ON,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#o(t,r){let{activeSkills:n,options:i,executionRegistry:a,capabilityPolicy:s}=r;if(!this.#n(t.name,s))return`Tool "${t.name}" blocked by policy`;if(t.name===ON){let u=String(t.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=Ar(u);if(!l)return JSON.stringify({error:`Skill "${u}" not found`});let d=typeof l.promptFragment=="function"?l.promptFragment():l.promptFragment||"",p=(l.tools||[]).map(m=>m.name),f=JSON.stringify({skillId:u,description:l.description||"",toolNames:p,promptFragment:d||""});return Vl()&&(console.log(`
259
+ \u{1F4D6} get_skill_context("${u}") \u2192 ${f.length} chars (fragment: ${d.length} chars)`),console.log(` tools: [${p.join(", ")}]`),console.log(` fragment preview: ${d.slice(0,200).replace(/\n/g,"\\n")}\u2026
260
+ `)),f}let o=a?.get(t.name)||null;if(!o)return`Unknown tool: ${t.name}`;let c=Ar(o.skillId);if(!c)return`Skill "${o.skillId}" not found for tool "${t.name}"`;if(o.mode==="handler")try{return c.handleToolCall(t.name,t.args,r)}catch(u){return`Error in ${t.name}: ${u.message}`}if(o.mode==="mcp")try{if(!this.#r.isRunning(c.serverName)){let l=c.resolve(i);if(!l)return`Skill "${o.skillId}" is not available (cannot start server)`;await this.#r.ensureServer(c.serverName,l)}let u=await this.#r.callTool(c.serverName,t.name,t.args);return u.text||(u.isError?"Tool call failed":"Done")}catch(u){return`MCP error (${c.serverName}): ${u.message}`}return`Skill "${o.skillId}" owns tool "${t.name}" but has no execution mode`}async#c(t,r,n){return this.#t.fetchStreamingCompletion(t,r,{...n,onBudget:({beforeBytes:i,meta:a})=>{Vl()&&console.log(`payload bytes (stream) before=${i} after=${a.bytes} trimmed=${a.trimmed} messages=${a.messageCount}`)}})}async#a(t,r,n){return this.#t.fetchCompletion(t,r,{...n,onBudget:({beforeBytes:i,meta:a})=>{Vl()&&console.log(`payload bytes before=${i} after=${a.bytes} trimmed=${a.trimmed} messages=${a.messageCount}`)}})}async#u(t,r,n,i){let{zodToJsonSchema:a}=await Promise.resolve().then(()=>(ks(),Ij)),s=typeof i.schema?.parse=="function",o=s?a(i.schema):i.schema;delete o.$schema,Bl(o);let c={model:t,messages:r,stream:!1,response_format:{type:"json_schema",json_schema:{name:"extract",schema:o,strict:!0}}},u=await this.#a(c,n,i),l=this.#e.getTextContent(u),d=JSON.parse(l),p=s?i.schema.parse(d):d;return{raw:l,structured:p}}#l(t={}){let r=t?.config?.agent?.assistant?.payloadCompaction||{};return{maxBytes:Number(r.maxBytes||t.maxPayloadBytes||PH.maxBytes),systemMaxChars:Number(r.systemMaxChars||PH.systemMaxChars)}}#d(t={}){let r=t?.config?.agent?.assistant?.toolPolicy||{};return{allowTools:Mb(r.allowTools||t.allowTools),denyTools:Mb(r.denyTools||t.denyTools),denyPrefixes:yEe(r.denyPrefixes||t.denyToolPrefixes),includeSkills:Mb(r.includeSkills||t.includeSkills),excludeSkills:Mb(r.excludeSkills||t.excludeSkills),disableSkillContextTool:!!(r.disableSkillContextTool||t.disableSkillContextTool)}}#p(t,r){let n=r?.includeSkills||new Set,i=r?.excludeSkills||new Set;return n.size===0&&i.size===0?t:t.filter(a=>!(n.size>0&&!n.has(a)||i.has(a)))}#n(t,r){let n=String(t||"").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(o=>n.startsWith(o)))}#f(t){let r=new Map,n=[];for(let i of t){let a=Ar(i);if(!a?.tools?.length)continue;let s=typeof a.handleToolCall=="function"?"handler":a.serverName&&typeof a.resolve=="function"?"mcp":null;if(s)for(let o of a.tools){let c=String(o?.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:s})}}}if(n.length>0&&Vl()){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(t,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 s=!1;for(let o of t)if(o.role==="system")console.log(a.dim(`[System] ${o.content||""}`));else{s||(console.log(a.dim("\u2500\u2500\u2500 chat history \u2500\u2500\u2500")),s=!0);let c=o.role==="user"?"Human":"AI",u=o.content?.length>200?`${o.content.slice(0,200)}...`:o.content||"";console.log(a.dim(`[${c}] ${u}`))}console.log(a.dim("\u2500".repeat(60)))}}});var eh={};ga(eh,{AgentStrategy:()=>un,AssistantStrategy:()=>Xm,ClaudeAgentStrategy:()=>Af,CodexAgentStrategy:()=>Uf,CursorAgentStrategy:()=>Np,GeminiAgentStrategy:()=>Df,getAgentStrategy:()=>zN,invokeAgent:()=>zH});function zN(e={}){let{state:t={},preferredAgent:r=null}=e,n=r||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");q.debug(`Agent selection: requested=${n}`);let i=OH.find(a=>a.getName()===n);if(!i)throw new Error(`Unknown agent '${n}'. Available: ${OH.map(a=>a.getName()).join(", ")}`);if(q.debug(`Checking if ${n} can handle this environment...`),!i.canHandle(e)){let 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 q.debug(`Using agent: ${i.getName()}`),i}async function zH(e,t={},r={}){try{await import("@zibby/skills")}catch{}let n=zN(t),i=t.state?.config||r.config||{},a=i.models||{},s=r.nodeName&&a[r.nodeName]||null,o=a.default||null,c=n.name,u=i.agent?.[c]?.model||null,l=s||o||u||r.model||null,d={...r,model:l,workspace:t.state?.workspace||r.workspace,schema:r.schema||t.schema,images:r.images||t.images||[],skills:r.skills||t.skills||[],config:i},p=d.skills||[];if(p.length>0&&!r.skipPromptFragments){let{getSkill:m}=await Promise.resolve().then(()=>(ya(),px)),v=p.map(g=>{let h=m(g)?.promptFragment;return typeof h=="function"?h():h}).filter(Boolean);v.length>0&&(e+=`
263
+
264
+ ${v.join(`
265
+
266
+ `)}`)}let f=t.state?._currentNodeConfig?.extraPromptInstructions?.trim();return f&&(e+=`
267
+
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
269
+ \u26A0\uFE0F PRIORITY OVERRIDE \u2014 THE FOLLOWING INSTRUCTIONS TAKE PRECEDENCE OVER ALL PREVIOUS CONTENT
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
271
+
272
+ ${f}
273
+ `),q.debug(`Prompt length: ${e.length} chars`),process.env.STAGE!=="prod"&&q.debug(`Full prompt:
274
+ ${e}`),n.invoke(e,d)}var OH,Wl=P(()=>{tM();T3();U3();Z3();TH();qi();ys();OH=[new Xm,new Np,new Af,new Uf,new Df]});var D8=new Set(["__proto__","constructor","prototype"]);function ax(e){if(D8.has(e))throw new Error(`Invalid state key: "${e}"`)}var Jl=class{constructor(t={}){this._state=Object.create(null),Object.assign(this._state,{messages:[],errors:[],artifacts:{},metadata:{},...t}),this._history=[]}get(t){return this._state[t]}set(t,r){ax(t),this._history.push({...this._state}),this._state[t]=r}update(t){let r=Object.getOwnPropertyNames(t);for(let n of r)ax(n);this._history.push({...this._state});for(let n of r)this._state[n]=t[n]}append(t,r){ax(t),this._history.push({...this._state}),Array.isArray(this._state[t])||(this._state[t]=[]),this._state[t].push(r)}getAll(){return{...this._state}}rollback(){this._history.length>0&&(this._state=this._history.pop())}};var Xl=class{constructor(t){this.schema=t}parse(t){let r=t.match(/```json\s*([\s\S]*?)\s*```/);if(r)return this.validate(JSON.parse(r[1]));let n=t.match(/\{[\s\S]*\}/);return n?this.validate(JSON.parse(n[0])):this.validate({result:t.trim()})}validate(t){let r=[];for(let[n,i]of Object.entries(this.schema)){if(i.required&&!(n in t)&&r.push(`Missing required field: ${n}`),n in t&&i.type){let a=typeof t[n];a!==i.type&&r.push(`Field '${n}' expected ${i.type}, got ${a}`)}if(i.validate&&n in t){let a=i.validate(t[n]);a&&r.push(`Field '${n}': ${a}`)}}if(r.length>0)throw new Error(`Output validation failed:
275
+ ${r.join(`
276
+ `)}`);return t}},M8={string:(e=!0)=>({type:"string",required:e}),number:(e=!0)=>({type:"number",required:e}),boolean:(e=!0)=>({type:"boolean",required:e}),array:(e=!0)=>({type:"object",required:e,validate:t=>Array.isArray(t)?null:"must be an array"}),enum:(e,t=!0)=>({type:"string",required:t,validate:r=>e.includes(r)?null:`must be one of: ${e.join(", ")}`})};qi();Pc();lh();import{writeFileSync as CN,readFileSync as CH,existsSync as NH,mkdirSync as _Ee}from"fs";import{join as NN,dirname as bEe}from"path";import Lb from"chalk";var bc=class{constructor(t){if(this.config=t,this.name=t.name,this.prompt=t.prompt,this.outputSchema=t.outputSchema,!this.outputSchema&&!t._isCustomCode)throw new Error(`Node '${this.name}' must define outputSchema (Zod schema). This defines the contract for what the node returns to state.`);this.isZodSchema=this.outputSchema&&typeof this.outputSchema._def<"u",this.parser=t.outputSchema&&!this.isZodSchema?new Xl(t.outputSchema):null,this.retries=t.retries||0,this.onComplete=t.onComplete,this.customExecute=t.execute}async execute(t,r){let n=()=>r&&typeof r.getAll=="function"?r.getAll():t,i=d=>r&&typeof r.get=="function"?r.get(d):t?.[d];if(typeof this.customExecute=="function"){q.info("\u26A1 Using custom execute method (skipping LLM)");try{let d=await this.customExecute(t);return typeof d=="object"&&d!==null&&d.success===!1?{success:!1,error:d.error||"Node execution failed",raw:d.raw||null}:this.isZodSchema?(q.debug("Validating return value against outputSchema..."),{success:!0,output:this.outputSchema.parse(d),raw:null}):{success:!0,output:d,raw:null}}catch(d){return q.error(`\u274C Node '${this.name}' execution failed: ${d.message}`),d.name==="ZodError"&&q.error(`Schema validation errors: ${JSON.stringify(d.errors,null,2)}`),{success:!1,error:d.message,raw:null}}}let a=typeof this.prompt=="function"?this.prompt(n()):this.prompt,s=i("_skillHints");s&&(a=`${s}
277
+
278
+ ${a}`);let o=n(),c=o.cwd||process.cwd(),u=o.sessionPath;try{if(u){let d=NN(u,vs);if(NH(d)){let f=JSON.parse(CH(d,"utf-8"));f.currentNode=this.name,CN(d,JSON.stringify(f,null,2),"utf-8")}let p=NN(u,"..",vs);if(NH(p))try{let f=JSON.parse(CH(p,"utf-8"));f.currentNode=this.name,CN(p,JSON.stringify(f,null,2),"utf-8")}catch{}}}catch(d){q.debug(`Could not update session info: ${d.message}`)}let l=null;for(let d=0;d<=this.retries;d++)try{q.debug(`Node.execute attempt ${d} for '${this.name}'`);let p=n(),f=p.config||{},m={state:p},v={workspace:c,schema:this.isZodSchema?this.outputSchema:null,skills:this.config.skills||[],sessionPath:u,config:f,nodeName:this.name,timeout:this.config?.timeout||3e5},g=t?._coreInvokeAgent;g||(g=(await Promise.resolve().then(()=>(Wl(),eh))).invokeAgent);let h=await g(a,m,v),_,y;if(typeof h=="string"?(_=h,y=null):h.structured?(_=h.raw||JSON.stringify(h.structured,null,2),y=h.structured):(_=h.raw||JSON.stringify(h,null,2),y=h.extracted||null),u)try{let b=NN(u,this.name,"raw_stream_output.txt");_Ee(bEe(b),{recursive:!0}),CN(b,typeof _=="string"?_:JSON.stringify(_),"utf-8")}catch(b){q.debug(`Could not save raw output: ${b.message}`)}if(this.isZodSchema&&y){console.log(`
279
+ \u{1F50D} ${Lb.cyan("Validated output:")} ${Lb.white(JSON.stringify(y,null,2))}`);let b=y;if(typeof this.onComplete=="function")try{b=await this.onComplete(n(),y)}catch(x){q.warn(`onComplete hook failed: ${x.message}`)}return{success:!0,output:b,raw:_}}if(typeof this.onComplete=="function")try{return{success:!0,output:await this.onComplete(n(),{raw:_}),raw:_}}catch(b){throw new Error(`onComplete failed: ${b.message}`,{cause:b})}if(this.parser){let b=this.parser.parse(_);return console.log(`
280
+ \u{1F50D} ${Lb.cyan("Parsed output:")} ${Lb.white(JSON.stringify(b,null,2))}`),rr.step("Output parsed"),{success:!0,output:b,raw:_}}return{success:!0,output:_,raw:_}}catch(p){l=p,d<this.retries&&q.info(`Node '${this.name}' failed, retrying (${d+1}/${this.retries})...`)}return{success:!1,error:l.message,raw:null}}},th=class extends bc{constructor(t){super({...t,_isCustomCode:!0}),this.condition=t.condition}async execute(t,r){let n=r&&typeof r.getAll=="function"?r.getAll():t;return{success:!0,output:{nextNode:this.condition(n)},raw:null}}};import{existsSync as jH,readFileSync as xEe}from"fs";import{join as jN,dirname as AH}from"path";var qb=class{static async loadContext(t,r,n={}){let i={},a=n.filenames||["CONTEXT.md","AGENTS.md"];if(t){let o=AH(jN(r,t));for(let c of a){let u=await this.findAndMergeContextFiles(c,o,r);if(u){let l=c.replace(/\.[^.]+$/,"").toLowerCase();i[l]=u}}}let s=n.discovery||{};for(let[o,c]of Object.entries(s))try{let u=jN(r,c);if(jH(u)){let l=await this.loadFile(u);i[o]=l}}catch(u){console.warn(`\u26A0\uFE0F Could not load context '${o}' from '${c}': ${u.message}`)}return i}static async findAndMergeContextFiles(t,r,n){let i=[],a=r;for(;a.startsWith(n);){let s=jN(a,t);if(jH(s))try{let c=await this.loadFile(s);i.unshift(c)}catch(c){console.warn(`\u26A0\uFE0F Could not load ${t} from ${s}: ${c.message}`)}let o=AH(a);if(o===a)break;a=o}return i.length===0?null:i.every(s=>typeof s=="string")?i.join(`
281
+
282
+ ---
283
+
284
+ `):i.every(s=>typeof s=="object")?Object.assign({},...i):i[i.length-1]}static async loadFile(t){let r=xEe(t,"utf-8");if(t.endsWith(".json"))return JSON.parse(r);if(t.endsWith(".js")||t.endsWith(".mjs")){let{pathToFileURL:n}=await import("url"),i=await import(n(t).href);return i.default||i}return r}};ks();lh();Pc();import{mkdirSync as UH,existsSync as AN,writeFileSync as RH,unlinkSync as wEe}from"fs";import{join as xc,resolve as DH}from"path";import{config as kEe}from"dotenv";import SEe from"handlebars";function $Ee({traceFrom:e,sessionId:t,sessionPath:r,idSource:n,mkdirFresh:i}){if(process.env.ZIBBY_SESSION_LOG==="0"||process.env.ZIBBY_SESSION_LOG==="false")return;let a=typeof process.ppid=="number"?process.ppid:"n/a",s=`[zibby:session] from=${e} pid=${process.pid} ppid=${a} sessionId=${t} source=${n} mkdir=${i?"yes":"no"} path=${r}`;if(console.log(s),(process.env.ZIBBY_TRACE_SESSION==="1"||process.env.ZIBBY_TRACE_SESSION==="true")&&process.env.ZIBBY_SESSION_LOG!=="0"&&process.env.ZIBBY_SESSION_LOG!=="false"){let u=(new Error("session trace").stack||"").split(`
285
+ `).slice(2,14).join(`
286
+ `);console.log(`[zibby:session] stack (${e}):
287
+ ${u}`)}}function EEe(){return process.env.ZIBBY_RUN_SOURCE==="studio"||process.env.ZIBBY_KEEP_SESSION_ENV==="1"||process.env.ZIBBY_KEEP_SESSION_ENV==="true"}function IEe(){if(process.env.ZIBBY_RUN_SOURCE!=="studio")return;let e=process.env.ZIBBY_SESSION_PATH;if(!(e==null||String(e).trim()===""))try{return DH(String(e).trim())}catch{return String(e).trim()}}function PEe(){EEe()||(delete process.env.ZIBBY_SESSION_PATH,delete process.env.ZIBBY_SESSION_ID)}function TEe({sessionPath:e,sessionId:t}){e&&typeof e=="string"&&(process.env.ZIBBY_SESSION_PATH=e),t!=null&&String(t).trim()!==""&&(process.env.ZIBBY_SESSION_ID=String(t).trim())}function OEe(e={}){let t=dj.map(a=>process.env[a]).find(Boolean),r=Math.random().toString(36).slice(2,6),n=t||`${Date.now()}_${r}`,i=e.paths?.sessionPrefix;return i?`${i}_${n}`:n}function zEe({cwd:e=process.cwd(),config:t={},initialState:r={},traceFrom:n="resolveWorkflowSession"}={}){let i=r.sessionPath,a=r.sessionTimestamp,s="initialState.sessionPath";if(!i&&process.env.ZIBBY_SESSION_PATH)try{let u=DH(String(process.env.ZIBBY_SESSION_PATH));u&&(i=u,s="ZIBBY_SESSION_PATH")}catch{}let o;if(i)o=String(i).split(/[/\\]/).filter(Boolean).pop(),a==null&&(a=Date.now());else{let u=process.env.ZIBBY_SESSION_ID&&String(process.env.ZIBBY_SESSION_ID).trim();if(u)o=u,s="ZIBBY_SESSION_ID";else{let d=t.sessionId!=null?String(t.sessionId).trim():"";d&&d!=="last"?(o=d,s="config.sessionId"):(o=OEe(t),s="generated")}a=a??Date.now();let l=t.paths?.output||Tc;i=xc(e,l,lj,o)}let c=!AN(i);return c&&UH(i,{recursive:!0}),$Ee({traceFrom:n,sessionId:o,sessionPath:i,idSource:s,mkdirFresh:c}),TEe({sessionPath:i,sessionId:o}),{sessionPath:i,sessionId:o,sessionTimestamp:a}}var rh=class{constructor(t={}){this.nodes=new Map,this.edges=new Map,this.entryPoint=null,this.middleware=Array.isArray(t.middleware)?[...t.middleware]:[],t.nodeMiddleware&&this.middleware.push(t.nodeMiddleware),this.nodeTypeMap=new Map,this.conditionalCodeMap=new Map,this.stateSchema=t.stateSchema||null,this.nodePrompts=new Map,this.nodeOptions=new Map,this._invokeAgent=t.invokeAgent||null}setStateSchema(t){return this.stateSchema=t,this}getStateSchema(){return this.stateSchema}addNode(t,r,n={}){let i=r instanceof bc?r:new bc(r);return i.name=t,this.nodes.set(t,i),n.prompt&&this.nodePrompts.set(t,n.prompt),Object.keys(n).length>0&&this.nodeOptions.set(t,n),this}addConditionalNode(t,r){let n=new th({...r,name:t});return this.nodes.set(t,n),this}addEdge(t,r){return this.edges.set(t,r),this}setNodeType(t,r){return this.nodeTypeMap.set(t,r),this}addConditionalEdges(t,r,{labels:n}={}){return this.edges.set(t,{conditional:!0,routes:r,labels:n}),typeof r=="function"&&this.conditionalCodeMap.set(t,r.toString()),this}setEntryPoint(t){return this.entryPoint=t,this}use(t){return typeof t=="function"&&this.middleware.push(t),this}_composeMiddleware(t,r,n,i,a){let s=n;for(let o=t.length-1;o>=0;o--){let c=t[o],u=s;s=()=>c(r,u,i,a)}return s()}serialize(){let t=[],r={};for(let[a,s]of this.nodes){let o=this.nodeTypeMap.get(a)||a;t.push({id:a,type:o,data:{nodeType:o,label:a}});let c=s._isCustomCode||!1,u={};c&&typeof s.execute=="function"&&(u.customCode=s.execute.toString());let l=this.nodePrompts.get(a);if(l&&(u.prompt=l),typeof s.customExecute=="function"&&(u.executeCode=s.customExecute.toString()),s.outputSchema)try{if(typeof s.outputSchema._def<"u"){let f=fn(s.outputSchema,{target:"openApi3"}),m=this._flattenJsonSchemaToVariables(f);u.outputSchema={jsonSchema:f,variables:m}}else u.outputSchema={schema:s.outputSchema}}catch(p){console.warn(`Failed to convert schema for ${a}:`,p.message)}let d=(this.resolvedToolsMap||{})[a];d?.toolIds&&(u.tools=d.toolIds),Object.keys(u).length>0&&(r[a]=u)}let n=[];for(let[a,s]of this.edges)if(typeof s=="string")n.push({source:a,target:s});else if(s.conditional){let o=this.conditionalCodeMap.get(a)||s.routes.toString(),c=this._inferConditionalTargets(s.routes),u=s.labels||{};for(let l of c){let d={source:a,target:l,data:{conditionalCode:o}};u[l]&&(d.label=u[l]),n.push(d)}}let i=null;if(this.stateSchema)try{i=fn(this.stateSchema,{target:"openApi3"})}catch{i=this.stateSchema}return{nodes:t,edges:n,nodeConfigs:r,stateSchema:i}}_inferConditionalTargets(t){let r=t.toString(),n=new Set,i=/return\s+['"]([^'"]+)['"]/g,a;for(;(a=i.exec(r))!==null;)n.add(a[1]);return[...n]}_flattenJsonSchemaToVariables(t,r=""){let n=t;if(t.$ref&&t.definitions){let i=t.$ref.replace("#/definitions/","");n=t.definitions[i]||t}return this._flattenSchema(n,r)}_flattenSchema(t,r=""){if(!t||typeof t!="object")return[];let n=[],i=t.properties||{},a=t.required||[];for(let[s,o]of Object.entries(i)){let c=r?`${r}.${s}`:s,u=!a.includes(s);if(n.push({path:c,type:o.type||"unknown",label:o.description||this._formatLabel(s),optional:u}),o.type==="object"&&o.properties){let l=this._flattenSchema(o,c);n.push(...l)}if(o.type==="array"&&o.items?.type==="object"&&o.items.properties){let l=this._flattenSchema(o.items,`${c}[]`);n.push(...l)}}return n}_formatLabel(t){return t.replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim()}_summarizeNodeOutput(t,r){if(!r||typeof r!="object")return[];let n=[];r.success!==void 0&&n.push(`Result: ${r.success?"passed":"failed"}`);for(let[i,a]of Object.entries(r))if(!(i==="success"||i==="raw"||i==="nextNode")){if(typeof a=="string"&&a.length<=80)n.push(`${i}: ${a}`);else if(Array.isArray(a)){let s=a.length,o=a.filter(u=>u?.passed===!0).length;if(a.some(u=>u?.passed!==void 0)){let u=s-o;n.push(`${i}: ${o}/${s} passed${u?`, ${u} failed`:""}`)}else n.push(`${i}: ${s} items`)}if(n.length>=4)break}return n}async run(t,r={}){if(!this.entryPoint)throw new Error("No entry point set for graph");let n=r.cwd||process.cwd();kEe({path:xc(n,".env")});let i=r.config||{};if(!i||Object.keys(i).length===0)try{let x=xc(n,".zibby.config.js");AN(x)&&(i=(await import(x)).default||{})}catch{}process.env.EXECUTION_ID&&!i.agent?.strictMode&&(i.agent={...i.agent,strictMode:!0});let a=r.agentType;if(!a){let x=i?.agent;x?.provider?a=x.provider:x?.gemini?a="gemini":x?.claude?a="claude":x?.cursor?a="cursor":x?.codex?a="codex":a=process.env.AGENT_TYPE||"cursor"}let s=r.contextConfig||t?.config?.contextConfig||t?.config?.context||i?.context||{};if(this.stateSchema){let x=this.stateSchema.safeParse(r);if(!x.success){let w=x.error.issues.map(k=>`${k.path.join(".")}: ${k.message}`);throw console.error("\u274C Initial state validation failed:"),w.forEach(k=>console.error(` - ${k}`)),new Error(`State validation failed: ${w.join(", ")}`)}rr.step("State validated against schema")}let o=IEe(),c=r.sessionPath||o;c||PEe();let{sessionPath:u,sessionTimestamp:l,sessionId:d}=zEe({cwd:n,config:i,traceFrom:"WorkflowGraph.run",initialState:{sessionPath:c,sessionTimestamp:r.sessionTimestamp}});rr.step(`Session ${d}`);let p=await qb.loadContext(r.specPath||"",n,s);Object.keys(p).length>0&&rr.step(`Context loaded: ${Object.keys(p).join(", ")}`);let f=r.outputPath;!f&&r.specPath&&(t?.calculateOutputPath?f=t.calculateOutputPath(r.specPath):console.warn(`\u26A0\uFE0F outputPath not resolved (specPath=${r.specPath})`));let m=new Jl({...r,config:i,agentType:a,outputPath:f,sessionPath:u,sessionTimestamp:l,context:p,resolvedTools:this.resolvedToolsMap||{}}),v=new Map;try{await import("@zibby/skills")}catch{}let{getSkill:g}=await Promise.resolve().then(()=>(ya(),px)),h=new Set;for(let[,x]of this.nodes)for(let w of x.config?.skills||[])h.add(w);for(let x of h){let w=g(x);if(typeof w?.middleware=="function")try{let k=await w.middleware();typeof k=="function"&&v.set(x,k)}catch{}}let _=this.entryPoint,y=[];for(;_&&_!=="END";){let x=xc(u,uh);if(AN(x)){console.warn(`
288
+ \u{1F6D1} Studio stop requested \u2014 ending workflow.`);try{wEe(x)}catch{}if(t&&typeof t.cleanup=="function")try{await t.cleanup()}catch{}return rr.step("Workflow stopped by Studio"),{success:!0,state:m.getAll(),executionLog:y,stoppedByStudio:!0}}let w=this.nodes.get(_);if(!w)throw new Error(`Node '${_}' not found in graph`);let k=JSON.stringify({sessionPath:u,sessionTimestamp:l,currentNode:_,createdAt:new Date().toISOString(),config:m.get("config")}),E=xc(u,vs);RH(E,k,"utf-8");let O=m.get("config")?.paths?.output||Tc,U=xc(n,O,vs);UH(xc(n,O),{recursive:!0});try{RH(U,k,"utf-8")}catch{}let z=r.onPipelineProgress;if(typeof z=="function")try{z({cwd:n,sessionPath:u,sessionId:d,outputBase:m.get("config")?.paths?.output||Tc,currentNode:_})}catch{}let L=(this.resolvedToolsMap||{})[_]||null;m.set("_currentNodeTools",L);let W=m.get("nodeConfigs")||{};m.set("_currentNodeConfig",W[_]||{}),rr.nodeStart(_);let R=Date.now(),re=this.nodePrompts.get(_);if(!this._invokeAgent){let fe=await Promise.resolve().then(()=>(Wl(),eh));this._invokeAgent=fe.invokeAgent}let Q=this._invokeAgent,Ze={state:m,invokeAgent:async(fe={},V={})=>{let I=V.prompt||"";if(re)try{I=SEe.compile(re,{noEscape:!0})(fe)}catch($){throw console.error(`\u274C Template rendering failed for node '${_}':`,$.message),new Error(`Template rendering failed: ${$.message}`,{cause:$})}else if(!I)throw new Error(`No prompt template configured for node '${_}' and no prompt provided in options`);let B={state:m.getAll(),images:V.images||[]},A={model:V.model||m.get("model"),workspace:m.get("workspace"),schema:V.schema,...V};return Q(I,B,A)},_coreInvokeAgent:Q,agent:t,nodeId:_,promptTemplate:re,getPromptTemplate:()=>re,...m.getAll()};try{let fe=(w.config?.skills||[]).map(T=>v.get(T)).filter(Boolean),V=[...this.middleware,...fe],I;V.length>0?I=await this._composeMiddleware(V,_,async()=>w.execute(Ze,m),m.getAll(),m):I=await w.execute(Ze,m);let B=Date.now()-R;if(y.push({node:_,success:I.success,duration:B,timestamp:new Date().toISOString()}),!I.success){if(String(I.error||"").includes("Stopped from Zibby Studio")){if(rr.step("Workflow stopped by Studio"),m.set("stoppedByStudio",!0),t&&typeof t.cleanup=="function")try{await t.cleanup()}catch{}return{success:!0,state:m.getAll(),executionLog:y,stoppedByStudio:!0}}m.append("errors",{node:_,error:I.error});let K=w.config?.retries||0,se=`${_}_retries`,ge=m.getAll()[se]||0;if(ge<K){rr.stepInfo(`Retrying (attempt ${ge+1}/${K})`),m.update({[se]:ge+1,[`${_}_raw`]:I.raw});continue}throw rr.nodeFailed(_,I.error,{duration:B}),new Error(`Node '${_}' failed after ${ge} attempts: ${I.error}`)}m.update({[_]:I.output});let A=this._summarizeNodeOutput(_,I.output);rr.nodeComplete(_,{duration:B,details:A});let $=this.edges.get(_);if(!$)_="END";else if($.conditional){let T=m.getAll(),K=$.routes(T);rr.route(_,K),_=K}else _=$}catch(fe){throw rr.isInsideNode&&rr.nodeFailed(_,fe.message,{duration:Date.now()-R}),m.set("failed",!0),m.set("failedAt",_),fe}}rr.graphComplete();let b={success:!0,state:m.getAll(),executionLog:y};return t&&typeof t.onComplete=="function"&&await t.onComplete(b),b}};var nh=new Map;function MH(e,t){nh.set(e,t)}function RN(e){return nh.get(e)}function Zb(e){return nh.has(e)}function CEe(){return Array.from(nh.keys())}function UN(e){let t=nh.get(e);return t?t.factory&&typeof t.create=="function"?t.create.toString():typeof t.execute=="function"?t.execute.toString():typeof t=="function"?t.toString():null:null}MH("ai_agent",{name:"ai_agent",factory:!0,create:(e,t={})=>({name:e,execute:async r=>{let n=r?._coreInvokeAgent;n||(n=(await Promise.resolve().then(()=>(Wl(),eh))).invokeAgent);let i=t.extraPromptInstructions||"Execute the task based on the current state.",a=REe(i,r),s=await n(a,{cwd:r.workspace||process.cwd(),model:r.model,tools:t.resolvedTools||null});return{success:!0,output:{raw:s,nodeId:e},raw:typeof s=="string"?s:s.raw}}})});function NEe(e){let t=/@([\w.]+)/g,r=new Set,n;for(;(n=t.exec(e))!==null;)r.add(n[1]);return Array.from(r)}function jEe(e,t){let r=t.split("."),n=e;for(let i of r){if(n==null)return;n=n[i]}return n}function AEe(e){return e==null?"[not available]":typeof e=="string"?e:typeof e=="object"?e.raw&&typeof e.raw=="string"?e.raw:JSON.stringify(e,null,2):String(e)}function REe(e,t){let r=NEe(e);if(r.length===0)return e;let n=[],i=new Set;for(let a of r){let s=a.split(".")[0];if(i.has(s))continue;let o=jEe(t,a);if(o!==void 0){let c=AEe(o),u=a.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase());n.push(`## ${u}
289
+ ${c}`),a.includes(".")||i.add(s)}}return n.length===0?e:`${e}
290
+
291
+ ---
292
+ # Referenced Context
293
+
294
+ ${n.join(`
295
+
296
+ `)}`}ya();var Fb={};function MN(e,t){if(Array.isArray(t))return DN(t);let r=Fb[e];return!r||r.length===0?null:DN(r)}function DN(e){if(!Array.isArray(e)||e.length===0)return null;let t=[],r={},n=[];for(let i of e){let a=Ar(i);if(!a){console.warn(`[ToolResolver] Unknown skill "${i}" \u2014 skipping`);continue}n.push(i);for(let s of a.tools||[])t.push({name:s.name,description:s.description,input_schema:s.input_schema||{type:"object",properties:{}}});if(!r[a.serverName])if(typeof a.resolve=="function"){let s=a.resolve();s&&(r[a.serverName]={...s,toolPrefix:i})}else{let s={};for(let o of a.envKeys||[]){let c=process.env[o];c&&(s[o]=c)}r[a.serverName]={command:a.command,args:[...a.args||[]],env:s,toolPrefix:i}}}return n.length===0?null:{toolIds:n,claudeTools:t,mcpServers:r}}qi();function UEe(e,t={}){let{nodes:r,edges:n,nodeConfigs:i={}}=e;if(!Array.isArray(r)||r.length===0)throw new ma("Graph must have at least one node");if(!Array.isArray(n))throw new ma("Graph edges must be an array");let a=new rh(t);t.stateSchema&&a.setStateSchema(t.stateSchema);let s=new Set,o=new Map,c={};for(let p of r){let f=Vb(p);o.set(p.id,{...p,resolvedType:f}),f==="decision"&&s.add(p.id)}for(let[p,f]of o){if(s.has(p))continue;let m=f.resolvedType,v=i[p]||{},g=v.tools,h=MN(m,g);h&&(c[p]=h);let _={};v.prompt&&(_.prompt=v.prompt);let y=Zb(m);if(q.debug(`[compiler] Node "${p}" type="${m}" registered=${y} hasCustomCode=${!!v.customCode} hasExecuteCode=${!!v.executeCode}`),v.customCode&&!y)q.debug("[compiler] \u2192 using customCode (unregistered node)"),a.addNode(p,LH(p,v.customCode,v),_),a.setNodeType(p,m);else if(y){q.debug("[compiler] \u2192 using registered implementation");let b=RN(m);b.factory?a.addNode(p,b.create(p,{...v,resolvedTools:h}),_):a.addNode(p,b,_),a.setNodeType(p,m)}else if(v.executeCode)q.debug("[compiler] \u2192 using executeCode (fallback)"),a.addNode(p,LH(p,v.executeCode,v),_),a.setNodeType(p,m);else throw new ma(`Unknown node type "${m}" for node "${p}". Did you forget to register it?`)}a.resolvedToolsMap=c;let u=new Set;for(let p of n)s.has(p.target)||u.add(p.target);let l=r.find(p=>!s.has(p.id)&&!u.has(p.id));if(!l)throw new ma("Could not determine entry point: no node without incoming edges found");a.setEntryPoint(l.id);let d=LEe(n,"source");for(let p of n){let f=s.has(p.source),m=s.has(p.target);if(!f)if(m){let v=p.target,g=d.get(v)||[];if(g.length===0)throw new ma(`Decision node "${v}" has no outgoing edges`);let h=qEe(v,g,s);a.addConditionalEdges(p.source,h)}else a.addEdge(p.source,p.target)}return a}function DEe(e){let t=[];if(!e||typeof e!="object")return{valid:!1,errors:["Config must be a non-null object"]};if((!Array.isArray(e.nodes)||e.nodes.length===0)&&t.push("Graph must have at least one node"),Array.isArray(e.edges)||t.push("Graph edges must be an array"),t.length>0)return{valid:!1,errors:t};let r=e.nodeConfigs||{};for(let o of e.nodes){let c=Vb(o);if(c==="decision"||Zb(c))continue;let u=r[o.id]||{};u.customCode||u.executeCode||t.push(`Unknown node type "${c}" for node "${o.id}". Register it or provide customCode/executeCode.`)}let n=new Set(e.nodes.map(o=>o.id));for(let o of e.edges)n.has(o.source)||t.push(`Edge references unknown source node "${o.source}"`),n.has(o.target)||t.push(`Edge references unknown target node "${o.target}"`);let i=new Set(e.nodes.filter(o=>Vb(o)==="decision").map(o=>o.id)),a=new Set;for(let o of e.edges)i.has(o.target)||a.add(o.target);let s=e.nodes.filter(o=>!i.has(o.id)&&!a.has(o.id));s.length===0?t.push("No entry point found (every node has incoming edges)"):s.length>1&&t.push(`Multiple entry points found: ${s.map(o=>o.id).join(", ")}. Graph must have exactly one.`);for(let o of i){let c=e.edges.filter(l=>l.source===o);c.length===0&&t.push(`Decision node "${o}" has no outgoing edges`),c.some(l=>l.data?.conditionalCode||l.conditionalCode)||t.push(`Decision node "${o}" outgoing edges have no conditionalCode`)}return{valid:t.length===0,errors:t}}function MEe(e){return!e||!Array.isArray(e.nodes)?[]:e.nodes.filter(t=>Vb(t)!=="decision").map(t=>t.id)}function Vb(e){let t=e.data?.nodeType||e.data?.type||e.type;return t==="workflowNode"||t==="custom"||t==="default"?e.id:t}function LEe(e,t){let r=new Map;for(let n of e){let i=n[t];r.has(i)||r.set(i,[]),r.get(i).push(n)}return r}function qEe(e,t,r){let n=t.find(o=>o.data?.conditionalCode||o.conditionalCode);if(!n)throw new ma(`Decision node "${e}" has no conditionalCode on its outgoing edges`);let i=n.data?.conditionalCode||n.conditionalCode,a=new Set(t.map(o=>o.target).filter(o=>!r.has(o))),s;try{let c=new Function(`return (${i})`)();s=u=>{let l=c(u);return a.has(l)||q.warn(`Conditional route from "${e}" returned "${l}" which is not a valid target. Valid: ${[...a].join(", ")}`),l}}catch(o){throw new ma(`Failed to compile conditionalCode for decision "${e}": ${o.message}`)}return s}function LH(e,t,r={}){let n;try{n=new Function("invokeAgent","require","console",`return (${t})`)}catch(s){throw new ma(`Failed to compile customCode for node "${e}": ${s.message}`)}let i=n(async(...s)=>{let{invokeAgent:o}=await Promise.resolve().then(()=>(Wl(),eh));return o(...s)},typeof Ot<"u"?Ot:void 0,console),a=null;return r.outputSchema&&(a=r.outputSchema.jsonSchema||r.outputSchema),{name:e,_isCustomCode:!0,outputSchema:a,execute:async s=>{try{let o=await i(s);return typeof o=="object"&&"success"in o?o:{success:!0,output:o,raw:null}}catch(o){return{success:!1,error:o.message,raw:null}}}}}var ma=class extends Error{constructor(t){super(t),this.name="CompilationError"}};ya();function ZEe(e,t={}){let{nodes:r,edges:n,nodeConfigs:i={}}=e,a=new Set,s=[],o=new Map;for(let g of r){let h=g.data?.nodeType||g.type;o.set(g.id,h),h==="decision"?a.add(g.id):s.push({id:g.id,nodeType:h,label:g.data?.label||g.id})}let c=s.some(g=>{let h=i[g.id]||{};return!h.customCode&&!h.executeCode}),{toolsPerNode:u,toolIdsByVar:l}=QEe(s,i),{simpleEdges:d,conditionalEdges:p}=YEe(n,a),f=JEe(s,n,a),m=[],v=t.workflowType||"workflow";return m.push(VEe(t)),m.push(BEe(v,{usesRegisteredNodes:c})),m.push(WEe(l)),m.push(KEe(v)),m.push(GEe(s,i)),m.push(HEe(s,f,d,p,u,v)),m.filter(Boolean).join(`
297
+ `)}function FEe(e){let t={};for(let[r,n]of Object.entries(e)){let{tools:i,...a}=n;Object.keys(a).length>0&&(t[r]=a)}return t}function VEe(e){let t=e.workflowType||"workflow";return["// Generated by Zibby Visual Workflow Editor",`// ${e.projectId?`Project: ${e.projectId} | `:""}Type: ${t} | Version: ${e.version??0}`,`// Downloaded: ${new Date().toISOString()}`,"//",`// Upload back: zibby workflow upload --project <id> --type ${t}`,""].join(`
298
+ `)}function BEe(e,{usesRegisteredNodes:t=!0}={}){let r=["import '@zibby/skills';","import { WorkflowGraph } from '@zibby/core/framework/graph.js';","import { invokeAgent } from '@zibby/core';","import { getResolvedToolDefinitions } from '@zibby/core/framework/tool-resolver.js';"];return t&&r.push("import '@zibby/core/templates/register-nodes.js';"),r.push("import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';","import { join, dirname } from 'path';","import { fileURLToPath } from 'url';",""),r.join(`
299
+ `)}function WEe(e){if(e.size===0)return"";let t=["// \u2500\u2500 Tool Bindings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","// Each call resolves skill IDs \u2192 full schemas + MCP server configs","// from the skill registry (populated by @zibby/skills import above)."];for(let[r,n]of e){let i=n.join(", ");t.push(`const ${r} = getResolvedToolDefinitions(${JSON.stringify(n)}); // ${i}`)}return t.push(""),t.join(`
300
+ `)}function KEe(e){return["// \u2500\u2500 Node Configs (extra instructions, runtime settings) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","const __filename = fileURLToPath(import.meta.url);","const __dirname = dirname(__filename);",`const configPath = join(__dirname, 'workflow-${e}.config.json');`,"const nodeConfigs = existsSync(configPath)"," ? JSON.parse(readFileSync(configPath, 'utf-8'))"," : {};",""].join(`
301
+ `)}function GEe(e,t){let r=["// \u2500\u2500 Node Implementations \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","// Each node's execute function is inlined below.","// Edit any function to customize behavior. The upload command detects","// changes via // @custom markers and persists them to the cloud.",""];for(let n of e){let i=qH(n.id),a=t[n.id]?.customCode;if(a)r.push(`// @custom \u2014 modified from default "${n.nodeType}" template`),r.push(`const ${i}_execute = ${a};`);else{let s=UN(n.nodeType);s?(r.push(`// Default "${n.nodeType}" implementation`),r.push(`const ${i}_execute = ${s};`)):(r.push(`// No template available for "${n.nodeType}" \u2014 using passthrough`),r.push(`const ${i}_execute = async (state) => ({ success: true, output: {}, raw: null });`))}r.push("")}return r.join(`
302
+ `)}function HEe(e,t,r,n,i,a="workflow"){let s=[];s.push("// \u2500\u2500 Graph Builder \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),s.push("export function buildGraph(options = {}) {"),s.push(" const graph = new WorkflowGraph(options);"),s.push(""),s.push(" // Nodes");for(let c of e){let u=qH(c.id);s.push(` graph.addNode('${c.id}', { name: '${c.id}', execute: ${u}_execute });`),s.push(` graph.setNodeType('${c.id}', '${c.nodeType}');`)}s.push(""),s.push(" // Entry point"),s.push(` graph.setEntryPoint('${t}');`),s.push(""),(r.length>0||n.length>0)&&s.push(" // Edges");for(let c of r)s.push(` graph.addEdge('${c.source}', '${c.target}');`);for(let c of n){let u=c.code.split(`
303
+ `).map((l,d)=>d===0?l:` ${l}`).join(`
304
+ `);s.push(` graph.addConditionalEdges('${c.source}', ${u});`)}let o=[];for(let c of e){let u=i.get(c.id);u&&o.push(` '${c.id}': ${u},`)}if(o.length>0){s.push(""),s.push(" graph.resolvedToolsMap = {");for(let c of o)s.push(` ${c}`);s.push(" };")}return s.push(""),s.push(" return graph;"),s.push("}"),s.push(""),s.push("// \u2500\u2500 Exports \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),s.push("export { nodeConfigs };"),s.push(""),s.join(`
305
+ `)}function QEe(e,t){let r=new Map,n=new Map;for(let i of e){let a=t[i.id]?.tools,s;if(Array.isArray(a)&&a.length>0)s=[...a].sort();else{let o=Fb[i.nodeType];o&&o.length>0&&(s=[...o].sort())}if(s){let o=`${s.map(c=>c.replace(/[^a-zA-Z0-9]/g,"")).join("And")}Tools`;r.set(i.id,o),n.has(o)||n.set(o,s)}}return{toolsPerNode:r,toolIdsByVar:n}}function YEe(e,t){let r=[],n=[],i=new Map,a=new Set;for(let s of e){let o=s.source;i.has(o)||i.set(o,[]),i.get(o).push(s)}for(let s of e)if(!t.has(s.source))if(t.has(s.target)){if(a.has(s.target))continue;a.add(s.target);let c=(i.get(s.target)||[]).find(u=>u.data?.conditionalCode||u.conditionalCode);if(c){let u=c.data?.conditionalCode||c.conditionalCode;n.push({source:s.source,code:u})}}else r.push({source:s.source,target:s.target});return{simpleEdges:r,conditionalEdges:n}}function JEe(e,t,r){let n=new Set;for(let a of t)r.has(a.target)||n.add(a.target);let i=e.find(a=>!n.has(a.id));return i?i.id:e[0]?.id}function qH(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}var XEe=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],KH=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],eIe="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",GH="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",LN={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},qN="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",tIe={5:qN,"5module":qN+" export import",6:qN+" const class extends export import super"},HH=/^in(stanceof)?$/,rIe=new RegExp("["+GH+"]"),nIe=new RegExp("["+GH+eIe+"]");function FN(e,t){for(var r=65536,n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function Aa(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&rIe.test(String.fromCharCode(e)):t===!1?!1:FN(e,KH)}function lo(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&nIe.test(String.fromCharCode(e)):t===!1?!1:FN(e,KH)||FN(e,XEe)}var At=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Ri(e,t){return new At(e,{beforeExpr:!0,binop:t})}var Ui={beforeExpr:!0},Bn={startsExpr:!0},KN={};function St(e,t){return t===void 0&&(t={}),t.keyword=e,KN[e]=new At(e,t)}var S={num:new At("num",Bn),regexp:new At("regexp",Bn),string:new At("string",Bn),name:new At("name",Bn),privateId:new At("privateId",Bn),eof:new At("eof"),bracketL:new At("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new At("]"),braceL:new At("{",{beforeExpr:!0,startsExpr:!0}),braceR:new At("}"),parenL:new At("(",{beforeExpr:!0,startsExpr:!0}),parenR:new At(")"),comma:new At(",",Ui),semi:new At(";",Ui),colon:new At(":",Ui),dot:new At("."),question:new At("?",Ui),questionDot:new At("?."),arrow:new At("=>",Ui),template:new At("template"),invalidTemplate:new At("invalidTemplate"),ellipsis:new At("...",Ui),backQuote:new At("`",Bn),dollarBraceL:new At("${",{beforeExpr:!0,startsExpr:!0}),eq:new At("=",{beforeExpr:!0,isAssign:!0}),assign:new At("_=",{beforeExpr:!0,isAssign:!0}),incDec:new At("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new At("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ri("||",1),logicalAND:Ri("&&",2),bitwiseOR:Ri("|",3),bitwiseXOR:Ri("^",4),bitwiseAND:Ri("&",5),equality:Ri("==/!=/===/!==",6),relational:Ri("</>/<=/>=",7),bitShift:Ri("<</>>/>>>",8),plusMin:new At("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ri("%",10),star:Ri("*",10),slash:Ri("/",10),starstar:new At("**",{beforeExpr:!0}),coalesce:Ri("??",1),_break:St("break"),_case:St("case",Ui),_catch:St("catch"),_continue:St("continue"),_debugger:St("debugger"),_default:St("default",Ui),_do:St("do",{isLoop:!0,beforeExpr:!0}),_else:St("else",Ui),_finally:St("finally"),_for:St("for",{isLoop:!0}),_function:St("function",Bn),_if:St("if"),_return:St("return",Ui),_switch:St("switch"),_throw:St("throw",Ui),_try:St("try"),_var:St("var"),_const:St("const"),_while:St("while",{isLoop:!0}),_with:St("with"),_new:St("new",{beforeExpr:!0,startsExpr:!0}),_this:St("this",Bn),_super:St("super",Bn),_class:St("class",Bn),_extends:St("extends",Ui),_export:St("export"),_import:St("import",Bn),_null:St("null",Bn),_true:St("true",Bn),_false:St("false",Bn),_in:St("in",{beforeExpr:!0,binop:7}),_instanceof:St("instanceof",{beforeExpr:!0,binop:7}),_typeof:St("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:St("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:St("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Wn=/\r\n?|\n|\u2028|\u2029/,iIe=new RegExp(Wn.source,"g");function Kl(e){return e===10||e===13||e===8232||e===8233}function QH(e,t,r){r===void 0&&(r=e.length);for(var n=t;n<r;n++){var i=e.charCodeAt(n);if(Kl(i))return n<r-1&&i===13&&e.charCodeAt(n+1)===10?n+2:n+1}return-1}var YH=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,on=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,JH=Object.prototype,aIe=JH.hasOwnProperty,sIe=JH.toString,Gl=Object.hasOwn||(function(e,t){return aIe.call(e,t)}),ZH=Array.isArray||(function(e){return sIe.call(e)==="[object Array]"}),FH=Object.create(null);function uo(e){return FH[e]||(FH[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ds(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var oIe=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ah=function(t,r){this.line=t,this.column=r};ah.prototype.offset=function(t){return new ah(this.line,this.column+t)};var Qb=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function XH(e,t){for(var r=1,n=0;;){var i=QH(e,n,t);if(i<0)return new ah(r,t-n);++r,n=i}}var VN={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},VH=!1;function cIe(e){var t={};for(var r in VN)t[r]=e&&Gl(e,r)?e[r]:VN[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!VH&&typeof console=="object"&&console.warn&&(VH=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
306
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ZH(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}if(ZH(t.onComment)&&(t.onComment=uIe(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function uIe(e,t){return function(r,n,i,a,s,o){var c={type:r?"Block":"Line",value:n,start:i,end:a};e.locations&&(c.loc=new Qb(this,s,o)),e.ranges&&(c.range=[i,a]),t.push(c)}}var wc=1,kc=2,GN=4,e8=8,HN=16,t8=32,Yb=64,r8=128,Sc=256,sh=512,n8=1024,Jb=wc|kc|Sc;function QN(e,t){return kc|(e?GN:0)|(t?e8:0)}var Wb=0,YN=1,fs=2,i8=3,a8=4,s8=5,jr=function(t,r,n){this.options=t=cIe(t),this.sourceFile=t.sourceFile,this.keywords=uo(tIe[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=LN[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=uo(i);var a=(i?i+" ":"")+LN.strict;this.reservedWordsStrict=uo(a),this.reservedWordsStrictBind=uo(a+" "+LN.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
307
+ `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Wn).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=S.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?kc:wc),this.regexpState=null,this.privateNameStack=[]},Mi={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};jr.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Mi.inFunction.get=function(){return(this.currentVarScope().flags&kc)>0};Mi.inGenerator.get=function(){return(this.currentVarScope().flags&e8)>0};Mi.inAsync.get=function(){return(this.currentVarScope().flags&GN)>0};Mi.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(Sc|sh))return!1;if(r&kc)return(r&GN)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Mi.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&wc)};Mi.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Yb)>0||this.options.allowSuperOutsideMethod};Mi.allowDirectSuper.get=function(){return(this.currentThisScope().flags&r8)>0};Mi.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Mi.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(Sc|sh)||r&kc&&!(r&HN))return!0}return!1};Mi.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&n8||!this.inModule&&t&wc)};Mi.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Sc)>0};jr.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,i=0;i<t.length;i++)n=t[i](n);return n};jr.parse=function(t,r){return new this(r,t).parse()};jr.parseExpressionAt=function(t,r,n){var i=new this(n,t,r);return i.nextToken(),i.parseExpression()};jr.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(jr.prototype,Mi);var Pn=jr.prototype,lIe=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Pn.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){on.lastIndex=e,e+=on.exec(this.input)[0].length;var t=lIe.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){on.lastIndex=e+t[0].length;var r=on.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return i===";"||i==="}"||Wn.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,on.lastIndex=e,e+=on.exec(this.input)[0].length,this.input[e]===";"&&e++}};Pn.eat=function(e){return this.type===e?(this.next(),!0):!1};Pn.isContextual=function(e){return this.type===S.name&&this.value===e&&!this.containsEsc};Pn.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Pn.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Pn.canInsertSemicolon=function(){return this.type===S.eof||this.type===S.braceR||Wn.test(this.input.slice(this.lastTokEnd,this.start))};Pn.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Pn.semicolon=function(){!this.eat(S.semi)&&!this.insertSemicolon()&&this.unexpected()};Pn.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Pn.expect=function(e){this.eat(e)||this.unexpected()};Pn.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Xb=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Pn.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};Pn.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};Pn.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};Pn.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var xe=jr.prototype;xe.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==S.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,i=Object.keys(this.undefinedExports);n<i.length;n+=1){var a=i[n];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var JN={kind:"loop"},dIe={kind:"switch"};xe.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;on.lastIndex=this.pos;var t=on.exec(this.input),r=this.pos+t[0].length,n=this.fullCharCodeAt(r);if(n===91||n===92)return!0;if(e)return!1;if(n===123)return!0;if(Aa(n)){var i=r;do r+=n<=65535?1:2;while(lo(n=this.fullCharCodeAt(r)));if(n===92)return!0;var a=this.input.slice(i,r);if(!HH.test(a))return!0}return!1};xe.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;on.lastIndex=this.pos;var e=on.exec(this.input),t=this.pos+e[0].length,r;return!Wn.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(lo(r=this.fullCharCodeAt(t+8))||r===92))};xe.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;on.lastIndex=this.pos;var r=on.exec(this.input),n=this.pos+r[0].length;if(Wn.test(this.input.slice(this.pos,n)))return!1;if(e){var i=n+5,a;if(this.input.slice(n,i)!=="using"||i===this.input.length||lo(a=this.fullCharCodeAt(i))||a===92)return!1;on.lastIndex=i;var s=on.exec(this.input);if(n=i+s[0].length,s&&Wn.test(this.input.slice(i,n)))return!1}var o=this.fullCharCodeAt(n);if(!Aa(o)&&o!==92)return!1;var c=n;do n+=o<=65535?1:2;while(lo(o=this.fullCharCodeAt(n)));if(o===92)return!0;var u=this.input.slice(c,n);return!(HH.test(u)||t&&u==="of")};xe.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};xe.isUsing=function(e){return this.isUsingKeyword(!1,e)};xe.parseStatement=function(e,t,r){var n=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(n=S._var,a="let"),n){case S._break:case S._continue:return this.parseBreakContinueStatement(i,n.keyword);case S._debugger:return this.parseDebuggerStatement(i);case S._do:return this.parseDoStatement(i);case S._for:return this.parseForStatement(i);case S._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case S._class:return e&&this.unexpected(),this.parseClass(i,!0);case S._if:return this.parseIfStatement(i);case S._return:return this.parseReturnStatement(i);case S._switch:return this.parseSwitchStatement(i);case S._throw:return this.parseThrowStatement(i);case S._try:return this.parseTryStatement(i);case S._const:case S._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(i,a);case S._while:return this.parseWhileStatement(i);case S._with:return this.parseWithStatement(i);case S.braceL:return this.parseBlock(!0,i);case S.semi:return this.parseEmptyStatement(i);case S._export:case S._import:if(this.options.ecmaVersion>10&&n===S._import){on.lastIndex=this.pos;var s=on.exec(this.input),o=this.pos+s[0].length,c=this.input.charCodeAt(o);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===S._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var l=this.value,d=this.parseExpression();return n===S.name&&d.type==="Identifier"&&this.eat(S.colon)?this.parseLabeledStatement(i,l,d,e):this.parseExpressionStatement(i,d)}};xe.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(S.semi)||this.insertSemicolon()?e.label=null:this.type!==S.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var i=this.labels[n];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind==="loop")||e.label&&r))break}return n===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};xe.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};xe.parseDoStatement=function(e){return this.next(),this.labels.push(JN),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(S._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(S.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};xe.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(JN),this.enterScope(0),this.expect(S.parenL),this.type===S.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===S._var||this.type===S._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),this.parseForAfterInit(e,n,t)}var a=this.isContextual("let"),s=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var c=this.startNode();return this.next(),o==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(c,!0,o),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(e,c,t)}var u=this.containsEsc,l=new Xb,d=this.start,p=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===S._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===S._in&&this.unexpected(t),e.await=!0):s&&this.options.ecmaVersion>=8&&(p.start===d&&!u&&p.type==="Identifier"&&p.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&s&&this.raise(p.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(p,!1,l),this.checkLValPattern(p),this.parseForIn(e,p)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,p))};xe.parseForAfterInit=function(e,t,r){return(this.type===S._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===S._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};xe.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,ih|(r?0:BN),!1,t)};xe.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(S._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};xe.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(S.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};xe.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(S.braceL),this.labels.push(dIe),this.enterScope(n8);for(var t,r=!1;this.type!==S.braceR;)if(this.type===S._case||this.type===S._default){var n=this.type===S._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(S.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};xe.parseThrowStatement=function(e){return this.next(),Wn.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var pIe=[];xe.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?t8:0),this.checkLValPattern(e,t?a8:fs),this.expect(S.parenR),e};xe.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===S._catch){var t=this.startNode();this.next(),this.eat(S.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(S._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};xe.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};xe.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(JN),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};xe.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};xe.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};xe.parseLabeledStatement=function(e,t,r,n){for(var i=0,a=this.labels;i<a.length;i+=1){var s=a[i];s.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===S._switch?"switch":null,c=this.labels.length-1;c>=0;c--){var u=this.labels[c];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};xe.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};xe.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(S.braceL),e&&this.enterScope(0);this.type!==S.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};xe.parseFor=function(e,t){return e.init=t,this.expect(S.semi),e.test=this.type===S.semi?null:this.parseExpression(),this.expect(S.semi),e.update=this.type===S.parenR?null:this.parseExpression(),this.expect(S.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};xe.parseForIn=function(e,t){var r=this.type===S._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(S.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};xe.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(S.eq)?i.init=this.parseMaybeAssign(t):!n&&r==="const"&&!(this.type===S._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==S._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!n&&i.id.type!=="Identifier"&&!(t&&(this.type===S._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(S.comma))break}return e};xe.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?YN:fs,!1)};var ih=1,BN=2,o8=4;xe.parseFunction=function(e,t,r,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===S.star&&t&BN&&this.unexpected(),e.generator=this.eat(S.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&ih&&(e.id=t&o8&&this.type!==S.name?null:this.parseIdent(),e.id&&!(t&BN)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?YN:fs:i8));var a=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(QN(e.async,e.generator)),t&ih||(e.id=this.type===S.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&ih?"FunctionDeclaration":"FunctionExpression")};xe.parseFunctionParams=function(e){this.expect(S.parenL),e.params=this.parseBindingList(S.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};xe.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(S.braceL);this.type!==S.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(a&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),a=!0):s.key&&s.key.type==="PrivateIdentifier"&&fIe(n,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};xe.parseClassElement=function(e){if(this.eat(S.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,a=!1,s="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(S.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===S.star?o=!0:n="static"}if(r.static=o,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===S.star)&&!this.canInsertSemicolon()?a=!0:n="async"),!n&&(t>=9||!a)&&this.eat(S.star)&&(i=!0),!n&&!a&&!i){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=c:n=c)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===S.parenL||s!=="method"||i||a){var u=!r.static&&Kb(r,"constructor"),l=u&&e;u&&s!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=u?"constructor":s,this.parseClassMethod(r,i,a,l)}else this.parseClassField(r);return r};xe.isClassElementNameStart=function(){return this.type===S.name||this.type===S.privateId||this.type===S.num||this.type===S.string||this.type===S.bracketL||this.type.keyword};xe.parseClassElementName=function(e){this.type===S.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};xe.parseClassMethod=function(e,t,r,n){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Kb(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};xe.parseClassField=function(e){return Kb(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Kb(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(S.eq)?(this.enterScope(sh|Yb),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};xe.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Sc|Yb);this.type!==S.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};xe.parseClassId=function(e,t){this.type===S.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,fs,!1)):(t===!0&&this.unexpected(),e.id=null)};xe.parseClassSuper=function(e){e.superClass=this.eat(S._extends)?this.parseExprSubscripts(null,!1):null};xe.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};xe.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],a=0;a<r.length;++a){var s=r[a];Gl(t,s.name)||(i?i.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}};function fIe(e,t){var r=t.key.name,n=e[r],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),n==="iget"&&i==="iset"||n==="iset"&&i==="iget"||n==="sget"&&i==="sset"||n==="sset"&&i==="sget"?(e[r]="true",!1):n?!0:(e[r]=i,!1)}function Kb(e,t){var r=e.computed,n=e.key;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}xe.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==S.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};xe.parseExport=function(e,t){if(this.next(),this.eat(S.star))return this.parseExportAllDeclaration(e,t);if(this.eat(S._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==S.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,n=e.specifiers;r<n.length;r+=1){var i=n[r];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};xe.parseExportDeclaration=function(e){return this.parseStatement(null)};xe.parseExportDefaultDeclaration=function(){var e;if(this.type===S._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,ih|o8,!1,e)}else if(this.type===S._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};xe.checkExport=function(e,t,r){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Gl(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};xe.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n<i.length;n+=1){var a=i[n];this.checkPatternExport(e,a)}else if(r==="ArrayPattern")for(var s=0,o=t.elements;s<o.length;s+=1){var c=o[s];c&&this.checkPatternExport(e,c)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};xe.checkVariableExport=function(e,t){if(e)for(var r=0,n=t;r<n.length;r+=1){var i=n[r];this.checkPatternExport(e,i.id)}};xe.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};xe.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};xe.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(S.braceL);!this.eat(S.braceR);){if(r)r=!1;else if(this.expect(S.comma),this.afterTrailingComma(S.braceR))break;t.push(this.parseExportSpecifier(e))}return t};xe.parseImport=function(e){return this.next(),this.type===S.string?(e.specifiers=pIe,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===S.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};xe.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,fs),this.finishNode(e,"ImportSpecifier")};xe.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,fs),this.finishNode(e,"ImportDefaultSpecifier")};xe.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,fs),this.finishNode(e,"ImportNamespaceSpecifier")};xe.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===S.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(S.comma)))return e;if(this.type===S.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(S.braceL);!this.eat(S.braceR);){if(t)t=!1;else if(this.expect(S.comma),this.afterTrailingComma(S.braceR))break;e.push(this.parseImportSpecifier())}return e};xe.parseWithClause=function(){var e=[];if(!this.eat(S._with))return e;this.expect(S.braceL);for(var t={},r=!0;!this.eat(S.braceR);){if(r)r=!1;else if(this.expect(S.comma),this.afterTrailingComma(S.braceR))break;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;Gl(t,i)&&this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(n)}return e};xe.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===S.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(S.colon),this.type!==S.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};xe.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===S.string){var e=this.parseLiteral(this.value);return oIe.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};xe.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};xe.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Li=jr.prototype;Li.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};Li.toAssignableList=function(e,t){for(var r=e.length,n=0;n<r;n++){var i=e[n];i&&this.toAssignable(i,t)}if(r){var a=e[r-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};Li.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Li.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==S.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Li.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case S.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(S.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case S.braceL:return this.parseObj(!0)}return this.parseIdent()};Li.parseBindingList=function(e,t,r,n){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(S.comma),t&&this.type===S.comma)i.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===S.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===S.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(n))}return i};Li.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Li.parseBindingListItem=function(e){return e};Li.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(S.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")};Li.checkLValSimple=function(e,t,r){t===void 0&&(t=Wb);var n=t!==Wb;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(t===fs&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(Gl(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==s8&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":n&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return n&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(n?"Binding":"Assigning to")+" rvalue")}};Li.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=Wb),e.type){case"ObjectPattern":for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];this.checkLValInnerPattern(a,t,r)}break;case"ArrayPattern":for(var s=0,o=e.elements;s<o.length;s+=1){var c=o[s];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}};Li.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=Wb),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var ha=function(t,r,n,i,a){this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i,this.generator=!!a},dr={b_stat:new ha("{",!1),b_expr:new ha("{",!0),b_tmpl:new ha("${",!1),p_stat:new ha("(",!1),p_expr:new ha("(",!0),q_tmpl:new ha("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ha("function",!1),f_expr:new ha("function",!0),f_expr_gen:new ha("function",!0,!1,null,!0),f_gen:new ha("function",!1,!1,null,!0)},Hl=jr.prototype;Hl.initialContext=function(){return[dr.b_stat]};Hl.curContext=function(){return this.context[this.context.length-1]};Hl.braceIsBlock=function(e){var t=this.curContext();return t===dr.f_expr||t===dr.f_stat?!0:e===S.colon&&(t===dr.b_stat||t===dr.b_expr)?!t.isExpr:e===S._return||e===S.name&&this.exprAllowed?Wn.test(this.input.slice(this.lastTokEnd,this.start)):e===S._else||e===S.semi||e===S.eof||e===S.parenR||e===S.arrow?!0:e===S.braceL?t===dr.b_stat:e===S._var||e===S._const||e===S.name?!1:!this.exprAllowed};Hl.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Hl.updateContext=function(e){var t,r=this.type;r.keyword&&e===S.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};Hl.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};S.parenR.updateContext=S.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===dr.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};S.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?dr.b_stat:dr.b_expr),this.exprAllowed=!0};S.dollarBraceL.updateContext=function(){this.context.push(dr.b_tmpl),this.exprAllowed=!0};S.parenL.updateContext=function(e){var t=e===S._if||e===S._for||e===S._with||e===S._while;this.context.push(t?dr.p_stat:dr.p_expr),this.exprAllowed=!0};S.incDec.updateContext=function(){};S._function.updateContext=S._class.updateContext=function(e){e.beforeExpr&&e!==S._else&&!(e===S.semi&&this.curContext()!==dr.p_stat)&&!(e===S._return&&Wn.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===S.colon||e===S.braceL)&&this.curContext()===dr.b_stat)?this.context.push(dr.f_expr):this.context.push(dr.f_stat),this.exprAllowed=!1};S.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};S.backQuote.updateContext=function(){this.curContext()===dr.q_tmpl?this.context.pop():this.context.push(dr.q_tmpl),this.exprAllowed=!1};S.star.updateContext=function(e){if(e===S._function){var t=this.context.length-1;this.context[t]===dr.f_expr?this.context[t]=dr.f_expr_gen:this.context[t]=dr.f_gen}this.exprAllowed=!0};S.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==S.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Be=jr.prototype;Be.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n=e.key,i;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&a==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var s=t[i];if(s){var o;a==="init"?o=this.strict&&s.init||s.get||s.set:o=s.init||s[a],o&&this.raiseRecoverable(n.start,"Redefinition of property")}else s=t[i]={init:!1,get:!1,set:!1};s[a]=!0}};Be.parseExpression=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===S.comma){var a=this.startNodeAt(r,n);for(a.expressions=[i];this.eat(S.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return i};Be.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var n=!1,i=-1,a=-1,s=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Xb,n=!0);var o=this.start,c=this.startLoc;(this.type===S.parenL||this.type===S.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var u=this.parseMaybeConditional(e,t);if(r&&(u=r.call(this,u,o,c)),this.type.isAssign){var l=this.startNodeAt(o,c);return l.operator=this.value,this.type===S.eq&&(u=this.toAssignable(u,!1,t)),n||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===S.eq?this.checkLValPattern(u):this.checkLValSimple(u),l.left=u,this.next(),l.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(l,"AssignmentExpression")}else n&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),u};Be.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(S.question)){var a=this.startNodeAt(r,n);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(S.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return i};Be.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,n,-1,e)};Be.parseExprOp=function(e,t,r,n,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==S._in)&&a>n){var s=this.type===S.logicalOR||this.type===S.logicalAND,o=this.type===S.coalesce;o&&(a=S.logicalAND.binop);var c=this.value;this.next();var u=this.start,l=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),u,l,a,i),p=this.buildBinary(t,r,e,d,c,s||o);return(s&&this.type===S.coalesce||o&&(this.type===S.logicalOR||this.type===S.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,t,r,n,i)}return e};Be.buildBinary=function(e,t,r,n,i,a){n.type==="PrivateIdentifier"&&this.raise(n.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=r,s.operator=i,s.right=n,this.finishNode(s,a?"LogicalExpression":"BinaryExpression")};Be.parseMaybeUnary=function(e,t,r,n){var i=this.start,a=this.startLoc,s;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(n),t=!0;else if(this.type.prefix){var o=this.startNode(),c=this.type===S.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,c,n),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&c8(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&WN(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,s=this.finishNode(o,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===S.privateId)(n||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),s=this.parsePrivateIdent(),this.type!==S._in&&this.unexpected();else{if(s=this.parseExprSubscripts(e,n),this.checkExpressionErrors(e))return s;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(i,a);u.operator=this.value,u.prefix=!1,u.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(u,"UpdateExpression")}}if(!r&&this.eat(S.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,s,this.parseMaybeUnary(null,!1,!1,n),"**",!1);else return s};function c8(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&c8(e.expression)}function WN(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&WN(e.expression)||e.type==="ParenthesizedExpression"&&WN(e.expression)}Be.parseExprSubscripts=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var a=this.parseSubscripts(i,r,n,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};Be.parseSubscripts=function(e,t,r,n,i){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,s=!1;;){var o=this.parseSubscript(e,t,r,n,a,s,i);if(o.optional&&(s=!0),o===e||o.type==="ArrowFunctionExpression"){if(s){var c=this.startNodeAt(t,r);c.expression=o,o=this.finishNode(c,"ChainExpression")}return o}e=o}};Be.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(S.arrow)};Be.parseSubscriptAsyncArrow=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,n)};Be.parseSubscript=function(e,t,r,n,i,a,s){var o=this.options.ecmaVersion>=11,c=o&&this.eat(S.questionDot);n&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(S.bracketL);if(u||c&&this.type!==S.parenL&&this.type!==S.backQuote||this.eat(S.dot)){var l=this.startNodeAt(t,r);l.object=e,u?(l.property=this.parseExpression(),this.expect(S.bracketR)):this.type===S.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!u,o&&(l.optional=c),e=this.finishNode(l,"MemberExpression")}else if(!n&&this.eat(S.parenL)){var d=new Xb,p=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var v=this.parseExprList(S.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=p,this.awaitPos=f,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,r,v,s);this.checkExpressionErrors(d,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,r);g.callee=e,g.arguments=v,o&&(g.optional=c),e=this.finishNode(g,"CallExpression")}else if(this.type===S.backQuote){(c||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var h=this.startNodeAt(t,r);h.tag=e,h.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(h,"TaggedTemplateExpression")}return e};Be.parseExprAtom=function(e,t,r){this.type===S.slash&&this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case S._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type===S.parenL&&!this.allowDirectSuper&&this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==S.dot&&this.type!==S.bracketL&&this.type!==S.parenL&&this.unexpected(),this.finishNode(n,"Super");case S._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case S.name:var a=this.start,s=this.startLoc,o=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(S._function))return this.overrideContext(dr.f_expr),this.parseFunction(this.startNodeAt(a,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(S.arrow))return this.parseArrowExpression(this.startNodeAt(a,s),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===S.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(S.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,s),[c],!0,t)}return c;case S.regexp:var u=this.value;return n=this.parseLiteral(u.value),n.regex={pattern:u.pattern,flags:u.flags},n;case S.num:case S.string:return this.parseLiteral(this.value);case S._null:case S._true:case S._false:return n=this.startNode(),n.value=this.type===S._null?null:this.type===S._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case S.parenL:var l=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),d;case S.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(S.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case S.braceL:return this.overrideContext(dr.b_expr),this.parseObj(!1,e);case S._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case S._class:return this.parseClass(this.startNode(),!1);case S._new:return this.parseNew();case S.backQuote:return this.parseTemplate();case S._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};Be.parseExprAtomDefault=function(){this.unexpected()};Be.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===S.parenL&&!e)return this.parseDynamicImport(t);if(this.type===S.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};Be.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(S.parenR)?e.options=null:(this.expect(S.comma),this.afterTrailingComma(S.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(S.parenR)||(this.expect(S.comma),this.afterTrailingComma(S.parenR)||this.unexpected())));else if(!this.eat(S.parenR)){var t=this.start;this.eat(S.comma)&&this.eat(S.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};Be.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};Be.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};Be.parseParenExpression=function(){this.expect(S.parenL);var e=this.parseExpression();return this.expect(S.parenR),e};Be.shouldParseArrow=function(e){return!this.canInsertSemicolon()};Be.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,o=this.startLoc,c=[],u=!0,l=!1,d=new Xb,p=this.yieldPos,f=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==S.parenR;)if(u?u=!1:this.expect(S.comma),a&&this.afterTrailingComma(S.parenR,!0)){l=!0;break}else if(this.type===S.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===S.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var v=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(S.parenR),e&&this.shouldParseArrow(c)&&this.eat(S.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(r,n,c,t);(!c.length||l)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?(i=this.startNodeAt(s,o),i.expressions=c,this.finishNodeAt(i,"SequenceExpression",v,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var h=this.startNodeAt(r,n);return h.expression=i,this.finishNode(h,"ParenthesizedExpression")}else return i};Be.parseParenItem=function(e){return e};Be.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var mIe=[];Be.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===S.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),this.eat(S.parenL)?e.arguments=this.parseExprList(S.parenR,this.options.ecmaVersion>=8,!1):e.arguments=mIe,this.finishNode(e,"NewExpression")};Be.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===S.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
308
+ `),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
309
+ `),cooked:this.value},this.next(),r.tail=this.type===S.backQuote,this.finishNode(r,"TemplateElement")};Be.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===S.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(S.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(S.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};Be.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===S.name||this.type===S.num||this.type===S.string||this.type===S.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===S.star)&&!Wn.test(this.input.slice(this.lastTokEnd,this.start))};Be.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(S.braceR);){if(n)n=!1;else if(this.expect(S.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(S.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),r.properties.push(a)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};Be.parseProperty=function(e,t){var r=this.startNode(),n,i,a,s;if(this.options.ecmaVersion>=9&&this.eat(S.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===S.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===S.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(a=this.start,s=this.startLoc),e||(n=this.eat(S.star)));var o=this.containsEsc;return this.parsePropertyName(r),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(S.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,n,i,a,s,t,o),this.finishNode(r,"Property")};Be.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var n=e.value.start;e.kind==="get"?this.raiseRecoverable(n,"getter should have no params"):this.raiseRecoverable(n,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};Be.parsePropertyValue=function(e,t,r,n,i,a,s,o){(r||n)&&this.type===S.colon&&this.unexpected(),this.eat(S.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===S.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(r,n),e.kind="init"):!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==S.comma&&this.type!==S.braceR&&this.type!==S.eq?((r||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===S.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};Be.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(S.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(S.bracketR),e.key;e.computed=!1}return e.key=this.type===S.num||this.type===S.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Be.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};Be.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(QN(t,n.generator)|Yb|(r?r8:0)),this.expect(S.parenL),n.params=this.parseBindingList(S.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(n,"FunctionExpression")};Be.parseArrowExpression=function(e,t,r,n){var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(QN(r,!1)|HN),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};Be.parseFunctionBody=function(e,t,r,n){var i=t&&this.type!==S.braceL,a=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||o)&&(s=this.strictDirective(this.end),s&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var c=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!a&&!s&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,s8),e.body=this.parseBlock(!1,void 0,s&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()};Be.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(n.type!=="Identifier")return!1}return!0};Be.checkParams=function(e,t){for(var r=Object.create(null),n=0,i=e.params;n<i.length;n+=1){var a=i[n];this.checkLValInnerPattern(a,YN,t?null:r)}};Be.parseExprList=function(e,t,r,n){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(S.comma),t&&this.afterTrailingComma(e))break;var s=void 0;r&&this.type===S.comma?s=null:this.type===S.ellipsis?(s=this.parseSpread(n),n&&this.type===S.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):s=this.parseMaybeAssign(!1,n),i.push(s)}return i};Be.checkUnreserved=function(e){var t=e.start,r=e.end,n=e.name;if(this.inGenerator&&n==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&n==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Jb)&&n==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(n==="arguments"||n==="await")&&this.raise(t,"Cannot use "+n+" in class static initialization block"),this.keywords.test(n)&&this.raise(t,"Unexpected keyword '"+n+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;i.test(n)&&(!this.inAsync&&n==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+n+"' is reserved"))}};Be.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};Be.parseIdentNode=function(){var e=this.startNode();return this.type===S.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=S.name):this.unexpected(),e};Be.parsePrivateIdent=function(){var e=this.startNode();return this.type===S.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};Be.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===S.semi||this.canInsertSemicolon()||this.type!==S.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(S.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};Be.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Gb=jr.prototype;Gb.raise=function(e,t){var r=XH(this.input,e);t+=" ("+r.line+":"+r.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n.raisedAt=this.pos,n};Gb.raiseRecoverable=Gb.raise;Gb.curPosition=function(){if(this.options.locations)return new ah(this.curLine,this.pos-this.lineStart)};var po=jr.prototype,hIe=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};po.enterScope=function(e){this.scopeStack.push(new hIe(e))};po.exitScope=function(){this.scopeStack.pop()};po.treatFunctionsAsVarInScope=function(e){return e.flags&kc||!this.inModule&&e.flags&wc};po.declareName=function(e,t,r){var n=!1;if(t===fs){var i=this.currentScope();n=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&wc&&delete this.undefinedExports[e]}else if(t===a8){var a=this.currentScope();a.lexical.push(e)}else if(t===i8){var s=this.currentScope();this.treatFunctionsAsVar?n=s.lexical.indexOf(e)>-1:n=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var c=this.scopeStack[o];if(c.lexical.indexOf(e)>-1&&!(c.flags&t8&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){n=!0;break}if(c.var.push(e),this.inModule&&c.flags&wc&&delete this.undefinedExports[e],c.flags&Jb)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};po.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};po.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};po.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Jb|sh|Sc))return t}};po.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Jb|sh|Sc)&&!(t.flags&HN))return t}};var ex=function(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new Qb(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},oh=jr.prototype;oh.startNode=function(){return new ex(this,this.start,this.startLoc)};oh.startNodeAt=function(e,t){return new ex(this,e,t)};function u8(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}oh.finishNode=function(e,t){return u8.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};oh.finishNodeAt=function(e,t,r,n){return u8.call(this,e,t,r,n)};oh.copyNode=function(e){var t=new ex(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var gIe="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",l8="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",d8=l8+" Extended_Pictographic",p8=d8,f8=p8+" EBase EComp EMod EPres ExtPict",m8=f8,vIe=m8,yIe={9:l8,10:d8,11:p8,12:f8,13:m8,14:vIe},_Ie="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bIe={9:"",10:"",11:"",12:"",13:"",14:_Ie},BH="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",h8="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",g8=h8+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",v8=g8+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",y8=v8+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",_8=y8+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",xIe=_8+" "+gIe,wIe={9:h8,10:g8,11:v8,12:y8,13:_8,14:xIe},b8={};function kIe(e){var t=b8[e]={binary:uo(yIe[e]+" "+BH),binaryOfStrings:uo(bIe[e]),nonBinary:{General_Category:uo(BH),Script:uo(wIe[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(Bb=0,ZN=[9,10,11,12,13,14];Bb<ZN.length;Bb+=1)WH=ZN[Bb],kIe(WH);var WH,Bb,ZN,be=jr.prototype,Hb=function(t,r){this.parent=t,this.base=r||this};Hb.prototype.separatedFrom=function(t){for(var r=this;r;r=r.parent)for(var n=t;n;n=n.parent)if(r.base===n.base&&r!==n)return!0;return!1};Hb.prototype.sibling=function(){return new Hb(this.parent,this.base)};var Ra=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=b8[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Ra.prototype.reset=function(t,r,n){var i=n.indexOf("v")!==-1,a=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};Ra.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Ra.prototype.at=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return-1;var a=n.charCodeAt(t);if(!(r||this.switchU)||a<=55295||a>=57344||t+1>=i)return a;var s=n.charCodeAt(t+1);return s>=56320&&s<=57343?(a<<10)+s-56613888:a};Ra.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var n=this.source,i=n.length;if(t>=i)return i;var a=n.charCodeAt(t),s;return!(r||this.switchU)||a<=55295||a>=57344||t+1>=i||(s=n.charCodeAt(t+1))<56320||s>57343?t+1:t+2};Ra.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Ra.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Ra.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Ra.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};Ra.prototype.eatChars=function(t,r){r===void 0&&(r=!1);for(var n=this.pos,i=0,a=t;i<a.length;i+=1){var s=a[i],o=this.at(n,r);if(o===-1||o!==s)return!1;n=this.nextIndex(n,r)}return this.pos=n,!0};be.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,n=!1,i=!1,a=0;a<r.length;a++){var s=r.charAt(a);t.indexOf(s)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(s,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),s==="u"&&(n=!0),s==="v"&&(i=!0)}this.options.ecmaVersion>=15&&n&&i&&this.raise(e.start,"Invalid regular expression flag")};function SIe(e){for(var t in e)return!0;return!1}be.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&SIe(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};be.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var n=r[t];e.groupNames[n]||e.raise("Invalid named capture referenced")}};be.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Hb(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};be.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};be.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};be.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1};be.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};be.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};be.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<n&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1};be.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};be.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};be.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var r=this.regexp_eatModifiers(e),n=e.eat(45);if(r||n){for(var i=0;i<r.length;i++){var a=r.charAt(i);r.indexOf(a,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(n){var s=this.regexp_eatModifiers(e);!r&&!s&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var o=0;o<s.length;o++){var c=s.charAt(o);(s.indexOf(c,o+1)>-1||r.indexOf(c)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};be.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};be.regexp_eatModifiers=function(e){for(var t="",r=0;(r=e.current())!==-1&&$Ie(r);)t+=ds(r),e.advance();return t};function $Ie(e){return e===105||e===109||e===115}be.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};be.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};be.regexp_eatSyntaxCharacter=function(e){var t=e.current();return x8(t)?(e.lastIntValue=t,e.advance(),!0):!1};function x8(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}be.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!x8(r);)e.advance();return e.pos!==t};be.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};be.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var n=0,i=r;n<i.length;n+=1){var a=i[n];a.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};be.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};be.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ds(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ds(e.lastIntValue);return!0}return!1};be.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),EIe(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function EIe(e){return Aa(e,!0)||e===36||e===95}be.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),IIe(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function IIe(e){return lo(e,!0)||e===36||e===95||e===8204||e===8205}be.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};be.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};be.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};be.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};be.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};be.regexp_eatZero=function(e){return e.current()===48&&!tx(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};be.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};be.regexp_eatControlLetter=function(e){var t=e.current();return w8(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function w8(e){return e>=65&&e<=90||e>=97&&e<=122}be.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&PIe(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function PIe(e){return e>=0&&e<=1114111}be.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};be.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var k8=0,ps=1,Di=2;be.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(TIe(t))return e.lastIntValue=-1,e.advance(),ps;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&n===Di&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return k8};function TIe(e){return e===100||e===68||e===115||e===83||e===119||e===87}be.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),ps}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return k8};be.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){Gl(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")};be.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return ps;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Di;e.raise("Invalid property name")};be.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";S8(t=e.current());)e.lastStringValue+=ds(t),e.advance();return e.lastStringValue!==""};function S8(e){return w8(e)||e===95}be.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";OIe(t=e.current());)e.lastStringValue+=ds(t),e.advance();return e.lastStringValue!==""};function OIe(e){return S8(e)||tx(e)}be.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};be.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&r===Di&&e.raise("Negated character class may contain strings"),!0}return!1};be.regexp_classContents=function(e){return e.current()===93?ps:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),ps)};be.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}};be.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||I8(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1};be.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};be.regexp_classSetExpression=function(e){var t=ps,r;if(!this.regexp_eatClassSetRange(e))if(r=this.regexp_eatClassSetOperand(e)){r===Di&&(t=Di);for(var n=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){r!==Di&&(t=ps);continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(r=this.regexp_eatClassSetOperand(e),!r)return t;r===Di&&(t=Di)}};be.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return r!==-1&&n!==-1&&r>n&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};be.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?ps:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};be.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return r&&n===Di&&e.raise("Negated character class may contain strings"),n;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};be.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};be.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Di&&(t=Di);return t};be.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?ps:Di};be.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var r=e.current();return r<0||r===e.lookahead()&&zIe(r)||CIe(r)?!1:(e.advance(),e.lastIntValue=r,!0)};function zIe(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function CIe(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}be.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return NIe(t)?(e.lastIntValue=t,e.advance(),!0):!1};function NIe(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}be.regexp_eatClassControlLetter=function(e){var t=e.current();return tx(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};be.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};be.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;tx(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function tx(e){return e>=48&&e<=57}be.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;$8(r=e.current());)e.lastIntValue=16*e.lastIntValue+E8(r),e.advance();return e.pos!==t};function $8(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function E8(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}be.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};be.regexp_eatOctalDigit=function(e){var t=e.current();return I8(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function I8(e){return e>=48&&e<=55}be.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n<t;++n){var i=e.current();if(!$8(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+E8(i),e.advance()}return!0};var XN=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Qb(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},gt=jr.prototype;gt.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new XN(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};gt.getToken=function(){return this.next(),new XN(this)};typeof Symbol<"u"&&(gt[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===S.eof,value:t}}}});gt.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(S.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};gt.readToken=function(e){return Aa(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};gt.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var r=this.input.charCodeAt(e+1);return r<=56319||r>=57344?t:(t<<10)+r-56613888};gt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};gt.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var n=void 0,i=t;(n=QH(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};gt.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Kl(n);)n=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};gt.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&YH.test(String.fromCharCode(e)))++this.pos;else break e}}};gt.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)};gt.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(S.ellipsis)):(++this.pos,this.finishToken(S.dot))};gt.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(S.assign,2):this.finishOp(S.slash,1)};gt.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?S.star:S.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=S.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(S.assign,r+1):this.finishOp(n,r)};gt.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(S.assign,3)}return this.finishOp(e===124?S.logicalOR:S.logicalAND,2)}return t===61?this.finishOp(S.assign,2):this.finishOp(e===124?S.bitwiseOR:S.bitwiseAND,1)};gt.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(S.assign,2):this.finishOp(S.bitwiseXOR,1)};gt.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Wn.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(S.incDec,2):t===61?this.finishOp(S.assign,2):this.finishOp(S.plusMin,1)};gt.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(S.assign,r+1):this.finishOp(S.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(S.relational,r))};gt.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(S.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(S.arrow)):this.finishOp(e===61?S.eq:S.prefix,1)};gt.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(S.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(S.assign,3)}return this.finishOp(S.coalesce,2)}}return this.finishOp(S.question,1)};gt.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Aa(t,!0)||t===92))return this.finishToken(S.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ds(t)+"'")};gt.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(S.parenL);case 41:return++this.pos,this.finishToken(S.parenR);case 59:return++this.pos,this.finishToken(S.semi);case 44:return++this.pos,this.finishToken(S.comma);case 91:return++this.pos,this.finishToken(S.bracketL);case 93:return++this.pos,this.finishToken(S.bracketR);case 123:return++this.pos,this.finishToken(S.braceL);case 125:return++this.pos,this.finishToken(S.braceR);case 58:return++this.pos,this.finishToken(S.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(S.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(S.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ds(e)+"'")};gt.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};gt.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(Wn.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var a=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(a);var o=this.regexpState||(this.regexpState=new Ra(this));o.reset(r,i,s),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var c=null;try{c=new RegExp(i,s)}catch{}return this.finishToken(S.regexp,{pattern:i,flags:s,value:c})};gt.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,a=this.pos,s=0,o=0,c=0,u=t??1/0;c<u;++c,++this.pos){var l=this.input.charCodeAt(this.pos),d=void 0;if(n&&l===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),o===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),c===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=l;continue}if(l>=97?d=l-97+10:l>=65?d=l-65+10:l>=48&&l<=57?d=l-48:d=1/0,d>=e)break;o=l,s=s*e+d}return n&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:s};function jIe(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function P8(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}gt.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=P8(this.input.slice(t,this.pos)),++this.pos):Aa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(S.num,r)};gt.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var i=P8(this.input.slice(t,this.pos));return++this.pos,Aa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(S.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),Aa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=jIe(this.input.slice(t,this.pos),r);return this.finishToken(S.num,a)};gt.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};gt.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):n===8232||n===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Kl(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(S.string,t)};var T8={};gt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===T8)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};gt.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw T8;this.raise(e,t)};gt.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===S.template||this.type===S.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(S.dollarBraceL)):(++this.pos,this.finishToken(S.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(S.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Kl(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
310
+ `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};gt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(S.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
311
+ `&&++this.pos;case`
312
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};gt.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
313
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ds(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Kl(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};gt.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};gt.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(lo(i,n))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?Aa:lo)(s,n)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=ds(s),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};gt.readWord=function(){var e=this.readWord1(),t=S.name;return this.keywords.test(e)&&(t=KN[e]),this.finishToken(t,e)};var AIe="8.16.0";jr.acorn={Parser:jr,version:AIe,defaultOptions:VN,Position:ah,SourceLocation:Qb,getLineInfo:XH,Node:ex,TokenType:At,tokTypes:S,keywordTypes:KN,TokContext:ha,tokContexts:dr,isIdentifierChar:lo,isIdentifierStart:Aa,Token:XN,isNewLine:Kl,lineBreak:Wn,lineBreakG:iIe,nonASCIIwhitespace:YH};function O8(e,t){return jr.parse(e,t)}function z8(e,t,r,n,i){r||(r=ae),(function a(s,o,c){var u=c||s.type;UIe(r,u,s,o,a),t[u]&&t[u](s,o)})(e,n,i)}function ej(e,t,r){r(e,t)}function $c(e,t,r){}function UIe(e,t,r,n,i){if(e[t]==null)throw new Error("No walker function defined for node type "+t);e[t](r,n,i)}var ae={};ae.Program=ae.BlockStatement=ae.StaticBlock=function(e,t,r){for(var n=0,i=e.body;n<i.length;n+=1){var a=i[n];r(a,t,"Statement")}};ae.Statement=ej;ae.EmptyStatement=$c;ae.ExpressionStatement=ae.ParenthesizedExpression=ae.ChainExpression=function(e,t,r){return r(e.expression,t,"Expression")};ae.IfStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Statement"),e.alternate&&r(e.alternate,t,"Statement")};ae.LabeledStatement=function(e,t,r){return r(e.body,t,"Statement")};ae.BreakStatement=ae.ContinueStatement=$c;ae.WithStatement=function(e,t,r){r(e.object,t,"Expression"),r(e.body,t,"Statement")};ae.SwitchStatement=function(e,t,r){r(e.discriminant,t,"Expression");for(var n=0,i=e.cases;n<i.length;n+=1){var a=i[n];r(a,t)}};ae.SwitchCase=function(e,t,r){e.test&&r(e.test,t,"Expression");for(var n=0,i=e.consequent;n<i.length;n+=1){var a=i[n];r(a,t,"Statement")}};ae.ReturnStatement=ae.YieldExpression=ae.AwaitExpression=function(e,t,r){e.argument&&r(e.argument,t,"Expression")};ae.ThrowStatement=ae.SpreadElement=function(e,t,r){return r(e.argument,t,"Expression")};ae.TryStatement=function(e,t,r){r(e.block,t,"Statement"),e.handler&&r(e.handler,t),e.finalizer&&r(e.finalizer,t,"Statement")};ae.CatchClause=function(e,t,r){e.param&&r(e.param,t,"Pattern"),r(e.body,t,"Statement")};ae.WhileStatement=ae.DoWhileStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.body,t,"Statement")};ae.ForStatement=function(e,t,r){e.init&&r(e.init,t,"ForInit"),e.test&&r(e.test,t,"Expression"),e.update&&r(e.update,t,"Expression"),r(e.body,t,"Statement")};ae.ForInStatement=ae.ForOfStatement=function(e,t,r){r(e.left,t,"ForInit"),r(e.right,t,"Expression"),r(e.body,t,"Statement")};ae.ForInit=function(e,t,r){e.type==="VariableDeclaration"?r(e,t):r(e,t,"Expression")};ae.DebuggerStatement=$c;ae.FunctionDeclaration=function(e,t,r){return r(e,t,"Function")};ae.VariableDeclaration=function(e,t,r){for(var n=0,i=e.declarations;n<i.length;n+=1){var a=i[n];r(a,t)}};ae.VariableDeclarator=function(e,t,r){r(e.id,t,"Pattern"),e.init&&r(e.init,t,"Expression")};ae.Function=function(e,t,r){e.id&&r(e.id,t,"Pattern");for(var n=0,i=e.params;n<i.length;n+=1){var a=i[n];r(a,t,"Pattern")}r(e.body,t,e.expression?"Expression":"Statement")};ae.Pattern=function(e,t,r){e.type==="Identifier"?r(e,t,"VariablePattern"):e.type==="MemberExpression"?r(e,t,"MemberPattern"):r(e,t)};ae.VariablePattern=$c;ae.MemberPattern=ej;ae.RestElement=function(e,t,r){return r(e.argument,t,"Pattern")};ae.ArrayPattern=function(e,t,r){for(var n=0,i=e.elements;n<i.length;n+=1){var a=i[n];a&&r(a,t,"Pattern")}};ae.ObjectPattern=function(e,t,r){for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];a.type==="Property"?(a.computed&&r(a.key,t,"Expression"),r(a.value,t,"Pattern")):a.type==="RestElement"&&r(a.argument,t,"Pattern")}};ae.Expression=ej;ae.ThisExpression=ae.Super=ae.MetaProperty=$c;ae.ArrayExpression=function(e,t,r){for(var n=0,i=e.elements;n<i.length;n+=1){var a=i[n];a&&r(a,t,"Expression")}};ae.ObjectExpression=function(e,t,r){for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];r(a,t)}};ae.FunctionExpression=ae.ArrowFunctionExpression=ae.FunctionDeclaration;ae.SequenceExpression=function(e,t,r){for(var n=0,i=e.expressions;n<i.length;n+=1){var a=i[n];r(a,t,"Expression")}};ae.TemplateLiteral=function(e,t,r){for(var n=0,i=e.quasis;n<i.length;n+=1){var a=i[n];r(a,t)}for(var s=0,o=e.expressions;s<o.length;s+=1){var c=o[s];r(c,t,"Expression")}};ae.TemplateElement=$c;ae.UnaryExpression=ae.UpdateExpression=function(e,t,r){r(e.argument,t,"Expression")};ae.BinaryExpression=ae.LogicalExpression=function(e,t,r){r(e.left,t,"Expression"),r(e.right,t,"Expression")};ae.AssignmentExpression=ae.AssignmentPattern=function(e,t,r){r(e.left,t,"Pattern"),r(e.right,t,"Expression")};ae.ConditionalExpression=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Expression"),r(e.alternate,t,"Expression")};ae.NewExpression=ae.CallExpression=function(e,t,r){if(r(e.callee,t,"Expression"),e.arguments)for(var n=0,i=e.arguments;n<i.length;n+=1){var a=i[n];r(a,t,"Expression")}};ae.MemberExpression=function(e,t,r){r(e.object,t,"Expression"),e.computed&&r(e.property,t,"Expression")};ae.ExportNamedDeclaration=ae.ExportDefaultDeclaration=function(e,t,r){if(e.declaration&&r(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&r(e.source,t,"Expression"),e.attributes)for(var n=0,i=e.attributes;n<i.length;n+=1){var a=i[n];r(a,t)}};ae.ExportAllDeclaration=function(e,t,r){if(e.exported&&r(e.exported,t),r(e.source,t,"Expression"),e.attributes)for(var n=0,i=e.attributes;n<i.length;n+=1){var a=i[n];r(a,t)}};ae.ImportAttribute=function(e,t,r){r(e.value,t,"Expression")};ae.ImportDeclaration=function(e,t,r){for(var n=0,i=e.specifiers;n<i.length;n+=1){var a=i[n];r(a,t)}if(r(e.source,t,"Expression"),e.attributes)for(var s=0,o=e.attributes;s<o.length;s+=1){var c=o[s];r(c,t)}};ae.ImportExpression=function(e,t,r){r(e.source,t,"Expression"),e.options&&r(e.options,t,"Expression")};ae.ImportSpecifier=ae.ImportDefaultSpecifier=ae.ImportNamespaceSpecifier=ae.Identifier=ae.PrivateIdentifier=ae.Literal=$c;ae.TaggedTemplateExpression=function(e,t,r){r(e.tag,t,"Expression"),r(e.quasi,t,"Expression")};ae.ClassDeclaration=ae.ClassExpression=function(e,t,r){return r(e,t,"Class")};ae.Class=function(e,t,r){e.id&&r(e.id,t,"Pattern"),e.superClass&&r(e.superClass,t,"Expression"),r(e.body,t)};ae.ClassBody=function(e,t,r){for(var n=0,i=e.body;n<i.length;n+=1){var a=i[n];r(a,t)}};ae.MethodDefinition=ae.PropertyDefinition=ae.Property=function(e,t,r){e.computed&&r(e.key,t,"Expression"),e.value&&r(e.value,t,"Expression")};function MIe(e){if(!e||typeof e!="string")return!1;try{let t=e.trimStart().startsWith("async")?`const __fn = ${e}`:e,r=O8(t,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideModules:!0}),n=!1;return z8(r,{CallExpression(i){if(n)return;let a=i.callee;a.type==="Identifier"&&a.name==="invokeAgent"&&(n=!0),a.type==="MemberExpression"&&a.property.type==="Identifier"&&a.property.name==="invokeAgent"&&(n=!0)}}),n}catch{return!0}}ys();Wl();export{un as AgentStrategy,ma as CompilationError,th as ConditionalNode,Fb as NODE_DEFAULT_TOOLS,bc as Node,Xl as OutputParser,M8 as SchemaTypes,rh as WorkflowGraph,Jl as WorkflowState,UEe as compileGraph,MEe as extractSteps,FEe as generateNodeConfigsJson,ZEe as generateWorkflowCode,zN as getAgentStrategy,ph as getAllSkills,RN as getNodeImpl,UN as getNodeTemplate,DN as getResolvedToolDefinitions,Ar as getSkill,MIe as hasAgentCall,Zb as hasNode,mj as hasSkill,zH as invokeAgent,CEe as listNodeTypes,hj as listSkillIds,MH as registerNode,fj as registerSkill,MN as resolveNodeTools,DEe as validateGraphConfig};
314
+ /*! Bundled license information:
315
+
316
+ mime-db/index.js:
317
+ (*!
318
+ * mime-db
319
+ * Copyright(c) 2014 Jonathan Ong
320
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
321
+ * MIT Licensed
322
+ *)
323
+
324
+ mime-types/index.js:
325
+ (*!
326
+ * mime-types
327
+ * Copyright(c) 2014 Jonathan Ong
328
+ * Copyright(c) 2015 Douglas Christopher Wilson
329
+ * MIT Licensed
330
+ *)
331
+ */