@baocang/zentao-cli 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,135 +1,379 @@
1
- import{createRequire as Lx}from"node:module";var Ix=Object.create;var{getPrototypeOf:Ux,defineProperty:HU,getOwnPropertyNames:Bx}=Object;var zx=Object.prototype.hasOwnProperty;function qx($){return this[$]}var Hx,Kx,eJ=($,D,X)=>{var G=$!=null&&typeof $==="object";if(G){var J=D?Hx??=new WeakMap:Kx??=new WeakMap,Y=J.get($);if(Y)return Y}X=$!=null?Ix(Ux($)):{};let Q=D||!$||!$.__esModule?HU(X,"default",{value:$,enumerable:!0}):X;for(let W of Bx($))if(!zx.call(Q,W))HU(Q,W,{get:qx.bind($,W),enumerable:!0});if(G)J.set($,Q);return Q};var N=($,D)=>()=>(D||$((D={exports:{}}).exports,D),D.exports);var Vx=($)=>$;function wx($,D){this[$]=Vx.bind(null,D)}var X4=($,D)=>{for(var X in D)HU($,X,{get:D[X],enumerable:!0,configurable:!0,set:wx.bind(D,X)})};var S4=Lx(import.meta.url);var $9=N((Ox)=>{class KU extends Error{constructor($,D,X){super(X);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=D,this.exitCode=$,this.nestedError=void 0}}class Ib extends KU{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}Ox.CommanderError=KU;Ox.InvalidArgumentError=Ib});var G3=N((Mx)=>{var{InvalidArgumentError:jx}=$9();class Ub{constructor($,D){switch(this.description=D||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue($,D){if(D===this.defaultValue||!Array.isArray(D))return[$];return D.concat($)}default($,D){return this.defaultValue=$,this.defaultValueDescription=D,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(D,X)=>{if(!this.argChoices.includes(D))throw new jx(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(D,X);return D},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function Ax($){let D=$.name()+($.variadic===!0?"...":"");return $.required?"<"+D+">":"["+D+"]"}Mx.Argument=Ub;Mx.humanReadableArgName=Ax});var VU=N((Nx)=>{var{humanReadableArgName:_x}=G3();class Bb{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext($){this.helpWidth=this.helpWidth??$.helpWidth??80}visibleCommands($){let D=$.commands.filter((G)=>!G._hidden),X=$._getHelpCommand();if(X&&!X._hidden)D.push(X);if(this.sortSubcommands)D.sort((G,J)=>{return G.name().localeCompare(J.name())});return D}compareOptions($,D){let X=(G)=>{return G.short?G.short.replace(/^-/,""):G.long.replace(/^--/,"")};return X($).localeCompare(X(D))}visibleOptions($){let D=$.options.filter((G)=>!G.hidden),X=$._getHelpOption();if(X&&!X.hidden){let G=X.short&&$._findOption(X.short),J=X.long&&$._findOption(X.long);if(!G&&!J)D.push(X);else if(X.long&&!J)D.push($.createOption(X.long,X.description));else if(X.short&&!G)D.push($.createOption(X.short,X.description))}if(this.sortOptions)D.sort(this.compareOptions);return D}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let D=[];for(let X=$.parent;X;X=X.parent){let G=X.options.filter((J)=>!J.hidden);D.push(...G)}if(this.sortOptions)D.sort(this.compareOptions);return D}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((D)=>{D.description=D.description||$._argsDescription[D.name()]||""});if($.registeredArguments.find((D)=>D.description))return $.registeredArguments;return[]}subcommandTerm($){let D=$.registeredArguments.map((X)=>_x(X)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(D?" "+D:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,D){return D.visibleCommands($).reduce((X,G)=>{return Math.max(X,this.displayWidth(D.styleSubcommandTerm(D.subcommandTerm(G))))},0)}longestOptionTermLength($,D){return D.visibleOptions($).reduce((X,G)=>{return Math.max(X,this.displayWidth(D.styleOptionTerm(D.optionTerm(G))))},0)}longestGlobalOptionTermLength($,D){return D.visibleGlobalOptions($).reduce((X,G)=>{return Math.max(X,this.displayWidth(D.styleOptionTerm(D.optionTerm(G))))},0)}longestArgumentTermLength($,D){return D.visibleArguments($).reduce((X,G)=>{return Math.max(X,this.displayWidth(D.styleArgumentTerm(D.argumentTerm(G))))},0)}commandUsage($){let D=$._name;if($._aliases[0])D=D+"|"+$._aliases[0];let X="";for(let G=$.parent;G;G=G.parent)X=G.name()+" "+X;return X+D+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let D=[];if($.argChoices)D.push(`choices: ${$.argChoices.map((X)=>JSON.stringify(X)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")D.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)D.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)D.push(`env: ${$.envVar}`);if(D.length>0)return`${$.description} (${D.join(", ")})`;return $.description}argumentDescription($){let D=[];if($.argChoices)D.push(`choices: ${$.argChoices.map((X)=>JSON.stringify(X)).join(", ")}`);if($.defaultValue!==void 0)D.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(D.length>0){let X=`(${D.join(", ")})`;if($.description)return`${$.description} ${X}`;return X}return $.description}formatHelp($,D){let X=D.padWidth($,D),G=D.helpWidth??80;function J(B,H){return D.formatItem(B,X,H,D)}let Y=[`${D.styleTitle("Usage:")} ${D.styleUsage(D.commandUsage($))}`,""],Q=D.commandDescription($);if(Q.length>0)Y=Y.concat([D.boxWrap(D.styleCommandDescription(Q),G),""]);let W=D.visibleArguments($).map((B)=>{return J(D.styleArgumentTerm(D.argumentTerm(B)),D.styleArgumentDescription(D.argumentDescription(B)))});if(W.length>0)Y=Y.concat([D.styleTitle("Arguments:"),...W,""]);let I=D.visibleOptions($).map((B)=>{return J(D.styleOptionTerm(D.optionTerm(B)),D.styleOptionDescription(D.optionDescription(B)))});if(I.length>0)Y=Y.concat([D.styleTitle("Options:"),...I,""]);if(D.showGlobalOptions){let B=D.visibleGlobalOptions($).map((H)=>{return J(D.styleOptionTerm(D.optionTerm(H)),D.styleOptionDescription(D.optionDescription(H)))});if(B.length>0)Y=Y.concat([D.styleTitle("Global Options:"),...B,""])}let U=D.visibleCommands($).map((B)=>{return J(D.styleSubcommandTerm(D.subcommandTerm(B)),D.styleSubcommandDescription(D.subcommandDescription(B)))});if(U.length>0)Y=Y.concat([D.styleTitle("Commands:"),...U,""]);return Y.join(`
2
- `)}displayWidth($){return zb($).length}styleTitle($){return $}styleUsage($){return $.split(" ").map((D)=>{if(D==="[options]")return this.styleOptionText(D);if(D==="[command]")return this.styleSubcommandText(D);if(D[0]==="["||D[0]==="<")return this.styleArgumentText(D);return this.styleCommandText(D)}).join(" ")}styleCommandDescription($){return this.styleDescriptionText($)}styleOptionDescription($){return this.styleDescriptionText($)}styleSubcommandDescription($){return this.styleDescriptionText($)}styleArgumentDescription($){return this.styleDescriptionText($)}styleDescriptionText($){return $}styleOptionTerm($){return this.styleOptionText($)}styleSubcommandTerm($){return $.split(" ").map((D)=>{if(D==="[options]")return this.styleOptionText(D);if(D[0]==="["||D[0]==="<")return this.styleArgumentText(D);return this.styleSubcommandText(D)}).join(" ")}styleArgumentTerm($){return this.styleArgumentText($)}styleOptionText($){return $}styleArgumentText($){return $}styleSubcommandText($){return $}styleCommandText($){return $}padWidth($,D){return Math.max(D.longestOptionTermLength($,D),D.longestGlobalOptionTermLength($,D),D.longestSubcommandTermLength($,D),D.longestArgumentTermLength($,D))}preformatted($){return/\n[^\S\r\n]/.test($)}formatItem($,D,X,G){let Y=" ".repeat(2);if(!X)return Y+$;let Q=$.padEnd(D+$.length-G.displayWidth($)),W=2,U=(this.helpWidth??80)-D-W-2,B;if(U<this.minWidthToWrap||G.preformatted(X))B=X;else B=G.boxWrap(X,U).replace(/\n/g,`
3
- `+" ".repeat(D+W));return Y+Q+" ".repeat(W)+B.replace(/\n/g,`
4
- ${Y}`)}boxWrap($,D){if(D<this.minWidthToWrap)return $;let X=$.split(/\r\n|\n/),G=/[\s]*[^\s]+/g,J=[];return X.forEach((Y)=>{let Q=Y.match(G);if(Q===null){J.push("");return}let W=[Q.shift()],I=this.displayWidth(W[0]);Q.forEach((U)=>{let B=this.displayWidth(U);if(I+B<=D){W.push(U),I+=B;return}J.push(W.join(""));let H=U.trimStart();W=[H],I=this.displayWidth(H)}),J.push(W.join(""))}),J.join(`
5
- `)}}function zb($){let D=/\x1b\[\d*(;\d*)*m/g;return $.replace(D,"")}Nx.Help=Bb;Nx.stripColor=zb});var wU=N((vx)=>{var{InvalidArgumentError:Zx}=$9();class Hb{constructor($,D){this.flags=$,this.description=D||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let X=Tx($);if(this.short=X.shortFlag,this.long=X.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default($,D){return this.defaultValue=$,this.defaultValueDescription=D,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let D=$;if(typeof $==="string")D={[$]:!0};return this.implied=Object.assign(this.implied||{},D),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_concatValue($,D){if(D===this.defaultValue||!Array.isArray(D))return[$];return D.concat($)}choices($){return this.argChoices=$.slice(),this.parseArg=(D,X)=>{if(!this.argChoices.includes(D))throw new Zx(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(D,X);return D},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return qb(this.name().replace(/^no-/,""));return qb(this.name())}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class Kb{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((D)=>{if(D.negate)this.negativeOptions.set(D.attributeName(),D);else this.positiveOptions.set(D.attributeName(),D)}),this.negativeOptions.forEach((D,X)=>{if(this.positiveOptions.has(X))this.dualOptions.add(X)})}valueFromOption($,D){let X=D.attributeName();if(!this.dualOptions.has(X))return!0;let G=this.negativeOptions.get(X).presetArg,J=G!==void 0?G:!1;return D.negate===(J===$)}}function qb($){return $.split("-").reduce((D,X)=>{return D+X[0].toUpperCase()+X.slice(1)})}function Tx($){let D,X,G=/^-[^-]$/,J=/^--[^-]/,Y=$.split(/[ |,]+/).concat("guard");if(G.test(Y[0]))D=Y.shift();if(J.test(Y[0]))X=Y.shift();if(!D&&G.test(Y[0]))D=Y.shift();if(!D&&J.test(Y[0]))D=X,X=Y.shift();if(Y[0].startsWith("-")){let Q=Y[0],W=`option creation failed due to '${Q}' in option flags '${$}'`;if(/^-[^-][^-]/.test(Q))throw Error(`${W}
6
- - a short flag is a single dash and a single character
7
- - either use a single dash and a single character (for a short flag)
8
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(G.test(Q))throw Error(`${W}
9
- - too many short flags`);if(J.test(Q))throw Error(`${W}
10
- - too many long flags`);throw Error(`${W}
11
- - unrecognised flag format`)}if(D===void 0&&X===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:D,longFlag:X}}vx.Option=Hb;vx.DualOptions=Kb});var Vb=N((xx)=>{function yx($,D){if(Math.abs($.length-D.length)>3)return Math.max($.length,D.length);let X=[];for(let G=0;G<=$.length;G++)X[G]=[G];for(let G=0;G<=D.length;G++)X[0][G]=G;for(let G=1;G<=D.length;G++)for(let J=1;J<=$.length;J++){let Y=1;if($[J-1]===D[G-1])Y=0;else Y=1;if(X[J][G]=Math.min(X[J-1][G]+1,X[J][G-1]+1,X[J-1][G-1]+Y),J>1&&G>1&&$[J-1]===D[G-2]&&$[J-2]===D[G-1])X[J][G]=Math.min(X[J][G],X[J-2][G-2]+1)}return X[$.length][D.length]}function gx($,D){if(!D||D.length===0)return"";D=Array.from(new Set(D));let X=$.startsWith("--");if(X)$=$.slice(2),D=D.map((Q)=>Q.slice(2));let G=[],J=3,Y=0.4;if(D.forEach((Q)=>{if(Q.length<=1)return;let W=yx($,Q),I=Math.max($.length,Q.length);if((I-W)/I>Y){if(W<J)J=W,G=[Q];else if(W===J)G.push(Q)}}),G.sort((Q,W)=>Q.localeCompare(W)),X)G=G.map((Q)=>`--${Q}`);if(G.length>1)return`
12
- (Did you mean one of ${G.join(", ")}?)`;if(G.length===1)return`
13
- (Did you mean ${G[0]}?)`;return""}xx.suggestSimilar=gx});var Fb=N((px)=>{var ux=S4("node:events").EventEmitter,LU=S4("node:child_process"),i4=S4("node:path"),Y3=S4("node:fs"),f$=S4("node:process"),{Argument:fx,humanReadableArgName:mx}=G3(),{CommanderError:OU}=$9(),{Help:cx,stripColor:lx}=VU(),{Option:wb,DualOptions:ix}=wU(),{suggestSimilar:Lb}=Vb();class bU extends ux{constructor($){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=$||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(D)=>f$.stdout.write(D),writeErr:(D)=>f$.stderr.write(D),outputError:(D,X)=>X(D),getOutHelpWidth:()=>f$.stdout.isTTY?f$.stdout.columns:void 0,getErrHelpWidth:()=>f$.stderr.isTTY?f$.stderr.columns:void 0,getOutHasColors:()=>FU()??(f$.stdout.isTTY&&f$.stdout.hasColors?.()),getErrHasColors:()=>FU()??(f$.stderr.isTTY&&f$.stderr.hasColors?.()),stripColor:(D)=>lx(D)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings($){return this._outputConfiguration=$._outputConfiguration,this._helpOption=$._helpOption,this._helpCommand=$._helpCommand,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let D=this;D;D=D.parent)$.push(D);return $}command($,D,X){let G=D,J=X;if(typeof G==="object"&&G!==null)J=G,G=null;J=J||{};let[,Y,Q]=$.match(/([^ ]+) *(.*)/),W=this.createCommand(Y);if(G)W.description(G),W._executableHandler=!0;if(J.isDefault)this._defaultCommandName=W._name;if(W._hidden=!!(J.noHelp||J.hidden),W._executableFile=J.executableFile||null,Q)W.arguments(Q);if(this._registerCommand(W),W.parent=this,W.copyInheritedSettings(this),G)return this;return W}createCommand($){return new bU($)}createHelp(){return Object.assign(new cx,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,$),this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,D){if(!$._name)throw Error(`Command passed to .addCommand() must have a name
14
- - specify the name in Command constructor or using .name()`);if(D=D||{},D.isDefault)this._defaultCommandName=$._name;if(D.noHelp||D.hidden)$._hidden=!0;return this._registerCommand($),$.parent=this,$._checkForBrokenPassThrough(),this}createArgument($,D){return new fx($,D)}argument($,D,X,G){let J=this.createArgument($,D);if(typeof X==="function")J.default(G).argParser(X);else J.default(X);return this.addArgument(J),this}arguments($){return $.trim().split(/ +/).forEach((D)=>{this.argument(D)}),this}addArgument($){let D=this.registeredArguments.slice(-1)[0];if(D&&D.variadic)throw Error(`only the last argument can be variadic '${D.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}helpCommand($,D){if(typeof $==="boolean")return this._addImplicitHelpCommand=$,this;$=$??"help [command]";let[,X,G]=$.match(/([^ ]+) *(.*)/),J=D??"display help for command",Y=this.createCommand(X);if(Y.helpOption(!1),G)Y.arguments(G);if(J)Y.description(J);return this._addImplicitHelpCommand=!0,this._helpCommand=Y,this}addHelpCommand($,D){if(typeof $!=="object")return this.helpCommand($,D),this;return this._addImplicitHelpCommand=!0,this._helpCommand=$,this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook($,D){let X=["preSubcommand","preAction","postAction"];if(!X.includes($))throw Error(`Unexpected value for event passed to hook : '${$}'.
15
- Expecting one of '${X.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(D);else this._lifeCycleHooks[$]=[D];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(D)=>{if(D.code!=="commander.executeSubCommandAsync")throw D};return this}_exit($,D,X){if(this._exitCallback)this._exitCallback(new OU($,D,X));f$.exit($)}action($){let D=(X)=>{let G=this.registeredArguments.length,J=X.slice(0,G);if(this._storeOptionsAsProperties)J[G]=this;else J[G]=this.opts();return J.push(this),$.apply(this,J)};return this._actionHandler=D,this}createOption($,D){return new wb($,D)}_callParseArg($,D,X,G){try{return $.parseArg(D,X)}catch(J){if(J.code==="commander.invalidArgument"){let Y=`${G} ${J.message}`;this.error(Y,{exitCode:J.exitCode,code:J.code})}throw J}}_registerOption($){let D=$.short&&this._findOption($.short)||$.long&&this._findOption($.long);if(D){let X=$.long&&this._findOption($.long)?$.long:$.short;throw Error(`Cannot add option '${$.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${X}'
16
- - already used by option '${D.flags}'`)}this.options.push($)}_registerCommand($){let D=(G)=>{return[G.name()].concat(G.aliases())},X=D($).find((G)=>this._findCommand(G));if(X){let G=D(this._findCommand(X)).join("|"),J=D($).join("|");throw Error(`cannot add command '${J}' as already have command '${G}'`)}this.commands.push($)}addOption($){this._registerOption($);let D=$.name(),X=$.attributeName();if($.negate){let J=$.long.replace(/^--no-/,"--");if(!this._findOption(J))this.setOptionValueWithSource(X,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(X,$.defaultValue,"default");let G=(J,Y,Q)=>{if(J==null&&$.presetArg!==void 0)J=$.presetArg;let W=this.getOptionValue(X);if(J!==null&&$.parseArg)J=this._callParseArg($,J,W,Y);else if(J!==null&&$.variadic)J=$._concatValue(J,W);if(J==null)if($.negate)J=!1;else if($.isBoolean()||$.optional)J=!0;else J="";this.setOptionValueWithSource(X,J,Q)};if(this.on("option:"+D,(J)=>{let Y=`error: option '${$.flags}' argument '${J}' is invalid.`;G(J,Y,"cli")}),$.envVar)this.on("optionEnv:"+D,(J)=>{let Y=`error: option '${$.flags}' value '${J}' from env '${$.envVar}' is invalid.`;G(J,Y,"env")});return this}_optionEx($,D,X,G,J){if(typeof D==="object"&&D instanceof wb)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let Y=this.createOption(D,X);if(Y.makeOptionMandatory(!!$.mandatory),typeof G==="function")Y.default(J).argParser(G);else if(G instanceof RegExp){let Q=G;G=(W,I)=>{let U=Q.exec(W);return U?U[0]:I},Y.default(J).argParser(G)}else Y.default(G);return this.addOption(Y)}option($,D,X,G){return this._optionEx({},$,D,X,G)}requiredOption($,D,X,G){return this._optionEx({mandatory:!0},$,D,X,G)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){return this._passThroughOptions=!!$,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties($=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,D){return this.setOptionValueWithSource($,D,void 0)}setOptionValueWithSource($,D,X){if(this._storeOptionsAsProperties)this[$]=D;else this._optionValues[$]=D;return this._optionValueSources[$]=X,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let D;return this._getCommandAndAncestors().forEach((X)=>{if(X.getOptionValueSource($)!==void 0)D=X.getOptionValueSource($)}),D}_prepareUserArgs($,D){if($!==void 0&&!Array.isArray($))throw Error("first parameter to parse must be array or undefined");if(D=D||{},$===void 0&&D.from===void 0){if(f$.versions?.electron)D.from="electron";let G=f$.execArgv??[];if(G.includes("-e")||G.includes("--eval")||G.includes("-p")||G.includes("--print"))D.from="eval"}if($===void 0)$=f$.argv;this.rawArgs=$.slice();let X;switch(D.from){case void 0:case"node":this._scriptPath=$[1],X=$.slice(2);break;case"electron":if(f$.defaultApp)this._scriptPath=$[1],X=$.slice(2);else X=$.slice(1);break;case"user":X=$.slice(0);break;case"eval":X=$.slice(1);break;default:throw Error(`unexpected parse option { from: '${D.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",X}parse($,D){this._prepareForParse();let X=this._prepareUserArgs($,D);return this._parseCommand([],X),this}async parseAsync($,D){this._prepareForParse();let X=this._prepareUserArgs($,D);return await this._parseCommand([],X),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
17
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable($,D,X){if(Y3.existsSync($))return;let G=D?`searched for local subcommand relative to directory '${D}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",J=`'${$}' does not exist
18
- - if '${X}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
19
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
20
- - ${G}`;throw Error(J)}_executeSubCommand($,D){D=D.slice();let X=!1,G=[".js",".ts",".tsx",".mjs",".cjs"];function J(U,B){let H=i4.resolve(U,B);if(Y3.existsSync(H))return H;if(G.includes(i4.extname(B)))return;let V=G.find((z)=>Y3.existsSync(`${H}${z}`));if(V)return`${H}${V}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Y=$._executableFile||`${this._name}-${$._name}`,Q=this._executableDir||"";if(this._scriptPath){let U;try{U=Y3.realpathSync(this._scriptPath)}catch{U=this._scriptPath}Q=i4.resolve(i4.dirname(U),Q)}if(Q){let U=J(Q,Y);if(!U&&!$._executableFile&&this._scriptPath){let B=i4.basename(this._scriptPath,i4.extname(this._scriptPath));if(B!==this._name)U=J(Q,`${B}-${$._name}`)}Y=U||Y}X=G.includes(i4.extname(Y));let W;if(f$.platform!=="win32")if(X)D.unshift(Y),D=Ob(f$.execArgv).concat(D),W=LU.spawn(f$.argv[0],D,{stdio:"inherit"});else W=LU.spawn(Y,D,{stdio:"inherit"});else this._checkForMissingExecutable(Y,Q,$._name),D.unshift(Y),D=Ob(f$.execArgv).concat(D),W=LU.spawn(f$.execPath,D,{stdio:"inherit"});if(!W.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((B)=>{f$.on(B,()=>{if(W.killed===!1&&W.exitCode===null)W.kill(B)})});let I=this._exitCallback;W.on("close",(U)=>{if(U=U??1,!I)f$.exit(U);else I(new OU(U,"commander.executeSubCommandAsync","(close)"))}),W.on("error",(U)=>{if(U.code==="ENOENT")this._checkForMissingExecutable(Y,Q,$._name);else if(U.code==="EACCES")throw Error(`'${Y}' not executable`);if(!I)f$.exit(1);else{let B=new OU(1,"commander.executeSubCommandAsync","(error)");B.nestedError=U,I(B)}}),this.runningCommand=W}_dispatchSubcommand($,D,X){let G=this._findCommand($);if(!G)this.help({error:!0});G._prepareForParse();let J;return J=this._chainOrCallSubCommandHook(J,G,"preSubcommand"),J=this._chainOrCall(J,()=>{if(G._executableHandler)this._executeSubCommand(G,D.concat(X));else return G._parseCommand(D,X)}),J}_dispatchHelpCommand($){if(!$)this.help();let D=this._findCommand($);if(D&&!D._executableHandler)D.help();return this._dispatchSubcommand($,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,D)=>{if($.required&&this.args[D]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(X,G,J)=>{let Y=G;if(G!==null&&X.parseArg){let Q=`error: command-argument value '${G}' is invalid for argument '${X.name()}'.`;Y=this._callParseArg(X,G,J,Q)}return Y};this._checkNumberOfArguments();let D=[];this.registeredArguments.forEach((X,G)=>{let J=X.defaultValue;if(X.variadic){if(G<this.args.length){if(J=this.args.slice(G),X.parseArg)J=J.reduce((Y,Q)=>{return $(X,Q,Y)},X.defaultValue)}else if(J===void 0)J=[]}else if(G<this.args.length){if(J=this.args[G],X.parseArg)J=$(X,J,X.defaultValue)}D[G]=J}),this.processedArgs=D}_chainOrCall($,D){if($&&$.then&&typeof $.then==="function")return $.then(()=>D());return D()}_chainOrCallHooks($,D){let X=$,G=[];if(this._getCommandAndAncestors().reverse().filter((J)=>J._lifeCycleHooks[D]!==void 0).forEach((J)=>{J._lifeCycleHooks[D].forEach((Y)=>{G.push({hookedCommand:J,callback:Y})})}),D==="postAction")G.reverse();return G.forEach((J)=>{X=this._chainOrCall(X,()=>{return J.callback(J.hookedCommand,this)})}),X}_chainOrCallSubCommandHook($,D,X){let G=$;if(this._lifeCycleHooks[X]!==void 0)this._lifeCycleHooks[X].forEach((J)=>{G=this._chainOrCall(G,()=>{return J(this,D)})});return G}_parseCommand($,D){let X=this.parseOptions(D);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(X.operands),D=X.unknown,this.args=$.concat(D),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),D);if(this._getHelpCommand()&&$[0]===this._getHelpCommand().name())return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(D),this._dispatchSubcommand(this._defaultCommandName,$,D);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(X.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let G=()=>{if(X.unknown.length>0)this.unknownOption(X.unknown[0])},J=`command:${this.name()}`;if(this._actionHandler){G(),this._processArguments();let Y;if(Y=this._chainOrCallHooks(Y,"preAction"),Y=this._chainOrCall(Y,()=>this._actionHandler(this.processedArgs)),this.parent)Y=this._chainOrCall(Y,()=>{this.parent.emit(J,$,D)});return Y=this._chainOrCallHooks(Y,"postAction"),Y}if(this.parent&&this.parent.listenerCount(J))G(),this._processArguments(),this.parent.emit(J,$,D);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,D);if(this.listenerCount("command:*"))this.emit("command:*",$,D);else if(this.commands.length)this.unknownCommand();else G(),this._processArguments()}else if(this.commands.length)G(),this.help({error:!0});else G(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((D)=>D._name===$||D._aliases.includes($))}_findOption($){return this.options.find((D)=>D.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((D)=>{if(D.mandatory&&$.getOptionValue(D.attributeName())===void 0)$.missingMandatoryOptionValue(D)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((X)=>{let G=X.attributeName();if(this.getOptionValue(G)===void 0)return!1;return this.getOptionValueSource(G)!=="default"});$.filter((X)=>X.conflictsWith.length>0).forEach((X)=>{let G=$.find((J)=>X.conflictsWith.includes(J.attributeName()));if(G)this._conflictingOption(X,G)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let D=[],X=[],G=D,J=$.slice();function Y(W){return W.length>1&&W[0]==="-"}let Q=null;while(J.length){let W=J.shift();if(W==="--"){if(G===X)G.push(W);G.push(...J);break}if(Q&&!Y(W)){this.emit(`option:${Q.name()}`,W);continue}if(Q=null,Y(W)){let I=this._findOption(W);if(I){if(I.required){let U=J.shift();if(U===void 0)this.optionMissingArgument(I);this.emit(`option:${I.name()}`,U)}else if(I.optional){let U=null;if(J.length>0&&!Y(J[0]))U=J.shift();this.emit(`option:${I.name()}`,U)}else this.emit(`option:${I.name()}`);Q=I.variadic?I:null;continue}}if(W.length>2&&W[0]==="-"&&W[1]!=="-"){let I=this._findOption(`-${W[1]}`);if(I){if(I.required||I.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${I.name()}`,W.slice(2));else this.emit(`option:${I.name()}`),J.unshift(`-${W.slice(2)}`);continue}}if(/^--[^=]+=/.test(W)){let I=W.indexOf("="),U=this._findOption(W.slice(0,I));if(U&&(U.required||U.optional)){this.emit(`option:${U.name()}`,W.slice(I+1));continue}}if(Y(W))G=X;if((this._enablePositionalOptions||this._passThroughOptions)&&D.length===0&&X.length===0){if(this._findCommand(W)){if(D.push(W),J.length>0)X.push(...J);break}else if(this._getHelpCommand()&&W===this._getHelpCommand().name()){if(D.push(W),J.length>0)D.push(...J);break}else if(this._defaultCommandName){if(X.push(W),J.length>0)X.push(...J);break}}if(this._passThroughOptions){if(G.push(W),J.length>0)G.push(...J);break}G.push(W)}return{operands:D,unknown:X}}opts(){if(this._storeOptionsAsProperties){let $={},D=this.options.length;for(let X=0;X<D;X++){let G=this.options[X].attributeName();$[G]=G===this._versionOptionName?this._version:this[G]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,D)=>Object.assign($,D.opts()),{})}error($,D){if(this._outputConfiguration.outputError(`${$}
21
- `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
22
- `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
23
- `),this.outputHelp({error:!0});let X=D||{},G=X.exitCode||1,J=X.code||"commander.error";this._exit(G,J,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in f$.env){let D=$.attributeName();if(this.getOptionValue(D)===void 0||["default","config","env"].includes(this.getOptionValueSource(D)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,f$.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new ix(this.options),D=(X)=>{return this.getOptionValue(X)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(X))};this.options.filter((X)=>X.implied!==void 0&&D(X.attributeName())&&$.valueFromOption(this.getOptionValue(X.attributeName()),X)).forEach((X)=>{Object.keys(X.implied).filter((G)=>!D(G)).forEach((G)=>{this.setOptionValueWithSource(G,X.implied[G],"implied")})})}missingArgument($){let D=`error: missing required argument '${$}'`;this.error(D,{code:"commander.missingArgument"})}optionMissingArgument($){let D=`error: option '${$.flags}' argument missing`;this.error(D,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let D=`error: required option '${$.flags}' not specified`;this.error(D,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,D){let X=(Y)=>{let Q=Y.attributeName(),W=this.getOptionValue(Q),I=this.options.find((B)=>B.negate&&Q===B.attributeName()),U=this.options.find((B)=>!B.negate&&Q===B.attributeName());if(I&&(I.presetArg===void 0&&W===!1||I.presetArg!==void 0&&W===I.presetArg))return I;return U||Y},G=(Y)=>{let Q=X(Y),W=Q.attributeName();if(this.getOptionValueSource(W)==="env")return`environment variable '${Q.envVar}'`;return`option '${Q.flags}'`},J=`error: ${G($)} cannot be used with ${G(D)}`;this.error(J,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let D="";if($.startsWith("--")&&this._showSuggestionAfterError){let G=[],J=this;do{let Y=J.createHelp().visibleOptions(J).filter((Q)=>Q.long).map((Q)=>Q.long);G=G.concat(Y),J=J.parent}while(J&&!J._enablePositionalOptions);D=Lb($,G)}let X=`error: unknown option '${$}'${D}`;this.error(X,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let D=this.registeredArguments.length,X=D===1?"":"s",J=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${D} argument${X} but got ${$.length}.`;this.error(J,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],D="";if(this._showSuggestionAfterError){let G=[];this.createHelp().visibleCommands(this).forEach((J)=>{if(G.push(J.name()),J.alias())G.push(J.alias())}),D=Lb($,G)}let X=`error: unknown command '${$}'${D}`;this.error(X,{code:"commander.unknownCommand"})}version($,D,X){if($===void 0)return this._version;this._version=$,D=D||"-V, --version",X=X||"output the version number";let G=this.createOption(D,X);return this._versionOptionName=G.attributeName(),this._registerOption(G),this.on("option:"+G.name(),()=>{this._outputConfiguration.writeOut(`${$}
24
- `),this._exit(0,"commander.version",$)}),this}description($,D){if($===void 0&&D===void 0)return this._description;if(this._description=$,D)this._argsDescription=D;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let D=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)D=this.commands[this.commands.length-1];if($===D._name)throw Error("Command alias can't be the same as its name");let X=this.parent?._findCommand($);if(X){let G=[X.name()].concat(X.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${G}'`)}return D._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((D)=>this.alias(D)),this}usage($){if($===void 0){if(this._usage)return this._usage;let D=this.registeredArguments.map((X)=>{return mx(X)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?D:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}nameFromFilename($){return this._name=i4.basename($,i4.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let D=this.createHelp(),X=this._getOutputContext($);D.prepareContext({error:X.error,helpWidth:X.helpWidth,outputHasColors:X.hasColors});let G=D.formatHelp(this,D);if(X.hasColors)return G;return this._outputConfiguration.stripColor(G)}_getOutputContext($){$=$||{};let D=!!$.error,X,G,J;if(D)X=(Q)=>this._outputConfiguration.writeErr(Q),G=this._outputConfiguration.getErrHasColors(),J=this._outputConfiguration.getErrHelpWidth();else X=(Q)=>this._outputConfiguration.writeOut(Q),G=this._outputConfiguration.getOutHasColors(),J=this._outputConfiguration.getOutHelpWidth();return{error:D,write:(Q)=>{if(!G)Q=this._outputConfiguration.stripColor(Q);return X(Q)},hasColors:G,helpWidth:J}}outputHelp($){let D;if(typeof $==="function")D=$,$=void 0;let X=this._getOutputContext($),G={error:X.error,write:X.write,command:this};this._getCommandAndAncestors().reverse().forEach((Y)=>Y.emit("beforeAllHelp",G)),this.emit("beforeHelp",G);let J=this.helpInformation({error:X.error});if(D){if(J=D(J),typeof J!=="string"&&!Buffer.isBuffer(J))throw Error("outputHelp callback must return a string or a Buffer")}if(X.write(J),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",G),this._getCommandAndAncestors().forEach((Y)=>Y.emit("afterAllHelp",G))}helpOption($,D){if(typeof $==="boolean"){if($)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return $=$??"-h, --help",D=D??"display help for command",this._helpOption=this.createOption($,D),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this}help($){this.outputHelp($);let D=Number(f$.exitCode??0);if(D===0&&$&&typeof $!=="function"&&$.error)D=1;this._exit(D,"commander.help","(outputHelp)")}addHelpText($,D){let X=["beforeAll","before","after","afterAll"];if(!X.includes($))throw Error(`Unexpected value for position to addHelpText.
25
- Expecting one of '${X.join("', '")}'`);let G=`${$}Help`;return this.on(G,(J)=>{let Y;if(typeof D==="function")Y=D({error:J.error,command:J.command});else Y=D;if(Y)J.write(`${Y}
26
- `)}),this}_outputHelpIfRequested($){let D=this._getHelpOption();if(D&&$.find((G)=>D.is(G)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function Ob($){return $.map((D)=>{if(!D.startsWith("--inspect"))return D;let X,G="127.0.0.1",J="9229",Y;if((Y=D.match(/^(--inspect(-brk)?)$/))!==null)X=Y[1];else if((Y=D.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(X=Y[1],/^\d+$/.test(Y[3]))J=Y[3];else G=Y[3];else if((Y=D.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)X=Y[1],G=Y[3],J=Y[4];if(X&&J!=="0")return`${X}=${G}:${parseInt(J)+1}`;return D})}function FU(){if(f$.env.NO_COLOR||f$.env.FORCE_COLOR==="0"||f$.env.FORCE_COLOR==="false")return!1;if(f$.env.FORCE_COLOR||f$.env.CLICOLOR_FORCE!==void 0)return!0;return}px.Command=bU;px.useColor=FU});var Mb=N((tx)=>{var{Argument:bb}=G3(),{Command:jU}=Fb(),{CommanderError:dx,InvalidArgumentError:jb}=$9(),{Help:ox}=VU(),{Option:Ab}=wU();tx.program=new jU;tx.createCommand=($)=>new jU($);tx.createOption=($,D)=>new Ab($,D);tx.createArgument=($,D)=>new bb($,D);tx.Command=jU;tx.Option=Ab;tx.Argument=bb;tx.Help=ox;tx.CommanderError=dx;tx.InvalidArgumentError=jb;tx.InvalidOptionArgumentError=jb});var qX=N((A8$,Lj)=>{Lj.exports=LD;LD.CAPTURING_PHASE=1;LD.AT_TARGET=2;LD.BUBBLING_PHASE=3;function LD($,D){if(this.type="",this.target=null,this.currentTarget=null,this.eventPhase=LD.AT_TARGET,this.bubbles=!1,this.cancelable=!1,this.isTrusted=!1,this.defaultPrevented=!1,this.timeStamp=Date.now(),this._propagationStopped=!1,this._immediatePropagationStopped=!1,this._initialized=!0,this._dispatching=!1,$)this.type=$;if(D)for(var X in D)this[X]=D[X]}LD.prototype=Object.create(Object.prototype,{constructor:{value:LD},stopPropagation:{value:function(){this._propagationStopped=!0}},stopImmediatePropagation:{value:function(){this._propagationStopped=!0,this._immediatePropagationStopped=!0}},preventDefault:{value:function(){if(this.cancelable)this.defaultPrevented=!0}},initEvent:{value:function(D,X,G){if(this._initialized=!0,this._dispatching)return;this._propagationStopped=!1,this._immediatePropagationStopped=!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.type=D,this.bubbles=X,this.cancelable=G}}})});var gU=N((M8$,Fj)=>{var Oj=qX();Fj.exports=yU;function yU(){Oj.call(this),this.view=null,this.detail=0}yU.prototype=Object.create(Oj.prototype,{constructor:{value:yU},initUIEvent:{value:function($,D,X,G,J){this.initEvent($,D,X),this.view=G,this.detail=J}}})});var hU=N((S8$,jj)=>{var bj=gU();jj.exports=xU;function xU(){bj.call(this),this.screenX=this.screenY=this.clientX=this.clientY=0,this.ctrlKey=this.altKey=this.shiftKey=this.metaKey=!1,this.button=0,this.buttons=1,this.relatedTarget=null}xU.prototype=Object.create(bj.prototype,{constructor:{value:xU},initMouseEvent:{value:function($,D,X,G,J,Y,Q,W,I,U,B,H,V,z,L){switch(this.initEvent($,D,X,G,J),this.screenX=Y,this.screenY=Q,this.clientX=W,this.clientY=I,this.ctrlKey=U,this.altKey=B,this.shiftKey=H,this.metaKey=V,this.button=z,z){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2;break;default:this.buttons=0;break}this.relatedTarget=L}},getModifierState:{value:function($){switch($){case"Alt":return this.altKey;case"Control":return this.ctrlKey;case"Shift":return this.shiftKey;case"Meta":return this.metaKey;default:return!1}}}})});var F3=N((P8$,Mj)=>{Mj.exports=O3;var wu=1,Lu=3,Ou=4,Fu=5,bu=7,ju=8,Au=9,Mu=11,Su=12,Pu=13,_u=14,Nu=15,Ru=17,Eu=18,Zu=19,Tu=20,vu=21,ku=22,Cu=23,yu=24,gu=25,xu=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],hu=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],Aj={INDEX_SIZE_ERR:wu,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:Lu,WRONG_DOCUMENT_ERR:Ou,INVALID_CHARACTER_ERR:Fu,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:bu,NOT_FOUND_ERR:ju,NOT_SUPPORTED_ERR:Au,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:Mu,SYNTAX_ERR:Su,INVALID_MODIFICATION_ERR:Pu,NAMESPACE_ERR:_u,INVALID_ACCESS_ERR:Nu,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:Ru,SECURITY_ERR:Eu,NETWORK_ERR:Zu,ABORT_ERR:Tu,URL_MISMATCH_ERR:vu,QUOTA_EXCEEDED_ERR:ku,TIMEOUT_ERR:Cu,INVALID_NODE_TYPE_ERR:yu,DATA_CLONE_ERR:gu};function O3($){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=$,this.message=hu[$],this.name=xu[$]}O3.prototype.__proto__=Error.prototype;for(B9 in Aj)L3={value:Aj[B9]},Object.defineProperty(O3,B9,L3),Object.defineProperty(O3.prototype,B9,L3);var L3,B9});var b3=N((uu)=>{uu.isApiWritable=!globalThis.__domino_frozen__});var M6=N((cu)=>{var A6=F3(),N6=A6,mu=b3().isApiWritable;cu.NAMESPACE={HTML:"http://www.w3.org/1999/xhtml",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink"};cu.IndexSizeError=function(){throw new A6(N6.INDEX_SIZE_ERR)};cu.HierarchyRequestError=function(){throw new A6(N6.HIERARCHY_REQUEST_ERR)};cu.WrongDocumentError=function(){throw new A6(N6.WRONG_DOCUMENT_ERR)};cu.InvalidCharacterError=function(){throw new A6(N6.INVALID_CHARACTER_ERR)};cu.NoModificationAllowedError=function(){throw new A6(N6.NO_MODIFICATION_ALLOWED_ERR)};cu.NotFoundError=function(){throw new A6(N6.NOT_FOUND_ERR)};cu.NotSupportedError=function(){throw new A6(N6.NOT_SUPPORTED_ERR)};cu.InvalidStateError=function(){throw new A6(N6.INVALID_STATE_ERR)};cu.SyntaxError=function(){throw new A6(N6.SYNTAX_ERR)};cu.InvalidModificationError=function(){throw new A6(N6.INVALID_MODIFICATION_ERR)};cu.NamespaceError=function(){throw new A6(N6.NAMESPACE_ERR)};cu.InvalidAccessError=function(){throw new A6(N6.INVALID_ACCESS_ERR)};cu.TypeMismatchError=function(){throw new A6(N6.TYPE_MISMATCH_ERR)};cu.SecurityError=function(){throw new A6(N6.SECURITY_ERR)};cu.NetworkError=function(){throw new A6(N6.NETWORK_ERR)};cu.AbortError=function(){throw new A6(N6.ABORT_ERR)};cu.UrlMismatchError=function(){throw new A6(N6.URL_MISMATCH_ERR)};cu.QuotaExceededError=function(){throw new A6(N6.QUOTA_EXCEEDED_ERR)};cu.TimeoutError=function(){throw new A6(N6.TIMEOUT_ERR)};cu.InvalidNodeTypeError=function(){throw new A6(N6.INVALID_NODE_TYPE_ERR)};cu.DataCloneError=function(){throw new A6(N6.DATA_CLONE_ERR)};cu.nyi=function(){throw Error("NotYetImplemented")};cu.shouldOverride=function(){throw Error("Abstract function; should be overriding in subclass.")};cu.assert=function($,D){if(!$)throw Error("Assertion failed: "+(D||"")+`
27
- `+Error().stack)};cu.expose=function($,D){for(var X in $)Object.defineProperty(D.prototype,X,{value:$[X],writable:mu})};cu.merge=function($,D){for(var X in D)$[X]=D[X]};cu.documentOrder=function($,D){return 3-($.compareDocumentPosition(D)&6)};cu.toASCIILowerCase=function($){return $.replace(/[A-Z]+/g,function(D){return D.toLowerCase()})};cu.toASCIIUpperCase=function($){return $.replace(/[a-z]+/g,function(D){return D.toUpperCase()})}});var uU=N((R8$,Pj)=>{var OD=qX(),Ff=hU(),bf=M6();Pj.exports=Sj;function Sj(){}Sj.prototype={addEventListener:function(D,X,G){if(!X)return;if(G===void 0)G=!1;if(!this._listeners)this._listeners=Object.create(null);if(!this._listeners[D])this._listeners[D]=[];var J=this._listeners[D];for(var Y=0,Q=J.length;Y<Q;Y++){var W=J[Y];if(W.listener===X&&W.capture===G)return}var I={listener:X,capture:G};if(typeof X==="function")I.f=X;J.push(I)},removeEventListener:function(D,X,G){if(G===void 0)G=!1;if(this._listeners){var J=this._listeners[D];if(J)for(var Y=0,Q=J.length;Y<Q;Y++){var W=J[Y];if(W.listener===X&&W.capture===G){if(J.length===1)this._listeners[D]=void 0;else J.splice(Y,1);return}}}},dispatchEvent:function(D){return this._dispatchEvent(D,!1)},_dispatchEvent:function(D,X){if(typeof X!=="boolean")X=!1;function G(U,B){var{type:H,eventPhase:V}=B;if(B.currentTarget=U,V!==OD.CAPTURING_PHASE&&U._handlers&&U._handlers[H]){var z=U._handlers[H],L;if(typeof z==="function")L=z.call(B.currentTarget,B);else{var F=z.handleEvent;if(typeof F!=="function")throw TypeError("handleEvent property of event handler object isnot a function.");L=F.call(z,B)}switch(B.type){case"mouseover":if(L===!0)B.preventDefault();break;case"beforeunload":default:if(L===!1)B.preventDefault();break}}var b=U._listeners&&U._listeners[H];if(!b)return;b=b.slice();for(var P=0,Z=b.length;P<Z;P++){if(B._immediatePropagationStopped)return;var v=b[P];if(V===OD.CAPTURING_PHASE&&!v.capture||V===OD.BUBBLING_PHASE&&v.capture)continue;if(v.f)v.f.call(B.currentTarget,B);else{var g=v.listener.handleEvent;if(typeof g!=="function")throw TypeError("handleEvent property of event listener object is not a function.");g.call(v.listener,B)}}}if(!D._initialized||D._dispatching)bf.InvalidStateError();D.isTrusted=X,D._dispatching=!0,D.target=this;var J=[];for(var Y=this.parentNode;Y;Y=Y.parentNode)J.push(Y);D.eventPhase=OD.CAPTURING_PHASE;for(var Q=J.length-1;Q>=0;Q--)if(G(J[Q],D),D._propagationStopped)break;if(!D._propagationStopped)D.eventPhase=OD.AT_TARGET,G(this,D);if(D.bubbles&&!D._propagationStopped){D.eventPhase=OD.BUBBLING_PHASE;for(var W=0,I=J.length;W<I;W++)if(G(J[W],D),D._propagationStopped)break}if(D._dispatching=!1,D.eventPhase=OD.AT_TARGET,D.currentTarget=null,X&&!D.defaultPrevented&&D instanceof Ff)switch(D.type){case"mousedown":this._armed={x:D.clientX,y:D.clientY,t:D.timeStamp};break;case"mouseout":case"mouseover":this._armed=null;break;case"mouseup":if(this._isClick(D))this._doClick(D);this._armed=null;break}return!D.defaultPrevented},_isClick:function($){return this._armed!==null&&$.type==="mouseup"&&$.isTrusted&&$.button===0&&$.timeStamp-this._armed.t<1000&&Math.abs($.clientX-this._armed.x)<10&&Math.abs($.clientY-this._armed.Y)<10},_doClick:function($){if(this._click_in_progress)return;this._click_in_progress=!0;var D=this;while(D&&!D._post_click_activation_steps)D=D.parentNode;if(D&&D._pre_click_activation_steps)D._pre_click_activation_steps();var X=this.ownerDocument.createEvent("MouseEvent");X.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,$.screenX,$.screenY,$.clientX,$.clientY,$.ctrlKey,$.altKey,$.shiftKey,$.metaKey,$.button,null);var G=this._dispatchEvent(X,!0);if(D){if(G){if(D._post_click_activation_steps)D._post_click_activation_steps(X)}else if(D._cancelled_activation_steps)D._cancelled_activation_steps()}},_setEventHandler:function(D,X){if(!this._handlers)this._handlers=Object.create(null);this._handlers[D]=X},_getEventHandler:function(D){return this._handlers&&this._handlers[D]||null}}});var fU=N((E8$,_j)=>{var r4=M6(),p1=_j.exports={valid:function($){return r4.assert($,"list falsy"),r4.assert($._previousSibling,"previous falsy"),r4.assert($._nextSibling,"next falsy"),!0},insertBefore:function($,D){r4.assert(p1.valid($)&&p1.valid(D));var X=$,G=$._previousSibling,J=D,Y=D._previousSibling;X._previousSibling=Y,G._nextSibling=J,Y._nextSibling=X,J._previousSibling=G,r4.assert(p1.valid($)&&p1.valid(D))},replace:function($,D){if(r4.assert(p1.valid($)&&(D===null||p1.valid(D))),D!==null)p1.insertBefore(D,$);p1.remove($),r4.assert(p1.valid($)&&(D===null||p1.valid(D)))},remove:function($){r4.assert(p1.valid($));var D=$._previousSibling;if(D===$)return;var X=$._nextSibling;D._nextSibling=X,X._previousSibling=D,$._previousSibling=$._nextSibling=$,r4.assert(p1.valid($))}}});var mU=N((Z8$,Cj)=>{Cj.exports={serializeOne:Nf,ɵescapeMatchingClosingTag:Tj,ɵescapeClosingCommentTag:vj,ɵescapeProcessingInstructionContent:kj};var Zj=M6(),FD=Zj.NAMESPACE,Nj={STYLE:!0,SCRIPT:!0,XMP:!0,IFRAME:!0,NOEMBED:!0,NOFRAMES:!0,PLAINTEXT:!0},jf={area:!0,base:!0,basefont:!0,bgsound:!0,br:!0,col:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Af={},Rj=/[&<>\u00A0]/g,Ej=/[&"<>\u00A0]/g;function Mf($){if(!Rj.test($))return $;return $.replace(Rj,(D)=>{switch(D){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}})}function Sf($){if(!Ej.test($))return $;return $.replace(Ej,(D)=>{switch(D){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case'"':return"&quot;";case" ":return"&nbsp;"}})}function Pf($){var D=$.namespaceURI;if(!D)return $.localName;if(D===FD.XML)return"xml:"+$.localName;if(D===FD.XLINK)return"xlink:"+$.localName;if(D===FD.XMLNS)if($.localName==="xmlns")return"xmlns";else return"xmlns:"+$.localName;return $.name}function Tj($,D){let X="</"+D;if(!$.toLowerCase().includes(X))return $;let G=[...$],J=$.matchAll(new RegExp(X,"ig"));for(let Y of J)G[Y.index]="&lt;";return G.join("")}var _f=/--!?>/;function vj($){if(!_f.test($))return $;return $.replace(/(--\!?)>/g,"$1&gt;")}function kj($){return $.includes(">")?$.replaceAll(">","&gt;"):$}function Nf($,D){var X="";switch($.nodeType){case 1:var G=$.namespaceURI,J=G===FD.HTML,Y=J||G===FD.SVG||G===FD.MATHML?$.localName:$.tagName;X+="<"+Y;for(var Q=0,W=$._numattrs;Q<W;Q++){var I=$._attr(Q);if(X+=" "+Pf(I),I.value!==void 0)X+='="'+Sf(I.value)+'"'}if(X+=">",!(J&&jf[Y])){var U=$.serialize();if(Nj[Y.toUpperCase()])U=Tj(U,Y);if(J&&Af[Y]&&U.charAt(0)===`
28
- `)X+=`
29
- `;X+=U,X+="</"+Y+">"}break;case 3:case 4:var B;if(D.nodeType===1&&D.namespaceURI===FD.HTML)B=D.tagName;else B="";if(Nj[B]||B==="NOSCRIPT"&&D.ownerDocument._scripting_enabled)X+=$.data;else X+=Mf($.data);break;case 8:X+="<!--"+vj($.data)+"-->";break;case 7:let H=kj($.data);X+="<?"+$.target+" "+H+"?>";break;case 10:X+="<!DOCTYPE "+$.name,X+=">";break;default:Zj.InvalidStateError()}return X}});var f6=N((T8$,fj)=>{fj.exports=B6;var uj=uU(),j3=fU(),yj=mU(),m$=M6();function B6(){uj.call(this),this.parentNode=null,this._nextSibling=this._previousSibling=this,this._index=void 0}var w1=B6.ELEMENT_NODE=1,cU=B6.ATTRIBUTE_NODE=2,A3=B6.TEXT_NODE=3,Rf=B6.CDATA_SECTION_NODE=4,Ef=B6.ENTITY_REFERENCE_NODE=5,lU=B6.ENTITY_NODE=6,gj=B6.PROCESSING_INSTRUCTION_NODE=7,xj=B6.COMMENT_NODE=8,z9=B6.DOCUMENT_NODE=9,r1=B6.DOCUMENT_TYPE_NODE=10,S0=B6.DOCUMENT_FRAGMENT_NODE=11,iU=B6.NOTATION_NODE=12,pU=B6.DOCUMENT_POSITION_DISCONNECTED=1,rU=B6.DOCUMENT_POSITION_PRECEDING=2,nU=B6.DOCUMENT_POSITION_FOLLOWING=4,hj=B6.DOCUMENT_POSITION_CONTAINS=8,dU=B6.DOCUMENT_POSITION_CONTAINED_BY=16,oU=B6.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;B6.prototype=Object.create(uj.prototype,{baseURI:{get:m$.nyi},parentElement:{get:function(){return this.parentNode&&this.parentNode.nodeType===w1?this.parentNode:null}},hasChildNodes:{value:m$.shouldOverride},firstChild:{get:m$.shouldOverride},lastChild:{get:m$.shouldOverride},isConnected:{get:function(){let $=this;while($!=null){if($.nodeType===B6.DOCUMENT_NODE)return!0;if($=$.parentNode,$!=null&&$.nodeType===B6.DOCUMENT_FRAGMENT_NODE)$=$.host}return!1}},previousSibling:{get:function(){var $=this.parentNode;if(!$)return null;if(this===$.firstChild)return null;return this._previousSibling}},nextSibling:{get:function(){var $=this.parentNode,D=this._nextSibling;if(!$)return null;if(D===$.firstChild)return null;return D}},textContent:{get:function(){return null},set:function($){}},innerText:{get:function(){return null},set:function($){}},_countChildrenOfType:{value:function($){var D=0;for(var X=this.firstChild;X!==null;X=X.nextSibling)if(X.nodeType===$)D++;return D}},_ensureInsertValid:{value:function(D,X,G){var J=this,Y,Q;if(!D.nodeType)throw TypeError("not a node");switch(J.nodeType){case z9:case S0:case w1:break;default:m$.HierarchyRequestError()}if(D.isAncestor(J))m$.HierarchyRequestError();if(X!==null||!G){if(X.parentNode!==J)m$.NotFoundError()}switch(D.nodeType){case S0:case r1:case w1:case A3:case gj:case xj:break;default:m$.HierarchyRequestError()}if(J.nodeType===z9)switch(D.nodeType){case A3:m$.HierarchyRequestError();break;case S0:if(D._countChildrenOfType(A3)>0)m$.HierarchyRequestError();switch(D._countChildrenOfType(w1)){case 0:break;case 1:if(X!==null){if(G&&X.nodeType===r1)m$.HierarchyRequestError();for(Q=X.nextSibling;Q!==null;Q=Q.nextSibling)if(Q.nodeType===r1)m$.HierarchyRequestError()}if(Y=J._countChildrenOfType(w1),G){if(Y>0)m$.HierarchyRequestError()}else if(Y>1||Y===1&&X.nodeType!==w1)m$.HierarchyRequestError();break;default:m$.HierarchyRequestError()}break;case w1:if(X!==null){if(G&&X.nodeType===r1)m$.HierarchyRequestError();for(Q=X.nextSibling;Q!==null;Q=Q.nextSibling)if(Q.nodeType===r1)m$.HierarchyRequestError()}if(Y=J._countChildrenOfType(w1),G){if(Y>0)m$.HierarchyRequestError()}else if(Y>1||Y===1&&X.nodeType!==w1)m$.HierarchyRequestError();break;case r1:if(X===null){if(J._countChildrenOfType(w1))m$.HierarchyRequestError()}else for(Q=J.firstChild;Q!==null;Q=Q.nextSibling){if(Q===X)break;if(Q.nodeType===w1)m$.HierarchyRequestError()}if(Y=J._countChildrenOfType(r1),G){if(Y>0)m$.HierarchyRequestError()}else if(Y>1||Y===1&&X.nodeType!==r1)m$.HierarchyRequestError();break}else if(D.nodeType===r1)m$.HierarchyRequestError()}},insertBefore:{value:function(D,X){var G=this;G._ensureInsertValid(D,X,!0);var J=X;if(J===D)J=D.nextSibling;return G.doc.adoptNode(D),D._insertOrReplace(G,J,!1),D}},appendChild:{value:function($){return this.insertBefore($,null)}},_appendChild:{value:function($){$._insertOrReplace(this,null,!1)}},removeChild:{value:function(D){var X=this;if(!D.nodeType)throw TypeError("not a node");if(D.parentNode!==X)m$.NotFoundError();return D.remove(),D}},replaceChild:{value:function(D,X){var G=this;if(G._ensureInsertValid(D,X,!1),D.doc!==G.doc)G.doc.adoptNode(D);return D._insertOrReplace(G,X,!0),X}},contains:{value:function(D){if(D===null)return!1;if(this===D)return!0;return(this.compareDocumentPosition(D)&dU)!==0}},compareDocumentPosition:{value:function(D){if(this===D)return 0;if(this.doc!==D.doc||this.rooted!==D.rooted)return pU+oU;var X=[],G=[];for(var J=this;J!==null;J=J.parentNode)X.push(J);for(J=D;J!==null;J=J.parentNode)G.push(J);if(X.reverse(),G.reverse(),X[0]!==G[0])return pU+oU;J=Math.min(X.length,G.length);for(var Y=1;Y<J;Y++)if(X[Y]!==G[Y])if(X[Y].index<G[Y].index)return nU;else return rU;if(X.length<G.length)return nU+dU;else return rU+hj}},isSameNode:{value:function(D){return this===D}},isEqualNode:{value:function(D){if(!D)return!1;if(D.nodeType!==this.nodeType)return!1;if(!this.isEqual(D))return!1;for(var X=this.firstChild,G=D.firstChild;X&&G;X=X.nextSibling,G=G.nextSibling)if(!X.isEqualNode(G))return!1;return X===null&&G===null}},cloneNode:{value:function($){var D=this.clone();if($)for(var X=this.firstChild;X!==null;X=X.nextSibling)D._appendChild(X.cloneNode(!0));return D}},lookupPrefix:{value:function(D){var X;if(D===""||D===null||D===void 0)return null;switch(this.nodeType){case w1:return this._lookupNamespacePrefix(D,this);case z9:return X=this.documentElement,X?X.lookupPrefix(D):null;case lU:case iU:case S0:case r1:return null;case cU:return X=this.ownerElement,X?X.lookupPrefix(D):null;default:return X=this.parentElement,X?X.lookupPrefix(D):null}}},lookupNamespaceURI:{value:function(D){if(D===""||D===void 0)D=null;var X;switch(this.nodeType){case w1:return m$.shouldOverride();case z9:return X=this.documentElement,X?X.lookupNamespaceURI(D):null;case lU:case iU:case r1:case S0:return null;case cU:return X=this.ownerElement,X?X.lookupNamespaceURI(D):null;default:return X=this.parentElement,X?X.lookupNamespaceURI(D):null}}},isDefaultNamespace:{value:function(D){if(D===""||D===void 0)D=null;var X=this.lookupNamespaceURI(null);return X===D}},index:{get:function(){var $=this.parentNode;if(this===$.firstChild)return 0;var D=$.childNodes;if(this._index===void 0||D[this._index]!==this){for(var X=0;X<D.length;X++)D[X]._index=X;m$.assert(D[this._index]===this)}return this._index}},isAncestor:{value:function($){if(this.doc!==$.doc)return!1;if(this.rooted!==$.rooted)return!1;for(var D=$;D;D=D.parentNode)if(D===this)return!0;return!1}},ensureSameDoc:{value:function($){if($.ownerDocument===null)$.ownerDocument=this.doc;else if($.ownerDocument!==this.doc)m$.WrongDocumentError()}},removeChildren:{value:m$.shouldOverride},_insertOrReplace:{value:function(D,X,G){var J=this,Y,Q;if(J.nodeType===S0&&J.rooted)m$.HierarchyRequestError();if(D._childNodes){if(Y=X===null?D._childNodes.length:X.index,J.parentNode===D){var W=J.index;if(W<Y)Y--}}if(G){if(X.rooted)X.doc.mutateRemove(X);X.parentNode=null}var I=X;if(I===null)I=D.firstChild;var U=J.rooted&&D.rooted;if(J.nodeType===S0){var B=[0,G?1:0],H;for(var V=J.firstChild;V!==null;V=H)H=V.nextSibling,B.push(V),V.parentNode=D;var z=B.length;if(G)j3.replace(I,z>2?B[2]:null);else if(z>2&&I!==null)j3.insertBefore(B[2],I);if(D._childNodes){B[0]=X===null?D._childNodes.length:X._index,D._childNodes.splice.apply(D._childNodes,B);for(Q=2;Q<z;Q++)B[Q]._index=B[0]+(Q-2)}else if(D._firstChild===X){if(z>2)D._firstChild=B[2];else if(G)D._firstChild=null}if(J._childNodes)J._childNodes.length=0;else J._firstChild=null;if(D.rooted){D.modify();for(Q=2;Q<z;Q++)D.doc.mutateInsert(B[Q])}}else{if(X===J)return;if(U)J._remove();else if(J.parentNode)J.remove();if(J.parentNode=D,G){if(j3.replace(I,J),D._childNodes)J._index=Y,D._childNodes[Y]=J;else if(D._firstChild===X)D._firstChild=J}else{if(I!==null)j3.insertBefore(J,I);if(D._childNodes)J._index=Y,D._childNodes.splice(Y,0,J);else if(D._firstChild===X)D._firstChild=J}if(U)D.modify(),D.doc.mutateMove(J);else if(D.rooted)D.modify(),D.doc.mutateInsert(J)}}},lastModTime:{get:function(){if(!this._lastModTime)this._lastModTime=this.doc.modclock;return this._lastModTime}},modify:{value:function(){if(this.doc.modclock){var $=++this.doc.modclock;for(var D=this;D;D=D.parentElement)if(D._lastModTime)D._lastModTime=$}}},doc:{get:function(){return this.ownerDocument||this}},rooted:{get:function(){return!!this._nid}},normalize:{value:function(){var $;for(var D=this.firstChild;D!==null;D=$){if($=D.nextSibling,D.normalize)D.normalize();if(D.nodeType!==B6.TEXT_NODE)continue;if(D.nodeValue===""){this.removeChild(D);continue}var X=D.previousSibling;if(X===null)continue;else if(X.nodeType===B6.TEXT_NODE)X.appendData(D.nodeValue),this.removeChild(D)}}},serialize:{value:function(){if(this._innerHTML)return this._innerHTML;var $="";for(var D=this.firstChild;D!==null;D=D.nextSibling)$+=yj.serializeOne(D,this);return $}},outerHTML:{get:function(){return yj.serializeOne(this,{nodeType:0})},set:m$.nyi},ELEMENT_NODE:{value:w1},ATTRIBUTE_NODE:{value:cU},TEXT_NODE:{value:A3},CDATA_SECTION_NODE:{value:Rf},ENTITY_REFERENCE_NODE:{value:Ef},ENTITY_NODE:{value:lU},PROCESSING_INSTRUCTION_NODE:{value:gj},COMMENT_NODE:{value:xj},DOCUMENT_NODE:{value:z9},DOCUMENT_TYPE_NODE:{value:r1},DOCUMENT_FRAGMENT_NODE:{value:S0},NOTATION_NODE:{value:iU},DOCUMENT_POSITION_DISCONNECTED:{value:pU},DOCUMENT_POSITION_PRECEDING:{value:rU},DOCUMENT_POSITION_FOLLOWING:{value:nU},DOCUMENT_POSITION_CONTAINS:{value:hj},DOCUMENT_POSITION_CONTAINED_BY:{value:dU},DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:{value:oU}})});var cj=N((v8$,mj)=>{mj.exports=class extends Array{constructor(D){super(D&&D.length||0);if(D)for(var X in D)this[X]=D[X]}item(D){return this[D]||null}}});var ij=N((k8$,lj)=>{function Zf($){return this[$]||null}function Tf($){if(!$)$=[];return $.item=Zf,$}lj.exports=Tf});var bD=N((C8$,pj)=>{var tU;try{tU=cj()}catch($){tU=ij()}pj.exports=tU});var M3=N((y8$,dj)=>{dj.exports=nj;var rj=f6(),vf=bD();function nj(){rj.call(this),this._firstChild=this._childNodes=null}nj.prototype=Object.create(rj.prototype,{hasChildNodes:{value:function(){if(this._childNodes)return this._childNodes.length>0;return this._firstChild!==null}},childNodes:{get:function(){return this._ensureChildNodes(),this._childNodes}},firstChild:{get:function(){if(this._childNodes)return this._childNodes.length===0?null:this._childNodes[0];return this._firstChild}},lastChild:{get:function(){var $=this._childNodes,D;if($)return $.length===0?null:$[$.length-1];if(D=this._firstChild,D===null)return null;return D._previousSibling}},_ensureChildNodes:{value:function(){if(this._childNodes)return;var $=this._firstChild,D=$,X=this._childNodes=new vf;if($)do X.push(D),D=D._nextSibling;while(D!==$);this._firstChild=null}},removeChildren:{value:function(){var D=this.rooted?this.ownerDocument:null,X=this.firstChild,G;while(X!==null){if(G=X,X=G.nextSibling,D)D.mutateRemove(G);G.parentNode=null}if(this._childNodes)this._childNodes.length=0;else this._firstChild=null;this.modify()}}})});var S3=N((mf)=>{mf.isValidName=uf;mf.isValidQName=ff;var kf=/^[_:A-Za-z][-.:\w]+$/,Cf=/^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/,q9="_A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",H9="-._A-Za-z0-9·À-ÖØ-öø-˿̀-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",jD="["+q9+"]["+H9+"]*",aU=q9+":",sU=H9+":",yf=new RegExp("^["+aU+"]["+sU+"]*$"),gf=new RegExp("^("+jD+"|"+jD+":"+jD+")$"),oj=/[\uD800-\uDB7F\uDC00-\uDFFF]/,tj=/[\uD800-\uDB7F\uDC00-\uDFFF]/g,aj=/[\uD800-\uDB7F][\uDC00-\uDFFF]/g;q9+="\uD800-\uDB7F\uDC00-\uDFFF";H9+="\uD800-\uDB7F\uDC00-\uDFFF";jD="["+q9+"]["+H9+"]*";aU=q9+":";sU=H9+":";var xf=new RegExp("^["+aU+"]["+sU+"]*$"),hf=new RegExp("^("+jD+"|"+jD+":"+jD+")$");function uf($){if(kf.test($))return!0;if(yf.test($))return!0;if(!oj.test($))return!1;if(!xf.test($))return!1;var D=$.match(tj),X=$.match(aj);return X!==null&&2*X.length===D.length}function ff($){if(Cf.test($))return!0;if(gf.test($))return!0;if(!oj.test($))return!1;if(!hf.test($))return!1;var D=$.match(tj),X=$.match(aj);return X!==null&&2*X.length===D.length}});var eU=N((rf)=>{var sj=M6();rf.property=function($){if(Array.isArray($.type)){var D=Object.create(null);$.type.forEach(function(J){D[J.value||J]=J.alias||J});var X=$.missing;if(X===void 0)X=null;var G=$.invalid;if(G===void 0)G=X;return{get:function(){var J=this._getattr($.name);if(J===null)return X;if(J=D[J.toLowerCase()],J!==void 0)return J;if(G!==null)return G;return J},set:function(J){this._setattr($.name,J)}}}else if($.type===Boolean)return{get:function(){return this.hasAttribute($.name)},set:function(J){if(J)this._setattr($.name,"");else this.removeAttribute($.name)}};else if($.type===Number||$.type==="long"||$.type==="unsigned long"||$.type==="limited unsigned long with fallback")return pf($);else if(!$.type||$.type===String)return{get:function(){return this._getattr($.name)||""},set:function(J){if($.treatNullAsEmptyString&&J===null)J="";this._setattr($.name,J)}};else if(typeof $.type==="function")return $.type($.name,$);throw Error("Invalid attribute definition")};function pf($){var D;if(typeof $.default==="function")D=$.default;else if(typeof $.default==="number")D=function(){return $.default};else D=function(){sj.assert(!1,typeof $.default)};var X=$.type==="unsigned long",G=$.type==="long",J=$.type==="limited unsigned long with fallback",Y=$.min,Q=$.max,W=$.setmin;if(Y===void 0){if(X)Y=0;if(G)Y=-2147483648;if(J)Y=1}if(Q===void 0){if(X||G||J)Q=2147483647}return{get:function(){var I=this._getattr($.name),U=$.float?parseFloat(I):parseInt(I,10);if(I===null||!isFinite(U)||Y!==void 0&&U<Y||Q!==void 0&&U>Q)return D.call(this);if(X||G||J){if(!/^[ \t\n\f\r]*[-+]?[0-9]/.test(I))return D.call(this);U=U|0}return U},set:function(I){if(!$.float)I=Math.floor(I);if(W!==void 0&&I<W)sj.IndexSizeError($.name+" set to "+I);if(X)I=I<0||I>2147483647?D.call(this):I|0;else if(J)I=I<1||I>2147483647?D.call(this):I|0;else if(G)I=I<-2147483648||I>2147483647?D.call(this):I|0;this._setattr($.name,String(I))}}}rf.registerChangeHandler=function($,D,X){var G=$.prototype;if(!Object.prototype.hasOwnProperty.call(G,"_attributeChangeHandlers"))G._attributeChangeHandlers=Object.create(G._attributeChangeHandlers||null);G._attributeChangeHandlers[D]=X}});var D2=N((h8$,$2)=>{$2.exports=ej;var of=f6();function ej($,D){this.root=$,this.filter=D,this.lastModTime=$.lastModTime,this.done=!1,this.cache=[],this.traverse()}ej.prototype=Object.create(Object.prototype,{length:{get:function(){if(this.checkcache(),!this.done)this.traverse();return this.cache.length}},item:{value:function($){if(this.checkcache(),!this.done&&$>=this.cache.length)this.traverse();return this.cache[$]}},checkcache:{value:function(){if(this.lastModTime!==this.root.lastModTime){for(var $=this.cache.length-1;$>=0;$--)this[$]=void 0;this.cache.length=0,this.done=!1,this.lastModTime=this.root.lastModTime}}},traverse:{value:function($){if($!==void 0)$++;var D;while((D=this.next())!==null)if(this[this.cache.length]=D,this.cache.push(D),$&&this.cache.length===$)return;this.done=!0}},next:{value:function(){var $=this.cache.length===0?this.root:this.cache[this.cache.length-1],D;if($.nodeType===of.DOCUMENT_NODE)D=$.documentElement;else D=$.nextElement(this.root);while(D){if(this.filter(D))return D;D=D.nextElement(this.root)}return null}}})});var D7=N((u8$,G2)=>{var $7=M6();G2.exports=J2;function J2($,D){this._getString=$,this._setString=D,this._length=0,this._lastStringValue="",this._update()}Object.defineProperties(J2.prototype,{length:{get:function(){return this._length}},item:{value:function($){var D=HX(this);if($<0||$>=D.length)return null;return D[$]}},contains:{value:function($){$=String($);var D=HX(this);return D.indexOf($)>-1}},add:{value:function(){var $=HX(this);for(var D=0,X=arguments.length;D<X;D++){var G=K9(arguments[D]);if($.indexOf(G)<0)$.push(G)}this._update($)}},remove:{value:function(){var $=HX(this);for(var D=0,X=arguments.length;D<X;D++){var G=K9(arguments[D]),J=$.indexOf(G);if(J>-1)$.splice(J,1)}this._update($)}},toggle:{value:function(D,X){if(D=K9(D),this.contains(D)){if(X===void 0||X===!1)return this.remove(D),!1;return!0}else{if(X===void 0||X===!0)return this.add(D),!0;return!1}}},replace:{value:function(D,X){if(String(X)==="")$7.SyntaxError();D=K9(D),X=K9(X);var G=HX(this),J=G.indexOf(D);if(J<0)return!1;var Y=G.indexOf(X);if(Y<0)G[J]=X;else if(J<Y)G[J]=X,G.splice(Y,1);else G.splice(J,1);return this._update(G),!0}},toString:{value:function(){return this._getString()}},value:{get:function(){return this._getString()},set:function($){this._setString($),this._update()}},_update:{value:function($){if($)X2(this,$),this._setString($.join(" ").trim());else X2(this,HX(this));this._lastStringValue=this._getString()}}});function X2($,D){var X=$._length,G;$._length=D.length;for(G=0;G<D.length;G++)$[G]=D[G];for(;G<X;G++)$[G]=void 0}function K9($){if($=String($),$==="")$7.SyntaxError();if(/[ \t\r\n\f]/.test($))$7.InvalidCharacterError();return $}function tf($){var D=$._length,X=Array(D);for(var G=0;G<D;G++)X[G]=$[G];return X}function HX($){var D=$._getString();if(D===$._lastStringValue)return tf($);var X=D.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g,"");if(X==="")return[];else{var G=Object.create(null);return X.split(/[ \t\r\n\f]+/g).filter(function(J){var Y="$"+J;if(G[Y])return!1;return G[Y]=!0,!0})}}});var R3=N((wX,B2)=>{var P3=Object.create(null,{location:{get:function(){throw Error("window.location is not supported.")}}}),af=function($,D){return $.compareDocumentPosition(D)},sf=function($,D){return af($,D)&2?1:-1},N3=function($){while(($=$.nextSibling)&&$.nodeType!==1);return $},VX=function($){while(($=$.previousSibling)&&$.nodeType!==1);return $},ef=function($){if($=$.firstChild)while($.nodeType!==1&&($=$.nextSibling));return $},$m=function($){if($=$.lastChild)while($.nodeType!==1&&($=$.previousSibling));return $},KX=function($){if(!$.parentNode)return!1;var D=$.parentNode.nodeType;return D===1||D===9},Y2=function($){if(!$)return $;var D=$[0];if(D==='"'||D==="'"){if($[$.length-1]===D)$=$.slice(1,-1);else $=$.slice(1);return $.replace(I$.str_escape,function(X){var G=/^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(X);if(!G)return X.slice(1);if(G[2])return"";var J=parseInt(G[1],16);return String.fromCodePoint?String.fromCodePoint(J):String.fromCharCode(J)})}else if(I$.ident.test($))return P0($);else return $},P0=function($){return $.replace(I$.escape,function(D){var X=/^\\([0-9A-Fa-f]+)/.exec(D);if(!X)return D[1];var G=parseInt(X[1],16);return String.fromCodePoint?String.fromCodePoint(G):String.fromCharCode(G)})},Dm=function(){if(Array.prototype.indexOf)return Array.prototype.indexOf;return function($,D){var X=this.length;while(X--)if(this[X]===D)return X;return-1}}(),W2=function($,D){var X=I$.inside.source.replace(/</g,$).replace(/>/g,D);return new RegExp(X)},L1=function($,D,X){return $=$.source,$=$.replace(D,X.source||X),new RegExp($)},Q2=function($,D){return $.replace(/^(?:\w+:\/\/|\/+)/,"").replace(/(?:\/+|\/*#.*?)$/,"").split("/",D).join("/")},Xm=function($,D){var X=$.replace(/\s+/g,""),G;if(X==="even")X="2n+0";else if(X==="odd")X="2n+1";else if(X.indexOf("n")===-1)X="0n"+X;return G=/^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(X),{group:G[1]==="-"?-(G[2]||1):+(G[2]||1),offset:G[4]?G[3]==="-"?-G[4]:+G[4]:0}},X7=function($,D,X){var G=Xm($),J=G.group,Y=G.offset,Q=!X?ef:$m,W=!X?N3:VX;return function(I){if(!KX(I))return;var U=Q(I.parentNode),B=0;while(U){if(D(U,I))B++;if(U===I)return B-=Y,J&&B?B%J===0&&B<0===J<0:!B;U=W(U)}}},k6={"*":function(){return function(){return!0}}(),type:function($){return $=$.toLowerCase(),function(D){return D.nodeName.toLowerCase()===$}},attr:function($,D,X,G){return D=I2[D],function(J){var Y;switch($){case"for":Y=J.htmlFor;break;case"class":if(Y=J.className,Y===""&&J.getAttribute("class")==null)Y=null;break;case"href":case"src":Y=J.getAttribute($,2);break;case"title":Y=J.getAttribute("title")||null;break;case"id":case"lang":case"dir":case"accessKey":case"hidden":case"tabIndex":case"style":if(J.getAttribute){Y=J.getAttribute($);break}default:if(J.hasAttribute&&!J.hasAttribute($))break;Y=J[$]!=null?J[$]:J.getAttribute&&J.getAttribute($);break}if(Y==null)return;if(Y=Y+"",G)Y=Y.toLowerCase(),X=X.toLowerCase();return D(Y,X)}},":first-child":function($){return!VX($)&&KX($)},":last-child":function($){return!N3($)&&KX($)},":only-child":function($){return!VX($)&&!N3($)&&KX($)},":nth-child":function($,D){return X7($,function(){return!0},D)},":nth-last-child":function($){return k6[":nth-child"]($,!0)},":root":function($){return $.ownerDocument.documentElement===$},":empty":function($){return!$.firstChild},":not":function($){var D=G7($);return function(X){return!D(X)}},":first-of-type":function($){if(!KX($))return;var D=$.nodeName;while($=VX($))if($.nodeName===D)return;return!0},":last-of-type":function($){if(!KX($))return;var D=$.nodeName;while($=N3($))if($.nodeName===D)return;return!0},":only-of-type":function($){return k6[":first-of-type"]($)&&k6[":last-of-type"]($)},":nth-of-type":function($,D){return X7($,function(X,G){return X.nodeName===G.nodeName},D)},":nth-last-of-type":function($){return k6[":nth-of-type"]($,!0)},":checked":function($){return!!($.checked||$.selected)},":indeterminate":function($){return!k6[":checked"]($)},":enabled":function($){return!$.disabled&&$.type!=="hidden"},":disabled":function($){return!!$.disabled},":target":function($){return $.id===P3.location.hash.substring(1)},":focus":function($){return $===$.ownerDocument.activeElement},":is":function($){return G7($)},":matches":function($){return k6[":is"]($)},":nth-match":function($,D){var X=$.split(/\s*,\s*/),G=X.shift(),J=G7(X.join(","));return X7(G,J,D)},":nth-last-match":function($){return k6[":nth-match"]($,!0)},":links-here":function($){return $+""===P3.location+""},":lang":function($){return function(D){while(D){if(D.lang)return D.lang.indexOf($)===0;D=D.parentNode}}},":dir":function($){return function(D){while(D){if(D.dir)return D.dir===$;D=D.parentNode}}},":scope":function($,D){var X=D||$.ownerDocument;if(X.nodeType===9)return $===X.documentElement;return $===X},":any-link":function($){return typeof $.href==="string"},":local-link":function($){if($.nodeName)return $.href&&$.host===P3.location.host;var D=+$+1;return function(X){if(!X.href)return;var G=P3.location+"",J=X+"";return Q2(G,D)===Q2(J,D)}},":default":function($){return!!$.defaultSelected},":valid":function($){return $.willValidate||$.validity&&$.validity.valid},":invalid":function($){return!k6[":valid"]($)},":in-range":function($){return $.value>$.min&&$.value<=$.max},":out-of-range":function($){return!k6[":in-range"]($)},":required":function($){return!!$.required},":optional":function($){return!$.required},":read-only":function($){if($.readOnly)return!0;var D=$.getAttribute("contenteditable"),X=$.contentEditable,G=$.nodeName.toLowerCase();return G=G!=="input"&&G!=="textarea",(G||$.disabled)&&D==null&&X!=="true"},":read-write":function($){return!k6[":read-only"]($)},":hover":function(){throw Error(":hover is not supported.")},":active":function(){throw Error(":active is not supported.")},":link":function(){throw Error(":link is not supported.")},":visited":function(){throw Error(":visited is not supported.")},":column":function(){throw Error(":column is not supported.")},":nth-column":function(){throw Error(":nth-column is not supported.")},":nth-last-column":function(){throw Error(":nth-last-column is not supported.")},":current":function(){throw Error(":current is not supported.")},":past":function(){throw Error(":past is not supported.")},":future":function(){throw Error(":future is not supported.")},":contains":function($){return function(D){var X=D.innerText||D.textContent||D.value||"";return X.indexOf($)!==-1}},":has":function($){return function(D){return U2($,D).length>0}}},I2={"-":function(){return!0},"=":function($,D){return $===D},"*=":function($,D){return $.indexOf(D)!==-1},"~=":function($,D){var X,G,J,Y;for(G=0;;G=X+1){if(X=$.indexOf(D,G),X===-1)return!1;if(J=$[X-1],Y=$[X+D.length],(!J||J===" ")&&(!Y||Y===" "))return!0}},"|=":function($,D){var X=$.indexOf(D),G;if(X!==0)return;return G=$[X+D.length],G==="-"||!G},"^=":function($,D){return $.indexOf(D)===0},"$=":function($,D){var X=$.lastIndexOf(D);return X!==-1&&X+D.length===$.length},"!=":function($,D){return $!==D}},V9={" ":function($){return function(D){while(D=D.parentNode)if($(D))return D}},">":function($){return function(D){if(D=D.parentNode)return $(D)&&D}},"+":function($){return function(D){if(D=VX(D))return $(D)&&D}},"~":function($){return function(D){while(D=VX(D))if($(D))return D}},noop:function($){return function(D){return $(D)&&D}},ref:function($,D){var X;function G(J){var Y=J.ownerDocument,Q=Y.getElementsByTagName("*"),W=Q.length;while(W--)if(X=Q[W],G.test(J))return X=null,!0;X=null}return G.combinator=function(J){if(!X||!X.getAttribute)return;var Y=X.getAttribute(D)||"";if(Y[0]==="#")Y=Y.substring(1);if(Y===J.id&&$(X))return X},G}},I$={escape:/\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g,str_escape:/(escape)|\\(\n|\r\n?|\f)/g,nonascii:/[\u00A0-\uFFFF]/,cssid:/(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/,qname:/^ *(cssid|\*)/,simple:/^(?:([.#]cssid)|pseudo|attr)/,ref:/^ *\/(cssid)\/ */,combinator:/^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/,attr:/^\[(cssid)(?:([^\w]?=)(inside))?\]/,pseudo:/^(:cssid)(?:\((inside)\))?/,inside:/(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/,ident:/^(cssid)$/};I$.cssid=L1(I$.cssid,"nonascii",I$.nonascii);I$.cssid=L1(I$.cssid,"escape",I$.escape);I$.qname=L1(I$.qname,"cssid",I$.cssid);I$.simple=L1(I$.simple,"cssid",I$.cssid);I$.ref=L1(I$.ref,"cssid",I$.cssid);I$.attr=L1(I$.attr,"cssid",I$.cssid);I$.pseudo=L1(I$.pseudo,"cssid",I$.cssid);I$.inside=L1(I$.inside,`[^"'>]*`,I$.inside);I$.attr=L1(I$.attr,"inside",W2("\\[","\\]"));I$.pseudo=L1(I$.pseudo,"inside",W2("\\(","\\)"));I$.simple=L1(I$.simple,"pseudo",I$.pseudo);I$.simple=L1(I$.simple,"attr",I$.attr);I$.ident=L1(I$.ident,"cssid",I$.cssid);I$.str_escape=L1(I$.str_escape,"escape",I$.escape);var w9=function($){var D=$.replace(/^\s+|\s+$/g,""),X,G=[],J=[],Y,Q,W,I,U;while(D){if(W=I$.qname.exec(D))D=D.substring(W[0].length),Q=P0(W[1]),J.push(_3(Q,!0));else if(W=I$.simple.exec(D))D=D.substring(W[0].length),Q="*",J.push(_3(Q,!0)),J.push(_3(W));else throw SyntaxError("Invalid selector.");while(W=I$.simple.exec(D))D=D.substring(W[0].length),J.push(_3(W));if(D[0]==="!")D=D.substring(1),Y=Gm(),Y.qname=Q,J.push(Y.simple);if(W=I$.ref.exec(D)){D=D.substring(W[0].length),U=V9.ref(J7(J),P0(W[1])),G.push(U.combinator),J=[];continue}if(W=I$.combinator.exec(D)){if(D=D.substring(W[0].length),I=W[1]||W[2]||W[3],I===","){G.push(V9.noop(J7(J)));break}}else I="noop";if(!V9[I])throw SyntaxError("Bad combinator.");G.push(V9[I](J7(J))),J=[]}if(X=Jm(G),X.qname=Q,X.sel=D,Y)Y.lname=X.qname,Y.test=X,Y.qname=Y.qname,Y.sel=X.sel,X=Y;if(U)U.test=X,U.qname=X.qname,U.sel=X.sel,X=U;return X},_3=function($,D){if(D)return $==="*"?k6["*"]:k6.type($);if($[1])return $[1][0]==="."?k6.attr("class","~=",P0($[1].substring(1)),!1):k6.attr("id","=",P0($[1].substring(1)),!1);if($[2])return $[3]?k6[P0($[2])](Y2($[3])):k6[P0($[2])];if($[4]){var X=$[6],G=/["'\s]\s*I$/i.test(X);if(G)X=X.replace(/\s*I$/i,"");return k6.attr(P0($[4]),$[5]||"-",Y2(X),G)}throw SyntaxError("Unknown Selector.")},J7=function($){var D=$.length,X;if(D<2)return $[0];return function(G){if(!G)return;for(X=0;X<D;X++)if(!$[X](G))return;return!0}},Jm=function($){if($.length<2)return function(D){return!!$[0](D)};return function(D){var X=$.length;while(X--)if(!(D=$[X](D)))return;return!0}},Gm=function(){var $;function D(X){var G=X.ownerDocument,J=G.getElementsByTagName(D.lname),Y=J.length;while(Y--)if(D.test(J[Y])&&$===X)return $=null,!0;$=null}return D.simple=function(X){return $=X,!0},D},G7=function($){var D=w9($),X=[D];while(D.sel)D=w9(D.sel),X.push(D);if(X.length<2)return D;return function(G){var J=X.length,Y=0;for(;Y<J;Y++)if(X[Y](G))return!0}},U2=function($,D){var X=[],G=w9($),J=D.getElementsByTagName(G.qname),Y=0,Q;while(Q=J[Y++])if(G(Q))X.push(Q);if(G.sel){while(G.sel){G=w9(G.sel),J=D.getElementsByTagName(G.qname),Y=0;while(Q=J[Y++])if(G(Q)&&Dm.call(X,Q)===-1)X.push(Q)}X.sort(sf)}return X};B2.exports=wX=function($,D){var X,G;if(D.nodeType!==11&&$.indexOf(" ")===-1){if($[0]==="#"&&D.rooted&&/^#[A-Z_][-A-Z0-9_]*$/i.test($)){if(D.doc._hasMultipleElementsWithId){if(X=$.substring(1),!D.doc._hasMultipleElementsWithId(X))return G=D.doc.getElementById(X),G?[G]:[]}}if($[0]==="."&&/^\.\w+$/.test($))return D.getElementsByClassName($.substring(1));if(/^\w+$/.test($))return D.getElementsByTagName($)}return U2($,D)};wX.selectors=k6;wX.operators=I2;wX.combinators=V9;wX.matches=function($,D){var X={sel:D};do if(X=w9(X.sel),X($))return!0;while(X.sel);return!1}});var E3=N((f8$,z2)=>{var Ym=f6(),Qm=fU(),Y7=function($,D){var X=$.createDocumentFragment();for(var G=0;G<D.length;G++){var J=D[G],Y=J instanceof Ym;X.appendChild(Y?J:$.createTextNode(String(J)))}return X},Wm={after:{value:function(){var D=Array.prototype.slice.call(arguments),X=this.parentNode,G=this.nextSibling;if(X===null)return;while(G&&D.some(function(Y){return Y===G}))G=G.nextSibling;var J=Y7(this.doc,D);X.insertBefore(J,G)}},before:{value:function(){var D=Array.prototype.slice.call(arguments),X=this.parentNode,G=this.previousSibling;if(X===null)return;while(G&&D.some(function(Q){return Q===G}))G=G.previousSibling;var J=Y7(this.doc,D),Y=G?G.nextSibling:X.firstChild;X.insertBefore(J,Y)}},remove:{value:function(){if(this.parentNode===null)return;if(this.doc){if(this.doc._preremoveNodeIterators(this),this.rooted)this.doc.mutateRemove(this)}this._remove(),this.parentNode=null}},_remove:{value:function(){var D=this.parentNode;if(D===null)return;if(D._childNodes)D._childNodes.splice(this.index,1);else if(D._firstChild===this)if(this._nextSibling===this)D._firstChild=null;else D._firstChild=this._nextSibling;Qm.remove(this),D.modify()}},replaceWith:{value:function(){var D=Array.prototype.slice.call(arguments),X=this.parentNode,G=this.nextSibling;if(X===null)return;while(G&&D.some(function(Y){return Y===G}))G=G.nextSibling;var J=Y7(this.doc,D);if(this.parentNode===X)X.replaceChild(J,this);else X.insertBefore(J,G)}}};z2.exports=Wm});var Q7=N((m8$,H2)=>{var q2=f6(),Im={nextElementSibling:{get:function(){if(this.parentNode){for(var $=this.nextSibling;$!==null;$=$.nextSibling)if($.nodeType===q2.ELEMENT_NODE)return $}return null}},previousElementSibling:{get:function(){if(this.parentNode){for(var $=this.previousSibling;$!==null;$=$.previousSibling)if($.nodeType===q2.ELEMENT_NODE)return $}return null}}};H2.exports=Im});var W7=N((c8$,V2)=>{V2.exports=K2;var LX=M6();function K2($){this.element=$}Object.defineProperties(K2.prototype,{length:{get:LX.shouldOverride},item:{value:LX.shouldOverride},getNamedItem:{value:function(D){return this.element.getAttributeNode(D)}},getNamedItemNS:{value:function(D,X){return this.element.getAttributeNodeNS(D,X)}},setNamedItem:{value:LX.nyi},setNamedItemNS:{value:LX.nyi},removeNamedItem:{value:function(D){var X=this.element.getAttributeNode(D);if(X)return this.element.removeAttribute(D),X;LX.NotFoundError()}},removeNamedItemNS:{value:function(D,X){var G=this.element.getAttributeNodeNS(D,X);if(G)return this.element.removeAttributeNS(D,X),G;LX.NotFoundError()}}})});var FX=N((l8$,b2)=>{b2.exports=_0;var I7=S3(),O6=M6(),P4=O6.NAMESPACE,T3=eU(),G4=f6(),U7=bD(),Um=mU(),Z3=D2(),OX=F3(),Bm=D7(),B7=R3(),L2=M3(),zm=E3(),qm=Q7(),O2=W7(),w2=Object.create(null);function _0($,D,X,G){L2.call(this),this.nodeType=G4.ELEMENT_NODE,this.ownerDocument=$,this.localName=D,this.namespaceURI=X,this.prefix=G,this._tagName=void 0,this._attrsByQName=Object.create(null),this._attrsByLName=Object.create(null),this._attrKeys=[]}function z7($,D){if($.nodeType===G4.TEXT_NODE)D.push($._data);else for(var X=0,G=$.childNodes.length;X<G;X++)z7($.childNodes[X],D)}_0.prototype=Object.create(L2.prototype,{isHTML:{get:function(){return this.namespaceURI===P4.HTML&&this.ownerDocument.isHTML}},tagName:{get:function(){if(this._tagName===void 0){var D;if(this.prefix===null)D=this.localName;else D=this.prefix+":"+this.localName;if(this.isHTML){var X=w2[D];if(!X)w2[D]=X=O6.toASCIIUpperCase(D);D=X}this._tagName=D}return this._tagName}},nodeName:{get:function(){return this.tagName}},nodeValue:{get:function(){return null},set:function(){}},textContent:{get:function(){var $=[];return z7(this,$),$.join("")},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerText:{get:function(){var $=[];return z7(this,$),$.join("").replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerHTML:{get:function(){return this.serialize()},set:O6.nyi},outerHTML:{get:function(){return Um.serializeOne(this,{nodeType:0})},set:function($){var D=this.ownerDocument,X=this.parentNode;if(X===null)return;if(X.nodeType===G4.DOCUMENT_NODE)O6.NoModificationAllowedError();if(X.nodeType===G4.DOCUMENT_FRAGMENT_NODE)X=X.ownerDocument.createElement("body");var G=D.implementation.mozHTMLParser(D._address,X);G.parse($===null?"":String($),!0),this.replaceWith(G._asDocumentFragment())}},_insertAdjacent:{value:function(D,X){var G=!1;switch(D){case"beforebegin":G=!0;case"afterend":var J=this.parentNode;if(J===null)return null;return J.insertBefore(X,G?this:this.nextSibling);case"afterbegin":G=!0;case"beforeend":return this.insertBefore(X,G?this.firstChild:null);default:return O6.SyntaxError()}}},insertAdjacentElement:{value:function(D,X){if(X.nodeType!==G4.ELEMENT_NODE)throw TypeError("not an element");return D=O6.toASCIILowerCase(String(D)),this._insertAdjacent(D,X)}},insertAdjacentText:{value:function(D,X){var G=this.ownerDocument.createTextNode(X);D=O6.toASCIILowerCase(String(D)),this._insertAdjacent(D,G)}},insertAdjacentHTML:{value:function(D,X){D=O6.toASCIILowerCase(String(D)),X=String(X);var G;switch(D){case"beforebegin":case"afterend":if(G=this.parentNode,G===null||G.nodeType===G4.DOCUMENT_NODE)O6.NoModificationAllowedError();break;case"afterbegin":case"beforeend":G=this;break;default:O6.SyntaxError()}if(!(G instanceof _0)||G.ownerDocument.isHTML&&G.localName==="html"&&G.namespaceURI===P4.HTML)G=G.ownerDocument.createElementNS(P4.HTML,"body");var J=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,G);J.parse(X,!0),this._insertAdjacent(D,J._asDocumentFragment())}},children:{get:function(){if(!this._children)this._children=new F2(this);return this._children}},attributes:{get:function(){if(!this._attributes)this._attributes=new H7(this);return this._attributes}},firstElementChild:{get:function(){for(var $=this.firstChild;$!==null;$=$.nextSibling)if($.nodeType===G4.ELEMENT_NODE)return $;return null}},lastElementChild:{get:function(){for(var $=this.lastChild;$!==null;$=$.previousSibling)if($.nodeType===G4.ELEMENT_NODE)return $;return null}},childElementCount:{get:function(){return this.children.length}},nextElement:{value:function($){if(!$)$=this.ownerDocument.documentElement;var D=this.firstElementChild;if(!D){if(this===$)return null;D=this.nextElementSibling}if(D)return D;for(var X=this.parentElement;X&&X!==$;X=X.parentElement)if(D=X.nextElementSibling,D)return D;return null}},getElementsByTagName:{value:function(D){var X;if(!D)return new U7;if(D==="*")X=function(){return!0};else if(this.isHTML)X=Hm(D);else X=q7(D);return new Z3(this,X)}},getElementsByTagNameNS:{value:function(D,X){var G;if(D==="*"&&X==="*")G=function(){return!0};else if(D==="*")G=q7(X);else if(X==="*")G=Km(D);else G=Vm(D,X);return new Z3(this,G)}},getElementsByClassName:{value:function(D){if(D=String(D).trim(),D===""){var X=new U7;return X}return D=D.split(/[ \t\r\n\f]+/),new Z3(this,wm(D))}},getElementsByName:{value:function(D){return new Z3(this,Lm(String(D)))}},clone:{value:function(){var D;if(this.namespaceURI!==P4.HTML||this.prefix||!this.ownerDocument.isHTML)D=this.ownerDocument.createElementNS(this.namespaceURI,this.prefix!==null?this.prefix+":"+this.localName:this.localName);else D=this.ownerDocument.createElement(this.localName);for(var X=0,G=this._attrKeys.length;X<G;X++){var J=this._attrKeys[X],Y=this._attrsByLName[J],Q=Y.cloneNode();Q._setOwnerElement(D),D._attrsByLName[J]=Q,D._addQName(Q)}return D._attrKeys=this._attrKeys.concat(),D}},isEqual:{value:function(D){if(this.localName!==D.localName||this.namespaceURI!==D.namespaceURI||this.prefix!==D.prefix||this._numattrs!==D._numattrs)return!1;for(var X=0,G=this._numattrs;X<G;X++){var J=this._attr(X);if(!D.hasAttributeNS(J.namespaceURI,J.localName))return!1;if(D.getAttributeNS(J.namespaceURI,J.localName)!==J.value)return!1}return!0}},_lookupNamespacePrefix:{value:function(D,X){if(this.namespaceURI&&this.namespaceURI===D&&this.prefix!==null&&X.lookupNamespaceURI(this.prefix)===D)return this.prefix;for(var G=0,J=this._numattrs;G<J;G++){var Y=this._attr(G);if(Y.prefix==="xmlns"&&Y.value===D&&X.lookupNamespaceURI(Y.localName)===D)return Y.localName}var Q=this.parentElement;return Q?Q._lookupNamespacePrefix(D,X):null}},lookupNamespaceURI:{value:function(D){if(D===""||D===void 0)D=null;if(this.namespaceURI!==null&&this.prefix===D)return this.namespaceURI;for(var X=0,G=this._numattrs;X<G;X++){var J=this._attr(X);if(J.namespaceURI===P4.XMLNS){if(J.prefix==="xmlns"&&J.localName===D||D===null&&J.prefix===null&&J.localName==="xmlns")return J.value||null}}var Y=this.parentElement;return Y?Y.lookupNamespaceURI(D):null}},getAttribute:{value:function(D){var X=this.getAttributeNode(D);return X?X.value:null}},getAttributeNS:{value:function(D,X){var G=this.getAttributeNodeNS(D,X);return G?G.value:null}},getAttributeNode:{value:function(D){if(D=String(D),/[A-Z]/.test(D)&&this.isHTML)D=O6.toASCIILowerCase(D);var X=this._attrsByQName[D];if(!X)return null;if(Array.isArray(X))X=X[0];return X}},getAttributeNodeNS:{value:function(D,X){D=D===void 0||D===null?"":String(D),X=String(X);var G=this._attrsByLName[D+"|"+X];return G?G:null}},hasAttribute:{value:function(D){if(D=String(D),/[A-Z]/.test(D)&&this.isHTML)D=O6.toASCIILowerCase(D);return this._attrsByQName[D]!==void 0}},hasAttributeNS:{value:function(D,X){D=D===void 0||D===null?"":String(D),X=String(X);var G=D+"|"+X;return this._attrsByLName[G]!==void 0}},hasAttributes:{value:function(){return this._numattrs>0}},toggleAttribute:{value:function(D,X){if(D=String(D),!I7.isValidName(D))O6.InvalidCharacterError();if(/[A-Z]/.test(D)&&this.isHTML)D=O6.toASCIILowerCase(D);var G=this._attrsByQName[D];if(G===void 0){if(X===void 0||X===!0)return this._setAttribute(D,""),!0;return!1}else{if(X===void 0||X===!1)return this.removeAttribute(D),!1;return!0}}},_setAttribute:{value:function(D,X){var G=this._attrsByQName[D],J;if(!G)G=this._newattr(D),J=!0;else if(Array.isArray(G))G=G[0];if(G.value=X,this._attributes)this._attributes[D]=G;if(J&&this._newattrhook)this._newattrhook(D,X)}},setAttribute:{value:function(D,X){if(D=String(D),!I7.isValidName(D))O6.InvalidCharacterError();if(/[A-Z]/.test(D)&&this.isHTML)D=O6.toASCIILowerCase(D);this._setAttribute(D,String(X))}},_setAttributeNS:{value:function(D,X,G){var J=X.indexOf(":"),Y,Q;if(J<0)Y=null,Q=X;else Y=X.substring(0,J),Q=X.substring(J+1);if(D===""||D===void 0)D=null;var W=(D===null?"":D)+"|"+Q,I=this._attrsByLName[W],U;if(!I){if(I=new L9(this,Q,Y,D),U=!0,this._attrsByLName[W]=I,this._attributes)this._attributes[this._attrKeys.length]=I;this._attrKeys.push(W),this._addQName(I)}if(I.value=G,U&&this._newattrhook)this._newattrhook(X,G)}},setAttributeNS:{value:function(D,X,G){if(D=D===null||D===void 0||D===""?null:String(D),X=String(X),!I7.isValidQName(X))O6.InvalidCharacterError();var J=X.indexOf(":"),Y=J<0?null:X.substring(0,J);if(Y!==null&&D===null||Y==="xml"&&D!==P4.XML||(X==="xmlns"||Y==="xmlns")&&D!==P4.XMLNS||D===P4.XMLNS&&!(X==="xmlns"||Y==="xmlns"))O6.NamespaceError();this._setAttributeNS(D,X,String(G))}},setAttributeNode:{value:function(D){if(D.ownerElement!==null&&D.ownerElement!==this)throw new OX(OX.INUSE_ATTRIBUTE_ERR);var X=null,G=this._attrsByQName[D.name];if(G){if(!Array.isArray(G))G=[G];if(G.some(function(J){return J===D}))return D;else if(D.ownerElement!==null)throw new OX(OX.INUSE_ATTRIBUTE_ERR);G.forEach(function(J){this.removeAttributeNode(J)},this),X=G[0]}return this.setAttributeNodeNS(D),X}},setAttributeNodeNS:{value:function(D){if(D.ownerElement!==null)throw new OX(OX.INUSE_ATTRIBUTE_ERR);var X=D.namespaceURI,G=(X===null?"":X)+"|"+D.localName,J=this._attrsByLName[G];if(J)this.removeAttributeNode(J);if(D._setOwnerElement(this),this._attrsByLName[G]=D,this._attributes)this._attributes[this._attrKeys.length]=D;if(this._attrKeys.push(G),this._addQName(D),this._newattrhook)this._newattrhook(D.name,D.value);return J||null}},removeAttribute:{value:function(D){if(D=String(D),/[A-Z]/.test(D)&&this.isHTML)D=O6.toASCIILowerCase(D);var X=this._attrsByQName[D];if(!X)return;if(Array.isArray(X))if(X.length>2)X=X.shift();else this._attrsByQName[D]=X[1],X=X[0];else this._attrsByQName[D]=void 0;var G=X.namespaceURI,J=(G===null?"":G)+"|"+X.localName;this._attrsByLName[J]=void 0;var Y=this._attrKeys.indexOf(J);if(this._attributes)Array.prototype.splice.call(this._attributes,Y,1),this._attributes[D]=void 0;this._attrKeys.splice(Y,1);var Q=X.onchange;if(X._setOwnerElement(null),Q)Q.call(X,this,X.localName,X.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(X)}},removeAttributeNS:{value:function(D,X){D=D===void 0||D===null?"":String(D),X=String(X);var G=D+"|"+X,J=this._attrsByLName[G];if(!J)return;this._attrsByLName[G]=void 0;var Y=this._attrKeys.indexOf(G);if(this._attributes)Array.prototype.splice.call(this._attributes,Y,1);this._attrKeys.splice(Y,1),this._removeQName(J);var Q=J.onchange;if(J._setOwnerElement(null),Q)Q.call(J,this,J.localName,J.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(J)}},removeAttributeNode:{value:function(D){var X=D.namespaceURI,G=(X===null?"":X)+"|"+D.localName;if(this._attrsByLName[G]!==D)O6.NotFoundError();return this.removeAttributeNS(X,D.localName),D}},getAttributeNames:{value:function(){var D=this;return this._attrKeys.map(function(X){return D._attrsByLName[X].name})}},_getattr:{value:function(D){var X=this._attrsByQName[D];return X?X.value:null}},_setattr:{value:function(D,X){var G=this._attrsByQName[D],J;if(!G)G=this._newattr(D),J=!0;if(G.value=String(X),this._attributes)this._attributes[D]=G;if(J&&this._newattrhook)this._newattrhook(D,X)}},_newattr:{value:function(D){var X=new L9(this,D,null,null),G="|"+D;if(this._attrsByQName[D]=X,this._attrsByLName[G]=X,this._attributes)this._attributes[this._attrKeys.length]=X;return this._attrKeys.push(G),X}},_addQName:{value:function($){var D=$.name,X=this._attrsByQName[D];if(!X)this._attrsByQName[D]=$;else if(Array.isArray(X))X.push($);else this._attrsByQName[D]=[X,$];if(this._attributes)this._attributes[D]=$}},_removeQName:{value:function($){var D=$.name,X=this._attrsByQName[D];if(Array.isArray(X)){var G=X.indexOf($);if(O6.assert(G!==-1),X.length===2){if(this._attrsByQName[D]=X[1-G],this._attributes)this._attributes[D]=this._attrsByQName[D]}else if(X.splice(G,1),this._attributes&&this._attributes[D]===$)this._attributes[D]=X[0]}else if(O6.assert(X===$),this._attrsByQName[D]=void 0,this._attributes)this._attributes[D]=void 0}},_numattrs:{get:function(){return this._attrKeys.length}},_attr:{value:function($){return this._attrsByLName[this._attrKeys[$]]}},id:T3.property({name:"id"}),className:T3.property({name:"class"}),classList:{get:function(){var $=this;if(this._classList)return this._classList;var D=new Bm(function(){return $.className||""},function(X){$.className=X});return this._classList=D,D},set:function($){this.className=$}},matches:{value:function($){return B7.matches(this,$)}},closest:{value:function($){var D=this;do{if(D.matches&&D.matches($))return D;D=D.parentElement||D.parentNode}while(D!==null&&D.nodeType===G4.ELEMENT_NODE);return null}},querySelector:{value:function($){return B7($,this)[0]}},querySelectorAll:{value:function($){var D=B7($,this);return D.item?D:new U7(D)}}});Object.defineProperties(_0.prototype,zm);Object.defineProperties(_0.prototype,qm);T3.registerChangeHandler(_0,"id",function($,D,X,G){if($.rooted){if(X)$.ownerDocument.delId(X,$);if(G)$.ownerDocument.addId(G,$)}});T3.registerChangeHandler(_0,"class",function($,D,X,G){if($._classList)$._classList._update()});function L9($,D,X,G,J){this.localName=D,this.prefix=X===null||X===""?null:""+X,this.namespaceURI=G===null||G===""?null:""+G,this.data=J,this._setOwnerElement($)}L9.prototype=Object.create(Object.prototype,{ownerElement:{get:function(){return this._ownerElement}},_setOwnerElement:{value:function(D){if(this._ownerElement=D,this.prefix===null&&this.namespaceURI===null&&D)this.onchange=D._attributeChangeHandlers[this.localName];else this.onchange=null}},name:{get:function(){return this.prefix?this.prefix+":"+this.localName:this.localName}},specified:{get:function(){return!0}},value:{get:function(){return this.data},set:function($){var D=this.data;if($=$===void 0?"":$+"",$===D)return;if(this.data=$,this.ownerElement){if(this.onchange)this.onchange(this.ownerElement,this.localName,D,$);if(this.ownerElement.rooted)this.ownerElement.ownerDocument.mutateAttr(this,D)}}},cloneNode:{value:function(D){return new L9(null,this.localName,this.prefix,this.namespaceURI,this.data)}},nodeType:{get:function(){return G4.ATTRIBUTE_NODE}},nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return this.value},set:function($){this.value=$}},textContent:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}},innerText:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}}});_0._Attr=L9;function H7($){O2.call(this,$);for(var D in $._attrsByQName)this[D]=$._attrsByQName[D];for(var X=0;X<$._attrKeys.length;X++)this[X]=$._attrsByLName[$._attrKeys[X]]}H7.prototype=Object.create(O2.prototype,{length:{get:function(){return this.element._attrKeys.length},set:function(){}},item:{value:function($){if($=$>>>0,$>=this.length)return null;return this.element._attrsByLName[this.element._attrKeys[$]]}}});if(globalThis.Symbol?.iterator)H7.prototype[globalThis.Symbol.iterator]=function(){var $=0,D=this.length,X=this;return{next:function(){if($<D)return{value:X.item($++)};return{done:!0}}}};function F2($){this.element=$,this.updateCache()}F2.prototype=Object.create(Object.prototype,{length:{get:function(){return this.updateCache(),this.childrenByNumber.length}},item:{value:function(D){return this.updateCache(),this.childrenByNumber[D]||null}},namedItem:{value:function(D){return this.updateCache(),this.childrenByName[D]||null}},namedItems:{get:function(){return this.updateCache(),this.childrenByName}},updateCache:{value:function(){var D=/^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/;if(this.lastModTime!==this.element.lastModTime){this.lastModTime=this.element.lastModTime;var X=this.childrenByNumber&&this.childrenByNumber.length||0;for(var G=0;G<X;G++)this[G]=void 0;this.childrenByNumber=[],this.childrenByName=Object.create(null);for(var J=this.element.firstChild;J!==null;J=J.nextSibling)if(J.nodeType===G4.ELEMENT_NODE){this[this.childrenByNumber.length]=J,this.childrenByNumber.push(J);var Y=J.getAttribute("id");if(Y&&!this.childrenByName[Y])this.childrenByName[Y]=J;var Q=J.getAttribute("name");if(Q&&this.element.namespaceURI===P4.HTML&&D.test(this.element.localName)&&!this.childrenByName[Q])this.childrenByName[Y]=J}}}}});function q7($){return function(D){return D.localName===$}}function Hm($){var D=O6.toASCIILowerCase($);if(D===$)return q7($);return function(X){return X.isHTML?X.localName===D:X.localName===$}}function Km($){return function(D){return D.namespaceURI===$}}function Vm($,D){return function(X){return X.namespaceURI===$&&X.localName===D}}function wm($){return function(D){return $.every(function(X){return D.classList.contains(X)})}}function Lm($){return function(D){if(D.namespaceURI!==P4.HTML)return!1;return D.getAttribute("name")===$}}});var K7=N((i8$,P2)=>{P2.exports=S2;var A2=f6(),Om=bD(),M2=M6(),j2=M2.HierarchyRequestError,Fm=M2.NotFoundError;function S2(){A2.call(this)}S2.prototype=Object.create(A2.prototype,{hasChildNodes:{value:function(){return!1}},firstChild:{value:null},lastChild:{value:null},insertBefore:{value:function($,D){if(!$.nodeType)throw TypeError("not a node");j2()}},replaceChild:{value:function($,D){if(!$.nodeType)throw TypeError("not a node");j2()}},removeChild:{value:function($){if(!$.nodeType)throw TypeError("not a node");Fm()}},removeChildren:{value:function(){}},childNodes:{get:function(){if(!this._childNodes)this._childNodes=new Om;return this._childNodes}}})});var O9=N((p8$,R2)=>{R2.exports=v3;var N2=K7(),_2=M6(),bm=E3(),jm=Q7();function v3(){N2.call(this)}v3.prototype=Object.create(N2.prototype,{substringData:{value:function(D,X){if(arguments.length<2)throw TypeError("Not enough arguments");if(D=D>>>0,X=X>>>0,D>this.data.length||D<0||X<0)_2.IndexSizeError();return this.data.substring(D,D+X)}},appendData:{value:function(D){if(arguments.length<1)throw TypeError("Not enough arguments");this.data+=String(D)}},insertData:{value:function(D,X){return this.replaceData(D,0,X)}},deleteData:{value:function(D,X){return this.replaceData(D,X,"")}},replaceData:{value:function(D,X,G){var J=this.data,Y=J.length;if(D=D>>>0,X=X>>>0,G=String(G),D>Y||D<0)_2.IndexSizeError();if(D+X>Y)X=Y-D;var Q=J.substring(0,D),W=J.substring(D+X);this.data=Q+G+W}},isEqual:{value:function(D){return this._data===D._data}},length:{get:function(){return this.data.length}}});Object.defineProperties(v3.prototype,bm);Object.defineProperties(v3.prototype,jm)});var w7=N((r8$,v2)=>{v2.exports=V7;var E2=M6(),Z2=f6(),T2=O9();function V7($,D){T2.call(this),this.nodeType=Z2.TEXT_NODE,this.ownerDocument=$,this._data=D,this._index=void 0}var F9={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if($===this._data)return;if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this);if(this.parentNode&&this.parentNode._textchangehook)this.parentNode._textchangehook(this)}};V7.prototype=Object.create(T2.prototype,{nodeName:{value:"#text"},nodeValue:F9,textContent:F9,innerText:F9,data:{get:F9.get,set:function($){F9.set.call(this,$===null?"":String($))}},splitText:{value:function(D){if(D>this._data.length||D<0)E2.IndexSizeError();var X=this._data.substring(D),G=this.ownerDocument.createTextNode(X);this.data=this.data.substring(0,D);var J=this.parentNode;if(J!==null)J.insertBefore(G,this.nextSibling);return G}},wholeText:{get:function(){var D=this.textContent;for(var X=this.nextSibling;X;X=X.nextSibling){if(X.nodeType!==Z2.TEXT_NODE)break;D+=X.textContent}return D}},replaceWholeText:{value:E2.nyi},clone:{value:function(){return new V7(this.ownerDocument,this._data)}}})});var O7=N((n8$,C2)=>{C2.exports=L7;var Am=f6(),k2=O9();function L7($,D){k2.call(this),this.nodeType=Am.COMMENT_NODE,this.ownerDocument=$,this._data=D}var b9={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};L7.prototype=Object.create(k2.prototype,{nodeName:{value:"#comment"},nodeValue:b9,textContent:b9,innerText:b9,data:{get:b9.get,set:function($){b9.set.call(this,$===null?"":String($))}},clone:{value:function(){return new L7(this.ownerDocument,this._data)}}})});var b7=N((d8$,x2)=>{x2.exports=F7;var Mm=f6(),Sm=bD(),g2=M3(),k3=FX(),Pm=R3(),y2=M6();function F7($){g2.call(this),this.nodeType=Mm.DOCUMENT_FRAGMENT_NODE,this.ownerDocument=$}F7.prototype=Object.create(g2.prototype,{nodeName:{value:"#document-fragment"},nodeValue:{get:function(){return null},set:function(){}},textContent:Object.getOwnPropertyDescriptor(k3.prototype,"textContent"),innerText:Object.getOwnPropertyDescriptor(k3.prototype,"innerText"),querySelector:{value:function($){var D=this.querySelectorAll($);return D.length?D[0]:null}},querySelectorAll:{value:function($){var D=Object.create(this);D.isHTML=!0,D.getElementsByTagName=k3.prototype.getElementsByTagName,D.nextElement=Object.getOwnPropertyDescriptor(k3.prototype,"firstElementChild").get;var X=Pm($,D);return X.item?X:new Sm(X)}},clone:{value:function(){return new F7(this.ownerDocument)}},isEqual:{value:function(D){return!0}},innerHTML:{get:function(){return this.serialize()},set:y2.nyi},outerHTML:{get:function(){return this.serialize()},set:y2.nyi}})});var A7=N((o8$,u2)=>{u2.exports=j7;var _m=f6(),h2=O9();function j7($,D,X){h2.call(this),this.nodeType=_m.PROCESSING_INSTRUCTION_NODE,this.ownerDocument=$,this.target=D,this._data=X}var j9={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};j7.prototype=Object.create(h2.prototype,{nodeName:{get:function(){return this.target}},nodeValue:j9,textContent:j9,innerText:j9,data:{get:j9.get,set:function($){j9.set.call(this,$===null?"":String($))}},clone:{value:function(){return new j7(this.ownerDocument,this.target,this._data)}},isEqual:{value:function(D){return this.target===D.target&&this._data===D._data}}})});var A9=N((t8$,f2)=>{var M7={FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048};f2.exports=M7.constructor=M7.prototype=M7});var P7=N((s8$,c2)=>{var a8$=c2.exports={nextSkippingChildren:Nm,nextAncestorSibling:S7,next:Rm,previous:Em,deepLastChild:m2};function Nm($,D){if($===D)return null;if($.nextSibling!==null)return $.nextSibling;return S7($,D)}function S7($,D){for($=$.parentNode;$!==null;$=$.parentNode){if($===D)return null;if($.nextSibling!==null)return $.nextSibling}return null}function Rm($,D){var X=$.firstChild;if(X!==null)return X;if($===D)return null;if(X=$.nextSibling,X!==null)return X;return S7($,D)}function m2($){while($.lastChild)$=$.lastChild;return $}function Em($,D){var X=$.previousSibling;if(X!==null)return m2(X);if(X=$.parentNode,X===D)return null;return X}});var o2=N((e8$,d2)=>{d2.exports=n2;var Zm=f6(),m6=A9(),l2=P7(),r2=M6(),_7={first:"firstChild",last:"lastChild",next:"firstChild",previous:"lastChild"},N7={first:"nextSibling",last:"previousSibling",next:"nextSibling",previous:"previousSibling"};function i2($,D){var X,G,J,Y,Q;G=$._currentNode[_7[D]];while(G!==null){if(Y=$._internalFilter(G),Y===m6.FILTER_ACCEPT)return $._currentNode=G,G;if(Y===m6.FILTER_SKIP){if(X=G[_7[D]],X!==null){G=X;continue}}while(G!==null){if(Q=G[N7[D]],Q!==null){G=Q;break}if(J=G.parentNode,J===null||J===$.root||J===$._currentNode)return null;else G=J}}return null}function p2($,D){var X,G,J;if(X=$._currentNode,X===$.root)return null;while(!0){J=X[N7[D]];while(J!==null){if(X=J,G=$._internalFilter(X),G===m6.FILTER_ACCEPT)return $._currentNode=X,X;if(J=X[_7[D]],G===m6.FILTER_REJECT||J===null)J=X[N7[D]]}if(X=X.parentNode,X===null||X===$.root)return null;if($._internalFilter(X)===m6.FILTER_ACCEPT)return null}}function n2($,D,X){if(!$||!$.nodeType)r2.NotSupportedError();this._root=$,this._whatToShow=Number(D)||0,this._filter=X||null,this._active=!1,this._currentNode=$}Object.defineProperties(n2.prototype,{root:{get:function(){return this._root}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},currentNode:{get:function(){return this._currentNode},set:function(D){if(!(D instanceof Zm))throw TypeError("Not a Node");this._currentNode=D}},_internalFilter:{value:function(D){var X,G;if(this._active)r2.InvalidStateError();if(!(1<<D.nodeType-1&this._whatToShow))return m6.FILTER_SKIP;if(G=this._filter,G===null)X=m6.FILTER_ACCEPT;else{this._active=!0;try{if(typeof G==="function")X=G(D);else X=G.acceptNode(D)}finally{this._active=!1}}return+X}},parentNode:{value:function(){var D=this._currentNode;while(D!==this.root){if(D=D.parentNode,D===null)return null;if(this._internalFilter(D)===m6.FILTER_ACCEPT)return this._currentNode=D,D}return null}},firstChild:{value:function(){return i2(this,"first")}},lastChild:{value:function(){return i2(this,"last")}},previousSibling:{value:function(){return p2(this,"previous")}},nextSibling:{value:function(){return p2(this,"next")}},previousNode:{value:function(){var D,X,G,J;D=this._currentNode;while(D!==this._root){for(G=D.previousSibling;G;G=D.previousSibling){if(D=G,X=this._internalFilter(D),X===m6.FILTER_REJECT)continue;for(J=D.lastChild;J;J=D.lastChild)if(D=J,X=this._internalFilter(D),X===m6.FILTER_REJECT)break;if(X===m6.FILTER_ACCEPT)return this._currentNode=D,D}if(D===this.root||D.parentNode===null)return null;if(D=D.parentNode,this._internalFilter(D)===m6.FILTER_ACCEPT)return this._currentNode=D,D}return null}},nextNode:{value:function(){var D,X,G,J;D=this._currentNode,X=m6.FILTER_ACCEPT;$:while(!0){for(G=D.firstChild;G;G=D.firstChild)if(D=G,X=this._internalFilter(D),X===m6.FILTER_ACCEPT)return this._currentNode=D,D;else if(X===m6.FILTER_REJECT)break;for(J=l2.nextSkippingChildren(D,this.root);J;J=l2.nextSkippingChildren(D,this.root))if(D=J,X=this._internalFilter(D),X===m6.FILTER_ACCEPT)return this._currentNode=D,D;else if(X===m6.FILTER_SKIP)continue $;return null}}},toString:{value:function(){return"[object TreeWalker]"}}})});var DA=N(($G$,$A)=>{$A.exports=e2;var R7=A9(),E7=P7(),s2=M6();function Tm($,D,X){if(X)return E7.next($,D);else{if($===D)return null;return E7.previous($,null)}}function t2($,D){for(;D;D=D.parentNode)if($===D)return!0;return!1}function a2($,D){var X,G;X=$._referenceNode,G=$._pointerBeforeReferenceNode;while(!0){if(G===D)G=!G;else if(X=Tm(X,$._root,D),X===null)return null;var J=$._internalFilter(X);if(J===R7.FILTER_ACCEPT)break}return $._referenceNode=X,$._pointerBeforeReferenceNode=G,X}function e2($,D,X){if(!$||!$.nodeType)s2.NotSupportedError();this._root=$,this._referenceNode=$,this._pointerBeforeReferenceNode=!0,this._whatToShow=Number(D)||0,this._filter=X||null,this._active=!1,$.doc._attachNodeIterator(this)}Object.defineProperties(e2.prototype,{root:{get:function(){return this._root}},referenceNode:{get:function(){return this._referenceNode}},pointerBeforeReferenceNode:{get:function(){return this._pointerBeforeReferenceNode}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},_internalFilter:{value:function(D){var X,G;if(this._active)s2.InvalidStateError();if(!(1<<D.nodeType-1&this._whatToShow))return R7.FILTER_SKIP;if(G=this._filter,G===null)X=R7.FILTER_ACCEPT;else{this._active=!0;try{if(typeof G==="function")X=G(D);else X=G.acceptNode(D)}finally{this._active=!1}}return+X}},_preremove:{value:function(D){if(t2(D,this._root))return;if(!t2(D,this._referenceNode))return;if(this._pointerBeforeReferenceNode){var X=D;while(X.lastChild)X=X.lastChild;if(X=E7.next(X,this.root),X){this._referenceNode=X;return}this._pointerBeforeReferenceNode=!1}if(D.previousSibling===null)this._referenceNode=D.parentNode;else{this._referenceNode=D.previousSibling;var G;for(G=this._referenceNode.lastChild;G;G=this._referenceNode.lastChild)this._referenceNode=G}}},nextNode:{value:function(){return a2(this,!0)}},previousNode:{value:function(){return a2(this,!1)}},detach:{value:function(){}},toString:{value:function(){return"[object NodeIterator]"}}})});var C3=N((DG$,XA)=>{XA.exports=c6;function c6($){if(!$)return Object.create(c6.prototype);this.url=$.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g,"");var D=c6.pattern.exec(this.url);if(D){if(D[2])this.scheme=D[2];if(D[4]){var X=D[4].match(c6.userinfoPattern);if(X)this.username=X[1],this.password=X[3],D[4]=D[4].substring(X[0].length);if(D[4].match(c6.portPattern)){var G=D[4].lastIndexOf(":");this.host=D[4].substring(0,G),this.port=D[4].substring(G+1)}else this.host=D[4]}if(D[5])this.path=D[5];if(D[6])this.query=D[7];if(D[8])this.fragment=D[9]}}c6.pattern=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;c6.userinfoPattern=/^([^@:]*)(:([^@]*))?@/;c6.portPattern=/:\d+$/;c6.authorityPattern=/^[^:\/?#]+:\/\//;c6.hierarchyPattern=/^[^:\/?#]+:\//;c6.percentEncode=function(D){var X=D.charCodeAt(0);if(X<256)return"%"+X.toString(16);else throw Error("can't percent-encode codepoints > 255 yet")};c6.prototype={constructor:c6,isAbsolute:function(){return!!this.scheme},isAuthorityBased:function(){return c6.authorityPattern.test(this.url)},isHierarchical:function(){return c6.hierarchyPattern.test(this.url)},toString:function(){var $="";if(this.scheme!==void 0)$+=this.scheme+":";if(this.isAbsolute()){if($+="//",this.username||this.password){if($+=this.username||"",this.password)$+=":"+this.password;$+="@"}if(this.host)$+=this.host}if(this.port!==void 0)$+=":"+this.port;if(this.path!==void 0)$+=this.path;if(this.query!==void 0)$+="?"+this.query;if(this.fragment!==void 0)$+="#"+this.fragment;return $},resolve:function($){var D=this,X=new c6($),G=new c6;if(X.scheme!==void 0)G.scheme=X.scheme,G.username=X.username,G.password=X.password,G.host=X.host,G.port=X.port,G.path=Y(X.path),G.query=X.query;else if(G.scheme=D.scheme,X.host!==void 0)G.username=X.username,G.password=X.password,G.host=X.host,G.port=X.port,G.path=Y(X.path),G.query=X.query;else if(G.username=D.username,G.password=D.password,G.host=D.host,G.port=D.port,!X.path)if(G.path=D.path,X.query!==void 0)G.query=X.query;else G.query=D.query;else{if(X.path.charAt(0)==="/")G.path=Y(X.path);else G.path=J(D.path,X.path),G.path=Y(G.path);G.query=X.query}return G.fragment=X.fragment,G.toString();function J(Q,W){if(D.host!==void 0&&!D.path)return"/"+W;var I=Q.lastIndexOf("/");if(I===-1)return W;else return Q.substring(0,I+1)+W}function Y(Q){if(!Q)return Q;var W="";while(Q.length>0){if(Q==="."||Q===".."){Q="";break}var I=Q.substring(0,2),U=Q.substring(0,3),B=Q.substring(0,4);if(U==="../")Q=Q.substring(3);else if(I==="./")Q=Q.substring(2);else if(U==="/./")Q="/"+Q.substring(3);else if(I==="/."&&Q.length===2)Q="/";else if(B==="/../"||U==="/.."&&Q.length===3)Q="/"+Q.substring(4),W=W.replace(/\/?[^\/]*$/,"");else{var H=Q.match(/(\/?([^\/]*))/)[0];W+=H,Q=Q.substring(H.length)}}return W}}}});var YA=N((XG$,GA)=>{GA.exports=Z7;var JA=qX();function Z7($,D){JA.call(this,$,D)}Z7.prototype=Object.create(JA.prototype,{constructor:{value:Z7}})});var T7=N((JG$,QA)=>{QA.exports={Event:qX(),UIEvent:gU(),MouseEvent:hU(),CustomEvent:YA()}});var BA=N((IA)=>{Object.defineProperty(IA,"__esModule",{value:!0});IA.hyphenate=IA.parse=void 0;function vm($){let D=[],X=0,G=0,J=0,Y=0,Q=0,W=null;while(X<$.length)switch($.charCodeAt(X++)){case 40:G++;break;case 41:G--;break;case 39:if(J===0)J=39;else if(J===39&&$.charCodeAt(X-1)!==92)J=0;break;case 34:if(J===0)J=34;else if(J===34&&$.charCodeAt(X-1)!==92)J=0;break;case 58:if(!W&&G===0&&J===0)W=WA($.substring(Q,X-1).trim()),Y=X;break;case 59:if(W&&Y>0&&G===0&&J===0){let U=$.substring(Y,X-1).trim();D.push(W,U),Q=X,Y=0,W=null}break}if(W&&Y){let I=$.slice(Y).trim();D.push(W,I)}return D}IA.parse=vm;function WA($){return $.replace(/[a-z][A-Z]/g,(D)=>{return D.charAt(0)+"-"+D.charAt(1)}).toLowerCase()}IA.hyphenate=WA});var y3=N((YG$,VA)=>{var{parse:Cm}=BA();VA.exports=function($){let D=new KA($);return new Proxy(D,{get:function(G,J){return J in G?G[J]:G.getPropertyValue(zA(J))},has:function(G,J){return!0},set:function(G,J,Y){if(J in G)G[J]=Y;else G.setProperty(zA(J),Y??void 0);return!0}})};function zA($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function KA($){this._element=$}var qA="!important";function HA($){let D={property:{},priority:{}};if(!$)return D;let X=Cm($);if(X.length<2)return D;for(let G=0;G<X.length;G+=2){let J=X[G],Y=X[G+1];if(Y.endsWith(qA))D.priority[J]="important",Y=Y.slice(0,-qA.length).trim();D.property[J]=Y}return D}var bX={};KA.prototype=Object.create(Object.prototype,{_parsed:{get:function(){if(!this._parsedStyles||this.cssText!==this._lastParsedText){var $=this.cssText;this._parsedStyles=HA($),this._lastParsedText=$,delete this._names}return this._parsedStyles}},_serialize:{value:function(){var $=this._parsed,D="";for(var X in $.property){if(D)D+=" ";if(D+=X+": "+$.property[X],$.priority[X])D+=" !"+$.priority[X];D+=";"}this.cssText=D,this._lastParsedText=D,delete this._names}},cssText:{get:function(){return this._element.getAttribute("style")},set:function($){this._element.setAttribute("style",$)}},length:{get:function(){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names.length}},item:{value:function($){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names[$]}},getPropertyValue:{value:function($){return $=$.toLowerCase(),this._parsed.property[$]||""}},getPropertyPriority:{value:function($){return $=$.toLowerCase(),this._parsed.priority[$]||""}},setProperty:{value:function($,D,X){if($=$.toLowerCase(),D===null||D===void 0)D="";if(X===null||X===void 0)X="";if(D!==bX)D=""+D;if(D=D.trim(),D===""){this.removeProperty($);return}if(X!==""&&X!==bX&&!/^important$/i.test(X))return;var G=this._parsed;if(D===bX){if(!G.property[$])return;if(X!=="")G.priority[$]="important";else delete G.priority[$]}else{if(D.indexOf(";")!==-1)return;var J=HA($+":"+D);if(Object.getOwnPropertyNames(J.property).length===0)return;if(Object.getOwnPropertyNames(J.priority).length!==0)return;for(var Y in J.property)if(G.property[Y]=J.property[Y],X===bX)continue;else if(X!=="")G.priority[Y]="important";else if(G.priority[Y])delete G.priority[Y]}this._serialize()}},setPropertyValue:{value:function($,D){return this.setProperty($,D,bX)}},setPropertyPriority:{value:function($,D){return this.setProperty($,bX,D)}},removeProperty:{value:function($){$=$.toLowerCase();var D=this._parsed;if($ in D.property)delete D.property[$],delete D.priority[$],this._serialize()}}})});var v7=N((QG$,wA)=>{var C6=C3();wA.exports=M9;function M9(){}M9.prototype=Object.create(Object.prototype,{_url:{get:function(){return new C6(this.href)}},protocol:{get:function(){var $=this._url;if($&&$.scheme)return $.scheme+":";else return":"},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()){if($=$.replace(/:+$/,""),$=$.replace(/[^-+\.a-zA-Z0-9]/g,C6.percentEncode),$.length>0)X.scheme=$,D=X.toString()}this.href=D}},host:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host+($.port?":"+$.port:"");else return""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()&&X.isAuthorityBased()){if($=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,C6.percentEncode),$.length>0)X.host=$,delete X.port,D=X.toString()}this.href=D}},hostname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host;else return""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()&&X.isAuthorityBased()){if($=$.replace(/^\/+/,""),$=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,C6.percentEncode),$.length>0)X.host=$,D=X.toString()}this.href=D}},port:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased()&&$.port!==void 0)return $.port;else return""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()&&X.isAuthorityBased()){if($=""+$,$=$.replace(/[^0-9].*$/,""),$=$.replace(/^0+/,""),$.length===0)$="0";if(parseInt($,10)<=65535)X.port=$,D=X.toString()}this.href=D}},pathname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical())return $.path;else return""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()&&X.isHierarchical()){if($.charAt(0)!=="/")$="/"+$;$=$.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g,C6.percentEncode),X.path=$,D=X.toString()}this.href=D}},search:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical()&&$.query!==void 0)return"?"+$.query;else return""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()&&X.isHierarchical()){if($.charAt(0)==="?")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,C6.percentEncode),X.query=$,D=X.toString()}this.href=D}},hash:{get:function(){var $=this._url;if($==null||$.fragment==null||$.fragment==="")return"";else return"#"+$.fragment},set:function($){var D=this.href,X=new C6(D);if($.charAt(0)==="#")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,C6.percentEncode),X.fragment=$,D=X.toString(),this.href=D}},username:{get:function(){var $=this._url;return $.username||""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute())$=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g,C6.percentEncode),X.username=$,D=X.toString();this.href=D}},password:{get:function(){var $=this._url;return $.password||""},set:function($){var D=this.href,X=new C6(D);if(X.isAbsolute()){if($==="")X.password=null;else $=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g,C6.percentEncode),X.password=$;D=X.toString()}this.href=D}},origin:{get:function(){var $=this._url;if($==null)return"";var D=function(X){var G=[$.scheme,$.host,+$.port||X];return G[0]+"://"+G[1]+(G[2]===X?"":":"+G[2])};switch($.scheme){case"ftp":return D(21);case"gopher":return D(70);case"http":case"ws":return D(80);case"https":case"wss":return D(443);default:return $.scheme+"://"}}}});M9._inherit=function($){Object.getOwnPropertyNames(M9.prototype).forEach(function(D){if(D==="constructor"||D==="href")return;var X=Object.getOwnPropertyDescriptor(M9.prototype,D);Object.defineProperty($,D,X)})}});var k7=N((WG$,FA)=>{var LA=eU(),ym=b3().isApiWritable;FA.exports=function($,D,X,G){var J=$.ctor;if(J){var Y=$.props||{};if($.attributes)for(var Q in $.attributes){var W=$.attributes[Q];if(typeof W!=="object"||Array.isArray(W))W={type:W};if(!W.name)W.name=Q.toLowerCase();Y[Q]=LA.property(W)}if(Y.constructor={value:J,writable:ym},J.prototype=Object.create(($.superclass||D).prototype,Y),$.events)xm(J,$.events);X[$.name]=J}else J=D;return($.tags||$.tag&&[$.tag]||[]).forEach(function(I){G[I]=J}),J};function OA($,D,X,G){this.body=$,this.document=D,this.form=X,this.element=G}OA.prototype.build=function(){return()=>{}};function gm($,D,X,G){var J=$.ownerDocument||Object.create(null),Y=$.form||Object.create(null);$[D]=new OA(G,J,Y,$).build()}function xm($,D){var X=$.prototype;D.forEach(function(G){Object.defineProperty(X,"on"+G,{get:function(){return this._getEventHandler(G)},set:function(J){this._setEventHandler(G,J)}}),LA.registerChangeHandler($,"on"+G,gm)})}});var x3=N((cm)=>{var C7=f6(),bA=FX(),hm=y3(),Z1=M6(),jA=v7(),um=k7(),n4=cm.elements={},S9=Object.create(null);cm.createElement=function($,D,X){var G=S9[D]||mm;return new G($,D,X)};function r($){return um($,s,n4,S9)}function S6($){return{get:function(){var D=this._getattr($);if(D===null)return"";var X=this.doc._resolve(D);return X===null?D:X},set:function(D){this._setattr($,D)}}}function g3($){return{get:function(){var D=this._getattr($);if(D===null)return null;if(D.toLowerCase()==="use-credentials")return"use-credentials";return"anonymous"},set:function(D){if(D===null||D===void 0)this.removeAttribute($);else this._setattr($,D)}}}var jX={type:["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],missing:""},fm={A:!0,LINK:!0,BUTTON:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0,COMMAND:!0},Y4=function($,D,X){s.call(this,$,D,X),this._form=null},s=cm.HTMLElement=r({superclass:bA,name:"HTMLElement",ctor:function(D,X,G){bA.call(this,D,X,Z1.NAMESPACE.HTML,G)},props:{dangerouslySetInnerHTML:{set:function($){this._innerHTML=$}},innerHTML:{get:function(){return this.serialize()},set:function($){var D=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,this);D.parse($===null?"":String($),!0);var X=this instanceof S9.template?this.content:this;while(X.hasChildNodes())X.removeChild(X.firstChild);X.appendChild(D._asDocumentFragment())}},style:{get:function(){if(!this._style)this._style=new hm(this);return this._style},set:function($){if($===null||$===void 0)$="";this._setattr("style",String($))}},blur:{value:function(){}},focus:{value:function(){}},forceSpellCheck:{value:function(){}},click:{value:function(){if(this._click_in_progress)return;this._click_in_progress=!0;try{if(this._pre_click_activation_steps)this._pre_click_activation_steps();var $=this.ownerDocument.createEvent("MouseEvent");$.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);var D=this.dispatchEvent($);if(D){if(this._post_click_activation_steps)this._post_click_activation_steps($)}else if(this._cancelled_activation_steps)this._cancelled_activation_steps()}finally{this._click_in_progress=!1}}},submit:{value:Z1.nyi}},attributes:{title:String,lang:String,dir:{type:["ltr","rtl","auto"],missing:""},draggable:{type:["true","false"],treatNullAsEmptyString:!0},spellcheck:{type:["true","false"],missing:""},enterKeyHint:{type:["enter","done","go","next","previous","search","send"],missing:""},autoCapitalize:{type:["off","on","none","sentences","words","characters"],missing:""},autoFocus:Boolean,accessKey:String,nonce:String,hidden:Boolean,translate:{type:["no","yes"],missing:""},tabIndex:{type:"long",default:function(){if(this.tagName in fm||this.contentEditable)return 0;else return-1}}},events:["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"]}),mm=r({name:"HTMLUnknownElement",ctor:function(D,X,G){s.call(this,D,X,G)}}),Q4={form:{get:function(){return this._form}}};r({tag:"a",name:"HTMLAnchorElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{_post_click_activation_steps:{value:function($){if(this.href)this.ownerDocument.defaultView.location=this.href}}},attributes:{href:S6,ping:String,download:String,target:String,rel:String,media:String,hreflang:String,type:String,referrerPolicy:jX,coords:String,charset:String,name:String,rev:String,shape:String}});jA._inherit(S9.a.prototype);r({tag:"area",name:"HTMLAreaElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{alt:String,target:String,download:String,rel:String,media:String,href:S6,hreflang:String,type:String,shape:String,coords:String,ping:String,referrerPolicy:jX,noHref:Boolean}});jA._inherit(S9.area.prototype);r({tag:"br",name:"HTMLBRElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{clear:String}});r({tag:"base",name:"HTMLBaseElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{target:String}});r({tag:"body",name:"HTMLBodyElement",ctor:function(D,X,G){s.call(this,D,X,G)},events:["afterprint","beforeprint","beforeunload","blur","error","focus","hashchange","load","message","offline","online","pagehide","pageshow","popstate","resize","scroll","storage","unload"],attributes:{text:{type:String,treatNullAsEmptyString:!0},link:{type:String,treatNullAsEmptyString:!0},vLink:{type:String,treatNullAsEmptyString:!0},aLink:{type:String,treatNullAsEmptyString:!0},bgColor:{type:String,treatNullAsEmptyString:!0},background:String}});r({tag:"button",name:"HTMLButtonElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{name:String,value:String,disabled:Boolean,autofocus:Boolean,type:{type:["submit","reset","button","menu"],missing:"submit"},formTarget:String,formAction:S6,formNoValidate:Boolean,formMethod:{type:["get","post","dialog"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""}}});r({tag:"dl",name:"HTMLDListElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{compact:Boolean}});r({tag:"data",name:"HTMLDataElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{value:String}});r({tag:"datalist",name:"HTMLDataListElement",ctor:function(D,X,G){s.call(this,D,X,G)}});r({tag:"details",name:"HTMLDetailsElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{open:Boolean}});r({tag:"div",name:"HTMLDivElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{align:String}});r({tag:"embed",name:"HTMLEmbedElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{src:S6,type:String,width:String,height:String,align:String,name:String}});r({tag:"fieldset",name:"HTMLFieldSetElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{disabled:Boolean,name:String}});r({tag:"form",name:"HTMLFormElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{action:String,autocomplete:{type:["on","off"],missing:"on"},name:String,acceptCharset:{name:"accept-charset"},target:String,noValidate:Boolean,method:{type:["get","post","dialog"],invalid:"get",missing:"get"},enctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"},encoding:{name:"enctype",type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"}}});r({tag:"hr",name:"HTMLHRElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{align:String,color:String,noShade:Boolean,size:String,width:String}});r({tag:"head",name:"HTMLHeadElement",ctor:function(D,X,G){s.call(this,D,X,G)}});r({tags:["h1","h2","h3","h4","h5","h6"],name:"HTMLHeadingElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{align:String}});r({tag:"html",name:"HTMLHtmlElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{xmlns:S6,version:String}});r({tag:"iframe",name:"HTMLIFrameElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{src:S6,srcdoc:String,name:String,width:String,height:String,seamless:Boolean,allow:Boolean,allowFullscreen:Boolean,allowUserMedia:Boolean,allowPaymentRequest:Boolean,referrerPolicy:jX,loading:{type:["eager","lazy"],treatNullAsEmptyString:!0},align:String,scrolling:String,frameBorder:String,longDesc:S6,marginHeight:{type:String,treatNullAsEmptyString:!0},marginWidth:{type:String,treatNullAsEmptyString:!0}}});r({tag:"img",name:"HTMLImageElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{alt:String,src:S6,srcset:String,crossOrigin:g3,useMap:String,isMap:Boolean,sizes:String,height:{type:"unsigned long",default:0},width:{type:"unsigned long",default:0},referrerPolicy:jX,loading:{type:["eager","lazy"],missing:""},name:String,lowsrc:S6,align:String,hspace:{type:"unsigned long",default:0},vspace:{type:"unsigned long",default:0},longDesc:S6,border:{type:String,treatNullAsEmptyString:!0}}});r({tag:"input",name:"HTMLInputElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:{form:Q4.form,_post_click_activation_steps:{value:function($){if(this.type==="checkbox")this.checked=!this.checked;else if(this.type==="radio"){var D=this.form.getElementsByName(this.name);for(var X=D.length-1;X>=0;X--){var G=D[X];G.checked=G===this}}}}},attributes:{name:String,disabled:Boolean,autofocus:Boolean,accept:String,alt:String,max:String,min:String,pattern:String,placeholder:String,step:String,dirName:String,defaultValue:{name:"value"},multiple:Boolean,required:Boolean,readOnly:Boolean,checked:Boolean,value:String,src:S6,defaultChecked:{name:"checked",type:Boolean},size:{type:"unsigned long",default:20,min:1,setmin:1},width:{type:"unsigned long",min:0,setmin:0,default:0},height:{type:"unsigned long",min:0,setmin:0,default:0},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},autocomplete:String,type:{type:["text","hidden","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"],missing:"text"},formTarget:String,formNoValidate:Boolean,formMethod:{type:["get","post"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""},align:String,useMap:String}});r({tag:"keygen",name:"HTMLKeygenElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{name:String,disabled:Boolean,autofocus:Boolean,challenge:String,keytype:{type:["rsa"],missing:""}}});r({tag:"li",name:"HTMLLIElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{value:{type:"long",default:0},type:String}});r({tag:"label",name:"HTMLLabelElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{htmlFor:{name:"for",type:String}}});r({tag:"legend",name:"HTMLLegendElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{align:String}});r({tag:"link",name:"HTMLLinkElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{href:S6,rel:String,media:String,hreflang:String,type:String,crossOrigin:g3,nonce:String,integrity:String,referrerPolicy:jX,imageSizes:String,imageSrcset:String,charset:String,rev:String,target:String}});r({tag:"map",name:"HTMLMapElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{name:String}});r({tag:"menu",name:"HTMLMenuElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{type:{type:["context","popup","toolbar"],missing:"toolbar"},label:String,compact:Boolean}});r({tag:"meta",name:"HTMLMetaElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{name:String,content:String,httpEquiv:{name:"http-equiv",type:String},scheme:String}});r({tag:"meter",name:"HTMLMeterElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4});r({tags:["ins","del"],name:"HTMLModElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{cite:S6,dateTime:String}});r({tag:"ol",name:"HTMLOListElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{_numitems:{get:function(){var $=0;return this.childNodes.forEach(function(D){if(D.nodeType===C7.ELEMENT_NODE&&D.tagName==="LI")$++}),$}}},attributes:{type:String,reversed:Boolean,start:{type:"long",default:function(){if(this.reversed)return this._numitems;else return 1}},compact:Boolean}});r({tag:"object",name:"HTMLObjectElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{data:S6,type:String,name:String,useMap:String,typeMustMatch:Boolean,width:String,height:String,align:String,archive:String,code:String,declare:Boolean,hspace:{type:"unsigned long",default:0},standby:String,vspace:{type:"unsigned long",default:0},codeBase:S6,codeType:String,border:{type:String,treatNullAsEmptyString:!0}}});r({tag:"optgroup",name:"HTMLOptGroupElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{disabled:Boolean,label:String}});r({tag:"option",name:"HTMLOptionElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{form:{get:function(){var $=this.parentNode;while($&&$.nodeType===C7.ELEMENT_NODE){if($.localName==="select")return $.form;$=$.parentNode}}},value:{get:function(){return this._getattr("value")||this.text},set:function($){this._setattr("value",$)}},text:{get:function(){return this.textContent.replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){this.textContent=$}}},attributes:{disabled:Boolean,defaultSelected:{name:"selected",type:Boolean},label:String}});r({tag:"output",name:"HTMLOutputElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{name:String}});r({tag:"p",name:"HTMLParagraphElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{align:String}});r({tag:"param",name:"HTMLParamElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{name:String,value:String,type:String,valueType:String}});r({tags:["pre","listing","xmp"],name:"HTMLPreElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{width:{type:"long",default:0}}});r({tag:"progress",name:"HTMLProgressElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:Q4,attributes:{max:{type:Number,float:!0,default:1,min:0}}});r({tags:["q","blockquote"],name:"HTMLQuoteElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{cite:S6}});r({tag:"script",name:"HTMLScriptElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{text:{get:function(){var $="";for(var D=0,X=this.childNodes.length;D<X;D++){var G=this.childNodes[D];if(G.nodeType===C7.TEXT_NODE)$+=G._data}return $},set:function($){if(this.removeChildren(),$!==null&&$!=="")this.appendChild(this.ownerDocument.createTextNode($))}}},attributes:{src:S6,type:String,charset:String,referrerPolicy:jX,defer:Boolean,async:Boolean,nomodule:Boolean,crossOrigin:g3,nonce:String,integrity:String}});r({tag:"select",name:"HTMLSelectElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:{form:Q4.form,options:{get:function(){return this.getElementsByTagName("option")}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,multiple:Boolean,required:Boolean,size:{type:"unsigned long",default:0}}});r({tag:"span",name:"HTMLSpanElement",ctor:function(D,X,G){s.call(this,D,X,G)}});r({tag:"style",name:"HTMLStyleElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{media:String,type:String,scoped:Boolean}});r({tag:"caption",name:"HTMLTableCaptionElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{align:String}});r({name:"HTMLTableCellElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{colSpan:{type:"unsigned long",default:1},rowSpan:{type:"unsigned long",default:1},scope:{type:["row","col","rowgroup","colgroup"],missing:""},abbr:String,align:String,axis:String,height:String,width:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},noWrap:Boolean,vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});r({tags:["col","colgroup"],name:"HTMLTableColElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{span:{type:"limited unsigned long with fallback",default:1,min:1},align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,width:String}});r({tag:"table",name:"HTMLTableElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,border:String,frame:String,rules:String,summary:String,width:String,bgColor:{type:String,treatNullAsEmptyString:!0},cellPadding:{type:String,treatNullAsEmptyString:!0},cellSpacing:{type:String,treatNullAsEmptyString:!0}}});r({tag:"template",name:"HTMLTemplateElement",ctor:function(D,X,G){s.call(this,D,X,G),this._contentFragment=D._templateDoc.createDocumentFragment()},props:{content:{get:function(){return this._contentFragment}},serialize:{value:function(){return this.content.serialize()}}}});r({tag:"tr",name:"HTMLTableRowElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{cells:{get:function(){return this.querySelectorAll("td,th")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});r({tags:["thead","tfoot","tbody"],name:"HTMLTableSectionElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String}});r({tag:"textarea",name:"HTMLTextAreaElement",ctor:function(D,X,G){Y4.call(this,D,X,G)},props:{form:Q4.form,type:{get:function(){return"textarea"}},defaultValue:{get:function(){return this.textContent},set:function($){this.textContent=$}},value:{get:function(){return this.defaultValue},set:function($){this.defaultValue=$}},textLength:{get:function(){return this.value.length}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,placeholder:String,wrap:String,dirName:String,required:Boolean,readOnly:Boolean,rows:{type:"limited unsigned long with fallback",default:2},cols:{type:"limited unsigned long with fallback",default:20},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""}}});r({tag:"time",name:"HTMLTimeElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{dateTime:String,pubDate:Boolean}});r({tag:"title",name:"HTMLTitleElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{text:{get:function(){return this.textContent}}}});r({tag:"ul",name:"HTMLUListElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{type:String,compact:Boolean}});r({name:"HTMLMediaElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{src:S6,crossOrigin:g3,preload:{type:["metadata","none","auto",{value:"",alias:"auto"}],missing:"auto"},loop:Boolean,autoplay:Boolean,mediaGroup:String,controls:Boolean,defaultMuted:{name:"muted",type:Boolean}}});r({name:"HTMLAudioElement",tag:"audio",superclass:n4.HTMLMediaElement,ctor:function(D,X,G){n4.HTMLMediaElement.call(this,D,X,G)}});r({name:"HTMLVideoElement",tag:"video",superclass:n4.HTMLMediaElement,ctor:function(D,X,G){n4.HTMLMediaElement.call(this,D,X,G)},attributes:{poster:S6,width:{type:"unsigned long",min:0,default:0},height:{type:"unsigned long",min:0,default:0}}});r({tag:"td",name:"HTMLTableDataCellElement",superclass:n4.HTMLTableCellElement,ctor:function(D,X,G){n4.HTMLTableCellElement.call(this,D,X,G)}});r({tag:"th",name:"HTMLTableHeaderCellElement",superclass:n4.HTMLTableCellElement,ctor:function(D,X,G){n4.HTMLTableCellElement.call(this,D,X,G)}});r({tag:"frameset",name:"HTMLFrameSetElement",ctor:function(D,X,G){s.call(this,D,X,G)}});r({tag:"frame",name:"HTMLFrameElement",ctor:function(D,X,G){s.call(this,D,X,G)}});r({tag:"canvas",name:"HTMLCanvasElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{getContext:{value:Z1.nyi},probablySupportsContext:{value:Z1.nyi},setContext:{value:Z1.nyi},transferControlToProxy:{value:Z1.nyi},toDataURL:{value:Z1.nyi},toBlob:{value:Z1.nyi}},attributes:{width:{type:"unsigned long",default:300},height:{type:"unsigned long",default:150}}});r({tag:"dialog",name:"HTMLDialogElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{show:{value:Z1.nyi},showModal:{value:Z1.nyi},close:{value:Z1.nyi}},attributes:{open:Boolean,returnValue:String}});r({tag:"menuitem",name:"HTMLMenuItemElement",ctor:function(D,X,G){s.call(this,D,X,G)},props:{_label:{get:function(){var $=this._getattr("label");if($!==null&&$!=="")return $;return $=this.textContent,$.replace(/[ \t\n\f\r]+/g," ").trim()}},label:{get:function(){var $=this._getattr("label");if($!==null)return $;return this._label},set:function($){this._setattr("label",$)}}},attributes:{type:{type:["command","checkbox","radio"],missing:"command"},icon:S6,disabled:Boolean,checked:Boolean,radiogroup:String,default:Boolean}});r({tag:"source",name:"HTMLSourceElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{srcset:String,sizes:String,media:String,src:S6,type:String,width:String,height:String}});r({tag:"track",name:"HTMLTrackElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{src:S6,srclang:String,label:String,default:Boolean,kind:{type:["subtitles","captions","descriptions","chapters","metadata"],missing:"subtitles",invalid:"metadata"}},props:{NONE:{get:function(){return 0}},LOADING:{get:function(){return 1}},LOADED:{get:function(){return 2}},ERROR:{get:function(){return 3}},readyState:{get:Z1.nyi},track:{get:Z1.nyi}}});r({tag:"font",name:"HTMLFontElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{color:{type:String,treatNullAsEmptyString:!0},face:{type:String},size:{type:String}}});r({tag:"dir",name:"HTMLDirectoryElement",ctor:function(D,X,G){s.call(this,D,X,G)},attributes:{compact:Boolean}});r({tags:["abbr","address","article","aside","b","bdi","bdo","cite","content","code","dd","dfn","dt","em","figcaption","figure","footer","header","hgroup","i","kbd","main","mark","nav","noscript","rb","rp","rt","rtc","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr","acronym","basefont","big","center","nobr","noembed","noframes","plaintext","strike","tt"]})});var x7=N((dm)=>{var AA=FX(),im=k7(),pm=M6(),rm=y3(),nm=dm.elements={},MA=Object.create(null);dm.createElement=function($,D,X){var G=MA[D]||g7;return new G($,D,X)};function y7($){return im($,g7,nm,MA)}var g7=y7({superclass:AA,name:"SVGElement",ctor:function(D,X,G){AA.call(this,D,X,pm.NAMESPACE.SVG,G)},props:{style:{get:function(){if(!this._style)this._style=new rm(this);return this._style}}}});y7({name:"SVGSVGElement",ctor:function(D,X,G){g7.call(this,D,X,G)},tag:"svg",props:{createSVGRect:{value:function(){return dm.createElement(this.ownerDocument,"rect",null)}}}});y7({tags:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]})});var _A=N((HG$,PA)=>{PA.exports={VALUE:1,ATTR:2,REMOVE_ATTR:3,REMOVE:4,MOVE:5,INSERT:6}});var u3=N((KG$,gA)=>{gA.exports=_9;var a6=f6(),om=bD(),vA=M3(),N0=FX(),tm=w7(),am=O7(),P9=qX(),sm=b7(),em=A7(),$c=N9(),Dc=o2(),Xc=DA(),NA=A9(),RA=C3(),EA=R3(),Jc=T7(),h3=S3(),h7=x3(),Gc=x7(),y$=M6(),AX=_A(),SX=y$.NAMESPACE,u7=b3().isApiWritable;function _9($,D){vA.call(this),this.nodeType=a6.DOCUMENT_NODE,this.isHTML=$,this._address=D||"about:blank",this.readyState="loading",this.implementation=new $c(this),this.ownerDocument=null,this._contentType=$?"text/html":"application/xml",this.doctype=null,this.documentElement=null,this._templateDocCache=null,this._nodeIterators=null,this._nid=1,this._nextnid=2,this._nodes=[null,this],this.byId=Object.create(null),this.modclock=0}var Yc={event:"Event",customevent:"CustomEvent",uievent:"UIEvent",mouseevent:"MouseEvent"},Qc={events:"event",htmlevents:"event",mouseevents:"mouseevent",mutationevents:"mutationevent",uievents:"uievent"},MX=function($,D,X){return{get:function(){var G=$.call(this);if(G)return G[D];return X},set:function(G){var J=$.call(this);if(J)J[D]=G}}};function ZA($,D){var X,G,J;if($==="")$=null;if(!h3.isValidQName(D))y$.InvalidCharacterError();if(X=null,G=D,J=D.indexOf(":"),J>=0)X=D.substring(0,J),G=D.substring(J+1);if(X!==null&&$===null)y$.NamespaceError();if(X==="xml"&&$!==SX.XML)y$.NamespaceError();if((X==="xmlns"||D==="xmlns")&&$!==SX.XMLNS)y$.NamespaceError();if($===SX.XMLNS&&!(X==="xmlns"||D==="xmlns"))y$.NamespaceError();return{namespace:$,prefix:X,localName:G}}_9.prototype=Object.create(vA.prototype,{_setMutationHandler:{value:function($){this.mutationHandler=$}},_dispatchRendererEvent:{value:function($,D,X){var G=this._nodes[$];if(!G)return;G._dispatchEvent(new P9(D,X),!0)}},nodeName:{value:"#document"},nodeValue:{get:function(){return null},set:function(){}},documentURI:{get:function(){return this._address},set:y$.nyi},compatMode:{get:function(){return this._quirks?"BackCompat":"CSS1Compat"}},createTextNode:{value:function($){return new tm(this,String($))}},createComment:{value:function($){return new am(this,$)}},createDocumentFragment:{value:function(){return new sm(this)}},createProcessingInstruction:{value:function($,D){if(!h3.isValidName($)||D.indexOf("?>")!==-1)y$.InvalidCharacterError();return new em(this,$,D)}},createAttribute:{value:function($){if($=String($),!h3.isValidName($))y$.InvalidCharacterError();if(this.isHTML)$=y$.toASCIILowerCase($);return new N0._Attr(null,$,null,null,"")}},createAttributeNS:{value:function($,D){$=$===null||$===void 0||$===""?null:String($),D=String(D);var X=ZA($,D);return new N0._Attr(null,X.localName,X.prefix,X.namespace,"")}},createElement:{value:function($){if($=String($),!h3.isValidName($))y$.InvalidCharacterError();if(this.isHTML){if(/[A-Z]/.test($))$=y$.toASCIILowerCase($);return h7.createElement(this,$,null)}else if(this.contentType==="application/xhtml+xml")return h7.createElement(this,$,null);else return new N0(this,$,null,null)},writable:u7},createElementNS:{value:function($,D){$=$===null||$===void 0||$===""?null:String($),D=String(D);var X=ZA($,D);return this._createElementNS(X.localName,X.namespace,X.prefix)},writable:u7},_createElementNS:{value:function($,D,X){if(D===SX.HTML)return h7.createElement(this,$,X);else if(D===SX.SVG)return Gc.createElement(this,$,X);return new N0(this,$,D,X)}},createEvent:{value:function(D){D=D.toLowerCase();var X=Qc[D]||D,G=Jc[Yc[X]];if(G){var J=new G;return J._initialized=!1,J}else y$.NotSupportedError()}},createTreeWalker:{value:function($,D,X){if(!$)throw TypeError("root argument is required");if(!($ instanceof a6))throw TypeError("root not a node");return D=D===void 0?NA.SHOW_ALL:+D,X=X===void 0?null:X,new Dc($,D,X)}},createNodeIterator:{value:function($,D,X){if(!$)throw TypeError("root argument is required");if(!($ instanceof a6))throw TypeError("root not a node");return D=D===void 0?NA.SHOW_ALL:+D,X=X===void 0?null:X,new Xc($,D,X)}},_attachNodeIterator:{value:function($){if(!this._nodeIterators)this._nodeIterators=[];this._nodeIterators.push($)}},_detachNodeIterator:{value:function($){var D=this._nodeIterators.indexOf($);this._nodeIterators.splice(D,1)}},_preremoveNodeIterators:{value:function($){if(this._nodeIterators)this._nodeIterators.forEach(function(D){D._preremove($)})}},_updateDocTypeElement:{value:function(){this.doctype=this.documentElement=null;for(var D=this.firstChild;D!==null;D=D.nextSibling)if(D.nodeType===a6.DOCUMENT_TYPE_NODE)this.doctype=D;else if(D.nodeType===a6.ELEMENT_NODE)this.documentElement=D}},insertBefore:{value:function(D,X){return a6.prototype.insertBefore.call(this,D,X),this._updateDocTypeElement(),D}},replaceChild:{value:function(D,X){return a6.prototype.replaceChild.call(this,D,X),this._updateDocTypeElement(),X}},removeChild:{value:function(D){return a6.prototype.removeChild.call(this,D),this._updateDocTypeElement(),D}},getElementById:{value:function($){var D=this.byId[$];if(!D)return null;if(D instanceof d4)return D.getFirst();return D}},_hasMultipleElementsWithId:{value:function($){return this.byId[$]instanceof d4}},getElementsByName:{value:N0.prototype.getElementsByName},getElementsByTagName:{value:N0.prototype.getElementsByTagName},getElementsByTagNameNS:{value:N0.prototype.getElementsByTagNameNS},getElementsByClassName:{value:N0.prototype.getElementsByClassName},adoptNode:{value:function(D){if(D.nodeType===a6.DOCUMENT_NODE)y$.NotSupportedError();if(D.nodeType===a6.ATTRIBUTE_NODE)return D;if(D.parentNode)D.parentNode.removeChild(D);if(D.ownerDocument!==this)yA(D,this);return D}},importNode:{value:function(D,X){return this.adoptNode(D.cloneNode(X))},writable:u7},origin:{get:function(){return null}},characterSet:{get:function(){return"UTF-8"}},contentType:{get:function(){return this._contentType}},URL:{get:function(){return this._address}},domain:{get:y$.nyi,set:y$.nyi},referrer:{get:y$.nyi},cookie:{get:y$.nyi,set:y$.nyi},lastModified:{get:y$.nyi},location:{get:function(){return this.defaultView?this.defaultView.location:null},set:y$.nyi},_titleElement:{get:function(){return this.getElementsByTagName("title").item(0)||null}},title:{get:function(){var $=this._titleElement,D=$?$.textContent:"";return D.replace(/[ \t\n\r\f]+/g," ").replace(/(^ )|( $)/g,"")},set:function($){var D=this._titleElement,X=this.head;if(!D&&!X)return;if(!D)D=this.createElement("title"),X.appendChild(D);D.textContent=$}},dir:MX(function(){var $=this.documentElement;if($&&$.tagName==="HTML")return $},"dir",""),fgColor:MX(function(){return this.body},"text",""),linkColor:MX(function(){return this.body},"link",""),vlinkColor:MX(function(){return this.body},"vLink",""),alinkColor:MX(function(){return this.body},"aLink",""),bgColor:MX(function(){return this.body},"bgColor",""),charset:{get:function(){return this.characterSet}},inputEncoding:{get:function(){return this.characterSet}},scrollingElement:{get:function(){return this._quirks?this.body:this.documentElement}},body:{get:function(){return TA(this.documentElement,"body")},set:y$.nyi},head:{get:function(){return TA(this.documentElement,"head")}},images:{get:y$.nyi},embeds:{get:y$.nyi},plugins:{get:y$.nyi},links:{get:y$.nyi},forms:{get:y$.nyi},scripts:{get:y$.nyi},applets:{get:function(){return[]}},activeElement:{get:function(){return null}},innerHTML:{get:function(){return this.serialize()},set:y$.nyi},outerHTML:{get:function(){return this.serialize()},set:y$.nyi},write:{value:function($){if(!this.isHTML)y$.InvalidStateError();if(!this._parser)return;if(!this._parser);var D=arguments.join("");this._parser.parse(D)}},writeln:{value:function(D){this.write(Array.prototype.join.call(arguments,"")+`
30
- `)}},open:{value:function(){this.documentElement=null}},close:{value:function(){if(this.readyState="interactive",this._dispatchEvent(new P9("readystatechange"),!0),this._dispatchEvent(new P9("DOMContentLoaded"),!0),this.readyState="complete",this._dispatchEvent(new P9("readystatechange"),!0),this.defaultView)this.defaultView._dispatchEvent(new P9("load"),!0)}},clone:{value:function(){var D=new _9(this.isHTML,this._address);return D._quirks=this._quirks,D._contentType=this._contentType,D}},cloneNode:{value:function(D){var X=a6.prototype.cloneNode.call(this,!1);if(D)for(var G=this.firstChild;G!==null;G=G.nextSibling)X._appendChild(X.importNode(G,!0));return X._updateDocTypeElement(),X}},isEqual:{value:function(D){return!0}},mutateValue:{value:function($){if(this.mutationHandler)this.mutationHandler({type:AX.VALUE,target:$,data:$.data})}},mutateAttr:{value:function($,D){if(this.mutationHandler)this.mutationHandler({type:AX.ATTR,target:$.ownerElement,attr:$})}},mutateRemoveAttr:{value:function($){if(this.mutationHandler)this.mutationHandler({type:AX.REMOVE_ATTR,target:$.ownerElement,attr:$})}},mutateRemove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:AX.REMOVE,target:$.parentNode,node:$});CA($)}},mutateInsert:{value:function($){if(kA($),this.mutationHandler)this.mutationHandler({type:AX.INSERT,target:$.parentNode,node:$})}},mutateMove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:AX.MOVE,target:$})}},addId:{value:function(D,X){var G=this.byId[D];if(!G)this.byId[D]=X;else{if(!(G instanceof d4))G=new d4(G),this.byId[D]=G;G.add(X)}}},delId:{value:function(D,X){var G=this.byId[D];if(y$.assert(G),G instanceof d4){if(G.del(X),G.length===1)this.byId[D]=G.downgrade()}else this.byId[D]=void 0}},_resolve:{value:function($){return new RA(this._documentBaseURL).resolve($)}},_documentBaseURL:{get:function(){var $=this._address;if($==="about:blank")$="/";var D=this.querySelector("base[href]");if(D)return new RA($).resolve(D.getAttribute("href"));return $}},_templateDoc:{get:function(){if(!this._templateDocCache){var $=new _9(this.isHTML,this._address);this._templateDocCache=$._templateDocCache=$}return this._templateDocCache}},querySelector:{value:function($){return EA($,this)[0]}},querySelectorAll:{value:function($){var D=EA($,this);return D.item?D:new om(D)}}});var Wc=["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"];Wc.forEach(function($){Object.defineProperty(_9.prototype,"on"+$,{get:function(){return this._getEventHandler($)},set:function(D){this._setEventHandler($,D)}})});function TA($,D){if($&&$.isHTML){for(var X=$.firstChild;X!==null;X=X.nextSibling)if(X.nodeType===a6.ELEMENT_NODE&&X.localName===D&&X.namespaceURI===SX.HTML)return X}return null}function Ic($){if($._nid=$.ownerDocument._nextnid++,$.ownerDocument._nodes[$._nid]=$,$.nodeType===a6.ELEMENT_NODE){var D=$.getAttribute("id");if(D)$.ownerDocument.addId(D,$);if($._roothook)$._roothook()}}function Uc($){if($.nodeType===a6.ELEMENT_NODE){var D=$.getAttribute("id");if(D)$.ownerDocument.delId(D,$)}$.ownerDocument._nodes[$._nid]=void 0,$._nid=void 0}function kA($){if(Ic($),$.nodeType===a6.ELEMENT_NODE)for(var D=$.firstChild;D!==null;D=D.nextSibling)kA(D)}function CA($){Uc($);for(var D=$.firstChild;D!==null;D=D.nextSibling)CA(D)}function yA($,D){if($.ownerDocument=D,$._lastModTime=void 0,Object.prototype.hasOwnProperty.call($,"_tagName"))$._tagName=void 0;for(var X=$.firstChild;X!==null;X=X.nextSibling)yA(X,D)}function d4($){this.nodes=Object.create(null),this.nodes[$._nid]=$,this.length=1,this.firstNode=void 0}d4.prototype.add=function($){if(!this.nodes[$._nid])this.nodes[$._nid]=$,this.length++,this.firstNode=void 0};d4.prototype.del=function($){if(this.nodes[$._nid])delete this.nodes[$._nid],this.length--,this.firstNode=void 0};d4.prototype.getFirst=function(){if(!this.firstNode){var $;for($ in this.nodes)if(this.firstNode===void 0||this.firstNode.compareDocumentPosition(this.nodes[$])&a6.DOCUMENT_POSITION_PRECEDING)this.firstNode=this.nodes[$]}return this.firstNode};d4.prototype.downgrade=function(){if(this.length===1){var $;for($ in this.nodes)return this.nodes[$]}return this}});var m3=N((VG$,hA)=>{hA.exports=f3;var Bc=f6(),xA=K7(),zc=E3();function f3($,D,X,G){xA.call(this),this.nodeType=Bc.DOCUMENT_TYPE_NODE,this.ownerDocument=$||null,this.name=D,this.publicId=X||"",this.systemId=G||""}f3.prototype=Object.create(xA.prototype,{nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return null},set:function(){}},clone:{value:function(){return new f3(this.ownerDocument,this.name,this.publicId,this.systemId)}},isEqual:{value:function(D){return this.name===D.name&&this.publicId===D.publicId&&this.systemId===D.systemId}}});Object.defineProperties(f3.prototype,zc)});var d3=N((wG$,WM)=>{WM.exports=v$;var qc=u3(),Hc=m3(),f7=f6(),G$=M6().NAMESPACE,eA=x3(),p$=eA.elements,AD=Function.prototype.apply.bind(Array.prototype.push),c3=-1,PX=1,s6=2,S$=3,_4=4,Kc=5,Vc=[],wc=/^HTML$|^-\/\/W3O\/\/DTD W3 HTML Strict 3\.0\/\/EN\/\/$|^-\/W3C\/DTD HTML 4\.0 Transitional\/EN$|^\+\/\/Silmaril\/\/dtd html Pro v0r11 19970101\/\/|^-\/\/AdvaSoft Ltd\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/AS\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict\/\/|^-\/\/IETF\/\/DTD HTML 2\.0\/\/|^-\/\/IETF\/\/DTD HTML 2\.1E\/\/|^-\/\/IETF\/\/DTD HTML 3\.0\/\/|^-\/\/IETF\/\/DTD HTML 3\.2 Final\/\/|^-\/\/IETF\/\/DTD HTML 3\.2\/\/|^-\/\/IETF\/\/DTD HTML 3\/\/|^-\/\/IETF\/\/DTD HTML Level 0\/\/|^-\/\/IETF\/\/DTD HTML Level 1\/\/|^-\/\/IETF\/\/DTD HTML Level 2\/\/|^-\/\/IETF\/\/DTD HTML Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 0\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict\/\/|^-\/\/IETF\/\/DTD HTML\/\/|^-\/\/Metrius\/\/DTD Metrius Presentational\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 Tables\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 Tables\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD HTML\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD Strict HTML\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML 2\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended 1\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended Relaxed 1\.0\/\/|^-\/\/SoftQuad Software\/\/DTD HoTMetaL PRO 6\.0::19990601::extensions to HTML 4\.0\/\/|^-\/\/SoftQuad\/\/DTD HoTMetaL PRO 4\.0::19971010::extensions to HTML 4\.0\/\/|^-\/\/Spyglass\/\/DTD HTML 2\.0 Extended\/\/|^-\/\/SQ\/\/DTD HTML 2\.0 HoTMetaL \+ extensions\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava HTML\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava Strict HTML\/\/|^-\/\/W3C\/\/DTD HTML 3 1995-03-24\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Draft\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Final\/\/|^-\/\/W3C\/\/DTD HTML 3\.2\/\/|^-\/\/W3C\/\/DTD HTML 3\.2S Draft\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Transitional\/\/|^-\/\/W3C\/\/DTD HTML Experimental 19960712\/\/|^-\/\/W3C\/\/DTD HTML Experimental 970421\/\/|^-\/\/W3C\/\/DTD W3 HTML\/\/|^-\/\/W3O\/\/DTD W3 HTML 3\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML 2\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML\/\//i,Lc="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",uA=/^-\/\/W3C\/\/DTD HTML 4\.01 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\//i,Oc=/^-\/\/W3C\/\/DTD XHTML 1\.0 Frameset\/\/|^-\/\/W3C\/\/DTD XHTML 1\.0 Transitional\/\//i,SD=Object.create(null);SD[G$.HTML]={__proto__:null,address:!0,applet:!0,area:!0,article:!0,aside:!0,base:!0,basefont:!0,bgsound:!0,blockquote:!0,body:!0,br:!0,button:!0,caption:!0,center:!0,col:!0,colgroup:!0,dd:!0,details:!0,dir:!0,div:!0,dl:!0,dt:!0,embed:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,frame:!0,frameset:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,head:!0,header:!0,hgroup:!0,hr:!0,html:!0,iframe:!0,img:!0,input:!0,li:!0,link:!0,listing:!0,main:!0,marquee:!0,menu:!0,meta:!0,nav:!0,noembed:!0,noframes:!0,noscript:!0,object:!0,ol:!0,p:!0,param:!0,plaintext:!0,pre:!0,script:!0,section:!0,select:!0,source:!0,style:!0,summary:!0,table:!0,tbody:!0,td:!0,template:!0,textarea:!0,tfoot:!0,th:!0,thead:!0,title:!0,tr:!0,track:!0,ul:!0,wbr:!0,xmp:!0};SD[G$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};SD[G$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};var l7=Object.create(null);l7[G$.HTML]={__proto__:null,address:!0,div:!0,p:!0};var $M=Object.create(null);$M[G$.HTML]={__proto__:null,dd:!0,dt:!0};var _X=Object.create(null);_X[G$.HTML]={__proto__:null,table:!0,thead:!0,tbody:!0,tfoot:!0,tr:!0};var DM=Object.create(null);DM[G$.HTML]={__proto__:null,dd:!0,dt:!0,li:!0,menuitem:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0};var XM=Object.create(null);XM[G$.HTML]={__proto__:null,caption:!0,colgroup:!0,dd:!0,dt:!0,li:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0,tbody:!0,td:!0,tfoot:!0,th:!0,thead:!0,tr:!0};var p3=Object.create(null);p3[G$.HTML]={__proto__:null,table:!0,template:!0,html:!0};var r3=Object.create(null);r3[G$.HTML]={__proto__:null,tbody:!0,tfoot:!0,thead:!0,template:!0,html:!0};var i7=Object.create(null);i7[G$.HTML]={__proto__:null,tr:!0,template:!0,html:!0};var JM=Object.create(null);JM[G$.HTML]={__proto__:null,button:!0,fieldset:!0,input:!0,keygen:!0,object:!0,output:!0,select:!0,textarea:!0,img:!0};var N4=Object.create(null);N4[G$.HTML]={__proto__:null,applet:!0,caption:!0,html:!0,table:!0,td:!0,th:!0,marquee:!0,object:!0,template:!0};N4[G$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};N4[G$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var n3=Object.create(N4);n3[G$.HTML]=Object.create(N4[G$.HTML]);n3[G$.HTML].ol=!0;n3[G$.HTML].ul=!0;var p7=Object.create(N4);p7[G$.HTML]=Object.create(N4[G$.HTML]);p7[G$.HTML].button=!0;var GM=Object.create(null);GM[G$.HTML]={__proto__:null,html:!0,table:!0,template:!0};var Fc=Object.create(null);Fc[G$.HTML]={__proto__:null,optgroup:!0,option:!0};var YM=Object.create(null);YM[G$.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0};var QM=Object.create(null);QM[G$.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var fA={__proto__:null,"xlink:actuate":G$.XLINK,"xlink:arcrole":G$.XLINK,"xlink:href":G$.XLINK,"xlink:role":G$.XLINK,"xlink:show":G$.XLINK,"xlink:title":G$.XLINK,"xlink:type":G$.XLINK,"xml:base":G$.XML,"xml:lang":G$.XML,"xml:space":G$.XML,xmlns:G$.XMLNS,"xmlns:xlink":G$.XMLNS},mA={__proto__:null,attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},cA={__proto__:null,altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},lA={__proto__:null,0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},bc={__proto__:null,AElig:198,"AElig;":198,AMP:38,"AMP;":38,Aacute:193,"Aacute;":193,"Abreve;":258,Acirc:194,"Acirc;":194,"Acy;":1040,"Afr;":[55349,56580],Agrave:192,"Agrave;":192,"Alpha;":913,"Amacr;":256,"And;":10835,"Aogon;":260,"Aopf;":[55349,56632],"ApplyFunction;":8289,Aring:197,"Aring;":197,"Ascr;":[55349,56476],"Assign;":8788,Atilde:195,"Atilde;":195,Auml:196,"Auml;":196,"Backslash;":8726,"Barv;":10983,"Barwed;":8966,"Bcy;":1041,"Because;":8757,"Bernoullis;":8492,"Beta;":914,"Bfr;":[55349,56581],"Bopf;":[55349,56633],"Breve;":728,"Bscr;":8492,"Bumpeq;":8782,"CHcy;":1063,COPY:169,"COPY;":169,"Cacute;":262,"Cap;":8914,"CapitalDifferentialD;":8517,"Cayleys;":8493,"Ccaron;":268,Ccedil:199,"Ccedil;":199,"Ccirc;":264,"Cconint;":8752,"Cdot;":266,"Cedilla;":184,"CenterDot;":183,"Cfr;":8493,"Chi;":935,"CircleDot;":8857,"CircleMinus;":8854,"CirclePlus;":8853,"CircleTimes;":8855,"ClockwiseContourIntegral;":8754,"CloseCurlyDoubleQuote;":8221,"CloseCurlyQuote;":8217,"Colon;":8759,"Colone;":10868,"Congruent;":8801,"Conint;":8751,"ContourIntegral;":8750,"Copf;":8450,"Coproduct;":8720,"CounterClockwiseContourIntegral;":8755,"Cross;":10799,"Cscr;":[55349,56478],"Cup;":8915,"CupCap;":8781,"DD;":8517,"DDotrahd;":10513,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Dagger;":8225,"Darr;":8609,"Dashv;":10980,"Dcaron;":270,"Dcy;":1044,"Del;":8711,"Delta;":916,"Dfr;":[55349,56583],"DiacriticalAcute;":180,"DiacriticalDot;":729,"DiacriticalDoubleAcute;":733,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"Diamond;":8900,"DifferentialD;":8518,"Dopf;":[55349,56635],"Dot;":168,"DotDot;":8412,"DotEqual;":8784,"DoubleContourIntegral;":8751,"DoubleDot;":168,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DoubleLeftRightArrow;":8660,"DoubleLeftTee;":10980,"DoubleLongLeftArrow;":10232,"DoubleLongLeftRightArrow;":10234,"DoubleLongRightArrow;":10233,"DoubleRightArrow;":8658,"DoubleRightTee;":8872,"DoubleUpArrow;":8657,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownArrow;":8595,"DownArrowBar;":10515,"DownArrowUpArrow;":8693,"DownBreve;":785,"DownLeftRightVector;":10576,"DownLeftTeeVector;":10590,"DownLeftVector;":8637,"DownLeftVectorBar;":10582,"DownRightTeeVector;":10591,"DownRightVector;":8641,"DownRightVectorBar;":10583,"DownTee;":8868,"DownTeeArrow;":8615,"Downarrow;":8659,"Dscr;":[55349,56479],"Dstrok;":272,"ENG;":330,ETH:208,"ETH;":208,Eacute:201,"Eacute;":201,"Ecaron;":282,Ecirc:202,"Ecirc;":202,"Ecy;":1069,"Edot;":278,"Efr;":[55349,56584],Egrave:200,"Egrave;":200,"Element;":8712,"Emacr;":274,"EmptySmallSquare;":9723,"EmptyVerySmallSquare;":9643,"Eogon;":280,"Eopf;":[55349,56636],"Epsilon;":917,"Equal;":10869,"EqualTilde;":8770,"Equilibrium;":8652,"Escr;":8496,"Esim;":10867,"Eta;":919,Euml:203,"Euml;":203,"Exists;":8707,"ExponentialE;":8519,"Fcy;":1060,"Ffr;":[55349,56585],"FilledSmallSquare;":9724,"FilledVerySmallSquare;":9642,"Fopf;":[55349,56637],"ForAll;":8704,"Fouriertrf;":8497,"Fscr;":8497,"GJcy;":1027,GT:62,"GT;":62,"Gamma;":915,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"Gcirc;":284,"Gcy;":1043,"Gdot;":288,"Gfr;":[55349,56586],"Gg;":8921,"Gopf;":[55349,56638],"GreaterEqual;":8805,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"GreaterGreater;":10914,"GreaterLess;":8823,"GreaterSlantEqual;":10878,"GreaterTilde;":8819,"Gscr;":[55349,56482],"Gt;":8811,"HARDcy;":1066,"Hacek;":711,"Hat;":94,"Hcirc;":292,"Hfr;":8460,"HilbertSpace;":8459,"Hopf;":8461,"HorizontalLine;":9472,"Hscr;":8459,"Hstrok;":294,"HumpDownHump;":8782,"HumpEqual;":8783,"IEcy;":1045,"IJlig;":306,"IOcy;":1025,Iacute:205,"Iacute;":205,Icirc:206,"Icirc;":206,"Icy;":1048,"Idot;":304,"Ifr;":8465,Igrave:204,"Igrave;":204,"Im;":8465,"Imacr;":298,"ImaginaryI;":8520,"Implies;":8658,"Int;":8748,"Integral;":8747,"Intersection;":8898,"InvisibleComma;":8291,"InvisibleTimes;":8290,"Iogon;":302,"Iopf;":[55349,56640],"Iota;":921,"Iscr;":8464,"Itilde;":296,"Iukcy;":1030,Iuml:207,"Iuml;":207,"Jcirc;":308,"Jcy;":1049,"Jfr;":[55349,56589],"Jopf;":[55349,56641],"Jscr;":[55349,56485],"Jsercy;":1032,"Jukcy;":1028,"KHcy;":1061,"KJcy;":1036,"Kappa;":922,"Kcedil;":310,"Kcy;":1050,"Kfr;":[55349,56590],"Kopf;":[55349,56642],"Kscr;":[55349,56486],"LJcy;":1033,LT:60,"LT;":60,"Lacute;":313,"Lambda;":923,"Lang;":10218,"Laplacetrf;":8466,"Larr;":8606,"Lcaron;":317,"Lcedil;":315,"Lcy;":1051,"LeftAngleBracket;":10216,"LeftArrow;":8592,"LeftArrowBar;":8676,"LeftArrowRightArrow;":8646,"LeftCeiling;":8968,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVector;":8643,"LeftDownVectorBar;":10585,"LeftFloor;":8970,"LeftRightArrow;":8596,"LeftRightVector;":10574,"LeftTee;":8867,"LeftTeeArrow;":8612,"LeftTeeVector;":10586,"LeftTriangle;":8882,"LeftTriangleBar;":10703,"LeftTriangleEqual;":8884,"LeftUpDownVector;":10577,"LeftUpTeeVector;":10592,"LeftUpVector;":8639,"LeftUpVectorBar;":10584,"LeftVector;":8636,"LeftVectorBar;":10578,"Leftarrow;":8656,"Leftrightarrow;":8660,"LessEqualGreater;":8922,"LessFullEqual;":8806,"LessGreater;":8822,"LessLess;":10913,"LessSlantEqual;":10877,"LessTilde;":8818,"Lfr;":[55349,56591],"Ll;":8920,"Lleftarrow;":8666,"Lmidot;":319,"LongLeftArrow;":10229,"LongLeftRightArrow;":10231,"LongRightArrow;":10230,"Longleftarrow;":10232,"Longleftrightarrow;":10234,"Longrightarrow;":10233,"Lopf;":[55349,56643],"LowerLeftArrow;":8601,"LowerRightArrow;":8600,"Lscr;":8466,"Lsh;":8624,"Lstrok;":321,"Lt;":8810,"Map;":10501,"Mcy;":1052,"MediumSpace;":8287,"Mellintrf;":8499,"Mfr;":[55349,56592],"MinusPlus;":8723,"Mopf;":[55349,56644],"Mscr;":8499,"Mu;":924,"NJcy;":1034,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ncy;":1053,"NegativeMediumSpace;":8203,"NegativeThickSpace;":8203,"NegativeThinSpace;":8203,"NegativeVeryThinSpace;":8203,"NestedGreaterGreater;":8811,"NestedLessLess;":8810,"NewLine;":10,"Nfr;":[55349,56593],"NoBreak;":8288,"NonBreakingSpace;":160,"Nopf;":8469,"Not;":10988,"NotCongruent;":8802,"NotCupCap;":8813,"NotDoubleVerticalBar;":8742,"NotElement;":8713,"NotEqual;":8800,"NotEqualTilde;":[8770,824],"NotExists;":8708,"NotGreater;":8815,"NotGreaterEqual;":8817,"NotGreaterFullEqual;":[8807,824],"NotGreaterGreater;":[8811,824],"NotGreaterLess;":8825,"NotGreaterSlantEqual;":[10878,824],"NotGreaterTilde;":8821,"NotHumpDownHump;":[8782,824],"NotHumpEqual;":[8783,824],"NotLeftTriangle;":8938,"NotLeftTriangleBar;":[10703,824],"NotLeftTriangleEqual;":8940,"NotLess;":8814,"NotLessEqual;":8816,"NotLessGreater;":8824,"NotLessLess;":[8810,824],"NotLessSlantEqual;":[10877,824],"NotLessTilde;":8820,"NotNestedGreaterGreater;":[10914,824],"NotNestedLessLess;":[10913,824],"NotPrecedes;":8832,"NotPrecedesEqual;":[10927,824],"NotPrecedesSlantEqual;":8928,"NotReverseElement;":8716,"NotRightTriangle;":8939,"NotRightTriangleBar;":[10704,824],"NotRightTriangleEqual;":8941,"NotSquareSubset;":[8847,824],"NotSquareSubsetEqual;":8930,"NotSquareSuperset;":[8848,824],"NotSquareSupersetEqual;":8931,"NotSubset;":[8834,8402],"NotSubsetEqual;":8840,"NotSucceeds;":8833,"NotSucceedsEqual;":[10928,824],"NotSucceedsSlantEqual;":8929,"NotSucceedsTilde;":[8831,824],"NotSuperset;":[8835,8402],"NotSupersetEqual;":8841,"NotTilde;":8769,"NotTildeEqual;":8772,"NotTildeFullEqual;":8775,"NotTildeTilde;":8777,"NotVerticalBar;":8740,"Nscr;":[55349,56489],Ntilde:209,"Ntilde;":209,"Nu;":925,"OElig;":338,Oacute:211,"Oacute;":211,Ocirc:212,"Ocirc;":212,"Ocy;":1054,"Odblac;":336,"Ofr;":[55349,56594],Ograve:210,"Ograve;":210,"Omacr;":332,"Omega;":937,"Omicron;":927,"Oopf;":[55349,56646],"OpenCurlyDoubleQuote;":8220,"OpenCurlyQuote;":8216,"Or;":10836,"Oscr;":[55349,56490],Oslash:216,"Oslash;":216,Otilde:213,"Otilde;":213,"Otimes;":10807,Ouml:214,"Ouml;":214,"OverBar;":8254,"OverBrace;":9182,"OverBracket;":9140,"OverParenthesis;":9180,"PartialD;":8706,"Pcy;":1055,"Pfr;":[55349,56595],"Phi;":934,"Pi;":928,"PlusMinus;":177,"Poincareplane;":8460,"Popf;":8473,"Pr;":10939,"Precedes;":8826,"PrecedesEqual;":10927,"PrecedesSlantEqual;":8828,"PrecedesTilde;":8830,"Prime;":8243,"Product;":8719,"Proportion;":8759,"Proportional;":8733,"Pscr;":[55349,56491],"Psi;":936,QUOT:34,"QUOT;":34,"Qfr;":[55349,56596],"Qopf;":8474,"Qscr;":[55349,56492],"RBarr;":10512,REG:174,"REG;":174,"Racute;":340,"Rang;":10219,"Rarr;":8608,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"Rcy;":1056,"Re;":8476,"ReverseElement;":8715,"ReverseEquilibrium;":8651,"ReverseUpEquilibrium;":10607,"Rfr;":8476,"Rho;":929,"RightAngleBracket;":10217,"RightArrow;":8594,"RightArrowBar;":8677,"RightArrowLeftArrow;":8644,"RightCeiling;":8969,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVector;":8642,"RightDownVectorBar;":10581,"RightFloor;":8971,"RightTee;":8866,"RightTeeArrow;":8614,"RightTeeVector;":10587,"RightTriangle;":8883,"RightTriangleBar;":10704,"RightTriangleEqual;":8885,"RightUpDownVector;":10575,"RightUpTeeVector;":10588,"RightUpVector;":8638,"RightUpVectorBar;":10580,"RightVector;":8640,"RightVectorBar;":10579,"Rightarrow;":8658,"Ropf;":8477,"RoundImplies;":10608,"Rrightarrow;":8667,"Rscr;":8475,"Rsh;":8625,"RuleDelayed;":10740,"SHCHcy;":1065,"SHcy;":1064,"SOFTcy;":1068,"Sacute;":346,"Sc;":10940,"Scaron;":352,"Scedil;":350,"Scirc;":348,"Scy;":1057,"Sfr;":[55349,56598],"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"ShortRightArrow;":8594,"ShortUpArrow;":8593,"Sigma;":931,"SmallCircle;":8728,"Sopf;":[55349,56650],"Sqrt;":8730,"Square;":9633,"SquareIntersection;":8851,"SquareSubset;":8847,"SquareSubsetEqual;":8849,"SquareSuperset;":8848,"SquareSupersetEqual;":8850,"SquareUnion;":8852,"Sscr;":[55349,56494],"Star;":8902,"Sub;":8912,"Subset;":8912,"SubsetEqual;":8838,"Succeeds;":8827,"SucceedsEqual;":10928,"SucceedsSlantEqual;":8829,"SucceedsTilde;":8831,"SuchThat;":8715,"Sum;":8721,"Sup;":8913,"Superset;":8835,"SupersetEqual;":8839,"Supset;":8913,THORN:222,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"TScy;":1062,"Tab;":9,"Tau;":932,"Tcaron;":356,"Tcedil;":354,"Tcy;":1058,"Tfr;":[55349,56599],"Therefore;":8756,"Theta;":920,"ThickSpace;":[8287,8202],"ThinSpace;":8201,"Tilde;":8764,"TildeEqual;":8771,"TildeFullEqual;":8773,"TildeTilde;":8776,"Topf;":[55349,56651],"TripleDot;":8411,"Tscr;":[55349,56495],"Tstrok;":358,Uacute:218,"Uacute;":218,"Uarr;":8607,"Uarrocir;":10569,"Ubrcy;":1038,"Ubreve;":364,Ucirc:219,"Ucirc;":219,"Ucy;":1059,"Udblac;":368,"Ufr;":[55349,56600],Ugrave:217,"Ugrave;":217,"Umacr;":362,"UnderBar;":95,"UnderBrace;":9183,"UnderBracket;":9141,"UnderParenthesis;":9181,"Union;":8899,"UnionPlus;":8846,"Uogon;":370,"Uopf;":[55349,56652],"UpArrow;":8593,"UpArrowBar;":10514,"UpArrowDownArrow;":8645,"UpDownArrow;":8597,"UpEquilibrium;":10606,"UpTee;":8869,"UpTeeArrow;":8613,"Uparrow;":8657,"Updownarrow;":8661,"UpperLeftArrow;":8598,"UpperRightArrow;":8599,"Upsi;":978,"Upsilon;":933,"Uring;":366,"Uscr;":[55349,56496],"Utilde;":360,Uuml:220,"Uuml;":220,"VDash;":8875,"Vbar;":10987,"Vcy;":1042,"Vdash;":8873,"Vdashl;":10982,"Vee;":8897,"Verbar;":8214,"Vert;":8214,"VerticalBar;":8739,"VerticalLine;":124,"VerticalSeparator;":10072,"VerticalTilde;":8768,"VeryThinSpace;":8202,"Vfr;":[55349,56601],"Vopf;":[55349,56653],"Vscr;":[55349,56497],"Vvdash;":8874,"Wcirc;":372,"Wedge;":8896,"Wfr;":[55349,56602],"Wopf;":[55349,56654],"Wscr;":[55349,56498],"Xfr;":[55349,56603],"Xi;":926,"Xopf;":[55349,56655],"Xscr;":[55349,56499],"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,Yacute:221,"Yacute;":221,"Ycirc;":374,"Ycy;":1067,"Yfr;":[55349,56604],"Yopf;":[55349,56656],"Yscr;":[55349,56500],"Yuml;":376,"ZHcy;":1046,"Zacute;":377,"Zcaron;":381,"Zcy;":1047,"Zdot;":379,"ZeroWidthSpace;":8203,"Zeta;":918,"Zfr;":8488,"Zopf;":8484,"Zscr;":[55349,56501],aacute:225,"aacute;":225,"abreve;":259,"ac;":8766,"acE;":[8766,819],"acd;":8767,acirc:226,"acirc;":226,acute:180,"acute;":180,"acy;":1072,aelig:230,"aelig;":230,"af;":8289,"afr;":[55349,56606],agrave:224,"agrave;":224,"alefsym;":8501,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,amp:38,"amp;":38,"and;":8743,"andand;":10837,"andd;":10844,"andslope;":10840,"andv;":10842,"ang;":8736,"ange;":10660,"angle;":8736,"angmsd;":8737,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrt;":8735,"angrtvb;":8894,"angrtvbd;":10653,"angsph;":8738,"angst;":197,"angzarr;":9084,"aogon;":261,"aopf;":[55349,56658],"ap;":8776,"apE;":10864,"apacir;":10863,"ape;":8778,"apid;":8779,"apos;":39,"approx;":8776,"approxeq;":8778,aring:229,"aring;":229,"ascr;":[55349,56502],"ast;":42,"asymp;":8776,"asympeq;":8781,atilde:227,"atilde;":227,auml:228,"auml;":228,"awconint;":8755,"awint;":10769,"bNot;":10989,"backcong;":8780,"backepsilon;":1014,"backprime;":8245,"backsim;":8765,"backsimeq;":8909,"barvee;":8893,"barwed;":8965,"barwedge;":8965,"bbrk;":9141,"bbrktbrk;":9142,"bcong;":8780,"bcy;":1073,"bdquo;":8222,"becaus;":8757,"because;":8757,"bemptyv;":10672,"bepsi;":1014,"bernou;":8492,"beta;":946,"beth;":8502,"between;":8812,"bfr;":[55349,56607],"bigcap;":8898,"bigcirc;":9711,"bigcup;":8899,"bigodot;":10752,"bigoplus;":10753,"bigotimes;":10754,"bigsqcup;":10758,"bigstar;":9733,"bigtriangledown;":9661,"bigtriangleup;":9651,"biguplus;":10756,"bigvee;":8897,"bigwedge;":8896,"bkarow;":10509,"blacklozenge;":10731,"blacksquare;":9642,"blacktriangle;":9652,"blacktriangledown;":9662,"blacktriangleleft;":9666,"blacktriangleright;":9656,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"bne;":[61,8421],"bnequiv;":[8801,8421],"bnot;":8976,"bopf;":[55349,56659],"bot;":8869,"bottom;":8869,"bowtie;":8904,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxH;":9552,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxV;":9553,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxbox;":10697,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxh;":9472,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxminus;":8863,"boxplus;":8862,"boxtimes;":8864,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxv;":9474,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"bprime;":8245,"breve;":728,brvbar:166,"brvbar;":166,"bscr;":[55349,56503],"bsemi;":8271,"bsim;":8765,"bsime;":8909,"bsol;":92,"bsolb;":10693,"bsolhsub;":10184,"bull;":8226,"bullet;":8226,"bump;":8782,"bumpE;":10926,"bumpe;":8783,"bumpeq;":8783,"cacute;":263,"cap;":8745,"capand;":10820,"capbrcup;":10825,"capcap;":10827,"capcup;":10823,"capdot;":10816,"caps;":[8745,65024],"caret;":8257,"caron;":711,"ccaps;":10829,"ccaron;":269,ccedil:231,"ccedil;":231,"ccirc;":265,"ccups;":10828,"ccupssm;":10832,"cdot;":267,cedil:184,"cedil;":184,"cemptyv;":10674,cent:162,"cent;":162,"centerdot;":183,"cfr;":[55349,56608],"chcy;":1095,"check;":10003,"checkmark;":10003,"chi;":967,"cir;":9675,"cirE;":10691,"circ;":710,"circeq;":8791,"circlearrowleft;":8634,"circlearrowright;":8635,"circledR;":174,"circledS;":9416,"circledast;":8859,"circledcirc;":8858,"circleddash;":8861,"cire;":8791,"cirfnint;":10768,"cirmid;":10991,"cirscir;":10690,"clubs;":9827,"clubsuit;":9827,"colon;":58,"colone;":8788,"coloneq;":8788,"comma;":44,"commat;":64,"comp;":8705,"compfn;":8728,"complement;":8705,"complexes;":8450,"cong;":8773,"congdot;":10861,"conint;":8750,"copf;":[55349,56660],"coprod;":8720,copy:169,"copy;":169,"copysr;":8471,"crarr;":8629,"cross;":10007,"cscr;":[55349,56504],"csub;":10959,"csube;":10961,"csup;":10960,"csupe;":10962,"ctdot;":8943,"cudarrl;":10552,"cudarrr;":10549,"cuepr;":8926,"cuesc;":8927,"cularr;":8630,"cularrp;":10557,"cup;":8746,"cupbrcap;":10824,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"cupor;":10821,"cups;":[8746,65024],"curarr;":8631,"curarrm;":10556,"curlyeqprec;":8926,"curlyeqsucc;":8927,"curlyvee;":8910,"curlywedge;":8911,curren:164,"curren;":164,"curvearrowleft;":8630,"curvearrowright;":8631,"cuvee;":8910,"cuwed;":8911,"cwconint;":8754,"cwint;":8753,"cylcty;":9005,"dArr;":8659,"dHar;":10597,"dagger;":8224,"daleth;":8504,"darr;":8595,"dash;":8208,"dashv;":8867,"dbkarow;":10511,"dblac;":733,"dcaron;":271,"dcy;":1076,"dd;":8518,"ddagger;":8225,"ddarr;":8650,"ddotseq;":10871,deg:176,"deg;":176,"delta;":948,"demptyv;":10673,"dfisht;":10623,"dfr;":[55349,56609],"dharl;":8643,"dharr;":8642,"diam;":8900,"diamond;":8900,"diamondsuit;":9830,"diams;":9830,"die;":168,"digamma;":989,"disin;":8946,"div;":247,divide:247,"divide;":247,"divideontimes;":8903,"divonx;":8903,"djcy;":1106,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"dopf;":[55349,56661],"dot;":729,"doteq;":8784,"doteqdot;":8785,"dotminus;":8760,"dotplus;":8724,"dotsquare;":8865,"doublebarwedge;":8966,"downarrow;":8595,"downdownarrows;":8650,"downharpoonleft;":8643,"downharpoonright;":8642,"drbkarow;":10512,"drcorn;":8991,"drcrop;":8972,"dscr;":[55349,56505],"dscy;":1109,"dsol;":10742,"dstrok;":273,"dtdot;":8945,"dtri;":9663,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"dwangle;":10662,"dzcy;":1119,"dzigrarr;":10239,"eDDot;":10871,"eDot;":8785,eacute:233,"eacute;":233,"easter;":10862,"ecaron;":283,"ecir;":8790,ecirc:234,"ecirc;":234,"ecolon;":8789,"ecy;":1101,"edot;":279,"ee;":8519,"efDot;":8786,"efr;":[55349,56610],"eg;":10906,egrave:232,"egrave;":232,"egs;":10902,"egsdot;":10904,"el;":10905,"elinters;":9191,"ell;":8467,"els;":10901,"elsdot;":10903,"emacr;":275,"empty;":8709,"emptyset;":8709,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"emsp;":8195,"eng;":331,"ensp;":8194,"eogon;":281,"eopf;":[55349,56662],"epar;":8917,"eparsl;":10723,"eplus;":10865,"epsi;":949,"epsilon;":949,"epsiv;":1013,"eqcirc;":8790,"eqcolon;":8789,"eqsim;":8770,"eqslantgtr;":10902,"eqslantless;":10901,"equals;":61,"equest;":8799,"equiv;":8801,"equivDD;":10872,"eqvparsl;":10725,"erDot;":8787,"erarr;":10609,"escr;":8495,"esdot;":8784,"esim;":8770,"eta;":951,eth:240,"eth;":240,euml:235,"euml;":235,"euro;":8364,"excl;":33,"exist;":8707,"expectation;":8496,"exponentiale;":8519,"fallingdotseq;":8786,"fcy;":1092,"female;":9792,"ffilig;":64259,"fflig;":64256,"ffllig;":64260,"ffr;":[55349,56611],"filig;":64257,"fjlig;":[102,106],"flat;":9837,"fllig;":64258,"fltns;":9649,"fnof;":402,"fopf;":[55349,56663],"forall;":8704,"fork;":8916,"forkv;":10969,"fpartint;":10765,frac12:189,"frac12;":189,"frac13;":8531,frac14:188,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,frac34:190,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"frasl;":8260,"frown;":8994,"fscr;":[55349,56507],"gE;":8807,"gEl;":10892,"gacute;":501,"gamma;":947,"gammad;":989,"gap;":10886,"gbreve;":287,"gcirc;":285,"gcy;":1075,"gdot;":289,"ge;":8805,"gel;":8923,"geq;":8805,"geqq;":8807,"geqslant;":10878,"ges;":10878,"gescc;":10921,"gesdot;":10880,"gesdoto;":10882,"gesdotol;":10884,"gesl;":[8923,65024],"gesles;":10900,"gfr;":[55349,56612],"gg;":8811,"ggg;":8921,"gimel;":8503,"gjcy;":1107,"gl;":8823,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gnap;":10890,"gnapprox;":10890,"gne;":10888,"gneq;":10888,"gneqq;":8809,"gnsim;":8935,"gopf;":[55349,56664],"grave;":96,"gscr;":8458,"gsim;":8819,"gsime;":10894,"gsiml;":10896,gt:62,"gt;":62,"gtcc;":10919,"gtcir;":10874,"gtdot;":8919,"gtlPar;":10645,"gtquest;":10876,"gtrapprox;":10886,"gtrarr;":10616,"gtrdot;":8919,"gtreqless;":8923,"gtreqqless;":10892,"gtrless;":8823,"gtrsim;":8819,"gvertneqq;":[8809,65024],"gvnE;":[8809,65024],"hArr;":8660,"hairsp;":8202,"half;":189,"hamilt;":8459,"hardcy;":1098,"harr;":8596,"harrcir;":10568,"harrw;":8621,"hbar;":8463,"hcirc;":293,"hearts;":9829,"heartsuit;":9829,"hellip;":8230,"hercon;":8889,"hfr;":[55349,56613],"hksearow;":10533,"hkswarow;":10534,"hoarr;":8703,"homtht;":8763,"hookleftarrow;":8617,"hookrightarrow;":8618,"hopf;":[55349,56665],"horbar;":8213,"hscr;":[55349,56509],"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,iacute:237,"iacute;":237,"ic;":8291,icirc:238,"icirc;":238,"icy;":1080,"iecy;":1077,iexcl:161,"iexcl;":161,"iff;":8660,"ifr;":[55349,56614],igrave:236,"igrave;":236,"ii;":8520,"iiiint;":10764,"iiint;":8749,"iinfin;":10716,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imagline;":8464,"imagpart;":8465,"imath;":305,"imof;":8887,"imped;":437,"in;":8712,"incare;":8453,"infin;":8734,"infintie;":10717,"inodot;":305,"int;":8747,"intcal;":8890,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"intprod;":10812,"iocy;":1105,"iogon;":303,"iopf;":[55349,56666],"iota;":953,"iprod;":10812,iquest:191,"iquest;":191,"iscr;":[55349,56510],"isin;":8712,"isinE;":8953,"isindot;":8949,"isins;":8948,"isinsv;":8947,"isinv;":8712,"it;":8290,"itilde;":297,"iukcy;":1110,iuml:239,"iuml;":239,"jcirc;":309,"jcy;":1081,"jfr;":[55349,56615],"jmath;":567,"jopf;":[55349,56667],"jscr;":[55349,56511],"jsercy;":1112,"jukcy;":1108,"kappa;":954,"kappav;":1008,"kcedil;":311,"kcy;":1082,"kfr;":[55349,56616],"kgreen;":312,"khcy;":1093,"kjcy;":1116,"kopf;":[55349,56668],"kscr;":[55349,56512],"lAarr;":8666,"lArr;":8656,"lAtail;":10523,"lBarr;":10510,"lE;":8806,"lEg;":10891,"lHar;":10594,"lacute;":314,"laemptyv;":10676,"lagran;":8466,"lambda;":955,"lang;":10216,"langd;":10641,"langle;":10216,"lap;":10885,laquo:171,"laquo;":171,"larr;":8592,"larrb;":8676,"larrbfs;":10527,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrsim;":10611,"larrtl;":8610,"lat;":10923,"latail;":10521,"late;":10925,"lates;":[10925,65024],"lbarr;":10508,"lbbrk;":10098,"lbrace;":123,"lbrack;":91,"lbrke;":10635,"lbrksld;":10639,"lbrkslu;":10637,"lcaron;":318,"lcedil;":316,"lceil;":8968,"lcub;":123,"lcy;":1083,"ldca;":10550,"ldquo;":8220,"ldquor;":8222,"ldrdhar;":10599,"ldrushar;":10571,"ldsh;":8626,"le;":8804,"leftarrow;":8592,"leftarrowtail;":8610,"leftharpoondown;":8637,"leftharpoonup;":8636,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftrightarrows;":8646,"leftrightharpoons;":8651,"leftrightsquigarrow;":8621,"leftthreetimes;":8907,"leg;":8922,"leq;":8804,"leqq;":8806,"leqslant;":10877,"les;":10877,"lescc;":10920,"lesdot;":10879,"lesdoto;":10881,"lesdotor;":10883,"lesg;":[8922,65024],"lesges;":10899,"lessapprox;":10885,"lessdot;":8918,"lesseqgtr;":8922,"lesseqqgtr;":10891,"lessgtr;":8822,"lesssim;":8818,"lfisht;":10620,"lfloor;":8970,"lfr;":[55349,56617],"lg;":8822,"lgE;":10897,"lhard;":8637,"lharu;":8636,"lharul;":10602,"lhblk;":9604,"ljcy;":1113,"ll;":8810,"llarr;":8647,"llcorner;":8990,"llhard;":10603,"lltri;":9722,"lmidot;":320,"lmoust;":9136,"lmoustache;":9136,"lnE;":8808,"lnap;":10889,"lnapprox;":10889,"lne;":10887,"lneq;":10887,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"longleftarrow;":10229,"longleftrightarrow;":10231,"longmapsto;":10236,"longrightarrow;":10230,"looparrowleft;":8619,"looparrowright;":8620,"lopar;":10629,"lopf;":[55349,56669],"loplus;":10797,"lotimes;":10804,"lowast;":8727,"lowbar;":95,"loz;":9674,"lozenge;":9674,"lozf;":10731,"lpar;":40,"lparlt;":10643,"lrarr;":8646,"lrcorner;":8991,"lrhar;":8651,"lrhard;":10605,"lrm;":8206,"lrtri;":8895,"lsaquo;":8249,"lscr;":[55349,56513],"lsh;":8624,"lsim;":8818,"lsime;":10893,"lsimg;":10895,"lsqb;":91,"lsquo;":8216,"lsquor;":8218,"lstrok;":322,lt:60,"lt;":60,"ltcc;":10918,"ltcir;":10873,"ltdot;":8918,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltquest;":10875,"ltrPar;":10646,"ltri;":9667,"ltrie;":8884,"ltrif;":9666,"lurdshar;":10570,"luruhar;":10598,"lvertneqq;":[8808,65024],"lvnE;":[8808,65024],"mDDot;":8762,macr:175,"macr;":175,"male;":9794,"malt;":10016,"maltese;":10016,"map;":8614,"mapsto;":8614,"mapstodown;":8615,"mapstoleft;":8612,"mapstoup;":8613,"marker;":9646,"mcomma;":10793,"mcy;":1084,"mdash;":8212,"measuredangle;":8737,"mfr;":[55349,56618],"mho;":8487,micro:181,"micro;":181,"mid;":8739,"midast;":42,"midcir;":10992,middot:183,"middot;":183,"minus;":8722,"minusb;":8863,"minusd;":8760,"minusdu;":10794,"mlcp;":10971,"mldr;":8230,"mnplus;":8723,"models;":8871,"mopf;":[55349,56670],"mp;":8723,"mscr;":[55349,56514],"mstpos;":8766,"mu;":956,"multimap;":8888,"mumap;":8888,"nGg;":[8921,824],"nGt;":[8811,8402],"nGtv;":[8811,824],"nLeftarrow;":8653,"nLeftrightarrow;":8654,"nLl;":[8920,824],"nLt;":[8810,8402],"nLtv;":[8810,824],"nRightarrow;":8655,"nVDash;":8879,"nVdash;":8878,"nabla;":8711,"nacute;":324,"nang;":[8736,8402],"nap;":8777,"napE;":[10864,824],"napid;":[8779,824],"napos;":329,"napprox;":8777,"natur;":9838,"natural;":9838,"naturals;":8469,nbsp:160,"nbsp;":160,"nbump;":[8782,824],"nbumpe;":[8783,824],"ncap;":10819,"ncaron;":328,"ncedil;":326,"ncong;":8775,"ncongdot;":[10861,824],"ncup;":10818,"ncy;":1085,"ndash;":8211,"ne;":8800,"neArr;":8663,"nearhk;":10532,"nearr;":8599,"nearrow;":8599,"nedot;":[8784,824],"nequiv;":8802,"nesear;":10536,"nesim;":[8770,824],"nexist;":8708,"nexists;":8708,"nfr;":[55349,56619],"ngE;":[8807,824],"nge;":8817,"ngeq;":8817,"ngeqq;":[8807,824],"ngeqslant;":[10878,824],"nges;":[10878,824],"ngsim;":8821,"ngt;":8815,"ngtr;":8815,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"ni;":8715,"nis;":8956,"nisd;":8954,"niv;":8715,"njcy;":1114,"nlArr;":8653,"nlE;":[8806,824],"nlarr;":8602,"nldr;":8229,"nle;":8816,"nleftarrow;":8602,"nleftrightarrow;":8622,"nleq;":8816,"nleqq;":[8806,824],"nleqslant;":[10877,824],"nles;":[10877,824],"nless;":8814,"nlsim;":8820,"nlt;":8814,"nltri;":8938,"nltrie;":8940,"nmid;":8740,"nopf;":[55349,56671],not:172,"not;":172,"notin;":8713,"notinE;":[8953,824],"notindot;":[8949,824],"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notni;":8716,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npar;":8742,"nparallel;":8742,"nparsl;":[11005,8421],"npart;":[8706,824],"npolint;":10772,"npr;":8832,"nprcue;":8928,"npre;":[10927,824],"nprec;":8832,"npreceq;":[10927,824],"nrArr;":8655,"nrarr;":8603,"nrarrc;":[10547,824],"nrarrw;":[8605,824],"nrightarrow;":8603,"nrtri;":8939,"nrtrie;":8941,"nsc;":8833,"nsccue;":8929,"nsce;":[10928,824],"nscr;":[55349,56515],"nshortmid;":8740,"nshortparallel;":8742,"nsim;":8769,"nsime;":8772,"nsimeq;":8772,"nsmid;":8740,"nspar;":8742,"nsqsube;":8930,"nsqsupe;":8931,"nsub;":8836,"nsubE;":[10949,824],"nsube;":8840,"nsubset;":[8834,8402],"nsubseteq;":8840,"nsubseteqq;":[10949,824],"nsucc;":8833,"nsucceq;":[10928,824],"nsup;":8837,"nsupE;":[10950,824],"nsupe;":8841,"nsupset;":[8835,8402],"nsupseteq;":8841,"nsupseteqq;":[10950,824],"ntgl;":8825,ntilde:241,"ntilde;":241,"ntlg;":8824,"ntriangleleft;":8938,"ntrianglelefteq;":8940,"ntriangleright;":8939,"ntrianglerighteq;":8941,"nu;":957,"num;":35,"numero;":8470,"numsp;":8199,"nvDash;":8877,"nvHarr;":10500,"nvap;":[8781,8402],"nvdash;":8876,"nvge;":[8805,8402],"nvgt;":[62,8402],"nvinfin;":10718,"nvlArr;":10498,"nvle;":[8804,8402],"nvlt;":[60,8402],"nvltrie;":[8884,8402],"nvrArr;":10499,"nvrtrie;":[8885,8402],"nvsim;":[8764,8402],"nwArr;":8662,"nwarhk;":10531,"nwarr;":8598,"nwarrow;":8598,"nwnear;":10535,"oS;":9416,oacute:243,"oacute;":243,"oast;":8859,"ocir;":8858,ocirc:244,"ocirc;":244,"ocy;":1086,"odash;":8861,"odblac;":337,"odiv;":10808,"odot;":8857,"odsold;":10684,"oelig;":339,"ofcir;":10687,"ofr;":[55349,56620],"ogon;":731,ograve:242,"ograve;":242,"ogt;":10689,"ohbar;":10677,"ohm;":937,"oint;":8750,"olarr;":8634,"olcir;":10686,"olcross;":10683,"oline;":8254,"olt;":10688,"omacr;":333,"omega;":969,"omicron;":959,"omid;":10678,"ominus;":8854,"oopf;":[55349,56672],"opar;":10679,"operp;":10681,"oplus;":8853,"or;":8744,"orarr;":8635,"ord;":10845,"order;":8500,"orderof;":8500,ordf:170,"ordf;":170,ordm:186,"ordm;":186,"origof;":8886,"oror;":10838,"orslope;":10839,"orv;":10843,"oscr;":8500,oslash:248,"oslash;":248,"osol;":8856,otilde:245,"otilde;":245,"otimes;":8855,"otimesas;":10806,ouml:246,"ouml;":246,"ovbar;":9021,"par;":8741,para:182,"para;":182,"parallel;":8741,"parsim;":10995,"parsl;":11005,"part;":8706,"pcy;":1087,"percnt;":37,"period;":46,"permil;":8240,"perp;":8869,"pertenk;":8241,"pfr;":[55349,56621],"phi;":966,"phiv;":981,"phmmat;":8499,"phone;":9742,"pi;":960,"pitchfork;":8916,"piv;":982,"planck;":8463,"planckh;":8462,"plankv;":8463,"plus;":43,"plusacir;":10787,"plusb;":8862,"pluscir;":10786,"plusdo;":8724,"plusdu;":10789,"pluse;":10866,plusmn:177,"plusmn;":177,"plussim;":10790,"plustwo;":10791,"pm;":177,"pointint;":10773,"popf;":[55349,56673],pound:163,"pound;":163,"pr;":8826,"prE;":10931,"prap;":10935,"prcue;":8828,"pre;":10927,"prec;":8826,"precapprox;":10935,"preccurlyeq;":8828,"preceq;":10927,"precnapprox;":10937,"precneqq;":10933,"precnsim;":8936,"precsim;":8830,"prime;":8242,"primes;":8473,"prnE;":10933,"prnap;":10937,"prnsim;":8936,"prod;":8719,"profalar;":9006,"profline;":8978,"profsurf;":8979,"prop;":8733,"propto;":8733,"prsim;":8830,"prurel;":8880,"pscr;":[55349,56517],"psi;":968,"puncsp;":8200,"qfr;":[55349,56622],"qint;":10764,"qopf;":[55349,56674],"qprime;":8279,"qscr;":[55349,56518],"quaternions;":8461,"quatint;":10774,"quest;":63,"questeq;":8799,quot:34,"quot;":34,"rAarr;":8667,"rArr;":8658,"rAtail;":10524,"rBarr;":10511,"rHar;":10596,"race;":[8765,817],"racute;":341,"radic;":8730,"raemptyv;":10675,"rang;":10217,"rangd;":10642,"range;":10661,"rangle;":10217,raquo:187,"raquo;":187,"rarr;":8594,"rarrap;":10613,"rarrb;":8677,"rarrbfs;":10528,"rarrc;":10547,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrsim;":10612,"rarrtl;":8611,"rarrw;":8605,"ratail;":10522,"ratio;":8758,"rationals;":8474,"rbarr;":10509,"rbbrk;":10099,"rbrace;":125,"rbrack;":93,"rbrke;":10636,"rbrksld;":10638,"rbrkslu;":10640,"rcaron;":345,"rcedil;":343,"rceil;":8969,"rcub;":125,"rcy;":1088,"rdca;":10551,"rdldhar;":10601,"rdquo;":8221,"rdquor;":8221,"rdsh;":8627,"real;":8476,"realine;":8475,"realpart;":8476,"reals;":8477,"rect;":9645,reg:174,"reg;":174,"rfisht;":10621,"rfloor;":8971,"rfr;":[55349,56623],"rhard;":8641,"rharu;":8640,"rharul;":10604,"rho;":961,"rhov;":1009,"rightarrow;":8594,"rightarrowtail;":8611,"rightharpoondown;":8641,"rightharpoonup;":8640,"rightleftarrows;":8644,"rightleftharpoons;":8652,"rightrightarrows;":8649,"rightsquigarrow;":8605,"rightthreetimes;":8908,"ring;":730,"risingdotseq;":8787,"rlarr;":8644,"rlhar;":8652,"rlm;":8207,"rmoust;":9137,"rmoustache;":9137,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"ropf;":[55349,56675],"roplus;":10798,"rotimes;":10805,"rpar;":41,"rpargt;":10644,"rppolint;":10770,"rrarr;":8649,"rsaquo;":8250,"rscr;":[55349,56519],"rsh;":8625,"rsqb;":93,"rsquo;":8217,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"rtri;":9657,"rtrie;":8885,"rtrif;":9656,"rtriltri;":10702,"ruluhar;":10600,"rx;":8478,"sacute;":347,"sbquo;":8218,"sc;":8827,"scE;":10932,"scap;":10936,"scaron;":353,"sccue;":8829,"sce;":10928,"scedil;":351,"scirc;":349,"scnE;":10934,"scnap;":10938,"scnsim;":8937,"scpolint;":10771,"scsim;":8831,"scy;":1089,"sdot;":8901,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searhk;":10533,"searr;":8600,"searrow;":8600,sect:167,"sect;":167,"semi;":59,"seswar;":10537,"setminus;":8726,"setmn;":8726,"sext;":10038,"sfr;":[55349,56624],"sfrown;":8994,"sharp;":9839,"shchcy;":1097,"shcy;":1096,"shortmid;":8739,"shortparallel;":8741,shy:173,"shy;":173,"sigma;":963,"sigmaf;":962,"sigmav;":962,"sim;":8764,"simdot;":10858,"sime;":8771,"simeq;":8771,"simg;":10910,"simgE;":10912,"siml;":10909,"simlE;":10911,"simne;":8774,"simplus;":10788,"simrarr;":10610,"slarr;":8592,"smallsetminus;":8726,"smashp;":10803,"smeparsl;":10724,"smid;":8739,"smile;":8995,"smt;":10922,"smte;":10924,"smtes;":[10924,65024],"softcy;":1100,"sol;":47,"solb;":10692,"solbar;":9023,"sopf;":[55349,56676],"spades;":9824,"spadesuit;":9824,"spar;":8741,"sqcap;":8851,"sqcaps;":[8851,65024],"sqcup;":8852,"sqcups;":[8852,65024],"sqsub;":8847,"sqsube;":8849,"sqsubset;":8847,"sqsubseteq;":8849,"sqsup;":8848,"sqsupe;":8850,"sqsupset;":8848,"sqsupseteq;":8850,"squ;":9633,"square;":9633,"squarf;":9642,"squf;":9642,"srarr;":8594,"sscr;":[55349,56520],"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"star;":9734,"starf;":9733,"straightepsilon;":1013,"straightphi;":981,"strns;":175,"sub;":8834,"subE;":10949,"subdot;":10941,"sube;":8838,"subedot;":10947,"submult;":10945,"subnE;":10955,"subne;":8842,"subplus;":10943,"subrarr;":10617,"subset;":8834,"subseteq;":8838,"subseteqq;":10949,"subsetneq;":8842,"subsetneqq;":10955,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succ;":8827,"succapprox;":10936,"succcurlyeq;":8829,"succeq;":10928,"succnapprox;":10938,"succneqq;":10934,"succnsim;":8937,"succsim;":8831,"sum;":8721,"sung;":9834,sup1:185,"sup1;":185,sup2:178,"sup2;":178,sup3:179,"sup3;":179,"sup;":8835,"supE;":10950,"supdot;":10942,"supdsub;":10968,"supe;":8839,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supnE;":10956,"supne;":8843,"supplus;":10944,"supset;":8835,"supseteq;":8839,"supseteqq;":10950,"supsetneq;":8843,"supsetneqq;":10956,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swArr;":8665,"swarhk;":10534,"swarr;":8601,"swarrow;":8601,"swnwar;":10538,szlig:223,"szlig;":223,"target;":8982,"tau;":964,"tbrk;":9140,"tcaron;":357,"tcedil;":355,"tcy;":1090,"tdot;":8411,"telrec;":8981,"tfr;":[55349,56625],"there4;":8756,"therefore;":8756,"theta;":952,"thetasym;":977,"thetav;":977,"thickapprox;":8776,"thicksim;":8764,"thinsp;":8201,"thkap;":8776,"thksim;":8764,thorn:254,"thorn;":254,"tilde;":732,times:215,"times;":215,"timesb;":8864,"timesbar;":10801,"timesd;":10800,"tint;":8749,"toea;":10536,"top;":8868,"topbot;":9014,"topcir;":10993,"topf;":[55349,56677],"topfork;":10970,"tosa;":10537,"tprime;":8244,"trade;":8482,"triangle;":9653,"triangledown;":9663,"triangleleft;":9667,"trianglelefteq;":8884,"triangleq;":8796,"triangleright;":9657,"trianglerighteq;":8885,"tridot;":9708,"trie;":8796,"triminus;":10810,"triplus;":10809,"trisb;":10701,"tritime;":10811,"trpezium;":9186,"tscr;":[55349,56521],"tscy;":1094,"tshcy;":1115,"tstrok;":359,"twixt;":8812,"twoheadleftarrow;":8606,"twoheadrightarrow;":8608,"uArr;":8657,"uHar;":10595,uacute:250,"uacute;":250,"uarr;":8593,"ubrcy;":1118,"ubreve;":365,ucirc:251,"ucirc;":251,"ucy;":1091,"udarr;":8645,"udblac;":369,"udhar;":10606,"ufisht;":10622,"ufr;":[55349,56626],ugrave:249,"ugrave;":249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ulcorn;":8988,"ulcorner;":8988,"ulcrop;":8975,"ultri;":9720,"umacr;":363,uml:168,"uml;":168,"uogon;":371,"uopf;":[55349,56678],"uparrow;":8593,"updownarrow;":8597,"upharpoonleft;":8639,"upharpoonright;":8638,"uplus;":8846,"upsi;":965,"upsih;":978,"upsilon;":965,"upuparrows;":8648,"urcorn;":8989,"urcorner;":8989,"urcrop;":8974,"uring;":367,"urtri;":9721,"uscr;":[55349,56522],"utdot;":8944,"utilde;":361,"utri;":9653,"utrif;":9652,"uuarr;":8648,uuml:252,"uuml;":252,"uwangle;":10663,"vArr;":8661,"vBar;":10984,"vBarv;":10985,"vDash;":8872,"vangrt;":10652,"varepsilon;":1013,"varkappa;":1008,"varnothing;":8709,"varphi;":981,"varpi;":982,"varpropto;":8733,"varr;":8597,"varrho;":1009,"varsigma;":962,"varsubsetneq;":[8842,65024],"varsubsetneqq;":[10955,65024],"varsupsetneq;":[8843,65024],"varsupsetneqq;":[10956,65024],"vartheta;":977,"vartriangleleft;":8882,"vartriangleright;":8883,"vcy;":1074,"vdash;":8866,"vee;":8744,"veebar;":8891,"veeeq;":8794,"vellip;":8942,"verbar;":124,"vert;":124,"vfr;":[55349,56627],"vltri;":8882,"vnsub;":[8834,8402],"vnsup;":[8835,8402],"vopf;":[55349,56679],"vprop;":8733,"vrtri;":8883,"vscr;":[55349,56523],"vsubnE;":[10955,65024],"vsubne;":[8842,65024],"vsupnE;":[10956,65024],"vsupne;":[8843,65024],"vzigzag;":10650,"wcirc;":373,"wedbar;":10847,"wedge;":8743,"wedgeq;":8793,"weierp;":8472,"wfr;":[55349,56628],"wopf;":[55349,56680],"wp;":8472,"wr;":8768,"wreath;":8768,"wscr;":[55349,56524],"xcap;":8898,"xcirc;":9711,"xcup;":8899,"xdtri;":9661,"xfr;":[55349,56629],"xhArr;":10234,"xharr;":10231,"xi;":958,"xlArr;":10232,"xlarr;":10229,"xmap;":10236,"xnis;":8955,"xodot;":10752,"xopf;":[55349,56681],"xoplus;":10753,"xotime;":10754,"xrArr;":10233,"xrarr;":10230,"xscr;":[55349,56525],"xsqcup;":10758,"xuplus;":10756,"xutri;":9651,"xvee;":8897,"xwedge;":8896,yacute:253,"yacute;":253,"yacy;":1103,"ycirc;":375,"ycy;":1099,yen:165,"yen;":165,"yfr;":[55349,56630],"yicy;":1111,"yopf;":[55349,56682],"yscr;":[55349,56526],"yucy;":1102,yuml:255,"yuml;":255,"zacute;":378,"zcaron;":382,"zcy;":1079,"zdot;":380,"zeetrf;":8488,"zeta;":950,"zfr;":[55349,56631],"zhcy;":1078,"zigrarr;":8669,"zopf;":[55349,56683],"zscr;":[55349,56527],"zwj;":8205,"zwnj;":8204},iA=/(A(?:Elig;?|MP;?|acute;?|breve;|c(?:irc;?|y;)|fr;|grave;?|lpha;|macr;|nd;|o(?:gon;|pf;)|pplyFunction;|ring;?|s(?:cr;|sign;)|tilde;?|uml;?)|B(?:a(?:ckslash;|r(?:v;|wed;))|cy;|e(?:cause;|rnoullis;|ta;)|fr;|opf;|reve;|scr;|umpeq;)|C(?:Hcy;|OPY;?|a(?:cute;|p(?:;|italDifferentialD;)|yleys;)|c(?:aron;|edil;?|irc;|onint;)|dot;|e(?:dilla;|nterDot;)|fr;|hi;|ircle(?:Dot;|Minus;|Plus;|Times;)|lo(?:ckwiseContourIntegral;|seCurly(?:DoubleQuote;|Quote;))|o(?:lon(?:;|e;)|n(?:gruent;|int;|tourIntegral;)|p(?:f;|roduct;)|unterClockwiseContourIntegral;)|ross;|scr;|up(?:;|Cap;))|D(?:D(?:;|otrahd;)|Jcy;|Scy;|Zcy;|a(?:gger;|rr;|shv;)|c(?:aron;|y;)|el(?:;|ta;)|fr;|i(?:a(?:critical(?:Acute;|Do(?:t;|ubleAcute;)|Grave;|Tilde;)|mond;)|fferentialD;)|o(?:pf;|t(?:;|Dot;|Equal;)|uble(?:ContourIntegral;|Do(?:t;|wnArrow;)|L(?:eft(?:Arrow;|RightArrow;|Tee;)|ong(?:Left(?:Arrow;|RightArrow;)|RightArrow;))|Right(?:Arrow;|Tee;)|Up(?:Arrow;|DownArrow;)|VerticalBar;)|wn(?:Arrow(?:;|Bar;|UpArrow;)|Breve;|Left(?:RightVector;|TeeVector;|Vector(?:;|Bar;))|Right(?:TeeVector;|Vector(?:;|Bar;))|Tee(?:;|Arrow;)|arrow;))|s(?:cr;|trok;))|E(?:NG;|TH;?|acute;?|c(?:aron;|irc;?|y;)|dot;|fr;|grave;?|lement;|m(?:acr;|pty(?:SmallSquare;|VerySmallSquare;))|o(?:gon;|pf;)|psilon;|qu(?:al(?:;|Tilde;)|ilibrium;)|s(?:cr;|im;)|ta;|uml;?|x(?:ists;|ponentialE;))|F(?:cy;|fr;|illed(?:SmallSquare;|VerySmallSquare;)|o(?:pf;|rAll;|uriertrf;)|scr;)|G(?:Jcy;|T;?|amma(?:;|d;)|breve;|c(?:edil;|irc;|y;)|dot;|fr;|g;|opf;|reater(?:Equal(?:;|Less;)|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|scr;|t;)|H(?:ARDcy;|a(?:cek;|t;)|circ;|fr;|ilbertSpace;|o(?:pf;|rizontalLine;)|s(?:cr;|trok;)|ump(?:DownHump;|Equal;))|I(?:Ecy;|Jlig;|Ocy;|acute;?|c(?:irc;?|y;)|dot;|fr;|grave;?|m(?:;|a(?:cr;|ginaryI;)|plies;)|n(?:t(?:;|e(?:gral;|rsection;))|visible(?:Comma;|Times;))|o(?:gon;|pf;|ta;)|scr;|tilde;|u(?:kcy;|ml;?))|J(?:c(?:irc;|y;)|fr;|opf;|s(?:cr;|ercy;)|ukcy;)|K(?:Hcy;|Jcy;|appa;|c(?:edil;|y;)|fr;|opf;|scr;)|L(?:Jcy;|T;?|a(?:cute;|mbda;|ng;|placetrf;|rr;)|c(?:aron;|edil;|y;)|e(?:ft(?:A(?:ngleBracket;|rrow(?:;|Bar;|RightArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|Right(?:Arrow;|Vector;)|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;|rightarrow;)|ss(?:EqualGreater;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;))|fr;|l(?:;|eftarrow;)|midot;|o(?:ng(?:Left(?:Arrow;|RightArrow;)|RightArrow;|left(?:arrow;|rightarrow;)|rightarrow;)|pf;|wer(?:LeftArrow;|RightArrow;))|s(?:cr;|h;|trok;)|t;)|M(?:ap;|cy;|e(?:diumSpace;|llintrf;)|fr;|inusPlus;|opf;|scr;|u;)|N(?:Jcy;|acute;|c(?:aron;|edil;|y;)|e(?:gative(?:MediumSpace;|Thi(?:ckSpace;|nSpace;)|VeryThinSpace;)|sted(?:GreaterGreater;|LessLess;)|wLine;)|fr;|o(?:Break;|nBreakingSpace;|pf;|t(?:;|C(?:ongruent;|upCap;)|DoubleVerticalBar;|E(?:lement;|qual(?:;|Tilde;)|xists;)|Greater(?:;|Equal;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|Hump(?:DownHump;|Equal;)|Le(?:ftTriangle(?:;|Bar;|Equal;)|ss(?:;|Equal;|Greater;|Less;|SlantEqual;|Tilde;))|Nested(?:GreaterGreater;|LessLess;)|Precedes(?:;|Equal;|SlantEqual;)|R(?:everseElement;|ightTriangle(?:;|Bar;|Equal;))|S(?:quareSu(?:bset(?:;|Equal;)|perset(?:;|Equal;))|u(?:bset(?:;|Equal;)|cceeds(?:;|Equal;|SlantEqual;|Tilde;)|perset(?:;|Equal;)))|Tilde(?:;|Equal;|FullEqual;|Tilde;)|VerticalBar;))|scr;|tilde;?|u;)|O(?:Elig;|acute;?|c(?:irc;?|y;)|dblac;|fr;|grave;?|m(?:acr;|ega;|icron;)|opf;|penCurly(?:DoubleQuote;|Quote;)|r;|s(?:cr;|lash;?)|ti(?:lde;?|mes;)|uml;?|ver(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;))|P(?:artialD;|cy;|fr;|hi;|i;|lusMinus;|o(?:incareplane;|pf;)|r(?:;|ecedes(?:;|Equal;|SlantEqual;|Tilde;)|ime;|o(?:duct;|portion(?:;|al;)))|s(?:cr;|i;))|Q(?:UOT;?|fr;|opf;|scr;)|R(?:Barr;|EG;?|a(?:cute;|ng;|rr(?:;|tl;))|c(?:aron;|edil;|y;)|e(?:;|verse(?:E(?:lement;|quilibrium;)|UpEquilibrium;))|fr;|ho;|ight(?:A(?:ngleBracket;|rrow(?:;|Bar;|LeftArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;)|o(?:pf;|undImplies;)|rightarrow;|s(?:cr;|h;)|uleDelayed;)|S(?:H(?:CHcy;|cy;)|OFTcy;|acute;|c(?:;|aron;|edil;|irc;|y;)|fr;|hort(?:DownArrow;|LeftArrow;|RightArrow;|UpArrow;)|igma;|mallCircle;|opf;|q(?:rt;|uare(?:;|Intersection;|Su(?:bset(?:;|Equal;)|perset(?:;|Equal;))|Union;))|scr;|tar;|u(?:b(?:;|set(?:;|Equal;))|c(?:ceeds(?:;|Equal;|SlantEqual;|Tilde;)|hThat;)|m;|p(?:;|erset(?:;|Equal;)|set;)))|T(?:HORN;?|RADE;|S(?:Hcy;|cy;)|a(?:b;|u;)|c(?:aron;|edil;|y;)|fr;|h(?:e(?:refore;|ta;)|i(?:ckSpace;|nSpace;))|ilde(?:;|Equal;|FullEqual;|Tilde;)|opf;|ripleDot;|s(?:cr;|trok;))|U(?:a(?:cute;?|rr(?:;|ocir;))|br(?:cy;|eve;)|c(?:irc;?|y;)|dblac;|fr;|grave;?|macr;|n(?:der(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;)|ion(?:;|Plus;))|o(?:gon;|pf;)|p(?:Arrow(?:;|Bar;|DownArrow;)|DownArrow;|Equilibrium;|Tee(?:;|Arrow;)|arrow;|downarrow;|per(?:LeftArrow;|RightArrow;)|si(?:;|lon;))|ring;|scr;|tilde;|uml;?)|V(?:Dash;|bar;|cy;|dash(?:;|l;)|e(?:e;|r(?:bar;|t(?:;|ical(?:Bar;|Line;|Separator;|Tilde;))|yThinSpace;))|fr;|opf;|scr;|vdash;)|W(?:circ;|edge;|fr;|opf;|scr;)|X(?:fr;|i;|opf;|scr;)|Y(?:Acy;|Icy;|Ucy;|acute;?|c(?:irc;|y;)|fr;|opf;|scr;|uml;)|Z(?:Hcy;|acute;|c(?:aron;|y;)|dot;|e(?:roWidthSpace;|ta;)|fr;|opf;|scr;)|a(?:acute;?|breve;|c(?:;|E;|d;|irc;?|ute;?|y;)|elig;?|f(?:;|r;)|grave;?|l(?:e(?:fsym;|ph;)|pha;)|m(?:a(?:cr;|lg;)|p;?)|n(?:d(?:;|and;|d;|slope;|v;)|g(?:;|e;|le;|msd(?:;|a(?:a;|b;|c;|d;|e;|f;|g;|h;))|rt(?:;|vb(?:;|d;))|s(?:ph;|t;)|zarr;))|o(?:gon;|pf;)|p(?:;|E;|acir;|e;|id;|os;|prox(?:;|eq;))|ring;?|s(?:cr;|t;|ymp(?:;|eq;))|tilde;?|uml;?|w(?:conint;|int;))|b(?:Not;|a(?:ck(?:cong;|epsilon;|prime;|sim(?:;|eq;))|r(?:vee;|wed(?:;|ge;)))|brk(?:;|tbrk;)|c(?:ong;|y;)|dquo;|e(?:caus(?:;|e;)|mptyv;|psi;|rnou;|t(?:a;|h;|ween;))|fr;|ig(?:c(?:ap;|irc;|up;)|o(?:dot;|plus;|times;)|s(?:qcup;|tar;)|triangle(?:down;|up;)|uplus;|vee;|wedge;)|karow;|l(?:a(?:ck(?:lozenge;|square;|triangle(?:;|down;|left;|right;))|nk;)|k(?:1(?:2;|4;)|34;)|ock;)|n(?:e(?:;|quiv;)|ot;)|o(?:pf;|t(?:;|tom;)|wtie;|x(?:D(?:L;|R;|l;|r;)|H(?:;|D;|U;|d;|u;)|U(?:L;|R;|l;|r;)|V(?:;|H;|L;|R;|h;|l;|r;)|box;|d(?:L;|R;|l;|r;)|h(?:;|D;|U;|d;|u;)|minus;|plus;|times;|u(?:L;|R;|l;|r;)|v(?:;|H;|L;|R;|h;|l;|r;)))|prime;|r(?:eve;|vbar;?)|s(?:cr;|emi;|im(?:;|e;)|ol(?:;|b;|hsub;))|u(?:ll(?:;|et;)|mp(?:;|E;|e(?:;|q;))))|c(?:a(?:cute;|p(?:;|and;|brcup;|c(?:ap;|up;)|dot;|s;)|r(?:et;|on;))|c(?:a(?:ps;|ron;)|edil;?|irc;|ups(?:;|sm;))|dot;|e(?:dil;?|mptyv;|nt(?:;|erdot;|))|fr;|h(?:cy;|eck(?:;|mark;)|i;)|ir(?:;|E;|c(?:;|eq;|le(?:arrow(?:left;|right;)|d(?:R;|S;|ast;|circ;|dash;)))|e;|fnint;|mid;|scir;)|lubs(?:;|uit;)|o(?:lon(?:;|e(?:;|q;))|m(?:ma(?:;|t;)|p(?:;|fn;|le(?:ment;|xes;)))|n(?:g(?:;|dot;)|int;)|p(?:f;|rod;|y(?:;|sr;|)))|r(?:arr;|oss;)|s(?:cr;|u(?:b(?:;|e;)|p(?:;|e;)))|tdot;|u(?:darr(?:l;|r;)|e(?:pr;|sc;)|larr(?:;|p;)|p(?:;|brcap;|c(?:ap;|up;)|dot;|or;|s;)|r(?:arr(?:;|m;)|ly(?:eq(?:prec;|succ;)|vee;|wedge;)|ren;?|vearrow(?:left;|right;))|vee;|wed;)|w(?:conint;|int;)|ylcty;)|d(?:Arr;|Har;|a(?:gger;|leth;|rr;|sh(?:;|v;))|b(?:karow;|lac;)|c(?:aron;|y;)|d(?:;|a(?:gger;|rr;)|otseq;)|e(?:g;?|lta;|mptyv;)|f(?:isht;|r;)|har(?:l;|r;)|i(?:am(?:;|ond(?:;|suit;)|s;)|e;|gamma;|sin;|v(?:;|ide(?:;|ontimes;|)|onx;))|jcy;|lc(?:orn;|rop;)|o(?:llar;|pf;|t(?:;|eq(?:;|dot;)|minus;|plus;|square;)|ublebarwedge;|wn(?:arrow;|downarrows;|harpoon(?:left;|right;)))|r(?:bkarow;|c(?:orn;|rop;))|s(?:c(?:r;|y;)|ol;|trok;)|t(?:dot;|ri(?:;|f;))|u(?:arr;|har;)|wangle;|z(?:cy;|igrarr;))|e(?:D(?:Dot;|ot;)|a(?:cute;?|ster;)|c(?:aron;|ir(?:;|c;?)|olon;|y;)|dot;|e;|f(?:Dot;|r;)|g(?:;|rave;?|s(?:;|dot;))|l(?:;|inters;|l;|s(?:;|dot;))|m(?:acr;|pty(?:;|set;|v;)|sp(?:1(?:3;|4;)|;))|n(?:g;|sp;)|o(?:gon;|pf;)|p(?:ar(?:;|sl;)|lus;|si(?:;|lon;|v;))|q(?:c(?:irc;|olon;)|s(?:im;|lant(?:gtr;|less;))|u(?:als;|est;|iv(?:;|DD;))|vparsl;)|r(?:Dot;|arr;)|s(?:cr;|dot;|im;)|t(?:a;|h;?)|u(?:ml;?|ro;)|x(?:cl;|ist;|p(?:ectation;|onentiale;)))|f(?:allingdotseq;|cy;|emale;|f(?:ilig;|l(?:ig;|lig;)|r;)|ilig;|jlig;|l(?:at;|lig;|tns;)|nof;|o(?:pf;|r(?:all;|k(?:;|v;)))|partint;|r(?:a(?:c(?:1(?:2;?|3;|4;?|5;|6;|8;)|2(?:3;|5;)|3(?:4;?|5;|8;)|45;|5(?:6;|8;)|78;)|sl;)|own;)|scr;)|g(?:E(?:;|l;)|a(?:cute;|mma(?:;|d;)|p;)|breve;|c(?:irc;|y;)|dot;|e(?:;|l;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|l;))|l(?:;|es;)))|fr;|g(?:;|g;)|imel;|jcy;|l(?:;|E;|a;|j;)|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|opf;|rave;|s(?:cr;|im(?:;|e;|l;))|t(?:;|c(?:c;|ir;)|dot;|lPar;|quest;|r(?:a(?:pprox;|rr;)|dot;|eq(?:less;|qless;)|less;|sim;)|)|v(?:ertneqq;|nE;))|h(?:Arr;|a(?:irsp;|lf;|milt;|r(?:dcy;|r(?:;|cir;|w;)))|bar;|circ;|e(?:arts(?:;|uit;)|llip;|rcon;)|fr;|ks(?:earow;|warow;)|o(?:arr;|mtht;|ok(?:leftarrow;|rightarrow;)|pf;|rbar;)|s(?:cr;|lash;|trok;)|y(?:bull;|phen;))|i(?:acute;?|c(?:;|irc;?|y;)|e(?:cy;|xcl;?)|f(?:f;|r;)|grave;?|i(?:;|i(?:int;|nt;)|nfin;|ota;)|jlig;|m(?:a(?:cr;|g(?:e;|line;|part;)|th;)|of;|ped;)|n(?:;|care;|fin(?:;|tie;)|odot;|t(?:;|cal;|e(?:gers;|rcal;)|larhk;|prod;))|o(?:cy;|gon;|pf;|ta;)|prod;|quest;?|s(?:cr;|in(?:;|E;|dot;|s(?:;|v;)|v;))|t(?:;|ilde;)|u(?:kcy;|ml;?))|j(?:c(?:irc;|y;)|fr;|math;|opf;|s(?:cr;|ercy;)|ukcy;)|k(?:appa(?:;|v;)|c(?:edil;|y;)|fr;|green;|hcy;|jcy;|opf;|scr;)|l(?:A(?:arr;|rr;|tail;)|Barr;|E(?:;|g;)|Har;|a(?:cute;|emptyv;|gran;|mbda;|ng(?:;|d;|le;)|p;|quo;?|rr(?:;|b(?:;|fs;)|fs;|hk;|lp;|pl;|sim;|tl;)|t(?:;|ail;|e(?:;|s;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|quo(?:;|r;)|r(?:dhar;|ushar;)|sh;)|e(?:;|ft(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|leftarrows;|right(?:arrow(?:;|s;)|harpoons;|squigarrow;)|threetimes;)|g;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|r;))|g(?:;|es;)|s(?:approx;|dot;|eq(?:gtr;|qgtr;)|gtr;|sim;)))|f(?:isht;|loor;|r;)|g(?:;|E;)|h(?:ar(?:d;|u(?:;|l;))|blk;)|jcy;|l(?:;|arr;|corner;|hard;|tri;)|m(?:idot;|oust(?:;|ache;))|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|o(?:a(?:ng;|rr;)|brk;|ng(?:left(?:arrow;|rightarrow;)|mapsto;|rightarrow;)|oparrow(?:left;|right;)|p(?:ar;|f;|lus;)|times;|w(?:ast;|bar;)|z(?:;|enge;|f;))|par(?:;|lt;)|r(?:arr;|corner;|har(?:;|d;)|m;|tri;)|s(?:aquo;|cr;|h;|im(?:;|e;|g;)|q(?:b;|uo(?:;|r;))|trok;)|t(?:;|c(?:c;|ir;)|dot;|hree;|imes;|larr;|quest;|r(?:Par;|i(?:;|e;|f;))|)|ur(?:dshar;|uhar;)|v(?:ertneqq;|nE;))|m(?:DDot;|a(?:cr;?|l(?:e;|t(?:;|ese;))|p(?:;|sto(?:;|down;|left;|up;))|rker;)|c(?:omma;|y;)|dash;|easuredangle;|fr;|ho;|i(?:cro;?|d(?:;|ast;|cir;|dot;?)|nus(?:;|b;|d(?:;|u;)))|l(?:cp;|dr;)|nplus;|o(?:dels;|pf;)|p;|s(?:cr;|tpos;)|u(?:;|ltimap;|map;))|n(?:G(?:g;|t(?:;|v;))|L(?:eft(?:arrow;|rightarrow;)|l;|t(?:;|v;))|Rightarrow;|V(?:Dash;|dash;)|a(?:bla;|cute;|ng;|p(?:;|E;|id;|os;|prox;)|tur(?:;|al(?:;|s;)))|b(?:sp;?|ump(?:;|e;))|c(?:a(?:p;|ron;)|edil;|ong(?:;|dot;)|up;|y;)|dash;|e(?:;|Arr;|ar(?:hk;|r(?:;|ow;))|dot;|quiv;|s(?:ear;|im;)|xist(?:;|s;))|fr;|g(?:E;|e(?:;|q(?:;|q;|slant;)|s;)|sim;|t(?:;|r;))|h(?:Arr;|arr;|par;)|i(?:;|s(?:;|d;)|v;)|jcy;|l(?:Arr;|E;|arr;|dr;|e(?:;|ft(?:arrow;|rightarrow;)|q(?:;|q;|slant;)|s(?:;|s;))|sim;|t(?:;|ri(?:;|e;)))|mid;|o(?:pf;|t(?:;|in(?:;|E;|dot;|v(?:a;|b;|c;))|ni(?:;|v(?:a;|b;|c;))|))|p(?:ar(?:;|allel;|sl;|t;)|olint;|r(?:;|cue;|e(?:;|c(?:;|eq;))))|r(?:Arr;|arr(?:;|c;|w;)|ightarrow;|tri(?:;|e;))|s(?:c(?:;|cue;|e;|r;)|hort(?:mid;|parallel;)|im(?:;|e(?:;|q;))|mid;|par;|qsu(?:be;|pe;)|u(?:b(?:;|E;|e;|set(?:;|eq(?:;|q;)))|cc(?:;|eq;)|p(?:;|E;|e;|set(?:;|eq(?:;|q;)))))|t(?:gl;|ilde;?|lg;|riangle(?:left(?:;|eq;)|right(?:;|eq;)))|u(?:;|m(?:;|ero;|sp;))|v(?:Dash;|Harr;|ap;|dash;|g(?:e;|t;)|infin;|l(?:Arr;|e;|t(?:;|rie;))|r(?:Arr;|trie;)|sim;)|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|near;))|o(?:S;|a(?:cute;?|st;)|c(?:ir(?:;|c;?)|y;)|d(?:ash;|blac;|iv;|ot;|sold;)|elig;|f(?:cir;|r;)|g(?:on;|rave;?|t;)|h(?:bar;|m;)|int;|l(?:arr;|c(?:ir;|ross;)|ine;|t;)|m(?:acr;|ega;|i(?:cron;|d;|nus;))|opf;|p(?:ar;|erp;|lus;)|r(?:;|arr;|d(?:;|er(?:;|of;)|f;?|m;?)|igof;|or;|slope;|v;)|s(?:cr;|lash;?|ol;)|ti(?:lde;?|mes(?:;|as;))|uml;?|vbar;)|p(?:ar(?:;|a(?:;|llel;|)|s(?:im;|l;)|t;)|cy;|er(?:cnt;|iod;|mil;|p;|tenk;)|fr;|h(?:i(?:;|v;)|mmat;|one;)|i(?:;|tchfork;|v;)|l(?:an(?:ck(?:;|h;)|kv;)|us(?:;|acir;|b;|cir;|d(?:o;|u;)|e;|mn;?|sim;|two;))|m;|o(?:intint;|pf;|und;?)|r(?:;|E;|ap;|cue;|e(?:;|c(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;))|ime(?:;|s;)|n(?:E;|ap;|sim;)|o(?:d;|f(?:alar;|line;|surf;)|p(?:;|to;))|sim;|urel;)|s(?:cr;|i;)|uncsp;)|q(?:fr;|int;|opf;|prime;|scr;|u(?:at(?:ernions;|int;)|est(?:;|eq;)|ot;?))|r(?:A(?:arr;|rr;|tail;)|Barr;|Har;|a(?:c(?:e;|ute;)|dic;|emptyv;|ng(?:;|d;|e;|le;)|quo;?|rr(?:;|ap;|b(?:;|fs;)|c;|fs;|hk;|lp;|pl;|sim;|tl;|w;)|t(?:ail;|io(?:;|nals;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|ldhar;|quo(?:;|r;)|sh;)|e(?:al(?:;|ine;|part;|s;)|ct;|g;?)|f(?:isht;|loor;|r;)|h(?:ar(?:d;|u(?:;|l;))|o(?:;|v;))|i(?:ght(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|left(?:arrows;|harpoons;)|rightarrows;|squigarrow;|threetimes;)|ng;|singdotseq;)|l(?:arr;|har;|m;)|moust(?:;|ache;)|nmid;|o(?:a(?:ng;|rr;)|brk;|p(?:ar;|f;|lus;)|times;)|p(?:ar(?:;|gt;)|polint;)|rarr;|s(?:aquo;|cr;|h;|q(?:b;|uo(?:;|r;)))|t(?:hree;|imes;|ri(?:;|e;|f;|ltri;))|uluhar;|x;)|s(?:acute;|bquo;|c(?:;|E;|a(?:p;|ron;)|cue;|e(?:;|dil;)|irc;|n(?:E;|ap;|sim;)|polint;|sim;|y;)|dot(?:;|b;|e;)|e(?:Arr;|ar(?:hk;|r(?:;|ow;))|ct;?|mi;|swar;|tm(?:inus;|n;)|xt;)|fr(?:;|own;)|h(?:arp;|c(?:hcy;|y;)|ort(?:mid;|parallel;)|y;?)|i(?:gma(?:;|f;|v;)|m(?:;|dot;|e(?:;|q;)|g(?:;|E;)|l(?:;|E;)|ne;|plus;|rarr;))|larr;|m(?:a(?:llsetminus;|shp;)|eparsl;|i(?:d;|le;)|t(?:;|e(?:;|s;)))|o(?:ftcy;|l(?:;|b(?:;|ar;))|pf;)|pa(?:des(?:;|uit;)|r;)|q(?:c(?:ap(?:;|s;)|up(?:;|s;))|su(?:b(?:;|e;|set(?:;|eq;))|p(?:;|e;|set(?:;|eq;)))|u(?:;|ar(?:e;|f;)|f;))|rarr;|s(?:cr;|etmn;|mile;|tarf;)|t(?:ar(?:;|f;)|r(?:aight(?:epsilon;|phi;)|ns;))|u(?:b(?:;|E;|dot;|e(?:;|dot;)|mult;|n(?:E;|e;)|plus;|rarr;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;)))|cc(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;)|m;|ng;|p(?:1;?|2;?|3;?|;|E;|d(?:ot;|sub;)|e(?:;|dot;)|hs(?:ol;|ub;)|larr;|mult;|n(?:E;|e;)|plus;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;))))|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|nwar;)|zlig;?)|t(?:a(?:rget;|u;)|brk;|c(?:aron;|edil;|y;)|dot;|elrec;|fr;|h(?:e(?:re(?:4;|fore;)|ta(?:;|sym;|v;))|i(?:ck(?:approx;|sim;)|nsp;)|k(?:ap;|sim;)|orn;?)|i(?:lde;|mes(?:;|b(?:;|ar;)|d;|)|nt;)|o(?:ea;|p(?:;|bot;|cir;|f(?:;|ork;))|sa;)|prime;|r(?:ade;|i(?:angle(?:;|down;|left(?:;|eq;)|q;|right(?:;|eq;))|dot;|e;|minus;|plus;|sb;|time;)|pezium;)|s(?:c(?:r;|y;)|hcy;|trok;)|w(?:ixt;|ohead(?:leftarrow;|rightarrow;)))|u(?:Arr;|Har;|a(?:cute;?|rr;)|br(?:cy;|eve;)|c(?:irc;?|y;)|d(?:arr;|blac;|har;)|f(?:isht;|r;)|grave;?|h(?:ar(?:l;|r;)|blk;)|l(?:c(?:orn(?:;|er;)|rop;)|tri;)|m(?:acr;|l;?)|o(?:gon;|pf;)|p(?:arrow;|downarrow;|harpoon(?:left;|right;)|lus;|si(?:;|h;|lon;)|uparrows;)|r(?:c(?:orn(?:;|er;)|rop;)|ing;|tri;)|scr;|t(?:dot;|ilde;|ri(?:;|f;))|u(?:arr;|ml;?)|wangle;)|v(?:Arr;|Bar(?:;|v;)|Dash;|a(?:ngrt;|r(?:epsilon;|kappa;|nothing;|p(?:hi;|i;|ropto;)|r(?:;|ho;)|s(?:igma;|u(?:bsetneq(?:;|q;)|psetneq(?:;|q;)))|t(?:heta;|riangle(?:left;|right;))))|cy;|dash;|e(?:e(?:;|bar;|eq;)|llip;|r(?:bar;|t;))|fr;|ltri;|nsu(?:b;|p;)|opf;|prop;|rtri;|s(?:cr;|u(?:bn(?:E;|e;)|pn(?:E;|e;)))|zigzag;)|w(?:circ;|e(?:d(?:bar;|ge(?:;|q;))|ierp;)|fr;|opf;|p;|r(?:;|eath;)|scr;)|x(?:c(?:ap;|irc;|up;)|dtri;|fr;|h(?:Arr;|arr;)|i;|l(?:Arr;|arr;)|map;|nis;|o(?:dot;|p(?:f;|lus;)|time;)|r(?:Arr;|arr;)|s(?:cr;|qcup;)|u(?:plus;|tri;)|vee;|wedge;)|y(?:ac(?:ute;?|y;)|c(?:irc;|y;)|en;?|fr;|icy;|opf;|scr;|u(?:cy;|ml;?))|z(?:acute;|c(?:aron;|y;)|dot;|e(?:etrf;|ta;)|fr;|hcy;|igrarr;|opf;|scr;|w(?:j;|nj;)))|[\s\S]/g,jc=32,Ac=/[^\r"&\u0000]+/g,Mc=/[^\r'&\u0000]+/g,Sc=/[^\r\t\n\f &>\u0000]+/g,Pc=/[^\r\t\n\f \/>A-Z\u0000]+/g,_c=/[^\r\t\n\f \/=>A-Z\u0000]+/g,Nc=/[^\]\r\u0000\uffff]*/g,Rc=/[^&<\r\u0000\uffff]*/g,pA=/[^<\r\u0000\uffff]*/g,Ec=/[^\r\u0000\uffff]*/g,rA=/(?:(\/)?([a-z]+)>)|[\s\S]/g,nA=/(?:([-a-z]+)[ \t\n\f]*=[ \t\n\f]*('[^'&\r\u0000]*'|"[^"&\r\u0000]*"|[^\t\n\r\f "&'\u0000>][^&> \t\n\r\f\u0000]*[ \t\n\f]))|[\s\S]/g,l3=/[^\x09\x0A\x0C\x0D\x20]/,m7=/[^\x09\x0A\x0C\x0D\x20]/g,Zc=/[^\x00\x09\x0A\x0C\x0D\x20]/,MD=/^[\x09\x0A\x0C\x0D\x20]+/,i3=/\x00/g;function e6($){var D=16384;if($.length<D)return String.fromCharCode.apply(String,$);var X="";for(var G=0;G<$.length;G+=D)X+=String.fromCharCode.apply(String,$.slice(G,G+D));return X}function Tc($){var D=[];for(var X=0;X<$.length;X++)D[X]=$.charCodeAt(X);return D}function r$($,D){if(typeof D==="string")return $.namespaceURI===G$.HTML&&$.localName===D;var X=D[$.namespaceURI];return X&&X[$.localName]}function dA($){return r$($,YM)}function oA($){if(r$($,QM))return!0;if($.namespaceURI===G$.MATHML&&$.localName==="annotation-xml"){var D=$.getAttribute("encoding");if(D)D=D.toLowerCase();if(D==="text/html"||D==="application/xhtml+xml")return!0}return!1}function vc($){if($ in cA)return cA[$];else return $}function tA($){for(var D=0,X=$.length;D<X;D++)if($[D][0]in mA)$[D][0]=mA[$[D][0]]}function aA($){for(var D=0,X=$.length;D<X;D++)if($[D][0]==="definitionurl"){$[D][0]="definitionURL";break}}function c7($){for(var D=0,X=$.length;D<X;D++)if($[D][0]in fA)$[D].push(fA[$[D][0]])}function sA($,D){for(var X=0,G=$.length;X<G;X++){var J=$[X][0],Y=$[X][1];if(D.hasAttribute(J))continue;D._setAttribute(J,Y)}}v$.ElementStack=function(){this.elements=[],this.top=null};v$.ElementStack.prototype.push=function($){this.elements.push($),this.top=$};v$.ElementStack.prototype.pop=function($){this.elements.pop(),this.top=this.elements[this.elements.length-1]};v$.ElementStack.prototype.popTag=function($){for(var D=this.elements.length-1;D>0;D--){var X=this.elements[D];if(r$(X,$))break}this.elements.length=D,this.top=this.elements[D-1]};v$.ElementStack.prototype.popElementType=function($){for(var D=this.elements.length-1;D>0;D--)if(this.elements[D]instanceof $)break;this.elements.length=D,this.top=this.elements[D-1]};v$.ElementStack.prototype.popElement=function($){for(var D=this.elements.length-1;D>0;D--)if(this.elements[D]===$)break;this.elements.length=D,this.top=this.elements[D-1]};v$.ElementStack.prototype.removeElement=function($){if(this.top===$)this.pop();else{var D=this.elements.lastIndexOf($);if(D!==-1)this.elements.splice(D,1)}};v$.ElementStack.prototype.clearToContext=function($){for(var D=this.elements.length-1;D>0;D--)if(r$(this.elements[D],$))break;this.elements.length=D+1,this.top=this.elements[D]};v$.ElementStack.prototype.contains=function($){return this.inSpecificScope($,Object.create(null))};v$.ElementStack.prototype.inSpecificScope=function($,D){for(var X=this.elements.length-1;X>=0;X--){var G=this.elements[X];if(r$(G,$))return!0;if(r$(G,D))return!1}return!1};v$.ElementStack.prototype.elementInSpecificScope=function($,D){for(var X=this.elements.length-1;X>=0;X--){var G=this.elements[X];if(G===$)return!0;if(r$(G,D))return!1}return!1};v$.ElementStack.prototype.elementTypeInSpecificScope=function($,D){for(var X=this.elements.length-1;X>=0;X--){var G=this.elements[X];if(G instanceof $)return!0;if(r$(G,D))return!1}return!1};v$.ElementStack.prototype.inScope=function($){return this.inSpecificScope($,N4)};v$.ElementStack.prototype.elementInScope=function($){return this.elementInSpecificScope($,N4)};v$.ElementStack.prototype.elementTypeInScope=function($){return this.elementTypeInSpecificScope($,N4)};v$.ElementStack.prototype.inButtonScope=function($){return this.inSpecificScope($,p7)};v$.ElementStack.prototype.inListItemScope=function($){return this.inSpecificScope($,n3)};v$.ElementStack.prototype.inTableScope=function($){return this.inSpecificScope($,GM)};v$.ElementStack.prototype.inSelectScope=function($){for(var D=this.elements.length-1;D>=0;D--){var X=this.elements[D];if(X.namespaceURI!==G$.HTML)return!1;var G=X.localName;if(G===$)return!0;if(G!=="optgroup"&&G!=="option")return!1}return!1};v$.ElementStack.prototype.generateImpliedEndTags=function($,D){var X=D?XM:DM;for(var G=this.elements.length-1;G>=0;G--){var J=this.elements[G];if($&&r$(J,$))break;if(!r$(this.elements[G],X))break}this.elements.length=G+1,this.top=this.elements[G]};v$.ActiveFormattingElements=function(){this.list=[],this.attrs=[]};v$.ActiveFormattingElements.prototype.MARKER={localName:"|"};v$.ActiveFormattingElements.prototype.insertMarker=function(){this.list.push(this.MARKER),this.attrs.push(this.MARKER)};v$.ActiveFormattingElements.prototype.push=function($,D){var X=0;for(var G=this.list.length-1;G>=0;G--){if(this.list[G]===this.MARKER)break;if(Q($,this.list[G],this.attrs[G])){if(X++,X===3){this.list.splice(G,1),this.attrs.splice(G,1);break}}}this.list.push($);var J=[];for(var Y=0;Y<D.length;Y++)J[Y]=D[Y];this.attrs.push(J);function Q(W,I,U){if(W.localName!==I.localName)return!1;if(W._numattrs!==U.length)return!1;for(var B=0,H=U.length;B<H;B++){var V=U[B][0],z=U[B][1];if(!W.hasAttribute(V))return!1;if(W.getAttribute(V)!==z)return!1}return!0}};v$.ActiveFormattingElements.prototype.clearToMarker=function(){for(var $=this.list.length-1;$>=0;$--)if(this.list[$]===this.MARKER)break;if($<0)$=0;this.list.length=$,this.attrs.length=$};v$.ActiveFormattingElements.prototype.findElementByTag=function($){for(var D=this.list.length-1;D>=0;D--){var X=this.list[D];if(X===this.MARKER)break;if(X.localName===$)return X}return null};v$.ActiveFormattingElements.prototype.indexOf=function($){return this.list.lastIndexOf($)};v$.ActiveFormattingElements.prototype.remove=function($){var D=this.list.lastIndexOf($);if(D!==-1)this.list.splice(D,1),this.attrs.splice(D,1)};v$.ActiveFormattingElements.prototype.replace=function($,D,X){var G=this.list.lastIndexOf($);if(G!==-1)this.list[G]=D,this.attrs[G]=X};v$.ActiveFormattingElements.prototype.insertAfter=function($,D){var X=this.list.lastIndexOf($);if(X!==-1)this.list.splice(X,0,D),this.attrs.splice(X,0,D)};function v$($,D,X){var G=null,J=0,Y=0,Q=!1,W=!1,I=0,U=[],B="",H=!0,V=0,z=A$,L,F,b="",P="",Z=[],v="",g="",T=[],o$=[],e$=[],v6=[],a=[],O$=!1,M=Xx,c$=null,l$=[],O=new v$.ElementStack,d=new v$.ActiveFormattingElements,i$=D!==void 0,x$=null,$6=null,t$=!0;if(D)t$=D.ownerDocument._scripting_enabled;if(X&&X.scripting_enabled===!1)t$=!1;var w6=!0,oI=!1,uG,tI,m=[],q0=!1,ID=!1,fG={document:function(){return C$},_asDocumentFragment:function(){var q=C$.createDocumentFragment(),K=C$.firstChild;while(K.hasChildNodes())q.appendChild(K.firstChild);return q},pause:function(){V++},resume:function(){V--,this.parse("")},parse:function(q,K,w){var A;if(V>0)return B+=q,!0;if(I===0){if(B)q=B+q,B="";if(K)q+="￿",Q=!0;if(G=q,J=q.length,Y=0,H){if(H=!1,G.charCodeAt(0)===65279)Y=1}I++,A=iF(w),B=G.substring(Y,J),I--}else{if(I++,U.push(G,J,Y),G=q,J=q.length,Y=0,iF(),A=!1,B=G.substring(Y,J),Y=U.pop(),J=U.pop(),G=U.pop(),B)G=B+G.substring(Y),J=G.length,Y=0,B="";I--}return A}},C$=new qc(!0,$);if(C$._parser=fG,C$._scripting_enabled=t$,D){if(D.ownerDocument._quirks)C$._quirks=!0;if(D.ownerDocument._limitedQuirks)C$._limitedQuirks=!0;if(D.namespaceURI===G$.HTML)switch(D.localName){case"title":case"textarea":z=w0;break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":case"script":case"plaintext":z=DU;break}var lF=C$.createElement("html");if(C$._appendChild(lF),O.push(lF),D instanceof p$.HTMLTemplateElement)l$.push(zU);dJ();for(var lJ=D;lJ!==null;lJ=lJ.parentElement)if(lJ instanceof p$.HTMLFormElement){$6=lJ;break}}function iF(q){var K,w,A,E;while(Y<J){if(V>0||q&&q())return!0;switch(typeof z.lookahead){case"undefined":if(K=G.charCodeAt(Y++),W){if(W=!1,K===10){Y++;continue}}switch(K){case 13:if(Y<J){if(G.charCodeAt(Y)===10)Y++}else W=!0;z(10);break;case 65535:if(Q&&Y===J){z(c3);break}default:z(K);break}break;case"number":K=G.charCodeAt(Y);var p=z.lookahead,W$=!0;if(p<0)W$=!1,p=-p;if(p<J-Y)w=W$?G.substring(Y,Y+p):null,E=!1;else if(Q){if(w=W$?G.substring(Y,J):null,E=!0,K===65535&&Y===J-1)K=c3}else return!0;z(K,w,E);break;case"string":K=G.charCodeAt(Y),A=z.lookahead;var M$=G.indexOf(A,Y);if(M$!==-1)w=G.substring(Y,M$+A.length),E=!1;else{if(!Q)return!0;if(w=G.substring(Y,J),K===65535&&Y===J-1)K=c3;E=!0}z(K,w,E);break}}return!1}function H0(q,K){for(var w=0;w<a.length;w++)if(a[w][0]===q)return;if(K!==void 0)a.push([q,K]);else a.push([q])}function Qg(){nA.lastIndex=Y-1;var q=nA.exec(G);if(!q)throw Error("should never happen");var K=q[1];if(!K)return!1;var w=q[2],A=w.length;switch(w[0]){case'"':case"'":w=w.substring(1,A-1),Y+=q[0].length-1,z=YU;break;default:z=M4,Y+=q[0].length-1,w=w.substring(0,A-1);break}for(var E=0;E<a.length;E++)if(a[E][0]===K)return!0;return a.push([K,w]),!0}function Wg(){O$=!1,b="",a.length=0}function iJ(){O$=!0,b="",a.length=0}function m4(){Z.length=0}function aI(){v=""}function sI(){g=""}function pF(){T.length=0}function JX(){o$.length=0,e$=null,v6=null}function mG(){e$=[]}function K0(){v6=[]}function h$(){oI=!0}function Ig(){return O.top&&O.top.namespaceURI!=="http://www.w3.org/1999/xhtml"}function m1(q){return P===q}function GX(){if(m.length>0){var q=e6(m);if(m.length=0,ID){if(ID=!1,q[0]===`
31
- `)q=q.substring(1);if(q.length===0)return}_6(PX,q),q0=!1}ID=!1}function pJ(q){q.lastIndex=Y-1;var K=q.exec(G);if(K&&K.index===Y-1){if(K=K[0],Y+=K.length-1,Q&&Y===J)K=K.slice(0,-1),Y--;return K}else throw Error("should never happen")}function rJ(q){q.lastIndex=Y-1;var K=q.exec(G)[0];if(!K)return!1;return Ug(K),Y+=K.length-1,!0}function Ug(q){if(m.length>0)GX();if(ID){if(ID=!1,q[0]===`
32
- `)q=q.substring(1);if(q.length===0)return}_6(PX,q)}function c4(){if(O$)_6(S$,b);else{var q=b;b="",P=q,_6(s6,q,a)}}function Bg(){if(Y===J)return!1;rA.lastIndex=Y;var q=rA.exec(G);if(!q)throw Error("should never happen");var K=q[2];if(!K)return!1;var w=q[1];if(w)Y+=K.length+2,_6(S$,K);else Y+=K.length+1,P=K,_6(s6,K,Vc);return!0}function zg(){if(O$)_6(S$,b,null,!0);else _6(s6,b,a,!0)}function u$(){_6(Kc,e6(o$),e$?e6(e$):void 0,v6?e6(v6):void 0)}function w$(){GX(),M(c3),C$.modclock=1}var _6=fG.insertToken=function(K,w,A,E){GX();var p=O.top;if(!p||p.namespaceURI===G$.HTML)M(K,w,A,E);else if(K!==s6&&K!==PX)Wb(K,w,A,E);else if(dA(p)&&(K===PX||K===s6&&w!=="mglyph"&&w!=="malignmark")||K===s6&&w==="svg"&&p.namespaceURI===G$.MATHML&&p.localName==="annotation-xml"||oA(p))tI=!0,M(K,w,A,E),tI=!1;else Wb(K,w,A,E)};function b4(q){var K=O.top;if(V0&&r$(K,_X))lG(function(w){return w.createComment(q)});else{if(K instanceof p$.HTMLTemplateElement)K=K.content;K._appendChild(K.ownerDocument.createComment(q))}}function j4(q){var K=O.top;if(V0&&r$(K,_X))lG(function(A){return A.createTextNode(q)});else{if(K instanceof p$.HTMLTemplateElement)K=K.content;var w=K.lastChild;if(w&&w.nodeType===f7.TEXT_NODE)w.appendData(q);else K._appendChild(K.ownerDocument.createTextNode(q))}}function nJ(q,K,w){var A=eA.createElement(q,K,null);if(w)for(var E=0,p=w.length;E<p;E++)A._setAttribute(w[E][0],w[E][1]);return A}var V0=!1;function H$(q,K){var w=cG(function(A){return nJ(A,q,K)});if(r$(w,JM))w._form=$6;return w}function cG(q){var K;if(V0&&r$(O.top,_X))K=lG(q);else if(O.top instanceof p$.HTMLTemplateElement)K=q(O.top.content.ownerDocument),O.top.content._appendChild(K);else K=q(O.top.ownerDocument),O.top._appendChild(K);return O.push(K),K}function eI(q,K,w){return cG(function(A){var E=A._createElementNS(q,w,null);if(K)for(var p=0,W$=K.length;p<W$;p++){var M$=K[p];if(M$.length===2)E._setAttribute(M$[0],M$[1]);else E._setAttributeNS(M$[2],M$[0],M$[1])}return E})}function rF(q){for(var K=O.elements.length-1;K>=0;K--)if(O.elements[K]instanceof q)return K;return-1}function lG(q){var K,w,A=-1,E=-1,p;if(A=rF(p$.HTMLTableElement),E=rF(p$.HTMLTemplateElement),E>=0&&(A<0||E>A))K=O.elements[E];else if(A>=0)if(K=O.elements[A].parentNode,K)w=O.elements[A];else K=O.elements[A-1];if(!K)K=O.elements[0];if(K instanceof p$.HTMLTemplateElement)K=K.content;if(p=q(K.ownerDocument),p.nodeType===f7.TEXT_NODE){var W$;if(w)W$=w.previousSibling;else W$=K.lastChild;if(W$&&W$.nodeType===f7.TEXT_NODE)return W$.appendData(p.data),p}if(w)K.insertBefore(p,w);else K._appendChild(p);return p}function dJ(){var q=!1;for(var K=O.elements.length-1;K>=0;K--){var w=O.elements[K];if(K===0){if(q=!0,i$)w=D}if(w.namespaceURI===G$.HTML){var A=w.localName;switch(A){case"select":for(var E=K;E>0;){var p=O.elements[--E];if(p instanceof p$.HTMLTemplateElement)break;else if(p instanceof p$.HTMLTableElement){M=J3;return}}M=l4;return;case"tr":M=aJ;return;case"tbody":case"tfoot":case"thead":M=qD;return;case"caption":M=BU;return;case"colgroup":M=X3;return;case"table":M=c1;return;case"template":M=l$[l$.length-1];return;case"body":M=Q$;return;case"frameset":M=qU;return;case"html":if(x$===null)M=$3;else M=UU;return;default:if(!q){if(A==="head"){M=j6;return}if(A==="td"||A==="th"){M=YX;return}}}}if(q){M=Q$;return}}}function iG(q,K){H$(q,K),z=oJ,c$=M,M=D3}function qg(q,K){H$(q,K),z=w0,c$=M,M=D3}function $U(q,K){return{elt:nJ(q,d.list[K].localName,d.attrs[K]),attrs:d.attrs[K]}}function Y1(){if(d.list.length===0)return;var q=d.list[d.list.length-1];if(q===d.MARKER)return;if(O.elements.lastIndexOf(q)!==-1)return;for(var K=d.list.length-2;K>=0;K--){if(q=d.list[K],q===d.MARKER)break;if(O.elements.lastIndexOf(q)!==-1)break}for(K=K+1;K<d.list.length;K++){var w=cG(function(A){return $U(A,K).elt});d.list[K]=w}}var pG={localName:"BM"};function Hg(q){if(r$(O.top,q)&&d.indexOf(O.top)===-1)return O.pop(),!0;var K=0;while(K<8){K++;var w=d.findElementByTag(q);if(!w)return!1;var A=O.elements.lastIndexOf(w);if(A===-1)return d.remove(w),!0;if(!O.elementInScope(w))return!0;var E=null,p;for(var W$=A+1;W$<O.elements.length;W$++)if(r$(O.elements[W$],SD)){E=O.elements[W$],p=W$;break}if(!E)return O.popElement(w),d.remove(w),!0;else{var M$=O.elements[A-1];d.insertAfter(w,pG);var L6=E,h6=E,l1=p,D4,HD=0;while(!0){if(HD++,L6=O.elements[--l1],L6===w)break;if(D4=d.indexOf(L6),HD>3&&D4!==-1)d.remove(L6),D4=-1;if(D4===-1){O.removeElement(L6);continue}var j0=$U(M$.ownerDocument,D4);if(d.replace(L6,j0.elt,j0.attrs),O.elements[l1]=j0.elt,L6=j0.elt,h6===E)d.remove(pG),d.insertAfter(j0.elt,pG);L6._appendChild(h6),h6=L6}if(V0&&r$(M$,_X))lG(function(){return h6});else if(M$ instanceof p$.HTMLTemplateElement)M$.content._appendChild(h6);else M$._appendChild(h6);var sJ=$U(E.ownerDocument,d.indexOf(w));while(E.hasChildNodes())sJ.elt._appendChild(E.firstChild);E._appendChild(sJ.elt),d.remove(w),d.replace(pG,sJ.elt,sJ.attrs),O.removeElement(w);var Wx=O.elements.lastIndexOf(E);O.elements.splice(Wx+1,0,sJ.elt)}}return!0}function Kg(){O.pop(),M=c$;return}function UD(){if(delete C$._parser,O.elements.length=0,C$.defaultView)C$.defaultView.dispatchEvent(new p$.Event("load",{}))}function D$(q,K){z=K,Y--}function A$(q){switch(q){case 38:L=A$,z=tJ;break;case 60:if(Bg())break;z=Vg;break;case 0:m.push(q),q0=!0;break;case-1:w$();break;default:rJ(Rc)||m.push(q);break}}function w0(q){switch(q){case 38:L=w0,z=tJ;break;case 60:z=Lg;break;case 0:m.push(65533),q0=!0;break;case-1:w$();break;default:m.push(q);break}}function oJ(q){switch(q){case 60:z=bg;break;case 0:m.push(65533);break;case-1:w$();break;default:rJ(pA)||m.push(q);break}}function L0(q){switch(q){case 60:z=Mg;break;case 0:m.push(65533);break;case-1:w$();break;default:rJ(pA)||m.push(q);break}}function DU(q){switch(q){case 0:m.push(65533);break;case-1:w$();break;default:rJ(Ec)||m.push(q);break}}function Vg(q){switch(q){case 33:z=tF;break;case 47:z=wg;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:Wg(),D$(q,nF);break;case 63:D$(q,oG);break;default:m.push(60),D$(q,A$);break}}function wg(q){switch(q){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:iJ(),D$(q,nF);break;case 62:z=A$;break;case-1:m.push(60),m.push(47),w$();break;default:D$(q,oG);break}}function nF(q){switch(q){case 9:case 10:case 12:case 32:z=M4;break;case 47:z=F0;break;case 62:z=A$,c4();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:b+=String.fromCharCode(q+32);break;case 0:b+=String.fromCharCode(65533);break;case-1:w$();break;default:b+=pJ(Pc);break}}function Lg(q){if(q===47)m4(),z=Og;else m.push(60),D$(q,w0)}function Og(q){switch(q){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:iJ(),D$(q,Fg);break;default:m.push(60),m.push(47),D$(q,w0);break}}function Fg(q){switch(q){case 9:case 10:case 12:case 32:if(m1(b)){z=M4;return}break;case 47:if(m1(b)){z=F0;return}break;case 62:if(m1(b)){z=A$,c4();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:b+=String.fromCharCode(q+32),Z.push(q);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:b+=String.fromCharCode(q),Z.push(q);return;default:break}m.push(60),m.push(47),AD(m,Z),D$(q,w0)}function bg(q){if(q===47)m4(),z=jg;else m.push(60),D$(q,oJ)}function jg(q){switch(q){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:iJ(),D$(q,Ag);break;default:m.push(60),m.push(47),D$(q,oJ);break}}function Ag(q){switch(q){case 9:case 10:case 12:case 32:if(m1(b)){z=M4;return}break;case 47:if(m1(b)){z=F0;return}break;case 62:if(m1(b)){z=A$,c4();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:b+=String.fromCharCode(q+32),Z.push(q);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:b+=String.fromCharCode(q),Z.push(q);return;default:break}m.push(60),m.push(47),AD(m,Z),D$(q,oJ)}function Mg(q){switch(q){case 47:m4(),z=Sg;break;case 33:z=_g,m.push(60),m.push(33);break;default:m.push(60),D$(q,L0);break}}function Sg(q){switch(q){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:iJ(),D$(q,Pg);break;default:m.push(60),m.push(47),D$(q,L0);break}}function Pg(q){switch(q){case 9:case 10:case 12:case 32:if(m1(b)){z=M4;return}break;case 47:if(m1(b)){z=F0;return}break;case 62:if(m1(b)){z=A$,c4();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:b+=String.fromCharCode(q+32),Z.push(q);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:b+=String.fromCharCode(q),Z.push(q);return;default:break}m.push(60),m.push(47),AD(m,Z),D$(q,L0)}function _g(q){if(q===45)z=Ng,m.push(45);else D$(q,L0)}function Ng(q){if(q===45)z=dF,m.push(45);else D$(q,L0)}function A4(q){switch(q){case 45:z=Rg,m.push(45);break;case 60:z=XU;break;case 0:m.push(65533);break;case-1:w$();break;default:m.push(q);break}}function Rg(q){switch(q){case 45:z=dF,m.push(45);break;case 60:z=XU;break;case 0:z=A4,m.push(65533);break;case-1:w$();break;default:z=A4,m.push(q);break}}function dF(q){switch(q){case 45:m.push(45);break;case 60:z=XU;break;case 62:z=L0,m.push(62);break;case 0:z=A4,m.push(65533);break;case-1:w$();break;default:z=A4,m.push(q);break}}function XU(q){switch(q){case 47:m4(),z=Eg;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:m4(),m.push(60),D$(q,Tg);break;default:m.push(60),D$(q,A4);break}}function Eg(q){switch(q){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:iJ(),D$(q,Zg);break;default:m.push(60),m.push(47),D$(q,A4);break}}function Zg(q){switch(q){case 9:case 10:case 12:case 32:if(m1(b)){z=M4;return}break;case 47:if(m1(b)){z=F0;return}break;case 62:if(m1(b)){z=A$,c4();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:b+=String.fromCharCode(q+32),Z.push(q);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:b+=String.fromCharCode(q),Z.push(q);return;default:break}m.push(60),m.push(47),AD(m,Z),D$(q,A4)}function Tg(q){switch(q){case 9:case 10:case 12:case 32:case 47:case 62:if(e6(Z)==="script")z=O0;else z=A4;m.push(q);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:Z.push(q+32),m.push(q);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:Z.push(q),m.push(q);break;default:D$(q,A4);break}}function O0(q){switch(q){case 45:z=vg,m.push(45);break;case 60:z=JU,m.push(60);break;case 0:m.push(65533);break;case-1:w$();break;default:m.push(q);break}}function vg(q){switch(q){case 45:z=kg,m.push(45);break;case 60:z=JU,m.push(60);break;case 0:z=O0,m.push(65533);break;case-1:w$();break;default:z=O0,m.push(q);break}}function kg(q){switch(q){case 45:m.push(45);break;case 60:z=JU,m.push(60);break;case 62:z=L0,m.push(62);break;case 0:z=O0,m.push(65533);break;case-1:w$();break;default:z=O0,m.push(q);break}}function JU(q){if(q===47)m4(),z=Cg,m.push(47);else D$(q,O0)}function Cg(q){switch(q){case 9:case 10:case 12:case 32:case 47:case 62:if(e6(Z)==="script")z=A4;else z=O0;m.push(q);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:Z.push(q+32),m.push(q);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:Z.push(q),m.push(q);break;default:D$(q,O0);break}}function M4(q){switch(q){case 9:case 10:case 12:case 32:break;case 47:z=F0;break;case 62:z=A$,c4();break;case-1:w$();break;case 61:aI(),v+=String.fromCharCode(q),z=GU;break;default:if(Qg())break;aI(),D$(q,GU);break}}function GU(q){switch(q){case 9:case 10:case 12:case 32:case 47:case 62:case-1:D$(q,yg);break;case 61:z=oF;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:v+=String.fromCharCode(q+32);break;case 0:v+=String.fromCharCode(65533);break;case 34:case 39:case 60:default:v+=pJ(_c);break}}function yg(q){switch(q){case 9:case 10:case 12:case 32:break;case 47:H0(v),z=F0;break;case 61:z=oF;break;case 62:z=A$,H0(v),c4();break;case-1:H0(v),w$();break;default:H0(v),aI(),D$(q,GU);break}}function oF(q){switch(q){case 9:case 10:case 12:case 32:break;case 34:sI(),z=rG;break;case 39:sI(),z=nG;break;case 62:default:sI(),D$(q,dG);break}}function rG(q){switch(q){case 34:H0(v,g),z=YU;break;case 38:L=rG,z=tJ;break;case 0:g+=String.fromCharCode(65533);break;case-1:w$();break;case 10:g+=String.fromCharCode(q);break;default:g+=pJ(Ac);break}}function nG(q){switch(q){case 39:H0(v,g),z=YU;break;case 38:L=nG,z=tJ;break;case 0:g+=String.fromCharCode(65533);break;case-1:w$();break;case 10:g+=String.fromCharCode(q);break;default:g+=pJ(Mc);break}}function dG(q){switch(q){case 9:case 10:case 12:case 32:H0(v,g),z=M4;break;case 38:L=dG,z=tJ;break;case 62:H0(v,g),z=A$,c4();break;case 0:g+=String.fromCharCode(65533);break;case-1:Y--,z=A$;break;case 34:case 39:case 60:case 61:case 96:default:g+=pJ(Sc);break}}function YU(q){switch(q){case 9:case 10:case 12:case 32:z=M4;break;case 47:z=F0;break;case 62:z=A$,c4();break;case-1:w$();break;default:D$(q,M4);break}}function F0(q){switch(q){case 62:z=A$,zg(!0);break;case-1:w$();break;default:D$(q,M4);break}}function oG(q,K,w){var A=K.length;if(w)Y+=A-1;else Y+=A;var E=K.substring(0,A-1);E=E.replace(/\u0000/g,"�"),E=E.replace(/\u000D\u000A/g,`
33
- `),E=E.replace(/\u000D/g,`
34
- `),_6(_4,E),z=A$}oG.lookahead=">";function tF(q,K,w){if(K[0]==="-"&&K[1]==="-"){Y+=2,pF(),z=gg;return}if(K.toUpperCase()==="DOCTYPE")Y+=7,z=lg;else if(K==="[CDATA["&&Ig())Y+=7,z=IU;else z=oG}tF.lookahead=7;function gg(q){switch(pF(),q){case 45:z=xg;break;case 62:z=A$,_6(_4,e6(T));break;default:D$(q,BD);break}}function xg(q){switch(q){case 45:z=tG;break;case 62:z=A$,_6(_4,e6(T));break;case-1:_6(_4,e6(T)),w$();break;default:T.push(45),D$(q,BD);break}}function BD(q){switch(q){case 60:T.push(q),z=hg;break;case 45:z=QU;break;case 0:T.push(65533);break;case-1:_6(_4,e6(T)),w$();break;default:T.push(q);break}}function hg(q){switch(q){case 33:T.push(q),z=ug;break;case 60:T.push(q);break;default:D$(q,BD);break}}function ug(q){switch(q){case 45:z=fg;break;default:D$(q,BD);break}}function fg(q){switch(q){case 45:z=mg;break;default:D$(q,QU);break}}function mg(q){switch(q){case 62:case-1:D$(q,tG);break;default:D$(q,tG);break}}function QU(q){switch(q){case 45:z=tG;break;case-1:_6(_4,e6(T)),w$();break;default:T.push(45),D$(q,BD);break}}function tG(q){switch(q){case 62:z=A$,_6(_4,e6(T));break;case 33:z=cg;break;case 45:T.push(45);break;case-1:_6(_4,e6(T)),w$();break;default:T.push(45),T.push(45),D$(q,BD);break}}function cg(q){switch(q){case 45:T.push(45),T.push(45),T.push(33),z=QU;break;case 62:z=A$,_6(_4,e6(T));break;case-1:_6(_4,e6(T)),w$();break;default:T.push(45),T.push(45),T.push(33),D$(q,BD);break}}function lg(q){switch(q){case 9:case 10:case 12:case 32:z=aF;break;case-1:JX(),h$(),u$(),w$();break;default:D$(q,aF);break}}function aF(q){switch(q){case 9:case 10:case 12:case 32:break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:JX(),o$.push(q+32),z=WU;break;case 0:JX(),o$.push(65533),z=WU;break;case 62:JX(),h$(),z=A$,u$();break;case-1:JX(),h$(),u$(),w$();break;default:JX(),o$.push(q),z=WU;break}}function WU(q){switch(q){case 9:case 10:case 12:case 32:z=sF;break;case 62:z=A$,u$();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:o$.push(q+32);break;case 0:o$.push(65533);break;case-1:h$(),u$(),w$();break;default:o$.push(q);break}}function sF(q,K,w){switch(q){case 9:case 10:case 12:case 32:Y+=1;break;case 62:z=A$,Y+=1,u$();break;case-1:h$(),u$(),w$();break;default:if(K=K.toUpperCase(),K==="PUBLIC")Y+=6,z=ig;else if(K==="SYSTEM")Y+=6,z=ng;else h$(),z=b0;break}}sF.lookahead=6;function ig(q){switch(q){case 9:case 10:case 12:case 32:z=pg;break;case 34:mG(),z=eF;break;case 39:mG(),z=$b;break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:h$(),z=b0;break}}function pg(q){switch(q){case 9:case 10:case 12:case 32:break;case 34:mG(),z=eF;break;case 39:mG(),z=$b;break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:h$(),z=b0;break}}function eF(q){switch(q){case 34:z=Db;break;case 0:e$.push(65533);break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:e$.push(q);break}}function $b(q){switch(q){case 39:z=Db;break;case 0:e$.push(65533);break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:e$.push(q);break}}function Db(q){switch(q){case 9:case 10:case 12:case 32:z=rg;break;case 62:z=A$,u$();break;case 34:K0(),z=aG;break;case 39:K0(),z=sG;break;case-1:h$(),u$(),w$();break;default:h$(),z=b0;break}}function rg(q){switch(q){case 9:case 10:case 12:case 32:break;case 62:z=A$,u$();break;case 34:K0(),z=aG;break;case 39:K0(),z=sG;break;case-1:h$(),u$(),w$();break;default:h$(),z=b0;break}}function ng(q){switch(q){case 9:case 10:case 12:case 32:z=dg;break;case 34:K0(),z=aG;break;case 39:K0(),z=sG;break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:h$(),z=b0;break}}function dg(q){switch(q){case 9:case 10:case 12:case 32:break;case 34:K0(),z=aG;break;case 39:K0(),z=sG;break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:h$(),z=b0;break}}function aG(q){switch(q){case 34:z=Xb;break;case 0:v6.push(65533);break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:v6.push(q);break}}function sG(q){switch(q){case 39:z=Xb;break;case 0:v6.push(65533);break;case 62:h$(),z=A$,u$();break;case-1:h$(),u$(),w$();break;default:v6.push(q);break}}function Xb(q){switch(q){case 9:case 10:case 12:case 32:break;case 62:z=A$,u$();break;case-1:h$(),u$(),w$();break;default:z=b0;break}}function b0(q){switch(q){case 62:z=A$,u$();break;case-1:u$(),w$();break;default:break}}function IU(q){switch(q){case 93:z=og;break;case-1:w$();break;case 0:q0=!0;default:rJ(Nc)||m.push(q);break}}function og(q){switch(q){case 93:z=tg;break;default:m.push(93),D$(q,IU);break}}function tg(q){switch(q){case 93:m.push(93);break;case 62:GX(),z=A$;break;default:m.push(93),m.push(93),D$(q,IU);break}}function tJ(q){switch(m4(),Z.push(38),q){case 9:case 10:case 12:case 32:case 60:case 38:case-1:D$(q,zD);break;case 35:Z.push(q),z=ag;break;default:D$(q,Jb);break}}function Jb(q){iA.lastIndex=Y;var K=iA.exec(G);if(!K)throw Error("should never happen");var w=K[1];if(!w){z=zD;return}switch(Y+=w.length,AD(Z,Tc(w)),L){case rG:case nG:case dG:if(w[w.length-1]!==";"){if(/[=A-Za-z0-9]/.test(G[Y])){z=zD;return}}break;default:break}m4();var A=bc[w];if(typeof A==="number")Z.push(A);else AD(Z,A);z=zD}Jb.lookahead=-jc;function ag(q){switch(F=0,q){case 120:case 88:Z.push(q),z=sg;break;default:D$(q,eg);break}}function sg(q){switch(q){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 66:case 67:case 68:case 69:case 70:case 97:case 98:case 99:case 100:case 101:case 102:D$(q,$x);break;default:D$(q,zD);break}}function eg(q){switch(q){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:D$(q,Dx);break;default:D$(q,zD);break}}function $x(q){switch(q){case 65:case 66:case 67:case 68:case 69:case 70:F*=16,F+=q-55;break;case 97:case 98:case 99:case 100:case 101:case 102:F*=16,F+=q-87;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:F*=16,F+=q-48;break;case 59:z=eG;break;default:D$(q,eG);break}}function Dx(q){switch(q){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:F*=10,F+=q-48;break;case 59:z=eG;break;default:D$(q,eG);break}}function eG(q){if(F in lA)F=lA[F];else if(F>1114111||F>=55296&&F<57344)F=65533;if(m4(),F<=65535)Z.push(F);else F=F-65536,Z.push(55296+(F>>10)),Z.push(56320+(F&1023));D$(q,zD)}function zD(q){switch(L){case rG:case nG:case dG:g+=e6(Z);break;default:AD(m,Z);break}D$(q,L)}function Xx(q,K,w,A){switch(q){case 1:if(K=K.replace(MD,""),K.length===0)return;break;case 4:C$._appendChild(C$.createComment(K));return;case 5:var E=K,p=w,W$=A;if(C$.appendChild(new Hc(C$,E,p,W$)),oI||E.toLowerCase()!=="html"||wc.test(p)||W$&&W$.toLowerCase()===Lc||W$===void 0&&uA.test(p))C$._quirks=!0;else if(Oc.test(p)||W$!==void 0&&uA.test(p))C$._limitedQuirks=!0;M=Gb;return}C$._quirks=!0,M=Gb,M(q,K,w,A)}function Gb(q,K,w,A){var E;switch(q){case 1:if(K=K.replace(MD,""),K.length===0)return;break;case 5:return;case 4:C$._appendChild(C$.createComment(K));return;case 2:if(K==="html"){E=nJ(C$,K,w),O.push(E),C$.appendChild(E),M=$3;return}break;case 3:switch(K){case"html":case"head":case"body":case"br":break;default:return}}E=nJ(C$,"html",null),O.push(E),C$.appendChild(E),M=$3,M(q,K,w,A)}function $3(q,K,w,A){switch(q){case 1:if(K=K.replace(MD,""),K.length===0)return;break;case 5:return;case 4:b4(K);return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"head":var E=H$(K,w);x$=E,M=j6;return}break;case 3:switch(K){case"html":case"head":case"body":case"br":break;default:return}}$3(s6,"head",null),M(q,K,w,A)}function j6(q,K,w,A){switch(q){case 1:var E=K.match(MD);if(E)j4(E[0]),K=K.substring(E[0].length);if(K.length===0)return;break;case 4:b4(K);return;case 5:return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"meta":case"base":case"basefont":case"bgsound":case"link":H$(K,w),O.pop();return;case"title":qg(K,w);return;case"noscript":if(!t$){H$(K,w),M=Yb;return}case"noframes":case"style":iG(K,w);return;case"script":cG(function(p){var W$=nJ(p,K,w);if(W$._parser_inserted=!0,W$._force_async=!1,i$)W$._already_started=!0;return GX(),W$}),z=L0,c$=M,M=D3;return;case"template":H$(K,w),d.insertMarker(),w6=!1,M=zU,l$.push(M);return;case"head":return}break;case 3:switch(K){case"head":O.pop(),M=UU;return;case"body":case"html":case"br":break;case"template":if(!O.contains("template"))return;O.generateImpliedEndTags(null,"thorough"),O.popTag("template"),d.clearToMarker(),l$.pop(),dJ();return;default:return}break}j6(S$,"head",null),M(q,K,w,A)}function Yb(q,K,w,A){switch(q){case 5:return;case 4:j6(q,K);return;case 1:var E=K.match(MD);if(E)j6(q,E[0]),K=K.substring(E[0].length);if(K.length===0)return;break;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"style":j6(q,K,w);return;case"head":case"noscript":return}break;case 3:switch(K){case"noscript":O.pop(),M=j6;return;case"br":break;default:return}break}Yb(S$,"noscript",null),M(q,K,w,A)}function UU(q,K,w,A){switch(q){case 1:var E=K.match(MD);if(E)j4(E[0]),K=K.substring(E[0].length);if(K.length===0)return;break;case 4:b4(K);return;case 5:return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"body":H$(K,w),w6=!1,M=Q$;return;case"frameset":H$(K,w),M=qU;return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":O.push(x$),j6(s6,K,w),O.removeElement(x$);return;case"head":return}break;case 3:switch(K){case"template":return j6(q,K,w,A);case"body":case"html":case"br":break;default:return}break}UU(s6,"body",null),w6=!0,M(q,K,w,A)}function Q$(q,K,w,A){var E,p,W$,M$;switch(q){case 1:if(q0){if(K=K.replace(i3,""),K.length===0)return}if(w6&&l3.test(K))w6=!1;Y1(),j4(K);return;case 5:return;case 4:b4(K);return;case-1:if(l$.length)return zU(q);UD();return;case 2:switch(K){case"html":if(O.contains("template"))return;sA(w,O.elements[0]);return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":j6(s6,K,w);return;case"body":if(E=O.elements[1],!E||!(E instanceof p$.HTMLBodyElement)||O.contains("template"))return;w6=!1,sA(w,E);return;case"frameset":if(!w6)return;if(E=O.elements[1],!E||!(E instanceof p$.HTMLBodyElement))return;if(E.parentNode)E.parentNode.removeChild(E);while(!(O.top instanceof p$.HTMLHtmlElement))O.pop();H$(K,w),M=qU;return;case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"nav":case"ol":case"p":case"section":case"summary":case"ul":if(O.inButtonScope("p"))Q$(S$,"p");H$(K,w);return;case"menu":if(O.inButtonScope("p"))Q$(S$,"p");if(r$(O.top,"menuitem"))O.pop();H$(K,w);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(O.inButtonScope("p"))Q$(S$,"p");if(O.top instanceof p$.HTMLHeadingElement)O.pop();H$(K,w);return;case"pre":case"listing":if(O.inButtonScope("p"))Q$(S$,"p");H$(K,w),ID=!0,w6=!1;return;case"form":if($6&&!O.contains("template"))return;if(O.inButtonScope("p"))Q$(S$,"p");if(M$=H$(K,w),!O.contains("template"))$6=M$;return;case"li":w6=!1;for(p=O.elements.length-1;p>=0;p--){if(W$=O.elements[p],W$ instanceof p$.HTMLLIElement){Q$(S$,"li");break}if(r$(W$,SD)&&!r$(W$,l7))break}if(O.inButtonScope("p"))Q$(S$,"p");H$(K,w);return;case"dd":case"dt":w6=!1;for(p=O.elements.length-1;p>=0;p--){if(W$=O.elements[p],r$(W$,$M)){Q$(S$,W$.localName);break}if(r$(W$,SD)&&!r$(W$,l7))break}if(O.inButtonScope("p"))Q$(S$,"p");H$(K,w);return;case"plaintext":if(O.inButtonScope("p"))Q$(S$,"p");H$(K,w),z=DU;return;case"button":if(O.inScope("button"))Q$(S$,"button"),M(q,K,w,A);else Y1(),H$(K,w),w6=!1;return;case"a":var L6=d.findElementByTag("a");if(L6)Q$(S$,K),d.remove(L6),O.removeElement(L6);case"b":case"big":case"code":case"em":case"font":case"i":case"s":case"small":case"strike":case"strong":case"tt":case"u":Y1(),d.push(H$(K,w),w);return;case"nobr":if(Y1(),O.inScope(K))Q$(S$,K),Y1();d.push(H$(K,w),w);return;case"applet":case"marquee":case"object":Y1(),H$(K,w),d.insertMarker(),w6=!1;return;case"table":if(!C$._quirks&&O.inButtonScope("p"))Q$(S$,"p");H$(K,w),w6=!1,M=c1;return;case"area":case"br":case"embed":case"img":case"keygen":case"wbr":Y1(),H$(K,w),O.pop(),w6=!1;return;case"input":Y1(),M$=H$(K,w),O.pop();var h6=M$.getAttribute("type");if(!h6||h6.toLowerCase()!=="hidden")w6=!1;return;case"param":case"source":case"track":H$(K,w),O.pop();return;case"hr":if(O.inButtonScope("p"))Q$(S$,"p");if(r$(O.top,"menuitem"))O.pop();H$(K,w),O.pop(),w6=!1;return;case"image":Q$(s6,"img",w,A);return;case"textarea":H$(K,w),ID=!0,w6=!1,z=w0,c$=M,M=D3;return;case"xmp":if(O.inButtonScope("p"))Q$(S$,"p");Y1(),w6=!1,iG(K,w);return;case"iframe":w6=!1,iG(K,w);return;case"noembed":iG(K,w);return;case"select":if(Y1(),H$(K,w),w6=!1,M===c1||M===BU||M===qD||M===aJ||M===YX)M=J3;else M=l4;return;case"optgroup":case"option":if(O.top instanceof p$.HTMLOptionElement)Q$(S$,"option");Y1(),H$(K,w);return;case"menuitem":if(r$(O.top,"menuitem"))O.pop();Y1(),H$(K,w);return;case"rb":case"rtc":if(O.inScope("ruby"))O.generateImpliedEndTags();H$(K,w);return;case"rp":case"rt":if(O.inScope("ruby"))O.generateImpliedEndTags("rtc");H$(K,w);return;case"math":if(Y1(),aA(w),c7(w),eI(K,w,G$.MATHML),A)O.pop();return;case"svg":if(Y1(),tA(w),c7(w),eI(K,w,G$.SVG),A)O.pop();return;case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}Y1(),H$(K,w);return;case 3:switch(K){case"template":j6(S$,K,w);return;case"body":if(!O.inScope("body"))return;M=Qb;return;case"html":if(!O.inScope("body"))return;M=Qb,M(q,K,w);return;case"address":case"article":case"aside":case"blockquote":case"button":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"listing":case"main":case"menu":case"nav":case"ol":case"pre":case"section":case"summary":case"ul":if(!O.inScope(K))return;O.generateImpliedEndTags(),O.popTag(K);return;case"form":if(!O.contains("template")){var l1=$6;if($6=null,!l1||!O.elementInScope(l1))return;O.generateImpliedEndTags(),O.removeElement(l1)}else{if(!O.inScope("form"))return;O.generateImpliedEndTags(),O.popTag("form")}return;case"p":if(!O.inButtonScope(K))Q$(s6,K,null),M(q,K,w,A);else O.generateImpliedEndTags(K),O.popTag(K);return;case"li":if(!O.inListItemScope(K))return;O.generateImpliedEndTags(K),O.popTag(K);return;case"dd":case"dt":if(!O.inScope(K))return;O.generateImpliedEndTags(K),O.popTag(K);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(!O.elementTypeInScope(p$.HTMLHeadingElement))return;O.generateImpliedEndTags(),O.popElementType(p$.HTMLHeadingElement);return;case"sarcasm":break;case"a":case"b":case"big":case"code":case"em":case"font":case"i":case"nobr":case"s":case"small":case"strike":case"strong":case"tt":case"u":var D4=Hg(K);if(D4)return;break;case"applet":case"marquee":case"object":if(!O.inScope(K))return;O.generateImpliedEndTags(),O.popTag(K),d.clearToMarker();return;case"br":Q$(s6,K,null);return}for(p=O.elements.length-1;p>=0;p--)if(W$=O.elements[p],r$(W$,K)){O.generateImpliedEndTags(K),O.popElement(W$);break}else if(r$(W$,SD))return;return}}function D3(q,K,w,A){switch(q){case 1:j4(K);return;case-1:if(O.top instanceof p$.HTMLScriptElement)O.top._already_started=!0;O.pop(),M=c$,M(q);return;case 3:if(K==="script")Kg();else O.pop(),M=c$;return;default:return}}function c1(q,K,w,A){function E(W$){for(var M$=0,L6=W$.length;M$<L6;M$++)if(W$[M$][0]==="type")return W$[M$][1].toLowerCase();return null}switch(q){case 1:if(tI){Q$(q,K,w,A);return}else if(r$(O.top,_X)){uG=[],c$=M,M=Jx,M(q,K,w,A);return}break;case 4:b4(K);return;case 5:return;case 2:switch(K){case"caption":O.clearToContext(p3),d.insertMarker(),H$(K,w),M=BU;return;case"colgroup":O.clearToContext(p3),H$(K,w),M=X3;return;case"col":c1(s6,"colgroup",null),M(q,K,w,A);return;case"tbody":case"tfoot":case"thead":O.clearToContext(p3),H$(K,w),M=qD;return;case"td":case"th":case"tr":c1(s6,"tbody",null),M(q,K,w,A);return;case"table":if(!O.inTableScope(K))return;c1(S$,K),M(q,K,w,A);return;case"style":case"script":case"template":j6(q,K,w,A);return;case"input":var p=E(w);if(p!=="hidden")break;H$(K,w),O.pop();return;case"form":if($6||O.contains("template"))return;$6=H$(K,w),O.popElement($6);return}break;case 3:switch(K){case"table":if(!O.inTableScope(K))return;O.popTag(K),dJ();return;case"body":case"caption":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return;case"template":j6(q,K,w,A);return}break;case-1:Q$(q,K,w,A);return}V0=!0,Q$(q,K,w,A),V0=!1}function Jx(q,K,w,A){if(q===PX){if(q0){if(K=K.replace(i3,""),K.length===0)return}uG.push(K)}else{var E=uG.join("");if(uG.length=0,l3.test(E))V0=!0,Q$(PX,E),V0=!1;else j4(E);M=c$,M(q,K,w,A)}}function BU(q,K,w,A){function E(){if(!O.inTableScope("caption"))return!1;return O.generateImpliedEndTags(),O.popTag("caption"),d.clearToMarker(),M=c1,!0}switch(q){case 2:switch(K){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(E())M(q,K,w,A);return}break;case 3:switch(K){case"caption":E();return;case"table":if(E())M(q,K,w,A);return;case"body":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}break}Q$(q,K,w,A)}function X3(q,K,w,A){switch(q){case 1:var E=K.match(MD);if(E)j4(E[0]),K=K.substring(E[0].length);if(K.length===0)return;break;case 4:b4(K);return;case 5:return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"col":H$(K,w),O.pop();return;case"template":j6(q,K,w,A);return}break;case 3:switch(K){case"colgroup":if(!r$(O.top,"colgroup"))return;O.pop(),M=c1;return;case"col":return;case"template":j6(q,K,w,A);return}break;case-1:Q$(q,K,w,A);return}if(!r$(O.top,"colgroup"))return;X3(S$,"colgroup"),M(q,K,w,A)}function qD(q,K,w,A){function E(){if(!O.inTableScope("tbody")&&!O.inTableScope("thead")&&!O.inTableScope("tfoot"))return;O.clearToContext(r3),qD(S$,O.top.localName,null),M(q,K,w,A)}switch(q){case 2:switch(K){case"tr":O.clearToContext(r3),H$(K,w),M=aJ;return;case"th":case"td":qD(s6,"tr",null),M(q,K,w,A);return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":E();return}break;case 3:switch(K){case"table":E();return;case"tbody":case"tfoot":case"thead":if(O.inTableScope(K))O.clearToContext(r3),O.pop(),M=c1;return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":case"tr":return}break}c1(q,K,w,A)}function aJ(q,K,w,A){function E(){if(!O.inTableScope("tr"))return!1;return O.clearToContext(i7),O.pop(),M=qD,!0}switch(q){case 2:switch(K){case"th":case"td":O.clearToContext(i7),H$(K,w),M=YX,d.insertMarker();return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":case"tr":if(E())M(q,K,w,A);return}break;case 3:switch(K){case"tr":E();return;case"table":if(E())M(q,K,w,A);return;case"tbody":case"tfoot":case"thead":if(O.inTableScope(K)){if(E())M(q,K,w,A)}return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":return}break}c1(q,K,w,A)}function YX(q,K,w,A){switch(q){case 2:switch(K){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(O.inTableScope("td"))YX(S$,"td"),M(q,K,w,A);else if(O.inTableScope("th"))YX(S$,"th"),M(q,K,w,A);return}break;case 3:switch(K){case"td":case"th":if(!O.inTableScope(K))return;O.generateImpliedEndTags(),O.popTag(K),d.clearToMarker(),M=aJ;return;case"body":case"caption":case"col":case"colgroup":case"html":return;case"table":case"tbody":case"tfoot":case"thead":case"tr":if(!O.inTableScope(K))return;YX(S$,O.inTableScope("td")?"td":"th"),M(q,K,w,A);return}break}Q$(q,K,w,A)}function l4(q,K,w,A){switch(q){case 1:if(q0){if(K=K.replace(i3,""),K.length===0)return}j4(K);return;case 4:b4(K);return;case 5:return;case-1:Q$(q,K,w,A);return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"option":if(O.top instanceof p$.HTMLOptionElement)l4(S$,K);H$(K,w);return;case"optgroup":if(O.top instanceof p$.HTMLOptionElement)l4(S$,"option");if(O.top instanceof p$.HTMLOptGroupElement)l4(S$,K);H$(K,w);return;case"select":l4(S$,K);return;case"input":case"keygen":case"textarea":if(!O.inSelectScope("select"))return;l4(S$,"select"),M(q,K,w,A);return;case"script":case"template":j6(q,K,w,A);return}break;case 3:switch(K){case"optgroup":if(O.top instanceof p$.HTMLOptionElement&&O.elements[O.elements.length-2]instanceof p$.HTMLOptGroupElement)l4(S$,"option");if(O.top instanceof p$.HTMLOptGroupElement)O.pop();return;case"option":if(O.top instanceof p$.HTMLOptionElement)O.pop();return;case"select":if(!O.inSelectScope(K))return;O.popTag(K),dJ();return;case"template":j6(q,K,w,A);return}break}}function J3(q,K,w,A){switch(K){case"caption":case"table":case"tbody":case"tfoot":case"thead":case"tr":case"td":case"th":switch(q){case 2:J3(S$,"select"),M(q,K,w,A);return;case 3:if(O.inTableScope(K))J3(S$,"select"),M(q,K,w,A);return}}l4(q,K,w,A)}function zU(q,K,w,A){function E(p){M=p,l$[l$.length-1]=M,M(q,K,w,A)}switch(q){case 1:case 4:case 5:Q$(q,K,w,A);return;case-1:if(!O.contains("template"))UD();else O.popTag("template"),d.clearToMarker(),l$.pop(),dJ(),M(q,K,w,A);return;case 2:switch(K){case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":j6(q,K,w,A);return;case"caption":case"colgroup":case"tbody":case"tfoot":case"thead":E(c1);return;case"col":E(X3);return;case"tr":E(qD);return;case"td":case"th":E(aJ);return}E(Q$);return;case 3:switch(K){case"template":j6(q,K,w,A);return;default:return}}}function Qb(q,K,w,A){switch(q){case 1:if(l3.test(K))break;Q$(q,K);return;case 4:O.elements[0]._appendChild(C$.createComment(K));return;case 5:return;case-1:UD();return;case 2:if(K==="html"){Q$(q,K,w,A);return}break;case 3:if(K==="html"){if(i$)return;M=Yx;return}break}M=Q$,M(q,K,w,A)}function qU(q,K,w,A){switch(q){case 1:if(K=K.replace(m7,""),K.length>0)j4(K);return;case 4:b4(K);return;case 5:return;case-1:UD();return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"frameset":H$(K,w);return;case"frame":H$(K,w),O.pop();return;case"noframes":j6(q,K,w,A);return}break;case 3:if(K==="frameset"){if(i$&&O.top instanceof p$.HTMLHtmlElement)return;if(O.pop(),!i$&&!(O.top instanceof p$.HTMLFrameSetElement))M=Gx;return}break}}function Gx(q,K,w,A){switch(q){case 1:if(K=K.replace(m7,""),K.length>0)j4(K);return;case 4:b4(K);return;case 5:return;case-1:UD();return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"noframes":j6(q,K,w,A);return}break;case 3:if(K==="html"){M=Qx;return}break}}function Yx(q,K,w,A){switch(q){case 1:if(l3.test(K))break;Q$(q,K,w,A);return;case 4:C$._appendChild(C$.createComment(K));return;case 5:Q$(q,K,w,A);return;case-1:UD();return;case 2:if(K==="html"){Q$(q,K,w,A);return}break}M=Q$,M(q,K,w,A)}function Qx(q,K,w,A){switch(q){case 1:if(K=K.replace(m7,""),K.length>0)Q$(q,K,w,A);return;case 4:C$._appendChild(C$.createComment(K));return;case 5:Q$(q,K,w,A);return;case-1:UD();return;case 2:switch(K){case"html":Q$(q,K,w,A);return;case"noframes":j6(q,K,w,A);return}break}}function Wb(q,K,w,A){function E(L6){for(var h6=0,l1=L6.length;h6<l1;h6++)switch(L6[h6][0]){case"color":case"face":case"size":return!0}return!1}var p;switch(q){case 1:if(w6&&Zc.test(K))w6=!1;if(q0)K=K.replace(i3,"�");j4(K);return;case 4:b4(K);return;case 5:return;case 2:switch(K){case"font":if(!E(w))break;case"b":case"big":case"blockquote":case"body":case"br":case"center":case"code":case"dd":case"div":case"dl":case"dt":case"em":case"embed":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"head":case"hr":case"i":case"img":case"li":case"listing":case"menu":case"meta":case"nobr":case"ol":case"p":case"pre":case"ruby":case"s":case"small":case"span":case"strong":case"strike":case"sub":case"sup":case"table":case"tt":case"u":case"ul":case"var":if(i$)break;do O.pop(),p=O.top;while(p.namespaceURI!==G$.HTML&&!dA(p)&&!oA(p));_6(q,K,w,A);return}if(p=O.elements.length===1&&i$?D:O.top,p.namespaceURI===G$.MATHML)aA(w);else if(p.namespaceURI===G$.SVG)K=vc(K),tA(w);if(c7(w),eI(K,w,p.namespaceURI),A){if(K==="script"&&p.namespaceURI===G$.SVG);O.pop()}return;case 3:if(p=O.top,K==="script"&&p.namespaceURI===G$.SVG&&p.localName==="script")O.pop();else{var W$=O.elements.length-1,M$=O.elements[W$];for(;;){if(M$.localName.toLowerCase()===K){O.popElement(M$);break}if(M$=O.elements[--W$],M$.namespaceURI!==G$.HTML)continue;M(q,K,w,A);break}}return}}return fG.testTokenizer=function(q,K,w,A){var E=[];switch(K){case"PCDATA state":z=A$;break;case"RCDATA state":z=w0;break;case"RAWTEXT state":z=oJ;break;case"PLAINTEXT state":z=DU;break}if(w)P=w;if(_6=function(W$,M$,L6,h6){switch(GX(),W$){case 1:if(E.length>0&&E[E.length-1][0]==="Character")E[E.length-1][1]+=M$;else E.push(["Character",M$]);break;case 4:E.push(["Comment",M$]);break;case 5:E.push(["DOCTYPE",M$,L6===void 0?null:L6,h6===void 0?null:h6,!oI]);break;case 2:var l1=Object.create(null);for(var D4=0;D4<L6.length;D4++){var HD=L6[D4];if(HD.length===1)l1[HD[0]]="";else l1[HD[0]]=HD[1]}var j0=["StartTag",M$,l1];if(h6)j0.push(!0);E.push(j0);break;case 3:E.push(["EndTag",M$]);break;case-1:break}},!A)this.parse(q,!0);else{for(var p=0;p<q.length;p++)this.parse(q[p]);this.parse("",!0)}return E},fG}});var N9=N((LG$,zM)=>{zM.exports=BM;var IM=u3(),UM=m3(),kc=d3(),o3=M6(),Cc=S3();function BM($){this.contextObject=$}var yc={xml:{"":!0,"1.0":!0,"2.0":!0},core:{"":!0,"2.0":!0},html:{"":!0,"1.0":!0,"2.0":!0},xhtml:{"":!0,"1.0":!0,"2.0":!0}};BM.prototype={hasFeature:function(D,X){var G=yc[(D||"").toLowerCase()];return G&&G[X||""]||!1},createDocumentType:function(D,X,G){if(!Cc.isValidQName(D))o3.InvalidCharacterError();return new UM(this.contextObject,D,X,G)},createDocument:function(D,X,G){var J=new IM(!1,null),Y;if(X)Y=J.createElementNS(D,X);else Y=null;if(G)J.appendChild(G);if(Y)J.appendChild(Y);if(D===o3.NAMESPACE.HTML)J._contentType="application/xhtml+xml";else if(D===o3.NAMESPACE.SVG)J._contentType="image/svg+xml";else J._contentType="application/xml";return J},createHTMLDocument:function(D){var X=new IM(!0,null);X.appendChild(new UM(X,"html"));var G=X.createElement("html");X.appendChild(G);var J=X.createElement("head");if(G.appendChild(J),D!==void 0){var Y=X.createElement("title");J.appendChild(Y),Y.appendChild(X.createTextNode(D))}return G.appendChild(X.createElement("body")),X.modclock=1,X},mozSetOutputMutationHandler:function($,D){$.mutationHandler=D},mozGetInputMutationHandler:function($){o3.nyi()},mozHTMLParser:kc}});var HM=N((OG$,qM)=>{var gc=C3(),xc=v7();qM.exports=r7;function r7($,D){this._window=$,this._href=D}r7.prototype=Object.create(xc.prototype,{constructor:{value:r7},href:{get:function(){return this._href},set:function($){this.assign($)}},assign:{value:function($){var D=new gc(this._href),X=D.resolve($);this._href=X}},replace:{value:function($){this.assign($)}},reload:{value:function(){this.assign(this.href)}},toString:{value:function(){return this.href}}})});var VM=N((FG$,KM)=>{var hc=Object.create(null,{appCodeName:{value:"Mozilla"},appName:{value:"Netscape"},appVersion:{value:"4.0"},platform:{value:""},product:{value:"Gecko"},productSub:{value:"20100101"},userAgent:{value:""},vendor:{value:""},vendorSub:{value:""},taintEnabled:{value:function(){return!1}}});KM.exports=hc});var LM=N((bG$,wM)=>{var uc={setTimeout,clearTimeout,setInterval,clearInterval};wM.exports=uc});var d7=N((R9,OM)=>{var n7=M6();R9=OM.exports={CSSStyleDeclaration:y3(),CharacterData:O9(),Comment:O7(),DOMException:F3(),DOMImplementation:N9(),DOMTokenList:D7(),Document:u3(),DocumentFragment:b7(),DocumentType:m3(),Element:FX(),HTMLParser:d3(),NamedNodeMap:W7(),Node:f6(),NodeList:bD(),NodeFilter:A9(),ProcessingInstruction:A7(),Text:w7(),Window:o7()};n7.merge(R9,T7());n7.merge(R9,x3().elements);n7.merge(R9,x7().elements)});var o7=N((jG$,FM)=>{var fc=N9(),mc=uU(),cc=HM(),E9=M6();FM.exports=t3;function t3($){this.document=$||new fc(null).createHTMLDocument(""),this.document._scripting_enabled=!0,this.document.defaultView=this,this.location=new cc(this,this.document._address||"about:blank")}t3.prototype=Object.create(mc.prototype,{console:{value:console},history:{value:{back:E9.nyi,forward:E9.nyi,go:E9.nyi}},navigator:{value:VM()},window:{get:function(){return this}},self:{get:function(){return this}},frames:{get:function(){return this}},parent:{get:function(){return this}},top:{get:function(){return this}},length:{value:0},frameElement:{value:null},opener:{value:null},onload:{get:function(){return this._getEventHandler("load")},set:function($){this._setEventHandler("load",$)}},getComputedStyle:{value:function(D){return D.style}}});E9.expose(LM(),t3);E9.expose(d7(),t3)});var SM=N((lc)=>{var bM=N9(),jM=d3(),AG$=o7(),AM=d7();lc.createDOMImplementation=function(){return new bM(null)};lc.createDocument=function($,D){if($||D){var X=new jM;return X.parse($||"",!0),X.document()}return new bM(null).createHTMLDocument("")};lc.createIncrementalHTMLParser=function(){var $=new jM;return{write:function(D){if(D.length>0)$.parse(D,!1,function(){return!0})},end:function(D){$.parse(D||"",!0,function(){return!0})},process:function(D){return $.parse("",!1,D)},document:function(){return $.document()}}};lc.createWindow=function($,D){var X=lc.createDocument($);if(D!==void 0)X._address=D;return new AM.Window(X)};lc.impl=AM});var fM=N((SG$,uM)=>{function dc($){for(var D=1;D<arguments.length;D++){var X=arguments[D];for(var G in X)if(Object.prototype.hasOwnProperty.call(X,G))$[G]=X[G]}return $}function e7($,D){return Array(D+1).join($)}function NM($){return $.replace(/^\n*/,"")}function RM($){var D=$.length;while(D>0&&$[D-1]===`
35
- `)D--;return $.substring(0,D)}function EM($){return RM(NM($))}var oc=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function $B($){return DB($,oc)}var ZM=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function TM($){return DB($,ZM)}function tc($){return kM($,ZM)}var vM=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function ac($){return DB($,vM)}function sc($){return kM($,vM)}function DB($,D){return D.indexOf($.nodeName)>=0}function kM($,D){return $.getElementsByTagName&&D.some(function(X){return $.getElementsByTagName(X).length})}var ec=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function CM($){return ec.reduce(function(D,X){return D.replace(X[0],X[1])},$)}var $1={};$1.paragraph={filter:"p",replacement:function($){return`
36
-
37
- `+$+`
38
-
39
- `}};$1.lineBreak={filter:"br",replacement:function($,D,X){return X.br+`
40
- `}};$1.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function($,D,X){var G=Number(D.nodeName.charAt(1));if(X.headingStyle==="setext"&&G<3){var J=e7(G===1?"=":"-",$.length);return`
41
-
42
- `+$+`
43
- `+J+`
44
-
45
- `}else return`
46
-
47
- `+e7("#",G)+" "+$+`
48
-
49
- `}};$1.blockquote={filter:"blockquote",replacement:function($){return $=EM($).replace(/^/gm,"> "),`
50
-
51
- `+$+`
52
-
53
- `}};$1.list={filter:["ul","ol"],replacement:function($,D){var X=D.parentNode;if(X.nodeName==="LI"&&X.lastElementChild===D)return`
54
- `+$;else return`
55
-
56
- `+$+`
57
-
58
- `}};$1.listItem={filter:"li",replacement:function($,D,X){var G=X.bulletListMarker+" ",J=D.parentNode;if(J.nodeName==="OL"){var Y=J.getAttribute("start"),Q=Array.prototype.indexOf.call(J.children,D);G=(Y?Number(Y)+Q:Q+1)+". "}var W=/\n$/.test($);return $=EM($)+(W?`
59
- `:""),$=$.replace(/\n/gm,`
60
- `+" ".repeat(G.length)),G+$+(D.nextSibling?`
61
- `:"")}};$1.indentedCodeBlock={filter:function($,D){return D.codeBlockStyle==="indented"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,D,X){return`
62
-
63
- `+D.firstChild.textContent.replace(/\n/g,`
64
- `)+`
65
-
66
- `}};$1.fencedCodeBlock={filter:function($,D){return D.codeBlockStyle==="fenced"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,D,X){var G=D.firstChild.getAttribute("class")||"",J=(G.match(/language-(\S+)/)||[null,""])[1],Y=D.firstChild.textContent,Q=X.fence.charAt(0),W=3,I=new RegExp("^"+Q+"{3,}","gm"),U;while(U=I.exec(Y))if(U[0].length>=W)W=U[0].length+1;var B=e7(Q,W);return`
67
-
68
- `+B+J+`
69
- `+Y.replace(/\n$/,"")+`
70
- `+B+`
71
-
72
- `}};$1.horizontalRule={filter:"hr",replacement:function($,D,X){return`
73
-
74
- `+X.hr+`
75
-
76
- `}};$1.inlineLink={filter:function($,D){return D.linkStyle==="inlined"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,D){var X=XB(D.getAttribute("href")),G=JB(a3(D.getAttribute("title"))),J=G?' "'+G+'"':"";return"["+$+"]("+X+J+")"}};$1.referenceLink={filter:function($,D){return D.linkStyle==="referenced"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,D,X){var G=XB(D.getAttribute("href")),J=a3(D.getAttribute("title"));if(J)J=' "'+JB(J)+'"';var Y,Q;switch(X.linkReferenceStyle){case"collapsed":Y="["+$+"][]",Q="["+$+"]: "+G+J;break;case"shortcut":Y="["+$+"]",Q="["+$+"]: "+G+J;break;default:var W=this.references.length+1;Y="["+$+"]["+W+"]",Q="["+W+"]: "+G+J}return this.references.push(Q),Y},references:[],append:function($){var D="";if(this.references.length)D=`
77
-
78
- `+this.references.join(`
79
- `)+`
80
-
81
- `,this.references=[];return D}};$1.emphasis={filter:["em","i"],replacement:function($,D,X){if(!$.trim())return"";return X.emDelimiter+$+X.emDelimiter}};$1.strong={filter:["strong","b"],replacement:function($,D,X){if(!$.trim())return"";return X.strongDelimiter+$+X.strongDelimiter}};$1.code={filter:function($){var D=$.previousSibling||$.nextSibling,X=$.parentNode.nodeName==="PRE"&&!D;return $.nodeName==="CODE"&&!X},replacement:function($){if(!$)return"";$=$.replace(/\r?\n|\r/g," ");var D=/^`|^ .*?[^ ].* $|`$/.test($)?" ":"",X="`",G=$.match(/`+/gm)||[];while(G.indexOf(X)!==-1)X=X+"`";return X+D+$+D+X}};$1.image={filter:"img",replacement:function($,D){var X=CM(a3(D.getAttribute("alt"))),G=XB(D.getAttribute("src")||""),J=a3(D.getAttribute("title")),Y=J?' "'+JB(J)+'"':"";return G?"!["+X+"]("+G+Y+")":""}};function a3($){return $?$.replace(/(\n+\s*)+/g,`
82
- `):""}function XB($){var D=$.replace(/([<>()])/g,"\\$1");return D.indexOf(" ")>=0?"<"+D+">":D}function JB($){return $.replace(/"/g,"\\\"")}function yM($){this.options=$,this._keep=[],this._remove=[],this.blankRule={replacement:$.blankReplacement},this.keepReplacement=$.keepReplacement,this.defaultRule={replacement:$.defaultReplacement},this.array=[];for(var D in $.rules)this.array.push($.rules[D])}yM.prototype={add:function($,D){this.array.unshift(D)},keep:function($){this._keep.unshift({filter:$,replacement:this.keepReplacement})},remove:function($){this._remove.unshift({filter:$,replacement:function(){return""}})},forNode:function($){if($.isBlank)return this.blankRule;var D;if(D=t7(this.array,$,this.options))return D;if(D=t7(this._keep,$,this.options))return D;if(D=t7(this._remove,$,this.options))return D;return this.defaultRule},forEach:function($){for(var D=0;D<this.array.length;D++)$(this.array[D],D)}};function t7($,D,X){for(var G=0;G<$.length;G++){var J=$[G];if($l(J,D,X))return J}return}function $l($,D,X){var G=$.filter;if(typeof G==="string"){if(G===D.nodeName.toLowerCase())return!0}else if(Array.isArray(G)){if(G.indexOf(D.nodeName.toLowerCase())>-1)return!0}else if(typeof G==="function"){if(G.call($,D,X))return!0}else throw TypeError("`filter` needs to be a string, array, or function")}function Dl($){var{element:D,isBlock:X,isVoid:G}=$,J=$.isPre||function(H){return H.nodeName==="PRE"};if(!D.firstChild||J(D))return;var Y=null,Q=!1,W=null,I=PM(W,D,J);while(I!==D){if(I.nodeType===3||I.nodeType===4){var U=I.data.replace(/[ \r\n\t]+/g," ");if((!Y||/ $/.test(Y.data))&&!Q&&U[0]===" ")U=U.substr(1);if(!U){I=a7(I);continue}I.data=U,Y=I}else if(I.nodeType===1){if(X(I)||I.nodeName==="BR"){if(Y)Y.data=Y.data.replace(/ $/,"");Y=null,Q=!1}else if(G(I)||J(I))Y=null,Q=!0;else if(Y)Q=!1}else{I=a7(I);continue}var B=PM(W,I,J);W=I,I=B}if(Y){if(Y.data=Y.data.replace(/ $/,""),!Y.data)a7(Y)}}function a7($){var D=$.nextSibling||$.parentNode;return $.parentNode.removeChild($),D}function PM($,D,X){if($&&$.parentNode===D||X(D))return D.nextSibling||D.parentNode;return D.firstChild||D.nextSibling||D.parentNode}var gM=typeof window<"u"?window:{};function Xl(){var $=gM.DOMParser,D=!1;try{if(new $().parseFromString("","text/html"))D=!0}catch(X){}return D}function Jl(){var $=function(){};{var D=SM();$.prototype.parseFromString=function(X){return D.createDocument(X)}}return $}var Gl=Xl()?gM.DOMParser:Jl();function Yl($,D){var X;if(typeof $==="string"){var G=Ql().parseFromString('<x-turndown id="turndown-root">'+$+"</x-turndown>","text/html");X=G.getElementById("turndown-root")}else X=$.cloneNode(!0);return Dl({element:X,isBlock:$B,isVoid:TM,isPre:D.preformattedCode?Wl:null}),X}var s7;function Ql(){return s7=s7||new Gl,s7}function Wl($){return $.nodeName==="PRE"||$.nodeName==="CODE"}function Il($,D){return $.isBlock=$B($),$.isCode=$.nodeName==="CODE"||$.parentNode.isCode,$.isBlank=Ul($),$.flankingWhitespace=Bl($,D),$}function Ul($){return!TM($)&&!ac($)&&/^\s*$/i.test($.textContent)&&!tc($)&&!sc($)}function Bl($,D){if($.isBlock||D.preformattedCode&&$.isCode)return{leading:"",trailing:""};var X=zl($.textContent);if(X.leadingAscii&&_M("left",$,D))X.leading=X.leadingNonAscii;if(X.trailingAscii&&_M("right",$,D))X.trailing=X.trailingNonAscii;return{leading:X.leading,trailing:X.trailing}}function zl($){var D=$.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:D[1],leadingAscii:D[2],leadingNonAscii:D[3],trailing:D[4],trailingNonAscii:D[5],trailingAscii:D[6]}}function _M($,D,X){var G,J,Y;if($==="left")G=D.previousSibling,J=/ $/;else G=D.nextSibling,J=/^ /;if(G){if(G.nodeType===3)Y=J.test(G.nodeValue);else if(X.preformattedCode&&G.nodeName==="CODE")Y=!1;else if(G.nodeType===1&&!$B(G))Y=J.test(G.textContent)}return Y}var ql=Array.prototype.reduce;function s3($){if(!(this instanceof s3))return new s3($);var D={rules:$1,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(X,G){return G.isBlock?`
83
-
84
- `:""},keepReplacement:function(X,G){return G.isBlock?`
85
-
86
- `+G.outerHTML+`
87
-
88
- `:G.outerHTML},defaultReplacement:function(X,G){return G.isBlock?`
89
-
90
- `+X+`
91
-
92
- `:X}};this.options=dc({},D,$),this.rules=new yM(this.options)}s3.prototype={turndown:function($){if(!Vl($))throw TypeError($+" is not a string, or an element/document/fragment node.");if($==="")return"";var D=xM.call(this,new Yl($,this.options));return Hl.call(this,D)},use:function($){if(Array.isArray($))for(var D=0;D<$.length;D++)this.use($[D]);else if(typeof $==="function")$(this);else throw TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function($,D){return this.rules.add($,D),this},keep:function($){return this.rules.keep($),this},remove:function($){return this.rules.remove($),this},escape:function($){return CM($)}};function xM($){var D=this;return ql.call($.childNodes,function(X,G){G=new Il(G,D.options);var J="";if(G.nodeType===3)J=G.isCode?G.nodeValue:D.escape(G.nodeValue);else if(G.nodeType===1)J=Kl.call(D,G);return hM(X,J)},"")}function Hl($){var D=this;return this.rules.forEach(function(X){if(typeof X.append==="function")$=hM($,X.append(D.options))}),$.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Kl($){var D=this.rules.forNode($),X=xM.call(this,$),G=$.flankingWhitespace;if(G.leading||G.trailing)X=X.trim();return G.leading+D.replacement(X,$,this.options)+G.trailing}function hM($,D){var X=RM($),G=NM(D),J=Math.max($.length-X.length,D.length-G.length),Y=`
93
-
94
- `.substring(0,J);return X+Y+G}function Vl($){return $!=null&&(typeof $==="string"||$.nodeType&&($.nodeType===1||$.nodeType===9||$.nodeType===11))}uM.exports=s3});var nM=N((mG$,rM)=>{var R0=S4("constants"),El=process.cwd,$Y=null,Zl=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!$Y)$Y=El.call(process);return $Y};try{process.cwd()}catch($){}if(typeof process.chdir==="function"){if(DY=process.chdir,process.chdir=function($){$Y=null,DY.call(process,$)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,DY)}var DY;rM.exports=Tl;function Tl($){if(R0.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))D($);if(!$.lutimes)X($);if($.chown=Y($.chown),$.fchown=Y($.fchown),$.lchown=Y($.lchown),$.chmod=G($.chmod),$.fchmod=G($.fchmod),$.lchmod=G($.lchmod),$.chownSync=Q($.chownSync),$.fchownSync=Q($.fchownSync),$.lchownSync=Q($.lchownSync),$.chmodSync=J($.chmodSync),$.fchmodSync=J($.fchmodSync),$.lchmodSync=J($.lchmodSync),$.stat=W($.stat),$.fstat=W($.fstat),$.lstat=W($.lstat),$.statSync=I($.statSync),$.fstatSync=I($.fstatSync),$.lstatSync=I($.lstatSync),$.chmod&&!$.lchmod)$.lchmod=function(B,H,V){if(V)process.nextTick(V)},$.lchmodSync=function(){};if($.chown&&!$.lchown)$.lchown=function(B,H,V,z){if(z)process.nextTick(z)},$.lchownSync=function(){};if(Zl==="win32")$.rename=typeof $.rename!=="function"?$.rename:function(B){function H(V,z,L){var F=Date.now(),b=0;B(V,z,function P(Z){if(Z&&(Z.code==="EACCES"||Z.code==="EPERM"||Z.code==="EBUSY")&&Date.now()-F<60000){if(setTimeout(function(){$.stat(z,function(v,g){if(v&&v.code==="ENOENT")B(V,z,P);else L(Z)})},b),b<100)b+=10;return}if(L)L(Z)})}if(Object.setPrototypeOf)Object.setPrototypeOf(H,B);return H}($.rename);$.read=typeof $.read!=="function"?$.read:function(B){function H(V,z,L,F,b,P){var Z;if(P&&typeof P==="function"){var v=0;Z=function(g,T,o$){if(g&&g.code==="EAGAIN"&&v<10)return v++,B.call($,V,z,L,F,b,Z);P.apply(this,arguments)}}return B.call($,V,z,L,F,b,Z)}if(Object.setPrototypeOf)Object.setPrototypeOf(H,B);return H}($.read),$.readSync=typeof $.readSync!=="function"?$.readSync:function(B){return function(H,V,z,L,F){var b=0;while(!0)try{return B.call($,H,V,z,L,F)}catch(P){if(P.code==="EAGAIN"&&b<10){b++;continue}throw P}}}($.readSync);function D(B){B.lchmod=function(H,V,z){B.open(H,R0.O_WRONLY|R0.O_SYMLINK,V,function(L,F){if(L){if(z)z(L);return}B.fchmod(F,V,function(b){B.close(F,function(P){if(z)z(b||P)})})})},B.lchmodSync=function(H,V){var z=B.openSync(H,R0.O_WRONLY|R0.O_SYMLINK,V),L=!0,F;try{F=B.fchmodSync(z,V),L=!1}finally{if(L)try{B.closeSync(z)}catch(b){}else B.closeSync(z)}return F}}function X(B){if(R0.hasOwnProperty("O_SYMLINK")&&B.futimes)B.lutimes=function(H,V,z,L){B.open(H,R0.O_SYMLINK,function(F,b){if(F){if(L)L(F);return}B.futimes(b,V,z,function(P){B.close(b,function(Z){if(L)L(P||Z)})})})},B.lutimesSync=function(H,V,z){var L=B.openSync(H,R0.O_SYMLINK),F,b=!0;try{F=B.futimesSync(L,V,z),b=!1}finally{if(b)try{B.closeSync(L)}catch(P){}else B.closeSync(L)}return F};else if(B.futimes)B.lutimes=function(H,V,z,L){if(L)process.nextTick(L)},B.lutimesSync=function(){}}function G(B){if(!B)return B;return function(H,V,z){return B.call($,H,V,function(L){if(U(L))L=null;if(z)z.apply(this,arguments)})}}function J(B){if(!B)return B;return function(H,V){try{return B.call($,H,V)}catch(z){if(!U(z))throw z}}}function Y(B){if(!B)return B;return function(H,V,z,L){return B.call($,H,V,z,function(F){if(U(F))F=null;if(L)L.apply(this,arguments)})}}function Q(B){if(!B)return B;return function(H,V,z){try{return B.call($,H,V,z)}catch(L){if(!U(L))throw L}}}function W(B){if(!B)return B;return function(H,V,z){if(typeof V==="function")z=V,V=null;function L(F,b){if(b){if(b.uid<0)b.uid+=4294967296;if(b.gid<0)b.gid+=4294967296}if(z)z.apply(this,arguments)}return V?B.call($,H,V,L):B.call($,H,L)}}function I(B){if(!B)return B;return function(H,V){var z=V?B.call($,H,V):B.call($,H);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function U(B){if(!B)return!0;if(B.code==="ENOSYS")return!0;var H=!process.getuid||process.getuid()!==0;if(H){if(B.code==="EINVAL"||B.code==="EPERM")return!0}return!1}}});var tM=N((cG$,oM)=>{var dM=S4("stream").Stream;oM.exports=vl;function vl($){return{ReadStream:D,WriteStream:X};function D(G,J){if(!(this instanceof D))return new D(G,J);dM.call(this);var Y=this;this.path=G,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,J=J||{};var Q=Object.keys(J);for(var W=0,I=Q.length;W<I;W++){var U=Q[W];this[U]=J[U]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){Y._read()});return}$.open(this.path,this.flags,this.mode,function(B,H){if(B){Y.emit("error",B),Y.readable=!1;return}Y.fd=H,Y.emit("open",H),Y._read()})}function X(G,J){if(!(this instanceof X))return new X(G,J);dM.call(this),this.path=G,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,J=J||{};var Y=Object.keys(J);for(var Q=0,W=Y.length;Q<W;Q++){var I=Y[Q];this[I]=J[I]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=$.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var sM=N((lG$,aM)=>{aM.exports=Cl;var kl=Object.getPrototypeOf||function($){return $.__proto__};function Cl($){if($===null||typeof $!=="object")return $;if($ instanceof Object)var D={__proto__:kl($)};else var D=Object.create(null);return Object.getOwnPropertyNames($).forEach(function(X){Object.defineProperty(D,X,Object.getOwnPropertyDescriptor($,X))}),D}});var DS=N((iG$,UB)=>{var F6=S4("fs"),yl=nM(),gl=tM(),xl=sM(),XY=S4("util"),l6,GY;if(typeof Symbol==="function"&&typeof Symbol.for==="function")l6=Symbol.for("graceful-fs.queue"),GY=Symbol.for("graceful-fs.previous");else l6="___graceful-fs.queue",GY="___graceful-fs.previous";function hl(){}function $S($,D){Object.defineProperty($,l6,{get:function(){return D}})}var PD=hl;if(XY.debuglog)PD=XY.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))PD=function(){var $=XY.format.apply(XY,arguments);$="GFS4: "+$.split(/\n/).join(`
95
- GFS4: `),console.error($)};if(!F6[l6]){if(QB=global[l6]||[],$S(F6,QB),F6.close=function($){function D(X,G){return $.call(F6,X,function(J){if(!J)eM();if(typeof G==="function")G.apply(this,arguments)})}return Object.defineProperty(D,GY,{value:$}),D}(F6.close),F6.closeSync=function($){function D(X){$.apply(F6,arguments),eM()}return Object.defineProperty(D,GY,{value:$}),D}(F6.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){PD(F6[l6]),S4("assert").equal(F6[l6].length,0)})}var QB;if(!global[l6])$S(global,F6[l6]);UB.exports=WB(xl(F6));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!F6.__patched)UB.exports=WB(F6),F6.__patched=!0;function WB($){yl($),$.gracefulify=WB,$.createReadStream=T,$.createWriteStream=o$;var D=$.readFile;$.readFile=X;function X(a,O$,M){if(typeof O$==="function")M=O$,O$=null;return c$(a,O$,M);function c$(l$,O,d,i$){return D(l$,O,function(x$){if(x$&&(x$.code==="EMFILE"||x$.code==="ENFILE"))NX([c$,[l$,O,d],x$,i$||Date.now(),Date.now()]);else if(typeof d==="function")d.apply(this,arguments)})}}var G=$.writeFile;$.writeFile=J;function J(a,O$,M,c$){if(typeof M==="function")c$=M,M=null;return l$(a,O$,M,c$);function l$(O,d,i$,x$,$6){return G(O,d,i$,function(t$){if(t$&&(t$.code==="EMFILE"||t$.code==="ENFILE"))NX([l$,[O,d,i$,x$],t$,$6||Date.now(),Date.now()]);else if(typeof x$==="function")x$.apply(this,arguments)})}}var Y=$.appendFile;if(Y)$.appendFile=Q;function Q(a,O$,M,c$){if(typeof M==="function")c$=M,M=null;return l$(a,O$,M,c$);function l$(O,d,i$,x$,$6){return Y(O,d,i$,function(t$){if(t$&&(t$.code==="EMFILE"||t$.code==="ENFILE"))NX([l$,[O,d,i$,x$],t$,$6||Date.now(),Date.now()]);else if(typeof x$==="function")x$.apply(this,arguments)})}}var W=$.copyFile;if(W)$.copyFile=I;function I(a,O$,M,c$){if(typeof M==="function")c$=M,M=0;return l$(a,O$,M,c$);function l$(O,d,i$,x$,$6){return W(O,d,i$,function(t$){if(t$&&(t$.code==="EMFILE"||t$.code==="ENFILE"))NX([l$,[O,d,i$,x$],t$,$6||Date.now(),Date.now()]);else if(typeof x$==="function")x$.apply(this,arguments)})}}var U=$.readdir;$.readdir=H;var B=/^v[0-5]\./;function H(a,O$,M){if(typeof O$==="function")M=O$,O$=null;var c$=B.test(process.version)?function(d,i$,x$,$6){return U(d,l$(d,i$,x$,$6))}:function(d,i$,x$,$6){return U(d,i$,l$(d,i$,x$,$6))};return c$(a,O$,M);function l$(O,d,i$,x$){return function($6,t$){if($6&&($6.code==="EMFILE"||$6.code==="ENFILE"))NX([c$,[O,d,i$],$6,x$||Date.now(),Date.now()]);else{if(t$&&t$.sort)t$.sort();if(typeof i$==="function")i$.call(this,$6,t$)}}}}if(process.version.substr(0,4)==="v0.8"){var V=gl($);P=V.ReadStream,v=V.WriteStream}var z=$.ReadStream;if(z)P.prototype=Object.create(z.prototype),P.prototype.open=Z;var L=$.WriteStream;if(L)v.prototype=Object.create(L.prototype),v.prototype.open=g;Object.defineProperty($,"ReadStream",{get:function(){return P},set:function(a){P=a},enumerable:!0,configurable:!0}),Object.defineProperty($,"WriteStream",{get:function(){return v},set:function(a){v=a},enumerable:!0,configurable:!0});var F=P;Object.defineProperty($,"FileReadStream",{get:function(){return F},set:function(a){F=a},enumerable:!0,configurable:!0});var b=v;Object.defineProperty($,"FileWriteStream",{get:function(){return b},set:function(a){b=a},enumerable:!0,configurable:!0});function P(a,O$){if(this instanceof P)return z.apply(this,arguments),this;else return P.apply(Object.create(P.prototype),arguments)}function Z(){var a=this;v6(a.path,a.flags,a.mode,function(O$,M){if(O$){if(a.autoClose)a.destroy();a.emit("error",O$)}else a.fd=M,a.emit("open",M),a.read()})}function v(a,O$){if(this instanceof v)return L.apply(this,arguments),this;else return v.apply(Object.create(v.prototype),arguments)}function g(){var a=this;v6(a.path,a.flags,a.mode,function(O$,M){if(O$)a.destroy(),a.emit("error",O$);else a.fd=M,a.emit("open",M)})}function T(a,O$){return new $.ReadStream(a,O$)}function o$(a,O$){return new $.WriteStream(a,O$)}var e$=$.open;$.open=v6;function v6(a,O$,M,c$){if(typeof M==="function")c$=M,M=null;return l$(a,O$,M,c$);function l$(O,d,i$,x$,$6){return e$(O,d,i$,function(t$,w6){if(t$&&(t$.code==="EMFILE"||t$.code==="ENFILE"))NX([l$,[O,d,i$,x$],t$,$6||Date.now(),Date.now()]);else if(typeof x$==="function")x$.apply(this,arguments)})}}return $}function NX($){PD("ENQUEUE",$[0].name,$[1]),F6[l6].push($),IB()}var JY;function eM(){var $=Date.now();for(var D=0;D<F6[l6].length;++D)if(F6[l6][D].length>2)F6[l6][D][3]=$,F6[l6][D][4]=$;IB()}function IB(){if(clearTimeout(JY),JY=void 0,F6[l6].length===0)return;var $=F6[l6].shift(),D=$[0],X=$[1],G=$[2],J=$[3],Y=$[4];if(J===void 0)PD("RETRY",D.name,X),D.apply(null,X);else if(Date.now()-J>=60000){PD("TIMEOUT",D.name,X);var Q=X.pop();if(typeof Q==="function")Q.call(null,G)}else{var W=Date.now()-Y,I=Math.max(Y-J,1),U=Math.min(I*1.2,100);if(W>=U)PD("RETRY",D.name,X),D.apply(null,X.concat([J]));else F6[l6].push($)}if(JY===void 0)JY=setTimeout(IB,0)}});var y8=N((GE)=>{Object.defineProperty(GE,"__esModule",{value:!0});GE.regexpCode=GE.getEsmExportName=GE.getProperty=GE.safeStringify=GE.stringify=GE.strConcat=GE.addCodeArg=GE.str=GE._=GE.nil=GE._Code=GE.Name=GE.IDENTIFIER=GE._CodeOrName=void 0;class vQ{}GE._CodeOrName=vQ;GE.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class eX extends vQ{constructor($){super();if(!GE.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}}}GE.Name=eX;class H4 extends vQ{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((D,X)=>`${D}${X}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((D,X)=>{if(X instanceof eX)D[X.str]=(D[X.str]||0)+1;return D},{})}}GE._Code=H4;GE.nil=new H4("");function XE($,...D){let X=[$[0]],G=0;while(G<D.length)CH(X,D[G]),X.push($[++G]);return new H4(X)}GE._=XE;var kH=new H4("+");function JE($,...D){let X=[C8($[0])],G=0;while(G<D.length)X.push(kH),CH(X,D[G]),X.push(kH,C8($[++G]));return Zo(X),new H4(X)}GE.str=JE;function CH($,D){if(D instanceof H4)$.push(...D._items);else if(D instanceof eX)$.push(D);else $.push(ko(D))}GE.addCodeArg=CH;function Zo($){let D=1;while(D<$.length-1){if($[D]===kH){let X=To($[D-1],$[D+1]);if(X!==void 0){$.splice(D-1,3,X);continue}$[D++]="+"}D++}}function To($,D){if(D==='""')return $;if($==='""')return D;if(typeof $=="string"){if(D instanceof eX||$[$.length-1]!=='"')return;if(typeof D!="string")return`${$.slice(0,-1)}${D}"`;if(D[0]==='"')return $.slice(0,-1)+D.slice(1);return}if(typeof D=="string"&&D[0]==='"'&&!($ instanceof eX))return`"${$}${D.slice(1)}`;return}function vo($,D){return D.emptyStr()?$:$.emptyStr()?D:JE`${$}${D}`}GE.strConcat=vo;function ko($){return typeof $=="number"||typeof $=="boolean"||$===null?$:C8(Array.isArray($)?$.join(","):$)}function Co($){return new H4(C8($))}GE.stringify=Co;function C8($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}GE.safeStringify=C8;function yo($){return typeof $=="string"&&GE.IDENTIFIER.test($)?new H4(`.${$}`):XE`[${$}]`}GE.getProperty=yo;function go($){if(typeof $=="string"&&GE.IDENTIFIER.test($))return new H4(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}GE.getEsmExportName=go;function xo($){return new H4($.toString())}GE.regexpCode=xo});var hH=N((IE)=>{Object.defineProperty(IE,"__esModule",{value:!0});IE.ValueScope=IE.ValueScopeName=IE.Scope=IE.varKinds=IE.UsedValueState=void 0;var A1=y8();class QE extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var CQ;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(CQ||(IE.UsedValueState=CQ={}));IE.varKinds={const:new A1.Name("const"),let:new A1.Name("let"),var:new A1.Name("var")};class gH{constructor({prefixes:$,parent:D}={}){this._names={},this._prefixes=$,this._parent=D}toName($){return $ instanceof A1.Name?$:this.name($)}name($){return new A1.Name(this._newName($))}_newName($){let D=this._names[$]||this._nameGroup($);return`${$}${D.index++}`}_nameGroup($){var D,X;if(((X=(D=this._parent)===null||D===void 0?void 0:D._prefixes)===null||X===void 0?void 0:X.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}IE.Scope=gH;class xH extends A1.Name{constructor($,D){super(D);this.prefix=$}setValue($,{property:D,itemIndex:X}){this.value=$,this.scopePath=A1._`.${new A1.Name(D)}[${X}]`}}IE.ValueScopeName=xH;var ao=A1._`\n`;class WE extends gH{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?ao:A1.nil}}get(){return this._scope}name($){return new xH($,this._newName($))}value($,D){var X;if(D.ref===void 0)throw Error("CodeGen: ref must be passed in value");let G=this.toName($),{prefix:J}=G,Y=(X=D.key)!==null&&X!==void 0?X:D.ref,Q=this._values[J];if(Q){let U=Q.get(Y);if(U)return U}else Q=this._values[J]=new Map;Q.set(Y,G);let W=this._scope[J]||(this._scope[J]=[]),I=W.length;return W[I]=D.ref,G.setValue(D,{property:J,itemIndex:I}),G}getValue($,D){let X=this._values[$];if(!X)return;return X.get(D)}scopeRefs($,D=this._values){return this._reduceValues(D,(X)=>{if(X.scopePath===void 0)throw Error(`CodeGen: name "${X}" has no value`);return A1._`${$}${X.scopePath}`})}scopeCode($=this._values,D,X){return this._reduceValues($,(G)=>{if(G.value===void 0)throw Error(`CodeGen: name "${G}" has no value`);return G.value.code},D,X)}_reduceValues($,D,X={},G){let J=A1.nil;for(let Y in $){let Q=$[Y];if(!Q)continue;let W=X[Y]=X[Y]||new Map;Q.forEach((I)=>{if(W.has(I))return;W.set(I,CQ.Started);let U=D(I);if(U){let B=this.opts.es5?IE.varKinds.var:IE.varKinds.const;J=A1._`${J}${B} ${I} = ${U};${this.opts._n}`}else if(U=G===null||G===void 0?void 0:G(I))J=A1._`${J}${U}${this.opts._n}`;else throw new QE(I);W.set(I,CQ.Completed)})}return J}}IE.ValueScope=WE});var F$=N((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.or=M1.and=M1.not=M1.CodeGen=M1.operators=M1.varKinds=M1.ValueScopeName=M1.ValueScope=M1.Scope=M1.Name=M1.regexpCode=M1.stringify=M1.getProperty=M1.nil=M1.strConcat=M1.str=M1._=void 0;var E$=y8(),K4=hH(),i0=y8();Object.defineProperty(M1,"_",{enumerable:!0,get:function(){return i0._}});Object.defineProperty(M1,"str",{enumerable:!0,get:function(){return i0.str}});Object.defineProperty(M1,"strConcat",{enumerable:!0,get:function(){return i0.strConcat}});Object.defineProperty(M1,"nil",{enumerable:!0,get:function(){return i0.nil}});Object.defineProperty(M1,"getProperty",{enumerable:!0,get:function(){return i0.getProperty}});Object.defineProperty(M1,"stringify",{enumerable:!0,get:function(){return i0.stringify}});Object.defineProperty(M1,"regexpCode",{enumerable:!0,get:function(){return i0.regexpCode}});Object.defineProperty(M1,"Name",{enumerable:!0,get:function(){return i0.Name}});var fQ=hH();Object.defineProperty(M1,"Scope",{enumerable:!0,get:function(){return fQ.Scope}});Object.defineProperty(M1,"ValueScope",{enumerable:!0,get:function(){return fQ.ValueScope}});Object.defineProperty(M1,"ValueScopeName",{enumerable:!0,get:function(){return fQ.ValueScopeName}});Object.defineProperty(M1,"varKinds",{enumerable:!0,get:function(){return fQ.varKinds}});M1.operators={GT:new E$._Code(">"),GTE:new E$._Code(">="),LT:new E$._Code("<"),LTE:new E$._Code("<="),EQ:new E$._Code("==="),NEQ:new E$._Code("!=="),NOT:new E$._Code("!"),OR:new E$._Code("||"),AND:new E$._Code("&&"),ADD:new E$._Code("+")};class p0{optimizeNodes(){return this}optimizeNames($,D){return this}}class BE extends p0{constructor($,D,X){super();this.varKind=$,this.name=D,this.rhs=X}render({es5:$,_n:D}){let X=$?K4.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${G};`+D}optimizeNames($,D){if(!$[this.name.str])return;if(this.rhs)this.rhs=DJ(this.rhs,$,D);return this}get names(){return this.rhs instanceof E$._CodeOrName?this.rhs.names:{}}}class mH extends p0{constructor($,D,X){super();this.lhs=$,this.rhs=D,this.sideEffects=X}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,D){if(this.lhs instanceof E$.Name&&!$[this.lhs.str]&&!this.sideEffects)return;return this.rhs=DJ(this.rhs,$,D),this}get names(){let $=this.lhs instanceof E$.Name?{}:{...this.lhs.names};return uQ($,this.rhs)}}class zE extends mH{constructor($,D,X,G){super($,X,G);this.op=D}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class qE extends p0{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class HE extends p0{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class KE extends p0{constructor($){super();this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class VE extends p0{constructor($){super();this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,D){return this.code=DJ(this.code,$,D),this}get names(){return this.code instanceof E$._CodeOrName?this.code.names:{}}}class mQ extends p0{constructor($=[]){super();this.nodes=$}render($){return this.nodes.reduce((D,X)=>D+X.render($),"")}optimizeNodes(){let{nodes:$}=this,D=$.length;while(D--){let X=$[D].optimizeNodes();if(Array.isArray(X))$.splice(D,1,...X);else if(X)$[D]=X;else $.splice(D,1)}return $.length>0?this:void 0}optimizeNames($,D){let{nodes:X}=this,G=X.length;while(G--){let J=X[G];if(J.optimizeNames($,D))continue;Dt($,J.names),X.splice(G,1)}return X.length>0?this:void 0}get names(){return this.nodes.reduce(($,D)=>fD($,D.names),{})}}class r0 extends mQ{render($){return"{"+$._n+super.render($)+"}"+$._n}}class wE extends mQ{}class g8 extends r0{}g8.kind="else";class Y0 extends r0{constructor($,D){super(D);this.condition=$}render($){let D=`if(${this.condition})`+super.render($);if(this.else)D+="else "+this.else.render($);return D}optimizeNodes(){super.optimizeNodes();let $=this.condition;if($===!0)return this.nodes;let D=this.else;if(D){let X=D.optimizeNodes();D=this.else=Array.isArray(X)?new g8(X):X}if(D){if($===!1)return D instanceof Y0?D:D.nodes;if(this.nodes.length)return this;return new Y0(jE($),D instanceof Y0?[D]:D.nodes)}if($===!1||!this.nodes.length)return;return this}optimizeNames($,D){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames($,D),!(super.optimizeNames($,D)||this.else))return;return this.condition=DJ(this.condition,$,D),this}get names(){let $=super.names;if(uQ($,this.condition),this.else)fD($,this.else.names);return $}}Y0.kind="if";class $J extends r0{}$J.kind="for";class LE extends $J{constructor($){super();this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,D){if(!super.optimizeNames($,D))return;return this.iteration=DJ(this.iteration,$,D),this}get names(){return fD(super.names,this.iteration.names)}}class OE extends $J{constructor($,D,X,G){super();this.varKind=$,this.name=D,this.from=X,this.to=G}render($){let D=$.es5?K4.varKinds.var:this.varKind,{name:X,from:G,to:J}=this;return`for(${D} ${X}=${G}; ${X}<${J}; ${X}++)`+super.render($)}get names(){let $=uQ(super.names,this.from);return uQ($,this.to)}}class uH extends $J{constructor($,D,X,G){super();this.loop=$,this.varKind=D,this.name=X,this.iterable=G}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,D){if(!super.optimizeNames($,D))return;return this.iterable=DJ(this.iterable,$,D),this}get names(){return fD(super.names,this.iterable.names)}}class yQ extends r0{constructor($,D,X){super();this.name=$,this.args=D,this.async=X}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}yQ.kind="func";class gQ extends mQ{render($){return"return "+super.render($)}}gQ.kind="return";class FE extends r0{render($){let D="try"+super.render($);if(this.catch)D+=this.catch.render($);if(this.finally)D+=this.finally.render($);return D}optimizeNodes(){var $,D;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames($,D){var X,G;return super.optimizeNames($,D),(X=this.catch)===null||X===void 0||X.optimizeNames($,D),(G=this.finally)===null||G===void 0||G.optimizeNames($,D),this}get names(){let $=super.names;if(this.catch)fD($,this.catch.names);if(this.finally)fD($,this.finally.names);return $}}class xQ extends r0{constructor($){super();this.error=$}render($){return`catch(${this.error})`+super.render($)}}xQ.kind="catch";class hQ extends r0{render($){return"finally"+super.render($)}}hQ.kind="finally";class bE{constructor($,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.lines?`
96
- `:""},this._extScope=$,this._scope=new K4.Scope({parent:$}),this._nodes=[new wE]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,D){let X=this._extScope.value($,D);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue($,D){return this._extScope.getValue($,D)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,D,X,G){let J=this._scope.toName(D);if(X!==void 0&&G)this._constants[J.str]=X;return this._leafNode(new BE($,J,X)),J}const($,D,X){return this._def(K4.varKinds.const,$,D,X)}let($,D,X){return this._def(K4.varKinds.let,$,D,X)}var($,D,X){return this._def(K4.varKinds.var,$,D,X)}assign($,D,X){return this._leafNode(new mH($,D,X))}add($,D){return this._leafNode(new zE($,M1.operators.ADD,D))}code($){if(typeof $=="function")$();else if($!==E$.nil)this._leafNode(new VE($));return this}object(...$){let D=["{"];for(let[X,G]of $){if(D.length>1)D.push(",");if(D.push(X),X!==G||this.opts.es5)D.push(":"),(0,E$.addCodeArg)(D,G)}return D.push("}"),new E$._Code(D)}if($,D,X){if(this._blockNode(new Y0($)),D&&X)this.code(D).else().code(X).endIf();else if(D)this.code(D).endIf();else if(X)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new Y0($))}else(){return this._elseNode(new g8)}endIf(){return this._endBlockNode(Y0,g8)}_for($,D){if(this._blockNode($),D)this.code(D).endFor();return this}for($,D){return this._for(new LE($),D)}forRange($,D,X,G,J=this.opts.es5?K4.varKinds.var:K4.varKinds.let){let Y=this._scope.toName($);return this._for(new OE(J,Y,D,X),()=>G(Y))}forOf($,D,X,G=K4.varKinds.const){let J=this._scope.toName($);if(this.opts.es5){let Y=D instanceof E$.Name?D:this.var("_arr",D);return this.forRange("_i",0,E$._`${Y}.length`,(Q)=>{this.var(J,E$._`${Y}[${Q}]`),X(J)})}return this._for(new uH("of",G,J,D),()=>X(J))}forIn($,D,X,G=this.opts.es5?K4.varKinds.var:K4.varKinds.const){if(this.opts.ownProperties)return this.forOf($,E$._`Object.keys(${D})`,X);let J=this._scope.toName($);return this._for(new uH("in",G,J,D),()=>X(J))}endFor(){return this._endBlockNode($J)}label($){return this._leafNode(new qE($))}break($){return this._leafNode(new HE($))}return($){let D=new gQ;if(this._blockNode(D),this.code($),D.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(gQ)}try($,D,X){if(!D&&!X)throw Error('CodeGen: "try" without "catch" and "finally"');let G=new FE;if(this._blockNode(G),this.code($),D){let J=this.name("e");this._currNode=G.catch=new xQ(J),D(J)}if(X)this._currNode=G.finally=new hQ,this.code(X);return this._endBlockNode(xQ,hQ)}throw($){return this._leafNode(new KE($))}block($,D){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(D);return this}endBlock($){let D=this._blockStarts.pop();if(D===void 0)throw Error("CodeGen: not in self-balancing block");let X=this._nodes.length-D;if(X<0||$!==void 0&&X!==$)throw Error(`CodeGen: wrong number of nodes: ${X} vs ${$} expected`);return this._nodes.length=D,this}func($,D=E$.nil,X,G){if(this._blockNode(new yQ($,D,X)),G)this.code(G).endFunc();return this}endFunc(){return this._endBlockNode(yQ)}optimize($=1){while($-- >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($,D){let X=this._currNode;if(X instanceof $||D&&X instanceof D)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${D?`${$.kind}/${D.kind}`:$.kind}"`)}_elseNode($){let D=this._currNode;if(!(D instanceof Y0))throw Error('CodeGen: "else" without "if"');return this._currNode=D.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let D=this._nodes;D[D.length-1]=$}}M1.CodeGen=bE;function fD($,D){for(let X in D)$[X]=($[X]||0)+(D[X]||0);return $}function uQ($,D){return D instanceof E$._CodeOrName?fD($,D.names):$}function DJ($,D,X){if($ instanceof E$.Name)return G($);if(!J($))return $;return new E$._Code($._items.reduce((Y,Q)=>{if(Q instanceof E$.Name)Q=G(Q);if(Q instanceof E$._Code)Y.push(...Q._items);else Y.push(Q);return Y},[]));function G(Y){let Q=X[Y.str];if(Q===void 0||D[Y.str]!==1)return Y;return delete D[Y.str],Q}function J(Y){return Y instanceof E$._Code&&Y._items.some((Q)=>Q instanceof E$.Name&&D[Q.str]===1&&X[Q.str]!==void 0)}}function Dt($,D){for(let X in D)$[X]=($[X]||0)-(D[X]||0)}function jE($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:E$._`!${fH($)}`}M1.not=jE;var Xt=AE(M1.operators.AND);function Jt(...$){return $.reduce(Xt)}M1.and=Jt;var Gt=AE(M1.operators.OR);function Yt(...$){return $.reduce(Gt)}M1.or=Yt;function AE($){return(D,X)=>D===E$.nil?X:X===E$.nil?D:E$._`${fH(D)} ${$} ${fH(X)}`}function fH($){return $ instanceof E$.Name?$:E$._`(${$})`}});var Z$=N((TE)=>{Object.defineProperty(TE,"__esModule",{value:!0});TE.checkStrictMode=TE.getErrorPath=TE.Type=TE.useFunc=TE.setEvaluated=TE.evaluatedPropsToName=TE.mergeEvaluated=TE.eachItem=TE.unescapeJsonPointer=TE.escapeJsonPointer=TE.escapeFragment=TE.unescapeFragment=TE.schemaRefOrVal=TE.schemaHasRulesButRef=TE.schemaHasRules=TE.checkUnknownRules=TE.alwaysValidSchema=TE.toHash=void 0;var J6=F$(),Ut=y8();function Bt($){let D={};for(let X of $)D[X]=!0;return D}TE.toHash=Bt;function zt($,D){if(typeof D=="boolean")return D;if(Object.keys(D).length===0)return!0;return _E($,D),!NE(D,$.self.RULES.all)}TE.alwaysValidSchema=zt;function _E($,D=$.schema){let{opts:X,self:G}=$;if(!X.strictSchema)return;if(typeof D==="boolean")return;let J=G.RULES.keywords;for(let Y in D)if(!J[Y])ZE($,`unknown keyword: "${Y}"`)}TE.checkUnknownRules=_E;function NE($,D){if(typeof $=="boolean")return!$;for(let X in $)if(D[X])return!0;return!1}TE.schemaHasRules=NE;function qt($,D){if(typeof $=="boolean")return!$;for(let X in $)if(X!=="$ref"&&D.all[X])return!0;return!1}TE.schemaHasRulesButRef=qt;function Ht({topSchemaRef:$,schemaPath:D},X,G,J){if(!J){if(typeof X=="number"||typeof X=="boolean")return X;if(typeof X=="string")return J6._`${X}`}return J6._`${$}${D}${(0,J6.getProperty)(G)}`}TE.schemaRefOrVal=Ht;function Kt($){return RE(decodeURIComponent($))}TE.unescapeFragment=Kt;function Vt($){return encodeURIComponent(lH($))}TE.escapeFragment=Vt;function lH($){if(typeof $=="number")return`${$}`;return $.replace(/~/g,"~0").replace(/\//g,"~1")}TE.escapeJsonPointer=lH;function RE($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}TE.unescapeJsonPointer=RE;function wt($,D){if(Array.isArray($))for(let X of $)D(X);else D($)}TE.eachItem=wt;function SE({mergeNames:$,mergeToName:D,mergeValues:X,resultToName:G}){return(J,Y,Q,W)=>{let I=Q===void 0?Y:Q instanceof J6.Name?(Y instanceof J6.Name?$(J,Y,Q):D(J,Y,Q),Q):Y instanceof J6.Name?(D(J,Q,Y),Y):X(Y,Q);return W===J6.Name&&!(I instanceof J6.Name)?G(J,I):I}}TE.mergeEvaluated={props:SE({mergeNames:($,D,X)=>$.if(J6._`${X} !== true && ${D} !== undefined`,()=>{$.if(J6._`${D} === true`,()=>$.assign(X,!0),()=>$.assign(X,J6._`${X} || {}`).code(J6._`Object.assign(${X}, ${D})`))}),mergeToName:($,D,X)=>$.if(J6._`${X} !== true`,()=>{if(D===!0)$.assign(X,!0);else $.assign(X,J6._`${X} || {}`),iH($,X,D)}),mergeValues:($,D)=>$===!0?!0:{...$,...D},resultToName:EE}),items:SE({mergeNames:($,D,X)=>$.if(J6._`${X} !== true && ${D} !== undefined`,()=>$.assign(X,J6._`${D} === true ? true : ${X} > ${D} ? ${X} : ${D}`)),mergeToName:($,D,X)=>$.if(J6._`${X} !== true`,()=>$.assign(X,D===!0?!0:J6._`${X} > ${D} ? ${X} : ${D}`)),mergeValues:($,D)=>$===!0?!0:Math.max($,D),resultToName:($,D)=>$.var("items",D)})};function EE($,D){if(D===!0)return $.var("props",!0);let X=$.var("props",J6._`{}`);if(D!==void 0)iH($,X,D);return X}TE.evaluatedPropsToName=EE;function iH($,D,X){Object.keys(X).forEach((G)=>$.assign(J6._`${D}${(0,J6.getProperty)(G)}`,!0))}TE.setEvaluated=iH;var PE={};function Lt($,D){return $.scopeValue("func",{ref:D,code:PE[D.code]||(PE[D.code]=new Ut._Code(D.code))})}TE.useFunc=Lt;var cH;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(cH||(TE.Type=cH={}));function Ot($,D,X){if($ instanceof J6.Name){let G=D===cH.Num;return X?G?J6._`"[" + ${$} + "]"`:J6._`"['" + ${$} + "']"`:G?J6._`"/" + ${$}`:J6._`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return X?(0,J6.getProperty)($).toString():"/"+lH($)}TE.getErrorPath=Ot;function ZE($,D,X=$.opts.strictSchema){if(!X)return;if(D=`strict mode: ${D}`,X===!0)throw Error(D);$.self.logger.warn(D)}TE.checkStrictMode=ZE});var Q0=N((kE)=>{Object.defineProperty(kE,"__esModule",{value:!0});var J1=F$(),gt={data:new J1.Name("data"),valCxt:new J1.Name("valCxt"),instancePath:new J1.Name("instancePath"),parentData:new J1.Name("parentData"),parentDataProperty:new J1.Name("parentDataProperty"),rootData:new J1.Name("rootData"),dynamicAnchors:new J1.Name("dynamicAnchors"),vErrors:new J1.Name("vErrors"),errors:new J1.Name("errors"),this:new J1.Name("this"),self:new J1.Name("self"),scope:new J1.Name("scope"),json:new J1.Name("json"),jsonPos:new J1.Name("jsonPos"),jsonLen:new J1.Name("jsonLen"),jsonPart:new J1.Name("jsonPart")};kE.default=gt});var x8=N((xE)=>{Object.defineProperty(xE,"__esModule",{value:!0});xE.extendErrors=xE.resetErrorsCount=xE.reportExtraError=xE.reportError=xE.keyword$DataError=xE.keywordError=void 0;var T$=F$(),lQ=Z$(),B1=Q0();xE.keywordError={message:({keyword:$})=>T$.str`must pass "${$}" keyword validation`};xE.keyword$DataError={message:({keyword:$,schemaType:D})=>D?T$.str`"${$}" keyword must be ${D} ($data)`:T$.str`"${$}" keyword is invalid ($data)`};function ht($,D=xE.keywordError,X,G){let{it:J}=$,{gen:Y,compositeRule:Q,allErrors:W}=J,I=gE($,D,X);if(G!==null&&G!==void 0?G:Q||W)CE(Y,I);else yE(J,T$._`[${I}]`)}xE.reportError=ht;function ut($,D=xE.keywordError,X){let{it:G}=$,{gen:J,compositeRule:Y,allErrors:Q}=G,W=gE($,D,X);if(CE(J,W),!(Y||Q))yE(G,B1.default.vErrors)}xE.reportExtraError=ut;function ft($,D){$.assign(B1.default.errors,D),$.if(T$._`${B1.default.vErrors} !== null`,()=>$.if(D,()=>$.assign(T$._`${B1.default.vErrors}.length`,D),()=>$.assign(B1.default.vErrors,null)))}xE.resetErrorsCount=ft;function mt({gen:$,keyword:D,schemaValue:X,data:G,errsCount:J,it:Y}){if(J===void 0)throw Error("ajv implementation error");let Q=$.name("err");$.forRange("i",J,B1.default.errors,(W)=>{if($.const(Q,T$._`${B1.default.vErrors}[${W}]`),$.if(T$._`${Q}.instancePath === undefined`,()=>$.assign(T$._`${Q}.instancePath`,(0,T$.strConcat)(B1.default.instancePath,Y.errorPath))),$.assign(T$._`${Q}.schemaPath`,T$.str`${Y.errSchemaPath}/${D}`),Y.opts.verbose)$.assign(T$._`${Q}.schema`,X),$.assign(T$._`${Q}.data`,G)})}xE.extendErrors=mt;function CE($,D){let X=$.const("err",D);$.if(T$._`${B1.default.vErrors} === null`,()=>$.assign(B1.default.vErrors,T$._`[${X}]`),T$._`${B1.default.vErrors}.push(${X})`),$.code(T$._`${B1.default.errors}++`)}function yE($,D){let{gen:X,validateName:G,schemaEnv:J}=$;if(J.$async)X.throw(T$._`new ${$.ValidationError}(${D})`);else X.assign(T$._`${G}.errors`,D),X.return(!1)}var mD={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 gE($,D,X){let{createErrors:G}=$.it;if(G===!1)return T$._`{}`;return ct($,D,X)}function ct($,D,X={}){let{gen:G,it:J}=$,Y=[lt(J,X),it($,X)];return pt($,D,Y),G.object(...Y)}function lt({errorPath:$},{instancePath:D}){let X=D?T$.str`${$}${(0,lQ.getErrorPath)(D,lQ.Type.Str)}`:$;return[B1.default.instancePath,(0,T$.strConcat)(B1.default.instancePath,X)]}function it({keyword:$,it:{errSchemaPath:D}},{schemaPath:X,parentSchema:G}){let J=G?D:T$.str`${D}/${$}`;if(X)J=T$.str`${J}${(0,lQ.getErrorPath)(X,lQ.Type.Str)}`;return[mD.schemaPath,J]}function pt($,{params:D,message:X},G){let{keyword:J,data:Y,schemaValue:Q,it:W}=$,{opts:I,propertyName:U,topSchemaRef:B,schemaPath:H}=W;if(G.push([mD.keyword,J],[mD.params,typeof D=="function"?D($):D||T$._`{}`]),I.messages)G.push([mD.message,typeof X=="function"?X($):X]);if(I.verbose)G.push([mD.schema,Q],[mD.parentSchema,T$._`${B}${H}`],[B1.default.data,Y]);if(U)G.push([mD.propertyName,U])}});var cE=N((fE)=>{Object.defineProperty(fE,"__esModule",{value:!0});fE.boolOrEmptySchema=fE.topBoolOrEmptySchema=void 0;var tt=x8(),at=F$(),st=Q0(),et={message:"boolean schema is false"};function $a($){let{gen:D,schema:X,validateName:G}=$;if(X===!1)uE($,!1);else if(typeof X=="object"&&X.$async===!0)D.return(st.default.data);else D.assign(at._`${G}.errors`,null),D.return(!0)}fE.topBoolOrEmptySchema=$a;function Da($,D){let{gen:X,schema:G}=$;if(G===!1)X.var(D,!1),uE($);else X.var(D,!0)}fE.boolOrEmptySchema=Da;function uE($,D){let{gen:X,data:G}=$,J={gen:X,keyword:"false schema",data:G,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:$};(0,tt.reportError)(J,et,void 0,D)}});var rH=N((lE)=>{Object.defineProperty(lE,"__esModule",{value:!0});lE.getRules=lE.isJSONType=void 0;var Ja=["string","number","integer","boolean","null","object","array"],Ga=new Set(Ja);function Ya($){return typeof $=="string"&&Ga.has($)}lE.isJSONType=Ya;function Qa(){let $={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...$,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},$.number,$.string,$.array,$.object],post:{rules:[]},all:{},keywords:{}}}lE.getRules=Qa});var nH=N((nE)=>{Object.defineProperty(nE,"__esModule",{value:!0});nE.shouldUseRule=nE.shouldUseGroup=nE.schemaHasRulesForType=void 0;function Ia({schema:$,self:D},X){let G=D.RULES.types[X];return G&&G!==!0&&pE($,G)}nE.schemaHasRulesForType=Ia;function pE($,D){return D.rules.some((X)=>rE($,X))}nE.shouldUseGroup=pE;function rE($,D){var X;return $[D.keyword]!==void 0||((X=D.definition.implements)===null||X===void 0?void 0:X.some((G)=>$[G]!==void 0))}nE.shouldUseRule=rE});var h8=N((sE)=>{Object.defineProperty(sE,"__esModule",{value:!0});sE.reportTypeError=sE.checkDataTypes=sE.checkDataType=sE.coerceAndCheckDataType=sE.getJSONTypes=sE.getSchemaTypes=sE.DataType=void 0;var za=rH(),qa=nH(),Ha=x8(),L$=F$(),oE=Z$(),XJ;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(XJ||(sE.DataType=XJ={}));function Ka($){let D=tE($.type);if(D.includes("null")){if($.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!D.length&&$.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if($.nullable===!0)D.push("null")}return D}sE.getSchemaTypes=Ka;function tE($){let D=Array.isArray($)?$:$?[$]:[];if(D.every(za.isJSONType))return D;throw Error("type must be JSONType or JSONType[]: "+D.join(","))}sE.getJSONTypes=tE;function Va($,D){let{gen:X,data:G,opts:J}=$,Y=wa(D,J.coerceTypes),Q=D.length>0&&!(Y.length===0&&D.length===1&&(0,qa.schemaHasRulesForType)($,D[0]));if(Q){let W=oH(D,G,J.strictNumbers,XJ.Wrong);X.if(W,()=>{if(Y.length)La($,D,Y);else tH($)})}return Q}sE.coerceAndCheckDataType=Va;var aE=new Set(["string","number","integer","boolean","null"]);function wa($,D){return D?$.filter((X)=>aE.has(X)||D==="array"&&X==="array"):[]}function La($,D,X){let{gen:G,data:J,opts:Y}=$,Q=G.let("dataType",L$._`typeof ${J}`),W=G.let("coerced",L$._`undefined`);if(Y.coerceTypes==="array")G.if(L$._`${Q} == 'object' && Array.isArray(${J}) && ${J}.length == 1`,()=>G.assign(J,L$._`${J}[0]`).assign(Q,L$._`typeof ${J}`).if(oH(D,J,Y.strictNumbers),()=>G.assign(W,J)));G.if(L$._`${W} !== undefined`);for(let U of X)if(aE.has(U)||U==="array"&&Y.coerceTypes==="array")I(U);G.else(),tH($),G.endIf(),G.if(L$._`${W} !== undefined`,()=>{G.assign(J,W),Oa($,W)});function I(U){switch(U){case"string":G.elseIf(L$._`${Q} == "number" || ${Q} == "boolean"`).assign(W,L$._`"" + ${J}`).elseIf(L$._`${J} === null`).assign(W,L$._`""`);return;case"number":G.elseIf(L$._`${Q} == "boolean" || ${J} === null
97
- || (${Q} == "string" && ${J} && ${J} == +${J})`).assign(W,L$._`+${J}`);return;case"integer":G.elseIf(L$._`${Q} === "boolean" || ${J} === null
98
- || (${Q} === "string" && ${J} && ${J} == +${J} && !(${J} % 1))`).assign(W,L$._`+${J}`);return;case"boolean":G.elseIf(L$._`${J} === "false" || ${J} === 0 || ${J} === null`).assign(W,!1).elseIf(L$._`${J} === "true" || ${J} === 1`).assign(W,!0);return;case"null":G.elseIf(L$._`${J} === "" || ${J} === 0 || ${J} === false`),G.assign(W,null);return;case"array":G.elseIf(L$._`${Q} === "string" || ${Q} === "number"
99
- || ${Q} === "boolean" || ${J} === null`).assign(W,L$._`[${J}]`)}}}function Oa({gen:$,parentData:D,parentDataProperty:X},G){$.if(L$._`${D} !== undefined`,()=>$.assign(L$._`${D}[${X}]`,G))}function dH($,D,X,G=XJ.Correct){let J=G===XJ.Correct?L$.operators.EQ:L$.operators.NEQ,Y;switch($){case"null":return L$._`${D} ${J} null`;case"array":Y=L$._`Array.isArray(${D})`;break;case"object":Y=L$._`${D} && typeof ${D} == "object" && !Array.isArray(${D})`;break;case"integer":Y=Q(L$._`!(${D} % 1) && !isNaN(${D})`);break;case"number":Y=Q();break;default:return L$._`typeof ${D} ${J} ${$}`}return G===XJ.Correct?Y:(0,L$.not)(Y);function Q(W=L$.nil){return(0,L$.and)(L$._`typeof ${D} == "number"`,W,X?L$._`isFinite(${D})`:L$.nil)}}sE.checkDataType=dH;function oH($,D,X,G){if($.length===1)return dH($[0],D,X,G);let J,Y=(0,oE.toHash)($);if(Y.array&&Y.object){let Q=L$._`typeof ${D} != "object"`;J=Y.null?Q:L$._`!${D} || ${Q}`,delete Y.null,delete Y.array,delete Y.object}else J=L$.nil;if(Y.number)delete Y.integer;for(let Q in Y)J=(0,L$.and)(J,dH(Q,D,X,G));return J}sE.checkDataTypes=oH;var Fa={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:D})=>typeof $=="string"?L$._`{type: ${$}}`:L$._`{type: ${D}}`};function tH($){let D=ba($);(0,Ha.reportError)(D,Fa)}sE.reportTypeError=tH;function ba($){let{gen:D,data:X,schema:G}=$,J=(0,oE.schemaRefOrVal)($,G,"type");return{gen:D,keyword:"type",data:X,schema:G.type,schemaCode:J,schemaValue:J,parentSchema:G,params:{},it:$}}});var JZ=N((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});DZ.assignDefaults=void 0;var JJ=F$(),Na=Z$();function Ra($,D){let{properties:X,items:G}=$.schema;if(D==="object"&&X)for(let J in X)$Z($,J,X[J].default);else if(D==="array"&&Array.isArray(G))G.forEach((J,Y)=>$Z($,Y,J.default))}DZ.assignDefaults=Ra;function $Z($,D,X){let{gen:G,compositeRule:J,data:Y,opts:Q}=$;if(X===void 0)return;let W=JJ._`${Y}${(0,JJ.getProperty)(D)}`;if(J){(0,Na.checkStrictMode)($,`default is ignored for: ${W}`);return}let I=JJ._`${W} === undefined`;if(Q.useDefaults==="empty")I=JJ._`${I} || ${W} === null || ${W} === ""`;G.if(I,JJ._`${W} = ${(0,JJ.stringify)(X)}`)}});var a1=N((QZ)=>{Object.defineProperty(QZ,"__esModule",{value:!0});QZ.validateUnion=QZ.validateArray=QZ.usePattern=QZ.callValidateCode=QZ.schemaProperties=QZ.allSchemaProperties=QZ.noPropertyInData=QZ.propertyInData=QZ.isOwnProperty=QZ.hasPropFunc=QZ.reportMissingProp=QZ.checkMissingProp=QZ.checkReportMissingProp=void 0;var U6=F$(),aH=Z$(),n0=Q0(),Ea=Z$();function Za($,D){let{gen:X,data:G,it:J}=$;X.if(eH(X,G,D,J.opts.ownProperties),()=>{$.setParams({missingProperty:U6._`${D}`},!0),$.error()})}QZ.checkReportMissingProp=Za;function Ta({gen:$,data:D,it:{opts:X}},G,J){return(0,U6.or)(...G.map((Y)=>(0,U6.and)(eH($,D,Y,X.ownProperties),U6._`${J} = ${Y}`)))}QZ.checkMissingProp=Ta;function va($,D){$.setParams({missingProperty:D},!0),$.error()}QZ.reportMissingProp=va;function GZ($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:U6._`Object.prototype.hasOwnProperty`})}QZ.hasPropFunc=GZ;function sH($,D,X){return U6._`${GZ($)}.call(${D}, ${X})`}QZ.isOwnProperty=sH;function ka($,D,X,G){let J=U6._`${D}${(0,U6.getProperty)(X)} !== undefined`;return G?U6._`${J} && ${sH($,D,X)}`:J}QZ.propertyInData=ka;function eH($,D,X,G){let J=U6._`${D}${(0,U6.getProperty)(X)} === undefined`;return G?(0,U6.or)(J,(0,U6.not)(sH($,D,X))):J}QZ.noPropertyInData=eH;function YZ($){return $?Object.keys($).filter((D)=>D!=="__proto__"):[]}QZ.allSchemaProperties=YZ;function Ca($,D){return YZ(D).filter((X)=>!(0,aH.alwaysValidSchema)($,D[X]))}QZ.schemaProperties=Ca;function ya({schemaCode:$,data:D,it:{gen:X,topSchemaRef:G,schemaPath:J,errorPath:Y},it:Q},W,I,U){let B=U?U6._`${$}, ${D}, ${G}${J}`:D,H=[[n0.default.instancePath,(0,U6.strConcat)(n0.default.instancePath,Y)],[n0.default.parentData,Q.parentData],[n0.default.parentDataProperty,Q.parentDataProperty],[n0.default.rootData,n0.default.rootData]];if(Q.opts.dynamicRef)H.push([n0.default.dynamicAnchors,n0.default.dynamicAnchors]);let V=U6._`${B}, ${X.object(...H)}`;return I!==U6.nil?U6._`${W}.call(${I}, ${V})`:U6._`${W}(${V})`}QZ.callValidateCode=ya;var ga=U6._`new RegExp`;function xa({gen:$,it:{opts:D}},X){let G=D.unicodeRegExp?"u":"",{regExp:J}=D.code,Y=J(X,G);return $.scopeValue("pattern",{key:Y.toString(),ref:Y,code:U6._`${J.code==="new RegExp"?ga:(0,Ea.useFunc)($,J)}(${X}, ${G})`})}QZ.usePattern=xa;function ha($){let{gen:D,data:X,keyword:G,it:J}=$,Y=D.name("valid");if(J.allErrors){let W=D.let("valid",!0);return Q(()=>D.assign(W,!1)),W}return D.var(Y,!0),Q(()=>D.break()),Y;function Q(W){let I=D.const("len",U6._`${X}.length`);D.forRange("i",0,I,(U)=>{$.subschema({keyword:G,dataProp:U,dataPropType:aH.Type.Num},Y),D.if((0,U6.not)(Y),W)})}}QZ.validateArray=ha;function ua($){let{gen:D,schema:X,keyword:G,it:J}=$;if(!Array.isArray(X))throw Error("ajv implementation error");if(X.some((I)=>(0,aH.alwaysValidSchema)(J,I))&&!J.opts.unevaluated)return;let Q=D.let("valid",!1),W=D.name("_valid");D.block(()=>X.forEach((I,U)=>{let B=$.subschema({keyword:G,schemaProp:U,compositeRule:!0},W);if(D.assign(Q,U6._`${Q} || ${W}`),!$.mergeValidEvaluated(B,W))D.if((0,U6.not)(Q))})),$.result(Q,()=>$.reset(),()=>$.error(!0))}QZ.validateUnion=ua});var qZ=N((BZ)=>{Object.defineProperty(BZ,"__esModule",{value:!0});BZ.validateKeywordUsage=BZ.validSchemaType=BZ.funcKeywordCode=BZ.macroKeywordCode=void 0;var z1=F$(),cD=Q0(),sa=a1(),ea=x8();function $s($,D){let{gen:X,keyword:G,schema:J,parentSchema:Y,it:Q}=$,W=D.macro.call(Q.self,J,Y,Q),I=UZ(X,G,W);if(Q.opts.validateSchema!==!1)Q.self.validateSchema(W,!0);let U=X.name("valid");$.subschema({schema:W,schemaPath:z1.nil,errSchemaPath:`${Q.errSchemaPath}/${G}`,topSchemaRef:I,compositeRule:!0},U),$.pass(U,()=>$.error(!0))}BZ.macroKeywordCode=$s;function Ds($,D){var X;let{gen:G,keyword:J,schema:Y,parentSchema:Q,$data:W,it:I}=$;Js(I,D);let U=!W&&D.compile?D.compile.call(I.self,Y,Q,I):D.validate,B=UZ(G,J,U),H=G.let("valid");$.block$data(H,V),$.ok((X=D.valid)!==null&&X!==void 0?X:H);function V(){if(D.errors===!1){if(F(),D.modifying)IZ($);b(()=>$.error())}else{let P=D.async?z():L();if(D.modifying)IZ($);b(()=>Xs($,P))}}function z(){let P=G.let("ruleErrs",null);return G.try(()=>F(z1._`await `),(Z)=>G.assign(H,!1).if(z1._`${Z} instanceof ${I.ValidationError}`,()=>G.assign(P,z1._`${Z}.errors`),()=>G.throw(Z))),P}function L(){let P=z1._`${B}.errors`;return G.assign(P,null),F(z1.nil),P}function F(P=D.async?z1._`await `:z1.nil){let Z=I.opts.passContext?cD.default.this:cD.default.self,v=!(("compile"in D)&&!W||D.schema===!1);G.assign(H,z1._`${P}${(0,sa.callValidateCode)($,B,Z,v)}`,D.modifying)}function b(P){var Z;G.if((0,z1.not)((Z=D.valid)!==null&&Z!==void 0?Z:H),P)}}BZ.funcKeywordCode=Ds;function IZ($){let{gen:D,data:X,it:G}=$;D.if(G.parentData,()=>D.assign(X,z1._`${G.parentData}[${G.parentDataProperty}]`))}function Xs($,D){let{gen:X}=$;X.if(z1._`Array.isArray(${D})`,()=>{X.assign(cD.default.vErrors,z1._`${cD.default.vErrors} === null ? ${D} : ${cD.default.vErrors}.concat(${D})`).assign(cD.default.errors,z1._`${cD.default.vErrors}.length`),(0,ea.extendErrors)($)},()=>$.error())}function Js({schemaEnv:$},D){if(D.async&&!$.$async)throw Error("async keyword in sync schema")}function UZ($,D,X){if(X===void 0)throw Error(`keyword "${D}" failed to compile`);return $.scopeValue("keyword",typeof X=="function"?{ref:X}:{ref:X,code:(0,z1.stringify)(X)})}function Gs($,D,X=!1){return!D.length||D.some((G)=>G==="array"?Array.isArray($):G==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==G||X&&typeof $>"u")}BZ.validSchemaType=Gs;function Ys({schema:$,opts:D,self:X,errSchemaPath:G},J,Y){if(Array.isArray(J.keyword)?!J.keyword.includes(Y):J.keyword!==Y)throw Error("ajv implementation error");let Q=J.dependencies;if(Q===null||Q===void 0?void 0:Q.some((W)=>!Object.prototype.hasOwnProperty.call($,W)))throw Error(`parent schema must have dependencies of ${Y}: ${Q.join(",")}`);if(J.validateSchema){if(!J.validateSchema($[Y])){let I=`keyword "${Y}" value is invalid at path "${G}": `+X.errorsText(J.validateSchema.errors);if(D.validateSchema==="log")X.logger.error(I);else throw Error(I)}}}BZ.validateKeywordUsage=Ys});var wZ=N((KZ)=>{Object.defineProperty(KZ,"__esModule",{value:!0});KZ.extendSubschemaMode=KZ.extendSubschemaData=KZ.getSubschema=void 0;var C4=F$(),HZ=Z$();function Us($,{keyword:D,schemaProp:X,schema:G,schemaPath:J,errSchemaPath:Y,topSchemaRef:Q}){if(D!==void 0&&G!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(D!==void 0){let W=$.schema[D];return X===void 0?{schema:W,schemaPath:C4._`${$.schemaPath}${(0,C4.getProperty)(D)}`,errSchemaPath:`${$.errSchemaPath}/${D}`}:{schema:W[X],schemaPath:C4._`${$.schemaPath}${(0,C4.getProperty)(D)}${(0,C4.getProperty)(X)}`,errSchemaPath:`${$.errSchemaPath}/${D}/${(0,HZ.escapeFragment)(X)}`}}if(G!==void 0){if(J===void 0||Y===void 0||Q===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:G,schemaPath:J,topSchemaRef:Q,errSchemaPath:Y}}throw Error('either "keyword" or "schema" must be passed')}KZ.getSubschema=Us;function Bs($,D,{dataProp:X,dataPropType:G,data:J,dataTypes:Y,propertyName:Q}){if(J!==void 0&&X!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:W}=D;if(X!==void 0){let{errorPath:U,dataPathArr:B,opts:H}=D,V=W.let("data",C4._`${D.data}${(0,C4.getProperty)(X)}`,!0);I(V),$.errorPath=C4.str`${U}${(0,HZ.getErrorPath)(X,G,H.jsPropertySyntax)}`,$.parentDataProperty=C4._`${X}`,$.dataPathArr=[...B,$.parentDataProperty]}if(J!==void 0){let U=J instanceof C4.Name?J:W.let("data",J,!0);if(I(U),Q!==void 0)$.propertyName=Q}if(Y)$.dataTypes=Y;function I(U){$.data=U,$.dataLevel=D.dataLevel+1,$.dataTypes=[],D.definedProperties=new Set,$.parentData=D.data,$.dataNames=[...D.dataNames,U]}}KZ.extendSubschemaData=Bs;function zs($,{jtdDiscriminator:D,jtdMetadata:X,compositeRule:G,createErrors:J,allErrors:Y}){if(G!==void 0)$.compositeRule=G;if(J!==void 0)$.createErrors=J;if(Y!==void 0)$.allErrors=Y;$.jtdDiscriminator=D,$.jtdMetadata=X}KZ.extendSubschemaMode=zs});var $5=N((qq$,LZ)=>{LZ.exports=function $(D,X){if(D===X)return!0;if(D&&X&&typeof D=="object"&&typeof X=="object"){if(D.constructor!==X.constructor)return!1;var G,J,Y;if(Array.isArray(D)){if(G=D.length,G!=X.length)return!1;for(J=G;J--!==0;)if(!$(D[J],X[J]))return!1;return!0}if(D.constructor===RegExp)return D.source===X.source&&D.flags===X.flags;if(D.valueOf!==Object.prototype.valueOf)return D.valueOf()===X.valueOf();if(D.toString!==Object.prototype.toString)return D.toString()===X.toString();if(Y=Object.keys(D),G=Y.length,G!==Object.keys(X).length)return!1;for(J=G;J--!==0;)if(!Object.prototype.hasOwnProperty.call(X,Y[J]))return!1;for(J=G;J--!==0;){var Q=Y[J];if(!$(D[Q],X[Q]))return!1}return!0}return D!==D&&X!==X}});var FZ=N((Hq$,OZ)=>{var d0=OZ.exports=function($,D,X){if(typeof D=="function")X=D,D={};X=D.cb||X;var G=typeof X=="function"?X:X.pre||function(){},J=X.post||function(){};iQ(D,G,J,$,"",$)};d0.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};d0.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};d0.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};d0.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 iQ($,D,X,G,J,Y,Q,W,I,U){if(G&&typeof G=="object"&&!Array.isArray(G)){D(G,J,Y,Q,W,I,U);for(var B in G){var H=G[B];if(Array.isArray(H)){if(B in d0.arrayKeywords)for(var V=0;V<H.length;V++)iQ($,D,X,H[V],J+"/"+B+"/"+V,Y,J,B,G,V)}else if(B in d0.propsKeywords){if(H&&typeof H=="object")for(var z in H)iQ($,D,X,H[z],J+"/"+B+"/"+Ks(z),Y,J,B,G,z)}else if(B in d0.keywords||$.allKeys&&!(B in d0.skipKeywords))iQ($,D,X,H,J+"/"+B,Y,J,B,G)}X(G,J,Y,Q,W,I,U)}}function Ks($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}});var u8=N((MZ)=>{Object.defineProperty(MZ,"__esModule",{value:!0});MZ.getSchemaRefs=MZ.resolveUrl=MZ.normalizeId=MZ._getFullPath=MZ.getFullPath=MZ.inlineRef=void 0;var Vs=Z$(),ws=$5(),Ls=FZ(),Os=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Fs($,D=!0){if(typeof $=="boolean")return!0;if(D===!0)return!D5($);if(!D)return!1;return bZ($)<=D}MZ.inlineRef=Fs;var bs=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function D5($){for(let D in $){if(bs.has(D))return!0;let X=$[D];if(Array.isArray(X)&&X.some(D5))return!0;if(typeof X=="object"&&D5(X))return!0}return!1}function bZ($){let D=0;for(let X in $){if(X==="$ref")return 1/0;if(D++,Os.has(X))continue;if(typeof $[X]=="object")(0,Vs.eachItem)($[X],(G)=>D+=bZ(G));if(D===1/0)return 1/0}return D}function jZ($,D="",X){if(X!==!1)D=GJ(D);let G=$.parse(D);return AZ($,G)}MZ.getFullPath=jZ;function AZ($,D){return $.serialize(D).split("#")[0]+"#"}MZ._getFullPath=AZ;var js=/#\/?$/;function GJ($){return $?$.replace(js,""):""}MZ.normalizeId=GJ;function As($,D,X){return X=GJ(X),$.resolve(D,X)}MZ.resolveUrl=As;var Ms=/^[a-z_][-a-z0-9._]*$/i;function Ss($,D){if(typeof $=="boolean")return{};let{schemaId:X,uriResolver:G}=this.opts,J=GJ($[X]||D),Y={"":J},Q=jZ(G,J,!1),W={},I=new Set;return Ls($,{allKeys:!0},(H,V,z,L)=>{if(L===void 0)return;let F=Q+V,b=Y[L];if(typeof H[X]=="string")b=P.call(this,H[X]);Z.call(this,H.$anchor),Z.call(this,H.$dynamicAnchor),Y[V]=b;function P(v){let g=this.opts.uriResolver.resolve;if(v=GJ(b?g(b,v):v),I.has(v))throw B(v);I.add(v);let T=this.refs[v];if(typeof T=="string")T=this.refs[T];if(typeof T=="object")U(H,T.schema,v);else if(v!==GJ(F))if(v[0]==="#")U(H,W[v],v),W[v]=H;else this.refs[v]=F;return v}function Z(v){if(typeof v=="string"){if(!Ms.test(v))throw Error(`invalid anchor "${v}"`);P.call(this,`#${v}`)}}}),W;function U(H,V,z){if(V!==void 0&&!ws(H,V))throw B(z)}function B(H){return Error(`reference "${H}" resolves to more than one schema`)}}MZ.getSchemaRefs=Ss});var c8=N((uZ)=>{Object.defineProperty(uZ,"__esModule",{value:!0});uZ.getData=uZ.KeywordCxt=uZ.validateFunctionCode=void 0;var EZ=cE(),PZ=h8(),J5=nH(),pQ=h8(),Zs=JZ(),m8=qZ(),X5=wZ(),$$=F$(),z$=Q0(),Ts=u8(),W0=Z$(),f8=x8();function vs($){if(vZ($)){if(kZ($),TZ($)){ys($);return}}ZZ($,()=>(0,EZ.topBoolOrEmptySchema)($))}uZ.validateFunctionCode=vs;function ZZ({gen:$,validateName:D,schema:X,schemaEnv:G,opts:J},Y){if(J.code.es5)$.func(D,$$._`${z$.default.data}, ${z$.default.valCxt}`,G.$async,()=>{$.code($$._`"use strict"; ${_Z(X,J)}`),Cs($,J),$.code(Y)});else $.func(D,$$._`${z$.default.data}, ${ks(J)}`,G.$async,()=>$.code(_Z(X,J)).code(Y))}function ks($){return $$._`{${z$.default.instancePath}="", ${z$.default.parentData}, ${z$.default.parentDataProperty}, ${z$.default.rootData}=${z$.default.data}${$.dynamicRef?$$._`, ${z$.default.dynamicAnchors}={}`:$$.nil}}={}`}function Cs($,D){$.if(z$.default.valCxt,()=>{if($.var(z$.default.instancePath,$$._`${z$.default.valCxt}.${z$.default.instancePath}`),$.var(z$.default.parentData,$$._`${z$.default.valCxt}.${z$.default.parentData}`),$.var(z$.default.parentDataProperty,$$._`${z$.default.valCxt}.${z$.default.parentDataProperty}`),$.var(z$.default.rootData,$$._`${z$.default.valCxt}.${z$.default.rootData}`),D.dynamicRef)$.var(z$.default.dynamicAnchors,$$._`${z$.default.valCxt}.${z$.default.dynamicAnchors}`)},()=>{if($.var(z$.default.instancePath,$$._`""`),$.var(z$.default.parentData,$$._`undefined`),$.var(z$.default.parentDataProperty,$$._`undefined`),$.var(z$.default.rootData,z$.default.data),D.dynamicRef)$.var(z$.default.dynamicAnchors,$$._`{}`)})}function ys($){let{schema:D,opts:X,gen:G}=$;ZZ($,()=>{if(X.$comment&&D.$comment)yZ($);if(fs($),G.let(z$.default.vErrors,null),G.let(z$.default.errors,0),X.unevaluated)gs($);CZ($),ls($)});return}function gs($){let{gen:D,validateName:X}=$;$.evaluated=D.const("evaluated",$$._`${X}.evaluated`),D.if($$._`${$.evaluated}.dynamicProps`,()=>D.assign($$._`${$.evaluated}.props`,$$._`undefined`)),D.if($$._`${$.evaluated}.dynamicItems`,()=>D.assign($$._`${$.evaluated}.items`,$$._`undefined`))}function _Z($,D){let X=typeof $=="object"&&$[D.schemaId];return X&&(D.code.source||D.code.process)?$$._`/*# sourceURL=${X} */`:$$.nil}function xs($,D){if(vZ($)){if(kZ($),TZ($)){hs($,D);return}}(0,EZ.boolOrEmptySchema)($,D)}function TZ({schema:$,self:D}){if(typeof $=="boolean")return!$;for(let X in $)if(D.RULES.all[X])return!0;return!1}function vZ($){return typeof $.schema!="boolean"}function hs($,D){let{schema:X,gen:G,opts:J}=$;if(J.$comment&&X.$comment)yZ($);ms($),cs($);let Y=G.const("_errs",z$.default.errors);CZ($,Y),G.var(D,$$._`${Y} === ${z$.default.errors}`)}function kZ($){(0,W0.checkUnknownRules)($),us($)}function CZ($,D){if($.opts.jtd)return NZ($,[],!1,D);let X=(0,PZ.getSchemaTypes)($.schema),G=(0,PZ.coerceAndCheckDataType)($,X);NZ($,X,!G,D)}function us($){let{schema:D,errSchemaPath:X,opts:G,self:J}=$;if(D.$ref&&G.ignoreKeywordsWithRef&&(0,W0.schemaHasRulesButRef)(D,J.RULES))J.logger.warn(`$ref: keywords ignored in schema at path "${X}"`)}function fs($){let{schema:D,opts:X}=$;if(D.default!==void 0&&X.useDefaults&&X.strictSchema)(0,W0.checkStrictMode)($,"default is ignored in the schema root")}function ms($){let D=$.schema[$.opts.schemaId];if(D)$.baseId=(0,Ts.resolveUrl)($.opts.uriResolver,$.baseId,D)}function cs($){if($.schema.$async&&!$.schemaEnv.$async)throw Error("async schema in sync schema")}function yZ({gen:$,schemaEnv:D,schema:X,errSchemaPath:G,opts:J}){let Y=X.$comment;if(J.$comment===!0)$.code($$._`${z$.default.self}.logger.log(${Y})`);else if(typeof J.$comment=="function"){let Q=$$.str`${G}/$comment`,W=$.scopeValue("root",{ref:D.root});$.code($$._`${z$.default.self}.opts.$comment(${Y}, ${Q}, ${W}.schema)`)}}function ls($){let{gen:D,schemaEnv:X,validateName:G,ValidationError:J,opts:Y}=$;if(X.$async)D.if($$._`${z$.default.errors} === 0`,()=>D.return(z$.default.data),()=>D.throw($$._`new ${J}(${z$.default.vErrors})`));else{if(D.assign($$._`${G}.errors`,z$.default.vErrors),Y.unevaluated)is($);D.return($$._`${z$.default.errors} === 0`)}}function is({gen:$,evaluated:D,props:X,items:G}){if(X instanceof $$.Name)$.assign($$._`${D}.props`,X);if(G instanceof $$.Name)$.assign($$._`${D}.items`,G)}function NZ($,D,X,G){let{gen:J,schema:Y,data:Q,allErrors:W,opts:I,self:U}=$,{RULES:B}=U;if(Y.$ref&&(I.ignoreKeywordsWithRef||!(0,W0.schemaHasRulesButRef)(Y,B))){J.block(()=>xZ($,"$ref",B.all.$ref.definition));return}if(!I.jtd)ps($,D);J.block(()=>{for(let V of B.rules)H(V);H(B.post)});function H(V){if(!(0,J5.shouldUseGroup)(Y,V))return;if(V.type){if(J.if((0,pQ.checkDataType)(V.type,Q,I.strictNumbers)),RZ($,V),D.length===1&&D[0]===V.type&&X)J.else(),(0,pQ.reportTypeError)($);J.endIf()}else RZ($,V);if(!W)J.if($$._`${z$.default.errors} === ${G||0}`)}}function RZ($,D){let{gen:X,schema:G,opts:{useDefaults:J}}=$;if(J)(0,Zs.assignDefaults)($,D.type);X.block(()=>{for(let Y of D.rules)if((0,J5.shouldUseRule)(G,Y))xZ($,Y.keyword,Y.definition,D.type)})}function ps($,D){if($.schemaEnv.meta||!$.opts.strictTypes)return;if(rs($,D),!$.opts.allowUnionTypes)ns($,D);ds($,$.dataTypes)}function rs($,D){if(!D.length)return;if(!$.dataTypes.length){$.dataTypes=D;return}D.forEach((X)=>{if(!gZ($.dataTypes,X))G5($,`type "${X}" not allowed by context "${$.dataTypes.join(",")}"`)}),ts($,D)}function ns($,D){if(D.length>1&&!(D.length===2&&D.includes("null")))G5($,"use allowUnionTypes to allow union type keyword")}function ds($,D){let X=$.self.RULES.all;for(let G in X){let J=X[G];if(typeof J=="object"&&(0,J5.shouldUseRule)($.schema,J)){let{type:Y}=J.definition;if(Y.length&&!Y.some((Q)=>os(D,Q)))G5($,`missing type "${Y.join(",")}" for keyword "${G}"`)}}}function os($,D){return $.includes(D)||D==="number"&&$.includes("integer")}function gZ($,D){return $.includes(D)||D==="integer"&&$.includes("number")}function ts($,D){let X=[];for(let G of $.dataTypes)if(gZ(D,G))X.push(G);else if(D.includes("integer")&&G==="number")X.push("integer");$.dataTypes=X}function G5($,D){let X=$.schemaEnv.baseId+$.errSchemaPath;D+=` at "${X}" (strictTypes)`,(0,W0.checkStrictMode)($,D,$.opts.strictTypes)}class Y5{constructor($,D,X){if((0,m8.validateKeywordUsage)($,D,X),this.gen=$.gen,this.allErrors=$.allErrors,this.keyword=X,this.data=$.data,this.schema=$.schema[X],this.$data=D.$data&&$.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,W0.schemaRefOrVal)($,this.schema,X,this.$data),this.schemaType=D.schemaType,this.parentSchema=$.schema,this.params={},this.it=$,this.def=D,this.$data)this.schemaCode=$.gen.const("vSchema",hZ(this.$data,$));else if(this.schemaCode=this.schemaValue,!(0,m8.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw Error(`${X} value must be ${JSON.stringify(D.schemaType)}`);if("code"in D?D.trackErrors:D.errors!==!1)this.errsCount=$.gen.const("_errs",z$.default.errors)}result($,D,X){this.failResult((0,$$.not)($),D,X)}failResult($,D,X){if(this.gen.if($),X)X();else this.error();if(D){if(this.gen.else(),D(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass($,D){this.failResult((0,$$.not)($),void 0,D)}fail($){if($===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if($),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data($){if(!this.$data)return this.fail($);let{schemaCode:D}=this;this.fail($$._`${D} !== undefined && (${(0,$$.or)(this.invalid$data(),$)})`)}error($,D,X){if(D){this.setParams(D),this._error($,X),this.setParams({});return}this._error($,X)}_error($,D){($?f8.reportExtraError:f8.reportError)(this,this.def.error,D)}$dataError(){(0,f8.reportError)(this,this.def.$dataError||f8.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,f8.resetErrorsCount)(this.gen,this.errsCount)}ok($){if(!this.allErrors)this.gen.if($)}setParams($,D){if(D)Object.assign(this.params,$);else this.params=$}block$data($,D,X=$$.nil){this.gen.block(()=>{this.check$data($,X),D()})}check$data($=$$.nil,D=$$.nil){if(!this.$data)return;let{gen:X,schemaCode:G,schemaType:J,def:Y}=this;if(X.if((0,$$.or)($$._`${G} === undefined`,D)),$!==$$.nil)X.assign($,!0);if(J.length||Y.validateSchema){if(X.elseIf(this.invalid$data()),this.$dataError(),$!==$$.nil)X.assign($,!1)}X.else()}invalid$data(){let{gen:$,schemaCode:D,schemaType:X,def:G,it:J}=this;return(0,$$.or)(Y(),Q());function Y(){if(X.length){if(!(D instanceof $$.Name))throw Error("ajv implementation error");let W=Array.isArray(X)?X:[X];return $$._`${(0,pQ.checkDataTypes)(W,D,J.opts.strictNumbers,pQ.DataType.Wrong)}`}return $$.nil}function Q(){if(G.validateSchema){let W=$.scopeValue("validate$data",{ref:G.validateSchema});return $$._`!${W}(${D})`}return $$.nil}}subschema($,D){let X=(0,X5.getSubschema)(this.it,$);(0,X5.extendSubschemaData)(X,this.it,$),(0,X5.extendSubschemaMode)(X,$);let G={...this.it,...X,items:void 0,props:void 0};return xs(G,D),G}mergeEvaluated($,D){let{it:X,gen:G}=this;if(!X.opts.unevaluated)return;if(X.props!==!0&&$.props!==void 0)X.props=W0.mergeEvaluated.props(G,$.props,X.props,D);if(X.items!==!0&&$.items!==void 0)X.items=W0.mergeEvaluated.items(G,$.items,X.items,D)}mergeValidEvaluated($,D){let{it:X,gen:G}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return G.if(D,()=>this.mergeEvaluated($,$$.Name)),!0}}uZ.KeywordCxt=Y5;function xZ($,D,X,G){let J=new Y5($,X,D);if("code"in X)X.code(J,G);else if(J.$data&&X.validate)(0,m8.funcKeywordCode)(J,X);else if("macro"in X)(0,m8.macroKeywordCode)(J,X);else if(X.compile||X.validate)(0,m8.funcKeywordCode)(J,X)}var as=/^\/(?:[^~]|~0|~1)*$/,ss=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function hZ($,{dataLevel:D,dataNames:X,dataPathArr:G}){let J,Y;if($==="")return z$.default.rootData;if($[0]==="/"){if(!as.test($))throw Error(`Invalid JSON-pointer: ${$}`);J=$,Y=z$.default.rootData}else{let U=ss.exec($);if(!U)throw Error(`Invalid JSON-pointer: ${$}`);let B=+U[1];if(J=U[2],J==="#"){if(B>=D)throw Error(I("property/index",B));return G[D-B]}if(B>D)throw Error(I("data",B));if(Y=X[D-B],!J)return Y}let Q=Y,W=J.split("/");for(let U of W)if(U)Y=$$._`${Y}${(0,$$.getProperty)((0,W0.unescapeJsonPointer)(U))}`,Q=$$._`${Q} && ${Y}`;return Q;function I(U,B){return`Cannot access ${U} ${B} levels up, current level is ${D}`}}uZ.getData=hZ});var rQ=N((cZ)=>{Object.defineProperty(cZ,"__esModule",{value:!0});class mZ extends Error{constructor($){super("validation failed");this.errors=$,this.ajv=this.validation=!0}}cZ.default=mZ});var l8=N((iZ)=>{Object.defineProperty(iZ,"__esModule",{value:!0});var Q5=u8();class lZ extends Error{constructor($,D,X,G){super(G||`can't resolve reference ${X} from id ${D}`);this.missingRef=(0,Q5.resolveUrl)($,D,X),this.missingSchema=(0,Q5.normalizeId)((0,Q5.getFullPath)($,this.missingRef))}}iZ.default=lZ});var dQ=N((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.resolveSchema=nZ.getCompilingSchema=nZ.resolveRef=nZ.compileSchema=nZ.SchemaEnv=void 0;var V4=F$(),Je=rQ(),lD=Q0(),w4=u8(),pZ=Z$(),Ge=c8();class i8{constructor($){var D;this.refs={},this.dynamicAnchors={};let X;if(typeof $.schema=="object")X=$.schema;this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(D=$.baseId)!==null&&D!==void 0?D:(0,w4.normalizeId)(X===null||X===void 0?void 0:X[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=X===null||X===void 0?void 0:X.$async,this.refs={}}}nZ.SchemaEnv=i8;function I5($){let D=rZ.call(this,$);if(D)return D;let X=(0,w4.getFullPath)(this.opts.uriResolver,$.root.baseId),{es5:G,lines:J}=this.opts.code,{ownProperties:Y}=this.opts,Q=new V4.CodeGen(this.scope,{es5:G,lines:J,ownProperties:Y}),W;if($.$async)W=Q.scopeValue("Error",{ref:Je.default,code:V4._`require("ajv/dist/runtime/validation_error").default`});let I=Q.scopeName("validate");$.validateName=I;let U={gen:Q,allErrors:this.opts.allErrors,data:lD.default.data,parentData:lD.default.parentData,parentDataProperty:lD.default.parentDataProperty,dataNames:[lD.default.data],dataPathArr:[V4.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:Q.scopeValue("schema",this.opts.code.source===!0?{ref:$.schema,code:(0,V4.stringify)($.schema)}:{ref:$.schema}),validateName:I,ValidationError:W,schema:$.schema,schemaEnv:$,rootId:X,baseId:$.baseId||X,schemaPath:V4.nil,errSchemaPath:$.schemaPath||(this.opts.jtd?"":"#"),errorPath:V4._`""`,opts:this.opts,self:this},B;try{this._compilations.add($),(0,Ge.validateFunctionCode)(U),Q.optimize(this.opts.code.optimize);let H=Q.toString();if(B=`${Q.scopeRefs(lD.default.scope)}return ${H}`,this.opts.code.process)B=this.opts.code.process(B,$);let z=Function(`${lD.default.self}`,`${lD.default.scope}`,B)(this,this.scope.get());if(this.scope.value(I,{ref:z}),z.errors=null,z.schema=$.schema,z.schemaEnv=$,$.$async)z.$async=!0;if(this.opts.code.source===!0)z.source={validateName:I,validateCode:H,scopeValues:Q._values};if(this.opts.unevaluated){let{props:L,items:F}=U;if(z.evaluated={props:L instanceof V4.Name?void 0:L,items:F instanceof V4.Name?void 0:F,dynamicProps:L instanceof V4.Name,dynamicItems:F instanceof V4.Name},z.source)z.source.evaluated=(0,V4.stringify)(z.evaluated)}return $.validate=z,$}catch(H){if(delete $.validate,delete $.validateName,B)this.logger.error("Error compiling schema, function code:",B);throw H}finally{this._compilations.delete($)}}nZ.compileSchema=I5;function Ye($,D,X){var G;X=(0,w4.resolveUrl)(this.opts.uriResolver,D,X);let J=$.refs[X];if(J)return J;let Y=Ie.call(this,$,X);if(Y===void 0){let Q=(G=$.localRefs)===null||G===void 0?void 0:G[X],{schemaId:W}=this.opts;if(Q)Y=new i8({schema:Q,schemaId:W,root:$,baseId:D})}if(Y===void 0)return;return $.refs[X]=Qe.call(this,Y)}nZ.resolveRef=Ye;function Qe($){if((0,w4.inlineRef)($.schema,this.opts.inlineRefs))return $.schema;return $.validate?$:I5.call(this,$)}function rZ($){for(let D of this._compilations)if(We(D,$))return D}nZ.getCompilingSchema=rZ;function We($,D){return $.schema===D.schema&&$.root===D.root&&$.baseId===D.baseId}function Ie($,D){let X;while(typeof(X=this.refs[D])=="string")D=X;return X||this.schemas[D]||nQ.call(this,$,D)}function nQ($,D){let X=this.opts.uriResolver.parse(D),G=(0,w4._getFullPath)(this.opts.uriResolver,X),J=(0,w4.getFullPath)(this.opts.uriResolver,$.baseId,void 0);if(Object.keys($.schema).length>0&&G===J)return W5.call(this,X,$);let Y=(0,w4.normalizeId)(G),Q=this.refs[Y]||this.schemas[Y];if(typeof Q=="string"){let W=nQ.call(this,$,Q);if(typeof(W===null||W===void 0?void 0:W.schema)!=="object")return;return W5.call(this,X,W)}if(typeof(Q===null||Q===void 0?void 0:Q.schema)!=="object")return;if(!Q.validate)I5.call(this,Q);if(Y===(0,w4.normalizeId)(D)){let{schema:W}=Q,{schemaId:I}=this.opts,U=W[I];if(U)J=(0,w4.resolveUrl)(this.opts.uriResolver,J,U);return new i8({schema:W,schemaId:I,root:$,baseId:J})}return W5.call(this,X,Q)}nZ.resolveSchema=nQ;var Ue=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function W5($,{baseId:D,schema:X,root:G}){var J;if(((J=$.fragment)===null||J===void 0?void 0:J[0])!=="/")return;for(let W of $.fragment.slice(1).split("/")){if(typeof X==="boolean")return;let I=X[(0,pZ.unescapeFragment)(W)];if(I===void 0)return;X=I;let U=typeof X==="object"&&X[this.opts.schemaId];if(!Ue.has(W)&&U)D=(0,w4.resolveUrl)(this.opts.uriResolver,D,U)}let Y;if(typeof X!="boolean"&&X.$ref&&!(0,pZ.schemaHasRulesButRef)(X,this.RULES)){let W=(0,w4.resolveUrl)(this.opts.uriResolver,D,X.$ref);Y=nQ.call(this,G,W)}let{schemaId:Q}=this.opts;if(Y=Y||new i8({schema:X,schemaId:Q,root:G,baseId:D}),Y.schema!==Y.root.schema)return Y;return}});var oZ=N((Fq$,Ke)=>{Ke.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 z5=N((bq$,DT)=>{var Ve=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),aZ=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),U5=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),sZ=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),we=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function B5($){let D="",X=0,G=0;for(G=0;G<$.length;G++){if(X=$[G].charCodeAt(0),X===48)continue;if(!(X>=48&&X<=57||X>=65&&X<=70||X>=97&&X<=102))return"";D+=$[G];break}for(G+=1;G<$.length;G++){if(X=$[G].charCodeAt(0),!(X>=48&&X<=57||X>=65&&X<=70||X>=97&&X<=102))return"";D+=$[G]}return D}var Le=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function tZ($){return $.length=0,!0}function Oe($,D,X){if($.length){let G=B5($);if(G!=="")D.push(G);else return X.error=!0,!1;$.length=0}return!0}function Fe($){let D=0,X={error:!1,address:"",zone:""},G=[],J=[],Y=!1,Q=!1,W=Oe;for(let I=0;I<$.length;I++){let U=$[I];if(U==="["||U==="]")continue;if(U===":"){if(Y===!0)Q=!0;if(!W(J,G,X))break;if(++D>7){X.error=!0;break}if(I>0&&$[I-1]===":")Y=!0;G.push(":");continue}else if(U==="%"){if(!W(J,G,X))break;W=tZ}else{J.push(U);continue}}if(J.length)if(W===tZ)X.zone=J.join("");else if(Q)G.push(J.join(""));else G.push(B5(J));return X.address=G.join(""),X}function eZ($){if(be($,":")<2)return{host:$,isIPV6:!1};let D=Fe($);if(!D.error){let{address:X,address:G}=D;if(D.zone)X+="%"+D.zone,G+="%25"+D.zone;return{host:X,isIPV6:!0,escapedHost:G}}else return{host:$,isIPV6:!1}}function be($,D){let X=0;for(let G=0;G<$.length;G++)if($[G]===D)X++;return X}function je($){let D=$,X=[],G=-1,J=0;while(J=D.length){if(J===1)if(D===".")break;else if(D==="/"){X.push("/");break}else{X.push(D);break}else if(J===2){if(D[0]==="."){if(D[1]===".")break;else if(D[1]==="/"){D=D.slice(2);continue}}else if(D[0]==="/"){if(D[1]==="."||D[1]==="/"){X.push("/");break}}}else if(J===3){if(D==="/.."){if(X.length!==0)X.pop();X.push("/");break}}if(D[0]==="."){if(D[1]==="."){if(D[2]==="/"){D=D.slice(3);continue}}else if(D[1]==="/"){D=D.slice(2);continue}}else if(D[0]==="/"){if(D[1]==="."){if(D[2]==="/"){D=D.slice(2);continue}else if(D[2]==="."){if(D[3]==="/"){if(D=D.slice(3),X.length!==0)X.pop();continue}}}}if((G=D.indexOf("/",1))===-1){X.push(D);break}else X.push(D.slice(0,G)),D=D.slice(G)}return X.join("")}var Ae={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Me=/[@/?#:]/g,Se=/[@/?#]/g;function $T($,D){let X=D?Se:Me;return X.lastIndex=0,$.replace(X,(G)=>Ae[G])}function Pe($,D=!1){if($.indexOf("%")===-1)return $;let X="";for(let G=0;G<$.length;G++){if($[G]==="%"&&G+2<$.length){let J=$.slice(G+1,G+3);if(U5(J)){let Y=J.toUpperCase(),Q=String.fromCharCode(parseInt(Y,16));if(D&&sZ(Q))X+=Q;else X+="%"+Y;G+=2;continue}}X+=$[G]}return X}function _e($){let D="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let G=$.slice(X+1,X+3);if(U5(G)){let J=G.toUpperCase(),Y=String.fromCharCode(parseInt(J,16));if(Y!=="."&&sZ(Y))D+=Y;else D+="%"+J;X+=2;continue}}if(we($[X]))D+=$[X];else D+=escape($[X])}return D}function Ne($){let D="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let G=$.slice(X+1,X+3);if(U5(G)){D+="%"+G.toUpperCase(),X+=2;continue}}D+=escape($[X])}return D}function Re($){let D=[];if($.userinfo!==void 0)D.push($.userinfo),D.push("@");if($.host!==void 0){let X=unescape($.host);if(!aZ(X)){let G=eZ(X);if(G.isIPV6===!0)X=`[${G.escapedHost}]`;else X=$T(X,!1)}D.push(X)}if(typeof $.port==="number"||typeof $.port==="string")D.push(":"),D.push(String($.port));return D.length?D.join(""):void 0}DT.exports={nonSimpleDomain:Le,recomposeAuthority:Re,reescapeHostDelimiters:$T,normalizePercentEncoding:Pe,normalizePathEncoding:_e,escapePreservingEscapes:Ne,removeDotSegments:je,isIPv4:aZ,isUUID:Ve,normalizeIPv6:eZ,stringArrayToHexStripped:B5}});var QT=N((jq$,YT)=>{var{isUUID:Ee}=z5(),Ze=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Te=["http","https","ws","wss","urn","urn:uuid"];function ve($){return Te.indexOf($)!==-1}function q5($){if($.secure===!0)return!0;else if($.secure===!1)return!1;else if($.scheme)return $.scheme.length===3&&($.scheme[0]==="w"||$.scheme[0]==="W")&&($.scheme[1]==="s"||$.scheme[1]==="S")&&($.scheme[2]==="s"||$.scheme[2]==="S");else return!1}function XT($){if(!$.host)$.error=$.error||"HTTP URIs must have a host.";return $}function JT($){let D=String($.scheme).toLowerCase()==="https";if($.port===(D?443:80)||$.port==="")$.port=void 0;if(!$.path)$.path="/";return $}function ke($){return $.secure=q5($),$.resourceName=($.path||"/")+($.query?"?"+$.query:""),$.path=void 0,$.query=void 0,$}function Ce($){if($.port===(q5($)?443:80)||$.port==="")$.port=void 0;if(typeof $.secure==="boolean")$.scheme=$.secure?"wss":"ws",$.secure=void 0;if($.resourceName){let[D,X]=$.resourceName.split("?");$.path=D&&D!=="/"?D:void 0,$.query=X,$.resourceName=void 0}return $.fragment=void 0,$}function ye($,D){if(!$.path)return $.error="URN can not be parsed",$;let X=$.path.match(Ze);if(X){let G=D.scheme||$.scheme||"urn";$.nid=X[1].toLowerCase(),$.nss=X[2];let J=`${G}:${D.nid||$.nid}`,Y=H5(J);if($.path=void 0,Y)$=Y.parse($,D)}else $.error=$.error||"URN can not be parsed.";return $}function ge($,D){if($.nid===void 0)throw Error("URN without nid cannot be serialized");let X=D.scheme||$.scheme||"urn",G=$.nid.toLowerCase(),J=`${X}:${D.nid||G}`,Y=H5(J);if(Y)$=Y.serialize($,D);let Q=$,W=$.nss;return Q.path=`${G||D.nid}:${W}`,D.skipEscape=!0,Q}function xe($,D){let X=$;if(X.uuid=X.nss,X.nss=void 0,!D.tolerant&&(!X.uuid||!Ee(X.uuid)))X.error=X.error||"UUID is not valid.";return X}function he($){let D=$;return D.nss=($.uuid||"").toLowerCase(),D}var GT={scheme:"http",domainHost:!0,parse:XT,serialize:JT},ue={scheme:"https",domainHost:GT.domainHost,parse:XT,serialize:JT},oQ={scheme:"ws",domainHost:!0,parse:ke,serialize:Ce},fe={scheme:"wss",domainHost:oQ.domainHost,parse:oQ.parse,serialize:oQ.serialize},me={scheme:"urn",parse:ye,serialize:ge,skipNormalize:!0},ce={scheme:"urn:uuid",parse:xe,serialize:he,skipNormalize:!0},tQ={http:GT,https:ue,ws:oQ,wss:fe,urn:me,"urn:uuid":ce};Object.setPrototypeOf(tQ,null);function H5($){return $&&(tQ[$]||tQ[$.toLowerCase()])||void 0}YT.exports={wsIsSecure:q5,SCHEMES:tQ,isValidSchemeName:ve,getSchemeHandler:H5}});var qT=N((Aq$,aQ)=>{var{normalizeIPv6:le,removeDotSegments:p8,recomposeAuthority:ie,normalizePercentEncoding:pe,normalizePathEncoding:re,escapePreservingEscapes:ne,reescapeHostDelimiters:de,isIPv4:oe,nonSimpleDomain:te}=z5(),{SCHEMES:ae,getSchemeHandler:IT}=QT();function se($,D){if(typeof $==="string")$=J$$($,D);else if(typeof $==="object")$=YJ(iD($,D),D);return $}function ee($,D,X){let G=X?Object.assign({scheme:"null"},X):{scheme:"null"},J=UT(YJ($,G),YJ(D,G),G,!0);return G.skipEscape=!0,iD(J,G)}function UT($,D,X,G){let J={};if(!G)$=YJ(iD($,X),X),D=YJ(iD(D,X),X);if(X=X||{},!X.tolerant&&D.scheme)J.scheme=D.scheme,J.userinfo=D.userinfo,J.host=D.host,J.port=D.port,J.path=p8(D.path||""),J.query=D.query;else{if(D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)J.userinfo=D.userinfo,J.host=D.host,J.port=D.port,J.path=p8(D.path||""),J.query=D.query;else{if(!D.path)if(J.path=$.path,D.query!==void 0)J.query=D.query;else J.query=$.query;else{if(D.path[0]==="/")J.path=p8(D.path);else{if(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path)J.path="/"+D.path;else if(!$.path)J.path=D.path;else J.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+D.path;J.path=p8(J.path)}J.query=D.query}J.userinfo=$.userinfo,J.host=$.host,J.port=$.port}J.scheme=$.scheme}return J.fragment=D.fragment,J}function $$$($,D,X){let G=WT($,X),J=WT(D,X);return G!==void 0&&J!==void 0&&G.toLowerCase()===J.toLowerCase()}function iD($,D){let X={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:""},G=Object.assign({},D),J=[],Y=IT(G.scheme||X.scheme);if(Y&&Y.serialize)Y.serialize(X,G);if(X.path!==void 0)if(!G.skipEscape){if(X.path=ne(X.path),X.scheme!==void 0)X.path=X.path.split("%3A").join(":")}else X.path=pe(X.path);if(G.reference!=="suffix"&&X.scheme)J.push(X.scheme,":");let Q=ie(X);if(Q!==void 0){if(G.reference!=="suffix")J.push("//");if(J.push(Q),X.path&&X.path[0]!=="/")J.push("/")}if(X.path!==void 0){let W=X.path;if(!G.absolutePath&&(!Y||!Y.absolutePath))W=p8(W);if(Q===void 0&&W[0]==="/"&&W[1]==="/")W="/%2F"+W.slice(2);J.push(W)}if(X.query!==void 0)J.push("?",X.query);if(X.fragment!==void 0)J.push("#",X.fragment);return J.join("")}var D$$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function X$$($,D){if(D[2]!==void 0&&$.path&&$.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof $.port==="number"&&($.port<0||$.port>65535))return"URI port is malformed.";return}function BT($,D){let X=Object.assign({},D),G={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},J=!1,Y=!1;if(X.reference==="suffix")if(X.scheme)$=X.scheme+":"+$;else $="//"+$;let Q=$.match(D$$);if(Q){if(G.scheme=Q[1],G.userinfo=Q[3],G.host=Q[4],G.port=parseInt(Q[5],10),G.path=Q[6]||"",G.query=Q[7],G.fragment=Q[8],isNaN(G.port))G.port=Q[5];let W=X$$(G,Q);if(W!==void 0)G.error=G.error||W,J=!0;if(G.host)if(oe(G.host)===!1){let B=le(G.host);G.host=B.host.toLowerCase(),Y=B.isIPV6}else Y=!0;if(G.scheme===void 0&&G.userinfo===void 0&&G.host===void 0&&G.port===void 0&&G.query===void 0&&!G.path)G.reference="same-document";else if(G.scheme===void 0)G.reference="relative";else if(G.fragment===void 0)G.reference="absolute";else G.reference="uri";if(X.reference&&X.reference!=="suffix"&&X.reference!==G.reference)G.error=G.error||"URI is not a "+X.reference+" reference.";let I=IT(X.scheme||G.scheme);if(!X.unicodeSupport&&(!I||!I.unicodeSupport)){if(G.host&&(X.domainHost||I&&I.domainHost)&&Y===!1&&te(G.host))try{G.host=URL.domainToASCII(G.host.toLowerCase())}catch(U){G.error=G.error||"Host's domain name can not be converted to ASCII: "+U}}if(!I||I&&!I.skipNormalize){if($.indexOf("%")!==-1){if(G.scheme!==void 0)G.scheme=unescape(G.scheme);if(G.host!==void 0)G.host=de(unescape(G.host),Y)}if(G.path)G.path=re(G.path);if(G.fragment)try{G.fragment=encodeURI(decodeURIComponent(G.fragment))}catch{G.error=G.error||"URI malformed"}}if(I&&I.parse)I.parse(G,X)}else G.error=G.error||"URI can not be parsed.";return{parsed:G,malformedAuthorityOrPort:J}}function YJ($,D){return BT($,D).parsed}function J$$($,D){return zT($,D).normalized}function zT($,D){let{parsed:X,malformedAuthorityOrPort:G}=BT($,D);return{normalized:G?$:iD(X,D),malformedAuthorityOrPort:G}}function WT($,D){if(typeof $==="string"){let{normalized:X,malformedAuthorityOrPort:G}=zT($,D);return G?void 0:X}if(typeof $==="object")return iD($,D)}var K5={SCHEMES:ae,normalize:se,resolve:ee,resolveComponent:UT,equal:$$$,serialize:iD,parse:YJ};aQ.exports=K5;aQ.exports.default=K5;aQ.exports.fastUri=K5});var VT=N((KT)=>{Object.defineProperty(KT,"__esModule",{value:!0});var HT=qT();HT.code='require("ajv/dist/runtime/uri").default';KT.default=HT});var MT=N((I0)=>{Object.defineProperty(I0,"__esModule",{value:!0});I0.CodeGen=I0.Name=I0.nil=I0.stringify=I0.str=I0._=I0.KeywordCxt=void 0;var Y$$=c8();Object.defineProperty(I0,"KeywordCxt",{enumerable:!0,get:function(){return Y$$.KeywordCxt}});var QJ=F$();Object.defineProperty(I0,"_",{enumerable:!0,get:function(){return QJ._}});Object.defineProperty(I0,"str",{enumerable:!0,get:function(){return QJ.str}});Object.defineProperty(I0,"stringify",{enumerable:!0,get:function(){return QJ.stringify}});Object.defineProperty(I0,"nil",{enumerable:!0,get:function(){return QJ.nil}});Object.defineProperty(I0,"Name",{enumerable:!0,get:function(){return QJ.Name}});Object.defineProperty(I0,"CodeGen",{enumerable:!0,get:function(){return QJ.CodeGen}});var Q$$=rQ(),bT=l8(),W$$=rH(),r8=dQ(),I$$=F$(),n8=u8(),sQ=h8(),w5=Z$(),wT=oZ(),U$$=VT(),jT=($,D)=>new RegExp($,D);jT.code="new RegExp";var B$$=["removeAdditional","useDefaults","coerceTypes"],z$$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),q$$={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.'},LT=200;function K$$($){var D,X,G,J,Y,Q,W,I,U,B,H,V,z,L,F,b,P,Z,v,g,T,o$,e$,v6,a;let O$=$.strict,M=(D=$.code)===null||D===void 0?void 0:D.optimize,c$=M===!0||M===void 0?1:M||0,l$=(G=(X=$.code)===null||X===void 0?void 0:X.regExp)!==null&&G!==void 0?G:jT,O=(J=$.uriResolver)!==null&&J!==void 0?J:U$$.default;return{strictSchema:(Q=(Y=$.strictSchema)!==null&&Y!==void 0?Y:O$)!==null&&Q!==void 0?Q:!0,strictNumbers:(I=(W=$.strictNumbers)!==null&&W!==void 0?W:O$)!==null&&I!==void 0?I:!0,strictTypes:(B=(U=$.strictTypes)!==null&&U!==void 0?U:O$)!==null&&B!==void 0?B:"log",strictTuples:(V=(H=$.strictTuples)!==null&&H!==void 0?H:O$)!==null&&V!==void 0?V:"log",strictRequired:(L=(z=$.strictRequired)!==null&&z!==void 0?z:O$)!==null&&L!==void 0?L:!1,code:$.code?{...$.code,optimize:c$,regExp:l$}:{optimize:c$,regExp:l$},loopRequired:(F=$.loopRequired)!==null&&F!==void 0?F:LT,loopEnum:(b=$.loopEnum)!==null&&b!==void 0?b:LT,meta:(P=$.meta)!==null&&P!==void 0?P:!0,messages:(Z=$.messages)!==null&&Z!==void 0?Z:!0,inlineRefs:(v=$.inlineRefs)!==null&&v!==void 0?v:!0,schemaId:(g=$.schemaId)!==null&&g!==void 0?g:"$id",addUsedSchema:(T=$.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(o$=$.validateSchema)!==null&&o$!==void 0?o$:!0,validateFormats:(e$=$.validateFormats)!==null&&e$!==void 0?e$:!0,unicodeRegExp:(v6=$.unicodeRegExp)!==null&&v6!==void 0?v6:!0,int32range:(a=$.int32range)!==null&&a!==void 0?a:!0,uriResolver:O}}class eQ{constructor($={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...K$$($)};let{es5:D,lines:X}=this.opts.code;this.scope=new I$$.ValueScope({scope:{},prefixes:z$$,es5:D,lines:X}),this.logger=b$$($.logger);let G=$.validateFormats;if($.validateFormats=!1,this.RULES=(0,W$$.getRules)(),OT.call(this,q$$,$,"NOT SUPPORTED"),OT.call(this,H$$,$,"DEPRECATED","warn"),this._metaOpts=O$$.call(this),$.formats)w$$.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords)L$$.call(this,$.keywords);if(typeof $.meta=="object")this.addMetaSchema($.meta);V$$.call(this),$.validateFormats=G}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:$,meta:D,schemaId:X}=this.opts,G=wT;if(X==="id")G={...wT},G.id=G.$id,delete G.$id;if(D&&$)this.addMetaSchema(G,G[X],!1)}defaultMeta(){let{meta:$,schemaId:D}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[D]||$:void 0}validate($,D){let X;if(typeof $=="string"){if(X=this.getSchema($),!X)throw Error(`no schema with key or ref "${$}"`)}else X=this.compile($);let G=X(D);if(!("$async"in X))this.errors=X.errors;return G}compile($,D){let X=this._addSchema($,D);return X.validate||this._compileSchemaEnv(X)}compileAsync($,D){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:X}=this.opts;return G.call(this,$,D);async function G(U,B){await J.call(this,U.$schema);let H=this._addSchema(U,B);return H.validate||Y.call(this,H)}async function J(U){if(U&&!this.getSchema(U))await G.call(this,{$ref:U},!0)}async function Y(U){try{return this._compileSchemaEnv(U)}catch(B){if(!(B instanceof bT.default))throw B;return Q.call(this,B),await W.call(this,B.missingSchema),Y.call(this,U)}}function Q({missingSchema:U,missingRef:B}){if(this.refs[U])throw Error(`AnySchema ${U} is loaded but ${B} cannot be resolved`)}async function W(U){let B=await I.call(this,U);if(!this.refs[U])await J.call(this,B.$schema);if(!this.refs[U])this.addSchema(B,U,D)}async function I(U){let B=this._loading[U];if(B)return B;try{return await(this._loading[U]=X(U))}finally{delete this._loading[U]}}}addSchema($,D,X,G=this.opts.validateSchema){if(Array.isArray($)){for(let Y of $)this.addSchema(Y,void 0,X,G);return this}let J;if(typeof $==="object"){let{schemaId:Y}=this.opts;if(J=$[Y],J!==void 0&&typeof J!="string")throw Error(`schema ${Y} must be string`)}return D=(0,n8.normalizeId)(D||J),this._checkUnique(D),this.schemas[D]=this._addSchema($,X,D,G,!0),this}addMetaSchema($,D,X=this.opts.validateSchema){return this.addSchema($,D,!0,X),this}validateSchema($,D){if(typeof $=="boolean")return!0;let X;if(X=$.$schema,X!==void 0&&typeof X!="string")throw Error("$schema must be a string");if(X=X||this.opts.defaultMeta||this.defaultMeta(),!X)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let G=this.validate(X,$);if(!G&&D){let J="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(J);else throw Error(J)}return G}getSchema($){let D;while(typeof(D=FT.call(this,$))=="string")$=D;if(D===void 0){let{schemaId:X}=this.opts,G=new r8.SchemaEnv({schema:{},schemaId:X});if(D=r8.resolveSchema.call(this,G,$),!D)return;this.refs[$]=D}return D.validate||this._compileSchemaEnv(D)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let D=FT.call(this,$);if(typeof D=="object")this._cache.delete(D.schema);return delete this.schemas[$],delete this.refs[$],this}case"object":{let D=$;this._cache.delete(D);let X=$[this.opts.schemaId];if(X)X=(0,n8.normalizeId)(X),delete this.schemas[X],delete this.refs[X];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(let D of $)this.addKeyword(D);return this}addKeyword($,D){let X;if(typeof $=="string"){if(X=$,typeof D=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),D.keyword=X}else if(typeof $=="object"&&D===void 0){if(D=$,X=D.keyword,Array.isArray(X)&&!X.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(A$$.call(this,X,D),!D)return(0,w5.eachItem)(X,(J)=>V5.call(this,J)),this;S$$.call(this,D);let G={...D,type:(0,sQ.getJSONTypes)(D.type),schemaType:(0,sQ.getJSONTypes)(D.schemaType)};return(0,w5.eachItem)(X,G.type.length===0?(J)=>V5.call(this,J,G):(J)=>G.type.forEach((Y)=>V5.call(this,J,G,Y))),this}getKeyword($){let D=this.RULES.all[$];return typeof D=="object"?D.definition:!!D}removeKeyword($){let{RULES:D}=this;delete D.keywords[$],delete D.all[$];for(let X of D.rules){let G=X.rules.findIndex((J)=>J.keyword===$);if(G>=0)X.rules.splice(G,1)}return this}addFormat($,D){if(typeof D=="string")D=new RegExp(D);return this.formats[$]=D,this}errorsText($=this.errors,{separator:D=", ",dataVar:X="data"}={}){if(!$||$.length===0)return"No errors";return $.map((G)=>`${X}${G.instancePath} ${G.message}`).reduce((G,J)=>G+D+J)}$dataMetaSchema($,D){let X=this.RULES.all;$=JSON.parse(JSON.stringify($));for(let G of D){let J=G.split("/").slice(1),Y=$;for(let Q of J)Y=Y[Q];for(let Q in X){let W=X[Q];if(typeof W!="object")continue;let{$data:I}=W.definition,U=Y[Q];if(I&&U)Y[Q]=AT(U)}}return $}_removeAllSchemas($,D){for(let X in $){let G=$[X];if(!D||D.test(X)){if(typeof G=="string")delete $[X];else if(G&&!G.meta)this._cache.delete(G.schema),delete $[X]}}}_addSchema($,D,X,G=this.opts.validateSchema,J=this.opts.addUsedSchema){let Y,{schemaId:Q}=this.opts;if(typeof $=="object")Y=$[Q];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof $!="boolean")throw Error("schema must be object or boolean");let W=this._cache.get($);if(W!==void 0)return W;X=(0,n8.normalizeId)(Y||X);let I=n8.getSchemaRefs.call(this,$,X);if(W=new r8.SchemaEnv({schema:$,schemaId:Q,meta:D,baseId:X,localRefs:I}),this._cache.set(W.schema,W),J&&!X.startsWith("#")){if(X)this._checkUnique(X);this.refs[X]=W}if(G)this.validateSchema($,!0);return W}_checkUnique($){if(this.schemas[$]||this.refs[$])throw Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta)this._compileMetaSchema($);else r8.compileSchema.call(this,$);if(!$.validate)throw Error("ajv implementation error");return $.validate}_compileMetaSchema($){let D=this.opts;this.opts=this._metaOpts;try{r8.compileSchema.call(this,$)}finally{this.opts=D}}}eQ.ValidationError=Q$$.default;eQ.MissingRefError=bT.default;I0.default=eQ;function OT($,D,X,G="error"){for(let J in $){let Y=J;if(Y in D)this.logger[G](`${X}: option ${J}. ${$[Y]}`)}}function FT($){return $=(0,n8.normalizeId)($),this.schemas[$]||this.refs[$]}function V$$(){let $=this.opts.schemas;if(!$)return;if(Array.isArray($))this.addSchema($);else for(let D in $)this.addSchema($[D],D)}function w$$(){for(let $ in this.opts.formats){let D=this.opts.formats[$];if(D)this.addFormat($,D)}}function L$$($){if(Array.isArray($)){this.addVocabulary($);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let D in $){let X=$[D];if(!X.keyword)X.keyword=D;this.addKeyword(X)}}function O$$(){let $={...this.opts};for(let D of B$$)delete $[D];return $}var F$$={log(){},warn(){},error(){}};function b$$($){if($===!1)return F$$;if($===void 0)return console;if($.log&&$.warn&&$.error)return $;throw Error("logger must implement log, warn and error methods")}var j$$=/^[a-z_$][a-z0-9_$:-]*$/i;function A$$($,D){let{RULES:X}=this;if((0,w5.eachItem)($,(G)=>{if(X.keywords[G])throw Error(`Keyword ${G} is already defined`);if(!j$$.test(G))throw Error(`Keyword ${G} has invalid name`)}),!D)return;if(D.$data&&!(("code"in D)||("validate"in D)))throw Error('$data keyword must have "code" or "validate" function')}function V5($,D,X){var G;let J=D===null||D===void 0?void 0:D.post;if(X&&J)throw Error('keyword with "post" flag cannot have "type"');let{RULES:Y}=this,Q=J?Y.post:Y.rules.find(({type:I})=>I===X);if(!Q)Q={type:X,rules:[]},Y.rules.push(Q);if(Y.keywords[$]=!0,!D)return;let W={keyword:$,definition:{...D,type:(0,sQ.getJSONTypes)(D.type),schemaType:(0,sQ.getJSONTypes)(D.schemaType)}};if(D.before)M$$.call(this,Q,W,D.before);else Q.rules.push(W);Y.all[$]=W,(G=D.implements)===null||G===void 0||G.forEach((I)=>this.addKeyword(I))}function M$$($,D,X){let G=$.rules.findIndex((J)=>J.keyword===X);if(G>=0)$.rules.splice(G,0,D);else $.rules.push(D),this.logger.warn(`rule ${X} is not defined`)}function S$$($){let{metaSchema:D}=$;if(D===void 0)return;if($.$data&&this.opts.$data)D=AT(D);$.validateSchema=this.compile(D,!0)}var P$$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function AT($){return{anyOf:[$,P$$]}}});var PT=N((ST)=>{Object.defineProperty(ST,"__esModule",{value:!0});var R$$={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ST.default=R$$});var TT=N((ET)=>{Object.defineProperty(ET,"__esModule",{value:!0});ET.callRef=ET.getValidate=void 0;var Z$$=l8(),_T=a1(),S1=F$(),WJ=Q0(),NT=dQ(),$W=Z$(),T$$={keyword:"$ref",schemaType:"string",code($){let{gen:D,schema:X,it:G}=$,{baseId:J,schemaEnv:Y,validateName:Q,opts:W,self:I}=G,{root:U}=Y;if((X==="#"||X==="#/")&&J===U.baseId)return H();let B=NT.resolveRef.call(I,U,J,X);if(B===void 0)throw new Z$$.default(G.opts.uriResolver,J,X);if(B instanceof NT.SchemaEnv)return V(B);return z(B);function H(){if(Y===U)return DW($,Q,Y,Y.$async);let L=D.scopeValue("root",{ref:U});return DW($,S1._`${L}.validate`,U,U.$async)}function V(L){let F=RT($,L);DW($,F,L,L.$async)}function z(L){let F=D.scopeValue("schema",W.code.source===!0?{ref:L,code:(0,S1.stringify)(L)}:{ref:L}),b=D.name("valid"),P=$.subschema({schema:L,dataTypes:[],schemaPath:S1.nil,topSchemaRef:F,errSchemaPath:X},b);$.mergeEvaluated(P),$.ok(b)}}};function RT($,D){let{gen:X}=$;return D.validate?X.scopeValue("validate",{ref:D.validate}):S1._`${X.scopeValue("wrapper",{ref:D})}.validate`}ET.getValidate=RT;function DW($,D,X,G){let{gen:J,it:Y}=$,{allErrors:Q,schemaEnv:W,opts:I}=Y,U=I.passContext?WJ.default.this:S1.nil;if(G)B();else H();function B(){if(!W.$async)throw Error("async schema referenced by sync schema");let L=J.let("valid");J.try(()=>{if(J.code(S1._`await ${(0,_T.callValidateCode)($,D,U)}`),z(D),!Q)J.assign(L,!0)},(F)=>{if(J.if(S1._`!(${F} instanceof ${Y.ValidationError})`,()=>J.throw(F)),V(F),!Q)J.assign(L,!1)}),$.ok(L)}function H(){$.result((0,_T.callValidateCode)($,D,U),()=>z(D),()=>V(D))}function V(L){let F=S1._`${L}.errors`;J.assign(WJ.default.vErrors,S1._`${WJ.default.vErrors} === null ? ${F} : ${WJ.default.vErrors}.concat(${F})`),J.assign(WJ.default.errors,S1._`${WJ.default.vErrors}.length`)}function z(L){var F;if(!Y.opts.unevaluated)return;let b=(F=X===null||X===void 0?void 0:X.validate)===null||F===void 0?void 0:F.evaluated;if(Y.props!==!0)if(b&&!b.dynamicProps){if(b.props!==void 0)Y.props=$W.mergeEvaluated.props(J,b.props,Y.props)}else{let P=J.var("props",S1._`${L}.evaluated.props`);Y.props=$W.mergeEvaluated.props(J,P,Y.props,S1.Name)}if(Y.items!==!0)if(b&&!b.dynamicItems){if(b.items!==void 0)Y.items=$W.mergeEvaluated.items(J,b.items,Y.items)}else{let P=J.var("items",S1._`${L}.evaluated.items`);Y.items=$W.mergeEvaluated.items(J,P,Y.items,S1.Name)}}}ET.callRef=DW;ET.default=T$$});var kT=N((vT)=>{Object.defineProperty(vT,"__esModule",{value:!0});var C$$=PT(),y$$=TT(),g$$=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",C$$.default,y$$.default];vT.default=g$$});var yT=N((CT)=>{Object.defineProperty(CT,"__esModule",{value:!0});var XW=F$(),o0=XW.operators,JW={maximum:{okStr:"<=",ok:o0.LTE,fail:o0.GT},minimum:{okStr:">=",ok:o0.GTE,fail:o0.LT},exclusiveMaximum:{okStr:"<",ok:o0.LT,fail:o0.GTE},exclusiveMinimum:{okStr:">",ok:o0.GT,fail:o0.LTE}},h$$={message:({keyword:$,schemaCode:D})=>XW.str`must be ${JW[$].okStr} ${D}`,params:({keyword:$,schemaCode:D})=>XW._`{comparison: ${JW[$].okStr}, limit: ${D}}`},u$$={keyword:Object.keys(JW),type:"number",schemaType:"number",$data:!0,error:h$$,code($){let{keyword:D,data:X,schemaCode:G}=$;$.fail$data(XW._`${X} ${JW[D].fail} ${G} || isNaN(${X})`)}};CT.default=u$$});var xT=N((gT)=>{Object.defineProperty(gT,"__esModule",{value:!0});var d8=F$(),m$$={message:({schemaCode:$})=>d8.str`must be multiple of ${$}`,params:({schemaCode:$})=>d8._`{multipleOf: ${$}}`},c$$={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:m$$,code($){let{gen:D,data:X,schemaCode:G,it:J}=$,Y=J.opts.multipleOfPrecision,Q=D.let("res"),W=Y?d8._`Math.abs(Math.round(${Q}) - ${Q}) > 1e-${Y}`:d8._`${Q} !== parseInt(${Q})`;$.fail$data(d8._`(${G} === 0 || (${Q} = ${X}/${G}, ${W}))`)}};gT.default=c$$});var fT=N((uT)=>{Object.defineProperty(uT,"__esModule",{value:!0});function hT($){let D=$.length,X=0,G=0,J;while(G<D)if(X++,J=$.charCodeAt(G++),J>=55296&&J<=56319&&G<D){if(J=$.charCodeAt(G),(J&64512)===56320)G++}return X}uT.default=hT;hT.code='require("ajv/dist/runtime/ucs2length").default'});var cT=N((mT)=>{Object.defineProperty(mT,"__esModule",{value:!0});var pD=F$(),p$$=Z$(),r$$=fT(),n$$={message({keyword:$,schemaCode:D}){let X=$==="maxLength"?"more":"fewer";return pD.str`must NOT have ${X} than ${D} characters`},params:({schemaCode:$})=>pD._`{limit: ${$}}`},d$$={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:n$$,code($){let{keyword:D,data:X,schemaCode:G,it:J}=$,Y=D==="maxLength"?pD.operators.GT:pD.operators.LT,Q=J.opts.unicode===!1?pD._`${X}.length`:pD._`${(0,p$$.useFunc)($.gen,r$$.default)}(${X})`;$.fail$data(pD._`${Q} ${Y} ${G}`)}};mT.default=d$$});var iT=N((lT)=>{Object.defineProperty(lT,"__esModule",{value:!0});var t$$=a1(),a$$=Z$(),IJ=F$(),s$$={message:({schemaCode:$})=>IJ.str`must match pattern "${$}"`,params:({schemaCode:$})=>IJ._`{pattern: ${$}}`},e$$={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s$$,code($){let{gen:D,data:X,$data:G,schema:J,schemaCode:Y,it:Q}=$,W=Q.opts.unicodeRegExp?"u":"";if(G){let{regExp:I}=Q.opts.code,U=I.code==="new RegExp"?IJ._`new RegExp`:(0,a$$.useFunc)(D,I),B=D.let("valid");D.try(()=>D.assign(B,IJ._`${U}(${Y}, ${W}).test(${X})`),()=>D.assign(B,!1)),$.fail$data(IJ._`!${B}`)}else{let I=(0,t$$.usePattern)($,J);$.fail$data(IJ._`!${I}.test(${X})`)}}};lT.default=e$$});var rT=N((pT)=>{Object.defineProperty(pT,"__esModule",{value:!0});var o8=F$(),D6$={message({keyword:$,schemaCode:D}){let X=$==="maxProperties"?"more":"fewer";return o8.str`must NOT have ${X} than ${D} properties`},params:({schemaCode:$})=>o8._`{limit: ${$}}`},X6$={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:D6$,code($){let{keyword:D,data:X,schemaCode:G}=$,J=D==="maxProperties"?o8.operators.GT:o8.operators.LT;$.fail$data(o8._`Object.keys(${X}).length ${J} ${G}`)}};pT.default=X6$});var dT=N((nT)=>{Object.defineProperty(nT,"__esModule",{value:!0});var t8=a1(),a8=F$(),G6$=Z$(),Y6$={message:({params:{missingProperty:$}})=>a8.str`must have required property '${$}'`,params:({params:{missingProperty:$}})=>a8._`{missingProperty: ${$}}`},Q6$={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Y6$,code($){let{gen:D,schema:X,schemaCode:G,data:J,$data:Y,it:Q}=$,{opts:W}=Q;if(!Y&&X.length===0)return;let I=X.length>=W.loopRequired;if(Q.allErrors)U();else B();if(W.strictRequired){let z=$.parentSchema.properties,{definedProperties:L}=$.it;for(let F of X)if((z===null||z===void 0?void 0:z[F])===void 0&&!L.has(F)){let b=Q.schemaEnv.baseId+Q.errSchemaPath,P=`required property "${F}" is not defined at "${b}" (strictRequired)`;(0,G6$.checkStrictMode)(Q,P,Q.opts.strictRequired)}}function U(){if(I||Y)$.block$data(a8.nil,H);else for(let z of X)(0,t8.checkReportMissingProp)($,z)}function B(){let z=D.let("missing");if(I||Y){let L=D.let("valid",!0);$.block$data(L,()=>V(z,L)),$.ok(L)}else D.if((0,t8.checkMissingProp)($,X,z)),(0,t8.reportMissingProp)($,z),D.else()}function H(){D.forOf("prop",G,(z)=>{$.setParams({missingProperty:z}),D.if((0,t8.noPropertyInData)(D,J,z,W.ownProperties),()=>$.error())})}function V(z,L){$.setParams({missingProperty:z}),D.forOf(z,G,()=>{D.assign(L,(0,t8.propertyInData)(D,J,z,W.ownProperties)),D.if((0,a8.not)(L),()=>{$.error(),D.break()})},a8.nil)}}};nT.default=Q6$});var tT=N((oT)=>{Object.defineProperty(oT,"__esModule",{value:!0});var s8=F$(),I6$={message({keyword:$,schemaCode:D}){let X=$==="maxItems"?"more":"fewer";return s8.str`must NOT have ${X} than ${D} items`},params:({schemaCode:$})=>s8._`{limit: ${$}}`},U6$={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:I6$,code($){let{keyword:D,data:X,schemaCode:G}=$,J=D==="maxItems"?s8.operators.GT:s8.operators.LT;$.fail$data(s8._`${X}.length ${J} ${G}`)}};oT.default=U6$});var GW=N((sT)=>{Object.defineProperty(sT,"__esModule",{value:!0});var aT=$5();aT.code='require("ajv/dist/runtime/equal").default';sT.default=aT});var $v=N((eT)=>{Object.defineProperty(eT,"__esModule",{value:!0});var L5=h8(),d6=F$(),q6$=Z$(),H6$=GW(),K6$={message:({params:{i:$,j:D}})=>d6.str`must NOT have duplicate items (items ## ${D} and ${$} are identical)`,params:({params:{i:$,j:D}})=>d6._`{i: ${$}, j: ${D}}`},V6$={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:K6$,code($){let{gen:D,data:X,$data:G,schema:J,parentSchema:Y,schemaCode:Q,it:W}=$;if(!G&&!J)return;let I=D.let("valid"),U=Y.items?(0,L5.getSchemaTypes)(Y.items):[];$.block$data(I,B,d6._`${Q} === false`),$.ok(I);function B(){let L=D.let("i",d6._`${X}.length`),F=D.let("j");$.setParams({i:L,j:F}),D.assign(I,!0),D.if(d6._`${L} > 1`,()=>(H()?V:z)(L,F))}function H(){return U.length>0&&!U.some((L)=>L==="object"||L==="array")}function V(L,F){let b=D.name("item"),P=(0,L5.checkDataTypes)(U,b,W.opts.strictNumbers,L5.DataType.Wrong),Z=D.const("indices",d6._`{}`);D.for(d6._`;${L}--;`,()=>{if(D.let(b,d6._`${X}[${L}]`),D.if(P,d6._`continue`),U.length>1)D.if(d6._`typeof ${b} == "string"`,d6._`${b} += "_"`);D.if(d6._`typeof ${Z}[${b}] == "number"`,()=>{D.assign(F,d6._`${Z}[${b}]`),$.error(),D.assign(I,!1).break()}).code(d6._`${Z}[${b}] = ${L}`)})}function z(L,F){let b=(0,q6$.useFunc)(D,H6$.default),P=D.name("outer");D.label(P).for(d6._`;${L}--;`,()=>D.for(d6._`${F} = ${L}; ${F}--;`,()=>D.if(d6._`${b}(${X}[${L}], ${X}[${F}])`,()=>{$.error(),D.assign(I,!1).break(P)})))}}};eT.default=V6$});var Xv=N((Dv)=>{Object.defineProperty(Dv,"__esModule",{value:!0});var O5=F$(),L6$=Z$(),O6$=GW(),F6$={message:"must be equal to constant",params:({schemaCode:$})=>O5._`{allowedValue: ${$}}`},b6$={keyword:"const",$data:!0,error:F6$,code($){let{gen:D,data:X,$data:G,schemaCode:J,schema:Y}=$;if(G||Y&&typeof Y=="object")$.fail$data(O5._`!${(0,L6$.useFunc)(D,O6$.default)}(${X}, ${J})`);else $.fail(O5._`${Y} !== ${X}`)}};Dv.default=b6$});var Gv=N((Jv)=>{Object.defineProperty(Jv,"__esModule",{value:!0});var e8=F$(),A6$=Z$(),M6$=GW(),S6$={message:"must be equal to one of the allowed values",params:({schemaCode:$})=>e8._`{allowedValues: ${$}}`},P6$={keyword:"enum",schemaType:"array",$data:!0,error:S6$,code($){let{gen:D,data:X,$data:G,schema:J,schemaCode:Y,it:Q}=$;if(!G&&J.length===0)throw Error("enum must have non-empty array");let W=J.length>=Q.opts.loopEnum,I,U=()=>I!==null&&I!==void 0?I:I=(0,A6$.useFunc)(D,M6$.default),B;if(W||G)B=D.let("valid"),$.block$data(B,H);else{if(!Array.isArray(J))throw Error("ajv implementation error");let z=D.const("vSchema",Y);B=(0,e8.or)(...J.map((L,F)=>V(z,F)))}$.pass(B);function H(){D.assign(B,!1),D.forOf("v",Y,(z)=>D.if(e8._`${U()}(${X}, ${z})`,()=>D.assign(B,!0).break()))}function V(z,L){let F=J[L];return typeof F==="object"&&F!==null?e8._`${U()}(${X}, ${z}[${L}])`:e8._`${X} === ${F}`}}};Jv.default=P6$});var Qv=N((Yv)=>{Object.defineProperty(Yv,"__esModule",{value:!0});var N6$=yT(),R6$=xT(),E6$=cT(),Z6$=iT(),T6$=rT(),v6$=dT(),k6$=tT(),C6$=$v(),y6$=Xv(),g6$=Gv(),x6$=[N6$.default,R6$.default,E6$.default,Z6$.default,T6$.default,v6$.default,k6$.default,C6$.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},y6$.default,g6$.default];Yv.default=x6$});var b5=N((Iv)=>{Object.defineProperty(Iv,"__esModule",{value:!0});Iv.validateAdditionalItems=void 0;var rD=F$(),F5=Z$(),u6$={message:({params:{len:$}})=>rD.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>rD._`{limit: ${$}}`},f6$={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:u6$,code($){let{parentSchema:D,it:X}=$,{items:G}=D;if(!Array.isArray(G)){(0,F5.checkStrictMode)(X,'"additionalItems" is ignored when "items" is not an array of schemas');return}Wv($,G)}};function Wv($,D){let{gen:X,schema:G,data:J,keyword:Y,it:Q}=$;Q.items=!0;let W=X.const("len",rD._`${J}.length`);if(G===!1)$.setParams({len:D.length}),$.pass(rD._`${W} <= ${D.length}`);else if(typeof G=="object"&&!(0,F5.alwaysValidSchema)(Q,G)){let U=X.var("valid",rD._`${W} <= ${D.length}`);X.if((0,rD.not)(U),()=>I(U)),$.ok(U)}function I(U){X.forRange("i",D.length,W,(B)=>{if($.subschema({keyword:Y,dataProp:B,dataPropType:F5.Type.Num},U),!Q.allErrors)X.if((0,rD.not)(U),()=>X.break())})}}Iv.validateAdditionalItems=Wv;Iv.default=f6$});var j5=N((qv)=>{Object.defineProperty(qv,"__esModule",{value:!0});qv.validateTuple=void 0;var Bv=F$(),YW=Z$(),c6$=a1(),l6$={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code($){let{schema:D,it:X}=$;if(Array.isArray(D))return zv($,"additionalItems",D);if(X.items=!0,(0,YW.alwaysValidSchema)(X,D))return;$.ok((0,c6$.validateArray)($))}};function zv($,D,X=$.schema){let{gen:G,parentSchema:J,data:Y,keyword:Q,it:W}=$;if(B(J),W.opts.unevaluated&&X.length&&W.items!==!0)W.items=YW.mergeEvaluated.items(G,X.length,W.items);let I=G.name("valid"),U=G.const("len",Bv._`${Y}.length`);X.forEach((H,V)=>{if((0,YW.alwaysValidSchema)(W,H))return;G.if(Bv._`${U} > ${V}`,()=>$.subschema({keyword:Q,schemaProp:V,dataProp:V},I)),$.ok(I)});function B(H){let{opts:V,errSchemaPath:z}=W,L=X.length,F=L===H.minItems&&(L===H.maxItems||H[D]===!1);if(V.strictTuples&&!F){let b=`"${Q}" is ${L}-tuple, but minItems or maxItems/${D} are not specified or different at path "${z}"`;(0,YW.checkStrictMode)(W,b,V.strictTuples)}}}qv.validateTuple=zv;qv.default=l6$});var Vv=N((Kv)=>{Object.defineProperty(Kv,"__esModule",{value:!0});var p6$=j5(),r6$={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:($)=>(0,p6$.validateTuple)($,"items")};Kv.default=r6$});var Ov=N((Lv)=>{Object.defineProperty(Lv,"__esModule",{value:!0});var wv=F$(),d6$=Z$(),o6$=a1(),t6$=b5(),a6$={message:({params:{len:$}})=>wv.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>wv._`{limit: ${$}}`},s6$={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:a6$,code($){let{schema:D,parentSchema:X,it:G}=$,{prefixItems:J}=X;if(G.items=!0,(0,d6$.alwaysValidSchema)(G,D))return;if(J)(0,t6$.validateAdditionalItems)($,J);else $.ok((0,o6$.validateArray)($))}};Lv.default=s6$});var bv=N((Fv)=>{Object.defineProperty(Fv,"__esModule",{value:!0});var s1=F$(),QW=Z$(),$1$={message:({params:{min:$,max:D}})=>D===void 0?s1.str`must contain at least ${$} valid item(s)`:s1.str`must contain at least ${$} and no more than ${D} valid item(s)`,params:({params:{min:$,max:D}})=>D===void 0?s1._`{minContains: ${$}}`:s1._`{minContains: ${$}, maxContains: ${D}}`},D1$={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:$1$,code($){let{gen:D,schema:X,parentSchema:G,data:J,it:Y}=$,Q,W,{minContains:I,maxContains:U}=G;if(Y.opts.next)Q=I===void 0?1:I,W=U;else Q=1;let B=D.const("len",s1._`${J}.length`);if($.setParams({min:Q,max:W}),W===void 0&&Q===0){(0,QW.checkStrictMode)(Y,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(W!==void 0&&Q>W){(0,QW.checkStrictMode)(Y,'"minContains" > "maxContains" is always invalid'),$.fail();return}if((0,QW.alwaysValidSchema)(Y,X)){let F=s1._`${B} >= ${Q}`;if(W!==void 0)F=s1._`${F} && ${B} <= ${W}`;$.pass(F);return}Y.items=!0;let H=D.name("valid");if(W===void 0&&Q===1)z(H,()=>D.if(H,()=>D.break()));else if(Q===0){if(D.let(H,!0),W!==void 0)D.if(s1._`${J}.length > 0`,V)}else D.let(H,!1),V();$.result(H,()=>$.reset());function V(){let F=D.name("_valid"),b=D.let("count",0);z(F,()=>D.if(F,()=>L(b)))}function z(F,b){D.forRange("i",0,B,(P)=>{$.subschema({keyword:"contains",dataProp:P,dataPropType:QW.Type.Num,compositeRule:!0},F),b()})}function L(F){if(D.code(s1._`${F}++`),W===void 0)D.if(s1._`${F} >= ${Q}`,()=>D.assign(H,!0).break());else if(D.if(s1._`${F} > ${W}`,()=>D.assign(H,!1).break()),Q===1)D.assign(H,!0);else D.if(s1._`${F} >= ${Q}`,()=>D.assign(H,!0))}}};Fv.default=D1$});var _v=N((Mv)=>{Object.defineProperty(Mv,"__esModule",{value:!0});Mv.validateSchemaDeps=Mv.validatePropertyDeps=Mv.error=void 0;var A5=F$(),J1$=Z$(),$G=a1();Mv.error={message:({params:{property:$,depsCount:D,deps:X}})=>{let G=D===1?"property":"properties";return A5.str`must have ${G} ${X} when property ${$} is present`},params:({params:{property:$,depsCount:D,deps:X,missingProperty:G}})=>A5._`{property: ${$},
100
- missingProperty: ${G},
101
- depsCount: ${D},
102
- deps: ${X}}`};var G1$={keyword:"dependencies",type:"object",schemaType:"object",error:Mv.error,code($){let[D,X]=Y1$($);jv($,D),Av($,X)}};function Y1$({schema:$}){let D={},X={};for(let G in $){if(G==="__proto__")continue;let J=Array.isArray($[G])?D:X;J[G]=$[G]}return[D,X]}function jv($,D=$.schema){let{gen:X,data:G,it:J}=$;if(Object.keys(D).length===0)return;let Y=X.let("missing");for(let Q in D){let W=D[Q];if(W.length===0)continue;let I=(0,$G.propertyInData)(X,G,Q,J.opts.ownProperties);if($.setParams({property:Q,depsCount:W.length,deps:W.join(", ")}),J.allErrors)X.if(I,()=>{for(let U of W)(0,$G.checkReportMissingProp)($,U)});else X.if(A5._`${I} && (${(0,$G.checkMissingProp)($,W,Y)})`),(0,$G.reportMissingProp)($,Y),X.else()}}Mv.validatePropertyDeps=jv;function Av($,D=$.schema){let{gen:X,data:G,keyword:J,it:Y}=$,Q=X.name("valid");for(let W in D){if((0,J1$.alwaysValidSchema)(Y,D[W]))continue;X.if((0,$G.propertyInData)(X,G,W,Y.opts.ownProperties),()=>{let I=$.subschema({keyword:J,schemaProp:W},Q);$.mergeValidEvaluated(I,Q)},()=>X.var(Q,!0)),$.ok(Q)}}Mv.validateSchemaDeps=Av;Mv.default=G1$});var Ev=N((Rv)=>{Object.defineProperty(Rv,"__esModule",{value:!0});var Nv=F$(),I1$=Z$(),U1$={message:"property name must be valid",params:({params:$})=>Nv._`{propertyName: ${$.propertyName}}`},B1$={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:U1$,code($){let{gen:D,schema:X,data:G,it:J}=$;if((0,I1$.alwaysValidSchema)(J,X))return;let Y=D.name("valid");D.forIn("key",G,(Q)=>{$.setParams({propertyName:Q}),$.subschema({keyword:"propertyNames",data:Q,dataTypes:["string"],propertyName:Q,compositeRule:!0},Y),D.if((0,Nv.not)(Y),()=>{if($.error(!0),!J.allErrors)D.break()})}),$.ok(Y)}};Rv.default=B1$});var M5=N((Zv)=>{Object.defineProperty(Zv,"__esModule",{value:!0});var WW=a1(),L4=F$(),q1$=Q0(),IW=Z$(),H1$={message:"must NOT have additional properties",params:({params:$})=>L4._`{additionalProperty: ${$.additionalProperty}}`},K1$={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:H1$,code($){let{gen:D,schema:X,parentSchema:G,data:J,errsCount:Y,it:Q}=$;if(!Y)throw Error("ajv implementation error");let{allErrors:W,opts:I}=Q;if(Q.props=!0,I.removeAdditional!=="all"&&(0,IW.alwaysValidSchema)(Q,X))return;let U=(0,WW.allSchemaProperties)(G.properties),B=(0,WW.allSchemaProperties)(G.patternProperties);H(),$.ok(L4._`${Y} === ${q1$.default.errors}`);function H(){D.forIn("key",J,(b)=>{if(!U.length&&!B.length)L(b);else D.if(V(b),()=>L(b))})}function V(b){let P;if(U.length>8){let Z=(0,IW.schemaRefOrVal)(Q,G.properties,"properties");P=(0,WW.isOwnProperty)(D,Z,b)}else if(U.length)P=(0,L4.or)(...U.map((Z)=>L4._`${b} === ${Z}`));else P=L4.nil;if(B.length)P=(0,L4.or)(P,...B.map((Z)=>L4._`${(0,WW.usePattern)($,Z)}.test(${b})`));return(0,L4.not)(P)}function z(b){D.code(L4._`delete ${J}[${b}]`)}function L(b){if(I.removeAdditional==="all"||I.removeAdditional&&X===!1){z(b);return}if(X===!1){if($.setParams({additionalProperty:b}),$.error(),!W)D.break();return}if(typeof X=="object"&&!(0,IW.alwaysValidSchema)(Q,X)){let P=D.name("valid");if(I.removeAdditional==="failing")F(b,P,!1),D.if((0,L4.not)(P),()=>{$.reset(),z(b)});else if(F(b,P),!W)D.if((0,L4.not)(P),()=>D.break())}}function F(b,P,Z){let v={keyword:"additionalProperties",dataProp:b,dataPropType:IW.Type.Str};if(Z===!1)Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(v,P)}}};Zv.default=K1$});var Cv=N((kv)=>{Object.defineProperty(kv,"__esModule",{value:!0});var w1$=c8(),Tv=a1(),S5=Z$(),vv=M5(),L1$={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:D,schema:X,parentSchema:G,data:J,it:Y}=$;if(Y.opts.removeAdditional==="all"&&G.additionalProperties===void 0)vv.default.code(new w1$.KeywordCxt(Y,vv.default,"additionalProperties"));let Q=(0,Tv.allSchemaProperties)(X);for(let H of Q)Y.definedProperties.add(H);if(Y.opts.unevaluated&&Q.length&&Y.props!==!0)Y.props=S5.mergeEvaluated.props(D,(0,S5.toHash)(Q),Y.props);let W=Q.filter((H)=>!(0,S5.alwaysValidSchema)(Y,X[H]));if(W.length===0)return;let I=D.name("valid");for(let H of W){if(U(H))B(H);else{if(D.if((0,Tv.propertyInData)(D,J,H,Y.opts.ownProperties)),B(H),!Y.allErrors)D.else().var(I,!0);D.endIf()}$.it.definedProperties.add(H),$.ok(I)}function U(H){return Y.opts.useDefaults&&!Y.compositeRule&&X[H].default!==void 0}function B(H){$.subschema({keyword:"properties",schemaProp:H,dataProp:H},I)}}};kv.default=L1$});var uv=N((hv)=>{Object.defineProperty(hv,"__esModule",{value:!0});var yv=a1(),UW=F$(),gv=Z$(),xv=Z$(),F1$={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:D,schema:X,data:G,parentSchema:J,it:Y}=$,{opts:Q}=Y,W=(0,yv.allSchemaProperties)(X),I=W.filter((F)=>(0,gv.alwaysValidSchema)(Y,X[F]));if(W.length===0||I.length===W.length&&(!Y.opts.unevaluated||Y.props===!0))return;let U=Q.strictSchema&&!Q.allowMatchingProperties&&J.properties,B=D.name("valid");if(Y.props!==!0&&!(Y.props instanceof UW.Name))Y.props=(0,xv.evaluatedPropsToName)(D,Y.props);let{props:H}=Y;V();function V(){for(let F of W){if(U)z(F);if(Y.allErrors)L(F);else D.var(B,!0),L(F),D.if(B)}}function z(F){for(let b in U)if(new RegExp(F).test(b))(0,gv.checkStrictMode)(Y,`property ${b} matches pattern ${F} (use allowMatchingProperties)`)}function L(F){D.forIn("key",G,(b)=>{D.if(UW._`${(0,yv.usePattern)($,F)}.test(${b})`,()=>{let P=I.includes(F);if(!P)$.subschema({keyword:"patternProperties",schemaProp:F,dataProp:b,dataPropType:xv.Type.Str},B);if(Y.opts.unevaluated&&H!==!0)D.assign(UW._`${H}[${b}]`,!0);else if(!P&&!Y.allErrors)D.if((0,UW.not)(B),()=>D.break())})})}}};hv.default=F1$});var mv=N((fv)=>{Object.defineProperty(fv,"__esModule",{value:!0});var j1$=Z$(),A1$={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code($){let{gen:D,schema:X,it:G}=$;if((0,j1$.alwaysValidSchema)(G,X)){$.fail();return}let J=D.name("valid");$.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},J),$.failResult(J,()=>$.reset(),()=>$.error())},error:{message:"must NOT be valid"}};fv.default=A1$});var lv=N((cv)=>{Object.defineProperty(cv,"__esModule",{value:!0});var S1$=a1(),P1$={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:S1$.validateUnion,error:{message:"must match a schema in anyOf"}};cv.default=P1$});var pv=N((iv)=>{Object.defineProperty(iv,"__esModule",{value:!0});var BW=F$(),N1$=Z$(),R1$={message:"must match exactly one schema in oneOf",params:({params:$})=>BW._`{passingSchemas: ${$.passing}}`},E1$={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:R1$,code($){let{gen:D,schema:X,parentSchema:G,it:J}=$;if(!Array.isArray(X))throw Error("ajv implementation error");if(J.opts.discriminator&&G.discriminator)return;let Y=X,Q=D.let("valid",!1),W=D.let("passing",null),I=D.name("_valid");$.setParams({passing:W}),D.block(U),$.result(Q,()=>$.reset(),()=>$.error(!0));function U(){Y.forEach((B,H)=>{let V;if((0,N1$.alwaysValidSchema)(J,B))D.var(I,!0);else V=$.subschema({keyword:"oneOf",schemaProp:H,compositeRule:!0},I);if(H>0)D.if(BW._`${I} && ${Q}`).assign(Q,!1).assign(W,BW._`[${W}, ${H}]`).else();D.if(I,()=>{if(D.assign(Q,!0),D.assign(W,H),V)$.mergeEvaluated(V,BW.Name)})})}}};iv.default=E1$});var nv=N((rv)=>{Object.defineProperty(rv,"__esModule",{value:!0});var T1$=Z$(),v1$={keyword:"allOf",schemaType:"array",code($){let{gen:D,schema:X,it:G}=$;if(!Array.isArray(X))throw Error("ajv implementation error");let J=D.name("valid");X.forEach((Y,Q)=>{if((0,T1$.alwaysValidSchema)(G,Y))return;let W=$.subschema({keyword:"allOf",schemaProp:Q},J);$.ok(J),$.mergeEvaluated(W)})}};rv.default=v1$});var av=N((tv)=>{Object.defineProperty(tv,"__esModule",{value:!0});var zW=F$(),ov=Z$(),C1$={message:({params:$})=>zW.str`must match "${$.ifClause}" schema`,params:({params:$})=>zW._`{failingKeyword: ${$.ifClause}}`},y1$={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:C1$,code($){let{gen:D,parentSchema:X,it:G}=$;if(X.then===void 0&&X.else===void 0)(0,ov.checkStrictMode)(G,'"if" without "then" and "else" is ignored');let J=dv(G,"then"),Y=dv(G,"else");if(!J&&!Y)return;let Q=D.let("valid",!0),W=D.name("_valid");if(I(),$.reset(),J&&Y){let B=D.let("ifClause");$.setParams({ifClause:B}),D.if(W,U("then",B),U("else",B))}else if(J)D.if(W,U("then"));else D.if((0,zW.not)(W),U("else"));$.pass(Q,()=>$.error(!0));function I(){let B=$.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},W);$.mergeEvaluated(B)}function U(B,H){return()=>{let V=$.subschema({keyword:B},W);if(D.assign(Q,W),$.mergeValidEvaluated(V,Q),H)D.assign(H,zW._`${B}`);else $.setParams({ifClause:B})}}}};function dv($,D){let X=$.schema[D];return X!==void 0&&!(0,ov.alwaysValidSchema)($,X)}tv.default=y1$});var ev=N((sv)=>{Object.defineProperty(sv,"__esModule",{value:!0});var x1$=Z$(),h1$={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:$,parentSchema:D,it:X}){if(D.if===void 0)(0,x1$.checkStrictMode)(X,`"${$}" without "if" is ignored`)}};sv.default=h1$});var Dk=N(($k)=>{Object.defineProperty($k,"__esModule",{value:!0});var f1$=b5(),m1$=Vv(),c1$=j5(),l1$=Ov(),i1$=bv(),p1$=_v(),r1$=Ev(),n1$=M5(),d1$=Cv(),o1$=uv(),t1$=mv(),a1$=lv(),s1$=pv(),e1$=nv(),$4$=av(),D4$=ev();function X4$($=!1){let D=[t1$.default,a1$.default,s1$.default,e1$.default,$4$.default,D4$.default,r1$.default,n1$.default,p1$.default,d1$.default,o1$.default];if($)D.push(m1$.default,l1$.default);else D.push(f1$.default,c1$.default);return D.push(i1$.default),D}$k.default=X4$});var Jk=N((Xk)=>{Object.defineProperty(Xk,"__esModule",{value:!0});var R6=F$(),G4$={message:({schemaCode:$})=>R6.str`must match format "${$}"`,params:({schemaCode:$})=>R6._`{format: ${$}}`},Y4$={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:G4$,code($,D){let{gen:X,data:G,$data:J,schema:Y,schemaCode:Q,it:W}=$,{opts:I,errSchemaPath:U,schemaEnv:B,self:H}=W;if(!I.validateFormats)return;if(J)V();else z();function V(){let L=X.scopeValue("formats",{ref:H.formats,code:I.code.formats}),F=X.const("fDef",R6._`${L}[${Q}]`),b=X.let("fType"),P=X.let("format");X.if(R6._`typeof ${F} == "object" && !(${F} instanceof RegExp)`,()=>X.assign(b,R6._`${F}.type || "string"`).assign(P,R6._`${F}.validate`),()=>X.assign(b,R6._`"string"`).assign(P,F)),$.fail$data((0,R6.or)(Z(),v()));function Z(){if(I.strictSchema===!1)return R6.nil;return R6._`${Q} && !${P}`}function v(){let g=B.$async?R6._`(${F}.async ? await ${P}(${G}) : ${P}(${G}))`:R6._`${P}(${G})`,T=R6._`(typeof ${P} == "function" ? ${g} : ${P}.test(${G}))`;return R6._`${P} && ${P} !== true && ${b} === ${D} && !${T}`}}function z(){let L=H.formats[Y];if(!L){Z();return}if(L===!0)return;let[F,b,P]=v(L);if(F===D)$.pass(g());function Z(){if(I.strictSchema===!1){H.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${Y}" ignored in schema at path "${U}"`}}function v(T){let o$=T instanceof RegExp?(0,R6.regexpCode)(T):I.code.formats?R6._`${I.code.formats}${(0,R6.getProperty)(Y)}`:void 0,e$=X.scopeValue("formats",{key:Y,ref:T,code:o$});if(typeof T=="object"&&!(T instanceof RegExp))return[T.type||"string",T.validate,R6._`${e$}.validate`];return["string",T,e$]}function g(){if(typeof L=="object"&&!(L instanceof RegExp)&&L.async){if(!B.$async)throw Error("async format in sync schema");return R6._`await ${P}(${G})`}return typeof b=="function"?R6._`${P}(${G})`:R6._`${P}.test(${G})`}}}};Xk.default=Y4$});var Yk=N((Gk)=>{Object.defineProperty(Gk,"__esModule",{value:!0});var W4$=Jk(),I4$=[W4$.default];Gk.default=I4$});var Ik=N((Qk)=>{Object.defineProperty(Qk,"__esModule",{value:!0});Qk.contentVocabulary=Qk.metadataVocabulary=void 0;Qk.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qk.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var zk=N((Bk)=>{Object.defineProperty(Bk,"__esModule",{value:!0});var z4$=kT(),q4$=Qv(),H4$=Dk(),K4$=Yk(),Uk=Ik(),V4$=[z4$.default,q4$.default,(0,H4$.default)(),K4$.default,Uk.metadataVocabulary,Uk.contentVocabulary];Bk.default=V4$});var Vk=N((Hk)=>{Object.defineProperty(Hk,"__esModule",{value:!0});Hk.DiscrError=void 0;var qk;(function($){$.Tag="tag",$.Mapping="mapping"})(qk||(Hk.DiscrError=qk={}))});var Ok=N((Lk)=>{Object.defineProperty(Lk,"__esModule",{value:!0});var UJ=F$(),P5=Vk(),wk=dQ(),L4$=l8(),O4$=Z$(),F4$={message:({params:{discrError:$,tagName:D}})=>$===P5.DiscrError.Tag?`tag "${D}" must be string`:`value of tag "${D}" must be in oneOf`,params:({params:{discrError:$,tag:D,tagName:X}})=>UJ._`{error: ${$}, tag: ${X}, tagValue: ${D}}`},b4$={keyword:"discriminator",type:"object",schemaType:"object",error:F4$,code($){let{gen:D,data:X,schema:G,parentSchema:J,it:Y}=$,{oneOf:Q}=J;if(!Y.opts.discriminator)throw Error("discriminator: requires discriminator option");let W=G.propertyName;if(typeof W!="string")throw Error("discriminator: requires propertyName");if(G.mapping)throw Error("discriminator: mapping is not supported");if(!Q)throw Error("discriminator: requires oneOf keyword");let I=D.let("valid",!1),U=D.const("tag",UJ._`${X}${(0,UJ.getProperty)(W)}`);D.if(UJ._`typeof ${U} == "string"`,()=>B(),()=>$.error(!1,{discrError:P5.DiscrError.Tag,tag:U,tagName:W})),$.ok(I);function B(){let z=V();D.if(!1);for(let L in z)D.elseIf(UJ._`${U} === ${L}`),D.assign(I,H(z[L]));D.else(),$.error(!1,{discrError:P5.DiscrError.Mapping,tag:U,tagName:W}),D.endIf()}function H(z){let L=D.name("valid"),F=$.subschema({keyword:"oneOf",schemaProp:z},L);return $.mergeEvaluated(F,UJ.Name),L}function V(){var z;let L={},F=P(J),b=!0;for(let g=0;g<Q.length;g++){let T=Q[g];if((T===null||T===void 0?void 0:T.$ref)&&!(0,O4$.schemaHasRulesButRef)(T,Y.self.RULES)){let e$=T.$ref;if(T=wk.resolveRef.call(Y.self,Y.schemaEnv.root,Y.baseId,e$),T instanceof wk.SchemaEnv)T=T.schema;if(T===void 0)throw new L4$.default(Y.opts.uriResolver,Y.baseId,e$)}let o$=(z=T===null||T===void 0?void 0:T.properties)===null||z===void 0?void 0:z[W];if(typeof o$!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${W}"`);b=b&&(F||P(T)),Z(o$,g)}if(!b)throw Error(`discriminator: "${W}" must be required`);return L;function P({required:g}){return Array.isArray(g)&&g.includes(W)}function Z(g,T){if(g.const)v(g.const,T);else if(g.enum)for(let o$ of g.enum)v(o$,T);else throw Error(`discriminator: "properties/${W}" must have "const" or "enum"`)}function v(g,T){if(typeof g!="string"||g in L)throw Error(`discriminator: "${W}" values must be unique strings`);L[g]=T}}}};Lk.default=b4$});var Fk=N((wH$,A4$)=>{A4$.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 N5=N((P1,_5)=>{Object.defineProperty(P1,"__esModule",{value:!0});P1.MissingRefError=P1.ValidationError=P1.CodeGen=P1.Name=P1.nil=P1.stringify=P1.str=P1._=P1.KeywordCxt=P1.Ajv=void 0;var M4$=MT(),S4$=zk(),P4$=Ok(),bk=Fk(),_4$=["/properties"],qW="http://json-schema.org/draft-07/schema";class DG extends M4$.default{_addVocabularies(){if(super._addVocabularies(),S4$.default.forEach(($)=>this.addVocabulary($)),this.opts.discriminator)this.addKeyword(P4$.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let $=this.opts.$data?this.$dataMetaSchema(bk,_4$):bk;this.addMetaSchema($,qW,!1),this.refs["http://json-schema.org/schema"]=qW}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(qW)?qW:void 0)}}P1.Ajv=DG;_5.exports=P1=DG;_5.exports.Ajv=DG;Object.defineProperty(P1,"__esModule",{value:!0});P1.default=DG;var N4$=c8();Object.defineProperty(P1,"KeywordCxt",{enumerable:!0,get:function(){return N4$.KeywordCxt}});var BJ=F$();Object.defineProperty(P1,"_",{enumerable:!0,get:function(){return BJ._}});Object.defineProperty(P1,"str",{enumerable:!0,get:function(){return BJ.str}});Object.defineProperty(P1,"stringify",{enumerable:!0,get:function(){return BJ.stringify}});Object.defineProperty(P1,"nil",{enumerable:!0,get:function(){return BJ.nil}});Object.defineProperty(P1,"Name",{enumerable:!0,get:function(){return BJ.Name}});Object.defineProperty(P1,"CodeGen",{enumerable:!0,get:function(){return BJ.CodeGen}});var R4$=rQ();Object.defineProperty(P1,"ValidationError",{enumerable:!0,get:function(){return R4$.default}});var E4$=l8();Object.defineProperty(P1,"MissingRefError",{enumerable:!0,get:function(){return E4$.default}})});var Zk=N((Rk)=>{Object.defineProperty(Rk,"__esModule",{value:!0});Rk.formatNames=Rk.fastFormats=Rk.fullFormats=void 0;function y4($,D){return{validate:$,compare:D}}Rk.fullFormats={date:y4(Sk,T5),time:y4(E5(!0),v5),"date-time":y4(jk(!0),_k),"iso-time":y4(E5(),Pk),"iso-date-time":y4(jk(),Nk),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:x4$,"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:i4$,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:h4$,int32:{type:"number",validate:m4$},int64:{type:"number",validate:c4$},float:{type:"number",validate:Mk},double:{type:"number",validate:Mk},password:!0,binary:!0};Rk.fastFormats={...Rk.fullFormats,date:y4(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,T5),time:y4(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v5),"date-time":y4(/^\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,_k),"iso-time":y4(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Pk),"iso-date-time":y4(/^\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,Nk),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};Rk.formatNames=Object.keys(Rk.fullFormats);function v4$($){return $%4===0&&($%100!==0||$%400===0)}var k4$=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,C4$=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Sk($){let D=k4$.exec($);if(!D)return!1;let X=+D[1],G=+D[2],J=+D[3];return G>=1&&G<=12&&J>=1&&J<=(G===2&&v4$(X)?29:C4$[G])}function T5($,D){if(!($&&D))return;if($>D)return 1;if($<D)return-1;return 0}var R5=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function E5($){return function(X){let G=R5.exec(X);if(!G)return!1;let J=+G[1],Y=+G[2],Q=+G[3],W=G[4],I=G[5]==="-"?-1:1,U=+(G[6]||0),B=+(G[7]||0);if(U>23||B>59||$&&!W)return!1;if(J<=23&&Y<=59&&Q<60)return!0;let H=Y-B*I,V=J-U*I-(H<0?1:0);return(V===23||V===-1)&&(H===59||H===-1)&&Q<61}}function v5($,D){if(!($&&D))return;let X=new Date("2020-01-01T"+$).valueOf(),G=new Date("2020-01-01T"+D).valueOf();if(!(X&&G))return;return X-G}function Pk($,D){if(!($&&D))return;let X=R5.exec($),G=R5.exec(D);if(!(X&&G))return;if($=X[1]+X[2]+X[3],D=G[1]+G[2]+G[3],$>D)return 1;if($<D)return-1;return 0}var Z5=/t|\s/i;function jk($){let D=E5($);return function(G){let J=G.split(Z5);return J.length===2&&Sk(J[0])&&D(J[1])}}function _k($,D){if(!($&&D))return;let X=new Date($).valueOf(),G=new Date(D).valueOf();if(!(X&&G))return;return X-G}function Nk($,D){if(!($&&D))return;let[X,G]=$.split(Z5),[J,Y]=D.split(Z5),Q=T5(X,J);if(Q===void 0)return;return Q||v5(G,Y)}var y4$=/\/|:/,g4$=/^(?:[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 x4$($){return y4$.test($)&&g4$.test($)}var Ak=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function h4$($){return Ak.lastIndex=0,Ak.test($)}var u4$=-2147483648,f4$=2147483647;function m4$($){return Number.isInteger($)&&$<=f4$&&$>=u4$}function c4$($){return Number.isInteger($)}function Mk(){return!0}var l4$=/[^\\]\\Z/;function i4$($){if(l4$.test($))return!1;try{return new RegExp($),!0}catch(D){return!1}}});var vk=N((Tk)=>{Object.defineProperty(Tk,"__esModule",{value:!0});Tk.formatLimitDefinition=void 0;var r4$=N5(),O4=F$(),t0=O4.operators,HW={formatMaximum:{okStr:"<=",ok:t0.LTE,fail:t0.GT},formatMinimum:{okStr:">=",ok:t0.GTE,fail:t0.LT},formatExclusiveMaximum:{okStr:"<",ok:t0.LT,fail:t0.GTE},formatExclusiveMinimum:{okStr:">",ok:t0.GT,fail:t0.LTE}},n4$={message:({keyword:$,schemaCode:D})=>O4.str`should be ${HW[$].okStr} ${D}`,params:({keyword:$,schemaCode:D})=>O4._`{comparison: ${HW[$].okStr}, limit: ${D}}`};Tk.formatLimitDefinition={keyword:Object.keys(HW),type:"string",schemaType:"string",$data:!0,error:n4$,code($){let{gen:D,data:X,schemaCode:G,keyword:J,it:Y}=$,{opts:Q,self:W}=Y;if(!Q.validateFormats)return;let I=new r4$.KeywordCxt(Y,W.RULES.all.format.definition,"format");if(I.$data)U();else B();function U(){let V=D.scopeValue("formats",{ref:W.formats,code:Q.code.formats}),z=D.const("fmt",O4._`${V}[${I.schemaCode}]`);$.fail$data((0,O4.or)(O4._`typeof ${z} != "object"`,O4._`${z} instanceof RegExp`,O4._`typeof ${z}.compare != "function"`,H(z)))}function B(){let V=I.schema,z=W.formats[V];if(!z||z===!0)return;if(typeof z!="object"||z instanceof RegExp||typeof z.compare!="function")throw Error(`"${J}": format "${V}" does not define "compare" function`);let L=D.scopeValue("formats",{key:V,ref:z,code:Q.code.formats?O4._`${Q.code.formats}${(0,O4.getProperty)(V)}`:void 0});$.fail$data(H(L))}function H(V){return O4._`${V}.compare(${X}, ${G}) ${HW[J].fail} 0`}},dependencies:["format"]};var d4$=($)=>{return $.addKeyword(Tk.formatLimitDefinition),$};Tk.default=d4$});var gk=N((XG,yk)=>{Object.defineProperty(XG,"__esModule",{value:!0});var zJ=Zk(),t4$=vk(),y5=F$(),kk=new y5.Name("fullFormats"),a4$=new y5.Name("fastFormats"),g5=($,D={keywords:!0})=>{if(Array.isArray(D))return Ck($,D,zJ.fullFormats,kk),$;let[X,G]=D.mode==="fast"?[zJ.fastFormats,a4$]:[zJ.fullFormats,kk],J=D.formats||zJ.formatNames;if(Ck($,J,X,G),D.keywords)(0,t4$.default)($);return $};g5.get=($,D="full")=>{let G=(D==="fast"?zJ.fastFormats:zJ.fullFormats)[$];if(!G)throw Error(`Unknown format "${$}"`);return G};function Ck($,D,X,G){var J,Y;(J=(Y=$.opts.code).formats)!==null&&J!==void 0||(Y.formats=y5._`require("ajv-formats/dist/formats").${G}`);for(let Q of D)$.addFormat(Q,X[Q])}yk.exports=XG=g5;Object.defineProperty(XG,"__esModule",{value:!0});XG.default=g5});var Sb=eJ(Mb(),1),{program:PJ$,createCommand:_J$,createArgument:NJ$,createOption:RJ$,CommanderError:Pb,InvalidArgumentError:EJ$,InvalidOptionArgumentError:ZJ$,Command:_b,Argument:TJ$,Option:vJ$,Help:kJ$}=Sb.default;var Ih={E_INVALID_BASE_URL:"Invalid ZenTao baseUrl.",E_NO_GLOBAL_CLIENT:"No global client configured. Call ZentaoClient.init() or pass options.client.",E_HTTP_ERROR:"HTTP request failed: {status} {statusText}",E_NETWORK_ERROR:"Network request failed: {message}",E_TIMEOUT:"Request timed out.",E_INSECURE_BROWSER:"The insecure option is only supported in Node.js runtimes.",E_LOGIN_FAILED:"ZenTao login failed.",E_INVALID_PROFILE:"Invalid ZenTao profile.",E_NO_PROFILE:"No ZenTao profile is configured.",E_PROFILE_NOT_FOUND:"ZenTao profile not found: {profileKey}",E_PROFILE_STORAGE_INVALID:"ZenTao profile storage is not valid JSON.",E_PROFILE_STORAGE_UNAVAILABLE:"ZenTao profile storage is unavailable in this runtime.",E_INVALID_MODULE:"Unknown module: {module}",E_INVALID_ACTION:"Unknown action: {module}-{action}",E_INVALID_MODULE_DEFINITION:"Invalid module definition.",E_INVALID_ACTION_DEFINITION:"Invalid module action definition.",E_INDETERMINATE_ACTION_METHOD:'Cannot infer HTTP method for action "{action}" from type "{type}"; specify "method" explicitly.',E_INDETERMINATE_ACTION_RESULT_TYPE:'Cannot infer result type for action "{action}" from type "{type}"; specify "resultType" explicitly.',E_MISSING_PARAM:"Missing required parameter: {param}",E_INVALID_PARAM:"Invalid value for parameter {param}: {value}",E_INVALID_REQUEST_NAME:'Request name must use the form "moduleName", "moduleName/methodName", or "moduleName/<objectID>".',E_API_FAILED:"ZenTao API returned failure: {message}"};class Y$ extends Error{code;details;constructor($,D,X){let G=Ih[$];if(D)for(let[J,Y]of Object.entries(D))G=G.replaceAll(`{${J}}`,String(Y));super(G);this.name="ZentaoError",this.code=$,this.details=X}}function Q3(){return typeof process<"u"&&Boolean(process.versions?.node)}function Nb($){return import($)}function Uh($){let D={};return new Headers($).forEach((X,G)=>{D[G]=X}),D}function Bh($){let D=new Headers;for(let[X,G]of Object.entries($)){if(G===void 0)continue;D.set(X,Array.isArray(G)?G.join(", "):String(G))}return D}function AU($,D){let X=D.toLowerCase();return Object.keys($).some((G)=>G.toLowerCase()===X)}async function zh($,D){if($===void 0||$===null)return;if(typeof $==="string")return $;if($ instanceof Uint8Array)return $;if($ instanceof ArrayBuffer)return new Uint8Array($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength);if($ instanceof Blob){if($.type&&!AU(D,"content-type"))D["content-type"]=$.type;return new Uint8Array(await $.arrayBuffer())}if(typeof FormData<"u"&&$ instanceof FormData){let X=new Request("https://zentao-api.local/",{method:"POST",body:$}),G=X.headers.get("content-type");if(G&&!AU(D,"content-type"))D["content-type"]=G;return new Uint8Array(await X.arrayBuffer())}if(typeof URLSearchParams<"u"&&$ instanceof URLSearchParams){if(!AU(D,"content-type"))D["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";return $.toString()}return String($)}function Rb(){return new DOMException("The operation was aborted.","AbortError")}function qh($){let D=$.reduce((J,Y)=>J+Y.byteLength,0),X=new Uint8Array(D),G=0;for(let J of $)X.set(J,G),G+=J.byteLength;return X.buffer}async function Hh($,D,X){let G=new URL($),J=G.protocol==="https:"?await Nb("node:https"):await Nb("node:http"),Y=Uh(D.headers),Q=await zh(D.body,Y);return new Promise((W,I)=>{if(D.signal?.aborted){I(Rb());return}let U=J.request(G,{method:D.method??"GET",headers:Y,rejectUnauthorized:X},(V)=>{let z=[];V.on("data",(L)=>{z.push(typeof L==="string"?new TextEncoder().encode(L):L)}),V.on("end",()=>{B();let L=z.length>0?qh(z):void 0,F=new Response(L,{status:V.statusCode??200,statusText:V.statusMessage??"",headers:Bh(V.headers)});Object.defineProperty(F,"url",{value:$}),W(F)})}),B=()=>{D.signal?.removeEventListener("abort",H)},H=()=>{B(),U.destroy(Rb())};if(U.on("error",(V)=>{B(),I(V)}),D.signal?.addEventListener("abort",H,{once:!0}),Q!==void 0)U.write(Q);U.end()})}function MU($){if($&&!Q3())throw new Y$("E_INSECURE_BROWSER")}async function Eb($,D,X){if(!$)return fetch(D,X);return MU($),Hh(D,X,!1)}var SU={};function D9(){return{...SU}}function Zb($){SU={...SU,...$}}function Z6($){return Boolean($)&&typeof $==="object"&&!Array.isArray($)}function QX($){return $===void 0||$===null||$===""}function V1($,D){let X=D.split("."),G=$;for(let J of X){if(G===null||G===void 0||typeof G!=="object")return;G=G[J]}return G}function KD($){return Array.isArray($)?$:[$]}function WX($){let D=$.trim().replace(/\/+$/,"");if(!D)throw new Y$("E_INVALID_BASE_URL");let X=D.replace(/\/api\.php\/v2$/i,""),G;try{G=new URL(X)}catch{throw new Y$("E_INVALID_BASE_URL")}if(!["http:","https:"].includes(G.protocol)||G.search||G.hash)throw new Y$("E_INVALID_BASE_URL");return G.toString().replace(/\/+$/,"")}function PU($,D){let X={};for(let G of D){let J=V1($,G);if(J===void 0)continue;let Y=G.split("."),Q=X;for(let W=0;W<Y.length-1;W++){let I=Y[W];if(!Z6(Q[I]))Q[I]={};Q=Q[I]}Q[Y[Y.length-1]]=J}return X}function Cb($,D){return $.map((X)=>PU(X,D))}function X9($,D){let X=Number($),G=Number(D);if($!==""&&D!==""&&!Number.isNaN(X)&&!Number.isNaN(G))return X-G;return String($).localeCompare(String(D))}function Tb($,D){let X=Number($),G=Number(D);if($!==""&&D!==""&&!Number.isNaN(X)&&!Number.isNaN(G))return X===G;return String($)===String(D)}function vb($,D){if($===void 0||$===null)return!1;let X=String($).toLowerCase();return KD(D).some((G)=>X.includes(String(G).toLowerCase()))}function kb($,D){let X=V1($,D.key),{operator:G,value:J}=D;switch(G){case"=":return KD(J).some((Y)=>Tb(X,Y));case"!=":return KD(J).every((Y)=>!Tb(X,Y));case"~":return vb(X,J);case"!~":return!vb(X,J);case">":return X9(X,J)>0;case"<":return X9(X,J)<0;case">=":return X9(X,J)>=0;case"<=":return X9(X,J)<=0;default:return!1}}function Kh($,D){if(D.conditions.length===0)return!0;return D.operator==="OR"?D.conditions.some((X)=>kb($,X)):D.conditions.every((X)=>kb($,X))}function yb($,D){if(D.length===0)return $.slice();return $.filter((X)=>D.every((G)=>Kh(X,G)))}function W3($,D){if($===null||$===void 0)return;if(Array.isArray($))for(let X of $)W3(X,D);else if(Z6($))for(let X of Object.values($))W3(X,D);else D.push(String($))}function Vh($,D){let X=[];if(D&&D.length>0)for(let G of D)W3(V1($,G),X);else W3($,X);return X.join("\x00").toLowerCase()}function gb($,D,X){let G=D.map((J)=>J.toLowerCase().split(/\s+/).filter(Boolean)).filter((J)=>J.length>0);if(G.length===0)return $.slice();return $.filter((J)=>{let Y=Vh(J,X);return G.every((Q)=>Q.some((W)=>Y.includes(W)))})}function wh($){if(typeof $==="function")return $;let D=$.lastIndexOf(":"),X=D>=0?$.slice(0,D):$,J=(D>=0?$.slice(D+1):"asc")==="desc"?-1:1;return(Y,Q)=>X9(V1(Y,X),V1(Q,X))*J}function xb($,D){let X=D.map(wh);return $.slice().sort((G,J)=>{for(let Y of X){let Q=Y(G,J);if(Q!==0)return Q}return 0})}var Lh=[">=","<=","!=","!~","=","~",">","<"];function Oh($){if($.startsWith("[")&&$.endsWith("]"))return $.slice(1,-1).split(",").map((D)=>D.trim()).filter(Boolean);if($==="true")return!0;if($==="false")return!1;if($!==""&&!Number.isNaN(Number($)))return Number($);return $}function Fh($){for(let D of Lh){let X=$.indexOf(D);if(X>0)return{key:$.slice(0,X).trim(),operator:D,value:Oh($.slice(X+D.length).trim())}}return}function bh($){if($===void 0||$==="")return;let D=Number($);if(!Number.isFinite(D)||D<0)return;return Math.floor(D)}function I3($,D){if(!Array.isArray($))return D.pick?PU($,D.pick):{...$};let X=D,G=$;if(X.filter&&X.filter.length>0){let Y=X.filter.map(Fh).filter((Q)=>Q!==void 0);if(Y.length>0)G=yb(G,[{operator:"AND",conditions:Y}])}if(X.search&&X.search.length>0)G=gb(G,X.search,X.searchFields);if(X.sort){let Y=X.sort.split(",").map((Q)=>Q.trim()).filter(Boolean);if(Y.length>0)G=xb(G,Y)}let J=bh(X.limit);if(J!==void 0)G=G.slice(0,J);if(X.pick)G=Cb(G,X.pick);return G}var fb="ZENTAO_PROFILES",jh=[".config","zentao","zentao.json"];function mb($){return Boolean($)&&typeof $==="object"&&!Array.isArray($)}function cb($){if($===void 0)return $;return JSON.parse(JSON.stringify($))}function lb(){return new Date().toISOString()}function J9($){return import($)}var hb=Promise.resolve();function ib($){let D=hb.then($,$);return hb=D.catch(()=>{return}),D}function pb(){try{return globalThis.localStorage}catch{return}}async function rb(){let $=await J9("node:path"),D=process.env.HOME??process.env.USERPROFILE??(await J9("node:os")).homedir();if(!D)throw new Y$("E_PROFILE_STORAGE_UNAVAILABLE");return $.join(D,...jh)}function Ah($,D){let X=$.trim(),G=WX(D);if(!X)throw new Y$("E_INVALID_PROFILE");return`${X}@${G}`}function _U($){if(!mb($)||typeof $.server!=="string"||typeof $.account!=="string"||typeof $.token!=="string")throw new Y$("E_INVALID_PROFILE");let D=$.token.trim();if(!D)throw new Y$("E_INVALID_PROFILE");let X=cb($);return delete X.key,{...X,server:WX($.server),account:$.account.trim(),token:D}}function nb($){if(!mb($))return{profiles:[]};let D=Array.isArray($.profiles)?$.profiles.flatMap((G)=>{try{return[_U(G)]}catch{return[]}}):[],X=typeof $.currentProfile==="string"?$.currentProfile:void 0;return X?{currentProfile:X,profiles:D}:{profiles:D}}function ub($){try{return nb(JSON.parse($))}catch(D){throw new Y$("E_PROFILE_STORAGE_INVALID",void 0,D)}}async function db(){if(Q3()){let X=await J9("node:fs/promises"),G=await rb();try{return ub(await X.readFile(G,"utf8"))}catch(J){if(J.code==="ENOENT")return{profiles:[]};throw J}}let $=pb();if(!$)throw new Y$("E_PROFILE_STORAGE_UNAVAILABLE");let D=$.getItem(fb);return D?ub(D):{profiles:[]}}async function ob($){let D=nb($),X=`${JSON.stringify(D,null,2)}
103
- `;if(Q3()){let J=await J9("node:fs/promises"),Y=await J9("node:path"),Q=await rb(),W=Y.dirname(Q),I=Y.join(W,`.zentao.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`);await J.mkdir(W,{recursive:!0,mode:448}),await J.chmod(W,448).catch(()=>{return});try{await J.writeFile(I,X,{encoding:"utf8",mode:384}),await J.rename(I,Q),await J.chmod(Q,384).catch(()=>{return})}catch(U){throw await J.rm(I,{force:!0}).catch(()=>{return}),U}return}let G=pb();if(!G)throw new Y$("E_PROFILE_STORAGE_UNAVAILABLE");G.setItem(fb,X)}function tb($){let D=_U($);return{...cb(D),key:U3(D)}}function Mh($,D){return $.profiles.find((X)=>U3(X)===D)}function U3($){return Ah($.account,$.server)}function ab($){return ib(async()=>{let D=await db(),X=lb(),G=_U({...$,loginTime:$.loginTime??X,lastUsedTime:$.lastUsedTime??X}),J=U3(G),Y=D.profiles.findIndex((Q)=>U3(Q)===J);if(Y>=0)D.profiles[Y]=G;else D.profiles.push(G);return D.currentProfile=J,await ob(D),tb(G)})}function sb($){return ib(async()=>{let D=await db(),X=$??D.currentProfile;if(!X)throw new Y$("E_NO_PROFILE");let G=Mh(D,X);if(!G)throw new Y$("E_PROFILE_NOT_FOUND",{profileKey:X});return G.lastUsedTime=lb(),D.currentProfile=X,await ob(D),tb(G)})}var Sh=1e4;function Ph($,D,X){let G=D.startsWith("/")?D:`/${D}`,J=new URL(`${$}${G}`);for(let[Y,Q]of Object.entries(X??{})){if(Q===void 0)continue;J.searchParams.set(Y,String(Q))}return J.toString()}function _h($){if(!$||typeof $!=="object")return!1;let D=Object.getPrototypeOf($);return D===Object.prototype||D===null}function B3($,D){let X=globalThis[D];return typeof X==="function"&&$ instanceof X}function Nh($){return $ instanceof ArrayBuffer||ArrayBuffer.isView($)}function eb($,D,X){if(X===void 0)return;if(Array.isArray(X)){for(let G of X)eb($,D,G);return}$.append(D,X===null?"":String(X))}function Rh($,D,X){if($===void 0||$===null)return;if(D==="form"){let G=$ instanceof URLSearchParams?$:new URLSearchParams;if(!($ instanceof URLSearchParams)&&_h($))for(let[J,Y]of Object.entries($))eb(G,J,Y);else if(!($ instanceof URLSearchParams))throw new Y$("E_INVALID_PARAM",{param:"body",value:String($)});if(!X.has("Content-Type"))X.set("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");return G}if(D==="raw"||typeof $==="string"||Nh($)||B3($,"FormData")||B3($,"URLSearchParams")||B3($,"Blob")||B3($,"ReadableStream"))return $;if(!X.has("Content-Type"))X.set("Content-Type","application/json");return JSON.stringify($)}function Eh($,D){let X=new AbortController,G=()=>X.abort(D?.reason),J=setTimeout(()=>X.abort(),$);if(D?.aborted)G();else D?.addEventListener("abort",G,{once:!0});return{signal:X.signal,cleanup:()=>{clearTimeout(J),D?.removeEventListener("abort",G)}}}async function Zh($,D="auto"){if(D==="response")return $;if(D==="arrayBuffer")return $.arrayBuffer();if(D==="blob")return $.blob();if(D==="text")return $.text();if(D==="json"){let G=await $.text();return G===""?void 0:JSON.parse(G)}let X=await $.text();if(X==="")return;try{return JSON.parse(X)}catch{return X}}class VD{siteUrl;baseUrl;token;timeout;insecure;constructor($){let D=typeof $==="string"?{baseUrl:$}:$;this.siteUrl=WX(D.baseUrl),this.baseUrl=`${this.siteUrl}/api.php/v2`,this.token=D.token,this.timeout=D.timeout,this.insecure=D.insecure}async request($,D={}){let X=D9(),G=D.method??"GET",J=D.timeout??X.timeout??this.timeout??Sh,Y=D.insecure??X.insecure??this.insecure;MU(Y);let Q=Ph(this.baseUrl,$,D.query),W=new Headers(D.headers);if(this.token)W.set("Token",this.token);let{signal:I,cleanup:U}=Eh(J,D.signal),B={method:G,headers:W,signal:I};if(D.body!==void 0&&G!=="GET")B.body=Rh(D.body,D.bodyType,W);try{let H=await Eb(Y,Q,B);if(!H.ok)throw new Y$("E_HTTP_ERROR",{status:H.status,statusText:H.statusText},{url:H.url,status:H.status,statusText:H.statusText,body:await H.text().catch(()=>{return})});return Zh(H,D.responseType)}catch(H){if(H instanceof Y$)throw H;if(H instanceof DOMException&&H.name==="AbortError")throw new Y$("E_TIMEOUT");throw new Y$("E_NETWORK_ERROR",{message:H.message??String(H)},H)}finally{U()}}async get($,D={}){return this.request($,{...D,method:"GET"})}async post($,D,X={}){return this.request($,{...X,method:"POST",body:D})}async put($,D,X={}){return this.request($,{...X,method:"PUT",body:D})}async delete($,D={}){return this.request($,{...D,method:"DELETE"})}async login($,D){let X=await this.post("/users/login",{account:$,password:D});if(X.status!=="success"||!X.token)throw new Y$("E_LOGIN_FAILED");this.token=X.token;let G=D9();if(G.persistProfiles){let J={},Y=this.timeout??G.timeout,Q=this.insecure??G.insecure;if(Y!==void 0)J.timeout=Y;if(Q!==void 0)J.insecure=Q;await ab({server:this.siteUrl,account:$,token:X.token,user:Z6(X.user)?X.user:void 0,serverConfig:Z6(X.serverConfig)?X.serverConfig:void 0,config:Object.keys(J).length>0?J:void 0})}return X.token}static create($){return new VD($)}static init($){let D=new VD($);return Zb({client:D}),D}static async fromProfile($){let D=await sb($);return new VD({baseUrl:D.server,token:D.token,timeout:typeof D.config?.timeout==="number"?D.config.timeout:void 0,insecure:typeof D.config?.insecure==="boolean"?D.config.insecure:void 0})}}var $j=[{name:"user",display:"用户",description:"用户管理,支持获取用户列表、创建用户、获取用户详情、修改用户信息、删除用户",actions:[{name:"list",display:"获取用户列表",type:"list",method:"get",path:"/users",resultType:"list",pagerGetter:"pager",resultGetter:"users",params:[{name:"browseType",required:!1,type:"string",description:"浏览类型",options:[{value:"inside",label:"内部用户"},{value:"outside",label:"内部用户"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"realname_asc",label:"姓名 升序"},{value:"realname_desc",label:"姓名 降序"},{value:"account_asc",label:"用户名 升序"},{value:"account_desc",label:"用户名 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建用户",type:"create",method:"post",path:"/users",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{account:{type:"string",description:"登录名"},realname:{type:"string",description:"姓名"},password:{type:"string",description:"密码"}},required:["account","realname","password"]}}},{name:"get",display:"获取用户详情",type:"get",method:"get",path:"/users/{userID}",resultType:"object",resultGetter:"user",pathParams:{userID:"用户ID"}},{name:"update",display:"修改用户信息",type:"update",method:"put",path:"/users/{userID}",resultType:"object",pathParams:{userID:"用户ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{realname:{type:"string",description:"真实姓名"},dept:{type:"integer",description:"部门",format:"int32"},join:{type:"string",description:"入职日期"},group:{type:"array",items:{type:"string"},description:"权限分组"},email:{type:"string",description:"邮箱"},visions:{type:"array",items:{type:"string"},description:"界面类型(研发综合界面 rnd | 运营管理界面 lite)"},mobile:{type:"string",description:"手机"},weixin:{type:"string",description:"微信"},password:{type:"string",description:"密码"}}}}},{name:"delete",display:"删除用户",type:"delete",method:"delete",path:"/users/{userID}",resultType:"text",pathParams:{userID:"用户ID"}}]},{name:"program",display:"项目集",description:"项目集管理,支持获取项目集列表、创建项目集、获取项目集详情、修改项目集、删除项目集",actions:[{name:"list",display:"获取项目集列表",type:"list",method:"get",path:"/programs",resultType:"list",pagerGetter:"pager",resultGetter:"programs",params:[{name:"status",required:!1,type:"string",description:"状态",options:[{value:"all",label:"全部"},{value:"unclosed",label:"未关闭"},{value:"wait",label:"未开始"},{value:"doing",label:"进行中"},{value:"suspended",label:"已挂起"},{value:"delayed",label:"已延期"},{value:"closed",label:"已关闭"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"name_asc",label:"名称 升序"},{value:"name_desc",label:"名称 降序"},{value:"begin_asc",label:"计划开始 升序"},{value:"begin_desc",label:"计划开始 降序"},{value:"end_asc",label:"计划结束 升序"},{value:"end_desc",label:"计划结束 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建项目集",type:"create",method:"post",path:"/programs",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"项目集名称"},begin:{type:"string",description:"计划开始日期"},end:{type:"string",description:"计划完成日期"},PM:{type:"string",description:"计划完成日期"},desc:{type:"string",description:"项目集描述"}},required:["name","begin","end"]}}},{name:"get",display:"获取项目集详情",type:"get",method:"get",path:"/programs/{programID}",resultType:"object",resultGetter:"program",pathParams:{programID:"项目集ID"}},{name:"update",display:"修改项目集",type:"update",method:"put",path:"/programs/{programID}",resultType:"object",pathParams:{programID:"项目集ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"项目集名称"},begin:{type:"string",description:"计划开始日期"},end:{type:"string",description:"计划完成日期"},PM:{type:"string",description:"计划完成日期"},desc:{type:"string",description:"项目集描述"}},required:["name","begin","end"]}}},{name:"delete",display:"删除项目集",type:"delete",method:"delete",path:"/programs/{programID}",resultType:"text",pathParams:{programID:"项目集ID"}}]},{name:"product",display:"产品",description:"产品管理,支持获取产品列表、创建产品、获取产品详情、修改产品、删除产品",actions:[{name:"list",display:"获取产品列表",type:"list",method:"get",path:"/products",resultType:"list",pagerGetter:"pager",resultGetter:"products",params:[{name:"browseType",required:!1,type:"string",description:"浏览类型",options:[{value:"all",label:"全部"},{value:"noclosed",label:"未关闭"},{value:"closed",label:"已结束"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"名称 升序"},{value:"title_desc",label:"名称 降序"},{value:"begin_asc",label:"计划开始 升序"},{value:"begin_desc",label:"计划开始 降序"},{value:"end_asc",label:"计划结束 升序"},{value:"end_desc",label:"计划结束 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建产品",type:"create",method:"post",path:"/products",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"产品名称"},program:{type:"integer",description:"所属项目集",format:"int32"},line:{type:"integer",description:"所属产品线",format:"int32"},type:{type:"string",description:"类型(normal 正常 | branch 多分支 | platform 多平台)"},PO:{type:"string",description:"产品负责人"},reviewer:{type:"array",items:{type:"string"},description:"评审人"},desc:{type:"array",items:{type:"string"},description:"产品描述"},QD:{type:"string",description:"测试负责人"},RD:{type:"string",description:"发布负责人"},acl:{type:"string",description:"访问控制(open 公开 | private 私有)"}},required:["name"]}}},{name:"get",display:"获取产品详情",type:"get",method:"get",path:"/products/{productID}",resultType:"object",resultGetter:"product",pathParams:{productID:"产品ID"}},{name:"update",display:"修改产品",type:"update",method:"put",path:"/products/{productID}",resultType:"object",pathParams:{productID:"产品ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"产品名称"},program:{type:"integer",description:"所属项目集",format:"int32"},line:{type:"integer",description:"所属产品线",format:"int32"},type:{type:"string",description:"类型(normal 正常 | branch 多分支 | platform 多平台)"},PO:{type:"string",description:"产品负责人"},reviewer:{type:"array",items:{type:"string"},description:"评审人"},desc:{type:"array",items:{type:"string"},description:"产品描述"},QD:{type:"string",description:"测试负责人"},RD:{type:"string",description:"发布负责人"},acl:{type:"string",description:"访问控制(open 公开 | private 私有)"}},required:["name"]}}},{name:"delete",display:"删除产品",type:"delete",method:"delete",path:"/products/{productID}",resultType:"text",pathParams:{productID:"产品ID"}}]},{name:"project",display:"项目",description:"项目管理,支持获取项目列表、创建项目、修改项目、删除项目",actions:[{name:"list",display:"获取项目列表",type:"list",method:"get",path:"/projects",resultType:"list",pagerGetter:"pager",resultGetter:"projects",params:[{name:"browseType",required:!1,type:"string",description:"项目状态,默认是undone",defaultValue:"undone",options:[{value:"all",label:"全部"},{value:"undone",label:"未完成"},{value:"wait",label:"未开始"},{value:"doing",label:"进行中"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"name_asc",label:"名称 升序"},{value:"name_desc",label:"名称 降序"},{value:"begin_asc",label:"计划开始 升序"},{value:"begin_desc",label:"计划开始 降序"},{value:"end_asc",label:"计划结束 升序"},{value:"end_desc",label:"计划结束 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建项目",type:"create",method:"post",path:"/projects",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"项目名称"},model:{type:"string",description:"项目管理方式(scrum 敏捷 | waterfall 瀑布 | kanban 看板 | agileplus 融合敏捷 | waterfallplus 融合瀑布)"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},products:{type:"array",items:{type:"string"},description:"关联产品"},parent:{type:"integer",description:"所属项目集",format:"int32"},workflowGroup:{type:"integer",description:"项目流程,付费版功能,开源版可以不填",format:"int32"},PM:{type:"string",description:"项目负责人"}},required:["name","model","begin","end","workflowGroup"]}}},{name:"update",display:"修改项目",type:"update",method:"put",path:"/projects/{projectID}",resultType:"object",pathParams:{projectID:"项目ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"项目名称"},model:{type:"string",description:"项目管理方式(scrum 敏捷 | waterfall 瀑布 | kanban 看板 | agileplus 融合敏捷 | waterfallplus 融合瀑布)"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},products:{type:"array",items:{type:"string"},description:"关联产品"},parent:{type:"integer",description:"所属项目集",format:"int32"},workflowGroup:{type:"integer",description:"项目流程,付费版功能,开源版可以不填",format:"int32"},PM:{type:"string",description:"项目负责人"}},required:["name","model","begin","end","workflowGroup"]}}},{name:"delete",display:"删除项目",type:"delete",method:"delete",path:"/projects/{projectID}",resultType:"text",pathParams:{projectID:"项目ID"}}]},{name:"execution",display:"执行",description:"执行管理,支持获取执行列表、创建执行、获取执行详情、修改执行、删除执行",actions:[{name:"list",display:"获取执行列表",type:"list",method:"get",path:"/executions",resultType:"list",pagerGetter:"pager",resultGetter:"executions",params:[{name:"status",required:!1,type:"string",description:"执行状态,默认是undone",defaultValue:"undone",options:[{value:"all",label:"全部"},{value:"undone",label:"未完成"},{value:"wait",label:"未开始"},{value:"doing",label:"进行中"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"rawID_asc",label:"RAWID 升序"},{value:"rawID_desc",label:"RAWID 降序"},{value:"nameCol_asc",label:"名称 升序"},{value:"nameCol_desc",label:"名称 降序"},{value:"begin_asc",label:"计划开始 升序"},{value:"begin_desc",label:"计划开始 降序"},{value:"end_asc",label:"计划结束 升序"},{value:"end_desc",label:"计划结束 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建执行",type:"create",method:"post",path:"/executions",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{project:{type:"integer",description:"所属项目",format:"int32"},name:{type:"string",description:"迭代名称"},lifetime:{type:"string",description:"执行类型(short 短期 | long 长期 | ops 运维)"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},days:{type:"integer",description:"可用工作日",format:"int32"},products:{type:"array",items:{type:"string"},description:"关联产品"},plans:{type:"array",items:{type:"string"},description:"关联计划,必须是产品+planID的二维数组"},PO:{type:"string",description:"产品负责人"},QD:{type:"string",description:"测试负责人"},PM:{type:"string",description:"执行负责人"},RD:{type:"string",description:"发布负责人"},acl:{type:"string",description:"访问控制(open 公开 | private 私有)"}},required:["project","name","begin","end"]}}},{name:"get",display:"获取执行详情",type:"get",method:"get",path:"/executions/{executionID}",resultType:"object",resultGetter:"execution",pathParams:{executionID:"执行ID"}},{name:"update",display:"修改执行",type:"update",method:"put",path:"/executions/{executionID}",resultType:"object",pathParams:{executionID:"执行ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{project:{type:"integer",description:"所属项目",format:"int32"},name:{type:"string",description:"迭代名称"},lifetime:{type:"string",description:"执行类型(short 短期 | long 长期 | ops 运维)"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},days:{type:"integer",description:"可用工作日",format:"int32"},products:{type:"array",items:{type:"string"},description:"关联产品"},plans:{type:"array",items:{type:"string"},description:"关联计划,必须是产品+planID的二维数组"},PO:{type:"string",description:"产品负责人"},QD:{type:"string",description:"测试负责人"},PM:{type:"string",description:"执行负责人"},RD:{type:"string",description:"发布负责人"},acl:{type:"string",description:"访问控制(open 公开 | private 私有)"}},required:["name","begin","end"]}}},{name:"delete",display:"删除执行",type:"delete",method:"delete",path:"/executions/{executionID}",resultType:"text",pathParams:{executionID:"执行ID"}}]},{name:"productplan",display:"产品计划",description:"产品计划管理,支持获取产品计划列表,支持获取产品下的产品计划、创建产品计划、获取产品计划详情、修改产品计划、删除产品计划",actions:[{name:"list",display:"获取产品计划列表,支持获取产品下的产品计划",type:"list",method:"get",path:"/products/{productID}/productplans",resultType:"list",pagerGetter:"pager",resultGetter:"productplans",pathParams:{productID:"所属产品ID"},params:[{name:"browseType",required:!1,type:"string",description:"执行状态,默认是undone",defaultValue:"undone",options:[{value:"all",label:"全部"},{value:"undone",label:"未完成"},{value:"wait",label:"未开始"},{value:"doing",label:"进行中"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"名称 升序"},{value:"title_desc",label:"名称 降序"},{value:"begin_asc",label:"开始日期 升序"},{value:"begin_desc",label:"开始日期 降序"},{value:"end_asc",label:"结束日期 升序"},{value:"end_desc",label:"结束日期 降序"},{value:"status_asc",label:"状态 升序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建产品计划",type:"create",method:"post",path:"/productplans",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"产品ID",format:"int32"},title:{type:"string",description:"计划名称"},parent:{type:"integer",description:"父计划ID",format:"int32"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},branchID:{type:"integer",description:"分支ID",format:"int32"},desc:{type:"string",description:"计划描述"}},required:["productID","title"]}}},{name:"get",display:"获取产品计划详情",type:"get",method:"get",path:"/productplans/{planID}",resultType:"object",resultGetter:"productplan",pathParams:{planID:"产品计划ID"}},{name:"update",display:"修改产品计划",type:"update",method:"put",path:"/productplans/{productplanID}",resultType:"object",pathParams:{productplanID:"产品计划ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"计划名称"},parent:{type:"integer",description:"父计划",format:"int32"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},branchID:{type:"integer",description:"分支ID",format:"int32"},desc:{type:"string",description:"计划描述"}},required:["title"]}}},{name:"delete",display:"删除产品计划",type:"delete",method:"delete",path:"/productplans/{productplanID}",resultType:"text",pathParams:{productplanID:"产品计划ID"}}]},{name:"story",display:"需求",description:"需求管理,支持获取需求列表,支持获取产品/项目/执行下的需求、创建需求、获取需求详情、修改需求、删除需求、激活需求、变更需求、关闭需求",actions:[{name:"list",display:"获取需求列表,支持获取产品/项目/执行下的需求",type:"list",method:"get",path:"/{scope}/{scopeID}/stories",resultType:"list",pagerGetter:"pager",resultGetter:"stories",pathParams:{scope:{description:"需求所属范围",options:[{value:"products",label:"产品"},{value:"projects",label:"项目"},{value:"executions",label:"执行"}]},scopeID:"所属范围ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是unclosed",defaultValue:"unclosed",options:[{value:"allstory",label:"全部"},{value:"assignedtome",label:"指派给我"},{value:"openedbyme",label:"我创建"},{value:"reviewbyme",label:"待我评审"},{value:"draftstory",label:"草稿"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建需求",type:"create",method:"post",path:"/stories",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"产品ID",format:"int32"},title:{type:"string"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},parent:{type:"integer",description:"父需求",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},spec:{type:"string",description:"需求描述"},category:{type:"integer",description:"类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",format:"int32"},source:{type:"string",description:"来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"},verify:{type:"string",description:"验收标准"},assignedTo:{type:"string",description:"指派给"},reviewer:{type:"array",items:{type:"string"},description:"评审人,如果设置必须评审,必须填写"},project:{type:"integer",description:"所属项目",format:"int32"},execution:{type:"integer",description:"所属执行",format:"int32"}},required:["productID","title"]}}},{name:"get",display:"获取需求详情",type:"get",method:"get",path:"/stories/{storyID}",resultType:"object",resultGetter:"story",pathParams:{storyID:"需求ID"}},{name:"update",display:"修改需求",type:"update",method:"put",path:"/stories/{storyID}",resultType:"object",pathParams:{storyID:"需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},parent:{type:"integer",description:"父需求",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},category:{type:"integer",description:"类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",format:"int32"},source:{type:"string",description:"来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"},assignedTo:{type:"string",description:"指派给"}},required:["title"]}}},{name:"delete",display:"删除需求",type:"delete",method:"delete",path:"/stories/{storyID}",resultType:"text",pathParams:{storyID:"需求ID"}},{name:"activate",display:"激活需求",type:"action",method:"put",path:"/stories/{storyID}/activate",resultType:"text",pathParams:{storyID:"需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"change",display:"变更需求",type:"action",method:"put",path:"/stories/{storyID}/change",resultType:"text",pathParams:{storyID:"需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"需求名称"},reviewer:{type:"array",items:{type:"string"},description:"评审人员"},spec:{type:"string",description:"需求描述"},verify:{type:"string",description:"验收标准"}},required:["reviewer"]}}},{name:"close",display:"关闭需求",type:"action",method:"put",path:"/stories/{storyID}/close",resultType:"text",pathParams:{storyID:"需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{closedReason:{type:"string",description:"关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)"},comment:{type:"string",description:"备注"}},required:["closedReason"]}}}]},{name:"epic",display:"业务需求",description:"业务需求管理,支持获取业务需求列表,支持获取产品下的业务需求、创建业务需求、获取业务需求详情、修改业务需求、删除业务需求、激活业务需求、变更业务需求、关闭业务需求",actions:[{name:"list",display:"获取业务需求列表,支持获取产品下的业务需求",type:"list",method:"get",path:"/products/{productID}/epics",resultType:"list",pagerGetter:"pager",resultGetter:"epics",pathParams:{productID:"所属产品ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是unclosed",defaultValue:"unclosed",options:[{value:"allstory",label:"全部"},{value:"assignedtome",label:"指派给我"},{value:"openedbyme",label:"我创建"},{value:"reviewbyme",label:"待我评审"},{value:"draftstory",label:"草稿"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建业务需求",type:"create",method:"post",path:"/epics",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"产品ID",format:"int32"},title:{type:"string"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},parent:{type:"integer",description:"父业务需求",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},spec:{type:"string",description:"业务需求描述"},category:{type:"integer",description:"类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",format:"int32"},source:{type:"string",description:"来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"},verify:{type:"string",description:"验收标准"},assignedTo:{type:"string",description:"指派给"},reviewer:{type:"array",items:{type:"string"},description:"评审人,如果设置必须评审,必须填写"}},required:["productID","title"]}}},{name:"get",display:"获取业务需求详情",type:"get",method:"get",path:"/epics/{storyID}",resultType:"object",resultGetter:"epic",pathParams:{storyID:"需求ID"}},{name:"update",display:"修改业务需求",type:"update",method:"put",path:"/epics/{epicID}",resultType:"object",pathParams:{epicID:"业务需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"需求名称"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},parent:{type:"integer",description:"父业务需求",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},category:{type:"integer",description:"类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",format:"int32"},source:{type:"string",description:"来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"},assignedTo:{type:"string",description:"指派给"}},required:["title"]}}},{name:"delete",display:"删除业务需求",type:"delete",method:"delete",path:"/epics/{epicID}",resultType:"text",pathParams:{epicID:"业务需求ID"}},{name:"activate",display:"激活业务需求",type:"action",method:"put",path:"/epics/{epicID}/activate",resultType:"text",pathParams:{epicID:"业务需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"change",display:"变更业务需求",type:"action",method:"put",path:"/epics/{epicID}/change",resultType:"text",pathParams:{epicID:"业务需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"需求名称"},reviewer:{type:"array",items:{type:"string"},description:"评审人员"},spec:{type:"string",description:"需求描述"},verify:{type:"string",description:"验收标准"}},required:["reviewer"]}}},{name:"close",display:"关闭业务需求",type:"action",method:"put",path:"/epics/{epicID}/close",resultType:"text",pathParams:{epicID:"业务需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{closedReason:{type:"string",description:"关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)"},comment:{type:"string",description:"备注"}},required:["closedReason"]}}}]},{name:"requirement",display:"用户需求",description:"用户需求管理,支持获取用户需求列表,支持获取产品下的用户需求、创建用户需求、获取用户需求详情、修改用户需求、删除用户需求、激活用户需求、变更用户需求、关闭用户需求",actions:[{name:"list",display:"获取用户需求列表,支持获取产品下的用户需求",type:"list",method:"get",path:"/products/{productID}/requirements",resultType:"list",pagerGetter:"pager",resultGetter:"requirements",pathParams:{productID:"所属产品ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是unclosed",defaultValue:"unclosed",options:[{value:"allstory",label:"全部"},{value:"assignedtome",label:"指派给我"},{value:"openedbyme",label:"我创建"},{value:"reviewbyme",label:"待我评审"},{value:"draftstory",label:"草稿"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建用户需求",type:"create",method:"post",path:"/requirements",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"产品ID",format:"int32"},title:{type:"string"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},parent:{type:"integer",description:"父用户需求",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},spec:{type:"string",description:"用户需求描述"},category:{type:"integer",description:"类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",format:"int32"},source:{type:"string",description:"来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"},verify:{type:"string",description:"验收标准"},assignedTo:{type:"string",description:"指派给"},reviewer:{type:"array",items:{type:"string"},description:"评审人,如果设置必须评审,必须填写"}},required:["productID","title"]}}},{name:"get",display:"获取用户需求详情",type:"get",method:"get",path:"/requirements/{storyID}",resultType:"object",resultGetter:"requirement",pathParams:{storyID:"需求ID"}},{name:"update",display:"修改用户需求",type:"update",method:"put",path:"/requirements/{requirementID}",resultType:"object",pathParams:{requirementID:"用户需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},parent:{type:"integer",description:"父用户需求",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},category:{type:"integer",description:"类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",format:"int32"},source:{type:"string",description:"来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"},assignedTo:{type:"string",description:"指派给"}},required:["title"]}}},{name:"delete",display:"删除用户需求",type:"delete",method:"delete",path:"/requirements/{requirementID}",resultType:"text",pathParams:{requirementID:"用户需求ID"}},{name:"activate",display:"激活用户需求",type:"action",method:"put",path:"/requirements/{requirementID}/activate",resultType:"text",pathParams:{requirementID:"用户需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"change",display:"变更用户需求",type:"action",method:"put",path:"/requirements/{requirementID}/change",resultType:"text",pathParams:{requirementID:"用户需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"需求名称"},spec:{type:"string",description:"需求描述"},verify:{type:"string",description:"验收标准"}}}}},{name:"close",display:"关闭用户需求",type:"action",method:"put",path:"/requirements/{requirementID}/close",resultType:"text",pathParams:{requirementID:"用户需求ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{closedReason:{type:"string",description:"关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)"},comment:{type:"string",description:"备注"}},required:["closedReason"]}}}]},{name:"bug",display:"Bug",description:"Bug管理,支持获取Bug列表,支持获取产品/项目/执行下的Bug、创建Bug、获取Bug详情、修改Bug、删除Bug、激活Bug、关闭Bug、解决Bug",actions:[{name:"list",display:"获取Bug列表,支持获取产品/项目/执行下的Bug",type:"list",method:"get",path:"/{scope}/{scopeID}/bugs",resultType:"list",pagerGetter:"pager",resultGetter:"bugs",pathParams:{scope:{description:"Bug所属范围",options:[{value:"products",label:"产品"},{value:"projects",label:"项目"},{value:"executions",label:"执行"}]},scopeID:"所属范围ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是unclosed",defaultValue:"unclosed",options:[{value:"all",label:"全部"},{value:"unclosed",label:"未关闭"},{value:"assignedtome",label:"指派给我"},{value:"openedbyme",label:"我创建"},{value:"assignedbyme",label:"由我指派"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建Bug",type:"create",method:"post",path:"/bugs",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"所属产品",format:"int32"},title:{type:"string",description:"Bug标题"},openedBuild:{type:"array",items:{type:"string"},description:"影响版本,主干是trunk,其他版本使用版本ID"},project:{type:"integer",description:"所属项目",format:"int32"},execution:{type:"integer",description:"所属执行",format:"int32"},severity:{type:"integer",description:"严重程度,默认是3",format:"int32"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},type:{type:"string",description:"Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)"},steps:{type:"string",description:"重现步骤"},story:{type:"integer",description:"相关需求",format:"int32"}},required:["productID","title","openedBuild"]}}},{name:"get",display:"获取Bug详情",type:"get",method:"get",path:"/bugs/{bugID}",resultType:"object",resultGetter:"bug",pathParams:{bugID:"Bug ID"}},{name:"update",display:"修改Bug",type:"update",method:"put",path:"/bugs/{bugID}",resultType:"object",pathParams:{bugID:"Bug ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"Bug标题"},severity:{type:"integer",description:"严重程度,默认是3",format:"int32"},pri:{type:"integer",description:"优先级,默认是3",format:"int32"},type:{type:"string",description:"Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)"},openedBuild:{type:"array",items:{type:"string"},description:"影响版本,主干是trunk,其他版本使用版本ID"},steps:{type:"string",description:"重现步骤"},project:{type:"integer",description:"所属项目",format:"int32"},execution:{type:"integer",description:"所属执行",format:"int32"},story:{type:"integer",description:"相关需求",format:"int32"}}}}},{name:"delete",display:"删除Bug",type:"delete",method:"delete",path:"/bugs/{bugID}",resultType:"text",pathParams:{bugID:"Bug ID"}},{name:"activate",display:"激活Bug",type:"action",method:"put",path:"/bugs/{bugID}/activate",resultType:"text",pathParams:{bugID:"Bug ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{openedBuild:{type:"array",items:{type:"string"},description:"影响版本, trunk为主干"},assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"close",display:"关闭Bug",type:"action",method:"put",path:"/bugs/{bugID}/close",resultType:"text",pathParams:{bugID:"Bug ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{comment:{type:"string",description:"备注"}}}}},{name:"resolve",display:"解决Bug",type:"action",method:"put",path:"/bugs/{bugID}/resolve",resultType:"text",pathParams:{bugID:"Bug ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{resolution:{type:"string",description:"fixed 已解决 | notrepro 无法重现 | bydesign 设计如此 | duplicate 重复Bug | external 外部原因| postponed 延期处理 | willnotfix 不予解决 | tostory 转为需求"},resolvedDate:{type:"string",description:"解决日期,默认今天"},resolvedBuild:{type:"string",description:"解决版本, trunk为主干"},assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}},required:["resolution"]}}}]},{name:"testcase",display:"测试用例",description:"测试用例管理,支持获取测试用例列表,支持获取产品/项目/执行下的测试用例、创建测试用例、获取测试用例详情、修改测试用例、删除测试用例",actions:[{name:"list",display:"获取测试用例列表,支持获取产品/项目/执行下的测试用例",type:"list",method:"get",path:"/{scope}/{scopeID}/testcases",resultType:"list",pagerGetter:"pager",resultGetter:"testcases",pathParams:{scope:{description:"测试用例所属范围",options:[{value:"products",label:"产品"},{value:"projects",label:"项目"},{value:"executions",label:"执行"}]},scopeID:"所属范围ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是all",defaultValue:"all",options:[{value:"all",label:"全部"},{value:"wait",label:"未关闭"},{value:"needconfirm",label:"需求变动"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建测试用例",type:"create",method:"post",path:"/testcases",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"所属产品",format:"int32"},title:{type:"string",description:"用例标题"},module:{type:"integer",description:"所属模块",format:"int32"},story:{type:"integer",description:"相关需求",format:"int32"},pri:{type:"integer",description:"优先级",format:"int32"},type:{type:"string",description:"用例类型(unit 单元测试 | interface 接口测试 | feature 功能测试 | install 安装部署 | config 配置相关 | performance 性能测试 | security 安全相关 | other 其他)"},precondition:{type:"string",description:"前置条件"},steps:{type:"array",items:{type:"string"},description:"用例步骤"},expects:{type:"array",items:{type:"string"},description:"用例步骤期望"},stepType:{type:"array",items:{type:"string"},description:"用例步骤类型(step 步骤 | group 父级步骤)"},project:{type:"integer",description:"所属项目",format:"int32"},execution:{type:"integer",description:"所属执行",format:"int32"}},required:["productID","title"]}}},{name:"get",display:"获取测试用例详情",type:"get",method:"get",path:"/testcases/{caseID}",resultType:"object",resultGetter:"testcase",pathParams:{caseID:"测试用例ID"}},{name:"update",display:"修改测试用例",type:"update",method:"put",path:"/testcases/{testcasID}",resultType:"object",pathParams:{testcasID:"测试用例ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{title:{type:"string",description:"用例标题"},moudule:{type:"integer",description:"所属模块",format:"int32"},story:{type:"integer",description:"相关需求",format:"int32"},pri:{type:"integer",description:"优先级",format:"int32"},type:{type:"string",description:"用例类型(unit 单元测试 | interface 接口测试 | feature 功能测试 | install 安装部署 | config 配置相关 | performance 性能测试 | security 安全相关 | other 其他)"},precondition:{type:"string",description:"前置条件"},steps:{type:"array",items:{type:"string"},description:"用例步骤"},expects:{type:"array",items:{type:"string"},description:"用例步骤期望"},stepType:{type:"array",items:{type:"string"},description:"用例步骤类型(step 步骤 | group 父级步骤)"}},required:["title"]}}},{name:"delete",display:"删除测试用例",type:"delete",method:"delete",path:"/testcases/{testcasID}",resultType:"text",pathParams:{testcasID:"测试用例ID"}}]},{name:"task",display:"任务",description:"任务管理,支持获取任务列表,支持获取执行下的任务、创建任务、获取任务详情、修改任务、删除任务、激活任务、关闭任务、完成任务、启动任务",actions:[{name:"list",display:"获取任务列表,支持获取执行下的任务",type:"list",method:"get",path:"/executions/{executionID}/tasks",resultType:"list",pagerGetter:"pager",resultGetter:"tasks",pathParams:{executionID:"所属执行ID"},params:[{name:"status",required:!1,type:"string",description:"状态,默认是unclosed",defaultValue:"unclosed",options:[{value:"all",label:"全部"},{value:"unclosed",label:"未关闭"},{value:"assignedtome",label:"指派给我"},{value:"assignedtome",label:"指派给我"},{value:"myinvolved",label:"由我参与"},{value:"assignedbyme",label:"由我指派"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"name_asc",label:"名称 升序"},{value:"name_desc",label:"名称 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建任务",type:"create",method:"post",path:"/tasks",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"任务名称"},executionID:{type:"integer",description:"所属执行",format:"int32"},type:{type:"string",description:"任务类型"},assignedTo:{type:"string",description:"指派给"},estStarted:{type:"string",description:"预计开始"},deadline:{type:"string",description:"截止日期"},pri:{type:"integer",description:"优先级",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},module:{type:"integer",description:"所属模块",format:"int32"},story:{type:"integer",description:"相关需求",format:"int32"},desc:{type:"string",description:"任务描述"}},required:["name","executionID"]}}},{name:"get",display:"获取任务详情",type:"get",method:"get",path:"/tasks/{taskID}",resultType:"object",pathParams:{taskID:"任务ID"}},{name:"update",display:"修改任务",type:"update",method:"put",path:"/tasks/{taskID}",resultType:"object",pathParams:{taskID:"任务ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"任务名称"},type:{type:"string",description:"任务类型"},assignedTo:{type:"string",description:"指派给"},estStarted:{type:"string",description:"预计开始"},deadline:{type:"string",description:"截止日期"},pri:{type:"integer",description:"优先级",format:"int32"},estimate:{type:"number",description:"预计工时",format:"float"},module:{type:"integer",description:"所属模块",format:"int32"},story:{type:"integer",description:"相关需求",format:"int32"},desc:{type:"string",description:"任务描述"}}}}},{name:"delete",display:"删除任务",type:"delete",method:"delete",path:"/tasks/{taskID}",resultType:"text",pathParams:{taskID:"任务ID"}},{name:"activate",display:"激活任务",type:"action",method:"put",path:"/tasks/{taskID}/activate",resultType:"text",pathParams:{taskID:"任务ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{left:{type:"number",description:"预计剩余",format:"float"},assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"close",display:"关闭任务",type:"action",method:"put",path:"/tasks/{taskID}/close",resultType:"text",pathParams:{taskID:"任务ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{comment:{type:"string",description:"备注"}}}}},{name:"finish",display:"完成任务",type:"action",method:"put",path:"/tasks/{taskID}/finish",resultType:"text",pathParams:{taskID:"任务ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{currentConsumed:{type:"number",description:"本次消耗",format:"float"},assignedTo:{type:"string",description:"任务名称"},consumed:{type:"number",description:"总计消耗",format:"float"},realStarted:{type:"string",description:"实际开始"},finishedDate:{type:"string",description:"实际完成"},comment:{type:"string",description:"备注"}},required:["currentConsumed","realStarted","finishedDate"]}}},{name:"start",display:"启动任务",type:"action",method:"put",path:"/tasks/{taskID}/start",resultType:"text",pathParams:{taskID:"任务ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{assignedTo:{type:"string",description:"任务名称"},realStarted:{type:"string",description:"实际开始"},consumed:{type:"number",description:"总计消耗",format:"float"},left:{type:"number",description:"预计剩余",format:"float"},comment:{type:"string",description:"备注"}},required:["realStarted"]}}}]},{name:"feedback",display:"反馈",description:"反馈管理,支持获取反馈列表,支持获取产品下的反馈、创建反馈、获取反馈详情、修改反馈、删除反馈、激活反馈、关闭反馈",actions:[{name:"list",display:"获取反馈列表,支持获取产品下的反馈",type:"list",method:"get",path:"/products/{productID}/feedbacks",resultType:"list",pagerGetter:"pager",resultGetter:"feedbacks",pathParams:{productID:"所属产品ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是wait",defaultValue:"wait",options:[{value:"all",label:"全部"},{value:"wait",label:"待处理"},{value:"doing",label:"处理中"},{value:"toclosed",label:"待关闭"},{value:"review",label:"待评审"},{value:"assigntome",label:"指派给我"},{value:"openedbyme",label:"由我反馈"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建反馈",type:"create",method:"post",path:"/feedbacks",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{product:{type:"integer",description:"所属产品",format:"int32"},title:{type:"string",description:"标题"},module:{type:"integer",description:"所属模块",format:"int32"},type:{type:"string",description:"类型(story 需求 | task 任务 | bug Bug | todo 待办 | advice 建议 | issue 问题 | risk 风险 | opportunity 机会)"},desc:{type:"string",description:"描述"},feedbackBy:{type:"string",description:"反馈者"},source:{type:"string",description:"来源"}},required:["product","title"]}}},{name:"get",display:"获取反馈详情",type:"get",method:"get",path:"/feedbacks/{feedbackID}",resultType:"object",resultGetter:"feedback",pathParams:{feedbackID:"反馈ID"}},{name:"update",display:"修改反馈",type:"update",method:"put",path:"/feedbacks/{feedbackID}",resultType:"object",pathParams:{feedbackID:"反馈ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{product:{type:"integer",description:"所属产品",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},title:{type:"string",description:"标题"},type:{type:"string",description:"类型(story 需求 | task 任务 | bug Bug | todo 待办 | advice 建议 | issue 问题 | risk 风险 | opportunity 机会)"},desc:{type:"string",description:"描述"},feedbackBy:{type:"string",description:"反馈者"},source:{type:"string",description:"来源"}},required:["product","title"]}}},{name:"delete",display:"删除反馈",type:"delete",method:"delete",path:"/feedbacks/{feedbackID}",resultType:"text",pathParams:{feedbackID:"反馈ID"}},{name:"activate",display:"激活反馈",type:"action",method:"put",path:"/feedbacks/{feedbackID}/activate",resultType:"text",pathParams:{feedbackID:"反馈ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"close",display:"关闭反馈",type:"action",method:"put",path:"/feedbacks/{feedbackID}/close",resultType:"text",pathParams:{feedbackID:"反馈ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{closedReason:{type:"string",description:"关闭原因(commented 已处理 | repeat 重复 | refuse 不予采纳)"},comment:{type:"string",description:"备注"}},required:["closedReason"]}}}]},{name:"ticket",display:"工单",description:"工单管理,支持获取工单列表,支持获取产品下的工单、创建工单、获取工单详情、修改工单、删除工单、激活工单、关闭工单",actions:[{name:"list",display:"获取工单列表,支持获取产品下的工单",type:"list",method:"get",path:"/products/{productID}/tickets",resultType:"list",pagerGetter:"pager",resultGetter:"tickets",pathParams:{productID:"所属产品ID"},params:[{name:"browseType",required:!1,type:"string",description:"状态,默认是wait",defaultValue:"wait",options:[{value:"all",label:"全部"},{value:"unclosed",label:"未关闭"},{value:"wait",label:"待处理"},{value:"doing",label:"处理中"},{value:"done",label:"待关闭"},{value:"finishedbyme",label:"由我解决"},{value:"assigntome",label:"指派给我"},{value:"openedbyme",label:"由我创建"}]},{name:"orderBy",required:!1,type:"string",description:"排序",options:[{value:"id_asc",label:"ID 升序"},{value:"id_desc",label:"ID 降序"},{value:"title_asc",label:"标题 升序"},{value:"title_desc",label:"标题 降序"},{value:"status_asc",label:"状态 升序"},{value:"status_desc",label:"状态 降序"}]},{name:"recPerPage",required:!1,type:"number",description:"每页数量,不超过1000"},{name:"pageID",required:!1,type:"number",description:"页码,从第1页开始"}]},{name:"create",display:"创建工单",type:"create",method:"post",path:"/tickets",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{product:{type:"integer",description:"所属产品",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},title:{type:"string",description:"标题"},type:{type:"string",description:"类型(code 程序报错 | data 数据错误 | stuck 流程卡断 | security 安全问题 | affair 事务)"},desc:{type:"string",description:"描述"},assignedTo:{type:"string",description:"指派给"},deadline:{type:"string",description:"截止日期"},openedBuild:{type:"array",items:{type:"string"},description:"影响版本"}},required:["product","title"]}}},{name:"get",display:"获取工单详情",type:"get",method:"get",path:"/tickets/{ticketID}",resultType:"object",resultGetter:"ticket",pathParams:{ticketID:"工单ID"}},{name:"update",display:"修改工单",type:"update",method:"put",path:"/tickets/{ticketID}",resultType:"object",pathParams:{ticketID:"工单ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{product:{type:"integer",description:"所属产品",format:"int32"},module:{type:"integer",description:"所属模块",format:"int32"},title:{type:"string",description:"标题"},type:{type:"string",description:"类型(code 程序报错 | data 数据错误 | stuck 流程卡断 | security 安全问题 | affair 事务)"},desc:{type:"string",description:"描述"},assignedTo:{type:"string",description:"指派给"},deadline:{type:"string",description:"截止日期"},openedBuild:{type:"array",items:{type:"string"},description:"影响版本"}}}}},{name:"delete",display:"删除工单",type:"delete",method:"delete",path:"/tickets/{ticketID}",resultType:"text",pathParams:{ticketID:"工单ID"}},{name:"activate",display:"激活工单",type:"action",method:"put",path:"/tickets/{ticketID}/activate",resultType:"text",pathParams:{ticketID:"工单ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}}}}},{name:"close",display:"关闭工单",type:"action",method:"put",path:"/tickets/{ticketID}/close",resultType:"text",pathParams:{ticketID:"工单ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{closedReason:{type:"string",description:"关闭原因(commented 已处理 | repeat 重复 | refuse 不予处理)"},comment:{type:"string",description:"备注"}},required:["closedReason","comment"]}}}]},{name:"system",display:"应用",description:"应用管理,支持获取应用列表,支持获取产品下的应用、创建应用、修改应用",actions:[{name:"list",display:"获取应用列表,支持获取产品下的应用",type:"list",method:"get",path:"/products/{productID}/systems",resultType:"list",pagerGetter:"pager",pathParams:{productID:"所属产品ID"}},{name:"create",display:"创建应用",type:"create",method:"post",path:"/systems",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"所属产品",format:"int32"},integrated:{type:"integer",description:"是否集成应用(0 否| 1 是)",format:"int32"},children:{type:"array",items:{type:"string"},description:"集成应用需要包含其他应用,非集成应用传空数组[]"},name:{type:"string",description:"应用名称"},desc:{type:"string",description:"描述"}},required:["productID","integrated","children","name"]}}},{name:"update",display:"修改应用",type:"update",method:"put",path:"/systems/{systemID}",resultType:"object",pathParams:{systemID:"应用ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"应用名称"},children:{type:"array",items:{type:"string"},description:"集成应用需要包含其他应用,非集成应用传空数组[]"},desc:{type:"string",description:"描述"}},required:["name","children"]}}}]},{name:"build",display:"版本",description:"版本管理,支持获取版本列表,支持获取项目/执行下的版本、创建版本/构建、修改版本、删除版本",actions:[{name:"list",display:"获取版本列表,支持获取项目/执行下的版本",type:"list",method:"get",path:"/{scope}/{scopeID}/builds",resultType:"list",pagerGetter:"pager",resultGetter:"builds",pathParams:{scope:{description:"版本所属范围",options:[{value:"projects",label:"项目"},{value:"executions",label:"执行"}]},scopeID:"所属范围ID"}},{name:"create",display:"创建版本/构建",type:"create",method:"post",path:"/builds",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{executionID:{type:"integer",description:"所属执行/迭代",format:"int32"},product:{type:"integer",description:"所属产品",format:"int32"},name:{type:"string",description:"构建名称"},system:{type:"integer",description:"所属应用",format:"int32"},builder:{type:"string",description:"构建者"},date:{type:"string",description:"打包日期"},scmPath:{type:"string",description:"源代码地址"},filePath:{type:"string",description:"下载地址"},desc:{type:"string",description:"描述"}},required:["executionID","product","name","system","builder","date"]}}},{name:"update",display:"修改版本",type:"update",method:"put",path:"/builds/{buildID}",resultType:"object",pathParams:{buildID:"版本ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{execution:{type:"integer",description:"所属执行/迭代",format:"int32"},product:{type:"integer",description:"所属产品",format:"int32"},name:{type:"string",description:"构建名称"},system:{type:"integer",description:"所属应用",format:"int32"},builder:{type:"string",description:"构建者"},date:{type:"string",description:"打包日期"},scmPath:{type:"string",description:"源代码地址"},filePath:{type:"string",description:"下载地址"},desc:{type:"string",description:"描述"}},required:["execution","product","name","system","builder","date"]}}},{name:"delete",display:"删除版本",type:"delete",method:"delete",path:"/builds/{buildID}",resultType:"text",pathParams:{buildID:"版本ID"}}]},{name:"testtask",display:"测试单",description:"测试单管理,支持获取测试单列表,支持获取产品/项目/执行下的测试单、创建测试单、修改测试单、删除测试单",actions:[{name:"list",display:"获取测试单列表,支持获取产品/项目/执行下的测试单",type:"list",method:"get",path:"/{scope}/{scopeID}/testtasks",resultType:"list",pagerGetter:"pager",resultGetter:"testtasks",pathParams:{scope:{description:"测试单所属范围",options:[{value:"products",label:"产品"},{value:"projects",label:"项目"},{value:"executions",label:"执行"}]},scopeID:"所属范围ID"}},{name:"create",display:"创建测试单",type:"create",method:"post",path:"/testtasks",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"所属产品ID",format:"int32"},name:{type:"string",description:"测试单名称"},build:{type:"integer",description:"提测构建/版本",format:"int32"},execution:{type:"integer",description:"所属执行",format:"int32"},type:{type:"array",items:{type:"string"},description:"类型(integrate 集成测试 | system 系统测试 | acceptance 验收测试 | performance 性能测试 | safety 安全测试)"},owner:{type:"string",description:"负责人"},status:{type:"string",description:"状态(wait 未开始 | doing 进行中 | done 已关闭 | blocked 被阻塞)"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},desc:{type:"string",description:"描述"}},required:["productID","name","build","begin","end"]}}},{name:"update",display:"修改测试单",type:"update",method:"put",path:"/testtasks/{testtaskID}",resultType:"object",pathParams:{testtaskID:"测试单ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{name:{type:"string",description:"测试单名称"},build:{type:"integer",description:"提测构建/版本",format:"int32"},execution:{type:"integer",description:"所属执行",format:"int32"},type:{type:"array",items:{type:"string"},description:"类型(integrate 集成测试 | system 系统测试 | acceptance 验收测试 | performance 性能测试 | safety 安全测试)"},owner:{type:"string",description:"负责人"},status:{type:"string",description:"状态(wait 未开始 | doing 进行中 | done 已关闭 | blocked 被阻塞)"},begin:{type:"string",description:"开始日期"},end:{type:"string",description:"结束日期"},desc:{type:"string",description:"描述"}},required:["name","build","begin","end"]}}},{name:"delete",display:"删除测试单",type:"delete",method:"delete",path:"/testtasks/{testtaskID}",resultType:"text",pathParams:{testtaskID:"测试单ID"}}]},{name:"release",display:"发布",description:"发布管理,支持获取发布列表,支持获取产品下的发布、创建发布、修改发布、删除发布",actions:[{name:"list",display:"获取发布列表,支持获取产品下的发布",type:"list",method:"get",path:"/products/{productID}/releases",resultType:"list",pagerGetter:"pager",resultGetter:"releases",pathParams:{productID:"所属产品ID"}},{name:"create",display:"创建发布",type:"create",method:"post",path:"/releases",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{productID:{type:"integer",description:"所属产品",format:"int32"},system:{type:"integer",description:"所属应用",format:"int32"},name:{type:"string",description:"应用版本号"},build:{type:"array",items:{type:"string"},description:"包含构建"},status:{type:"string",description:"状态(wait 未开始 | normal 已发布 | fail 发布失败 | terminate 停止维护)"},date:{type:"string",description:"计划发布日期"},desc:{type:"string",description:"描述"}},required:["productID","system","name","build","date"]}}},{name:"update",display:"修改发布",type:"update",method:"put",path:"/releases/{releasID}",resultType:"object",pathParams:{releasID:"发布ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{system:{type:"integer",description:"所属应用",format:"int32"},name:{type:"string",description:"应用版本号"},build:{type:"array",items:{type:"string"},description:"包含构建"},status:{type:"string",description:"状态(wait 未开始 | normal 已发布 | fail 发布失败 | terminate 停止维护)"},date:{type:"string",description:"计划发布日期"},desc:{type:"string",description:"描述"}},required:["system","name","build","date"]}}},{name:"delete",display:"删除发布",type:"delete",method:"delete",path:"/releases/{releasID}",resultType:"text",pathParams:{releasID:"发布ID"}}]},{name:"file",display:"附件",description:"附件管理,支持编辑附件,修改附件的名称、删除附件",actions:[{name:"create",display:"编辑附件,修改附件的名称",type:"create",method:"post",path:"/files",resultType:"object",requestBody:{required:!0,type:"object",schema:{type:"object",properties:{fileName:{type:"string",description:"附件名称"}},required:["fileName"]}}},{name:"delete",display:"删除附件",type:"delete",method:"delete",path:"/files/{fileID}",resultType:"text",pathParams:{fileID:"附件ID"}}]}];var Th={list:"get",get:"get",create:"post",update:"put",delete:"delete",action:"post"},vh={list:"list",get:"object",create:"object",update:"object",delete:"text",action:"text"},NU=yh(kh()),Dj=Xj(NU);function A0($){if(Array.isArray($))return $.map((D)=>A0(D));if($&&typeof $==="object"&&!($ instanceof Function)){let D={};for(let[X,G]of Object.entries($))D[X]=A0(G);return D}return $}function RU($,D){if(!Z6(D))return D===void 0?$:A0(D);let X=Z6($)?{...$}:{};for(let[G,J]of Object.entries(D)){if(J===void 0)continue;let Y=X[G];X[G]=Z6(J)&&Z6(Y)?RU(Y,J):A0(J)}return X}function kh(){return A0($j)}function EU($){if($===null||typeof $!=="object")return $;if(Object.isFrozen($))return $;for(let D of Object.keys($))EU($[D]);return Object.freeze($)}function Ch($){if($.method===void 0){let D=Th[$.type];if(D===void 0)throw new Y$("E_INDETERMINATE_ACTION_METHOD",{action:String($.name),type:String($.type)});$.method=D}if($.resultType===void 0){let D=vh[$.type];if(D===void 0)throw new Y$("E_INDETERMINATE_ACTION_RESULT_TYPE",{action:String($.name),type:String($.type)});$.resultType=D}return $}function z3($){return EU(Ch($))}function q3($){return $.actions.forEach(z3),EU($)}function yh($){return $.forEach(q3),$}function ZU($,D){let X=D.toLowerCase();return $.findIndex((G)=>String(G.name).toLowerCase()===X)}function Xj($){return new Map($.map((D)=>[D.name.toLowerCase(),D]))}function TU($){if(!$||typeof $.name!=="string"||typeof $.path!=="string")throw new Y$("E_INVALID_ACTION_DEFINITION");if($.method!==void 0&&typeof $.method!=="string")throw new Y$("E_INVALID_ACTION_DEFINITION");if($.resultType!==void 0&&typeof $.resultType!=="string")throw new Y$("E_INVALID_ACTION_DEFINITION")}function G9(){return NU}function Y9(){return Dj}function vU(){Dj=Xj(NU)}var gh;function Jj($){gh=$}function J4($,D){let X=$.toLowerCase(),G=Y9().get(X);if(!G)throw new Y$("E_INVALID_MODULE",{module:$});let J=G.actions.slice();for(let I of KD(D)){TU(I);let U=ZU(J,String(I.name)),B=z3(A0(I));if(U>=0)J[U]=B;else J.push(B)}let Y=q3({...G,actions:J}),Q=G9(),W=Q.findIndex((I)=>I.name.toLowerCase()===X);Q[W]=Y,vU()}function E1($,D,X){let G=$.toLowerCase(),J=Y9().get(G);if(!J)throw new Y$("E_INVALID_MODULE",{module:$});let Y=J.actions.slice(),Q=ZU(Y,D);if(Q<0)throw new Y$("E_INVALID_ACTION",{module:$,action:D});let W=Y[Q],I=typeof X==="function"?X(A0(W)):RU(W,X);TU(I),Y[Q]=z3(I);let U=q3({...J,actions:Y}),B=G9(),H=B.findIndex((V)=>V.name.toLowerCase()===G);B[H]=U,vU()}function kU(){E1("execution","create",($)=>{let D=$.requestBody.schema?.required;if(Array.isArray(D)&&!D.includes("products"))D.push("products");return $}),E1("story","update",($)=>{let D=$.requestBody.schema?.properties;if(D&&!D.plan)D.plan={type:"integer",description:"所属计划",format:"int32"};if(D&&D.category)D.category={type:"string",description:"类别"};return $}),E1("task","list",($)=>{return $.path="/executions/{executionID}/tasks",$.pathParams={executionID:"执行ID"},$}),[["product","create"],["product","update"],["execution","create"],["execution","update"]].forEach(([$,D])=>{E1($,D,(X)=>{let G=X.requestBody.schema?.properties;if(G.acl&&G.acl.defaultValue===void 0)G.acl.defaultValue="open";return X})}),["create","update"].forEach(($)=>{E1("task",$,(D)=>{let X=D.requestBody?.schema?.properties;if(X&&!X.parent)X.parent={type:"integer",description:"父任务",format:"int32"};return D})})}function M0($){return Y9().get($.toLowerCase())}function IX($,D){let X=M0($);if(!X)return;let G=D==="ls"?"list":D,J=X.actions.find((Q)=>String(Q.name).toLowerCase()===G.toLowerCase());if(J)return J;if(!new Set(["list","get","create","update","delete"]).has(G)){let Q=X.actions.find((W)=>W.type==="action"&&String(W.name).toLowerCase()===G.toLowerCase());if(Q)return Q}return}function UX(){return G9().map(($)=>$.name)}Jj(kU);kU();var Gj={product:"products",project:"projects",execution:"executions"},uh=new Set(Object.values(Gj)),fh=["execution","project","product"];function mh($){let{scope:D,scopeID:X}=$;if(!QX(D)&&!QX(X)){let G=String(D);if(!uh.has(G))throw new Y$("E_INVALID_PARAM",{param:"scope",value:G});let J=Number(X);if(Number.isNaN(J))throw new Y$("E_INVALID_PARAM",{param:"scopeID",value:String(X)});return{scope:G,scopeID:J}}for(let G of fh){let J=$[G]??$[`${G}ID`];if(QX(J))continue;let Y=Number(J);if(!Number.isNaN(Y))return{scope:Gj[G],scopeID:Y}}return}function ch($,D){return $.path.replace(/\{(\w+)\}/g,(X,G)=>{let J=D[G];if(QX(J))throw new Y$("E_MISSING_PARAM",{param:G});return String(J)})}function lh($){if($===void 0)return;if(typeof $==="string")try{let D=JSON.parse($);return Z6(D)?D:void 0}catch{return}return Z6($)?$:void 0}var ih=new Set(["true","1","yes","on"]),ph=new Set(["false","0","no","off"]);function rh($,D,X,G=!1){if($===void 0||$===null)return $;if(D==="number"||D==="integer"){let J=Number($);return Number.isNaN(J)?$:J}if(D==="boolean"){if(typeof $==="boolean")return $;if(typeof $==="number"){if($===1)return!0;if($===0)return!1;throw new Y$("E_INVALID_PARAM",{param:X,value:String($)})}if(typeof $==="string"){let J=$.trim().toLowerCase();if(ih.has(J))return!0;if(ph.has(J))return!1;throw new Y$("E_INVALID_PARAM",{param:X,value:$})}throw new Y$("E_INVALID_PARAM",{param:X,value:String($)})}if(D==="array"){if(Array.isArray($))return $;if(typeof $==="string")return $.split(",");if(G&&Z6($))return $;return[$]}return $}function nh($,D,X){let G={},J=Object.keys(D.pathParams??{});if(J.includes("scope")){let U=mh(X);if(!U)throw new Y$("E_MISSING_PARAM",{param:"scope/scopeID or product/project/execution"});G.scope=U.scope,G.scopeID=U.scopeID}let Y=J.find((U)=>U.endsWith("ID")&&U!=="scopeID"),Q=X.id??X[`${$.name}ID`]??(Y?X[Y]:void 0),W=Q===void 0?Number.NaN:Number(Q),I=Number.isNaN(W)?void 0:W;if(Y&&I!==void 0)G[Y]=I;for(let U of J){if(U==="scope"||U==="scopeID"||G[U]!==void 0)continue;let B=D.pathParams?.[U],H=X[U];if(H!==void 0){G[U]=H;continue}if(typeof B==="object"){if(B.defaultValue!==void 0)G[U]=B.defaultValue;else if(B.options?.[0]?.value!==void 0)G[U]=B.options[0].value}if(G[U]===void 0)throw new Y$("E_MISSING_PARAM",{param:U})}return{values:G,id:I}}function dh($,D){let X={};for(let G of $.params??[]){let J=D[G.name];if(J===void 0&&G.name==="pageID")J=D.page;if(J===void 0)J=G.defaultValue??G.options?.[0]?.value;if(J===void 0&&G.required)throw new Y$("E_MISSING_PARAM",{param:G.name});if(J!==void 0)X[G.name]=J}return X}function oh($,D){let X=lh(D.data);if($.requestBody?.schema?.type!=="object")return X;let G=X?{...X}:{},J=$.requestBody.schema,Y=new Set(J.required??[]);for(let[Q,W]of Object.entries(J.properties??{})){let I=Object.prototype.hasOwnProperty.call(G,Q),U=Object.prototype.hasOwnProperty.call(D,Q),B=I?G[Q]:U?D[Q]:W.defaultValue;if(B===void 0&&(W.required||Y.has(Q)))throw new Y$("E_MISSING_PARAM",{param:Q});let H=rh(B,W.type,Q,I);if(H!==void 0)G[Q]=H}return G}function Yj($,D,X={}){let G=IX($.name,D);if(!G)throw new Y$("E_INVALID_ACTION",{module:$.name,action:D});let{values:J,id:Y}=nh($,G,X);return{module:$.name,action:G,params:X,path:ch(G,J),query:dh(G,X),data:oh(G,X),id:Y}}function Qj($,D,X={}){let G=$.resultGetter;if(!G)return D.data??D;if(typeof G==="function")return G(D,X);if(typeof G==="string")return V1(D,G);let J={};for(let[Y,Q]of Object.entries(G))J[Y]=V1(D,Q);return J}function Wj($,D,X={}){let G=$.pagerGetter;if(!G)return D.pager;if(typeof G==="function")return G(D,X);if(typeof G==="string")return V1(D,G);let J=V1(D,G.pageID),Y=V1(D,G.recPerPage),Q=V1(D,G.recTotal);if(J===void 0||Y===void 0||Q===void 0)return;return{pageID:Number(J),recPerPage:Number(Y),recTotal:Number(Q)}}function th($){let D=$.split("/");if(D.length>2||!D[0])throw new Y$("E_INVALID_REQUEST_NAME");let[X,G]=D;if(!G?.length)return{moduleName:X,actionName:"list"};if(Number.isInteger(Number(G)))return{moduleName:X,actionName:"get",id:Number(G)};return{moduleName:X,actionName:G}}function ah($){let D=$;if(typeof D==="string")try{D=JSON.parse(D)}catch{return new Set}if(D&&typeof D==="object"&&!Array.isArray(D))return new Set(Object.keys(D));return new Set}async function sh($,D,X,G){let J=D.requestBody?.schema?.properties,Y=$.actions.find((U)=>U.type==="get");if(!J||!Y)return X;let Q=(await Q9(`${$.name}/${Y.name}`,X,{client:G.client,timeout:G.timeout,insecure:G.insecure,throwOnFail:!0})).data;if(!Z6(Q))return X;let W=ah(X.data),I={...X};for(let U of Object.keys(J))if(!(Object.prototype.hasOwnProperty.call(X,U)||W.has(U))&&Object.prototype.hasOwnProperty.call(Q,U))I[U]=Q[U];return I}function eh($){if(typeof $==="string")return $;if($===void 0)return;try{return JSON.stringify($)}catch{return String($)}}function $u($){for(let D of["code","errorCode","errno"]){let X=$[D];if(typeof X==="string"||typeof X==="number")return X}return}function Du($){return Boolean($.filter&&$.filter.length>0||$.search&&$.search.length>0||$.sort||$.limit||$.pick&&$.pick.length>0)}function Xu($,D){if(Array.isArray($)){if(!Du(D))return $;if($.every(Z6))return I3($,{filter:D.filter,search:D.search,searchFields:D.searchFields,sort:D.sort,limit:D.limit,pick:D.pick});let X=Number(D.limit);return Number.isFinite(X)&&X>=0?$.slice(0,Math.floor(X)):$}if(Z6($)&&D.pick&&D.pick.length>0)return I3($,{pick:D.pick});return $}function Ju($,D,X){if(!D||typeof D!=="object"||Array.isArray(D))return{status:"success",data:D};let G=D,J=G.status==="fail"?"fail":"success",Y=Xu(Qj($.action,G,$.params),X),Q=G.message,W=Wj($.action,G,$.params),I={status:J,message:eh(Q),data:Y,pager:W?{total:Number(W.recTotal),page:Number(W.pageID),recPerPage:Number(W.recPerPage)}:void 0};if(Q!==void 0&&typeof Q!=="string")I.rawMessage=Q;let U=$u(G);if(U!==void 0)I.apiCode=U;if(J==="fail")I.raw=G;return I}async function Q9($,D={},X={}){let G=D9(),J=X.client??G.client;if(!J)throw new Y$("E_NO_GLOBAL_CLIENT");let{moduleName:Y,actionName:Q,id:W}=th($),I=M0(Y);if(!I)throw new Y$("E_INVALID_MODULE",{module:Y});let U=D.recPerPage??X.recPerPage??G.recPerPage,B={...D,...W!==void 0?{id:W}:{},...U!==void 0?{recPerPage:U}:{}},H=IX(Y,Q);if(!H)throw new Y$("E_INVALID_ACTION",{module:Y,action:Q});let V=H.type==="update"&&(X.autoFill??G.autoFill)?await sh(I,H,B,X):B,z=Yj(I,Q,V),L=await J.request(z.path,{method:String(z.action.method).toUpperCase(),query:z.query,body:z.data,timeout:X.timeout??G.timeout,insecure:X.insecure??G.insecure});if(X.raw)return L;let F={...X,limit:X.limit??G.limit},b=Ju(z,L,F);if(b.status==="fail"&&(X.throwOnFail??G.throwOnFail))throw new Y$("E_API_FAILED",{message:b.message??""},b);return b}function BX($){if(!$||!Gu($))return;try{return M0($)}catch{return}}function wD(){return UX()}function Gu($){let D=$.toLowerCase();return UX().some((X)=>X.toLowerCase()===D)}function Ij(){return UX().map(($)=>M0($)).filter(($)=>$!==void 0)}var Yu={ls:"list"},Qu=new Set(["list","get","create","update","delete"]);function H3($,D){let X=Yu[D]??D;if(Qu.has(X))return t6($,X);return t6($,"action",X)}function t6($,D,X){if(X)return $.actions.find((G)=>G.type===D&&G.name===X);return $.actions.find((G)=>G.type===D)}function W9($){return $.actions.filter((D)=>D.type==="action").map((D)=>D.name)}var Wu={E1001:"必须提供有效的禅道服务地址、用户名和密码或 TOKEN",E1002:"所提供的禅道服务地址 {url} 无法访问",E1003:"当前用户名和密码不正确",E1004:"所提供的 Token 已失效,请提供密码重新登录,或提供新的 TOKEN",E1005:"配置文件损坏或无法读取,请检查 {path}",E1006:"未找到指定的用户配置,请先使用 `zentao login -s <zentao_url> -u <account> -p <password> -t <token>` 登录",E1007:"指定的用户配置不存在,请通过 `zentao profile` 查看可用配置",E1008:"当前禅道版本不受支持,请使用禅道 22.0 及以上版本",E2001:"未找到指定的模块 {module},请通过 `zentao help` 查看支持的模块",E2002:"未找到指定的对象 {object},请检查对象 ID 是否正确",E2003:"缺少必要参数 {fields},请通过 `zentao {module} help` 查看必要参数",E2004:"{field} 参数值 {value} 无效,请检查参数格式是否正确",E2005:"不支持的操作,请通过 `zentao {module} help` 查看支持的操作",E2006:"当前用户没有权限执行此操作",E2007:"`--data` 参数中的 JSON 数据格式无效",E2008:"禅道服务端返回错误(Url:{url},Status:{status}),请查看详细错误信息:{serverResponse}",E2009:"选项 {option} 的值无效,{reason}",E2010:"选项 {option} 的值类型必须为 {type},实际类型为 {actualType}",E3001:"`--pick` 指定的字段不存在",E3002:"`--filter` 表达式格式无效,请检查过滤条件格式",E3003:"`--sort` 表达式格式无效,请检查排序条件格式",E4001:"未找到指定的工作区,请通过 `zentao workspace ls` 查看可用工作区",E4002:"当前未设置工作区,请通过 `zentao workspace set` 设置工作区",E5001:"请求超时,请检查网络连接或禅道服务是否正常",E5002:"SSL/TLS 证书验证失败,请检查禅道服务地址是否正确"};class c extends Error{code;details;constructor($,D,X){let G=Wu[$];if(D)for(let[J,Y]of Object.entries(D))G=G.replaceAll(`{${J}}`,Y);super(G);this.name="ZentaoError",this.code=$.replace("E",""),this.details=X}}function Iu($){if(!$||typeof $!=="object")return!1;let D=$.code;return typeof D==="string"&&D.startsWith("E_")}function K3($,D){if(!$)return"";let X=$.indexOf(D);return X>=0?$.slice(X+D.length).trim():$}function I9($){if($ instanceof c)return $;if(!Iu($))return $;let{code:D,message:X,details:G}=$,J=G&&typeof G==="object"?G:{};switch(D){case"E_HTTP_ERROR":{let Y=Number(J.status),Q=typeof J.url==="string"?J.url:"";if(Y===401)return new c("E1004",void 0,G);if(Y===403)return new c("E2006",void 0,G);if(Y===404)return new c("E2002",{object:Q},G);return new c("E2008",{url:Q,status:String(J.status??""),serverResponse:typeof J.body==="string"?J.body:String(J.body??"")},G)}case"E_TIMEOUT":return new c("E5001",void 0,G);case"E_NETWORK_ERROR":{let Y=(typeof J.message==="string"?J.message:X)??"";if(Y.includes("SSL")||Y.includes("TLS")||Y.includes("certificate"))return new c("E5002",void 0,G);return new c("E1002",{url:""},G)}case"E_API_FAILED":return new c("E2008",{url:"",status:"",serverResponse:K3(X,"failure:")||(X??"")},G);case"E_LOGIN_FAILED":return new c("E1003",void 0,G);case"E_MISSING_PARAM":return new c("E2003",{fields:K3(X,"parameter:"),module:""},G);case"E_INVALID_PARAM":{let Y=K3(X,"parameter "),[Q,W]=Y.split(":").map((I)=>I.trim());return new c("E2004",{field:Q??"",value:W??""},G)}case"E_INVALID_MODULE":return new c("E2001",{module:K3(X,"module:")},G);case"E_INVALID_ACTION":case"E_INVALID_REQUEST_NAME":return new c("E2005",{module:""},G);case"E_NO_PROFILE":case"E_NO_GLOBAL_CLIENT":return new c("E1006",void 0,G);case"E_PROFILE_NOT_FOUND":return new c("E1007",void 0,G);default:return new c("E2008",{url:"",status:"",serverResponse:X??String(D)},G)}}function u6($,D){if(D==="json"||D==="raw"){let X={error:{code:$.code,message:$.message}};if($.details)X.error={...X.error,details:$.details};return JSON.stringify(X,null,4)}return`Error(E${$.code}): ${$.message}`}var Uu={ls:"list"};function Bj($){return Uu[$]??$}function Uj($){if($==="true")return!0;if($==="false")return!1;if(/^-?\d+$/.test($))return Number($);if(/^-?\d+\.\d+$/.test($))return Number($);return $}function CU($,D,X){let G=$[D];if(G===void 0||G===!0)$[D]=X;else $[D]=`${G},${X}`}function V3($,D,X){let G={...$},J=X?[...X]:[];if(J.length>0&&J[0]===D)J.shift();let Y;if(J.length>0&&!J[0].startsWith("-")){let Q=J[0].trim(),W=Q.split(",").map((U)=>U.trim().replace(/^[a-zA-Z]+_(\d+)$/,"$1")).filter(Boolean);if(W.length>0&&W.every((U)=>/^\d+$/.test(U)))Y=W.join(","),J.shift();else if(G.data===void 0&&Q.startsWith("{")&&Q.endsWith("}"))G.data=Q,J.shift()}if($.params)try{Object.assign(G,JSON.parse($.params))}catch{throw new c("E2009",{option:"params",reason:"不是有效的 JSON 对象"})}for(let Q=0;Q<J.length;Q++){let W=J[Q],I=W.match(/^--(\w[\w.-]*)=(.*)$/);if(I){CU(G,I[1],Uj(I[2]));continue}let U=W.match(/^--(\w[\w.-]*)$/);if(U)if(Q+1<J.length&&!J[Q+1].startsWith("--"))CU(G,U[1],Uj(J[Q+1])),Q++;else CU(G,U[1],!0)}if(Y!==void 0)G.id=Y;if(typeof G.id==="string"&&G.id.length>0){let Q=G.id.split(",").map((W)=>W.trim().replace(/^[a-zA-Z]+_(\d+)$/,"$1")).filter(Boolean).join(",");if(Q)G.id=Q}if(typeof G.data==="string"&&G.data.length>0)try{JSON.parse(G.data)}catch{throw new c("E2007")}return G}function w3($,D){if($.length===0)return"";let X=D??Object.keys($[0]);if(X.length===0)return"";let G=$.map((W)=>X.map((I)=>{let U=p4(W,I);return zj(U)})),J=`| ${X.join(" | ")} |`,Y=`| ${X.map(()=>"---").join(" | ")} |`,Q=G.map((W)=>`| ${W.join(" | ")} |`).join(`
104
- `);return`${J}
105
- ${Y}
106
- ${Q}`}function zX($,D){return(D??Object.keys($)).map((G)=>{let J=p4($,G);return`* ${G}: ${zj(J)}`}).join(`
107
- `)}function i1($,D=!0){return JSON.stringify($,null,D?4:0)}function Bu($,D){if(!$)return"";if(!D&&!$.recTotal)return"没有数据";return`
108
-
109
- 已显示 ${D} 项,共 ${$.recTotal} 项,当前第 ${$.pageID} 页,每页 ${$.recPerPage} 条`}function U9($,D){if(D.format==="raw")return i1(D.rawResponse??$);if(D.format==="json"){let X={status:"success",data:$};if(D.pager)X.pager=zu(D.pager);return i1(X,D.jsonPretty??!1)}if(D.isList&&Array.isArray($)){let X=w3($,D.fields),G=Bu(D.pager,$.length);if($.length===0&&!G)return"没有数据";return X+G}if(!D.isList&&$&&typeof $==="object"&&!Array.isArray($))return zX($,D.fields);return i1($)}function zu($){return{total:$.recTotal,page:$.pageID,recPerPage:$.recPerPage}}function zj($){if($===null||$===void 0)return"";if(typeof $==="object")return JSON.stringify($);return String($)}function p4($,D){let X=D.split("."),G=$;for(let J of X){if(G===null||G===void 0||typeof G!=="object")return;G=G[J]}return G}function qj($,D){return $.map((X)=>{let G={};for(let J of D)G[J]=p4(X,J);return G})}function Hj($,D){let X={};for(let G of D)X[G]=p4($,G);return X}var qu=["!=",">=","<=","!~",">","<","~",":","="];function Hu($){let D=[],X=Ku($);for(let G of X){let J=G.trim();if(!J)continue;let Y=!1;for(let Q of qu){let W=J.indexOf(Q);if(W>0){let I=J.substring(0,W),U=J.substring(W+Q.length);if(U.startsWith('"')&&U.endsWith('"')||U.startsWith("'")&&U.endsWith("'"))U=U.slice(1,-1);D.push({field:I,operator:Q,value:U}),Y=!0;break}}if(!Y)D.push({field:J,operator:"~",value:""})}return D}function Ku($){let D=[],X="",G=null;for(let J of $)if(G){if(X+=J,J===G)G=null}else if(J==='"'||J==="'")G=J,X+=J;else if(J===",")D.push(X),X="";else X+=J;if(X)D.push(X);return D}function Vu($,D){let X=p4($,D.field),G=X===null||X===void 0?"":String(X),J=D.value;switch(D.operator){case":":case"=":return G===J;case"!=":return G!==J;case">":return Number(G)>Number(J);case"<":return Number(G)<Number(J);case">=":return Number(G)>=Number(J);case"<=":return Number(G)<=Number(J);case"~":return G.includes(J);case"!~":return!G.includes(J);default:return!0}}function Kj($,D){if(D.length===0)return $;let X=D.map(Hu);return $.filter((G)=>X.some((J)=>J.every((Y)=>Vu(G,Y))))}function Vj($,D){let G=D.split(",").map((J)=>J.trim()).filter(Boolean).map((J)=>{let Y=J.match(/^(.+?)_(asc|desc)$/i);if(!Y)return{field:J,order:"asc"};return{field:Y[1],order:Y[2].toLowerCase()}});return[...$].sort((J,Y)=>{for(let{field:Q,order:W}of G){let I=p4(J,Q),U=p4(Y,Q),B=0;if(typeof I==="number"&&typeof U==="number")B=I-U;else B=String(I??"").localeCompare(String(U??""));if(B!==0)return W==="desc"?-B:B}return 0})}function wj($,D,X){if(D.length===0)return $;let G=D.map((J)=>J.split(",").map((Y)=>Y.trim().toLowerCase()).filter(Boolean));return $.filter((J)=>G.some((Y)=>Y.every((Q)=>{return(X??Object.keys(J)).some((I)=>{let U=p4(J,I);if(U===null||U===void 0)return!1;return String(U).toLowerCase().includes(Q)})})))}var mM=eJ(fM(),1),GB=null;function wl(){if(!GB)GB=new mM.default({headingStyle:"atx",codeBlockStyle:"fenced"});return GB}var Ll=/<[a-z][\s\S]*>/i;function cM($){return Ll.test($)}function Ol($){if(!$||!cM($))return $;return wl().turndown($).trim()}function YB($){let D={...$};for(let X of Object.keys(D)){let G=D[X];if(typeof G==="string"&&cM(G))D[X]=Ol(G)}return D}function lM($){return $.map(YB)}function Fl($){let D=$?.split(",").map((X)=>X.trim()).filter(Boolean);return D&&D.length>0?D:void 0}function bl($,D){let X=D.params;if(!X?.length)return;let G;if($.data!==void 0){let Y=$.data;if(typeof Y==="string")try{Y=JSON.parse(Y)}catch{Y=void 0}if(Y&&typeof Y==="object"&&!Array.isArray(Y))G=Y}let J=new Set(Object.keys(D.pathParams??{}));for(let Y of X){if($[Y.name]!==void 0)continue;if(G&&G[Y.name]!==void 0){$[Y.name]=G[Y.name];continue}if(J.has(Y.name)&&$.id!==void 0)$[Y.name]=$.id}}function jl($,D){let X=D.pathParams?Object.keys(D.pathParams):[],G=(D.params??[]).map((I)=>I.name),J=D.requestBody?.schema,Y=J?.properties?Object.keys(J.properties):[],Q=new Set([...X,...G,...Y]),W=[["product","productID"],["project","projectID"],["execution","executionID"]];for(let[I,U]of W)if(Q.has(U)&&$[U]===void 0&&$[I]!==void 0)$[U]=$[I]}var Al=new Set(["data","id","scope","scopeID","orderBy","recTotal","pageID","recPerPage","page","format","silent","insecure","timeout","config","machineReadable","version-flag","help","pick","filter","sort","search","searchFields","all","limit","yes","batchFailFast","params","options"]);function Ml($,D){let X=D.requestBody?.schema;if(!X||X.type!=="object")return;let G=new Set(Object.keys(D.pathParams??{})),J=new Set((D.params??[]).map((I)=>I.name)),Y=new Set(["product","project","execution","productID","projectID","executionID"]),Q;if($.data!==void 0){if(typeof $.data==="string")try{Q=JSON.parse($.data)}catch{Q=void 0}else if(typeof $.data==="object"&&!Array.isArray($.data))Q=$.data}let W=!1;for(let I of Object.keys($)){if(G.has(I)||J.has(I))continue;if(Al.has(I)||Y.has(I))continue;if(I.endsWith("ID")&&I!=="id")continue;let U=$[I];if(U===void 0)continue;if(Q&&Object.prototype.hasOwnProperty.call(Q,I))continue;if(!Q)Q={};Q[I]=U,W=!0}if(W)$.data=JSON.stringify(Q)}async function e3($,D,X,G,J,Y){let Q=H3(D,X);if(!Q)throw new c("E2005",{module:D.name});let W=V3(J,X,G);if(bl(W,Q),jl(W,Q),Ml(W,Q),Q.type==="list"&&J.sort)W.orderBy=J.sort;let I=`${D.name}/${Bj(X)}`,U={client:$,autoFill:Q.type==="update",throwOnFail:!0,recPerPage:J.recPerPage,timeout:J.timeout,insecure:J.insecure},B;try{B=await Q9(I,W,U)}catch(z){throw I9(z)}if(Q.type==="list"&&J.all&&B.pager&&B.pager.total>B.pager.recPerPage){let z=B.pager.recPerPage,L=Math.ceil(B.pager.total/z),F=Array.isArray(B.data)?B.data:[];for(let b=2;b<=L;b++)try{let P=await Q9(I,{...W,recPerPage:z,pageID:b},U);F=F.concat(Array.isArray(P.data)?P.data:[])}catch{break}B={...B,data:F,pager:{total:B.pager.total,page:1,recPerPage:B.pager.total}}}let H=Fl(J.pick),V=B.pager?{pageID:B.pager.page,recPerPage:B.pager.recPerPage,recTotal:B.pager.total}:void 0;if(Q.type==="list"){let z=Array.isArray(B.data)?B.data:[];if(Y.htmlToMarkdown!==!1)z=lM(z);if(J.filter?.length)z=Kj(z,J.filter);if(J.search?.length)z=wj(z,J.search,J.searchFields?.split(","));if(J.sort)z=Vj(z,J.sort);if(J.limit&&Number(J.limit)<z.length)z=z.slice(0,Number(J.limit));if(H)z=qj(z,H);return{action:Q,data:z,rawResponse:B,pager:V,fields:H,isList:!0}}if(Q.type==="get"){let z=B.data??{};if(Y.htmlToMarkdown!==!1)z=YB(z);if(H)z=Hj(z,H);return{action:Q,data:z,rawResponse:B,fields:H,isList:!1}}return{action:Q,data:B.data,rawResponse:B,fields:H,isList:!1}}function T1($,D,X,G,J){let Y={[G]:`${$} ID`},Q={name:D,display:X,type:"action",method:"put",path:`/${$}s/{${G}}/${D}`,resultType:"text",pathParams:Y};if(J?.query)Q.params=J.query;if(J?.properties||J?.required)Q.requestBody={required:!0,type:"object",schema:{type:"object",properties:J?.properties??{},required:J?.required??[]}};return Q}var iM={assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}},Z9={comment:{type:"string",description:"备注"}};var Sl=["productplan","story","epic","requirement","bug","testcase","system","testtask","release"];function Pl(){for(let $ of Sl)E1($,"create",(D)=>{let X=D.requestBody?.schema;if(X?.properties&&"productID"in X.properties)delete X.properties.productID;if(X?.required)X.required=X.required.filter((J)=>J!=="productID");let G=D.params?[...D.params]:[];if(!G.some((J)=>J.name==="productID"))G.unshift({name:"productID",required:!0,type:"number",description:"产品ID"});return D.params=G,D})}function _l(){E1("project","create",($)=>{let D=$.requestBody?.schema;if(!D)return $;if(D.properties={...D.properties??{},desc:{type:"string",description:"项目描述"}},!D.required?.includes("desc"))D.required=[...D.required??[],"desc"];return $})}function Nl(){E1("task","get",{resultGetter:"task"}),E1("system","list",{resultGetter:"systems"});let $=[{module:"project",display:"获取项目详情",idKey:"projectID",resultGetter:"project"},{module:"build",display:"获取版本详情",idKey:"buildID",resultGetter:"build"},{module:"release",display:"获取发布详情",idKey:"releaseID",resultGetter:"release"},{module:"system",display:"获取应用详情",idKey:"systemID",resultGetter:"system"},{module:"testtask",display:"获取测试单详情",idKey:"testtaskID",resultGetter:"testtask"}];for(let D of $){let X={name:"get",display:D.display,type:"get",method:"get",path:`/${D.module}s/{${D.idKey}}`,resultType:"object",resultGetter:D.resultGetter,pathParams:{[D.idKey]:`${D.module}ID`}};J4(D.module,X)}}function Rl(){J4("bug",[T1("bug","confirm","确认Bug","bugID",{properties:Z9}),T1("bug","assignto","指派Bug","bugID",{properties:iM,required:["assignedTo"]})]),J4("task",[T1("task","pause","暂停任务","taskID",{properties:Z9}),T1("task","cancel","取消任务","taskID",{properties:Z9}),T1("task","restart","继续任务","taskID",{properties:{realStarted:{type:"string",description:"实际开始"},consumed:{type:"number",description:"总计消耗",format:"float"},left:{type:"number",description:"预计剩余",format:"float"},comment:{type:"string",description:"备注"}},required:["realStarted"]}),T1("task","assignto","指派任务","taskID",{query:[{name:"executionID",required:!0,type:"number",description:"执行ID"}],properties:{assignedTo:{type:"string",description:"指派给"},left:{type:"number",description:"预计剩余",format:"float"},comment:{type:"string",description:"备注"}},required:["assignedTo","left"]})]);let $=(D,X,G)=>[T1(D,"review",`${G}评审`,X,{properties:{assignedTo:{type:"string",description:"指派给"},result:{type:"string",description:"评审结果"},reviewedDate:{type:"string",description:"评审时间"},comment:{type:"string",description:"备注"}},required:["result","reviewedDate","comment"]}),T1(D,"assignto",`${G}指派`,X,{properties:iM,required:["assignedTo"]})];J4("story",$("story","storyID","需求")),J4("epic",$("epic","epicID","业务需求")),J4("requirement",$("requirement","requirementID","用户需求")),J4("testcase",[T1("testcase","review","评审用例","caseID",{query:[{name:"caseID",required:!0,type:"number",description:"用例ID"}],properties:{assignedTo:{type:"string",description:"指派给"},result:{type:"string",description:"评审结果"},reviewedDate:{type:"string",description:"评审时间"},comment:{type:"string",description:"备注"}},required:["result","reviewedDate"]})]),J4("testtask",[T1("testtask","start","开始测试单","testtaskID",{properties:{name:{type:"string",description:"测试单名称"}}}),T1("testtask","close","关闭测试单","testtaskID",{properties:Z9}),T1("testtask","activate","激活测试单","testtaskID",{properties:{build:{type:"string",description:"测试版本"},comment:{type:"string",description:"备注"}}}),T1("testtask","block","阻塞测试单","testtaskID",{properties:Z9})])}function pM(){Pl(),_l(),Nl(),Rl()}var y9=eJ(DS(),1);import C9 from"node:path";import al from"node:os";import ul from"os";import QY from"path";var E0=ul.homedir(),{env:_D}=process,XS=_D.XDG_DATA_HOME||(E0?QY.join(E0,".local","share"):void 0),YY=_D.XDG_CONFIG_HOME||(E0?QY.join(E0,".config"):void 0),nG$=_D.XDG_STATE_HOME||(E0?QY.join(E0,".local","state"):void 0),dG$=_D.XDG_CACHE_HOME||(E0?QY.join(E0,".cache"):void 0),oG$=_D.XDG_RUNTIME_DIR||void 0,fl=(_D.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");if(XS)fl.unshift(XS);var ml=(_D.XDG_CONFIG_DIRS||"/etc/xdg").split(":");if(YY)ml.unshift(YY);import ol from"node:path";import k$ from"node:fs";import{promisify as D1}from"node:util";var cl=($,D)=>{let{onError:X}=D;return function(...J){return $.apply(void 0,J).catch(X)}},R4=cl;var ll=($,D)=>{let{onError:X}=D;return function(...J){try{return $.apply(void 0,J)}catch(Y){return X(Y)}}},W4=ll;var JS=250;var il=($,D)=>{let{isRetriable:X}=D;return function(J){let{timeout:Y}=J,Q=J.interval??JS,W=Date.now()+Y;return function I(...U){return $.apply(void 0,U).catch((B)=>{if(!X(B))throw B;if(Date.now()>=W)throw B;let H=Math.round(Q*Math.random());if(H>0)return new Promise((z)=>setTimeout(z,H)).then(()=>I.apply(void 0,U));else return I.apply(void 0,U)})}}},E4=il;var pl=($,D)=>{let{isRetriable:X}=D;return function(J){let{timeout:Y}=J,Q=Date.now()+Y;return function(...I){while(!0)try{return $.apply(void 0,I)}catch(U){if(!X(U))throw U;if(Date.now()>=Q)throw U;continue}}}},Z4=pl;import YS from"node:process";var T9={isChangeErrorOk:($)=>{if(!T9.isNodeError($))return!1;let{code:D}=$;if(D==="ENOSYS")return!0;if(!GS&&(D==="EINVAL"||D==="EPERM"))return!0;return!1},isNodeError:($)=>{return $ instanceof Error},isRetriableError:($)=>{if(!T9.isNodeError($))return!1;let{code:D}=$;if(D==="EMFILE"||D==="ENFILE"||D==="EAGAIN"||D==="EBUSY"||D==="EACCESS"||D==="EACCES"||D==="EACCS"||D==="EPERM")return!0;return!1},onChangeError:($)=>{if(!T9.isNodeError($))throw $;if(T9.isChangeErrorOk($))return;throw $}},BB=T9;var v9={onError:BB.onChangeError},O1={onError:()=>{return}},GS=YS.getuid?!YS.getuid():!1,i6={isRetriable:BB.isRetriableError};var rl={attempt:{chmod:R4(D1(k$.chmod),v9),chown:R4(D1(k$.chown),v9),close:R4(D1(k$.close),O1),fsync:R4(D1(k$.fsync),O1),mkdir:R4(D1(k$.mkdir),O1),realpath:R4(D1(k$.realpath),O1),stat:R4(D1(k$.stat),O1),unlink:R4(D1(k$.unlink),O1),chmodSync:W4(k$.chmodSync,v9),chownSync:W4(k$.chownSync,v9),closeSync:W4(k$.closeSync,O1),existsSync:W4(k$.existsSync,O1),fsyncSync:W4(k$.fsync,O1),mkdirSync:W4(k$.mkdirSync,O1),realpathSync:W4(k$.realpathSync,O1),statSync:W4(k$.statSync,O1),unlinkSync:W4(k$.unlinkSync,O1)},retry:{close:E4(D1(k$.close),i6),fsync:E4(D1(k$.fsync),i6),open:E4(D1(k$.open),i6),readFile:E4(D1(k$.readFile),i6),rename:E4(D1(k$.rename),i6),stat:E4(D1(k$.stat),i6),write:E4(D1(k$.write),i6),writeFile:E4(D1(k$.writeFile),i6),closeSync:Z4(k$.closeSync,i6),fsyncSync:Z4(k$.fsyncSync,i6),openSync:Z4(k$.openSync,i6),readFileSync:Z4(k$.readFileSync,i6),renameSync:Z4(k$.renameSync,i6),statSync:Z4(k$.statSync,i6),writeSync:Z4(k$.writeSync,i6),writeFileSync:Z4(k$.writeFileSync,i6)}},y6=rl;import ND from"node:process";var QS="utf8",zB=438,WS=511;var IS={},US=ND.geteuid?ND.geteuid():-1,BS=ND.getegid?ND.getegid():-1;var zS=1000,qS=!!ND.getuid,b3$=ND.getuid?!ND.getuid():!1,qB=128;var HS=($)=>{return $ instanceof Error&&"code"in $};var HB=($)=>{return typeof $==="string"},WY=($)=>{return $===void 0};import dl from"node:path";import RX from"node:process";import KS from"node:process";var VS=KS.platform==="linux",IY=KS.platform==="win32";var KB=["SIGHUP","SIGINT","SIGTERM"];if(!IY)KB.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(VS)KB.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var wS=KB;class LS{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=($)=>{if(this.exited)return;this.exited=!0;for(let D of this.callbacks)D();if($)if(IY&&($!=="SIGINT"&&$!=="SIGTERM"&&$!=="SIGKILL"))RX.kill(RX.pid,"SIGTERM");else RX.kill(RX.pid,$)},this.hook=()=>{RX.once("exit",()=>this.exit());for(let $ of wS)try{RX.once($,()=>this.exit($))}catch{}},this.register=($)=>{return this.callbacks.add($),()=>{this.callbacks.delete($)}},this.hook()}}var OS=new LS;var nl=OS.register,FS=nl;var v1={store:{},create:($)=>{let D=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),X=Date.now().toString().slice(-10),G="tmp-",J=`.tmp-${X}${D}`;return`${$}${J}`},get:($,D,X=!0)=>{let G=v1.truncate(D($));if(G in v1.store)return v1.get($,D,X);return v1.store[G]=X,[G,()=>delete v1.store[G]]},purge:($)=>{if(!v1.store[$])return;delete v1.store[$],y6.attempt.unlink($)},purgeSync:($)=>{if(!v1.store[$])return;delete v1.store[$],y6.attempt.unlinkSync($)},purgeSyncAll:()=>{for(let $ in v1.store)v1.purgeSync($)},truncate:($)=>{let D=dl.basename($);if(D.length<=qB)return $;let X=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(D);if(!X)return $;let G=D.length-qB;return`${$.slice(0,-D.length)}${X[1]}${X[2].slice(0,-G)}${X[3]}`}};FS(v1.purgeSyncAll);var k9=v1;function UY($,D,X=IS){if(HB(X))return UY($,D,{encoding:X});let J={timeout:X.timeout??zS},Y=null,Q=null,W=null;try{let I=y6.attempt.realpathSync($),U=!!I;$=I||$,[Q,Y]=k9.get($,X.tmpCreate||k9.create,X.tmpPurge!==!1);let B=qS&&WY(X.chown),H=WY(X.mode);if(U&&(B||H)){let V=y6.attempt.statSync($);if(V){if(X={...X},B)X.chown={uid:V.uid,gid:V.gid};if(H)X.mode=V.mode}}if(!U){let V=ol.dirname($);y6.attempt.mkdirSync(V,{mode:WS,recursive:!0})}if(W=y6.retry.openSync(J)(Q,"w",X.mode||zB),X.tmpCreated)X.tmpCreated(Q);if(HB(D))y6.retry.writeSync(J)(W,D,0,X.encoding||QS);else if(!WY(D))y6.retry.writeSync(J)(W,D,0,D.length,0);if(X.fsync!==!1)if(X.fsyncWait!==!1)y6.retry.fsyncSync(J)(W);else y6.attempt.fsync(W);if(y6.retry.closeSync(J)(W),W=null,X.chown&&(X.chown.uid!==US||X.chown.gid!==BS))y6.attempt.chownSync(Q,X.chown.uid,X.chown.gid);if(X.mode&&X.mode!==zB)y6.attempt.chmodSync(Q,X.mode);try{y6.retry.renameSync(J)(Q,$)}catch(V){if(!HS(V))throw V;if(V.code!=="ENAMETOOLONG")throw V;y6.retry.renameSync(J)(Q,k9.truncate($))}Y(),Q=null}finally{if(W)y6.attempt.closeSync(W);if(Q)k9.purge(Q)}}var RD=($)=>{let D=typeof $;return $!==null&&(D==="object"||D==="function")};var VB=new Set(["__proto__","prototype","constructor"]),tl=new Set("0123456789");function BY($){let D=[],X="",G="start",J=!1;for(let Y of $)switch(Y){case"\\":{if(G==="index")throw Error("Invalid character in an index");if(G==="indexEnd")throw Error("Invalid character after an index");if(J)X+=Y;G="property",J=!J;break}case".":{if(G==="index")throw Error("Invalid character in an index");if(G==="indexEnd"){G="property";break}if(J){J=!1,X+=Y;break}if(VB.has(X))return[];D.push(X),X="",G="property";break}case"[":{if(G==="index")throw Error("Invalid character in an index");if(G==="indexEnd"){G="index";break}if(J){J=!1,X+=Y;break}if(G==="property"){if(VB.has(X))return[];D.push(X),X=""}G="index";break}case"]":{if(G==="index"){D.push(Number.parseInt(X,10)),X="",G="indexEnd";break}if(G==="indexEnd")throw Error("Invalid character after an index")}default:{if(G==="index"&&!tl.has(Y))throw Error("Invalid character in an index");if(G==="indexEnd")throw Error("Invalid character after an index");if(G==="start")G="property";if(J)J=!1,X+="\\";X+=Y}}if(J)X+="\\";switch(G){case"property":{if(VB.has(X))return[];D.push(X);break}case"index":throw Error("Index was not closed");case"start":{D.push("");break}}return D}function wB($,D){if(typeof D!=="number"&&Array.isArray($)){let X=Number.parseInt(D,10);return Number.isInteger(X)&&$[X]===$[D]}return!1}function bS($,D){if(wB($,D))throw Error("Cannot use string index")}function jS($,D,X){if(!RD($)||typeof D!=="string")return X===void 0?$:X;let G=BY(D);if(G.length===0)return X;for(let J=0;J<G.length;J++){let Y=G[J];if(wB($,Y))$=J===G.length-1?void 0:null;else $=$[Y];if($===void 0||$===null){if(J!==G.length-1)return X;break}}return $===void 0?X:$}function LB($,D,X){if(!RD($)||typeof D!=="string")return $;let G=$,J=BY(D);for(let Y=0;Y<J.length;Y++){let Q=J[Y];if(bS($,Q),Y===J.length-1)$[Q]=X;else if(!RD($[Q]))$[Q]=typeof J[Y+1]==="number"?[]:{};$=$[Q]}return G}function AS($,D){if(!RD($)||typeof D!=="string")return!1;let X=BY(D);for(let G=0;G<X.length;G++){let J=X[G];if(bS($,J),G===X.length-1)return delete $[J],!0;if($=$[J],!RD($))return!1}}function MS($,D){if(!RD($)||typeof D!=="string")return!1;let X=BY(D);if(X.length===0)return!1;for(let G of X){if(!RD($)||!(G in $)||wB($,G))return!1;$=$[G]}return!0}function sl($,D){let X=D?C9.join($,"config.json"):C9.join("configstore",`${$}.json`),G=YY??y9.default.mkdtempSync(y9.default.realpathSync(al.tmpdir())+C9.sep);return C9.join(G,X)}var el="You don't have access to this file.",$i={mode:448,recursive:!0},SS={mode:384};function PS($){if($.code==="EACCES")$.message=`${$.message}
110
- ${el}
111
- `;throw $}class zY{constructor($,D,X={}){if(this._path=X.configPath??sl($,X.globalConfigPath),this._clearInvalidConfig=X.clearInvalidConfig??!0,D)this.all={...D,...this.all}}get all(){try{return JSON.parse(y9.default.readFileSync(this._path,"utf8"))}catch($){if($.code==="ENOENT")return{};if($.name==="SyntaxError"){if(this._clearInvalidConfig)return UY(this._path,"",SS),{};throw $}return PS($),{}}}set all($){try{y9.default.mkdirSync(C9.dirname(this._path),$i),UY(this._path,JSON.stringify($,void 0,"\t"),SS)}catch(D){PS(D)}}get size(){return Object.keys(this.all||{}).length}get($){return jS(this.all,$)}set($,D){let X=this.all;if(typeof $==="object"&&arguments.length===1)for(let G of Object.keys($))LB(X,G,$[G]);else LB(X,$,D);this.all=X}has($){return MS(this.all,$)}delete($){let D=this.all;AS(D,$),this.all=D}clear(){this.all={}}get path(){return this._path}}import{chmodSync as Di,existsSync as Xi}from"node:fs";import{isAbsolute as Ji,join as _S,resolve as Gi}from"node:path";import{homedir as FB}from"node:os";var g9={defaultOutputFormat:"markdown",lang:"zh-CN",defaultRecPerPage:20,insecure:!1,timeout:1e4,htmlToMarkdown:!0,batchFailFast:!1,autoSetWorkspace:!1,pagers:{},silent:!1,jsonPretty:!1},OB=Object.keys(g9);function Yi(){return _S(FB(),".config","zentao","zentao.json")}var EX=Yi(),qY=null;function ZX(){if(!qY)qY=new zY("zentao-cli",{},{configPath:EX}),HY();return qY}function HY(){try{if(Xi(EX))Di(EX,384)}catch{}}function Qi($){if($==="~")return FB();if($.startsWith("~/")||$.startsWith("~\\"))return _S(FB(),$.slice(2));return $}function NS($){if(typeof $!=="string"||$.trim()==="")throw Error("setConfigPath: path must be a non-empty string");let D=Qi($),X=Ji(D)?D:Gi(D);if(qY&&X!==EX)throw Error("setConfigPath: cannot change config path after store has been initialized");EX=X}function KY(){try{let $=ZX();return{currentProfile:$.get("currentProfile"),profiles:$.get("profiles")}}catch{throw new c("E1005",{path:EX})}}function p6($,D){return`${$}@${D}`}function W6(){let $=KY();if(!$.currentProfile||!$.profiles?.length)return;return $.profiles.find((D)=>p6(D.account,D.server)===$.currentProfile)}function VY($,D){return KY().profiles?.find((G)=>G.account===$&&G.server===D)}function Wi($){return KY().profiles?.find((X)=>p6(X.account,X.server)===$||X.account===$||`${X.account}@${new URL(X.server).hostname}`===$)}function I4($){let D=ZX(),X=D.get("profiles")??[],G=X.findIndex((J)=>J.account===$.account&&J.server===$.server);if(G>=0)X[G]=$;else X.push($);D.set("profiles",X),D.set("currentProfile",p6($.account,$.server)),HY()}function RS($){let D=ZX(),X=D.get("profiles")??[],G=X.findIndex((Y)=>p6(Y.account,Y.server)===$);if(G<0)return!1;if(X.splice(G,1),D.set("profiles",X),D.get("currentProfile")===$)D.set("currentProfile",X.length>0?p6(X[0].account,X[0].server):void 0);return HY(),!0}function wY($){let D=Wi($);if(!D)return!1;return ZX().set("currentProfile",p6(D.account,D.server)),!0}function LY(){return KY().profiles??[]}function Z0($){return{...g9,...$.config}}function ES($,D,X){if(!$.config)$.config={};$.config[D]=X,I4($)}function TX($,D,X,G,J,Y){let Q=new Date().toISOString();return{...Y,server:$.replace(/\/+$/,""),account:D,token:X,user:Y?{...Y.user,...J}:J,loginTime:Q,lastUsedTime:Q,serverConfig:Y?.serverConfig??G}}function ZS(){try{return ZX().get("updateCheck")}catch{return}}function TS($){ZX().set("updateCheck",$),HY()}import{createInterface as zi}from"node:readline";var Ii=typeof Bun<"u",vS=Ii&&typeof Bun.markdown.ansi==="function",T0={none:0,basic:1,full:2};function Ui($=process.argv,D=process.env){let X=(G)=>$.includes(G);if(X("--machine-readable"))return T0.none;if(X("--no-color")||X("--plain")||D.NO_COLOR==="1")return T0.none;if(X("--color=always")||D.FORCE_COLOR==="1")return process.stdout.isTTY?T0.full:T0.basic;if(!process.stdout.isTTY)return T0.none;if(D.CI==="true")return T0.basic;return T0.full}var Bi=Ui();function kS($){return Bi>=(typeof $==="string"?T0[$]:$)}function bB($){if(vS&&kS("basic"))return Bun.markdown.ansi($);return $}function vX($,D){if($ instanceof c)return u6($,D);return $.message}async function CS($,D){if($==="json"||$==="raw")return!0;let X=zi({input:process.stdin,output:process.stderr});return new Promise((G)=>{X.question(`确认删除 ${D} 个对象?(y/n): `,(J)=>{X.close(),G(J.toLowerCase()==="y")})})}function yS($){let X=(Array.isArray($)?$:[$]).flatMap((G)=>String(G??"").split(",")).map((G)=>G.trim()).filter(Boolean);if(X.length<=1||!X.every((G)=>/^\d+$/.test(G)))return;return X}function qi($,D){let X=yS(D.id);if(X)return{ids:X,args:$};let G=yS($[0]);if(G)return{ids:G,args:$.slice(1)};return}async function Hi($,D,X,G,J,Y){let Q=J.format??Y.defaultOutputFormat??"markdown",W=J.silent??Y.silent??!1,I=await e3($,D,X,G,J,Y);if(W)return;if(Q==="raw"){let B=U9(I.data,{format:Q,isList:I.isList,fields:I.fields,pager:I.pager,jsonPretty:Y.jsonPretty,rawResponse:I.rawResponse});if(B)console.log(B);return}if(I.action.type==="list"){let B=U9(I.data,{format:Q,isList:!0,fields:I.fields,pager:I.pager,jsonPretty:Y.jsonPretty});if(B)console.log(B);return}if(I.action.type==="get"){let B=U9(I.data,{format:Q,isList:!1,fields:I.fields,jsonPretty:Y.jsonPretty});if(B)console.log(B);return}let U=U9(I.data,{format:Q,isList:!1,fields:I.fields,jsonPretty:Y.jsonPretty});if(U)console.log(U);else if(Q==="markdown")console.log("操作成功")}async function u9($,D,X,G,J,Y){let Q=Z0(J),W=Y.batchFailFast??Q.batchFailFast??!1,I=Y.format??Q.defaultOutputFormat??"markdown",U=qi(G,Y);if(U){if(X==="delete"&&!Y.yes){if(!await CS(I,U.ids.length))return}for(let z of U.ids){let L;try{await u9($,D,X,U.args,J,{...Y,id:z,yes:Y.yes||X==="delete"})}catch(F){L=F}if(L){if(W)throw L;console.error(vX(L,I))}}return}let B=H3(D,X);if(!B)throw new c("E2005",{module:D.name});let H=V3(Y,X,G),V=H.id!==void 0&&H.id!=="";if(!V&&(B.type==="delete"||B.type==="update"||B.type==="action"))throw new c("E2009",{option:"id",reason:"必须提供要操作的对象 ID"});if(B.type==="delete"&&!Y.yes){if(!await CS(I,V?1:0))return}await Hi($,D,X,G,Y,Q)}function kX($){let D=$.name;if(console.log(`模块: ${$.display??D}`),$.description)console.log(`描述: ${$.description}`);let X=[],G=t6($,"list");if(G)X.push({cmd:`zentao ${D} [选项]`,desc:G.display??"获取列表"});let J=t6($,"get");if(J)X.push({cmd:`zentao ${D} <id> [选项]`,desc:J.display??"获取详情"});let Y=t6($,"create");if(Y)X.push({cmd:`zentao ${D} create [--key=value ...]`,desc:Y.display??"创建"});let Q=t6($,"update");if(Q)X.push({cmd:`zentao ${D} update <id> [--key=value ...]`,desc:Q.display??"更新"});let W=t6($,"delete");if(W)X.push({cmd:`zentao ${D} delete <id>[,<id>...] [选项]`,desc:W.display??"删除"});if(X.length>0){console.log(`
112
- 操作:`);let U=Math.max(...X.map((B)=>B.cmd.length),24)+4;for(let B of X)console.log(` ${B.cmd.padEnd(U)}${B.desc}`)}let I=W9($);if(I.length>0){let U=[];for(let H of I){let z=t6($,"action",H)?.display??H;U.push({cmd:`zentao ${D} ${H} <id> [--key=value ...]`,desc:z})}console.log(`
113
- 扩展操作:`);let B=Math.max(...U.map((H)=>H.cmd.length),24)+4;for(let H of U)console.log(` ${H.cmd.padEnd(B)}${H.desc}`)}if(G?.pathParams){let U="scope"in G.pathParams,B=Object.entries(G.pathParams).filter(([H])=>H!=="scope"&&H!=="scopeID");if(U||B.length>0){let H=[];if(U){let V=G.pathParams.scope;if(typeof V==="object"&&V.options)for(let z of V.options){let L=String(z.value).replace(/s$/,"");H.push({name:L,placeholder:"id",description:`按${z.label}范围筛选,值为${z.label} ID`})}else H.push({name:"product",placeholder:"id",description:"按产品范围筛选,值为产品 ID"}),H.push({name:"project",placeholder:"id",description:"按项目范围筛选,值为项目 ID"}),H.push({name:"execution",placeholder:"id",description:"按执行范围筛选,值为执行 ID"})}for(let[V,z]of B){let L=typeof z==="string"?z:z.description??V;H.push({name:V,placeholder:"id",description:L})}console.log(`
114
- 上下文参数${U?"(获取列表时必须指定其一)":""}:`),x9(H)}}console.log(`
115
- 公共选项:`),x9([{name:"pick",placeholder:"fields",description:"摘取指定字段(逗号分隔),适用于 list/get 操作"},{name:"filter",placeholder:"expr",description:"过滤条件,格式: field=value 或 field!=value,可多次指定,适用于 list 操作"},{name:"sort",placeholder:"expr",description:"客户端排序,格式: field_asc 或 field_desc,适用于 list 操作"},{name:"search",placeholder:"keywords",description:"搜索关键词,可多次指定,适用于 list 操作"},{name:"search-fields",placeholder:"fields",description:"搜索字段(逗号分隔),配合 --search 使用,适用于 list 操作"},{name:"page",placeholder:"number",description:"页码(等同于 API 的 pageID 参数),适用于 list 操作"},{name:"recPerPage",placeholder:"number",description:"每页条数,适用于 list 操作"},{name:"data",placeholder:"json",description:"请求数据(JSON 格式),适用于 create/update 操作"},{name:"params",placeholder:"json",description:"API 调用参数(JSON 对象),可替代单独的 --key=value 传参"},{name:"options",placeholder:"json",description:"CLI 调用选项(JSON 对象),可替代单独的公共选项"},{name:"yes",description:"跳过确认提示,适用于 delete 操作"},{name:"silent",description:"静默模式,不输出任何结果"},{name:"id",placeholder:"id",description:"对象 ID,适用于 get/update/delete 操作"},{name:"format",placeholder:"type",description:"输出格式,支持 markdown、json、raw"}]),console.log(`
116
- 提示:`),console.log(` 使用 zentao ${D} <操作> help 查看操作的详细参数说明`),console.log(` 参数传入方式: --key=value 或 --params '{"key":"value"}'`),console.log(` 请求数据传入: --data '{"key":"value"}' 或直接 --key=value`)}function h9($,D){if(console.log(D.display??`${$.display??$.name} ${D.name}`),D.description&&D.description!==D.display)console.log(`描述: ${D.description}`);console.log(`HTTP: ${(D.method??"GET").toUpperCase()} ${D.path}`);let X=[];if(D.pathParams)for(let[Y,Q]of Object.entries(D.pathParams)){if(Y==="scope"||Y==="scopeID")continue;if(Y.endsWith("ID")){X.push({name:"id",placeholder:"number",description:typeof Q==="string"?Q:Q.description??`${$.display??$.name} ID`,required:!0});continue}let W=typeof Q==="object";X.push({name:Y,placeholder:jB(W&&Q.type?Q.type:"string"),description:typeof Q==="string"?Q:Q.description??Y,required:W?Q.required:void 0,defaultValue:W?Q.defaultValue:void 0,options:W?Q.options:void 0})}if(D.params?.length)for(let Y of D.params)X.push({name:Y.name,placeholder:jB(Y.type??"string"),description:Y.description??Y.name,required:Y.required,defaultValue:Y.defaultValue,options:Y.options});if(D.requestBody?.schema){let Y=D.requestBody.schema;if(Y.properties){let Q=new Set(Y.required??[]);for(let[W,I]of Object.entries(Y.properties))X.push({name:W,placeholder:jB(I.type??"string",I.items?.type),description:I.description??W,required:Q.has(W),defaultValue:I.defaultValue})}}if(D.type==="create"||D.type==="update"||D.type==="action")X.push({name:"data",placeholder:"json",description:"请求数据(完整 JSON 对象),可替代以上逐个字段传参"});if(X.push({name:"params",placeholder:"json",description:"API 调用参数(JSON 对象),可替代以上逐个 --key=value 传参"}),X.push({name:"options",placeholder:"json",description:"CLI 调用选项(JSON 对象),可替代以下公共选项"}),X.length>0)console.log(`
117
- API 参数:`),x9(X);if(D.pathParams&&"scope"in D.pathParams){let Y=D.pathParams.scope,Q=[];if(typeof Y==="object"&&Y.options)for(let W of Y.options){let I=String(W.value).replace(/s$/,"");Q.push({name:I,placeholder:"id",description:`按${W.label}范围筛选,值为${W.label} ID`})}else Q.push({name:"product",placeholder:"id",description:"按产品范围筛选,值为产品 ID"}),Q.push({name:"project",placeholder:"id",description:"按项目范围筛选,值为项目 ID"}),Q.push({name:"execution",placeholder:"id",description:"按执行范围筛选,值为执行 ID"});console.log(`
118
- 上下文参数(必须指定其一):`),x9(Q)}let J=[];if(D.resultType==="list"||D.type==="list")J.push({name:"pick",placeholder:"fields",description:"摘取指定字段(逗号分隔),仅输出指定的字段"},{name:"filter",placeholder:"expr",description:"过滤条件,格式: field=value 或 field!=value,可多次指定"},{name:"sort",placeholder:"expr",description:"客户端排序,格式: field_asc 或 field_desc"},{name:"search",placeholder:"keywords",description:"搜索关键词,可多次指定"},{name:"search-fields",placeholder:"fields",description:"搜索字段(逗号分隔),配合 --search 使用"},{name:"page",placeholder:"number",description:"页码(等同于 API 的 pageID 参数)"},{name:"recPerPage",placeholder:"number",description:"每页条数"});else if(D.resultType==="object"||D.type==="get")J.push({name:"pick",placeholder:"fields",description:"摘取指定字段(逗号分隔),仅输出指定的字段"});if(D.type==="delete")J.push({name:"yes",description:"跳过确认提示,直接执行删除"});if(J.push({name:"format",placeholder:"type",description:"输出格式,支持 markdown、json、raw"}),J.push({name:"silent",description:"静默模式,不输出任何结果"}),D.type!=="list"&&D.type!=="get")J.push({name:"batch-fail-fast",description:"批量操作遇到错误时立即停止"});console.log(`
119
- 公共选项:`),x9(J)}var Ki=["list","get","create","update","delete"];function xS($){let D=!0;for(let X of Ki){let G=t6($,X);if(!G)continue;if(!D)console.log(`
1
+ var G1=Object.defineProperty;var F1=(T)=>T;function K1(T,$){this[T]=F1.bind(null,$)}var I1=(T,$)=>{for(var Y in $)G1(T,Y,{get:$[Y],enumerable:!0,configurable:!0,set:K1.bind($,Y)})};var D=(T,$)=>()=>(T&&($=T(T=0)),$);function _1(T){if(!T||typeof T!=="object")return!1;let $=T.code;return typeof $==="string"&&$.startsWith("E_")}function MT(T,$){if(!T)return"";let Y=T.indexOf($);return Y>=0?T.slice(Y+$.length).trim():T}function TT(T){if(T instanceof R)return T;if(!_1(T))return T;let{code:$,message:Y,details:Q}=T,X=Q&&typeof Q==="object"?Q:{};switch($){case"E_HTTP_ERROR":{let J=Number(X.status),H=typeof X.url==="string"?X.url:"";if(J===401)return new R("E1004",void 0,Q);if(J===403)return new R("E2006",void 0,Q);if(J===404)return new R("E2002",{object:H},Q);return new R("E2008",{url:H,status:String(X.status??""),serverResponse:typeof X.body==="string"?X.body:String(X.body??"")},Q)}case"E_TIMEOUT":return new R("E5001",void 0,Q);case"E_ABORTED":return new R("E5003",void 0,Q);case"E_NETWORK_ERROR":{let J=(typeof X.message==="string"?X.message:Y)??"";if(J.includes("SSL")||J.includes("TLS")||J.includes("certificate"))return new R("E5002",void 0,Q);return new R("E1002",{url:""},Q)}case"E_API_FAILED":return new R("E2008",{url:"",status:"",serverResponse:MT(Y,"failure:")||(Y??"")},Q);case"E_LOGIN_FAILED":return new R("E1003",void 0,Q);case"E_UNSUPPORTED_ZENTAO_VERSION":return new R("E2010",{action:String(X.action??""),version:String(X.version??""),minVersion:Array.isArray(X.minVersion)?X.minVersion.join(" / "):String(X.minVersion??"")},Q);case"E_INVALID_ZENTAO_VERSION":return new R("E2011",{version:MT(Y,"version:")},Q);case"E_INVALID_ZENTAO_CONFIG":return new R("E2012",void 0,Q);case"E_MISSING_PARAM":return new R("E2003",{fields:MT(Y,"parameter:"),module:""},Q);case"E_INVALID_PARAM":{let J=MT(Y,"parameter "),[H,W]=J.split(":").map((B)=>B.trim());return new R("E2004",{field:H??"",value:W??""},Q)}case"E_INVALID_MODULE":return new R("E2001",{module:MT(Y,"module:")},Q);case"E_INVALID_ACTION":case"E_INVALID_REQUEST_NAME":return new R("E2005",{module:""},Q);case"E_NO_PROFILE":case"E_NO_GLOBAL_CLIENT":return new R("E1006",void 0,Q);case"E_PROFILE_NOT_FOUND":return new R("E1007",void 0,Q);default:return new R("E2008",{url:"",status:"",serverResponse:Y??String($)},Q)}}function N0(T,$){if($==="json"||$==="raw"){let Y={error:{code:T.code,message:T.message}};if(T.details)Y.error={...Y.error,details:T.details};return JSON.stringify(Y,null,4)}return`Error(E${T.code}): ${T.message}`}var Z1,R;var z=D(()=>{Z1={E1001:"必须提供有效的禅道服务地址、用户名和密码或 TOKEN",E1002:"所提供的禅道服务地址 {url} 无法访问",E1003:"当前用户名和密码不正确",E1004:"所提供的 Token 已失效,请提供密码重新登录,或提供新的 TOKEN",E1005:"配置文件损坏或无法读取,请检查 {path}",E1006:"未找到可用的用户配置,请执行 `zentao login --web` 在浏览器中登录;终端登录使用 `zentao login --no-browser`",E1007:"指定的用户配置不存在,请通过 `zentao profile` 查看可用配置",E1008:"浏览器登录已取消",E1009:"浏览器登录等待超时,请重新执行 `zentao login --web`",E1010:"无法启动本地登录服务,请检查本机网络权限,或使用 `zentao login --no-browser`",E1011:"配置文件写入失败,请检查 {path} 的目录权限和磁盘空间",E2001:"未找到指定的模块 {module},请通过 `zentao help` 查看支持的模块",E2002:"未找到指定的对象 {object},请检查对象 ID 是否正确",E2003:"缺少必要参数 {fields},请通过 `zentao {module} help` 查看必要参数",E2004:"{field} 参数值 {value} 无效,请检查参数格式是否正确",E2005:"不支持的操作,请通过 `zentao {module} help` 查看支持的操作",E2006:"当前用户没有权限执行此操作",E2007:"`--data` 参数中的 JSON 数据格式无效",E2008:"禅道服务端返回错误(Url:{url},Status:{status}),请查看详细错误信息:{serverResponse}",E2009:"选项 {option} 的值无效,{reason}",E2010:"操作 {action} 不支持当前禅道版本 {version},最低版本要求:{minVersion},请升级对应系列的禅道版本",E2011:"无法识别禅道版本 {version},仅支持点分数字的正式版本(如 22.5、biz13.5、max8.5、ipd5.5)",E2012:"无法识别禅道服务端配置,请检查站点根地址的 ?mode=getconfig 是否返回包含 version 的 JSON 对象",E5001:"请求超时,请检查网络连接或禅道服务是否正常",E5002:"SSL/TLS 证书验证失败,请检查禅道服务地址是否正确",E5003:"请求已取消",E5004:"无法启动 MCP HTTP 服务:{reason}"};R=class R extends Error{code;details;constructor(T,$,Y){let Q=Z1[T];if($)for(let[X,J]of Object.entries($))Q=Q.replaceAll(`{${X}}`,J);super(Q);this.name="ZentaoError",this.code=T.replace("E",""),this.details=Y}}});import{writeFile as w1}from"node:fs/promises";import{join as z1}from"node:path";var BT=async({request:T,client:$,timeout:Y,insecure:Q})=>{let X=await $.request(T.path,{method:"GET",query:{fileID:T.id},responseType:"response",timeout:Y,insecure:Q}),J=X.headers.get("Content-Disposition")??"",H=J.match(/filename\*\s*=\s*(?:UTF-8'')?["']?([^"';\n]+)["']?/i),W=J.match(/filename\s*=\s*(?:"([^"]+)"|'([^']+)'|([^;\n]+))/i),B=(H?.[1]??W?.[1]??W?.[2]??W?.[3]??`file_${T.id}`).trim();if(H)try{B=decodeURIComponent(B)}catch{}if(B=B.split(/[\\/]/).at(-1)??"",!B||B==="."||B==="..")B=`file_${T.id}`;let U=typeof T.params.output==="string"?T.params.output:".",V=z1(U,B),L=Buffer.from(await X.arrayBuffer());try{await w1(V,L,{flag:"wx"})}catch(F){let I=F.code==="EEXIST"?`目标文件已存在: ${V}`:`无法写入目标文件: ${V}`;throw new R("E2009",{option:"output",reason:I},F)}return{status:"success",data:{file:V,size:L.byteLength}}};var eT=D(()=>{z()});import{defineModuleActions as q1,getModule as O1}from"zentao-api";function S(T,$){for(let Y of Array.isArray($)?$:[$]){let Q=O1(T);if(!Q)continue;if(Q.actions.some((H)=>H.name===Y.name||H.method?.toLowerCase()===Y.method?.toLowerCase()&&H.path.replace(/\{[^}]+\}/g,"{}")===Y.path.replace(/\{[^}]+\}/g,"{}")))continue;let X=Object.keys(Y.pathParams??{}),J=Y.params?.filter((H)=>X.includes(H.name))??[];q1(T,{...Y,minVersion:["22.4"],...J.length?{params:Y.params?.filter((H)=>!X.includes(H.name)),beforeRequest:async(H)=>({query:{...H.query,...Object.fromEntries(J.map((W)=>[W.name,H.params[W.name]??H.id]))}})}:{}})}}function P(T,$,Y,Q,X){let J={[Q]:`${T} ID`},H={name:$,display:Y,type:"action",method:"put",path:`/${T==="story"?"stories":`${T}s`}/{${Q}}/${$}`,resultType:"text",pathParams:J};if(X?.query)H.params=X.query;if(X?.properties||X?.required)H.requestBody={required:!0,type:"object",schema:{type:"object",properties:X?.properties??{},required:X?.required??[]}};return H}function b1(){let T=[{module:"project",display:"获取项目详情",idKey:"projectID",resultGetter:"project"},{module:"build",display:"获取版本详情",idKey:"buildID",resultGetter:"build"},{module:"release",display:"获取发布详情",idKey:"releaseID",resultGetter:"release"},{module:"system",display:"获取应用详情",idKey:"systemID",resultGetter:"system"},{module:"testtask",display:"获取测试单详情",idKey:"testtaskID",resultGetter:"testtask"}];for(let $ of T){let Y={name:"get",display:$.display,type:"get",method:"get",path:`/${$.module}s/{${$.idKey}}`,resultType:"object",resultGetter:$.resultGetter,pathParams:{[$.idKey]:`${$.module}ID`}};S($.module,Y)}}function D1(){S("bug",[P("bug","confirm","确认Bug","bugID",{properties:{assignedTo:{type:"string",description:"指派给"},...CT}}),P("bug","assignto","指派Bug","bugID",{properties:hT,required:["assignedTo"]})]),S("task",[P("task","pause","暂停任务","taskID",{properties:CT}),P("task","cancel","取消任务","taskID",{properties:CT}),P("task","restart","继续任务","taskID",{properties:{realStarted:{type:"string",description:"实际开始"},consumed:{type:"number",description:"总计消耗",format:"float"},left:{type:"number",description:"预计剩余",format:"float"},comment:{type:"string",description:"备注"}},required:["realStarted"]}),P("task","assignto","指派任务","taskID",{query:[{name:"executionID",required:!0,type:"number",description:"执行ID"}],properties:{assignedTo:{type:"string",description:"指派给"},left:{type:"number",description:"预计剩余",format:"float"},comment:{type:"string",description:"备注"}},required:["assignedTo","left"]})]);let T=($,Y,Q)=>[P($,"review",`${Q}评审`,Y,{properties:{assignedTo:{type:"string",description:"指派给"},result:{type:"string",description:"评审结果"},reviewedDate:{type:"string",description:"评审时间"},comment:{type:"string",description:"备注"}},required:["result","reviewedDate","comment"]}),P($,"assignto",`${Q}指派`,Y,{properties:hT,required:["assignedTo"]})];S("story",T("story","storyID","需求")),S("epic",T("epic","epicID","业务需求")),S("requirement",T("requirement","requirementID","用户需求")),S("testcase",[P("testcase","review","评审用例","caseID",{query:[{name:"caseID",required:!0,type:"number",description:"用例ID"}],properties:{assignedTo:{type:"string",description:"指派给"},result:{type:"string",description:"评审结果"},reviewedDate:{type:"string",description:"评审时间"},comment:{type:"string",description:"备注"}},required:["result","reviewedDate"]})]),S("testtask",[P("testtask","start","开始测试单","testtaskID",{properties:{name:{type:"string",description:"测试单名称"}}}),P("testtask","close","关闭测试单","testtaskID",{properties:CT}),P("testtask","activate","激活测试单","testtaskID",{properties:{build:{type:"string",description:"测试版本"},comment:{type:"string",description:"备注"}}}),P("testtask","block","阻塞测试单","testtaskID",{properties:CT})]),S("feedback",[P("feedback","assignto","指派反馈","feedbackID",{properties:hT,required:["assignedTo"]})]),S("ticket",[P("ticket","assignto","指派工单","ticketID",{properties:hT,required:["assignedTo"]})]),S("task",{name:"recordestimate",display:"记录任务工时",type:"action",method:"put",path:"/tasks/{taskID}/recordworkhour",resultType:"text",pathParams:{taskID:"任务 ID"},requestBody:{required:!0,type:"object",schema:{type:"object",properties:{date:{type:"array",items:{type:"string"},description:"日期,格式 YYYY-MM-DD,默认今天"},work:{type:"array",items:{type:"string"},description:"工作内容"},consumed:{type:"array",items:{type:"number"},description:"本次耗时(小时,累加到总计)"},left:{type:"array",items:{type:"number"},description:"更新后的剩余工时(小时,覆盖之前值)"}},required:["date","consumed","left"]}}}),S("task",{name:"effort",display:"获取任务工时记录",type:"list",method:"get",path:"/tasks/{taskID}/recordworkhour",resultType:"list",resultGetter:($)=>{let Q=$?.efforts;return Q?Object.values(Q):[]},pathParams:{taskID:"任务 ID"},params:[{name:"taskID",required:!0,type:"number",description:"任务 ID"}]}),S("task",{name:"editeffort",display:"编辑工时记录",type:"action",method:"put",path:"/tasks/{effortID}/editeffort",resultType:"text",pathParams:{effortID:"工时记录 ID"},params:[{name:"effortID",required:!0,type:"number",description:"工时记录 ID"}],requestBody:{required:!0,type:"object",schema:{type:"object",properties:{date:{type:"string",description:"日期,格式 YYYY-MM-DD"},work:{type:"string",description:"工作内容"},consumed:{type:"number",description:"本次耗时(小时,累加到总计)",format:"float"},left:{type:"number",description:"更新后的剩余工时(小时,覆盖之前值)",format:"float"}},required:["consumed","left"]}}}),S("task",{name:"deleteeffort",display:"删除工时记录",type:"delete",method:"delete",path:"/tasks/{effortID}/deleteworkhour",resultType:"text",pathParams:{effortID:"工时记录 ID"},params:[{name:"effortID",required:!0,type:"number",description:"工时记录 ID"}]})}function C1(){for(let{module:T,objectType:$,idKey:Y,display:Q}of M1){let X={[Y]:`${Q} ID`};S(T,{name:"history",display:`获取${Q}历史记录`,type:"list",method:"get",path:`/actions/${$}/{${Y}}`,resultType:"list",resultGetter:"actions",pathParams:X}),S(T,{name:"comment",display:`添加${Q}备注`,type:"action",method:"post",path:`/actions/${$}/{${Y}}`,resultType:"text",pathParams:X,requestBody:{required:!0,type:"object",schema:{type:"object",properties:{comment:{type:"string",description:"备注内容"}},required:["comment"]}}})}}function P0(){b1(),D1(),C1(),S("file",{name:"download",display:"下载附件到本地目录",type:"action",method:"get",path:"/files/{fileID}/download",resultType:"object",resultGetter:"data",pathParams:{fileID:"附件 ID"},params:[{name:"output",type:"string",description:"本地输出目录,默认当前目录"}],request:BT})}var hT,CT,M1;var A0=D(()=>{eT();hT={assignedTo:{type:"string",description:"指派给"},comment:{type:"string",description:"备注"}},CT={comment:{type:"string",description:"备注"}};M1=[{module:"bug",objectType:"bug",idKey:"bugID",display:"Bug"},{module:"task",objectType:"task",idKey:"taskID",display:"任务"},{module:"story",objectType:"story",idKey:"storyID",display:"需求"},{module:"epic",objectType:"epic",idKey:"epicID",display:"业务需求"},{module:"requirement",objectType:"requirement",idKey:"requirementID",display:"用户需求"},{module:"testcase",objectType:"testcase",idKey:"caseID",display:"用例"},{module:"feedback",objectType:"feedback",idKey:"feedbackID",display:"反馈"},{module:"ticket",objectType:"ticket",idKey:"ticketID",display:"工单"},{module:"product",objectType:"product",idKey:"productID",display:"产品"},{module:"project",objectType:"project",idKey:"projectID",display:"项目"},{module:"execution",objectType:"execution",idKey:"executionID",display:"执行"},{module:"build",objectType:"build",idKey:"buildID",display:"版本"},{module:"release",objectType:"release",idKey:"releaseID",display:"发布"},{module:"testtask",objectType:"testtask",idKey:"testtaskID",display:"测试单"},{module:"productplan",objectType:"productplan",idKey:"productplanID",display:"计划"},{module:"program",objectType:"program",idKey:"programID",display:"项目集"}]});import{extendModuleAction as y0}from"zentao-api";var E0=D(()=>{A0();y0("my","auditPlans",(T)=>{return T.params=T.params?.map(($)=>$.name==="browseType"&&$.defaultValue==="myChecking"?{...$,defaultValue:"mychecking",description:$.description?.replace("默认 myChecking","默认 mychecking")}:$),T});y0("bug","create",(T)=>{let $=T.beforeRequest;return T.beforeRequest=async(Y)=>{let Q=await $?.(Y),X={...Y,...Q};if(X.data?.productID===void 0)return Q??{};return{...Q,query:{...X.query,productID:X.data.productID}}},T});P0()});import{getModule as k0,getModuleAction as S1,getModuleNames as v0,getObjectProps as x1}from"zentao-api";function d(T){if(!T)return;try{return k0(T)}catch{return}}function UT(){return v0()}function h0(){return v0().map((T)=>k0(T))}function f0(T){return x1(T)??{}}function C(T,$){return S1(T.name,$)}function ST(T){return T.actions.filter(($)=>!["list","get","create","update","delete"].includes($.name)).map(($)=>$.name)}function XT(T){return`${T.display??T.name}(最低版本:${T.minVersion.join(" / ")})`}var LT=D(()=>{E0()});function fT(T,$,Y){let Q={...T},X=Y?[...Y]:[];if(X.length>0&&X[0]===$)X.shift();let J;if(X.length>0&&!X[0].startsWith("-")){let H=X[0].trim(),W=H.split(",").map((U)=>U.trim()).filter(Boolean);if(W.length>0&&W.every((U)=>/^\d+$/.test(U)))J=H,X.shift();else if(Q.data===void 0&&H.startsWith("{")&&H.endsWith("}"))Q.data=H,X.shift()}if(T.params)try{Object.assign(Q,JSON.parse(T.params))}catch{throw new R("E2009",{option:"params",reason:"不是有效的 JSON 对象"})}for(let H of X){let W=H.indexOf("="),B=H.slice(2,W);if(!H.startsWith("--")||W<3||!/^\w/.test(B)||/[^\w.-]/.test(B))throw new R("E2009",{option:W<0?H:H.slice(0,W),reason:"请使用 --字段名=值 传参"});let U=H.slice(W+1);if(U==="true")U=!0;else if(U==="false")U=!1;else if(U!==""&&!/\D/.test(U))U=Number(U);Q[B]=U}if(J!==void 0)Q.id=J;return Q}var gT=D(()=>{z()});import j1 from"turndown";function N1(){if(!T0)T0=new j1({headingStyle:"atx",codeBlockStyle:"fenced"});return T0}function g0(T){return P1.test(T)}function A1(T){if(!T||!g0(T))return T;return N1().turndown(T).trim()}function $0(T){let $={...T};for(let Y of Object.keys($)){let Q=$[Y];if(typeof Q==="string"&&g0(Q))$[Y]=A1(Q)}return $}function u0(T){return T.map($0)}var T0=null,P1;var c0=D(()=>{P1=/<[a-z][\s\S]*>/i});async function y1(){if(uT)return uT;if(process.stdin.isTTY||process.stdin.listenerCount("data")>0)return;return uT=(async()=>{let T=[];for await(let Y of process.stdin)T.push(Buffer.from(Y));return Buffer.concat(T).toString("utf-8").trim()||void 0})(),uT}function d0(T){try{return JSON.parse(T)}catch{throw new R("E2007")}}async function l0(T){if(T==="@-"||T===void 0){let $=await y1();if($)return d0($);if(T==="@-")throw new R("E2007");return}return d0(T)}var uT;var p0=D(()=>{z()});import{request as m0}from"zentao-api";function i0(T){let $=T?.split(",").map((Y)=>Y.trim()).filter(Boolean);return $&&$.length>0?$:void 0}async function xT(T,$,Y,Q,X,J,H){let W=C($,Y);if(!W)throw new R("E2005",{module:$.name});if(X.all)throw new R("E2009",{option:"all",reason:"尚未支持自动翻页,请使用 --page 和 --recPerPage 逐页获取"});let B=H?{...H}:fT(X,Y,Q);if($.name==="relation"&&W.name==="unlink"){let G=["objectType","objectID","relatedObjectType","relatedObjectID","relationName"].filter((K)=>Object.hasOwn(B,K));if(G.length)throw new R("E2009",{option:G.join(", "),reason:"解除关联已改用关系记录 relationID,请从 relation list 的返回结果获取,不能用对象 ID 或 relationKey 代替"})}if($.name==="bug"&&W.name==="create"&&B.product!==void 0){if(B.productID!==void 0&&Number(B.product)!==Number(B.productID))throw new R("E2009",{option:"product/productID",reason:"--product 与 --productID 必须指定同一个产品"});if(B.productID===void 0)B.productID=B.product}if(W.type==="create"||W.type==="update"||W.type==="action"){let G=B.data;if(G===void 0||typeof G==="string"){let K=await l0(G);if(K!==void 0)B.data=K}}let U=`${$.name}/${W.name}`,V=i0(X.pick),L=(X.format??J.defaultOutputFormat??"markdown")==="raw",F=!L,I=F&&W.type==="list",w=F&&W.type==="get",_={client:T,autoFill:W.type==="update",throwOnFail:!0,recPerPage:X.recPerPage??String(J.pagers?.[$.name]??J.defaultRecPerPage),timeout:X.timeout,insecure:X.insecure,convert:I&&J.htmlToMarkdown!==!1?u0:void 0,convertSingle:w&&J.htmlToMarkdown!==!1?$0:void 0,filter:I?X.filter:void 0,search:I?X.search:void 0,searchFields:I?i0(X.searchFields):void 0,sort:I?X.sort:void 0,limit:I?X.limit:void 0,pick:I||w?V:void 0},Z;try{if(L){let G=await m0(U,B,{..._,raw:!0});if(G&&typeof G==="object"&&"status"in G&&G.status==="fail"){let K="message"in G?G.message:void 0;throw new R("E2008",{url:"",status:"",serverResponse:typeof K==="string"?K:JSON.stringify(K??G)},G)}return{action:W,data:G,rawResponse:G,fields:V,isList:W.type==="list"}}Z=await m0(U,B,{..._,raw:!1})}catch(G){throw TT(G)}let O=Z.pager?{pageID:Z.pager.page,recPerPage:Z.pager.recPerPage,recTotal:Z.pager.total}:void 0;if(W.type==="list"){let G=Array.isArray(Z.data)?Z.data:[];return{action:W,data:G,rawResponse:Z,pager:O,fields:V,isList:!0}}if(W.type==="get"){let G=Z.data??{};return{action:W,data:G,rawResponse:Z,fields:V,isList:!1}}return{action:W,data:Z.data,rawResponse:Z,fields:V,isList:!1}}var cT=D(()=>{z();c0();p0();gT();LT();z()});var JT,Y0;var dT=D(()=>{JT={defaultOutputFormat:"markdown",defaultRecPerPage:20,insecure:!1,timeout:1e4,htmlToMarkdown:!0,batchFailFast:!1,pagers:{},silent:!1,jsonPretty:!1},Y0=Object.keys(JT)});import E1 from"configstore";import{chmodSync as k1,existsSync as v1}from"node:fs";import{isAbsolute as n0,join as Q0,resolve as h1}from"node:path";import{homedir as X0}from"node:os";import{z as q}from"zod";function s0(){let T=process.env.XDG_CONFIG_HOME;return Q0(T&&n0(T)?T:Q0(X0(),".config"),"zentao","zentao.json")}function t0(){if(!lT)lT=new E1("zentao-cli",void 0,{configPath:f,clearInvalidConfig:!1});return lT}function u1(){try{if(v1(f))k1(f,384)}catch{}}function J0(T){try{t0().set(T),u1()}catch($){let Y=$?.code;throw new R("E1011",{path:f},{operation:"write",reason:"write_failed",path:f,...Y?{systemCode:Y}:{}})}}function c1(T){if(T==="~")return X0();if(T.startsWith("~/")||T.startsWith("~\\"))return Q0(X0(),T.slice(2));return T}function a0(T){if(typeof T!=="string"||T.trim()==="")throw Error("setConfigPath: path must be a non-empty string");let $=c1(T),Y=n0($)?$:h1($);if(lT&&Y!==f)throw Error("setConfigPath: cannot change config path after store has been initialized");f=Y}function r0(){return s0()}function VT(){let T;try{T=t0().all}catch($){let Y=$?.code;throw new R("E1005",{path:f},{operation:"read",reason:$ instanceof SyntaxError?"invalid_json":"unreadable",path:f,...Y?{systemCode:Y}:{}})}if(!g1.safeParse(T).success)throw new R("E1005",{path:f},{operation:"read",reason:"invalid_structure",path:f});return T}function j(T,$){return`${T}@${$}`}function g(T){return T.replace(/\/+$/,"")}function u(){let T=VT();if(!T.currentProfile||!T.profiles?.length)return;return T.profiles.find(($)=>j($.account,$.server)===T.currentProfile)}function RT(T,$){let Y=VT(),Q=g($);return Y.profiles?.find((X)=>X.account===T&&g(X.server)===Q)}function H0(T){return VT().profiles?.find((Y)=>j(Y.account,Y.server)===T||Y.account===T||`${Y.account}@${new URL(Y.server).hostname}`===T)}function jT(T){let $=VT().profiles??[],Y=T.server===g(T.server)?T:{...T,server:g(T.server)},Q=[],X=!1;for(let J of $)if(!(J.account===Y.account&&g(J.server)===Y.server))Q.push(J);else if(!X)Q.push(Y),X=!0;if(!X)Q.push(Y);J0({profiles:Q,currentProfile:j(Y.account,Y.server)})}function o0(T){let $=VT(),Y=$.profiles??[],Q=Y.findIndex((X)=>j(X.account,X.server)===T);if(Q<0)return!1;if(Y.splice(Q,1),$.currentProfile===T)$.currentProfile=Y.length>0?j(Y[0].account,Y[0].server):void 0;return J0({profiles:Y,currentProfile:$.currentProfile}),!0}function e0(T){let $=H0(T);if(!$)return!1;return J0({currentProfile:j($.account,$.server)}),!0}function pT(){return VT().profiles??[]}function t(T){return{...JT,...T.config}}function T9(T,$,Y){if(!T.config)T.config={};T.config[$]=Y,jT(T)}function $9(){return f}function $T(T,$,Y,Q,X,J){let H=new Date().toISOString();return{...J,server:g(T),account:$,token:Y,user:J?{...J.user,...X}:X,loginTime:H,lastUsedTime:H,serverConfig:Q??J?.serverConfig}}var f1,g1,f,lT=null;var c=D(()=>{z();dT();f1=q.object({defaultOutputFormat:q.enum(["markdown","json","raw"]),defaultRecPerPage:q.number().int().positive().max(1000),insecure:q.boolean(),timeout:q.number().int().positive(),htmlToMarkdown:q.boolean(),batchFailFast:q.boolean(),pagers:q.record(q.string(),q.number().int().positive().max(1000)),silent:q.boolean(),jsonPretty:q.boolean()}).partial().passthrough(),g1=q.object({currentProfile:q.string().optional(),profiles:q.array(q.object({server:q.string().url(),account:q.string(),token:q.string(),loginTime:q.string().optional(),lastUsedTime:q.string().optional(),user:q.record(q.string(),q.unknown()).optional(),config:f1.optional(),serverConfig:q.object({version:q.string()}).passthrough().optional()}).passthrough()).optional()}).passthrough();f=s0()});import{ZentaoClient as L9}from"zentao-api";function a(T,$,Y){return new L9({baseUrl:T,token:$,insecure:Y?.insecure,timeout:Y?.timeout})}function U0(T,$){if(!$)return T;let Y=new L9(T.siteUrl),Q=(X)=>{if($.aborted)throw new R("E5003");return{...X,signal:$}};return Y.request=(X,J={})=>T.request(X,Q(J)),Y.fetch=(X,J,H,W)=>T.fetch(X,Q(J),H,W),Y.getZentaoConfig=(X={})=>T.getZentaoConfig(Q(X)),Y}async function L0(T){try{return await T.getZentaoConfig()}catch($){throw TT($)}}var GT=D(()=>{z()});async function FT(T,$,Y,Q){let X=a(T,void 0,Q),J=X.fetch;if(Q?.signal)X.fetch=(H,W,B,U)=>J.call(X,H,{...W,signal:Q.signal},B,U);try{let H;try{H=await X.login($,Y)}catch(U){throw TT(U)}let W,B=await L0(X);try{({user:W}=await V0(X,$))}catch{}if(Q?.signal?.aborted)throw new R("E5003");return{client:X,token:H,user:W,serverConfig:B}}finally{X.fetch=J}}async function V0(T,$){try{let Y=await L0(T),X=(await T.get("/users",{query:{browseType:"inside",recPerPage:100}})).users;if(!X?.length)throw new R("E1004");let J=X.find((H)=>H.account===$);return{serverConfig:Y,user:J}}catch(Y){throw TT(Y)}}function KT(){return{url:process.env.ZENTAO_URL,account:process.env.ZENTAO_ACCOUNT,password:process.env.ZENTAO_PASSWORD,token:process.env.ZENTAO_TOKEN}}var ET=D(()=>{GT();z()});import{existsSync as J5,readFileSync as H5}from"node:fs";import{dirname as W5,join as R0}from"node:path";import{fileURLToPath as B5}from"node:url";function r(){return"0.3.1"}var IT=()=>{};function G0(T){let $=KT();if(!T&&$.url&&$.account&&($.token||$.password))return{source:"environment",server:g($.url),account:$.account,token:$.token,password:$.password};let Y=T??u();if(Y?.token)return{source:"profile",server:Y.server,account:Y.account,token:Y.token,profile:Y};throw new R("E1006")}async function o(T){let $=G0(T?.profile);if($.source==="environment"){let{server:X,account:J,token:H,password:W}=$;if(H)return{client:a(X,H,T),profile:$T(X,J,H)};let B=await FT(X,J,W,T);return{client:B.client,profile:$T(X,J,B.token,B.serverConfig,B.user)}}let Y=t($.profile),Q={insecure:T?.insecure??Y.insecure,timeout:T?.timeout??Y.timeout};return{client:a($.server,$.token,Q),profile:$.profile}}var ZT=D(()=>{GT();z();c();ET()});import{getModuleActionParams as l9}from"zentao-api";function D0(T,$,Y){let Q=l9(T.name,$.name);if(Q.some((X)=>X.role==="path"&&X.name==="scope"&&X.options?.some((J)=>J.value===`${Y}s`)))return"scopeID";return[`${Y}ID`,Y].find((X)=>Q.some((J)=>J.name===X&&(J.type==="number"||J.role==="path"&&!J.type&&X.endsWith("ID"))))}function p9(T,$,Y){let Q={...Y.params},X=Object.keys($.pathParams??{}),J=X.includes("scope"),H=(U,V)=>{throw new R("E2009",{option:U,reason:V})},W=(U,V)=>{if(V===void 0)return;if(Q[U]!==void 0&&String(Q[U])!==String(V))H(U,"简写与 params 中的参数值冲突");Q[U]=V};for(let U of["product","project","execution"]){let V=Y[U],L=`${U}ID`;if(J){let F=[V,Q[U],Q[L]].filter((I)=>I!==void 0);if(F.length){W("scope",`${U}s`);for(let I of F)W("scopeID",I);delete Q[U],delete Q[L]}}else if(V!==void 0){let F=D0(T,$,U);if(!F)H(U,`操作 ${T.name}/${$.name} 不支持此数字简写,请按字段类型使用 params`);W(F,V)}}let B=X.find((U)=>U.endsWith("ID")&&U!=="scopeID");if(Y.id!==void 0||Q.id!==void 0){if(!B)H("id",`操作 ${T.name}/${$.name} 没有可简写的路径 ID`);W(B,Y.id),W(B,Q.id),delete Q.id}if(W("pageID",Y.page),W("recPerPage",Y.recPerPage),["create","update","action"].includes($.type)){if(Q.data!==void 0&&(!Q.data||typeof Q.data!=="object"||Array.isArray(Q.data)))H("params.data","MCP 请求体必须是 JSON 对象,请勿使用 CLI 字符串或管道语法");Q.data??={}}return W2(T,$,Q),Q}function m9(T,$,Y){let Q=(J)=>{throw new R("E2009",{option:T,reason:J})},{type:X}=Y;if(X==="number"||X==="integer"){if(typeof $!=="number"||!Number.isFinite($))Q("必须为有限数字");if(X==="integer"&&!Number.isSafeInteger($))Q("必须为安全整数")}else if(X==="array"?!Array.isArray($):X==="object"?!$||typeof $!=="object"||Array.isArray($):X&&typeof $!==X)Q(`必须为 ${X} 类型`);if(typeof $==="number"){if(Y.minimum!==void 0&&$<Y.minimum)Q(`不能小于 ${Y.minimum}`);if(Y.maximum!==void 0&&$>Y.maximum)Q(`不能大于 ${Y.maximum}`)}if(typeof $==="string"){let J=[...$].length;if(Y.minLength!==void 0&&J<Y.minLength)Q(`长度不能少于 ${Y.minLength}`);if(Y.maxLength!==void 0&&J>Y.maxLength)Q(`长度不能超过 ${Y.maxLength}`);if(Y.pattern&&!new RegExp(Y.pattern).test($))Q(`格式必须符合 ${Y.pattern}`)}if(Array.isArray($)){if(Y.minItems!==void 0&&$.length<Y.minItems)Q(`至少需要 ${Y.minItems} 个元素`);if(Y.maxItems!==void 0&&$.length>Y.maxItems)Q(`最多允许 ${Y.maxItems} 个元素`);if(Y.items)$.forEach((J,H)=>m9(`${T}[${H}]`,J,Y.items))}if(Y.options?.length){if((Array.isArray($)?$:[$]).some((H)=>!Y.options.some((W)=>W.value===H)))Q(`可选值:${Y.options.map((H)=>H.value).join(", ")}`)}}function W2(T,$,Y){let Q=l9(T.name,$.name),X=Y.data??{},J=["create","update","action"].includes($.type),H=(U,V)=>{throw new R("E2009",{option:U,reason:V})};for(let U of Object.keys(Y)){if(U==="data"&&J)continue;if(!Q.some((V)=>V.name===U))H(U,`操作 ${T.name}/${$.name} 不支持此参数`)}for(let U of Object.keys(X)){if(!Q.some((V)=>V.name===U&&V.role==="body"))H(`data.${U}`,"不是此操作的请求体字段");if(Y[U]!==void 0&&JSON.stringify(Y[U])!==JSON.stringify(X[U]))H(U,"params 与 params.data 中的参数值冲突")}let W=$.type==="update"&&T.actions.some((U)=>U.type==="get"&&U.path===$.path),B=$.requestBody?.schema.properties;for(let U of Q){let L=U.role==="body"&&Object.hasOwn(X,U.name)?X[U.name]:Y[U.name];if(L===void 0){if(U.required&&U.defaultValue===void 0&&!(U.role==="body"&&W))throw new R("E2003",{fields:U.name,module:T.name});continue}let F=U.role==="path"&&U.name.endsWith("ID");if(m9(U.name,L,{...U,type:U.type??(F?"number":void 0),...U.role==="body"?B?.[U.name]:{}}),typeof L==="number"){if((F||U.name.endsWith("ID")||["pageID","recPerPage"].includes(U.name))&&(!Number.isSafeInteger(L)||L<0))H(U.name,"必须为非负安全整数");if((U.name==="pageID"||U.name==="recPerPage")&&L<1)H(U.name,"必须为大于 0 的整数");if(U.name==="recPerPage"&&L>1000)H(U.name,"不能超过 1000")}}}var i9=D(()=>{z()});import{z as A}from"zod";function QT(T,$){let Y={data:T??null,...$};return{structuredContent:Y,content:[{type:"text",text:JSON.stringify($?Y:T??null,null,2)}]}}function vT(T,$){T=TT(T);let Y=T instanceof R?`E${T.code}`:"E_INTERNAL",Q=T instanceof Error?T.message:String(T);return{isError:!0,structuredContent:{data:null,error:{code:Y,message:Q,...$}},content:[{type:"text",text:`${Y}: ${Q}`}]}}var zT,n9;var s9=D(()=>{z();zT=A.object({data:A.unknown(),error:A.object({code:A.string(),message:A.string(),module:A.string().optional(),action:A.string().optional()}).optional()}),n9=zT.extend({pager:A.object({pageID:A.number(),recPerPage:A.number(),recTotal:A.number()}).optional(),meta:A.object({processingScope:A.literal("page"),returnedCount:A.number().int().nonnegative(),totalScope:A.literal("serverBeforeLocalProcessing").optional()}).optional()})});import{z as b}from"zod";import{getModuleActionParams as M0,request as B2}from"zentao-api";function qT(T){return(T.type==="list"||T.type==="get")&&(T.method??"get").toLowerCase()==="get"}function r9(T,$){return(!$.readOnly||qT(T))&&($.allowLocalFiles!==!1||T.requestBody?.mediaType!=="multipart/form-data"&&T.request!==BT)}function U2(T){return`${T.display??T.name}操作;参数、示例和最低版本见 zentao_action_help`}function L2(T){let $=T.actions.map((Y)=>Y.name);return[$[0],...$.slice(1)]}function V2(T){let $=L2(T),Y=T.actions.flatMap((J)=>M0(T.name,J.name)),Q=new Set(Y.map((J)=>J.name)),X={action:b.enum($).describe(T.actions.map((J)=>`${J.name}: ${J.display??J.name}`).join("; ")),params:b.record(b.string(),b.unknown()).optional().describe("路径、查询或请求体参数;必填项见 zentao_action_help")};if(Y.some((J)=>J.role==="path"&&J.name.endsWith("ID")&&J.name!=="scopeID"))X.id=b.number().int().nonnegative().optional().describe("首个路径 ID 简写;多 ID 用 params");for(let J of["product","project","execution"])if(T.actions.some((H)=>D0(T,H,J)))X[J]=b.number().int().nonnegative().optional().describe(`${J}ID 或 scope/scopeID 简写,冲突时报错`);if(T.actions.some((J)=>J.type==="list"||J.type==="get"))X.pick=b.string().optional().describe("返回字段,逗号分隔");if(T.actions.some((J)=>J.type==="list"))X.filter=b.array(b.string()).optional().describe("当前页过滤,组内逗号为 AND、多组为 OR;远端筛选见 params.filters"),X.sort=b.string().optional().describe("当前页排序,如 pri:asc"),X.search=b.array(b.string()).optional().describe("当前页搜索,组内逗号为 AND、多组为 OR"),X.searchFields=b.string().optional().describe("搜索字段,逗号分隔");if(Q.has("pageID"))X.page=b.number().int().positive().optional().describe("页码,从 1 开始");if(Q.has("recPerPage"))X.recPerPage=b.number().int().min(1).max(1000).optional().describe("每页 1–1000 条");return b.object(X).strict()}function R2(T,$,Y){let Q=$.requestBody?.schema.example,X=Object.fromEntries(M0(T.name,$.name).filter((J)=>J.required&&J.defaultValue===void 0).map((J)=>[J.name,(J.role==="body"?Q?.[J.name]:void 0)??(J.type==="array"?[]:J.options?.[0]?.value??(J.type==="number"||J.role==="path"&&J.name.endsWith("ID")?1:J.type==="boolean"?!1:J.type==="object"?{}:`<${J.name}>`))]));return{name:`zentao_${T.name}${Y?qT($)?"_read":"_write":""}`,arguments:{action:$.name,...Object.keys(X).length?{params:X}:{}},note:"ID、文本等均为格式示例,请替换为实际值后调用。"}}async function G2(T,$){let{client:Y,identity:Q}=await T.getContext();if(Q.account===void 0)return QT({server:Q.server,account:null,user:null,userFound:!1,note:"无法仅凭禅道 Token 确定账号,未查询用户详情。"});let X=U0(Y,$),J,H;for(let B=1;;B++){let U=await B2("user/list",{browseType:"inside",orderBy:"id_asc",recPerPage:100,pageID:B,filters:[{field:"account",operator:"=",value:Q.account}]},{client:X,throwOnFail:!0}),V=Array.isArray(U.data)?U.data:[];if(J=V.find((F)=>F.account===Q.account),J||!V.length)break;let L=JSON.stringify(V.map((F)=>[F.id,F.account]));if(L===H||U.pager&&U.pager.page!==B)throw new R("E2008",{url:Q.server,status:"",serverResponse:"用户列表分页未向前推进,无法确认当前用户详情"});if(H=L,U.pager?B*U.pager.recPerPage>=U.pager.total:V.length<100)break}let W={account:Q.account,server:Q.server,userFound:Boolean(J),user:J?Object.fromEntries(["id","account","realname","dept","role"].filter((B)=>J[B]!==void 0).map((B)=>[B,J[B]])):null};return QT(W)}async function F2(T,$){let{identity:Y}=await $.switchProfile(T.profileKey),Q=`${Y.account}@${Y.server}`;return QT({status:"success",currentProfile:Q})}async function K2(T,$,Y,Q,X){let J=C(T,$.action);if(!J)throw new R("E2005",{module:T.name});if(!r9(J,Q))throw new R("E2009",{option:`${T.name}/${J.name}`,reason:J.request===BT?t9:a9});for(let F of["filter","sort","search","searchFields","pick"])if($[F]!==void 0&&J.type!=="list"&&!(F==="pick"&&J.type==="get"))throw new R("E2009",{option:F,reason:`不适用于 ${T.name}/${J.name}`});let H=p9(T,J,$),{client:W,config:B}=await Y.getContext(),U=$.action,V={pick:$.pick,filter:$.filter,sort:$.sort,search:$.search,searchFields:$.searchFields,recPerPage:$.recPerPage!=null?String($.recPerPage):void 0,format:"json"},L=await xT(U0(W,X),T,U,[],V,B,H);if(L.action.type==="list")return QT(L.data,{...L.pager?{pager:L.pager}:{},meta:{processingScope:"page",returnedCount:Array.isArray(L.data)?L.data.length:0,...L.pager?{totalScope:"serverBeforeLocalProcessing"}:{}}});if(L.action.type==="get")return QT(L.data);return QT(L.data??L.rawResponse)}function I2(T){let $=T.every(qT),Y=T.some((Q)=>["update","delete","action"].includes(Q.type));return{readOnlyHint:$,destructiveHint:Y,openWorldHint:!0}}function o9(T,$,Y={}){let Q=Y.modules?[...new Set(Y.modules)].map((X)=>{let J=d(X);if(!J)throw new R("E2001",{module:X});return J}):h0();if(!Q.length)throw new R("E2009",{option:"modules",reason:"至少指定一个模块"});if(T.registerTool("zentao_action_help",{description:"查看禅道操作的路径、参数定义和最低版本要求,无需登录;调用业务工具前可按需查询",inputSchema:b.object({module:b.string().describe("模块名,如 doc、story"),action:b.string().describe("操作名,如 createMyDoc、getGrades")}).strict(),outputSchema:zT,annotations:{readOnlyHint:!0,destructiveHint:!1,openWorldHint:!1}},async({module:X,action:J})=>{try{let H=d(X);if(!H)throw new R("E2001",{module:X});let W=C(H,J);if(!W)throw new R("E2005",{module:H.name});return QT({module:H.name,action:W.name,display:W.display,type:W.type,path:W.path,minVersion:W.minVersion,parameters:M0(H.name,W.name),available:Q.some((B)=>B.name===H.name)&&r9(W,Y),...Y.allowLocalFiles===!1&&W.requestBody?.mediaType==="multipart/form-data"?{unavailableReason:a9}:Y.allowLocalFiles===!1&&W.request===BT?{unavailableReason:t9}:{},example:R2(H,W,Y.splitTools)})}catch(H){return vT(H,{module:X,action:J})}}),T.registerTool("zentao_profile",{description:"获取当前 MCP 绑定的账号和站点;已知账号时查询远端用户详情,仅 Token 认证时账号未知。userFound=false 表示无用户详情,服务端失败会报错",inputSchema:b.object({}).strict(),outputSchema:zT,annotations:{readOnlyHint:!0,destructiveHint:!1,openWorldHint:!0}},async(X,J)=>{try{return await G2($,J.signal)}catch(H){return vT(H,{module:"user",action:"list"})}}),$.switchProfile&&!Y.readOnly)T.registerTool("zentao_switch_profile",{description:"切换当前 MCP 实例的登录账号,不改变 CLI 或其他 MCP 实例的账号",inputSchema:b.object({profileKey:b.string().describe("目标用户配置标识,支持 account@server、account 或 account@hostname")}).strict(),outputSchema:zT,annotations:{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0}},async(X)=>{try{return await F2(X,$)}catch(J){return vT(J)}});for(let X of new Set(Q)){let J=Y.readOnly?X.actions.filter(qT):X.actions,H=Y.splitTools?[{suffix:"_read",actions:J.filter(qT)},{suffix:"_write",actions:J.filter((W)=>!qT(W))}]:[{suffix:"",actions:J}];for(let W of H){if(!W.actions.length)continue;let B={...X,actions:W.actions},U=`zentao_${B.name}${W.suffix}`,V=U2(B),L=V2(B),F=I2(B.actions);T.registerTool(U,{description:V,inputSchema:L,outputSchema:B.actions.some((I)=>I.type==="list")?n9:zT,annotations:F},async(I,w)=>{let _=I;try{if(!W.actions.some((Z)=>Z.name===_.action))throw new R("E2006");return await K2(X,_,$,Y,w.signal)}catch(Z){return vT(Z,{module:B.name,action:_.action})}})}}}var t9="HTTP MCP 不支持下载附件到服务端本地目录,请使用本地 CLI 或 stdio MCP",a9="HTTP MCP 不支持通过本地路径上传服务端文件,请使用本地 CLI 或 stdio MCP";var e9=D(()=>{eT();LT();cT();z();GT();i9();s9()});import{McpServer as Z2}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as _2}from"@modelcontextprotocol/sdk/server/stdio.js";function aT({client:T,profile:$}){return{client:T,config:t($),identity:{server:$.server,account:$.account}}}function w2(T){let $,Y=KT(),Q=Boolean(Y.url&&Y.account&&(Y.token||Y.password));return{async getContext(){if(!$){let L=o(T);$=L,L.catch(()=>{if($===L)$=void 0})}let X=$,J=Q,H=await X;if(J)return aT(H);let W=RT(H.profile.account,H.profile.server);if(!W?.token)throw new R("E1006");let B=t(W),U=t(H.profile);if(W.token===H.profile.token&&(T?.timeout??B.timeout)===(T?.timeout??U.timeout)&&(T?.insecure??B.insecure)===(T?.insecure??U.insecure))return aT({client:H.client,profile:W});let V=o({...T,profile:W});if($===X)$=V;return aT(await V)},async switchProfile(X){let J=H0(X);if(!J)throw new R("E1007");let H=await o({...T,profile:J});return $=Promise.resolve(H),Q=!1,aT(H)}}}function OT(T,$){let Y=new Z2({name:"zentao-cli",version:r()},{capabilities:{tools:{}}});return o9(Y,T,$),Y}async function C0(T){let $=OT(w2(T),T),Y=new _2;await $.connect(Y)}var S0=D(()=>{ZT();c();ET();z();e9();IT()});var Y1={};I1(Y1,{startMcpHttpServer:()=>D2});import{createServer as z2}from"node:http";import{StreamableHTTPServerTransport as q2}from"@modelcontextprotocol/sdk/server/streamableHttp.js";import{WebStandardStreamableHTTPServerTransport as O2}from"@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";function $1(T){let $=[];for(let J=0;J<T.length;J+=2){let H=T[J].toLowerCase();if(H==="token"||H==="authorization")$.push([H,T[J+1]])}if($.length!==1)return;let[Y,Q]=$[0];return(Y==="token"?/^([A-Za-z0-9\-._~+/]+=*)$/:/^Bearer ([A-Za-z0-9\-._~+/]+=*)$/i).exec(Q)?.[1]}function HT(T,$,Y){if(T.destroyed||T.writableEnded)return;if(T.headersSent){T.destroy();return}T.writeHead($,{"Content-Type":"application/json; charset=utf-8",...T.req.method==="POST"?{Connection:"close"}:{}}),T.end(JSON.stringify({error:Y}))}function b2(T){return new Promise(($)=>{let Y=[],Q=0,X=!1,J=(V)=>{if(X)return;X=!0,clearTimeout(U),T.off("data",H),T.off("end",W),T.off("error",B),T.off("aborted",B),$(V)},H=(V)=>{if(Q+=V.length,Q>x0)J({status:413}),T.resume();else Y.push(V)},W=()=>{try{J({body:JSON.parse(Buffer.concat(Y).toString("utf8"))})}catch{J({status:400})}},B=()=>J({status:400}),U=setTimeout(()=>{J({status:408}),T.resume()},rT);U.unref(),T.on("data",H),T.once("end",W),T.once("error",B),T.once("aborted",B)})}async function D2(T){if(T={...T,allowLocalFiles:!1},!process.versions.bun){let[V,L,F]=process.versions.node.split(".").map(Number);if(V<18||V===18&&(L<14||L===14&&F<1))throw new R("E5004",{reason:"HTTP 模式需要 Node.js 18.14.1 或更新版本"})}for(let[V,L]of[["timeout",T.timeout],["port",T.port]])if(L!==void 0&&(!Number.isInteger(L)||L<(V==="port"?0:1)||L>(V==="port"?65535:2147483647)))throw new R("E2009",{option:V,reason:V==="port"?"必须为 0–65535 的整数":"必须为 1–2147483647 的整数毫秒数"});if(T.host!==void 0&&!T.host.trim())throw new R("E2009",{option:"host",reason:"监听地址不能为空"});let $;try{if($=new URL(T.url),!["http:","https:"].includes($.protocol)||$.username||$.password||$.search||$.hash)throw Error()}catch{throw new R("E2009",{option:"url",reason:"请提供不含凭证、查询参数或片段的 HTTP(S) 禅道站点地址"})}let Y=a($.toString()).siteUrl,Q={...JT,pagers:{},timeout:T.timeout??JT.timeout,insecure:T.insecure??JT.insecure},X=(V)=>({async getContext(){return{client:a(Y,V,Q),config:Q,identity:{server:Y}}}});if(await OT(X(),T).close(),process.versions.bun)return M2(T,Q.timeout,X);let J=new Set,H=new Set,W=z2({requestTimeout:rT},(V,L)=>{let F=Date.now(),I=V.url?.split("?")[0],w=I==="/mcp"||I==="/healthz"?I:"/unknown",_=["POST","GET","DELETE","PUT","PATCH","HEAD","OPTIONS"].includes(V.method??"")?V.method:"OTHER",Z,O,G=!1,K=()=>{if(G)return;G=!0,clearTimeout(O),J.delete(x),V.socket.off("close",K),Z?.close().catch(()=>{}),process.stderr.write(`[mcp-http] ${_} ${w} ${L.writableFinished?L.statusCode:499} ${Date.now()-F}ms
2
+ `)},x=()=>{K(),V.destroy(),L.destroy()};J.add(x),L.once("finish",K),L.once("close",K),L.once("error",K),V.once("aborted",K),V.once("error",K),V.socket.once("close",K),(async()=>{if(V.rawHeaders.some((e,n)=>n%2===0&&e.toLowerCase()==="origin")){HT(L,403,"不支持浏览器 Origin 请求");return}if(I==="/healthz"&&V.method==="GET"){L.writeHead(200,{"Content-Type":"application/json"}),L.end('{"status":"ok"}');return}if(I!=="/mcp"){HT(L,404,"未找到接口");return}if(V.method!=="POST"){L.setHeader("Allow","POST"),HT(L,405,"仅支持 POST");return}let h=$1(V.rawHeaders);if(!h||V.url?.includes("?")){HT(L,401,"请通过单个 token 或 Authorization: Bearer 请求头提供禅道 Token");return}let{body:M,status:N}=await b2(V);if(G)return;if(N){HT(L,N,N===413?"请求体超过 1 MiB":N===408?"接收请求超时":"JSON 请求体无效");return}O=setTimeout(()=>{HT(L,504,"工具调用超时"),K()},Math.max(60000,Q.timeout)),O.unref(),Z=OT(X(h),T);let i=new q2({sessionIdGenerator:void 0});if(await Z.connect(i),G){await Z.close();return}await i.handleRequest(V,L,M)})().catch(()=>{HT(L,500,"MCP 请求处理失败"),K()})});W.on("connection",(V)=>{H.add(V),V.once("close",()=>H.delete(V))}),W.on("clientError",(V,L)=>L.destroy()),await new Promise((V,L)=>{W.once("error",L),W.listen(T.port??9090,T.host??"127.0.0.1",()=>{W.off("error",L),V()})}).catch((V)=>{throw new R("E5004",{reason:typeof V?.code==="string"?V.code:"监听失败"})});let B,U=W.address();return{url:new URL(`http://${U.family==="IPv6"?`[${U.address}]`:U.address}:${U.port}/mcp`),close(){return B??=new Promise((V)=>{let L=setTimeout(()=>{for(let F of J)F();for(let F of H)F.destroy()},T1);L.unref(),W.close(()=>{clearTimeout(L),V()}),W.closeIdleConnections?.()})}}}async function M2(T,$,Y){let Q=new Set,X,J=!1;try{X=Bun.serve({hostname:T.host??"127.0.0.1",port:T.port??9090,idleTimeout:rT/1000,maxRequestBodySize:x0,async fetch(W){if(J)return Response.json({error:"MCP 服务正在关闭"},{status:503,headers:{Connection:"close"}});let B=Date.now(),U=new URL(W.url),V=["/mcp","/healthz"].includes(U.pathname)?U.pathname:"/unknown",L=["POST","GET","DELETE","PUT","PATCH","HEAD","OPTIONS"].includes(W.method)?W.method:"OTHER",F,I,w,_=!1,Z=499,O=()=>{if(_)return;_=!0,clearTimeout(I),Q.delete(G),W.signal.removeEventListener("abort",G),F?.close().catch(()=>{}),w?.cancel().catch(()=>{}),process.stderr.write(`[mcp-http] ${L} ${V} ${Z} ${Date.now()-B}ms
3
+ `)},G=()=>{Z=499,O()};Q.add(G),W.signal.addEventListener("abort",G,{once:!0});let K=(x,h,M)=>{return Z=x,O(),Response.json({error:h},{status:x,headers:{...W.method==="POST"?{Connection:"close"}:{},...M}})};try{if(W.headers.has("origin"))return K(403,"不支持浏览器 Origin 请求");if(V==="/healthz"&&L==="GET")return Z=200,O(),Response.json({status:"ok"});if(V!=="/mcp")return K(404,"未找到接口");if(L!=="POST")return K(405,"仅支持 POST",{Allow:"POST"});let x=$1(Array.from(W.headers).flat());if(!x||W.url.includes("?"))return K(401,"请通过单个 token 或 Authorization: Bearer 请求头提供禅道 Token");w=W.body?.getReader();let h=[],M=0,N=!1;if(I=setTimeout(()=>{N=!0,w?.cancel().catch(()=>{})},rT),I.unref(),w)while(!0){let s=await w.read();if(s.done)break;if(M+=s.value.byteLength,M>x0)return K(413,"请求体超过 1 MiB");h.push(s.value)}if(clearTimeout(I),N)return K(408,"接收请求超时");if(_||W.signal.aborted)return K(400,"请求已取消");let i;try{i=JSON.parse(Buffer.concat(h).toString("utf8"))}catch{return K(400,"JSON 请求体无效")}w=void 0,X.timeout(W,0),F=OT(Y(x),T);let e=new O2({sessionIdGenerator:void 0});if(await F.connect(e),_)return await F.close(),K(400,"请求已取消");I=setTimeout(()=>{Z=504,O()},Math.max(60000,$)),I.unref();let n=await e.handleRequest(W,{parsedBody:i});if(Z=n.status,!n.body)return O(),n;w=n.body.getReader();let bT=new ReadableStream({async pull(s){try{let DT=await w.read();if(DT.done)s.close(),O();else s.enqueue(DT.value)}catch{s.error(Error("MCP response closed")),O()}},cancel(){Z=499,O()}});return new Response(bT,{status:n.status,headers:n.headers})}catch{return K(500,"MCP 请求处理失败")}},error(){return Response.json({error:"MCP 请求处理失败"},{status:500})}})}catch(W){let B=W?.code;throw new R("E5004",{reason:B??"监听失败"})}let H;return{url:new URL("/mcp",X.url),close(){return H??=(async()=>{J=!0;let W=setTimeout(()=>{for(let B of Q)B();X.stop(!0)},T1);W.unref();try{await X.stop(!1),await X.stop(!0)}finally{clearTimeout(W)}})()}}}var x0=1048576,rT=30000,T1=5000;var Q1=D(()=>{GT();dT();z();S0()});import{Command as y2,CommanderError as E2}from"commander";LT();gT();cT();LT();cT();gT();c();import{getModuleActionParams as H9}from"zentao-api";function d1(T,$){if(T.length===0)return"";let Y=$??Object.keys(T[0]);if(Y.length===0)return"";let Q=T.map((W)=>Y.map((B)=>{let U=Q9(W,B);return Y9(U)})),X=`| ${Y.join(" | ")} |`,J=`| ${Y.map(()=>"---").join(" | ")} |`,H=Q.map((W)=>`| ${W.join(" | ")} |`).join(`
4
+ `);return`${X}
5
+ ${J}
6
+ ${H}`}function W0(T,$){return($??Object.keys(T)).map((Q)=>{let X=Q9(T,Q);return`* ${Q}: ${Y9(X)}`}).join(`
7
+ `)}function k(T,$=!0){return JSON.stringify(T,null,$?4:0)}function l1(T,$){if(!T)return"";if(!$&&!T.recTotal)return"没有数据";return`
8
+
9
+ 已显示 ${$} 项,共 ${T.recTotal} 项,当前第 ${T.pageID} 页,每页 ${T.recPerPage} 条`}function NT(T,$){if($.format==="raw")return k($.rawResponse??T);if($.format==="json"){let Y={status:"success",data:T};if($.pager)Y.pager=p1($.pager);return k(Y,$.jsonPretty??!1)}if($.isList&&Array.isArray(T)){let Y=d1(T,$.fields),Q=l1($.pager,T.length);return Y+Q}if(!$.isList&&T&&typeof T==="object"&&!Array.isArray(T))return W0(T,$.fields);return k(T)}function p1(T){return{total:T.recTotal,page:T.pageID,recPerPage:T.recPerPage}}function Y9(T){if(T===null||T===void 0)return"";return(typeof T==="object"?JSON.stringify(T):String(T)).replace(/\r?\n/g,"<br>").replace(/\|/g,"\\|")}function Q9(T,$){let Y=$.split("."),Q=T;for(let X of Y){if(Q===null||Q===void 0||typeof Q!=="object")return;Q=Q[X]}return Q}import{createInterface as i1}from"node:readline/promises";function m1(T,$="markdown"){if($==="markdown")return PT(T);return T}function PT(T){if(typeof Bun<"u"&&typeof Bun.markdown.ansi==="function"&&process.stdout.isTTY&&!process.argv.includes("--machine-readable")&&process.env.NO_COLOR===void 0)return Bun.markdown.ansi(T);return T}function B0(T,$,Y){return m1($==="markdown"?W0(T,Y?.fields):k(T),$)}z();async function X9(T,$,Y=!1){if(Y||T==="json"||T==="raw"||!process.stdin.isTTY||!process.stderr.isTTY)throw new R("E2009",{option:"yes",reason:"非交互或机器可读模式下删除必须显式传入 --yes"});let Q=i1({input:process.stdin,output:process.stderr});try{return(await Q.question(`确认删除 ${$} 个对象?(y/n): `)).toLowerCase()==="y"}finally{Q.close()}}function n1(T){let Y=(Array.isArray(T)?T:[T]).flatMap((Q)=>String(Q??"").split(",")).map((Q)=>Q.trim()).filter(Boolean);if(Y.length<=1||!Y.every((Q)=>/^\d+$/.test(Q)))return;return Y}function s1(T,$,Y){let Q=$.format??Y.defaultOutputFormat??"markdown";if($.silent??Y.silent??!1)return;if(Q==="raw"){let H=NT(T.data,{format:Q,isList:T.isList,fields:T.fields,pager:T.pager,jsonPretty:Y.jsonPretty,rawResponse:T.rawResponse});if(H)console.log(H);return}if(T.action.type==="list"){let H=NT(T.data,{format:Q,isList:!0,fields:T.fields,pager:T.pager,jsonPretty:Y.jsonPretty});if(H)console.log(H);return}if(T.action.type==="get"){let H=B0(T.data,Q,{fields:T.fields});if(H)console.log(H);return}let J=NT(T.data,{format:Q,isList:!1,fields:T.fields,jsonPretty:Y.jsonPretty});if(J)console.log(J)}function t1(T,$){let Y=$ instanceof Error?$:Error(String($));return{objectID:T,error:{...Y instanceof R?{code:Y.code,details:Y.details}:{},message:Y.message}}}function a1(T,$,Y){if($==="json"||$==="raw")return k({status:T.failed.length>0?"failed":"success",result:T},Y);let Q=[];if(T.data?.length){let X=T.data.map(({objectID:H,value:W})=>W&&typeof W==="object"&&!Array.isArray(W)?{...W,objectID:H}:{objectID:H,value:W}),J=NT(X,{format:"markdown",isList:!0});if(J)Q.push(J)}if(Q.push(`操作成功:${T.success.length>0?T.success.join(", "):"无"}`,`操作失败:${T.failed.length>0?T.failed.join(", "):"无"}`),T.skipped.length>0)Q.push(`已跳过:${T.skipped.join(", ")}`);for(let X of T.errors){let J=X.error.code?`E${X.error.code}: `:"";Q.push(`${X.objectID}: ${J}${X.error.message}`)}return Q.join(`
10
+ `)}function r1(T,$,Y){let Q={failed:T.failed,skipped:T.skipped,errors:T.errors};if($==="json"||$==="raw")return k({status:"failed",result:Q},Y);let X=[`操作失败:${Q.failed.join(", ")}`];if(Q.skipped.length>0)X.push(`已跳过:${Q.skipped.join(", ")}`);for(let J of Q.errors){let H=J.error.code?`E${J.error.code}: `:"";X.push(`${J.objectID}: ${H}${J.error.message}`)}return X.join(`
11
+ `)}function W9(T,$){if($.silent)return;let Y=f0(T.name),Q=$.format??"markdown",X=Q==="markdown"?B0(Y,Q):k(Y);if(X)console.log(X)}async function iT(T,$,Y,Q,X,J){let H=t(X),W=J.batchFailFast??H.batchFailFast??!1,B=J.format??H.defaultOutputFormat??"markdown",U=C($,Y);if(!U)throw new R("E2005",{module:$.name});let V=fT(J,Y,Q),L=n1(V.id);if(L){if(U.type==="delete"&&!J.yes){if(!await X9(B,L.length,J.machineReadable))return}let I={success:[],failed:[],skipped:[],...U.type==="delete"?{}:{data:[]},errors:[]};for(let Z=0;Z<L.length;Z++){let O=L[Z],G=Number(O);try{let K=await xT(T,$,Y,[],J,H,{...V,id:O});I.success.push(G),I.data?.push({objectID:G,value:K.data})}catch(K){if(I.failed.push(G),I.errors.push(t1(G,K)),W){I.skipped.push(...L.slice(Z+1).map(Number));break}}}let w=J.silent??H.silent??!1,_=a1(I,B,H.jsonPretty??!1);if(!w)console.log(_);else if(I.failed.length>0)console.error(r1(I,B,H.jsonPretty??!1));if(I.failed.length>0)process.exitCode=1;return}if(U.type==="delete"&&!J.yes){if(!await X9(B,1,J.machineReadable))return}let F=await xT(T,$,Y,[],J,H,V);s1(F,J,H)}function yT(T){let $=T.name;if(console.log(`模块: ${T.display??$}`),T.description)console.log(`描述: ${T.description}`);let Y=[],Q=C(T,"list");if(Q)Y.push({cmd:`zentao ${$} [选项]`,desc:XT(Q)});let X=C(T,"get");if(X){let V=Object.keys(X.pathParams??{}).some((L)=>L.endsWith("ID")&&L!=="scopeID");Y.push({cmd:`zentao ${$} ${V?"<id>":"get"} [选项]`,desc:XT(X)})}Y.push({cmd:`zentao ${$} props [选项]`,desc:"获取对象属性定义"});let J=C(T,"create");if(J)Y.push({cmd:`zentao ${$} create [--key=value ...]`,desc:XT(J)});let H=C(T,"update");if(H)Y.push({cmd:`zentao ${$} update <id> [--key=value ...]`,desc:XT(H)});let W=C(T,"delete");if(W)Y.push({cmd:`zentao ${$} delete <id>[,<id>...] [选项]`,desc:XT(W)});if(Y.length>0){console.log(`
12
+ 操作:`);let V=Math.max(...Y.map((L)=>L.cmd.length),24)+4;for(let L of Y)console.log(` ${L.cmd.padEnd(V)}${L.desc}`)}let B=ST(T);if(B.length>0){let V=[];for(let F of B){let I=C(T,F);V.push({cmd:`zentao ${$} ${F} [选项]`,desc:XT(I)})}console.log(`
13
+ 扩展操作:`);let L=Math.max(...V.map((F)=>F.cmd.length),24)+4;for(let F of V)console.log(` ${F.cmd.padEnd(L)}${F.desc}`)}if(Q?.pathParams){let V="scope"in Q.pathParams,L=Object.entries(Q.pathParams).filter(([F])=>F!=="scope"&&F!=="scopeID");if(V||L.length>0){let F=[];if(V){let I=Q.pathParams.scope;if(typeof I==="object"&&I.options)for(let w of I.options){let _=String(w.value).replace(/s$/,"");F.push({name:_,placeholder:"id",description:`按${w.label}范围筛选,值为${w.label} ID`})}else F.push({name:"product",placeholder:"id",description:"按产品范围筛选,值为产品 ID"}),F.push({name:"project",placeholder:"id",description:"按项目范围筛选,值为项目 ID"}),F.push({name:"execution",placeholder:"id",description:"按执行范围筛选,值为执行 ID"})}for(let[I,w]of L){let _=typeof w==="string"?w:w.description??I;F.push({name:I,placeholder:"id",description:_})}console.log(`
14
+ 上下文参数${V?"(获取列表时必须指定其一)":""}:`),AT(F)}}let U=[];if(Q||X)U.push({name:"pick",placeholder:"fields",description:"摘取指定字段(逗号分隔),适用于 list/get 操作"});if(Q){let V=H9(T.name,Q.name);if(U.push({name:"filter",placeholder:"expr",description:"过滤条件,逗号分隔条件为 AND,多次指定为 OR,适用于 list 操作"},{name:"sort",placeholder:"expr",description:"客户端排序,格式: field:asc 或 field:desc(兼容下划线写法),适用于 list 操作"},{name:"search",placeholder:"keywords",description:"搜索关键词,逗号分隔关键词为 AND,多次指定为 OR,适用于 list 操作"},{name:"search-fields",placeholder:"fields",description:"搜索字段(逗号分隔),配合 --search 使用,适用于 list 操作"}),V.some((L)=>L.name==="pageID"))U.push({name:"page",placeholder:"number",description:"页码(等同于 API 的 pageID 参数),适用于 list 操作"});if(V.some((L)=>L.name==="recPerPage"))U.push({name:"recPerPage",placeholder:"number",description:"每页条数,适用于 list 操作"});U.push({name:"limit",placeholder:"number",description:"限制当前返回结果数量,适用于 list 操作"})}if(J||H||B.length>0)U.push({name:"data",placeholder:"json",description:"请求数据(JSON 格式),适用于 create/update/状态流转操作"});if(U.push({name:"params",placeholder:"json",description:"API 调用参数(JSON 对象),可替代单独的 --key=value 传参"}),W)U.push({name:"yes",description:"跳过确认提示,适用于 delete 操作"});if(U.push({name:"silent",description:"静默模式,不输出任何结果"}),T.actions.some((V)=>Object.keys(V.pathParams??{}).some((L)=>L.endsWith("ID")&&L!=="scopeID")))U.push({name:"id",placeholder:"id",description:"首个路径 ID 的简写,多个路径 ID 需分别提供"});U.push({name:"format",placeholder:"type",description:"输出格式,支持 markdown、json、raw"}),console.log(`
15
+ 公共选项:`),AT(U),console.log(`
16
+ 提示:`),console.log(` 使用 zentao ${$} <操作> --help 查看操作的详细参数说明`),console.log(` 参数传入方式: --key=value 或 --params '{"key":"value"}'`),console.log(` 请求数据传入: --data '{"key":"value"}' 或直接 --key=value`)}function mT(T,$){if(console.log($.display??`${T.display??T.name} ${$.name}`),console.log(`最低禅道版本: ${$.minVersion.join(" / ")}`),$.description&&$.description!==$.display)console.log(`描述: ${$.description}`);let Y=H9(T.name,$.name),Q=Y.filter((B)=>B.name!=="scope"&&B.name!=="scopeID"&&!($.type==="list"&&(B.name==="pageID"||B.name==="recPerPage"))).map((B)=>{let U=B.role==="path"&&B.name.endsWith("ID");return{name:B.name,placeholder:U?"number":T5(B),description:B.description??(U?`${T.display??T.name} ID`:B.name),required:B.required,defaultValue:B.defaultValue,options:B.options}}),X=Y.find((B)=>B.role==="path"&&B.name.endsWith("ID")&&B.name!=="scopeID");if(X&&X.name!=="id")Q.push({name:"id",placeholder:"number",description:`${X.name} 的别名,也可作为首个位置参数传入;其他路径参数需分别指定`});if(T.name==="bug"&&$.name==="create")Q.push({name:"product",placeholder:"number",description:"productID 的别名;同时传入时必须指定同一个产品"});if(($.type==="create"||$.type==="update"||$.type==="action")&&!Y.some((B)=>B.role==="body"&&B.name==="data"))Q.push({name:"data",placeholder:"json",description:"请求数据(完整 JSON 对象),可替代以上逐个字段传参"});if(Q.push({name:"params",placeholder:"json",description:"API 调用参数(JSON 对象),可替代以上逐个 --key=value 传参"}),Q.length>0)console.log(`
17
+ API 参数:`),AT(Q);let H=Y.find((B)=>B.role==="path"&&B.name==="scope");if(H){let B=[];if(H.options)for(let U of H.options){let V=String(U.value).replace(/s$/,"");B.push({name:V,placeholder:"id",description:`按${U.label}范围筛选,值为${U.label} ID`})}else B.push({name:"product",placeholder:"id",description:"按产品范围筛选,值为产品 ID"}),B.push({name:"project",placeholder:"id",description:"按项目范围筛选,值为项目 ID"}),B.push({name:"execution",placeholder:"id",description:"按执行范围筛选,值为执行 ID"});console.log(`
18
+ 上下文参数(必须指定其一):`),AT(B)}let W=[];if($.resultType==="list"||$.type==="list"){if(W.push({name:"pick",placeholder:"fields",description:"摘取指定字段(逗号分隔),仅输出指定的字段"},{name:"filter",placeholder:"expr",description:"过滤条件,逗号分隔条件为 AND,多次指定为 OR"},{name:"sort",placeholder:"expr",description:"客户端排序,格式: field:asc 或 field:desc(兼容下划线写法)"},{name:"search",placeholder:"keywords",description:"搜索关键词,逗号分隔关键词为 AND,多次指定为 OR"},{name:"search-fields",placeholder:"fields",description:"搜索字段(逗号分隔),配合 --search 使用"}),Y.some((B)=>B.name==="pageID"))W.push({name:"page",placeholder:"number",description:"页码(等同于 API 的 pageID 参数)"});if(Y.some((B)=>B.name==="recPerPage"))W.push({name:"recPerPage",placeholder:"number",description:"每页条数"});W.push({name:"limit",placeholder:"number",description:"限制当前返回结果数量"})}else if($.type==="get")W.push({name:"pick",placeholder:"fields",description:"摘取指定字段(逗号分隔),仅输出指定的字段"});if($.type==="delete")W.push({name:"yes",description:"跳过确认提示,直接执行删除"});if(W.push({name:"format",placeholder:"type",description:"输出格式,支持 markdown、json、raw"}),W.push({name:"silent",description:"静默模式,不输出任何结果"}),$.type!=="list"&&$.type!=="get")W.push({name:"batch-fail-fast",description:"批量操作遇到错误时立即停止"});console.log(`
19
+ 公共选项:`),AT(W)}var o1=["list","get","create","update","delete"];function B9(T){let $=!0;for(let Y of o1){let Q=C(T,Y);if(!Q)continue;if(!$)console.log(`
120
20
  ${"─".repeat(56)}
121
- `);D=!1,h9($,G)}for(let X of W9($)){let G=t6($,"action",X);if(!G)continue;if(!D)console.log(`
21
+ `);$=!1,mT(T,Q)}for(let Y of ST(T)){let Q=C(T,Y);if(!Q)continue;if(!$)console.log(`
122
22
  ${"─".repeat(56)}
123
- `);D=!1,h9($,G)}if(D)kX($)}function jB($,D){if($==="number"||$==="integer")return"number";if($==="boolean")return;if($==="array")return D?`${D}[]`:"array";return"string"}function x9($){let D=Math.max(...$.map((X)=>gS(X).length),24)+2;for(let X of $){let G=gS(X),J=[X.description];if(X.required)J.push("(必填)");if(X.defaultValue!==void 0)J.push(`(默认值: ${X.defaultValue})`);if(console.log(G.padEnd(D)+J.join(" ")),X.options?.length){let Y=" ".repeat(D),Q=X.options.map((W)=>`${W.value}(${W.label})`).join(" | ");console.log(`${Y}可选值: ${Q}`)}}}function gS($){return` --${$.name}${$.placeholder?` <${$.placeholder}>`:""}`}function Vi($,D){return $.commands.find((X)=>X.name()===D||X.aliases().includes(D))}function hS($){$.command("help").description("显示命令帮助").argument("[command]","子命令或模块名").action((D)=>{if(!D){$.help();return}let X=BX(D);if(X){xS(X);return}let G=Vi($,D);if(G&&!G._executableHandler){G.help();return}$.help({error:!0})})}function v0($,D,X){return new VD({baseUrl:$,token:D,insecure:X?.insecure,timeout:X?.timeout})}async function uS($){let D=`${$.siteUrl}/?mode=getconfig`,X=await fetch(D,{method:"GET",headers:{"Content-Type":"application/json"}});if(!X.ok){let G=await X.text().catch(()=>"");throw new c("E2008",{url:D,status:String(X.status),serverResponse:G})}return await X.json()}async function OY($,D,X,G){let J=v0($,void 0,G),Y;try{Y=await J.login(D,X)}catch(I){throw I9(I)}let Q,W;try{({serverConfig:W,user:Q}=await AB(J,D))}catch{}return{token:Y,user:Q,serverConfig:W}}async function AB($,D){try{let X=await uS($),J=(await $.get("/users",{query:{browseType:"inside",recPerPage:100}})).users;if(!J?.length)throw new c("E1004");let Y=J.find((Q)=>Q.account===D);return{serverConfig:X,user:Y}}catch(X){throw I9(X)}}function FY(){return{url:process.env.ZENTAO_URL,account:process.env.ZENTAO_ACCOUNT,password:process.env.ZENTAO_PASSWORD,token:process.env.ZENTAO_TOKEN}}import{createInterface as wi}from"node:readline";function MB($,D){return new Promise((X)=>{$.question(D,(G)=>X(G))})}async function fS(){let $=wi({input:process.stdin,output:process.stderr});try{let D=await MB($,"禅道服务地址 (URL): ");if(!D)throw Error("URL is required");let X=await MB($,"用户名 (Account): ");if(!X)throw Error("Account is required");let G=await MB($,"密码(Password) 或 Token : ");if(!G)throw Error("Password or Token is required");let J=D.replace(/\/+$/,"");try{new URL(J)}catch{throw Error(`Invalid URL: ${J}`)}let Y=G.length===40;return{url:J,account:X,password:Y?"":G,token:Y?G:""}}finally{$.close()}}function mS($){$.command("login").description("登录禅道服务").option("-s, --server <url>","禅道服务地址").option("-u, --user <account>","用户名").option("-p, --password <password>","密码").option("-t, --token <token>","Token").option("--useEnv","强制使用环境变量登录").action(async(D)=>{let X=$.opts();try{let G,J,Y,Q;if(D.useEnv){let U=FY();if(!U.url||!U.account||!U.password&&!U.token)throw new c("E1001");G=U.url,J=U.account,Y=U.password??"",Q=U.token??""}else if(D.server&&D.user&&(D.password||D.token))G=D.server,J=D.user,Y=D.password??"",Q=D.token??"";else{let U=await fS();G=U.url,J=U.account,Y=U.password,Q=U.token}if(!G||!J||!Y&&!Q)throw new c("E1001");let W=VY(J,G),I;if(Q){let U=v0(G,Q,{insecure:X.insecure,timeout:X.timeout}),{serverConfig:B,user:H}=await AB(U,J);I=TX(G,J,Q,B,H,W)}else{let U=await OY(G,J,Y,{insecure:X.insecure,timeout:X.timeout});I=TX(G,J,U.token,U.serverConfig,U.user,W)}if(I4(I),!X.silent)console.log(`登录成功: ${p6(J,G)}`)}catch(G){if(G instanceof c)console.error(u6(G,X.format??"markdown")),process.exit(1);throw G}})}function cS($){$.command("logout").description("退出当前用户登录").argument("[profileKey]","要退出的用户配置(格式:account@server)").action((D)=>{let X=$.opts();try{let G;if(D)G=D;else{let Y=W6();if(!Y){console.log("未找到当前用户配置,请先使用 `zentao login` 登录");return}G=p6(Y.account,Y.server)}if(!RS(G))throw new c("E1007");if(!X.silent)console.log(`已退出: ${G}`)}catch(G){if(G instanceof c)console.error(u6(G,X.format??"markdown")),process.exit(1);throw G}})}function lS($){$.command("profile").description("查看或切换用户配置").argument("[profileKey]","要切换到的用户配置(格式:account@server,例如 admin@https://zentao.example.com)").action((D)=>{let X=$.opts();try{if(D){if(!wY(D))throw new c("E1007");if(!X.silent)console.log(bB(`已切换到: \`${D}\``));return}let G=LY();if(G.length===0)throw new c("E1006");let J=W6(),Y=J?p6(J.account,J.server):"";if(X.format==="json"||X.format==="raw"){console.log(JSON.stringify({status:"success",currentProfile:Y,profiles:G.map((W)=>({key:p6(W.account,W.server),server:W.server,account:W.account,current:p6(W.account,W.server)===Y}))},null,4));return}let Q=G.map((W)=>{let I=p6(W.account,W.server),U=[I];if(W.serverConfig)U.push(` (${W.serverConfig.version.toUpperCase()})`);if(I===Y)U.push(" **[当前]**");return`* ${U.join("")}`});console.log(bB(Q.join(`
124
- `)))}catch(G){if(G instanceof c)console.error(u6(G,X.format??"markdown")),process.exit(1);throw G}})}function iS($){let D=$.command("config").description("管理用户配置");D.command("get").description("查看配置").argument("[key]","配置项名称").action((X)=>{let G=$.opts();try{let J=W6();if(!J)throw new c("E1006");let Y=Z0(J);if(X){if(!OB.includes(X))throw new c("E2004",{field:X,value:""});let Q=Y[X];if(G.format==="json"||G.format==="raw")console.log(i1({[X]:Q}));else console.log(typeof Q==="object"?i1(Q):String(Q));return}if(G.format==="json"||G.format==="raw")console.log(i1(Y));else for(let[Q,W]of Object.entries(Y))console.log(`${Q}: ${JSON.stringify(W)}`)}catch(J){if(J instanceof c)console.error(u6(J,G.format??"markdown")),process.exit(1);throw J}}),D.command("set").description("设置配置").argument("<key>","配置项名称").argument("<value>","配置值").action((X,G)=>{let J=$.opts();try{let Y=W6();if(!Y)throw new c("E1006");if(!OB.includes(X))throw new c("E2004",{field:X,value:G});let Q=G;if(G==="true")Q=!0;else if(G==="false")Q=!1;else if(/^\d+$/.test(G))Q=Number(G);else try{Q=JSON.parse(G)}catch{}if(ES(Y,X,Q),!J.silent)console.log(`已设置 ${X} = ${JSON.stringify(Q)}`)}catch(Y){if(Y instanceof c)console.error(u6(Y,J.format??"markdown")),process.exit(1);throw Y}})}function pS($){if(!$.workspaces)$.workspaces=[];let D=$.currentWorkspace?$.workspaces.find((X)=>X.id===$.currentWorkspace):void 0;if(D)return D;if($.workspaces.length>0)return $.currentWorkspace=$.workspaces[0].id,I4($),$.workspaces[0];return Oi($,{})}function SB($){return pS($)}function rS($){return pS($),$.workspaces??[]}function PB($,D){return $.workspaces?.find((X)=>X.id===D)}function nS($,D){if(!PB($,D))return!1;return $.currentWorkspace=D,I4($),!0}function Li($){let D=$.workspaces??[];if(D.length===0)return 1;return Math.max(...D.map((X)=>X.id))+1}function Oi($,D){if(!$.workspaces)$.workspaces=[];let X={id:Li($),product:D.product,project:D.project,execution:D.execution};return $.workspaces.push(X),$.currentWorkspace=X.id,I4($),X}function bY($){return{ID:$.id,产品:$.product?`#${$.product.id} ${$.product.name}`:"空",项目:$.project?`#${$.project.id} ${$.project.name}`:"空",执行:$.execution?`#${$.execution.id} ${$.execution.name}`:"空"}}function dS($){let D=$.command("workspace").description("管理工作区").argument("[id]","工作区 ID").action((X)=>{let G=$.opts();try{let J=W6();if(!J)throw new c("E1006");if(X&&X!=="ls"&&X!=="set"){let Q=PB(J,Number(X));if(!Q)throw new c("E4001");if(G.format==="json"||G.format==="raw")console.log(i1({status:"success",data:Q}));else console.log(zX(bY(Q)));return}let Y=SB(J);if(G.format==="json"||G.format==="raw")console.log(i1({status:"success",data:Y}));else console.log(zX(bY(Y)))}catch(J){if(J instanceof c)console.error(u6(J,G.format??"markdown")),process.exit(1);throw J}});D.command("ls").description("查看所有工作区").action(()=>{let X=$.opts();try{let G=W6();if(!G)throw new c("E1006");let J=rS(G),Y=G.currentWorkspace;if(X.format==="json"||X.format==="raw"){console.log(i1({status:"success",data:J}));return}if(J.length===0){console.log("暂无工作区");return}let Q=J.map((W)=>({...bY(W),使用中:W.id===Y?"是":"否"}));console.log(w3(Q))}catch(G){if(G instanceof c)console.error(u6(G,X.format??"markdown")),process.exit(1);throw G}}),D.command("set").description("设置当前工作区").argument("[id]","工作区 ID").option("--product <id>","设置产品").option("--project <id>","设置项目").option("--execution <id>","设置执行").action((X,G)=>{let J=$.opts();try{let Y=W6();if(!Y)throw new c("E1006");if(X){if(!nS(Y,Number(X)))throw new c("E4001")}else if(G.product||G.project||G.execution){console.log("请先使用 zentao workspace set <id> 设置工作区");return}else throw new c("E4001");let Q=SB(Y);if(Q&&!J.silent)console.log(zX(bY(Q)))}catch(Y){if(Y instanceof c)console.error(u6(Y,J.format??"markdown")),process.exit(1);throw Y}})}import{existsSync as Fi,readFileSync as bi}from"node:fs";import{dirname as ji,join as _B}from"node:path";import{fileURLToPath as Ai}from"node:url";function U4(){return"0.3.0"}function oS($){$.command("version").description("显示版本信息").action(()=>{let D=$.opts(),X=U4();if(D.format==="json"||D.format==="raw"){let J={cli:`zentao-cli ${X}`},Y=W6();if(Y)J.server=Y.server;console.log(JSON.stringify(J,null,4));return}console.log(`Zentao CLI: ${X}`);let G=W6();if(G)console.log(`Zentao Server: ${G.serverConfig?.version?G.serverConfig.version.toUpperCase():"Unknown"} (${G.server})`)})}import{mkdirSync as Mi,writeFileSync as Si}from"node:fs";import{homedir as tS}from"node:os";import{join as aS}from"node:path";import{createInterface as Pi}from"node:readline";var _i=["login","logout","profile","config","workspace","version","ls","get","create","update","delete","do","autocomplete","add-skill","add-mcp"],NB=["get","set"],RB=["ls","set"],sS=["--format","--silent","--insecure","--timeout","-h","--help"];function EB(){let $=wD();return[...new Set([..._i,...$])].sort().join(" ")}function Ni($="zentao"){let D=EB();return`# bash completion for ${$}
23
+ `);$=!1,mT(T,Q)}if($)yT(T)}function e1(T,$){if(T==="number"||T==="integer")return"number";if(T==="boolean")return;if(T==="array")return $?`${$}[]`:"array";return"string"}function T5(T){return e1(T.type??"string",T.items?.type)}function AT(T){let $=Math.max(...T.map((Y)=>J9(Y).length),24)+2;for(let Y of T){let Q=J9(Y),X=[Y.description];if(Y.required)X.push("(必填)");if(Y.defaultValue!==void 0)X.push(`(默认值: ${Y.defaultValue})`);if(console.log(Q.padEnd($)+X.join(" ")),Y.options?.length){let J=" ".repeat($),H=Y.options.map((W)=>`${W.value}(${W.label})`).join(" | ");console.log(`${J}可选值: ${H}`)}}}function J9(T){return` --${T.name}${T.placeholder?` <${T.placeholder}>`:""}`}function $5(T,$){return T.commands.find((Y)=>Y.name()===$||Y.aliases().includes($))}function U9(T){T.command("help").description("显示命令帮助").argument("[command]","子命令或模块名").action(($)=>{if(!$){T.help();return}let Y=d($);if(Y){B9(Y);return}let Q=$5(T,$);if(Q&&!Q._executableHandler){Q.help();return}T.help({error:!0})})}ET();import{createInterface as Y5}from"node:readline/promises";import{Writable as Q5}from"node:stream";async function V9(){let T=!1,$=new Q5({write(Q,X,J){if(!T)process.stderr.write(Q);J()}}),Y=Y5({input:process.stdin,output:$,terminal:process.stdin.isTTY});try{let Q=await Y.question("禅道服务地址 (URL): ");if(!Q)throw Error("URL is required");let X=await Y.question("用户名 (Account): ");if(!X)throw Error("Account is required");let J=(await Y.question("认证方式 (password/token) [password]: ")).trim().toLowerCase()||"password";if(J!=="password"&&J!=="token")throw Error("Auth method must be password or token");process.stderr.write(J==="token"?"Token: ":"密码 (Password): "),T=!0;let H;try{H=await Y.question("")}finally{T=!1,process.stderr.write(`
24
+ `)}if(!H)throw Error("Password or Token is required");let W=Q.replace(/\/+$/,"");try{new URL(W)}catch{throw Error(`Invalid URL: ${W}`)}return{url:W,account:X,password:J==="password"?H:"",token:J==="token"?H:""}}finally{Y.close()}}c();z();GT();ET();import{randomBytes as K9}from"node:crypto";import{createServer as R5}from"node:http";import{spawn as X5}from"node:child_process";function R9(T=process.platform,$=process.env){if($.SSH_CONNECTION||$.SSH_CLIENT||$.SSH_TTY||$.container||$.CI&&!/^(false|0)$/i.test($.CI))return!1;if(T==="darwin")return!0;if(T==="win32")return $.SESSIONNAME?.toLowerCase()!=="services";return T==="linux"&&Boolean($.DISPLAY||$.WAYLAND_DISPLAY)}async function G9(T){let $=process.platform==="darwin"?["open",T]:process.platform==="win32"?["rundll32.exe","url.dll,FileProtocolHandler",T]:process.platform==="linux"?["xdg-open",T]:void 0;if(!$)return!1;return new Promise((Y)=>{let Q,X=setTimeout(()=>Y(!0),5000),J=(H)=>{clearTimeout(X),Y(H)};try{Q=X5($[0],$.slice(1),{stdio:"ignore",windowsHide:!0}),Q.once("error",()=>J(!1)),Q.once("exit",(H)=>J(H===0)),Q.unref()}catch{J(!1)}})}IT();var U5={title:"登录禅道",intro:"完成登录后,回到 ZenTao CLI 即可继续使用禅道。",language:"语言",theme:"外观",system:"跟随系统",light:"浅色",dark:"深色",server:"禅道地址",serverHint:"填写平时访问禅道的完整地址,保留 /zentao 等子目录。",httpNotice:"此地址使用 HTTP,账号和密码将通过未加密的连接发送。请确认网络环境可信。",insecureNotice:"当前已关闭 HTTPS 证书验证。请确认禅道地址属于你信任的服务器。",account:"用户名",password:"密码",submit:"登录并保存",cancel:"取消",submitting:"正在登录…",cancelling:"正在取消…",privacy:"登录状态保存在本机。密码仅用于本次登录,不会保存到 CLI 配置。",noScript:"请启用浏览器的 JavaScript,然后从 ZenTao CLI 重新发起登录。",website:"禅道官网",websiteLabel:"禅道官网(在新标签页打开)",githubLabel:"GitHub 项目(在新标签页打开)",successTitle:"登录成功",successMessage:"已登录账号 {account}({server})。登录状态已保存,可以返回 ZenTao CLI 继续操作。",cancelTitle:"已取消登录",cancelMessage:"本次登录已取消。需要使用禅道时,可从 ZenTao CLI 重新发起登录。",finishedIntro:"你可以关闭此页面,回到 ZenTao CLI 继续操作。",connectionFailed:"无法连接登录服务,页面可能已过期。请回到 ZenTao CLI 重新发起登录。",cancelFailed:"无法连接登录服务,页面可能已过期。请关闭此页面,回到 ZenTao CLI 查看登录状态。",requestFailed:"请求处理失败,请重试。",localOnly:"仅允许本机登录请求。",expired:"此登录页面已失效,请回到 ZenTao CLI 重新发起登录。",notFound:"页面不存在。",invalidSession:"登录页面已失效或请求来源不正确,请回到 ZenTao CLI 重新发起登录。",invalidRequest:"请通过登录页面提交信息。",busy:"正在登录,请稍候。",tooLarge:"登录信息过长,请检查输入。",invalidJson:"登录信息格式不正确。",required:"请填写禅道地址、用户名和密码。",invalidUrl:"请填写完整的禅道地址,例如 https://zentao.example.com。",unsafeUrl:"请填写 HTTP 或 HTTPS 站点根地址,不要包含账号、密码、查询参数或锚点。",invalidCredentials:"用户名或密码不正确,请检查后重试。",unreachable:"无法连接禅道,请检查地址和网络连接。",timeout:"连接禅道超时,请检查网络后重试。",certificate:"禅道的 HTTPS 证书验证失败,请联系管理员检查证书。",invalidService:"无法识别禅道服务,请填写禅道站点根地址。",loginFailed:"登录或保存失败,请检查禅道地址、账号及本地配置文件权限后重试。"},L5={title:"登入禪道",intro:"完成登入後,回到 ZenTao CLI 即可繼續使用禪道。",language:"語言",theme:"外觀",system:"跟隨系統",light:"淺色",dark:"深色",server:"禪道網址",serverHint:"填寫平時存取禪道的完整網址,保留 /zentao 等子目錄。",httpNotice:"此網址使用 HTTP,帳號和密碼將透過未加密的連線傳送。請確認網路環境可信。",insecureNotice:"目前已關閉 HTTPS 憑證驗證。請確認禪道網址屬於你信任的伺服器。",account:"使用者名稱",password:"密碼",submit:"登入並儲存",cancel:"取消",submitting:"正在登入…",cancelling:"正在取消…",privacy:"登入狀態儲存在本機。密碼僅用於本次登入,不會儲存到 CLI 設定。",noScript:"請啟用瀏覽器的 JavaScript,然後從 ZenTao CLI 重新發起登入。",website:"禪道官網",websiteLabel:"禪道官網(在新分頁開啟)",githubLabel:"GitHub 專案(在新分頁開啟)",successTitle:"登入成功",successMessage:"已登入帳號 {account}({server})。登入狀態已儲存,可以返回 ZenTao CLI 繼續操作。",cancelTitle:"已取消登入",cancelMessage:"本次登入已取消。需要使用禪道時,可從 ZenTao CLI 重新發起登入。",finishedIntro:"你可以關閉此頁面,回到 ZenTao CLI 繼續操作。",connectionFailed:"無法連線至登入服務,頁面可能已過期。請回到 ZenTao CLI 重新發起登入。",cancelFailed:"無法連線至登入服務,頁面可能已過期。請關閉此頁面,回到 ZenTao CLI 查看登入狀態。",requestFailed:"請求處理失敗,請重試。",localOnly:"僅允許本機登入請求。",expired:"此登入頁面已失效,請回到 ZenTao CLI 重新發起登入。",notFound:"頁面不存在。",invalidSession:"登入頁面已失效或請求來源不正確,請回到 ZenTao CLI 重新發起登入。",invalidRequest:"請透過登入頁面提交資訊。",busy:"正在登入,請稍候。",tooLarge:"登入資訊過長,請檢查輸入內容。",invalidJson:"登入資訊格式不正確。",required:"請填寫禪道網址、使用者名稱和密碼。",invalidUrl:"請填寫完整的禪道網址,例如 https://zentao.example.com。",unsafeUrl:"請填寫 HTTP 或 HTTPS 網站根網址,不要包含帳號、密碼、查詢參數或錨點。",invalidCredentials:"使用者名稱或密碼不正確,請檢查後重試。",unreachable:"無法連線至禪道,請檢查網址和網路連線。",timeout:"連線至禪道逾時,請檢查網路後重試。",certificate:"禪道的 HTTPS 憑證驗證失敗,請聯絡管理員檢查憑證。",invalidService:"無法識別禪道服務,請填寫禪道網站根網址。",loginFailed:"登入或儲存失敗,請檢查禪道網址、帳號及本機設定檔權限後重試。"},V5={title:"Log in to ZenTao",intro:"After logging in, return to ZenTao CLI to continue using ZenTao.",language:"Language",theme:"Appearance",system:"System",light:"Light",dark:"Dark",server:"ZenTao URL",serverHint:"Enter the full address you normally use for ZenTao, including any subdirectory such as /zentao.",httpNotice:"This address uses HTTP. Your username and password will be sent over an unencrypted connection. Make sure you trust the network.",insecureNotice:"HTTPS certificate verification is disabled. Make sure this ZenTao address belongs to a server you trust.",account:"Username",password:"Password",submit:"Log in and save",cancel:"Cancel",submitting:"Logging in…",cancelling:"Cancelling…",privacy:"Your login is saved on this computer. Your password is used only for this login and is not saved in the CLI configuration.",noScript:"Enable JavaScript in your browser, then start login again from ZenTao CLI.",website:"ZenTao website",websiteLabel:"ZenTao website (opens in a new tab)",githubLabel:"GitHub project (opens in a new tab)",successTitle:"Login successful",successMessage:"Logged in as {account} ({server}). Your login has been saved. Return to ZenTao CLI to continue.",cancelTitle:"Login cancelled",cancelMessage:"This login was cancelled. You can start login again from ZenTao CLI when you need to use ZenTao.",finishedIntro:"You can close this page and return to ZenTao CLI to continue.",connectionFailed:"Could not connect to the login service. This page may have expired. Return to ZenTao CLI and start login again.",cancelFailed:"Could not connect to the login service. This page may have expired. Close this page and check your login status in ZenTao CLI.",requestFailed:"Could not process the request. Please try again.",localOnly:"Login requests are only allowed from this computer.",expired:"This login page has expired. Return to ZenTao CLI and start login again.",notFound:"Page not found.",invalidSession:"This login page has expired or the request came from an unexpected source. Return to ZenTao CLI and start login again.",invalidRequest:"Submit your details using the login page.",busy:"Logging in. Please wait.",tooLarge:"The login details are too long. Check your input.",invalidJson:"The login details are not in the correct format.",required:"Enter the ZenTao URL, username, and password.",invalidUrl:"Enter the full ZenTao URL, such as https://zentao.example.com.",unsafeUrl:"Enter an HTTP or HTTPS site root URL without a username, password, query string, or fragment.",invalidCredentials:"The username or password is incorrect. Check your details and try again.",unreachable:"Could not connect to ZenTao. Check the URL and your network connection.",timeout:"The connection to ZenTao timed out. Check your network and try again.",certificate:"ZenTao HTTPS certificate verification failed. Ask your administrator to check the certificate.",invalidService:"Could not recognize the ZenTao service. Enter the ZenTao site root URL.",loginFailed:"Could not log in or save your login. Check the ZenTao URL, your account, and write access to the local configuration file, then try again."},nT={"zh-CN":U5,"zh-TW":L5,en:V5};function F9(T){let $=(X)=>X.replace(/[&<>"']/g,(J)=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[J]),Y=(X)=>$(nT["zh-CN"][X]),Q=`
25
+ color-scheme: dark;
26
+ --page-start: #142746; --page-end: #0c1629; --surface: #1a2639;
27
+ --ink: #eef3fc; --muted: #acb9cf; --accent: #80afff; --button: #2f6dd4; --button-hover: #245fc5;
28
+ --border: #52617a; --input: #152135; --footer: #162133; --brand: #a6c8ff;
29
+ --error: #ffb4b4; --error-bg: #432931; --notice: #f3d392; --notice-bg: #3a3223;
30
+ --success: #9ddbbb; --success-bg: #193c32;
31
+ `;return`<!doctype html>
32
+ <html lang="zh-CN">
33
+ <head>
34
+ <meta charset="utf-8">
35
+ <meta name="viewport" content="width=device-width, initial-scale=1">
36
+ <meta name="color-scheme" content="light dark">
37
+ <meta name="referrer" content="no-referrer">
38
+ <title>${Y("title")} · ZenTao CLI</title>
39
+ <script nonce="${$(T.nonce)}">
40
+ try {
41
+ const theme = localStorage.getItem('zentao-login-theme');
42
+ if (theme === 'light' || theme === 'dark') document.documentElement.dataset.theme = theme;
43
+ } catch {}
44
+ </script>
45
+ <style nonce="${$(T.nonce)}">
46
+ :root {
47
+ color-scheme: light;
48
+ --page-start: #3273dc; --page-end: #2b67e5; --surface: #fff;
49
+ --ink: #30394a; --muted: #596780; --accent: #245fc5; --button: #2563d5; --button-hover: #1d54bd;
50
+ --border: #bec8d9; --input: #fff; --footer: #f7f9fc; --brand: #0b3a59;
51
+ --error: #a32024; --error-bg: #fff1f0; --notice: #76500e; --notice-bg: #fff7e5;
52
+ --success: #176345; --success-bg: #edf8f1;
53
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
54
+ color: var(--ink); background: var(--page-end); font-size: 14px;
55
+ }
56
+ @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
57
+ color-scheme: dark;
58
+ --page-start: #142746; --page-end: #0c1629; --surface: #1a2639;
59
+ --ink: #eef3fc; --muted: #acb9cf; --accent: #80afff; --button: #2f6dd4; --button-hover: #245fc5;
60
+ --border: #52617a; --input: #152135; --footer: #162133; --brand: #a6c8ff;
61
+ --error: #ffb4b4; --error-bg: #432931; --notice: #f3d392; --notice-bg: #3a3223;
62
+ --success: #9ddbbb; --success-bg: #193c32;
63
+ } }
64
+ :root[data-theme="dark"] {
65
+ color-scheme: dark;
66
+ --page-start: #142746; --page-end: #0c1629; --surface: #1a2639;
67
+ --ink: #eef3fc; --muted: #acb9cf; --accent: #80afff; --button: #2f6dd4; --button-hover: #245fc5;
68
+ --border: #52617a; --input: #152135; --footer: #162133; --brand: #a6c8ff;
69
+ --error: #ffb4b4; --error-bg: #432931; --notice: #f3d392; --notice-bg: #3a3223;
70
+ --success: #9ddbbb; --success-bg: #193c32;
71
+ }
72
+ * { box-sizing: border-box; }
73
+ [hidden] { display: none !important; }
74
+ body {
75
+ margin: 0; min-height: 100svh; padding: 40px 24px; display: grid; place-items: center;
76
+ background: linear-gradient(110deg, var(--page-start), var(--page-end));
77
+ }
78
+ .login-shell { width: 100%; max-width: 480px; }
79
+ main {
80
+ width: 100%;
81
+ background: var(--surface); border-radius: 4px; overflow: hidden;
82
+ box-shadow: 0 16px 48px rgb(8 34 87 / 18%);
83
+ }
84
+ .page-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 32px 0; }
85
+ .brand { display: flex; align-items: center; gap: 10px; color: var(--brand); }
86
+ .brand svg { width: 36px; height: 36px; flex-shrink: 0; }
87
+ .brand-name { font-size: 20px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
88
+ .content { padding: 24px 32px 28px; min-width: 0; }
89
+ .preferences { display: flex; gap: 4px; }
90
+ .preference { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 3px; color: var(--muted); }
91
+ .preference:hover { color: var(--accent); background: var(--footer); }
92
+ .preference:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
93
+ .preference svg { width: 20px; height: 20px; pointer-events: none; }
94
+ .preference select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; color: var(--ink); background: var(--surface); font: inherit; }
95
+ .theme-light, .theme-dark { display: none; }
96
+ :root[data-theme="light"] .theme-system, :root[data-theme="dark"] .theme-system { display: none; }
97
+ :root[data-theme="light"] .theme-light, :root[data-theme="dark"] .theme-dark { display: block; }
98
+ h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.35; font-weight: 650; }
99
+ p { margin: 0; line-height: 1.65; }
100
+ .intro { color: var(--muted); margin-bottom: 26px; overflow-wrap: anywhere; }
101
+ fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
102
+ .field + .field { margin-top: 20px; }
103
+ label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 500; }
104
+ input {
105
+ display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border);
106
+ border-radius: 3px; background: var(--input); color: var(--ink); font: inherit; font-size: 16px; caret-color: var(--accent);
107
+ }
108
+ input::placeholder { color: var(--muted); opacity: 1; }
109
+ input:hover:not(:disabled) { border-color: var(--accent); }
110
+ :where(input, button, select, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
111
+ .hint { margin-top: 7px; font-size: 12px; color: var(--muted); }
112
+ .notice { padding: 12px 14px; margin-top: 12px; border-radius: 3px; color: var(--notice); background: var(--notice-bg); font-size: 13px; }
113
+ .notice.insecure { margin: 0 0 22px; }
114
+ .actions { display: flex; gap: 12px; margin-top: 26px; }
115
+ button { min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 3px; font: inherit; font-weight: 600; cursor: pointer; }
116
+ .primary { flex: 1; color: #fff; background: var(--button); }
117
+ .primary:hover:not(:disabled) { background: var(--button-hover); }
118
+ .secondary { color: var(--ink); background: var(--surface); border-color: var(--border); }
119
+ .secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
120
+ button:disabled { opacity: .65; cursor: wait; }
121
+ input:disabled { opacity: .7; }
122
+ .feedback { margin-top: 20px; padding: 12px 14px; border-radius: 3px; font-size: 14px; overflow-wrap: anywhere; }
123
+ .feedback.error { color: var(--error); background: var(--error-bg); }
124
+ .feedback.success { color: var(--success); background: var(--success-bg); }
125
+ .privacy { margin-top: 20px; color: var(--muted); font-size: 12px; }
126
+ footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; margin-top: 12px; padding: 0 8px; color: #fff; font-size: 12px; }
127
+ footer a { display: inline-flex; align-items: center; min-height: 28px; color: inherit; text-underline-offset: 3px; }
128
+ footer a:focus-visible { outline-color: currentColor; }
129
+ ::selection { color: #fff; background: var(--button); }
130
+ html { scrollbar-color: var(--border) var(--surface); }
131
+ @media (max-width: 480px) {
132
+ body { padding: 24px 16px; }
133
+ .page-header { padding: 20px 20px 0; }
134
+ .brand svg { width: 32px; height: 32px; }
135
+ .brand-name { font-size: 18px; }
136
+ .content { padding: 24px 20px; }
137
+ }
138
+ @media (pointer: coarse) { .preference { width: 44px; height: 44px; } }
139
+ @media (prefers-reduced-motion: no-preference) {
140
+ button, input, select { transition: border-color 120ms ease-out, background-color 120ms ease-out; }
141
+ }
142
+ @media (forced-colors: active) { main { border: 1px solid CanvasText; } }
143
+ </style>
144
+ </head>
145
+ <body>
146
+ <div class="login-shell">
147
+ <main>
148
+ <header class="page-header">
149
+ <div class="brand">
150
+ <!-- Original Pixel Tao geometry from site/public/brand/pixel-tao-terminal-blue-flat.svg. -->
151
+ <svg viewBox="0 0 16 16" aria-hidden="true" fill="currentColor" shape-rendering="crispEdges"><path d="M6 1h4v1H6z M4 2h8v1H4z M3 3h10v1H3z M2 4h2v1H2z M9 4h5v1H9z M2 5h1v1H2z M4 5h2v1H4z M10 5h4v1h-4z M1 6h5v1H1z M11 6h4v1h-4z M1 7h4v1H1z M6 7h4v1H6z M13 7h2v1h-2z M1 8h3v1H1z M5 8h3v1H5z M10 8h5v1h-5z M1 9h3v1H1z M5 9h2v1H5z M8 9h1v1H8z M11 9h4v1h-4z M2 10h2v1H2z M5 10h5v1H5z M11 10h3v1h-3z M2 11h2v1H2z M6 11h3v1H6z M11 11h3v1h-3z M3 12h2v1H3z M10 12h3v1h-3z M4 13h8v1H4z M6 14h4v1H6z"/></svg>
152
+ <span class="brand-name">ZenTao CLI</span>
153
+ </div>
154
+ <div class="preferences">
155
+ <div class="preference">
156
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><ellipse cx="12" cy="12" rx="4" ry="9"/><path d="M3 12h18"/></svg>
157
+ <select id="language" data-i18n-label="language" aria-label="${Y("language")}" title="${Y("language")}"><option value="zh-CN" lang="zh-CN">简体中文</option><option value="zh-TW" lang="zh-TW">繁體中文</option><option value="en" lang="en">English</option></select>
158
+ </div>
159
+ <div class="preference">
160
+ <svg class="theme-system" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="13" rx="2"/><path d="M12 17v4m-4 0h8"/></svg>
161
+ <svg class="theme-light" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M2 12h2m16 0h2M5 5l1.5 1.5m11 11L19 19M5 19l1.5-1.5m11-11L19 5"/></svg>
162
+ <svg class="theme-dark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20.5 13A9 9 0 0 1 11 3.5 9 9 0 1 0 20.5 13Z"/></svg>
163
+ <select id="theme" data-i18n-label="theme" aria-label="${Y("theme")}" title="${Y("theme")}"><option value="system" data-i18n="system">${Y("system")}</option><option value="light" data-i18n="light">${Y("light")}</option><option value="dark" data-i18n="dark">${Y("dark")}</option></select>
164
+ </div>
165
+ </div>
166
+ </header>
167
+ <section class="content" aria-labelledby="title">
168
+ <h1 id="title">${Y("title")}</h1>
169
+ <p class="intro" id="intro">${$(T.message??nT["zh-CN"].intro)}</p>
170
+ ${T.insecure?`<p class="notice insecure" data-i18n="insecureNotice">${Y("insecureNotice")}</p>`:""}
171
+ <form id="login-form" method="post" action="/login">
172
+ <fieldset id="fields" disabled>
173
+ <div class="field">
174
+ <label for="server" data-i18n="server">${Y("server")}</label>
175
+ <input id="server" name="server" type="url" autocomplete="url" inputmode="url" spellcheck="false" required placeholder="https://zentao.example.com" value="${$(T.server??"")}" aria-describedby="server-hint http-notice">
176
+ <p class="hint" id="server-hint" data-i18n="serverHint">${Y("serverHint")}</p>
177
+ <p class="notice" id="http-notice" data-i18n="httpNotice" hidden>${Y("httpNotice")}</p>
178
+ </div>
179
+ <div class="field">
180
+ <label for="account" data-i18n="account">${Y("account")}</label>
181
+ <input id="account" name="username" type="text" autocomplete="username" autocapitalize="none" spellcheck="false" required value="${$(T.account??"")}">
182
+ </div>
183
+ <div class="field">
184
+ <label for="password" data-i18n="password">${Y("password")}</label>
185
+ <input id="password" name="password" type="password" autocomplete="current-password" required>
186
+ </div>
187
+ <div class="actions">
188
+ <button class="primary" id="submit" type="submit">${Y("submit")}</button>
189
+ <button class="secondary" id="cancel" type="button">${Y("cancel")}</button>
190
+ </div>
191
+ </fieldset>
192
+ </form>
193
+ <noscript><p class="notice">${Y("noScript")} / Please enable JavaScript and restart login from ZenTao CLI.</p></noscript>
194
+ <p class="feedback" id="feedback" role="status" aria-live="polite" tabindex="-1" hidden></p>
195
+ <p class="privacy" id="privacy" data-i18n="privacy">${Y("privacy")}</p>
196
+ </section>
197
+ </main>
198
+ <footer>
199
+ <span>ZenTao CLI v${$(r())}</span>
200
+ <a href="https://www.zentao.net/" target="_blank" rel="noopener noreferrer" data-i18n="website" data-i18n-label="websiteLabel" aria-label="${Y("websiteLabel")}">${Y("website")}</a>
201
+ <a href="https://github.com/easysoft/zentao-cli" target="_blank" rel="noopener noreferrer" data-i18n-label="githubLabel" aria-label="${Y("githubLabel")}">GitHub</a>
202
+ </footer>
203
+ </div>
204
+ <script nonce="${$(T.nonce)}">
205
+ (() => {
206
+ const messages = ${JSON.stringify(nT).replace(/</g,"\\u003c")};
207
+ let sessionKey = location.hash.slice(1);
208
+ history.replaceState(null, '', location.pathname);
209
+ const form = document.getElementById('login-form');
210
+ const fields = document.getElementById('fields');
211
+ const server = document.getElementById('server');
212
+ const account = document.getElementById('account');
213
+ const password = document.getElementById('password');
214
+ const submit = document.getElementById('submit');
215
+ const cancel = document.getElementById('cancel');
216
+ const feedback = document.getElementById('feedback');
217
+ const language = document.getElementById('language');
218
+ const theme = document.getElementById('theme');
219
+ const intro = document.getElementById('intro');
220
+ const customMessage = ${T.message!==void 0} ? intro.textContent : null;
221
+ let locale;
222
+ try { locale = localStorage.getItem('zentao-login-language'); } catch {}
223
+ if (!Object.hasOwn(messages, locale)) {
224
+ locale = (navigator.languages || [navigator.language]).map(value => {
225
+ if (/^zh(?:-|$)/i.test(value)) return /^zh-(?:TW|HK|MO|Hant)(?:-|$)/i.test(value) ? 'zh-TW' : 'zh-CN';
226
+ if (/^en(?:-|$)/i.test(value)) return 'en';
227
+ }).find(Boolean) || 'en';
228
+ }
229
+ language.value = locale;
230
+ theme.value = document.documentElement.dataset.theme || 'system';
231
+ let stage = 'login';
232
+ let pending = '';
233
+ let feedbackState;
234
+ const translate = (key, args = {}) => messages[locale][key].replace(/{(account|server)}/g, (_, name) => args[name] ?? '');
235
+
236
+ function render() {
237
+ document.documentElement.lang = locale;
238
+ document.querySelectorAll('[data-i18n]').forEach(el => { el.textContent = translate(el.dataset.i18n); });
239
+ document.querySelectorAll('[data-i18n-label]').forEach(el => { el.setAttribute('aria-label', translate(el.dataset.i18nLabel)); });
240
+ language.setAttribute('title', translate('language') + ': ' + locale);
241
+ theme.setAttribute('title', translate('theme') + ': ' + translate(theme.value));
242
+ const title = translate(stage === 'login' ? 'title' : stage === 'success' ? 'successTitle' : 'cancelTitle');
243
+ document.getElementById('title').textContent = title;
244
+ document.title = title + ' · ZenTao CLI';
245
+ intro.textContent = stage === 'login' ? (customMessage ?? translate('intro')) : translate('finishedIntro');
246
+ submit.textContent = translate(pending === 'submit' ? 'submitting' : 'submit');
247
+ cancel.textContent = translate(pending === 'cancel' ? 'cancelling' : 'cancel');
248
+ if (feedbackState) feedback.textContent = translate(feedbackState.key, feedbackState.args);
249
+ }
250
+ function savePreference(name, value) {
251
+ try { localStorage.setItem('zentao-login-' + name, value); } catch {}
252
+ }
253
+ language.addEventListener('change', () => {
254
+ if (!Object.hasOwn(messages, language.value)) return;
255
+ locale = language.value;
256
+ savePreference('language', locale);
257
+ render();
258
+ });
259
+ theme.addEventListener('change', () => {
260
+ document.documentElement.dataset.theme = theme.value;
261
+ savePreference('theme', theme.value);
262
+ render();
263
+ });
264
+ render();
265
+
266
+ function showFeedback(key, state, args) {
267
+ feedbackState = { key, args };
268
+ feedback.className = 'feedback ' + state;
269
+ feedback.hidden = false;
270
+ render();
271
+ }
272
+ function finish(nextStage, messageKey, args) {
273
+ stage = nextStage;
274
+ password.value = '';
275
+ sessionKey = '';
276
+ form.hidden = true;
277
+ document.getElementById('privacy').hidden = true;
278
+ showFeedback(messageKey, 'success', args);
279
+ feedback.focus();
280
+ }
281
+ async function request(path, body) {
282
+ const response = await fetch(path, {
283
+ method: 'POST', mode: 'same-origin', credentials: 'omit', cache: 'no-store', redirect: 'error',
284
+ headers: { 'Content-Type': 'application/json', 'X-Zentao-Login': sessionKey },
285
+ body: JSON.stringify(body),
286
+ });
287
+ const result = await response.json();
288
+ if (!response.ok || !result.ok) {
289
+ throw new Error(Object.hasOwn(messages[locale], result.errorCode) ? result.errorCode : 'requestFailed');
290
+ }
291
+ return result;
292
+ }
293
+ function updateHttpNotice() {
294
+ document.getElementById('http-notice').hidden = !server.value.trim().toLowerCase().startsWith('http://');
295
+ }
296
+ server.addEventListener('input', updateHttpNotice);
297
+ updateHttpNotice();
298
+ if (!sessionKey) {
299
+ showFeedback('expired', 'error');
300
+ return;
301
+ }
302
+ fields.disabled = false;
303
+ (server.value ? (account.value ? password : account) : server).focus();
304
+ form.addEventListener('submit', async (event) => {
305
+ event.preventDefault();
306
+ if (fields.disabled) return;
307
+ fields.disabled = true;
308
+ form.setAttribute('aria-busy', 'true');
309
+ pending = 'submit';
310
+ feedback.hidden = true;
311
+ render();
312
+ try {
313
+ const result = await request('/login', { server: server.value.trim(), account: account.value.trim(), password: password.value });
314
+ finish('success', 'successMessage', { account: result.account, server: result.server });
315
+ } catch (error) {
316
+ password.value = '';
317
+ showFeedback(Object.hasOwn(messages[locale], error.message) ? error.message : 'connectionFailed', 'error');
318
+ fields.disabled = false;
319
+ password.focus();
320
+ } finally {
321
+ pending = '';
322
+ render();
323
+ form.removeAttribute('aria-busy');
324
+ }
325
+ });
326
+ cancel.addEventListener('click', async () => {
327
+ if (fields.disabled) return;
328
+ password.value = '';
329
+ fields.disabled = true;
330
+ pending = 'cancel';
331
+ render();
332
+ try {
333
+ await request('/cancel', {});
334
+ finish('cancel', 'cancelMessage');
335
+ } catch {
336
+ showFeedback('cancelFailed', 'error');
337
+ fields.disabled = false;
338
+ } finally {
339
+ pending = '';
340
+ render();
341
+ }
342
+ });
343
+ })();
344
+ </script>
345
+ </body>
346
+ </html>`}c();z();function G5(T){switch(T instanceof R?T.code:""){case"1003":case"1004":return{errorCode:"invalidCredentials",error:"用户名或密码不正确,请检查后重试。"};case"1002":return{errorCode:"unreachable",error:"无法连接禅道,请检查地址和网络连接。"};case"5001":return{errorCode:"timeout",error:"连接禅道超时,请检查网络后重试。"};case"5002":return{errorCode:"certificate",error:"禅道的 HTTPS 证书验证失败,请联系管理员检查证书。"};case"2011":case"2012":return{errorCode:"invalidService",error:"无法识别禅道服务,请填写禅道站点根地址。"};default:return{errorCode:"loginFailed",error:"登录或保存失败,请检查禅道地址、账号及本地配置文件权限后重试。"}}}async function F5(T={}){let $=K9(32).toString("hex"),Y=K9(18).toString("base64"),Q=new AbortController,X=new Set,J="",H=!1,W=!1,B,U,V,L=new Promise((G,K)=>{U=G,V=K});L.catch(()=>{});let F=R5({requestTimeout:30000,headersTimeout:1e4},(G,K)=>{K.setHeader("Cache-Control","no-store"),K.setHeader("Referrer-Policy","no-referrer"),K.setHeader("X-Content-Type-Options","nosniff"),K.setHeader("Connection","close"),K.setHeader("Content-Security-Policy",`default-src 'none'; script-src 'nonce-${Y}'; style-src 'nonce-${Y}'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'`),Z(G,K).catch(()=>{if(!K.headersSent)_(K,500,{errorCode:"requestFailed",error:"请求处理失败,请重试。"});else K.destroy()})});F.on("connection",(G)=>{X.add(G),G.once("close",()=>X.delete(G))});function I(G,K){if(H)return;if(H=!0,clearTimeout(B),Q.abort(),process.removeListener("SIGINT",w),process.removeListener("SIGTERM",w),F.close(),setTimeout(()=>{for(let h of X)h.destroy()},250).unref(),G)V(G);else U(K)}function w(){I(new R("E1008"))}function _(G,K,x){G.writeHead(K,{"Content-Type":"application/json; charset=utf-8"}),G.end(JSON.stringify(x))}async function Z(G,K){if(G.headers.host!==new URL(J).host){_(K,403,{errorCode:"localOnly",error:"仅允许本机登录请求。"});return}if(H){_(K,410,{errorCode:"expired",error:"登录页面已失效,请重新发起登录。"});return}if(G.method==="GET"&&G.url==="/"){K.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),K.end(F9({nonce:Y,server:T.server,account:T.account,message:T.message,insecure:T.insecure}));return}if(G.method!=="POST"||!["/login","/cancel"].includes(G.url??"")){_(K,404,{errorCode:"notFound",error:"页面不存在。"});return}if(G.headers.origin!==J||G.headers["x-zentao-login"]!==$){_(K,403,{errorCode:"invalidSession",error:"登录页面已失效或请求来源不正确,请重新发起登录。"});return}if(G.url==="/cancel"){K.once("finish",w),K.once("close",w),_(K,200,{ok:!0});return}if(G.headers["content-type"]?.split(";")[0].trim().toLowerCase()!=="application/json"){_(K,415,{errorCode:"invalidRequest",error:"请通过登录页面提交信息。"});return}if(W){_(K,409,{errorCode:"busy",error:"正在登录,请稍候。"});return}W=!0;try{let x=[],h=0;for await(let DT of G){if(h+=DT.length,h>16384){_(K,413,{errorCode:"tooLarge",error:"登录信息过长,请检查输入。"});return}x.push(Buffer.from(DT))}let M;try{M=JSON.parse(Buffer.concat(x).toString("utf8"))}catch{_(K,400,{errorCode:"invalidJson",error:"登录信息格式不正确。"});return}if(!M||typeof M.server!=="string"||typeof M.account!=="string"||typeof M.password!=="string"||!M.server.trim()||!M.account.trim()||!M.password){_(K,400,{errorCode:"required",error:"请填写禅道地址、用户名和密码。"});return}let N;try{N=new URL(M.server.trim())}catch{_(K,400,{errorCode:"invalidUrl",error:"请填写完整的禅道地址,例如 https://zentao.example.com。"});return}if(!["http:","https:"].includes(N.protocol)||N.username||N.password||N.search||N.hash){_(K,400,{errorCode:"unsafeUrl",error:"请填写 HTTP 或 HTTPS 站点根地址,不要包含账号、密码、查询参数或锚点。"});return}let i=g(N.toString()),e=M.account.trim(),n=RT(e,i),bT=await FT(i,e,M.password,{...T,signal:Q.signal});if(H)return;let s=$T(i,e,bT.token,bT.serverConfig,bT.user,n);jT(s),_(K,200,{ok:!0,account:e,server:i}),I(void 0,s)}catch(x){if(!H)_(K,400,G5(x))}finally{W=!1}}try{await new Promise((G,K)=>{F.once("error",K),F.listen(0,"127.0.0.1",()=>{F.removeListener("error",K),G()})})}catch{throw F.close(),new R("E1010")}return J=`http://127.0.0.1:${F.address().port}`,F.on("error",()=>I(new R("E1010"))),process.once("SIGINT",w),process.once("SIGTERM",w),B=setTimeout(()=>I(new R("E1009")),T.waitTimeoutMs??300000),{url:`${J}/#${$}`,result:L,cancel:w}}async function I9(T={}){let $=await F5(T);if(process.stderr.write(`请在运行 CLI 的本机浏览器中完成登录(5 分钟内有效):
347
+ ${$.url}
348
+ `),T.open!==!1&&!await G9($.url)){if(T.fallbackToTerminal){$.cancel();try{return await $.result}catch(Y){if(!(Y instanceof R)||Y.code!=="1008")throw Y}process.stderr.write(`未能自动打开浏览器,已关闭临时页面,改用终端登录。
349
+ `);return}process.stderr.write(`未能自动打开浏览器,请手动打开上面的链接。
350
+ `)}return $.result}function Z9(T){T.command("login").description("登录禅道服务").option("-s, --server <url>","禅道服务地址").option("-u, --user <account>","用户名").option("-p, --password <password>","密码").option("-t, --token <token>","Token").option("--useEnv","强制使用环境变量登录").option("--web","通过本机浏览器页面登录").option("--message <text>","自定义浏览器登录页面的副标题提示语").option("--no-browser","使用终端交互登录,不打开浏览器").action(async($)=>{let Y=T.opts();if($.web&&($.browser===!1||$.useEnv||$.password!==void 0||$.token!==void 0))throw new R("E2009",{option:"--web",reason:"不能与 --no-browser、--useEnv、--password 或 --token 同时使用"});let Q=$.server&&$.user&&($.password||$.token);if(!$.useEnv&&!Q&&($.password!==void 0||$.token!==void 0))throw new R("E1001");let X=R9();if($.web||!$.useEnv&&!Q&&$.browser!==!1&&X){let L=await I9({server:$.server,account:$.user,message:$.message,insecure:Y.insecure,timeout:Y.timeout,open:X,fallbackToTerminal:!$.web&&Boolean(process.stdin.isTTY)});if(L){if(!Y.silent)console.log(`登录成功: ${j(L.account,L.server)}`);return}}let J,H,W,B;if($.useEnv){let L=KT();if(!L.url||!L.account||!L.password&&!L.token)throw new R("E1001");J=L.url,H=L.account,W=L.password??"",B=L.token??""}else if(Q)J=$.server,H=$.user,W=$.password??"",B=$.token??"";else{if(!process.stdin.isTTY)throw new R("E1006");let L=await V9();J=L.url,H=L.account,W=L.password,B=L.token}if(!J||!H||!W&&!B)throw new R("E1001");J=g(J);let U=RT(H,J),V;if(B){let L=a(J,B,{insecure:Y.insecure,timeout:Y.timeout}),{serverConfig:F,user:I}=await V0(L,H);V=$T(J,H,B,F,I,U)}else{let L=await FT(J,H,W,{insecure:Y.insecure,timeout:Y.timeout});V=$T(J,H,L.token,L.serverConfig,L.user,U)}if(jT(V),!Y.silent)console.log(`登录成功: ${j(H,J)}`)})}c();z();function _9(T){T.command("logout").description("退出当前用户登录").argument("[profileKey]","要退出的用户配置(格式:account@server)").action(($)=>{let Y=T.opts(),Q;if($)Q=$;else{let J=u();if(!J){console.log("未找到当前用户配置,请先使用 `zentao login` 登录");return}Q=j(J.account,J.server)}if(!o0(Q))throw new R("E1007");if(!Y.silent)console.log(`已退出: ${Q}`)})}c();ZT();z();function w9(T){T.command("profile").description("查看或切换用户配置").argument("[profileKey]","要切换到的用户配置(格式:account@server,例如 admin@https://zentao.example.com)").option("--effective","显示业务命令实际使用的认证来源(不验证凭据)").action(($,Y)=>{let Q=T.opts();if(Y.effective){if($)throw new R("E2009",{option:"--effective",reason:"不能与切换账号同时使用"});let B=G0(),U={status:"success",source:B.source,server:B.server,account:B.account,credentialType:B.token?"token":"password",configFile:B.source==="profile"?$9():null,verified:!1};if(Q.format==="json"||Q.format==="raw")console.log(JSON.stringify(U,null,4));else console.log(PT([`* 认证来源: ${U.source==="environment"?"环境变量":"本地 Profile"}`,`* 禅道地址: ${U.server}`,`* 账号: ${U.account}`,`* 凭据类型: ${U.credentialType==="token"?"Token":"密码"}`,`* 配置文件: ${U.configFile??"未使用"}`,"* 凭据尚未进行网络验证"].join(`
351
+ `)));return}if($){if(!e0($))throw new R("E1007");if(!Q.silent)console.log(PT(`已切换到: \`${$}\``));return}let X=pT();if(X.length===0)throw new R("E1006");let J=u(),H=J?j(J.account,J.server):"";if(Q.format==="json"||Q.format==="raw"){console.log(JSON.stringify({status:"success",currentProfile:H,profiles:X.map((B)=>({key:j(B.account,B.server),server:B.server,account:B.account,current:j(B.account,B.server)===H}))},null,4));return}let W=X.map((B)=>{let U=j(B.account,B.server),V=[U];if(B.serverConfig)V.push(` (${B.serverConfig.version.toUpperCase()})`);if(U===H)V.push(" **[当前]**");return`* ${V.join("")}`});console.log(PT(W.join(`
352
+ `)))})}c();dT();z();var K5=new Set(["insecure","htmlToMarkdown","batchFailFast","silent","jsonPretty"]);function kT(T,$){throw new R("E2004",{field:T,value:$})}function I5(T,$){if(T==="defaultOutputFormat")return["markdown","json","raw"].includes($)?$:kT(T,$);if(K5.has(T)){if($==="true")return!0;if($==="false")return!1;return kT(T,$)}if(T==="timeout"||T==="defaultRecPerPage"){let Y=Number($);return Number.isInteger(Y)&&Y>0&&(T!=="defaultRecPerPage"||Y<=1000)?Y:kT(T,$)}if(T==="pagers"){try{let Y=JSON.parse($);if(Y&&typeof Y==="object"&&!Array.isArray(Y)&&Object.values(Y).every((Q)=>typeof Q==="number"&&Number.isInteger(Q)&&Q>0&&Q<=1000))return Y}catch{}return kT(T,$)}return kT(T,$)}function z9(T){let $=T.command("config").description("管理用户配置");$.command("get").description("查看配置").argument("[key]","配置项名称").action((Y)=>{let Q=T.opts(),X=u();if(!X)throw new R("E1006");let J=t(X);if(Y){if(!Y0.includes(Y))throw new R("E2004",{field:Y,value:""});let H=J[Y];if(Q.format==="json"||Q.format==="raw")console.log(k({[Y]:H}));else console.log(typeof H==="object"?k(H):String(H));return}if(Q.format==="json"||Q.format==="raw")console.log(k(J));else for(let[H,W]of Object.entries(J))console.log(`${H}: ${JSON.stringify(W)}`)}),$.command("set").description("设置配置").argument("<key>","配置项名称").argument("<value>","配置值").action((Y,Q)=>{let X=T.opts(),J=u();if(!J)throw new R("E1006");if(!Y0.includes(Y))throw new R("E2004",{field:Y,value:Q});let H=I5(Y,Q);if(T9(J,Y,H),!X.silent)console.log(`已设置 ${Y} = ${JSON.stringify(H)}`)})}c();IT();function q9(T){T.command("version").description("显示版本信息").action(()=>{let $=T.opts(),Y=r();if($.format==="json"||$.format==="raw"){let X={cli:`zentao-cli ${Y}`},J=u();if(J)X.server=J.server;console.log(JSON.stringify(X,null,4));return}console.log(`Zentao CLI: ${Y}`);let Q=u();if(Q)console.log(`Zentao Server: ${Q.serverConfig?.version?Q.serverConfig.version.toUpperCase():"Unknown"} (${Q.server})`)})}import{mkdirSync as a5,writeFileSync as r5}from"node:fs";import{dirname as h9,join as o5}from"node:path";import{createInterface as e5}from"node:readline/promises";z();import{cpSync as Z5,existsSync as K0,mkdirSync as _5,statSync as O9,writeFileSync as w5}from"node:fs";import{homedir as l}from"node:os";import{dirname as b9,isAbsolute as z5,join as y,relative as q5,resolve as F0,sep as O5}from"node:path";import{fileURLToPath as b5}from"node:url";import{createInterface as D5}from"node:readline/promises";var D9=["zentao-cli","zentao-tour"],sT={"claude-code":{label:"Claude Code",dir:y(l(),".claude","skills")},cursor:{label:"Cursor",dir:y(l(),".cursor","skills")},"cherry-studio":{label:"Cherry Studio",dir:y(l(),".cherrystudio","skills")},codex:{label:"Codex",dir:y(l(),".agents","skills")},opencode:{label:"OpenCode",dir:y(l(),".config","opencode","skills")},vscode:{label:"VS Code",dir:y(l(),".copilot","skills")},antigravity:{label:"Antigravity",dir:y(l(),".gemini","antigravity","skills")},gemini:{label:"Gemini",dir:y(l(),".gemini","skills")}},p=Object.keys(sT);function M9(T){let $=b5(import.meta.url),Y=b9($),Q=[y(Y,"..","..","skills",T),y(Y,"..","skills",T),y(Y,"..","..","..","skills",T)];for(let X of Q)if(K0(X))return{type:"directory",path:X};throw Error(`找不到技能源目录,已尝试路径:
353
+ ${Q.map((X)=>` - ${X}`).join(`
354
+ `)}
355
+ `+"请确认 zentao-cli 安装完整,或从源码目录运行。")}function C9(T){let $=l();return T.startsWith($)?T.replace($,"~"):T}async function M5(){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error(`未指定 agent,请在交互终端中选择,或显式传入: ${p.join("|")}|all`);let T=[...p,"all"],$=[...p.map((Q)=>sT[Q].label),"全部安装"],Y=D5({input:process.stdin,output:process.stderr});process.stderr.write(`请选择要安装的 AI Agent:
356
+ `),$.forEach((Q,X)=>{process.stderr.write(` ${X+1}) ${Q}
357
+ `)});try{let Q=await Y.question(`请输入编号 (1-${T.length}): `),X=Number(Q.trim());if(!Number.isInteger(X)||X<1||X>T.length)throw Error(`无效选择: ${Q||"(empty)"}`);let J=T[X-1];return J==="all"?[...p]:[J]}finally{Y.close()}}function C5(T){let $=T.toLowerCase();if($==="all")return[...p];if(sT[$])return[$];throw Error(`不支持的 agent: ${T}
358
+ 可用选项: ${p.join("、")}、all`)}function S5(T,$){let Y=q5(F0(T),F0($)),Q=".."+O5;if(Y===""||!z5(Y)&&Y!==".."&&!Y.startsWith(Q))throw Error("技能目标路径不能是技能源目录或其子目录: "+$)}function S9(T,$){if(T.type==="directory")S5(T.path,$);if(K0($)&&!O9($).isDirectory())throw Error(`技能目标路径必须是目录: ${$}`)}function x9(T,$){if(S9(T,$),T.type==="directory"){Z5(T.path,$,{recursive:!0,dereference:!0});return}for(let[Y,Q]of Object.entries(T.files)){let X=y($,Y);_5(b9(X),{recursive:!0}),w5(X,Buffer.from(Q,"base64"))}}function x5(T){let $=T.trim();if(!$)throw Error("导出路径不能为空");let Y=$==="~"?l():$.replace(/^~[\\/]/,`${l()}/`),Q=F0(Y);if(K0(Q)&&!O9(Q).isDirectory())throw Error(`导出路径必须是目录: ${Q}`);return Q}function j5(T,$,Y){let Q=sT[T],X=M9($),J=y(Q.dir,$);if(x9(X,J),!Y)console.log(`已安装 ${$} 技能到 ${Q.label}: ${C9(J)}`)}function N5(T,$){let Y=x5(T),Q=D9.map((X)=>({skillName:X,source:M9(X),destDir:y(Y,X)}));for(let{source:X,destDir:J}of Q)S9(X,J);for(let{skillName:X,source:J,destDir:H}of Q)if(x9(J,H),!$)console.log(`已导出 ${X} 技能到: ${C9(H)}`)}function j9(T){T.command("add-skill").description("安装禅道 CLI 技能到 AI Agent,或导出至指定目录").argument("[agent]",`目标 Agent (${p.join("|")}|all)`).option("-o, --output <path>","将所有内置技能导出到指定目录").action(async($,Y={})=>{let X=!!T.opts().silent;if(Y.output!==void 0){if($)throw Error("不能同时指定 agent 和 --output;导出技能请使用: zentao add-skill --output <path>");N5(Y.output,X);return}let J=$?C5($):await M5();for(let H of J)for(let W of D9)j5(H,W,X)})}ZT();z();import{chmodSync as N9,existsSync as I0,mkdirSync as P5,readFileSync as y9,renameSync as A5,unlinkSync as y5,writeFileSync as E5}from"node:fs";import{homedir as k5}from"node:os";import{dirname as v5,join as v}from"node:path";import{createInterface as h5}from"node:readline/promises";import{parseTOML as P9}from"toml-eslint-parser";var _T="zentao-cli",E=k5();function A9(...T){switch(process.platform){case"darwin":return v(E,"Library","Application Support",...T);case"win32":return v(process.env.APPDATA||v(E,"AppData","Roaming"),...T);default:return v(E,".config",...T)}}var tT={cursor:{label:"Cursor",configPath:v(E,".cursor","mcp.json"),format:"mcpServers"},"claude-desktop":{label:"Claude Desktop",configPath:A9("Claude","claude_desktop_config.json"),format:"mcpServers"},"claude-code":{label:"Claude Code",configPath:v(E,".claude.json"),format:"mcpServers"},windsurf:{label:"Windsurf",configPath:v(E,".codeium","windsurf","mcp_config.json"),format:"mcpServers"},cline:{label:"Cline",configPath:v(E,".cline","data","settings","cline_mcp_settings.json"),format:"mcpServers"},trae:{label:"Trae",configPath:v(E,".trae","mcp.json"),format:"mcpServers"},vscode:{label:"VS Code",configPath:A9("Code","User","mcp.json"),format:"vscode"},"cherry-studio":{label:"Cherry Studio",configPath:"",format:"cherry-studio"},opencode:{label:"OpenCode",configPath:v(E,".config","opencode","opencode.json"),format:"opencode"},codex:{label:"Codex",configPath:v(E,".codex","config.toml"),format:"codex"},antigravity:{label:"Antigravity",configPath:v(E,".gemini","antigravity","mcp_config.json"),format:"mcpServers"},gemini:{label:"Gemini",configPath:v(E,".gemini","mcp_config.json"),format:"mcpServers"}},m=Object.keys(tT);function f5(T){return T.startsWith(E)?T.replace(E,"~"):T}function Z0(T){if(!I0(T))return{};let $=y9(T,"utf-8").trim();if(!$)return{};try{let Y=JSON.parse($);if(!Y||typeof Y!=="object"||Array.isArray(Y))throw Error("Config root must be an object");return Y}catch{throw Error(`无法安全更新包含注释或无效 JSON 的配置文件,请手动配置: ${T}`)}}function _0(T,$,Y){let Q=T;for(let X=0;X<$.length-1;X++){let J=$[X];if(!Q[J]||typeof Q[J]!=="object"||Array.isArray(Q[J]))Q[J]={};Q=Q[J]}Q[$[$.length-1]]=Y}function w0(T,$){E9(T,JSON.stringify($,null,2)+`
359
+ `)}function E9(T,$){P5(v5(T),{recursive:!0,mode:448});let Y=`${T}.${process.pid}.tmp`;try{if(E5(Y,$,{encoding:"utf-8",mode:384}),process.platform!=="win32")N9(Y,384);if(A5(Y,T),process.platform!=="win32")N9(T,384)}catch(Q){if(I0(Y))y5(Y);throw Q}}async function g5(T){let{profile:$}=await o(T);return{url:$.server,account:$.account,token:$.token}}async function u5(){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error(`未指定 agent,请在交互终端中选择,或显式传入: ${m.join("|")}|all`);let T=[...m,"all"],$=[...m.map((Q)=>tT[Q].label),"全部配置"],Y=h5({input:process.stdin,output:process.stderr});process.stderr.write(`请选择要配置的 AI Agent:
360
+ `),$.forEach((Q,X)=>{let J=String(X+1).padStart(2);process.stderr.write(` ${J}) ${Q}
361
+ `)});try{let Q=await Y.question(`请输入编号 (1-${T.length}): `),X=Number(Q.trim());if(!Number.isInteger(X)||X<1||X>T.length)throw Error(`无效选择: ${Q||"(empty)"}`);let J=T[X-1];return J==="all"?[...m]:[J]}finally{Y.close()}}function c5(T){let $=T.toLowerCase();if($==="all")return[...m];if(tT[$])return[$];throw Error(`不支持的 agent: ${T}
362
+ 可用选项: ${m.join("、")}、all`)}function k9(T){return{command:"zentao",args:["mcp"],env:{ZENTAO_URL:T.url,ZENTAO_ACCOUNT:T.account,ZENTAO_TOKEN:T.token}}}function d5(T,$){let Y=Z0(T);_0(Y,["mcpServers",_T],k9($)),w0(T,Y)}function l5(T,$){let Y=Z0(T);_0(Y,["servers",_T],{type:"stdio",...k9($)}),w0(T,Y)}function p5(T,$){let Y=Z0(T);_0(Y,["mcp",_T],{type:"local",command:["zentao","mcp"],environment:{ZENTAO_URL:$.url,ZENTAO_ACCOUNT:$.account,ZENTAO_TOKEN:$.token},enabled:!0}),w0(T,Y)}function m5(T,$){let Y=T.lastIndexOf(`
363
+ `,$.range[0]-1)+1,Q=T.indexOf(`
364
+ `,$.range[1]);return[Y,Q<0?T.length:Q+1]}function i5(T,$,Y){let J=P9(T).body[0].body.filter((W)=>W.type==="TOMLTable"&&W.resolvedKey[0]==="mcp_servers"&&W.resolvedKey[1]===_T).map((W)=>m5(T,W)),H=T;if(J.length>0)for(let W=J.length-1;W>=0;W--){let[B,U]=J[W];H=H.slice(0,B)+(W===0?$:"")+H.slice(U)}else{let W=!T||T.endsWith(Y+Y)?"":T.endsWith(`
365
+ `)?Y:Y+Y;H=T+W+$}return P9(H),H}function n5(T,$){try{let Y=I0(T)?y9(T,"utf-8"):"",Q=Y.match(/\r?\n/)?.[0]??`
366
+ `,X=[`[mcp_servers.${_T}]`,'command = "zentao"','args = ["mcp"]',`env = { ZENTAO_URL = ${JSON.stringify($.url)}, ZENTAO_ACCOUNT = ${JSON.stringify($.account)}, ZENTAO_TOKEN = ${JSON.stringify($.token)} }`].join(Q)+Q;E9(T,i5(Y,X,Q))}catch{throw new R("E1005",{path:T})}}function s5(T){if(T)return;process.stderr.write(`
367
+ Cherry Studio 不支持文件配置,请在 Settings > MCP Server 中手动添加(运行时复用当前登录):
368
+
369
+ `),console.log(JSON.stringify({name:_T,type:"stdio",command:"zentao",args:["mcp"]},null,2))}function t5(T,$,Y){let Q=tT[T];switch(Q.format){case"mcpServers":d5(Q.configPath,$);break;case"vscode":l5(Q.configPath,$);break;case"opencode":p5(Q.configPath,$);break;case"codex":n5(Q.configPath,$);break;case"cherry-studio":s5(Y);return}if(!Y)console.log(`已配置 MCP 到 ${Q.label}: ${f5(Q.configPath)}`)}function v9(T){T.command("add-mcp").description("配置禅道 MCP 服务到 AI Agent").argument("[agent]",`目标 Agent (${m.join("|")}|all)`).action(async($)=>{let Y=T.opts(),Q=!!Y.silent,X=$?c5($):await u5(),J=await g5({insecure:Y.insecure,timeout:Y.timeout});for(let H of X)t5(H,J,Q)})}c();var z0=["get","set"];function q0(T){return[...new Set(T.commands.flatMap(($)=>[$.name(),...$.aliases()]))].sort().join(" ")}function O0(T){return T.createHelp().visibleOptions(T).flatMap(($)=>[$.short,$.long].filter(Boolean))}function b0(T){return T.commands.flatMap(($)=>{let Y=d($.name());return Y?[{names:[$.name(),...$.aliases()],actions:["help","props",...Y.actions.map((Q)=>Q.name)]}]:[]})}function T2(T,$="zentao"){let Y=q0(T),Q=O0(T);return`# bash completion for ${$}
125
370
  _${$}_completion() {
126
371
  local cur prev words cword
127
372
  _init_completion -n : || return
128
373
 
129
- local root_commands="${D}"
130
- local config_subcommands="${NB.join(" ")}"
131
- local workspace_subcommands="${RB.join(" ")}"
132
- local common_options="${sS.join(" ")}"
374
+ local root_commands="${Y}"
375
+ local config_subcommands="${z0.join(" ")}"
376
+ local common_options="${Q.join(" ")}"
133
377
 
134
378
  if [[ \${cword} -eq 1 ]]; then
135
379
  COMPREPLY=( $(compgen -W "\${root_commands} \${common_options}" -- "\${cur}") )
@@ -137,15 +381,20 @@ _${$}_completion() {
137
381
  fi
138
382
 
139
383
  case "\${words[1]}" in
384
+ ${b0(T).map(({names:X,actions:J})=>` ${X.join("|")})
385
+ if [[ \${cword} -eq 2 ]]; then
386
+ COMPREPLY=( $(compgen -W "${J.join(" ")} \${common_options}" -- "\${cur}") )
387
+ else
388
+ COMPREPLY=( $(compgen -W "\${common_options}" -- "\${cur}") )
389
+ fi
390
+ ;;`).join(`
391
+ `)}
140
392
  config)
141
393
  COMPREPLY=( $(compgen -W "\${config_subcommands} \${common_options}" -- "\${cur}") )
142
394
  ;;
143
- workspace)
144
- COMPREPLY=( $(compgen -W "\${workspace_subcommands} \${common_options}" -- "\${cur}") )
145
- ;;
146
395
  ls|get|create|update|delete|do)
147
396
  if [[ \${cword} -eq 2 ]]; then
148
- COMPREPLY=( $(compgen -W "${wD().join(" ")}" -- "\${cur}") )
397
+ COMPREPLY=( $(compgen -W "${UT().join(" ")}" -- "\${cur}") )
149
398
  else
150
399
  COMPREPLY=( $(compgen -W "\${common_options}" -- "\${cur}") )
151
400
  fi
@@ -154,10 +403,14 @@ _${$}_completion() {
154
403
  COMPREPLY=( $(compgen -W "bash zsh fish" -- "\${cur}") )
155
404
  ;;
156
405
  add-skill)
157
- COMPREPLY=( $(compgen -W "claude-code cursor codex opencode vscode all" -- "\${cur}") )
406
+ if [[ "\${prev}" == "--output" || "\${prev}" == "-o" ]]; then
407
+ COMPREPLY=( $(compgen -d -- "\${cur}") )
408
+ else
409
+ COMPREPLY=( $(compgen -W "${[...p,"all","--output","-o"].join(" ")}" -- "\${cur}") )
410
+ fi
158
411
  ;;
159
412
  add-mcp)
160
- COMPREPLY=( $(compgen -W "cursor claude-desktop claude-code windsurf cline trae vscode cherry-studio opencode codex all" -- "\${cur}") )
413
+ COMPREPLY=( $(compgen -W "${[...m,"all"].join(" ")}" -- "\${cur}") )
161
414
  ;;
162
415
  *)
163
416
  COMPREPLY=( $(compgen -W "\${common_options}" -- "\${cur}") )
@@ -166,13 +419,13 @@ _${$}_completion() {
166
419
  }
167
420
 
168
421
  complete -F _${$}_completion ${$}
169
- `}function Ri($="zentao"){let D=EB(),X=wD().join(" ");return`#compdef ${$}
422
+ `}function $2(T,$="zentao"){let Y=q0(T),Q=UT().join(" "),X=O0(T);return`#compdef ${$}
170
423
 
171
424
  _${$}() {
172
425
  local -a root_commands modules common_opts
173
- root_commands=(${D})
174
- modules=(${X})
175
- common_opts=(${sS.join(" ")})
426
+ root_commands=(${Y})
427
+ modules=(${Q})
428
+ common_opts=(${X.join(" ")})
176
429
 
177
430
  if (( CURRENT == 2 )); then
178
431
  _describe 'command' root_commands
@@ -180,11 +433,16 @@ _${$}() {
180
433
  fi
181
434
 
182
435
  case "$words[2]" in
436
+ ${b0(T).map(({names:J,actions:H})=>` ${J.join("|")})
437
+ if (( CURRENT == 3 )); then
438
+ _values 'action' ${H.map((W)=>`'${W}'`).join(" ")}
439
+ else
440
+ _describe 'option' common_opts
441
+ fi
442
+ ;;`).join(`
443
+ `)}
183
444
  config)
184
- _values 'config command' ${NB.map((G)=>`'${G}'`).join(" ")}
185
- ;;
186
- workspace)
187
- _values 'workspace command' ${RB.map((G)=>`'${G}'`).join(" ")}
445
+ _values 'config command' ${z0.map((J)=>`'${J}'`).join(" ")}
188
446
  ;;
189
447
  ls|get|create|update|delete|do)
190
448
  if (( CURRENT == 3 )); then
@@ -197,10 +455,12 @@ _${$}() {
197
455
  _values 'shell' 'bash' 'zsh' 'fish'
198
456
  ;;
199
457
  add-skill)
200
- _values 'agent' 'claude-code' 'cursor' 'codex' 'opencode' 'vscode' 'all'
458
+ _arguments \\
459
+ '(-o --output)'{-o,--output}'[将所有内置技能导出到指定目录]:目录:_files -/' \\
460
+ '1:agent:(${[...p,"all"].join(" ")})'
201
461
  ;;
202
462
  add-mcp)
203
- _values 'agent' 'cursor' 'claude-desktop' 'claude-code' 'windsurf' 'cline' 'trae' 'vscode' 'cherry-studio' 'opencode' 'codex' 'all'
463
+ _values 'agent' ${[...m,"all"].map((J)=>`'${J}'`).join(" ")}
204
464
  ;;
205
465
  *)
206
466
  _describe 'option' common_opts
@@ -209,159 +469,40 @@ _${$}() {
209
469
  }
210
470
 
211
471
  compdef _${$} ${$}
212
- `}function Ei($="zentao"){let D=EB(),X=wD().join(" ");return`# fish completion for ${$}
213
- set -l __${$}_cmds ${D}
214
- set -l __${$}_mods ${X}
472
+ `}function Y2(T,$="zentao"){let Y=q0(T),Q=UT().join(" "),X=O0(T).join(" ");return`# fish completion for ${$}
473
+ set -l __${$}_cmds ${Y}
474
+ set -l __${$}_mods ${Q}
215
475
 
216
476
  complete -c ${$} -f
217
477
  complete -c ${$} -n "__fish_use_subcommand" -a "$__${$}_cmds"
478
+ complete -c ${$} -a "${X}"
218
479
 
219
- complete -c ${$} -n "__fish_seen_subcommand_from config" -a "${NB.join(" ")}"
220
- complete -c ${$} -n "__fish_seen_subcommand_from workspace" -a "${RB.join(" ")}"
221
- complete -c ${$} -n "__fish_seen_subcommand_from autocomplete" -a "bash zsh fish"
222
- complete -c ${$} -n "__fish_seen_subcommand_from add-skill" -a "claude-code cursor codex opencode vscode all"
223
- complete -c ${$} -n "__fish_seen_subcommand_from add-mcp" -a "cursor claude-desktop claude-code windsurf cline trae vscode cherry-studio opencode codex all"
224
- complete -c ${$} -n "__fish_seen_subcommand_from ls get create update delete do; and test (count (commandline -opc)) -eq 2" -a "$__${$}_mods"
225
- `}function Zi($){switch($){case"bash":return Ni();case"zsh":return Ri();case"fish":return Ei();default:throw Error(`不支持的 shell: ${$}`)}}function Ti($){return aS(tS(),".config","zentao",`.zentao-completion.${$}`)}async function vi(){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error("未提供 shell 参数,请在交互终端中选择,或显式传入 bash|zsh|fish");let $=["zsh","bash","fish"],D=Pi({input:process.stdin,output:process.stderr});return process.stderr.write(`请选择要生成的自动补全脚本:
226
- `),$.forEach((X,G)=>{process.stderr.write(` ${G+1}) ${X}
227
- `)}),new Promise((X,G)=>{D.question("请输入编号 (1-3): ",(J)=>{D.close();let Y=Number(J.trim());if(!Number.isInteger(Y)||Y<1||Y>$.length){G(Error(`无效选择: ${J||"(empty)"}`));return}X($[Y-1])})})}function eS($){$.command("autocomplete").description("生成 shell 自动补全脚本").argument("[shell]","shell 类型 (bash|zsh|fish)").action(async(D)=>{let X=D??await vi(),G=X.toLowerCase();if(!["bash","zsh","fish"].includes(G))console.error(`不支持的 shell: ${X},仅支持 bash、zsh、fish`),process.exit(1);let J=Zi(G),Y=Ti(G),Q=aS(tS(),".config","zentao");Mi(Q,{recursive:!0}),Si(Y,J,"utf-8"),console.log(`自动补全脚本已保存到: ${Y}`),console.log(`请在终端配置中追加: source ${Y}`)})}import{existsSync as ki,mkdirSync as Ci,readFileSync as yi,readdirSync as gi,statSync as xi,writeFileSync as hi}from"node:fs";import{homedir as o4}from"node:os";import{dirname as ui,join as F1}from"node:path";import{fileURLToPath as fi}from"node:url";import{createInterface as mi}from"node:readline";var ci=["zentao-cli","zentao-tour"],jY={"claude-code":{label:"Claude Code",dir:F1(o4(),".claude","skills")},cursor:{label:"Cursor",dir:F1(o4(),".cursor","skills")},"cherry-studio":{label:"Cherry Studio",dir:F1(o4(),".cherrystudio","skills")},codex:{label:"Codex",dir:F1(o4(),".agents","skills")},opencode:{label:"OpenCode",dir:F1(o4(),".config","opencode","skills")},vscode:{label:"VS Code",dir:F1(o4(),".copilot","skills")},antigravity:{label:"Antigravity",dir:F1(o4(),".gemini","antigravity","skills")},gemini:{label:"Gemini",dir:F1(o4(),".gemini","skills")}},ED=Object.keys(jY);function li($){let D=fi(import.meta.url),X=ui(D),G=[F1(X,"..","..","skills",$),F1(X,"..","skills",$),F1(X,"..","..","..","skills",$)];for(let J of G)if(ki(J))return J;throw Error(`找不到技能源目录,已尝试路径:
228
- ${G.map((J)=>` - ${J}`).join(`
480
+ ${b0(T).map(({names:J,actions:H})=>`complete -c ${$} -n "__fish_seen_subcommand_from ${J.join(" ")}; and test (count (commandline -opc)) -eq 2" -a "${H.join(" ")}"`).join(`
229
481
  `)}
230
- `+"请确认 zentao-cli 安装完整,或从源码目录运行。")}function ii($){let D=o4();return $.startsWith(D)?$.replace(D,"~"):$}async function pi(){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error(`未指定 agent,请在交互终端中选择,或显式传入: ${ED.join("|")}|all`);let $=[...ED,"all"],D=[...ED.map((G)=>jY[G].label),"全部安装"],X=mi({input:process.stdin,output:process.stderr});return process.stderr.write(`请选择要安装的 AI Agent:
231
- `),D.forEach((G,J)=>{process.stderr.write(` ${J+1}) ${G}
232
- `)}),new Promise((G,J)=>{X.question(`请输入编号 (1-${$.length}): `,(Y)=>{X.close();let Q=Number(Y.trim());if(!Number.isInteger(Q)||Q<1||Q>$.length){J(Error(`无效选择: ${Y||"(empty)"}`));return}let W=$[Q-1];G(W==="all"?[...ED]:[W])})})}function ri($){let D=$.toLowerCase();if(D==="all")return[...ED];if(jY[D])return[D];throw Error(`不支持的 agent: ${$}
233
- 可用选项: ${ED.join("、")}、all`)}function $P($,D){Ci(D,{recursive:!0});for(let X of gi($)){let G=F1($,X),J=F1(D,X);if(xi(G).isDirectory())$P(G,J);else hi(J,yi(G))}}function ni($,D,X){let G=jY[$],J=li(D),Y=F1(G.dir,D);if($P(J,Y),!X)console.log(`已安装 ${D} 技能到 ${G.label}: ${ii(Y)}`)}function DP($){$.command("add-skill").description("安装禅道 CLI 技能到 AI Agent").argument("[agent]",`目标 Agent (${ED.join("|")}|all)`).action(async(D)=>{let G=!!$.opts().silent;try{let J=D?ri(D):await pi();for(let Y of J)for(let Q of ci)ni(Y,Q,G)}catch(J){console.error(String(J.message??J)),process.exit(1)}})}import{existsSync as JP,mkdirSync as GP,readFileSync as YP,writeFileSync as QP}from"node:fs";import{homedir as di}from"node:os";import{dirname as WP,join as k1}from"node:path";import{createInterface as IP}from"node:readline";var f9="zentao-cli",b1=di();function XP(...$){switch(process.platform){case"darwin":return k1(b1,"Library","Application Support",...$);case"win32":return k1(process.env.APPDATA||k1(b1,"AppData","Roaming"),...$);default:return k1(b1,".config",...$)}}var AY={cursor:{label:"Cursor",configPath:k1(b1,".cursor","mcp.json"),format:"mcpServers"},"claude-desktop":{label:"Claude Desktop",configPath:XP("Claude","claude_desktop_config.json"),format:"mcpServers"},"claude-code":{label:"Claude Code",configPath:k1(b1,".claude","settings.json"),format:"mcpServers"},windsurf:{label:"Windsurf",configPath:k1(b1,".codeium","windsurf","mcp_config.json"),format:"mcpServers"},cline:{label:"Cline",configPath:k1(b1,".cline","data","settings","cline_mcp_settings.json"),format:"mcpServers"},trae:{label:"Trae",configPath:k1(b1,".trae","mcp.json"),format:"mcpServers"},vscode:{label:"VS Code",configPath:XP("Code","User","mcp.json"),format:"vscode"},"cherry-studio":{label:"Cherry Studio",configPath:"",format:"cherry-studio"},opencode:{label:"OpenCode",configPath:k1(b1,".config","opencode","opencode.json"),format:"opencode"},codex:{label:"Codex",configPath:k1(b1,".codex","config.toml"),format:"codex"},antigravity:{label:"Antigravity",configPath:k1(b1,".gemini","antigravity","mcp_config.json"),format:"mcpServers"},gemini:{label:"Gemini",configPath:k1(b1,".gemini","mcp_config.json"),format:"mcpServers"}},ZD=Object.keys(AY);function oi($){return $.startsWith(b1)?$.replace(b1,"~"):$}function ti($){let D="",X=0,G=!1;while(X<$.length){if(G){if($[X]==="\\"){D+=$[X]+($[X+1]??""),X+=2;continue}if($[X]==='"')G=!1;D+=$[X++];continue}if($[X]==='"'){G=!0,D+=$[X++];continue}if($[X]==="/"&&$[X+1]==="/"){while(X<$.length&&$[X]!==`
234
- `)X++;continue}if($[X]==="/"&&$[X+1]==="*"){X+=2;while(X<$.length&&!($[X]==="*"&&$[X+1]==="/"))X++;X+=2;continue}D+=$[X++]}return D.replace(/,(\s*[}\]])/g,"$1")}function MY($,D=!1){if(!JP($))return{};let X=YP($,"utf-8").trim();if(!X)return{};if(D)X=ti(X);try{return JSON.parse(X)}catch{if(!D)return MY($,!0);throw Error(`无法解析配置文件: ${$}`)}}function TB($,D,X){let G=$;for(let J=0;J<D.length-1;J++){let Y=D[J];if(!G[Y]||typeof G[Y]!=="object"||Array.isArray(G[Y]))G[Y]={};G=G[Y]}G[D[D.length-1]]=X}function vB($,D){GP(WP($),{recursive:!0}),QP($,JSON.stringify(D,null,2)+`
235
- `,"utf-8")}function ZB($){return $.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}async function ai(){let $=W6();if(!$)throw Error("未登录禅道,请先运行 zentao login");let{server:D,account:X}=$;if(process.env.ZENTAO_PASSWORD)return{url:D,account:X,password:process.env.ZENTAO_PASSWORD};if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error("非交互模式下请设置 ZENTAO_PASSWORD 环境变量");let G=IP({input:process.stdin,output:process.stderr});return new Promise((J,Y)=>{G.question(`请输入禅道密码 [${X}@${D}]: `,(Q)=>{if(G.close(),!Q.trim()){Y(Error("密码不能为空"));return}J({url:D,account:X,password:Q.trim()})})})}async function si(){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error(`未指定 agent,请在交互终端中选择,或显式传入: ${ZD.join("|")}|all`);let $=[...ZD,"all"],D=[...ZD.map((G)=>AY[G].label),"全部配置"],X=IP({input:process.stdin,output:process.stderr});return process.stderr.write(`请选择要配置的 AI Agent:
236
- `),D.forEach((G,J)=>{let Y=String(J+1).padStart(2);process.stderr.write(` ${Y}) ${G}
237
- `)}),new Promise((G,J)=>{X.question(`请输入编号 (1-${$.length}): `,(Y)=>{X.close();let Q=Number(Y.trim());if(!Number.isInteger(Q)||Q<1||Q>$.length){J(Error(`无效选择: ${Y||"(empty)"}`));return}let W=$[Q-1];G(W==="all"?[...ZD]:[W])})})}function ei($){let D=$.toLowerCase();if(D==="all")return[...ZD];if(AY[D])return[D];throw Error(`不支持的 agent: ${$}
238
- 可用选项: ${ZD.join("、")}、all`)}function kB($){return{command:"npx",args:["-y","zentao-cli","mcp"],env:{ZENTAO_URL:$.url,ZENTAO_ACCOUNT:$.account,ZENTAO_PASSWORD:$.password}}}function $p($,D){let X=MY($);TB(X,["mcpServers",f9],kB(D)),vB($,X)}function Dp($,D){let X=MY($,!0);TB(X,["servers",f9],{type:"stdio",...kB(D)}),vB($,X)}function Xp($,D){let X=MY($);TB(X,["mcp",f9],{type:"local",command:["npx","-y","zentao-cli","mcp"],env:{ZENTAO_URL:D.url,ZENTAO_ACCOUNT:D.account,ZENTAO_PASSWORD:D.password},enabled:!0}),vB($,X)}function Jp($,D){GP(WP($),{recursive:!0});let X=JP($)?YP($,"utf-8"):"",G=`[mcp_servers.${f9}]`,J=[G,'command = "npx"','args = ["-y", "zentao-cli", "mcp"]',`env = { ZENTAO_URL = "${ZB(D.url)}", ZENTAO_ACCOUNT = "${ZB(D.account)}", ZENTAO_PASSWORD = "${ZB(D.password)}" }`].join(`
239
- `)+`
240
- `,Y=X.indexOf(G);if(Y>=0){let Q=X.indexOf(`
241
- [`,Y+G.length);if(Q<0)X=X.substring(0,Y)+J;else X=X.substring(0,Y)+J+X.substring(Q)}else{let Q=X.trimEnd();X=(Q?Q+`
242
-
243
- `:"")+J}QP($,X,"utf-8")}function Gp($,D){if(D)return;let X=kB($);process.stderr.write(`
244
- Cherry Studio 不支持文件配置,请在 Settings > MCP Server 中手动添加:
245
-
246
- `),console.log(JSON.stringify({name:f9,type:"stdio",...X},null,2))}function Yp($,D,X){let G=AY[$];switch(G.format){case"mcpServers":$p(G.configPath,D);break;case"vscode":Dp(G.configPath,D);break;case"opencode":Xp(G.configPath,D);break;case"codex":Jp(G.configPath,D);break;case"cherry-studio":Gp(D,X);return}if(!X)console.log(`已配置 MCP 到 ${G.label}: ${oi(G.configPath)}`)}function UP($){$.command("add-mcp").description("配置禅道 MCP 服务到 AI Agent").argument("[agent]",`目标 Agent (${ZD.join("|")}|all)`).action(async(D)=>{let G=!!$.opts().silent;try{let J=D?ei(D):await si(),Y=await ai();for(let Q of J)Yp(Q,Y,G)}catch(J){console.error(String(J.message??J)),process.exit(1)}})}async function CX($){let D=W6();if(D?.token){let G=Z0(D),J={insecure:$?.insecure??G.insecure,timeout:$?.timeout??G.timeout};return D.lastUsedTime=new Date().toISOString(),I4(D),{client:v0(D.server,D.token,J),profile:D}}let X=FY();if(X.url&&X.account&&(!D||D.account===X.account&&D.server===X.url)){if(X.token){let G={insecure:$?.insecure,timeout:$?.timeout},J=X.url.replace(/\/+$/,""),Y=VY(X.account,J),Q=TX(X.url,X.account,X.token,void 0,void 0,Y);return I4(Q),{client:v0(X.url,X.token,G),profile:Q}}if(X.password){let G={insecure:$?.insecure,timeout:$?.timeout},J=await OY(X.url,X.account,X.password,G),Y=TX(X.url,X.account,J.token,void 0,J.user);return I4(Y),{client:v0(X.url,J.token,G),profile:Y}}}throw new c("E1006")}function SY($){let D=$.options;if(!D||typeof D!=="string")return $;try{let X=JSON.parse(D);if(!X||typeof X!=="object"||Array.isArray(X))return $;let G={...X};for(let[J,Y]of Object.entries($))if(Y!==void 0)G[J]=Y;return G}catch{return $}}function k0($){return $.option("--pick <fields>","摘取指定字段(逗号分隔)").option("--filter <expr>","过滤条件",BP,[]).option("--sort <expr>","排序条件").option("--search <keywords>","搜索关键词",BP,[]).option("--search-fields <fields>","搜索字段(逗号分隔)").option("--page <number>","页码").option("--recPerPage <number>","每页条数").option("--all","获取全部数据").option("--limit <number>","限制获取数量").option("--data <json>","JSON 数据").option("--params <json>","API 调用参数").option("--options <json>","API 调用选项").option("--yes","跳过确认").option("--silent","静默模式").option("--batch-fail-fast","批量操作出错时停止").option("--id <id>","对象 ID").option("--product <id>","产品 ID").option("--project <id>","项目 ID").option("--execution <id>","执行 ID").option("--productID <id>","产品 ID").option("--projectID <id>","项目 ID").option("--executionID <id>","执行 ID")}function BP($,D){return D.concat([$])}var zP=["login","logout","profile","config","workspace","version","help","ls","list","get","create","update","delete","do","autocomplete","mcp","add-mcp","add-skill"],Qp={productplan:"plan"};function qP($){for(let D of wD()){if(zP.includes(D))continue;let X=BX(D),G=W9(X),J=G.length>0?` | 操作: ${G.join(", ")}`:"",Y=$.command(D).description(`${X.display??D}模块${J}`).argument("[args...]","参数").allowUnknownOption(!0).helpOption(!1),Q=Qp[D];if(Q){if(zP.includes(Q))throw Error(`Alias "${Q}" for module "${D}" conflicts with a built-in command`);Y.alias(Q)}k0(Y),Y.action(async(W,I)=>{let U=$.opts(),B=SY({...U,...I});try{let H=W.findIndex((P)=>P==="--help"||P==="-h");if(H!==-1){W.splice(H,1);let P=W.filter((e$)=>!e$.startsWith("-"));if(P.length===0){kX(X);return}let Z=P[0],g={ls:"list"}[Z]??Z,o$=new Set(["list","get","create","update","delete"]).has(g)?t6(X,g):t6(X,"action",Z);if(o$){h9(X,o$);return}kX(X);return}let{client:V,profile:z}=await CX({insecure:B.insecure,timeout:B.timeout}),L=W.shift();if(L==="help"){kX(X);return}let F=L,b=L?.split(",").map((P)=>+P.trim());if(b?.length&&b.every((P)=>!isNaN(P)))B.id=b.join(","),F="get";else if(F===void 0)F="list";else if(F.startsWith("-"))W.unshift(F),F="list";if(W[0]==="help"){let Z={ls:"list"}[F]??F,g=new Set(["list","get","create","update","delete"]).has(Z)?t6(X,Z):t6(X,"action",F);if(g){h9(X,g);return}kX(X);return}await u9(V,X,F,W,z,B)}catch(H){if(H instanceof c)console.log(vX(H,B.format??"markdown")),process.exit(1);throw H}})}}function HP($){let D=$.command("ls").alias("list").description("获取对象列表").argument("<module>","模块名称,例如 bug").argument("[args...]","参数");k0(D),D.allowUnknownOption(!0),D.action(async(W,I,U)=>{await yX($,W,"list",U,I)});let X=$.command("get").description("获取单个对象").argument("<module>","模块名称,例如 bug").argument("<id>","对象 ID");k0(X),X.action(async(W,I,U)=>{U.id=I,await yX($,W,"get",{id:I,...U})});let G=$.command("create").description("创建对象").argument("<module>","模块名称,例如 bug").argument("[args...]","参数");k0(G),G.allowUnknownOption(!0),G.action(async(W,I,U)=>{await yX($,W,"create",U,I)});let J=$.command("update").description("更新对象").argument("<module>","模块名称,例如 bug").argument("[args...]","--id 和其他参数");k0(J),J.allowUnknownOption(!0),J.action(async(W,I,U)=>{await yX($,W,"update",U,I)});let Y=$.command("delete").description("删除对象").argument("<module>","模块名称,例如 bug").argument("[args...]","--id 和其他参数");k0(Y),Y.allowUnknownOption(!0),Y.action(async(W,I,U)=>{await yX($,W,"delete",U,I)});let Q=$.command("do").description("执行对象操作").argument("<module>","模块名称,例如 bug").argument("<action>","操作名称,例如 resolve").argument("[args...]","--id 和其他参数");k0(Q),Q.allowUnknownOption(!0),Q.action(async(W,I,U,B)=>{await yX($,W,I,B,U)})}async function yX($,D,X,G,J=[]){let Y=BX(D);if(!Y)throw new c("E2001",{module:D});let Q=$.opts(),W=SY({...Q,...G});try{let{client:I,profile:U}=await CX({insecure:Q.insecure,timeout:Q.timeout}),B=J[0];if(B&&!isNaN(Number(B)))W.id=B,J.shift();await u9(I,Y,X,J,U,W)}catch(I){if(I instanceof c)console.log(vX(I,W.format??"markdown")),process.exit(1);throw I}}var P$;(function($){$.assertEqual=(J)=>{};function D(J){}$.assertIs=D;function X(J){throw Error()}$.assertNever=X,$.arrayToEnum=(J)=>{let Y={};for(let Q of J)Y[Q]=Q;return Y},$.getValidEnumValues=(J)=>{let Y=$.objectKeys(J).filter((W)=>typeof J[J[W]]!=="number"),Q={};for(let W of Y)Q[W]=J[W];return $.objectValues(Q)},$.objectValues=(J)=>{return $.objectKeys(J).map(function(Y){return J[Y]})},$.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Y=[];for(let Q in J)if(Object.prototype.hasOwnProperty.call(J,Q))Y.push(Q);return Y},$.find=(J,Y)=>{for(let Q of J)if(Y(Q))return Q;return},$.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function G(J,Y=" | "){return J.map((Q)=>typeof Q==="string"?`'${Q}'`:Q).join(Y)}$.joinValues=G,$.jsonStringifyReplacer=(J,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(P$||(P$={}));var KP;(function($){$.mergeShapes=(D,X)=>{return{...D,...X}}})(KP||(KP={}));var f=P$.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),t4=($)=>{switch(typeof $){case"undefined":return f.undefined;case"string":return f.string;case"number":return Number.isNaN($)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":if(Array.isArray($))return f.array;if($===null)return f.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return f.promise;if(typeof Map<"u"&&$ instanceof Map)return f.map;if(typeof Set<"u"&&$ instanceof Set)return f.set;if(typeof Date<"u"&&$ instanceof Date)return f.date;return f.object;default:return f.unknown}};var C=P$.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"]);class C1 extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(X)=>{this.issues=[...this.issues,X]},this.addIssues=(X=[])=>{this.issues=[...this.issues,...X]};let D=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,D);else this.__proto__=D;this.name="ZodError",this.issues=$}format($){let D=$||function(J){return J.message},X={_errors:[]},G=(J)=>{for(let Y of J.issues)if(Y.code==="invalid_union")Y.unionErrors.map(G);else if(Y.code==="invalid_return_type")G(Y.returnTypeError);else if(Y.code==="invalid_arguments")G(Y.argumentsError);else if(Y.path.length===0)X._errors.push(D(Y));else{let Q=X,W=0;while(W<Y.path.length){let I=Y.path[W];if(W!==Y.path.length-1)Q[I]=Q[I]||{_errors:[]};else Q[I]=Q[I]||{_errors:[]},Q[I]._errors.push(D(Y));Q=Q[I],W++}}};return G(this),X}static assert($){if(!($ instanceof C1))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,P$.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(D)=>D.message){let D=Object.create(null),X=[];for(let G of this.issues)if(G.path.length>0){let J=G.path[0];D[J]=D[J]||[],D[J].push($(G))}else X.push($(G));return{formErrors:X,fieldErrors:D}}get formErrors(){return this.flatten()}}C1.create=($)=>{return new C1($)};var Wp=($,D)=>{let X;switch($.code){case C.invalid_type:if($.received===f.undefined)X="Required";else X=`Expected ${$.expected}, received ${$.received}`;break;case C.invalid_literal:X=`Invalid literal value, expected ${JSON.stringify($.expected,P$.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:X=`Unrecognized key(s) in object: ${P$.joinValues($.keys,", ")}`;break;case C.invalid_union:X="Invalid input";break;case C.invalid_union_discriminator:X=`Invalid discriminator value. Expected ${P$.joinValues($.options)}`;break;case C.invalid_enum_value:X=`Invalid enum value. Expected ${P$.joinValues($.options)}, received '${$.received}'`;break;case C.invalid_arguments:X="Invalid function arguments";break;case C.invalid_return_type:X="Invalid function return type";break;case C.invalid_date:X="Invalid date";break;case C.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(X=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")X=`${X} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)X=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)X=`Invalid input: must end with "${$.validation.endsWith}"`;else P$.assertNever($.validation);else if($.validation!=="regex")X=`Invalid ${$.validation}`;else X="Invalid";break;case C.too_small:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else X="Invalid input";break;case C.too_big:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")X=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else X="Invalid input";break;case C.custom:X="Invalid input";break;case C.invalid_intersection_types:X="Intersection results could not be merged";break;case C.not_multiple_of:X=`Number must be a multiple of ${$.multipleOf}`;break;case C.not_finite:X="Number must be finite";break;default:X=D.defaultError,P$.assertNever($)}return{message:X}},C0=Wp;var Ip=C0;function m9(){return Ip}var PY=($)=>{let{data:D,path:X,errorMaps:G,issueData:J}=$,Y=[...X,...J.path||[]],Q={...J,path:Y};if(J.message!==void 0)return{...J,path:Y,message:J.message};let W="",I=G.filter((U)=>!!U).slice().reverse();for(let U of I)W=U(Q,{data:D,defaultError:W}).message;return{...J,path:Y,message:W}};function l($,D){let X=m9(),G=PY({issueData:D,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,X,X===C0?void 0:C0].filter((J)=>!!J)});$.common.issues.push(G)}class X1{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,D){let X=[];for(let G of D){if(G.status==="aborted")return U$;if(G.status==="dirty")$.dirty();X.push(G.value)}return{status:$.value,value:X}}static async mergeObjectAsync($,D){let X=[];for(let G of D){let J=await G.key,Y=await G.value;X.push({key:J,value:Y})}return X1.mergeObjectSync($,X)}static mergeObjectSync($,D){let X={};for(let G of D){let{key:J,value:Y}=G;if(J.status==="aborted")return U$;if(Y.status==="aborted")return U$;if(J.status==="dirty")$.dirty();if(Y.status==="dirty")$.dirty();if(J.value!=="__proto__"&&(typeof Y.value<"u"||G.alwaysSet))X[J.value]=Y.value}return{status:$.value,value:X}}}var U$=Object.freeze({status:"aborted"}),gX=($)=>({status:"dirty",value:$}),Q1=($)=>({status:"valid",value:$}),CB=($)=>$.status==="aborted",yB=($)=>$.status==="dirty",TD=($)=>$.status==="valid",c9=($)=>typeof Promise<"u"&&$ instanceof Promise;var o;(function($){$.errToObj=(D)=>typeof D==="string"?{message:D}:D||{},$.toString=(D)=>typeof D==="string"?D:D?.message})(o||(o={}));class B4{constructor($,D,X,G){this._cachedPath=[],this.parent=$,this.data=D,this._path=X,this._key=G}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var VP=($,D)=>{if(TD(D))return{success:!0,data:D.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let X=new C1($.common.issues);return this._error=X,this._error}}}};function K$($){if(!$)return{};let{errorMap:D,invalid_type_error:X,required_error:G,description:J}=$;if(D&&(X||G))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(D)return{errorMap:D,description:J};return{errorMap:(Q,W)=>{let{message:I}=$;if(Q.code==="invalid_enum_value")return{message:I??W.defaultError};if(typeof W.data>"u")return{message:I??G??W.defaultError};if(Q.code!=="invalid_type")return{message:W.defaultError};return{message:I??X??W.defaultError}},description:J}}class j${get description(){return this._def.description}_getType($){return t4($.data)}_getOrReturnCtx($,D){return D||{common:$.parent.common,data:$.data,parsedType:t4($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new X1,ctx:{common:$.parent.common,data:$.data,parsedType:t4($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let D=this._parse($);if(c9(D))throw Error("Synchronous parse encountered promise.");return D}_parseAsync($){let D=this._parse($);return Promise.resolve(D)}parse($,D){let X=this.safeParse($,D);if(X.success)return X.data;throw X.error}safeParse($,D){let X={common:{issues:[],async:D?.async??!1,contextualErrorMap:D?.errorMap},path:D?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:t4($)},G=this._parseSync({data:$,path:X.path,parent:X});return VP(X,G)}"~validate"($){let D={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:t4($)};if(!this["~standard"].async)try{let X=this._parseSync({data:$,path:[],parent:D});return TD(X)?{value:X.value}:{issues:D.common.issues}}catch(X){if(X?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;D.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:D}).then((X)=>TD(X)?{value:X.value}:{issues:D.common.issues})}async parseAsync($,D){let X=await this.safeParseAsync($,D);if(X.success)return X.data;throw X.error}async safeParseAsync($,D){let X={common:{issues:[],contextualErrorMap:D?.errorMap,async:!0},path:D?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:t4($)},G=this._parse({data:$,path:X.path,parent:X}),J=await(c9(G)?G:Promise.resolve(G));return VP(X,J)}refine($,D){let X=(G)=>{if(typeof D==="string"||typeof D>"u")return{message:D};else if(typeof D==="function")return D(G);else return D};return this._refinement((G,J)=>{let Y=$(G),Q=()=>J.addIssue({code:C.custom,...X(G)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((W)=>{if(!W)return Q(),!1;else return!0});if(!Y)return Q(),!1;else return!0})}refinement($,D){return this._refinement((X,G)=>{if(!$(X))return G.addIssue(typeof D==="function"?D(X,G):D),!1;else return!0})}_refinement($){return new k4({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,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:(D)=>this["~validate"](D)}}optional(){return v4.create(this,this._def)}nullable(){return y0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return T4.create(this)}promise(){return mX.create(this,this._def)}or($){return n9.create([this,$],this._def)}and($){return d9.create(this,$,this._def)}transform($){return new k4({...K$(this._def),schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:$}})}default($){let D=typeof $==="function"?$:()=>$;return new s9({...K$(this._def),innerType:this,defaultValue:D,typeName:h.ZodDefault})}brand(){return new uB({typeName:h.ZodBranded,type:this,...K$(this._def)})}catch($){let D=typeof $==="function"?$:()=>$;return new e9({...K$(this._def),innerType:this,catchValue:D,typeName:h.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return kY.create(this,$)}readonly(){return $8.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var Up=/^c[^\s-]{8,}$/i,Bp=/^[0-9a-z]+$/,zp=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qp=/^[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,Hp=/^[a-z0-9_-]{21}$/i,Kp=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Vp=/^[-+]?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)?)??$/,wp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Lp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gB,Op=/^(?:(?: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])$/,Fp=/^(?:(?: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])$/,bp=/^(([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]))$/,jp=/^(([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])$/,Ap=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mp=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wP="((\\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])))",Sp=new RegExp(`^${wP}$`);function LP($){let D="[0-5]\\d";if($.precision)D=`${D}\\.\\d{${$.precision}}`;else if($.precision==null)D=`${D}(\\.\\d+)?`;let X=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${D})${X}`}function Pp($){return new RegExp(`^${LP($)}$`)}function _p($){let D=`${wP}T${LP($)}`,X=[];if(X.push($.local?"Z?":"Z"),$.offset)X.push("([+-]\\d{2}:?\\d{2})");return D=`${D}(${X.join("|")})`,new RegExp(`^${D}$`)}function Np($,D){if((D==="v4"||!D)&&Op.test($))return!0;if((D==="v6"||!D)&&bp.test($))return!0;return!1}function Rp($,D){if(!Kp.test($))return!1;try{let[X]=$.split(".");if(!X)return!1;let G=X.replace(/-/g,"+").replace(/_/g,"/").padEnd(X.length+(4-X.length%4)%4,"="),J=JSON.parse(atob(G));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(D&&J.alg!==D)return!1;return!0}catch{return!1}}function Ep($,D){if((D==="v4"||!D)&&Fp.test($))return!0;if((D==="v6"||!D)&&jp.test($))return!0;return!1}class s4 extends j${_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==f.string){let J=this._getOrReturnCtx($);return l(J,{code:C.invalid_type,expected:f.string,received:J.parsedType}),U$}let X=new X1,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.length<J.value)G=this._getOrReturnCtx($,G),l(G,{code:C.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="max"){if($.data.length>J.value)G=this._getOrReturnCtx($,G),l(G,{code:C.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="length"){let Y=$.data.length>J.value,Q=$.data.length<J.value;if(Y||Q){if(G=this._getOrReturnCtx($,G),Y)l(G,{code:C.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(Q)l(G,{code:C.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});X.dirty()}}else if(J.kind==="email"){if(!wp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"email",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="emoji"){if(!gB)gB=new RegExp(Lp,"u");if(!gB.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"emoji",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="uuid"){if(!qp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"uuid",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="nanoid"){if(!Hp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"nanoid",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid"){if(!Up.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"cuid",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid2"){if(!Bp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"cuid2",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ulid"){if(!zp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"ulid",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="url")try{new URL($.data)}catch{G=this._getOrReturnCtx($,G),l(G,{validation:"url",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"regex",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="trim")$.data=$.data.trim();else if(J.kind==="includes"){if(!$.data.includes(J.value,J.position))G=this._getOrReturnCtx($,G),l(G,{code:C.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),X.dirty()}else if(J.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(J.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(J.kind==="startsWith"){if(!$.data.startsWith(J.value))G=this._getOrReturnCtx($,G),l(G,{code:C.invalid_string,validation:{startsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="endsWith"){if(!$.data.endsWith(J.value))G=this._getOrReturnCtx($,G),l(G,{code:C.invalid_string,validation:{endsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="datetime"){if(!_p(J).test($.data))G=this._getOrReturnCtx($,G),l(G,{code:C.invalid_string,validation:"datetime",message:J.message}),X.dirty()}else if(J.kind==="date"){if(!Sp.test($.data))G=this._getOrReturnCtx($,G),l(G,{code:C.invalid_string,validation:"date",message:J.message}),X.dirty()}else if(J.kind==="time"){if(!Pp(J).test($.data))G=this._getOrReturnCtx($,G),l(G,{code:C.invalid_string,validation:"time",message:J.message}),X.dirty()}else if(J.kind==="duration"){if(!Vp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"duration",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ip"){if(!Np($.data,J.version))G=this._getOrReturnCtx($,G),l(G,{validation:"ip",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="jwt"){if(!Rp($.data,J.alg))G=this._getOrReturnCtx($,G),l(G,{validation:"jwt",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cidr"){if(!Ep($.data,J.version))G=this._getOrReturnCtx($,G),l(G,{validation:"cidr",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64"){if(!Ap.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"base64",code:C.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64url"){if(!Mp.test($.data))G=this._getOrReturnCtx($,G),l(G,{validation:"base64url",code:C.invalid_string,message:J.message}),X.dirty()}else P$.assertNever(J);return{status:X.value,value:$.data}}_regex($,D,X){return this.refinement((G)=>$.test(G),{validation:D,code:C.invalid_string,...o.errToObj(X)})}_addCheck($){return new s4({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...o.errToObj($)})}url($){return this._addCheck({kind:"url",...o.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...o.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...o.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...o.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...o.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...o.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...o.errToObj($)})}base64($){return this._addCheck({kind:"base64",...o.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...o.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...o.errToObj($)})}ip($){return this._addCheck({kind:"ip",...o.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...o.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...o.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...o.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...o.errToObj($)})}regex($,D){return this._addCheck({kind:"regex",regex:$,...o.errToObj(D)})}includes($,D){return this._addCheck({kind:"includes",value:$,position:D?.position,...o.errToObj(D?.message)})}startsWith($,D){return this._addCheck({kind:"startsWith",value:$,...o.errToObj(D)})}endsWith($,D){return this._addCheck({kind:"endsWith",value:$,...o.errToObj(D)})}min($,D){return this._addCheck({kind:"min",value:$,...o.errToObj(D)})}max($,D){return this._addCheck({kind:"max",value:$,...o.errToObj(D)})}length($,D){return this._addCheck({kind:"length",value:$,...o.errToObj(D)})}nonempty($){return this.min(1,o.errToObj($))}trim(){return new s4({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new s4({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new s4({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let D of this._def.checks)if(D.kind==="min"){if($===null||D.value>$)$=D.value}return $}get maxLength(){let $=null;for(let D of this._def.checks)if(D.kind==="max"){if($===null||D.value<$)$=D.value}return $}}s4.create=($)=>{return new s4({checks:[],typeName:h.ZodString,coerce:$?.coerce??!1,...K$($)})};function Zp($,D){let X=($.toString().split(".")[1]||"").length,G=(D.toString().split(".")[1]||"").length,J=X>G?X:G,Y=Number.parseInt($.toFixed(J).replace(".","")),Q=Number.parseInt(D.toFixed(J).replace(".",""));return Y%Q/10**J}class hX extends j${constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==f.number){let J=this._getOrReturnCtx($);return l(J,{code:C.invalid_type,expected:f.number,received:J.parsedType}),U$}let X=void 0,G=new X1;for(let J of this._def.checks)if(J.kind==="int"){if(!P$.isInteger($.data))X=this._getOrReturnCtx($,X),l(X,{code:C.invalid_type,expected:"integer",received:"float",message:J.message}),G.dirty()}else if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),l(X,{code:C.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),l(X,{code:C.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if(Zp($.data,J.value)!==0)X=this._getOrReturnCtx($,X),l(X,{code:C.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else if(J.kind==="finite"){if(!Number.isFinite($.data))X=this._getOrReturnCtx($,X),l(X,{code:C.not_finite,message:J.message}),G.dirty()}else P$.assertNever(J);return{status:G.value,value:$.data}}gte($,D){return this.setLimit("min",$,!0,o.toString(D))}gt($,D){return this.setLimit("min",$,!1,o.toString(D))}lte($,D){return this.setLimit("max",$,!0,o.toString(D))}lt($,D){return this.setLimit("max",$,!1,o.toString(D))}setLimit($,D,X,G){return new hX({...this._def,checks:[...this._def.checks,{kind:$,value:D,inclusive:X,message:o.toString(G)}]})}_addCheck($){return new hX({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:o.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:o.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:o.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:o.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:o.toString($)})}multipleOf($,D){return this._addCheck({kind:"multipleOf",value:$,message:o.toString(D)})}finite($){return this._addCheck({kind:"finite",message:o.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:o.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:o.toString($)})}get minValue(){let $=null;for(let D of this._def.checks)if(D.kind==="min"){if($===null||D.value>$)$=D.value}return $}get maxValue(){let $=null;for(let D of this._def.checks)if(D.kind==="max"){if($===null||D.value<$)$=D.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&P$.isInteger($.value))}get isFinite(){let $=null,D=null;for(let X of this._def.checks)if(X.kind==="finite"||X.kind==="int"||X.kind==="multipleOf")return!0;else if(X.kind==="min"){if(D===null||X.value>D)D=X.value}else if(X.kind==="max"){if($===null||X.value<$)$=X.value}return Number.isFinite(D)&&Number.isFinite($)}}hX.create=($)=>{return new hX({checks:[],typeName:h.ZodNumber,coerce:$?.coerce||!1,...K$($)})};class uX extends j${constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==f.bigint)return this._getInvalidInput($);let X=void 0,G=new X1;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),l(X,{code:C.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),l(X,{code:C.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if($.data%J.value!==BigInt(0))X=this._getOrReturnCtx($,X),l(X,{code:C.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else P$.assertNever(J);return{status:G.value,value:$.data}}_getInvalidInput($){let D=this._getOrReturnCtx($);return l(D,{code:C.invalid_type,expected:f.bigint,received:D.parsedType}),U$}gte($,D){return this.setLimit("min",$,!0,o.toString(D))}gt($,D){return this.setLimit("min",$,!1,o.toString(D))}lte($,D){return this.setLimit("max",$,!0,o.toString(D))}lt($,D){return this.setLimit("max",$,!1,o.toString(D))}setLimit($,D,X,G){return new uX({...this._def,checks:[...this._def.checks,{kind:$,value:D,inclusive:X,message:o.toString(G)}]})}_addCheck($){return new uX({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:o.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:o.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:o.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:o.toString($)})}multipleOf($,D){return this._addCheck({kind:"multipleOf",value:$,message:o.toString(D)})}get minValue(){let $=null;for(let D of this._def.checks)if(D.kind==="min"){if($===null||D.value>$)$=D.value}return $}get maxValue(){let $=null;for(let D of this._def.checks)if(D.kind==="max"){if($===null||D.value<$)$=D.value}return $}}uX.create=($)=>{return new uX({checks:[],typeName:h.ZodBigInt,coerce:$?.coerce??!1,...K$($)})};class _Y extends j${_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==f.boolean){let X=this._getOrReturnCtx($);return l(X,{code:C.invalid_type,expected:f.boolean,received:X.parsedType}),U$}return Q1($.data)}}_Y.create=($)=>{return new _Y({typeName:h.ZodBoolean,coerce:$?.coerce||!1,...K$($)})};class i9 extends j${_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==f.date){let J=this._getOrReturnCtx($);return l(J,{code:C.invalid_type,expected:f.date,received:J.parsedType}),U$}if(Number.isNaN($.data.getTime())){let J=this._getOrReturnCtx($);return l(J,{code:C.invalid_date}),U$}let X=new X1,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.getTime()<J.value)G=this._getOrReturnCtx($,G),l(G,{code:C.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),X.dirty()}else if(J.kind==="max"){if($.data.getTime()>J.value)G=this._getOrReturnCtx($,G),l(G,{code:C.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),X.dirty()}else P$.assertNever(J);return{status:X.value,value:new Date($.data.getTime())}}_addCheck($){return new i9({...this._def,checks:[...this._def.checks,$]})}min($,D){return this._addCheck({kind:"min",value:$.getTime(),message:o.toString(D)})}max($,D){return this._addCheck({kind:"max",value:$.getTime(),message:o.toString(D)})}get minDate(){let $=null;for(let D of this._def.checks)if(D.kind==="min"){if($===null||D.value>$)$=D.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let D of this._def.checks)if(D.kind==="max"){if($===null||D.value<$)$=D.value}return $!=null?new Date($):null}}i9.create=($)=>{return new i9({checks:[],coerce:$?.coerce||!1,typeName:h.ZodDate,...K$($)})};class NY extends j${_parse($){if(this._getType($)!==f.symbol){let X=this._getOrReturnCtx($);return l(X,{code:C.invalid_type,expected:f.symbol,received:X.parsedType}),U$}return Q1($.data)}}NY.create=($)=>{return new NY({typeName:h.ZodSymbol,...K$($)})};class p9 extends j${_parse($){if(this._getType($)!==f.undefined){let X=this._getOrReturnCtx($);return l(X,{code:C.invalid_type,expected:f.undefined,received:X.parsedType}),U$}return Q1($.data)}}p9.create=($)=>{return new p9({typeName:h.ZodUndefined,...K$($)})};class r9 extends j${_parse($){if(this._getType($)!==f.null){let X=this._getOrReturnCtx($);return l(X,{code:C.invalid_type,expected:f.null,received:X.parsedType}),U$}return Q1($.data)}}r9.create=($)=>{return new r9({typeName:h.ZodNull,...K$($)})};class RY extends j${constructor(){super(...arguments);this._any=!0}_parse($){return Q1($.data)}}RY.create=($)=>{return new RY({typeName:h.ZodAny,...K$($)})};class vD extends j${constructor(){super(...arguments);this._unknown=!0}_parse($){return Q1($.data)}}vD.create=($)=>{return new vD({typeName:h.ZodUnknown,...K$($)})};class e4 extends j${_parse($){let D=this._getOrReturnCtx($);return l(D,{code:C.invalid_type,expected:f.never,received:D.parsedType}),U$}}e4.create=($)=>{return new e4({typeName:h.ZodNever,...K$($)})};class EY extends j${_parse($){if(this._getType($)!==f.undefined){let X=this._getOrReturnCtx($);return l(X,{code:C.invalid_type,expected:f.void,received:X.parsedType}),U$}return Q1($.data)}}EY.create=($)=>{return new EY({typeName:h.ZodVoid,...K$($)})};class T4 extends j${_parse($){let{ctx:D,status:X}=this._processInputParams($),G=this._def;if(D.parsedType!==f.array)return l(D,{code:C.invalid_type,expected:f.array,received:D.parsedType}),U$;if(G.exactLength!==null){let Y=D.data.length>G.exactLength.value,Q=D.data.length<G.exactLength.value;if(Y||Q)l(D,{code:Y?C.too_big:C.too_small,minimum:Q?G.exactLength.value:void 0,maximum:Y?G.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:G.exactLength.message}),X.dirty()}if(G.minLength!==null){if(D.data.length<G.minLength.value)l(D,{code:C.too_small,minimum:G.minLength.value,type:"array",inclusive:!0,exact:!1,message:G.minLength.message}),X.dirty()}if(G.maxLength!==null){if(D.data.length>G.maxLength.value)l(D,{code:C.too_big,maximum:G.maxLength.value,type:"array",inclusive:!0,exact:!1,message:G.maxLength.message}),X.dirty()}if(D.common.async)return Promise.all([...D.data].map((Y,Q)=>{return G.type._parseAsync(new B4(D,Y,D.path,Q))})).then((Y)=>{return X1.mergeArray(X,Y)});let J=[...D.data].map((Y,Q)=>{return G.type._parseSync(new B4(D,Y,D.path,Q))});return X1.mergeArray(X,J)}get element(){return this._def.type}min($,D){return new T4({...this._def,minLength:{value:$,message:o.toString(D)}})}max($,D){return new T4({...this._def,maxLength:{value:$,message:o.toString(D)}})}length($,D){return new T4({...this._def,exactLength:{value:$,message:o.toString(D)}})}nonempty($){return this.min(1,$)}}T4.create=($,D)=>{return new T4({type:$,minLength:null,maxLength:null,exactLength:null,typeName:h.ZodArray,...K$(D)})};function xX($){if($ instanceof P6){let D={};for(let X in $.shape){let G=$.shape[X];D[X]=v4.create(xX(G))}return new P6({...$._def,shape:()=>D})}else if($ instanceof T4)return new T4({...$._def,type:xX($.element)});else if($ instanceof v4)return v4.create(xX($.unwrap()));else if($ instanceof y0)return y0.create(xX($.unwrap()));else if($ instanceof $0)return $0.create($.items.map((D)=>xX(D)));else return $}class P6 extends j${constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),D=P$.objectKeys($);return this._cached={shape:$,keys:D},this._cached}_parse($){if(this._getType($)!==f.object){let I=this._getOrReturnCtx($);return l(I,{code:C.invalid_type,expected:f.object,received:I.parsedType}),U$}let{status:X,ctx:G}=this._processInputParams($),{shape:J,keys:Y}=this._getCached(),Q=[];if(!(this._def.catchall instanceof e4&&this._def.unknownKeys==="strip")){for(let I in G.data)if(!Y.includes(I))Q.push(I)}let W=[];for(let I of Y){let U=J[I],B=G.data[I];W.push({key:{status:"valid",value:I},value:U._parse(new B4(G,B,G.path,I)),alwaysSet:I in G.data})}if(this._def.catchall instanceof e4){let I=this._def.unknownKeys;if(I==="passthrough")for(let U of Q)W.push({key:{status:"valid",value:U},value:{status:"valid",value:G.data[U]}});else if(I==="strict"){if(Q.length>0)l(G,{code:C.unrecognized_keys,keys:Q}),X.dirty()}else if(I==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let I=this._def.catchall;for(let U of Q){let B=G.data[U];W.push({key:{status:"valid",value:U},value:I._parse(new B4(G,B,G.path,U)),alwaysSet:U in G.data})}}if(G.common.async)return Promise.resolve().then(async()=>{let I=[];for(let U of W){let B=await U.key,H=await U.value;I.push({key:B,value:H,alwaysSet:U.alwaysSet})}return I}).then((I)=>{return X1.mergeObjectSync(X,I)});else return X1.mergeObjectSync(X,W)}get shape(){return this._def.shape()}strict($){return o.errToObj,new P6({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(D,X)=>{let G=this._def.errorMap?.(D,X).message??X.defaultError;if(D.code==="unrecognized_keys")return{message:o.errToObj($).message??G};return{message:G}}}:{}})}strip(){return new P6({...this._def,unknownKeys:"strip"})}passthrough(){return new P6({...this._def,unknownKeys:"passthrough"})}extend($){return new P6({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new P6({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:h.ZodObject})}setKey($,D){return this.augment({[$]:D})}catchall($){return new P6({...this._def,catchall:$})}pick($){let D={};for(let X of P$.objectKeys($))if($[X]&&this.shape[X])D[X]=this.shape[X];return new P6({...this._def,shape:()=>D})}omit($){let D={};for(let X of P$.objectKeys(this.shape))if(!$[X])D[X]=this.shape[X];return new P6({...this._def,shape:()=>D})}deepPartial(){return xX(this)}partial($){let D={};for(let X of P$.objectKeys(this.shape)){let G=this.shape[X];if($&&!$[X])D[X]=G;else D[X]=G.optional()}return new P6({...this._def,shape:()=>D})}required($){let D={};for(let X of P$.objectKeys(this.shape))if($&&!$[X])D[X]=this.shape[X];else{let J=this.shape[X];while(J instanceof v4)J=J._def.innerType;D[X]=J}return new P6({...this._def,shape:()=>D})}keyof(){return OP(P$.objectKeys(this.shape))}}P6.create=($,D)=>{return new P6({shape:()=>$,unknownKeys:"strip",catchall:e4.create(),typeName:h.ZodObject,...K$(D)})};P6.strictCreate=($,D)=>{return new P6({shape:()=>$,unknownKeys:"strict",catchall:e4.create(),typeName:h.ZodObject,...K$(D)})};P6.lazycreate=($,D)=>{return new P6({shape:$,unknownKeys:"strip",catchall:e4.create(),typeName:h.ZodObject,...K$(D)})};class n9 extends j${_parse($){let{ctx:D}=this._processInputParams($),X=this._def.options;function G(J){for(let Q of J)if(Q.result.status==="valid")return Q.result;for(let Q of J)if(Q.result.status==="dirty")return D.common.issues.push(...Q.ctx.common.issues),Q.result;let Y=J.map((Q)=>new C1(Q.ctx.common.issues));return l(D,{code:C.invalid_union,unionErrors:Y}),U$}if(D.common.async)return Promise.all(X.map(async(J)=>{let Y={...D,common:{...D.common,issues:[]},parent:null};return{result:await J._parseAsync({data:D.data,path:D.path,parent:Y}),ctx:Y}})).then(G);else{let J=void 0,Y=[];for(let W of X){let I={...D,common:{...D.common,issues:[]},parent:null},U=W._parseSync({data:D.data,path:D.path,parent:I});if(U.status==="valid")return U;else if(U.status==="dirty"&&!J)J={result:U,ctx:I};if(I.common.issues.length)Y.push(I.common.issues)}if(J)return D.common.issues.push(...J.ctx.common.issues),J.result;let Q=Y.map((W)=>new C1(W));return l(D,{code:C.invalid_union,unionErrors:Q}),U$}}get options(){return this._def.options}}n9.create=($,D)=>{return new n9({options:$,typeName:h.ZodUnion,...K$(D)})};var a4=($)=>{if($ instanceof o9)return a4($.schema);else if($ instanceof k4)return a4($.innerType());else if($ instanceof t9)return[$.value];else if($ instanceof kD)return $.options;else if($ instanceof a9)return P$.objectValues($.enum);else if($ instanceof s9)return a4($._def.innerType);else if($ instanceof p9)return[void 0];else if($ instanceof r9)return[null];else if($ instanceof v4)return[void 0,...a4($.unwrap())];else if($ instanceof y0)return[null,...a4($.unwrap())];else if($ instanceof uB)return a4($.unwrap());else if($ instanceof $8)return a4($.unwrap());else if($ instanceof e9)return a4($._def.innerType);else return[]};class hB extends j${_parse($){let{ctx:D}=this._processInputParams($);if(D.parsedType!==f.object)return l(D,{code:C.invalid_type,expected:f.object,received:D.parsedType}),U$;let X=this.discriminator,G=D.data[X],J=this.optionsMap.get(G);if(!J)return l(D,{code:C.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[X]}),U$;if(D.common.async)return J._parseAsync({data:D.data,path:D.path,parent:D});else return J._parseSync({data:D.data,path:D.path,parent:D})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,D,X){let G=new Map;for(let J of D){let Y=a4(J.shape[$]);if(!Y.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let Q of Y){if(G.has(Q))throw Error(`Discriminator property ${String($)} has duplicate value ${String(Q)}`);G.set(Q,J)}}return new hB({typeName:h.ZodDiscriminatedUnion,discriminator:$,options:D,optionsMap:G,...K$(X)})}}function xB($,D){let X=t4($),G=t4(D);if($===D)return{valid:!0,data:$};else if(X===f.object&&G===f.object){let J=P$.objectKeys(D),Y=P$.objectKeys($).filter((W)=>J.indexOf(W)!==-1),Q={...$,...D};for(let W of Y){let I=xB($[W],D[W]);if(!I.valid)return{valid:!1};Q[W]=I.data}return{valid:!0,data:Q}}else if(X===f.array&&G===f.array){if($.length!==D.length)return{valid:!1};let J=[];for(let Y=0;Y<$.length;Y++){let Q=$[Y],W=D[Y],I=xB(Q,W);if(!I.valid)return{valid:!1};J.push(I.data)}return{valid:!0,data:J}}else if(X===f.date&&G===f.date&&+$===+D)return{valid:!0,data:$};else return{valid:!1}}class d9 extends j${_parse($){let{status:D,ctx:X}=this._processInputParams($),G=(J,Y)=>{if(CB(J)||CB(Y))return U$;let Q=xB(J.value,Y.value);if(!Q.valid)return l(X,{code:C.invalid_intersection_types}),U$;if(yB(J)||yB(Y))D.dirty();return{status:D.value,value:Q.data}};if(X.common.async)return Promise.all([this._def.left._parseAsync({data:X.data,path:X.path,parent:X}),this._def.right._parseAsync({data:X.data,path:X.path,parent:X})]).then(([J,Y])=>G(J,Y));else return G(this._def.left._parseSync({data:X.data,path:X.path,parent:X}),this._def.right._parseSync({data:X.data,path:X.path,parent:X}))}}d9.create=($,D,X)=>{return new d9({left:$,right:D,typeName:h.ZodIntersection,...K$(X)})};class $0 extends j${_parse($){let{status:D,ctx:X}=this._processInputParams($);if(X.parsedType!==f.array)return l(X,{code:C.invalid_type,expected:f.array,received:X.parsedType}),U$;if(X.data.length<this._def.items.length)return l(X,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),U$;if(!this._def.rest&&X.data.length>this._def.items.length)l(X,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),D.dirty();let J=[...X.data].map((Y,Q)=>{let W=this._def.items[Q]||this._def.rest;if(!W)return null;return W._parse(new B4(X,Y,X.path,Q))}).filter((Y)=>!!Y);if(X.common.async)return Promise.all(J).then((Y)=>{return X1.mergeArray(D,Y)});else return X1.mergeArray(D,J)}get items(){return this._def.items}rest($){return new $0({...this._def,rest:$})}}$0.create=($,D)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new $0({items:$,typeName:h.ZodTuple,rest:null,...K$(D)})};class ZY extends j${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:D,ctx:X}=this._processInputParams($);if(X.parsedType!==f.object)return l(X,{code:C.invalid_type,expected:f.object,received:X.parsedType}),U$;let G=[],J=this._def.keyType,Y=this._def.valueType;for(let Q in X.data)G.push({key:J._parse(new B4(X,Q,X.path,Q)),value:Y._parse(new B4(X,X.data[Q],X.path,Q)),alwaysSet:Q in X.data});if(X.common.async)return X1.mergeObjectAsync(D,G);else return X1.mergeObjectSync(D,G)}get element(){return this._def.valueType}static create($,D,X){if(D instanceof j$)return new ZY({keyType:$,valueType:D,typeName:h.ZodRecord,...K$(X)});return new ZY({keyType:s4.create(),valueType:$,typeName:h.ZodRecord,...K$(D)})}}class TY extends j${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:D,ctx:X}=this._processInputParams($);if(X.parsedType!==f.map)return l(X,{code:C.invalid_type,expected:f.map,received:X.parsedType}),U$;let G=this._def.keyType,J=this._def.valueType,Y=[...X.data.entries()].map(([Q,W],I)=>{return{key:G._parse(new B4(X,Q,X.path,[I,"key"])),value:J._parse(new B4(X,W,X.path,[I,"value"]))}});if(X.common.async){let Q=new Map;return Promise.resolve().then(async()=>{for(let W of Y){let I=await W.key,U=await W.value;if(I.status==="aborted"||U.status==="aborted")return U$;if(I.status==="dirty"||U.status==="dirty")D.dirty();Q.set(I.value,U.value)}return{status:D.value,value:Q}})}else{let Q=new Map;for(let W of Y){let{key:I,value:U}=W;if(I.status==="aborted"||U.status==="aborted")return U$;if(I.status==="dirty"||U.status==="dirty")D.dirty();Q.set(I.value,U.value)}return{status:D.value,value:Q}}}}TY.create=($,D,X)=>{return new TY({valueType:D,keyType:$,typeName:h.ZodMap,...K$(X)})};class fX extends j${_parse($){let{status:D,ctx:X}=this._processInputParams($);if(X.parsedType!==f.set)return l(X,{code:C.invalid_type,expected:f.set,received:X.parsedType}),U$;let G=this._def;if(G.minSize!==null){if(X.data.size<G.minSize.value)l(X,{code:C.too_small,minimum:G.minSize.value,type:"set",inclusive:!0,exact:!1,message:G.minSize.message}),D.dirty()}if(G.maxSize!==null){if(X.data.size>G.maxSize.value)l(X,{code:C.too_big,maximum:G.maxSize.value,type:"set",inclusive:!0,exact:!1,message:G.maxSize.message}),D.dirty()}let J=this._def.valueType;function Y(W){let I=new Set;for(let U of W){if(U.status==="aborted")return U$;if(U.status==="dirty")D.dirty();I.add(U.value)}return{status:D.value,value:I}}let Q=[...X.data.values()].map((W,I)=>J._parse(new B4(X,W,X.path,I)));if(X.common.async)return Promise.all(Q).then((W)=>Y(W));else return Y(Q)}min($,D){return new fX({...this._def,minSize:{value:$,message:o.toString(D)}})}max($,D){return new fX({...this._def,maxSize:{value:$,message:o.toString(D)}})}size($,D){return this.min($,D).max($,D)}nonempty($){return this.min(1,$)}}fX.create=($,D)=>{return new fX({valueType:$,minSize:null,maxSize:null,typeName:h.ZodSet,...K$(D)})};class l9 extends j${constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:D}=this._processInputParams($);if(D.parsedType!==f.function)return l(D,{code:C.invalid_type,expected:f.function,received:D.parsedType}),U$;function X(Q,W){return PY({data:Q,path:D.path,errorMaps:[D.common.contextualErrorMap,D.schemaErrorMap,m9(),C0].filter((I)=>!!I),issueData:{code:C.invalid_arguments,argumentsError:W}})}function G(Q,W){return PY({data:Q,path:D.path,errorMaps:[D.common.contextualErrorMap,D.schemaErrorMap,m9(),C0].filter((I)=>!!I),issueData:{code:C.invalid_return_type,returnTypeError:W}})}let J={errorMap:D.common.contextualErrorMap},Y=D.data;if(this._def.returns instanceof mX){let Q=this;return Q1(async function(...W){let I=new C1([]),U=await Q._def.args.parseAsync(W,J).catch((V)=>{throw I.addIssue(X(W,V)),I}),B=await Reflect.apply(Y,this,U);return await Q._def.returns._def.type.parseAsync(B,J).catch((V)=>{throw I.addIssue(G(B,V)),I})})}else{let Q=this;return Q1(function(...W){let I=Q._def.args.safeParse(W,J);if(!I.success)throw new C1([X(W,I.error)]);let U=Reflect.apply(Y,this,I.data),B=Q._def.returns.safeParse(U,J);if(!B.success)throw new C1([G(U,B.error)]);return B.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new l9({...this._def,args:$0.create($).rest(vD.create())})}returns($){return new l9({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,D,X){return new l9({args:$?$:$0.create([]).rest(vD.create()),returns:D||vD.create(),typeName:h.ZodFunction,...K$(X)})}}class o9 extends j${get schema(){return this._def.getter()}_parse($){let{ctx:D}=this._processInputParams($);return this._def.getter()._parse({data:D.data,path:D.path,parent:D})}}o9.create=($,D)=>{return new o9({getter:$,typeName:h.ZodLazy,...K$(D)})};class t9 extends j${_parse($){if($.data!==this._def.value){let D=this._getOrReturnCtx($);return l(D,{received:D.data,code:C.invalid_literal,expected:this._def.value}),U$}return{status:"valid",value:$.data}}get value(){return this._def.value}}t9.create=($,D)=>{return new t9({value:$,typeName:h.ZodLiteral,...K$(D)})};function OP($,D){return new kD({values:$,typeName:h.ZodEnum,...K$(D)})}class kD extends j${_parse($){if(typeof $.data!=="string"){let D=this._getOrReturnCtx($),X=this._def.values;return l(D,{expected:P$.joinValues(X),received:D.parsedType,code:C.invalid_type}),U$}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let D=this._getOrReturnCtx($),X=this._def.values;return l(D,{received:D.data,code:C.invalid_enum_value,options:X}),U$}return Q1($.data)}get options(){return this._def.values}get enum(){let $={};for(let D of this._def.values)$[D]=D;return $}get Values(){let $={};for(let D of this._def.values)$[D]=D;return $}get Enum(){let $={};for(let D of this._def.values)$[D]=D;return $}extract($,D=this._def){return kD.create($,{...this._def,...D})}exclude($,D=this._def){return kD.create(this.options.filter((X)=>!$.includes(X)),{...this._def,...D})}}kD.create=OP;class a9 extends j${_parse($){let D=P$.getValidEnumValues(this._def.values),X=this._getOrReturnCtx($);if(X.parsedType!==f.string&&X.parsedType!==f.number){let G=P$.objectValues(D);return l(X,{expected:P$.joinValues(G),received:X.parsedType,code:C.invalid_type}),U$}if(!this._cache)this._cache=new Set(P$.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let G=P$.objectValues(D);return l(X,{received:X.data,code:C.invalid_enum_value,options:G}),U$}return Q1($.data)}get enum(){return this._def.values}}a9.create=($,D)=>{return new a9({values:$,typeName:h.ZodNativeEnum,...K$(D)})};class mX extends j${unwrap(){return this._def.type}_parse($){let{ctx:D}=this._processInputParams($);if(D.parsedType!==f.promise&&D.common.async===!1)return l(D,{code:C.invalid_type,expected:f.promise,received:D.parsedType}),U$;let X=D.parsedType===f.promise?D.data:Promise.resolve(D.data);return Q1(X.then((G)=>{return this._def.type.parseAsync(G,{path:D.path,errorMap:D.common.contextualErrorMap})}))}}mX.create=($,D)=>{return new mX({type:$,typeName:h.ZodPromise,...K$(D)})};class k4 extends j${innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===h.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:D,ctx:X}=this._processInputParams($),G=this._def.effect||null,J={addIssue:(Y)=>{if(l(X,Y),Y.fatal)D.abort();else D.dirty()},get path(){return X.path}};if(J.addIssue=J.addIssue.bind(J),G.type==="preprocess"){let Y=G.transform(X.data,J);if(X.common.async)return Promise.resolve(Y).then(async(Q)=>{if(D.value==="aborted")return U$;let W=await this._def.schema._parseAsync({data:Q,path:X.path,parent:X});if(W.status==="aborted")return U$;if(W.status==="dirty")return gX(W.value);if(D.value==="dirty")return gX(W.value);return W});else{if(D.value==="aborted")return U$;let Q=this._def.schema._parseSync({data:Y,path:X.path,parent:X});if(Q.status==="aborted")return U$;if(Q.status==="dirty")return gX(Q.value);if(D.value==="dirty")return gX(Q.value);return Q}}if(G.type==="refinement"){let Y=(Q)=>{let W=G.refinement(Q,J);if(X.common.async)return Promise.resolve(W);if(W instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return Q};if(X.common.async===!1){let Q=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(Q.status==="aborted")return U$;if(Q.status==="dirty")D.dirty();return Y(Q.value),{status:D.value,value:Q.value}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((Q)=>{if(Q.status==="aborted")return U$;if(Q.status==="dirty")D.dirty();return Y(Q.value).then(()=>{return{status:D.value,value:Q.value}})})}if(G.type==="transform")if(X.common.async===!1){let Y=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(!TD(Y))return U$;let Q=G.transform(Y.value,J);if(Q instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:D.value,value:Q}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((Y)=>{if(!TD(Y))return U$;return Promise.resolve(G.transform(Y.value,J)).then((Q)=>({status:D.value,value:Q}))});P$.assertNever(G)}}k4.create=($,D,X)=>{return new k4({schema:$,typeName:h.ZodEffects,effect:D,...K$(X)})};k4.createWithPreprocess=($,D,X)=>{return new k4({schema:D,effect:{type:"preprocess",transform:$},typeName:h.ZodEffects,...K$(X)})};class v4 extends j${_parse($){if(this._getType($)===f.undefined)return Q1(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}v4.create=($,D)=>{return new v4({innerType:$,typeName:h.ZodOptional,...K$(D)})};class y0 extends j${_parse($){if(this._getType($)===f.null)return Q1(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}y0.create=($,D)=>{return new y0({innerType:$,typeName:h.ZodNullable,...K$(D)})};class s9 extends j${_parse($){let{ctx:D}=this._processInputParams($),X=D.data;if(D.parsedType===f.undefined)X=this._def.defaultValue();return this._def.innerType._parse({data:X,path:D.path,parent:D})}removeDefault(){return this._def.innerType}}s9.create=($,D)=>{return new s9({innerType:$,typeName:h.ZodDefault,defaultValue:typeof D.default==="function"?D.default:()=>D.default,...K$(D)})};class e9 extends j${_parse($){let{ctx:D}=this._processInputParams($),X={...D,common:{...D.common,issues:[]}},G=this._def.innerType._parse({data:X.data,path:X.path,parent:{...X}});if(c9(G))return G.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new C1(X.common.issues)},input:X.data})}});else return{status:"valid",value:G.status==="valid"?G.value:this._def.catchValue({get error(){return new C1(X.common.issues)},input:X.data})}}removeCatch(){return this._def.innerType}}e9.create=($,D)=>{return new e9({innerType:$,typeName:h.ZodCatch,catchValue:typeof D.catch==="function"?D.catch:()=>D.catch,...K$(D)})};class vY extends j${_parse($){if(this._getType($)!==f.nan){let X=this._getOrReturnCtx($);return l(X,{code:C.invalid_type,expected:f.nan,received:X.parsedType}),U$}return{status:"valid",value:$.data}}}vY.create=($)=>{return new vY({typeName:h.ZodNaN,...K$($)})};var bW$=Symbol("zod_brand");class uB extends j${_parse($){let{ctx:D}=this._processInputParams($),X=D.data;return this._def.type._parse({data:X,path:D.path,parent:D})}unwrap(){return this._def.type}}class kY extends j${_parse($){let{status:D,ctx:X}=this._processInputParams($);if(X.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:X.data,path:X.path,parent:X});if(J.status==="aborted")return U$;if(J.status==="dirty")return D.dirty(),gX(J.value);else return this._def.out._parseAsync({data:J.value,path:X.path,parent:X})})();else{let G=this._def.in._parseSync({data:X.data,path:X.path,parent:X});if(G.status==="aborted")return U$;if(G.status==="dirty")return D.dirty(),{status:"dirty",value:G.value};else return this._def.out._parseSync({data:G.value,path:X.path,parent:X})}}static create($,D){return new kY({in:$,out:D,typeName:h.ZodPipeline})}}class $8 extends j${_parse($){let D=this._def.innerType._parse($),X=(G)=>{if(TD(G))G.value=Object.freeze(G.value);return G};return c9(D)?D.then((G)=>X(G)):X(D)}unwrap(){return this._def.innerType}}$8.create=($,D)=>{return new $8({innerType:$,typeName:h.ZodReadonly,...K$(D)})};var jW$={object:P6.lazycreate},h;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(h||(h={}));var AW$=s4.create,MW$=hX.create,SW$=vY.create,PW$=uX.create,_W$=_Y.create,NW$=i9.create,RW$=NY.create,EW$=p9.create,ZW$=r9.create,TW$=RY.create,vW$=vD.create,kW$=e4.create,CW$=EY.create,yW$=T4.create,FP=P6.create,gW$=P6.strictCreate,xW$=n9.create,hW$=hB.create,uW$=d9.create,fW$=$0.create,mW$=ZY.create,cW$=TY.create,lW$=fX.create,iW$=l9.create,pW$=o9.create,rW$=t9.create,nW$=kD.create,dW$=a9.create,oW$=mX.create,tW$=k4.create,aW$=v4.create,sW$=y0.create,eW$=k4.createWithPreprocess,$I$=kY.create;var bP;function R($,D,X){function G(W,I){if(!W._zod)Object.defineProperty(W,"_zod",{value:{def:I,constr:Q,traits:new Set},enumerable:!1});if(W._zod.traits.has($))return;W._zod.traits.add($),D(W,I);let U=Q.prototype,B=Object.keys(U);for(let H=0;H<B.length;H++){let V=B[H];if(!(V in W))W[V]=U[V].bind(W)}}let J=X?.Parent??Object;class Y extends J{}Object.defineProperty(Y,"name",{value:$});function Q(W){var I;let U=X?.Parent?new Y:this;G(U,W),(I=U._zod).deferred??(I.deferred=[]);for(let B of U._zod.deferred)B();return U}return Object.defineProperty(Q,"init",{value:G}),Object.defineProperty(Q,Symbol.hasInstance,{value:(W)=>{if(X?.Parent&&W instanceof X.Parent)return!0;return W?._zod?.traits?.has($)}}),Object.defineProperty(Q,"name",{value:$}),Q}var XI$=Symbol("zod_brand");class D0 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class D8 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}(bP=globalThis).__zod_globalConfig??(bP.__zod_globalConfig={});var cX=globalThis.__zod_globalConfig;function y1($){if($)Object.assign(cX,$);return cX}var _$={};X4(_$,{unwrapMessage:()=>X8,uint8ArrayToHex:()=>op,uint8ArrayToBase64url:()=>np,uint8ArrayToBase64:()=>vP,stringifyPrimitive:()=>xY,slugify:()=>cB,shallowClone:()=>iB,safeExtend:()=>NP,required:()=>EP,randomString:()=>fp,propertyKeyTypes:()=>pB,promiseAllObject:()=>up,primitiveTypes:()=>AP,prefixIssues:()=>G0,pick:()=>SP,partial:()=>RP,parsedType:()=>oB,optionalKeys:()=>rB,omit:()=>PP,objectClone:()=>gp,numKeys:()=>mp,nullish:()=>G8,normalizeParams:()=>J$,mergeDefs:()=>X0,merge:()=>ip,jsonStringifyReplacer:()=>lX,joinValues:()=>CY,issue:()=>pX,isPlainObject:()=>x0,isObject:()=>CD,hexToUint8Array:()=>dp,getSizableOrigin:()=>ZP,getParsedType:()=>cp,getLengthableOrigin:()=>Q8,getEnumValues:()=>J8,getElementAtPath:()=>hp,floatSafeRemainder:()=>mB,finalizeIssue:()=>n1,extend:()=>_P,explicitlyAborted:()=>dB,escapeRegex:()=>J0,esc:()=>yY,defineLazy:()=>g$,createTransparentProxy:()=>lp,cloneDef:()=>xp,clone:()=>g1,cleanRegex:()=>Y8,cleanEnum:()=>pp,captureStackTrace:()=>gY,cached:()=>iX,base64urlToUint8Array:()=>rp,base64ToUint8Array:()=>TP,assignProp:()=>g0,assertNotEqual:()=>vp,assertNever:()=>Cp,assertIs:()=>kp,assertEqual:()=>Tp,assert:()=>yp,allowsEval:()=>lB,aborted:()=>h0,NUMBER_FORMAT_RANGES:()=>nB,Class:()=>kP,BIGINT_FORMAT_RANGES:()=>MP});function Tp($){return $}function vp($){return $}function kp($){}function Cp($){throw Error("Unexpected value in exhaustive check")}function yp($){}function J8($){let D=Object.values($).filter((G)=>typeof G==="number");return Object.entries($).filter(([G,J])=>D.indexOf(+G)===-1).map(([G,J])=>J)}function CY($,D="|"){return $.map((X)=>xY(X)).join(D)}function lX($,D){if(typeof D==="bigint")return D.toString();return D}function iX($){return{get value(){{let X=$();return Object.defineProperty(this,"value",{value:X}),X}throw Error("cached value already set")}}}function G8($){return $===null||$===void 0}function Y8($){let D=$.startsWith("^")?1:0,X=$.endsWith("$")?$.length-1:$.length;return $.slice(D,X)}function mB($,D){let X=$/D,G=Math.round(X),J=Number.EPSILON*Math.max(Math.abs(X),1);if(Math.abs(X-G)<J)return 0;return X-G}var jP=Symbol("evaluating");function g$($,D,X){let G=void 0;Object.defineProperty($,D,{get(){if(G===jP)return;if(G===void 0)G=jP,G=X();return G},set(J){Object.defineProperty($,D,{value:J})},configurable:!0})}function gp($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function g0($,D,X){Object.defineProperty($,D,{value:X,writable:!0,enumerable:!0,configurable:!0})}function X0(...$){let D={};for(let X of $){let G=Object.getOwnPropertyDescriptors(X);Object.assign(D,G)}return Object.defineProperties({},D)}function xp($){return X0($._zod.def)}function hp($,D){if(!D)return $;return D.reduce((X,G)=>X?.[G],$)}function up($){let D=Object.keys($),X=D.map((G)=>$[G]);return Promise.all(X).then((G)=>{let J={};for(let Y=0;Y<D.length;Y++)J[D[Y]]=G[Y];return J})}function fp($=10){let X="";for(let G=0;G<$;G++)X+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return X}function yY($){return JSON.stringify($)}function cB($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var gY="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function CD($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var lB=iX(()=>{if(cX.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function x0($){if(CD($)===!1)return!1;let D=$.constructor;if(D===void 0)return!0;if(typeof D!=="function")return!0;let X=D.prototype;if(CD(X)===!1)return!1;if(Object.prototype.hasOwnProperty.call(X,"isPrototypeOf")===!1)return!1;return!0}function iB($){if(x0($))return{...$};if(Array.isArray($))return[...$];if($ instanceof Map)return new Map($);if($ instanceof Set)return new Set($);return $}function mp($){let D=0;for(let X in $)if(Object.prototype.hasOwnProperty.call($,X))D++;return D}var cp=($)=>{let D=typeof $;switch(D){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${D}`)}},pB=new Set(["string","number","symbol"]),AP=new Set(["string","number","bigint","boolean","symbol","undefined"]);function J0($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g1($,D,X){let G=new $._zod.constr(D??$._zod.def);if(!D||X?.parent)G._zod.parent=$;return G}function J$($){let D=$;if(!D)return{};if(typeof D==="string")return{error:()=>D};if(D?.message!==void 0){if(D?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");D.error=D.message}if(delete D.message,typeof D.error==="string")return{...D,error:()=>D.error};return D}function lp($){let D;return new Proxy({},{get(X,G,J){return D??(D=$()),Reflect.get(D,G,J)},set(X,G,J,Y){return D??(D=$()),Reflect.set(D,G,J,Y)},has(X,G){return D??(D=$()),Reflect.has(D,G)},deleteProperty(X,G){return D??(D=$()),Reflect.deleteProperty(D,G)},ownKeys(X){return D??(D=$()),Reflect.ownKeys(D)},getOwnPropertyDescriptor(X,G){return D??(D=$()),Reflect.getOwnPropertyDescriptor(D,G)},defineProperty(X,G,J){return D??(D=$()),Reflect.defineProperty(D,G,J)}})}function xY($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function rB($){return Object.keys($).filter((D)=>{return $[D]._zod.optin==="optional"&&$[D]._zod.optout==="optional"})}var nB={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},MP={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function SP($,D){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let Y=X0($._zod.def,{get shape(){let Q={};for(let W in D){if(!(W in X.shape))throw Error(`Unrecognized key: "${W}"`);if(!D[W])continue;Q[W]=X.shape[W]}return g0(this,"shape",Q),Q},checks:[]});return g1($,Y)}function PP($,D){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let Y=X0($._zod.def,{get shape(){let Q={...$._zod.def.shape};for(let W in D){if(!(W in X.shape))throw Error(`Unrecognized key: "${W}"`);if(!D[W])continue;delete Q[W]}return g0(this,"shape",Q),Q},checks:[]});return g1($,Y)}function _P($,D){if(!x0(D))throw Error("Invalid input to extend: expected a plain object");let X=$._zod.def.checks;if(X&&X.length>0){let Y=$._zod.def.shape;for(let Q in D)if(Object.getOwnPropertyDescriptor(Y,Q)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let J=X0($._zod.def,{get shape(){let Y={...$._zod.def.shape,...D};return g0(this,"shape",Y),Y}});return g1($,J)}function NP($,D){if(!x0(D))throw Error("Invalid input to safeExtend: expected a plain object");let X=X0($._zod.def,{get shape(){let G={...$._zod.def.shape,...D};return g0(this,"shape",G),G}});return g1($,X)}function ip($,D){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let X=X0($._zod.def,{get shape(){let G={...$._zod.def.shape,...D._zod.def.shape};return g0(this,"shape",G),G},get catchall(){return D._zod.def.catchall},checks:D._zod.def.checks??[]});return g1($,X)}function RP($,D,X){let J=D._zod.def.checks;if(J&&J.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let Q=X0(D._zod.def,{get shape(){let W=D._zod.def.shape,I={...W};if(X)for(let U in X){if(!(U in W))throw Error(`Unrecognized key: "${U}"`);if(!X[U])continue;I[U]=$?new $({type:"optional",innerType:W[U]}):W[U]}else for(let U in W)I[U]=$?new $({type:"optional",innerType:W[U]}):W[U];return g0(this,"shape",I),I},checks:[]});return g1(D,Q)}function EP($,D,X){let G=X0(D._zod.def,{get shape(){let J=D._zod.def.shape,Y={...J};if(X)for(let Q in X){if(!(Q in Y))throw Error(`Unrecognized key: "${Q}"`);if(!X[Q])continue;Y[Q]=new $({type:"nonoptional",innerType:J[Q]})}else for(let Q in J)Y[Q]=new $({type:"nonoptional",innerType:J[Q]});return g0(this,"shape",Y),Y}});return g1(D,G)}function h0($,D=0){if($.aborted===!0)return!0;for(let X=D;X<$.issues.length;X++)if($.issues[X]?.continue!==!0)return!0;return!1}function dB($,D=0){if($.aborted===!0)return!0;for(let X=D;X<$.issues.length;X++)if($.issues[X]?.continue===!1)return!0;return!1}function G0($,D){return D.map((X)=>{var G;return(G=X).path??(G.path=[]),X.path.unshift($),X})}function X8($){return typeof $==="string"?$:$?.message}function n1($,D,X){let G=$.message?$.message:X8($.inst?._zod.def?.error?.($))??X8(D?.error?.($))??X8(X.customError?.($))??X8(X.localeError?.($))??"Invalid input",{inst:J,continue:Y,input:Q,...W}=$;if(W.path??(W.path=[]),W.message=G,D?.reportInput)W.input=Q;return W}function ZP($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function Q8($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function oB($){let D=typeof $;switch(D){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let X=$;if(X&&Object.getPrototypeOf(X)!==Object.prototype&&"constructor"in X&&X.constructor)return X.constructor.name}}return D}function pX(...$){let[D,X,G]=$;if(typeof D==="string")return{message:D,code:"custom",input:X,inst:G};return{...D}}function pp($){return Object.entries($).filter(([D,X])=>{return Number.isNaN(Number.parseInt(D,10))}).map((D)=>D[1])}function TP($){let D=atob($),X=new Uint8Array(D.length);for(let G=0;G<D.length;G++)X[G]=D.charCodeAt(G);return X}function vP($){let D="";for(let X=0;X<$.length;X++)D+=String.fromCharCode($[X]);return btoa(D)}function rp($){let D=$.replace(/-/g,"+").replace(/_/g,"/"),X="=".repeat((4-D.length%4)%4);return TP(D+X)}function np($){return vP($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function dp($){let D=$.replace(/^0x/,"");if(D.length%2!==0)throw Error("Invalid hex string length");let X=new Uint8Array(D.length/2);for(let G=0;G<D.length;G+=2)X[G/2]=Number.parseInt(D.slice(G,G+2),16);return X}function op($){return Array.from($).map((D)=>D.toString(16).padStart(2,"0")).join("")}class kP{constructor(...$){}}var CP=($,D)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:D,enumerable:!1}),$.message=JSON.stringify(D,lX,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},hY=R("$ZodError",CP),W8=R("$ZodError",CP,{Parent:Error});function yP($,D=(X)=>X.message){let X={},G=[];for(let J of $.issues)if(J.path.length>0)X[J.path[0]]=X[J.path[0]]||[],X[J.path[0]].push(D(J));else G.push(D(J));return{formErrors:G,fieldErrors:X}}function gP($,D=(X)=>X.message){let X={_errors:[]},G=(J,Y=[])=>{for(let Q of J.issues)if(Q.code==="invalid_union"&&Q.errors.length)Q.errors.map((W)=>G({issues:W},[...Y,...Q.path]));else if(Q.code==="invalid_key")G({issues:Q.issues},[...Y,...Q.path]);else if(Q.code==="invalid_element")G({issues:Q.issues},[...Y,...Q.path]);else{let W=[...Y,...Q.path];if(W.length===0)X._errors.push(D(Q));else{let I=X,U=0;while(U<W.length){let B=W[U];if(U!==W.length-1)I[B]=I[B]||{_errors:[]};else I[B]=I[B]||{_errors:[]},I[B]._errors.push(D(Q));I=I[B],U++}}}};return G($),X}var I8=($)=>(D,X,G,J)=>{let Y=G?{...G,async:!1}:{async:!1},Q=D._zod.run({value:X,issues:[]},Y);if(Q instanceof Promise)throw new D0;if(Q.issues.length){let W=new(J?.Err??$)(Q.issues.map((I)=>n1(I,Y,y1())));throw gY(W,J?.callee),W}return Q.value},uY=I8(W8),U8=($)=>async(D,X,G,J)=>{let Y=G?{...G,async:!0}:{async:!0},Q=D._zod.run({value:X,issues:[]},Y);if(Q instanceof Promise)Q=await Q;if(Q.issues.length){let W=new(J?.Err??$)(Q.issues.map((I)=>n1(I,Y,y1())));throw gY(W,J?.callee),W}return Q.value},fY=U8(W8),B8=($)=>(D,X,G)=>{let J=G?{...G,async:!1}:{async:!1},Y=D._zod.run({value:X,issues:[]},J);if(Y instanceof Promise)throw new D0;return Y.issues.length?{success:!1,error:new($??hY)(Y.issues.map((Q)=>n1(Q,J,y1())))}:{success:!0,data:Y.value}},yD=B8(W8),z8=($)=>async(D,X,G)=>{let J=G?{...G,async:!0}:{async:!0},Y=D._zod.run({value:X,issues:[]},J);if(Y instanceof Promise)Y=await Y;return Y.issues.length?{success:!1,error:new $(Y.issues.map((Q)=>n1(Q,J,y1())))}:{success:!0,data:Y.value}},gD=z8(W8),xP=($)=>(D,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return I8($)(D,X,J)};var hP=($)=>(D,X,G)=>{return I8($)(D,X,G)};var uP=($)=>async(D,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return U8($)(D,X,J)};var fP=($)=>async(D,X,G)=>{return U8($)(D,X,G)};var mP=($)=>(D,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return B8($)(D,X,J)};var cP=($)=>(D,X,G)=>{return B8($)(D,X,G)};var lP=($)=>async(D,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return z8($)(D,X,J)};var iP=($)=>async(D,X,G)=>{return z8($)(D,X,G)};var pP=/^[cC][0-9a-z]{6,}$/,rP=/^[0-9a-z]+$/,nP=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dP=/^[0-9a-vA-V]{20}$/,oP=/^[A-Za-z0-9]{27}$/,tP=/^[a-zA-Z0-9_-]{21}$/,aP=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var sP=/^([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})$/,tB=($)=>{if(!$)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var eP=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var ap="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $_(){return new RegExp(ap,"u")}var D_=/^(?:(?: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])$/,X_=/^(([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}|:))$/;var J_=/^((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])$/,G_=/^(([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])$/,Y_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,aB=/^[A-Za-z0-9_-]*$/;var Q_=/^https?$/,W_=/^\+[1-9]\d{6,14}$/,I_="(?:(?:\\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])))",U_=new RegExp(`^${I_}$`);function B_($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.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{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function z_($){return new RegExp(`^${B_($)}$`)}function q_($){let D=B_({precision:$.precision}),X=["Z"];if($.local)X.push("");if($.offset)X.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let G=`${D}(?:${X.join("|")})`;return new RegExp(`^${I_}T(?:${G})$`)}var H_=($)=>{let D=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${D}$`)};var K_=/^-?\d+$/,mY=/^-?\d+(?:\.\d+)?$/,V_=/^(?:true|false)$/i,w_=/^null$/i;var L_=/^[^A-Z]*$/,O_=/^[^a-z]*$/;var g6=R("$ZodCheck",($,D)=>{var X;$._zod??($._zod={}),$._zod.def=D,(X=$._zod).onattach??(X.onattach=[])}),F_={number:"number",bigint:"bigint",object:"date"},sB=R("$ZodCheckLessThan",($,D)=>{g6.init($,D);let X=F_[typeof D.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Y=(D.inclusive?J.maximum:J.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(D.value<Y)if(D.inclusive)J.maximum=D.value;else J.exclusiveMaximum=D.value}),$._zod.check=(G)=>{if(D.inclusive?G.value<=D.value:G.value<D.value)return;G.issues.push({origin:X,code:"too_big",maximum:typeof D.value==="object"?D.value.getTime():D.value,input:G.value,inclusive:D.inclusive,inst:$,continue:!D.abort})}}),eB=R("$ZodCheckGreaterThan",($,D)=>{g6.init($,D);let X=F_[typeof D.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Y=(D.inclusive?J.minimum:J.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(D.value>Y)if(D.inclusive)J.minimum=D.value;else J.exclusiveMinimum=D.value}),$._zod.check=(G)=>{if(D.inclusive?G.value>=D.value:G.value>D.value)return;G.issues.push({origin:X,code:"too_small",minimum:typeof D.value==="object"?D.value.getTime():D.value,input:G.value,inclusive:D.inclusive,inst:$,continue:!D.abort})}}),b_=R("$ZodCheckMultipleOf",($,D)=>{g6.init($,D),$._zod.onattach.push((X)=>{var G;(G=X._zod.bag).multipleOf??(G.multipleOf=D.value)}),$._zod.check=(X)=>{if(typeof X.value!==typeof D.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof X.value==="bigint"?X.value%D.value===BigInt(0):mB(X.value,D.value)===0)return;X.issues.push({origin:typeof X.value,code:"not_multiple_of",divisor:D.value,input:X.value,inst:$,continue:!D.abort})}}),j_=R("$ZodCheckNumberFormat",($,D)=>{g6.init($,D),D.format=D.format||"float64";let X=D.format?.includes("int"),G=X?"int":"number",[J,Y]=nB[D.format];$._zod.onattach.push((Q)=>{let W=Q._zod.bag;if(W.format=D.format,W.minimum=J,W.maximum=Y,X)W.pattern=K_}),$._zod.check=(Q)=>{let W=Q.value;if(X){if(!Number.isInteger(W)){Q.issues.push({expected:G,format:D.format,code:"invalid_type",continue:!1,input:W,inst:$});return}if(!Number.isSafeInteger(W)){if(W>0)Q.issues.push({input:W,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!D.abort});else Q.issues.push({input:W,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!D.abort});return}}if(W<J)Q.issues.push({origin:"number",input:W,code:"too_small",minimum:J,inclusive:!0,inst:$,continue:!D.abort});if(W>Y)Q.issues.push({origin:"number",input:W,code:"too_big",maximum:Y,inclusive:!0,inst:$,continue:!D.abort})}});var A_=R("$ZodCheckMaxLength",($,D)=>{var X;g6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!G8(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(D.maximum<J)G._zod.bag.maximum=D.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.length<=D.maximum)return;let Q=Q8(J);G.issues.push({origin:Q,code:"too_big",maximum:D.maximum,inclusive:!0,input:J,inst:$,continue:!D.abort})}}),M_=R("$ZodCheckMinLength",($,D)=>{var X;g6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!G8(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(D.minimum>J)G._zod.bag.minimum=D.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.length>=D.minimum)return;let Q=Q8(J);G.issues.push({origin:Q,code:"too_small",minimum:D.minimum,inclusive:!0,input:J,inst:$,continue:!D.abort})}}),S_=R("$ZodCheckLengthEquals",($,D)=>{var X;g6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!G8(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=D.length,J.maximum=D.length,J.length=D.length}),$._zod.check=(G)=>{let J=G.value,Y=J.length;if(Y===D.length)return;let Q=Q8(J),W=Y>D.length;G.issues.push({origin:Q,...W?{code:"too_big",maximum:D.length}:{code:"too_small",minimum:D.length},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!D.abort})}}),H8=R("$ZodCheckStringFormat",($,D)=>{var X,G;if(g6.init($,D),$._zod.onattach.push((J)=>{let Y=J._zod.bag;if(Y.format=D.format,D.pattern)Y.patterns??(Y.patterns=new Set),Y.patterns.add(D.pattern)}),D.pattern)(X=$._zod).check??(X.check=(J)=>{if(D.pattern.lastIndex=0,D.pattern.test(J.value))return;J.issues.push({origin:"string",code:"invalid_format",format:D.format,input:J.value,...D.pattern?{pattern:D.pattern.toString()}:{},inst:$,continue:!D.abort})});else(G=$._zod).check??(G.check=()=>{})}),P_=R("$ZodCheckRegex",($,D)=>{H8.init($,D),$._zod.check=(X)=>{if(D.pattern.lastIndex=0,D.pattern.test(X.value))return;X.issues.push({origin:"string",code:"invalid_format",format:"regex",input:X.value,pattern:D.pattern.toString(),inst:$,continue:!D.abort})}}),__=R("$ZodCheckLowerCase",($,D)=>{D.pattern??(D.pattern=L_),H8.init($,D)}),N_=R("$ZodCheckUpperCase",($,D)=>{D.pattern??(D.pattern=O_),H8.init($,D)}),R_=R("$ZodCheckIncludes",($,D)=>{g6.init($,D);let X=J0(D.includes),G=new RegExp(typeof D.position==="number"?`^.{${D.position}}${X}`:X);D.pattern=G,$._zod.onattach.push((J)=>{let Y=J._zod.bag;Y.patterns??(Y.patterns=new Set),Y.patterns.add(G)}),$._zod.check=(J)=>{if(J.value.includes(D.includes,D.position))return;J.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:D.includes,input:J.value,inst:$,continue:!D.abort})}}),E_=R("$ZodCheckStartsWith",($,D)=>{g6.init($,D);let X=new RegExp(`^${J0(D.prefix)}.*`);D.pattern??(D.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.startsWith(D.prefix))return;G.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:D.prefix,input:G.value,inst:$,continue:!D.abort})}}),Z_=R("$ZodCheckEndsWith",($,D)=>{g6.init($,D);let X=new RegExp(`.*${J0(D.suffix)}$`);D.pattern??(D.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.endsWith(D.suffix))return;G.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:D.suffix,input:G.value,inst:$,continue:!D.abort})}});var T_=R("$ZodCheckOverwrite",($,D)=>{g6.init($,D),$._zod.check=(X)=>{X.value=D.tx(X.value)}});class $z{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let X=$.split(`
247
- `).filter((Y)=>Y),G=Math.min(...X.map((Y)=>Y.length-Y.trimStart().length)),J=X.map((Y)=>Y.slice(G)).map((Y)=>" ".repeat(this.indent*2)+Y);for(let Y of J)this.content.push(Y)}compile(){let $=Function,D=this?.args,G=[...(this?.content??[""]).map((J)=>` ${J}`)];return new $(...D,G.join(`
248
- `))}}var k_={major:4,minor:4,patch:3};var D6=R("$ZodType",($,D)=>{var X;$??($={}),$._zod.def=D,$._zod.bag=$._zod.bag||{},$._zod.version=k_;let G=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))G.unshift($);for(let J of G)for(let Y of J._zod.onattach)Y($);if(G.length===0)(X=$._zod).deferred??(X.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let J=(Q,W,I)=>{let U=h0(Q),B;for(let H of W){if(H._zod.def.when){if(dB(Q))continue;if(!H._zod.def.when(Q))continue}else if(U)continue;let V=Q.issues.length,z=H._zod.check(Q);if(z instanceof Promise&&I?.async===!1)throw new D0;if(B||z instanceof Promise)B=(B??Promise.resolve()).then(async()=>{if(await z,Q.issues.length===V)return;if(!U)U=h0(Q,V)});else{if(Q.issues.length===V)continue;if(!U)U=h0(Q,V)}}if(B)return B.then(()=>{return Q});return Q},Y=(Q,W,I)=>{if(h0(Q))return Q.aborted=!0,Q;let U=J(W,G,I);if(U instanceof Promise){if(I.async===!1)throw new D0;return U.then((B)=>$._zod.parse(B,I))}return $._zod.parse(U,I)};$._zod.run=(Q,W)=>{if(W.skipChecks)return $._zod.parse(Q,W);if(W.direction==="backward"){let U=$._zod.parse({value:Q.value,issues:[]},{...W,skipChecks:!0});if(U instanceof Promise)return U.then((B)=>{return Y(B,Q,W)});return Y(U,Q,W)}let I=$._zod.parse(Q,W);if(I instanceof Promise){if(W.async===!1)throw new D0;return I.then((U)=>J(U,G,W))}return J(I,G,W)}}g$($,"~standard",()=>({validate:(J)=>{try{let Y=yD($,J);return Y.success?{value:Y.data}:{issues:Y.error?.issues}}catch(Y){return gD($,J).then((Q)=>Q.success?{value:Q.data}:{issues:Q.error?.issues})}},vendor:"zod",version:1}))}),K8=R("$ZodString",($,D)=>{D6.init($,D),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??H_($._zod.bag),$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=String(X.value)}catch(J){}if(typeof X.value==="string")return X;return X.issues.push({expected:"string",code:"invalid_type",input:X.value,inst:$}),X}}),Y6=R("$ZodStringFormat",($,D)=>{H8.init($,D),K8.init($,D)}),Xz=R("$ZodGUID",($,D)=>{D.pattern??(D.pattern=sP),Y6.init($,D)}),Jz=R("$ZodUUID",($,D)=>{if(D.version){let G={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[D.version];if(G===void 0)throw Error(`Invalid UUID version: "${D.version}"`);D.pattern??(D.pattern=tB(G))}else D.pattern??(D.pattern=tB());Y6.init($,D)}),Gz=R("$ZodEmail",($,D)=>{D.pattern??(D.pattern=eP),Y6.init($,D)}),Yz=R("$ZodURL",($,D)=>{Y6.init($,D),$._zod.check=(X)=>{try{let G=X.value.trim();if(!D.normalize&&D.protocol?.source===Q_.source){if(!/^https?:\/\//i.test(G)){X.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:X.value,inst:$,continue:!D.abort});return}}let J=new URL(G);if(D.hostname){if(D.hostname.lastIndex=0,!D.hostname.test(J.hostname))X.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:D.hostname.source,input:X.value,inst:$,continue:!D.abort})}if(D.protocol){if(D.protocol.lastIndex=0,!D.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))X.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:D.protocol.source,input:X.value,inst:$,continue:!D.abort})}if(D.normalize)X.value=J.href;else X.value=G;return}catch(G){X.issues.push({code:"invalid_format",format:"url",input:X.value,inst:$,continue:!D.abort})}}}),Qz=R("$ZodEmoji",($,D)=>{D.pattern??(D.pattern=$_()),Y6.init($,D)}),Wz=R("$ZodNanoID",($,D)=>{D.pattern??(D.pattern=tP),Y6.init($,D)}),Iz=R("$ZodCUID",($,D)=>{D.pattern??(D.pattern=pP),Y6.init($,D)}),Uz=R("$ZodCUID2",($,D)=>{D.pattern??(D.pattern=rP),Y6.init($,D)}),Bz=R("$ZodULID",($,D)=>{D.pattern??(D.pattern=nP),Y6.init($,D)}),zz=R("$ZodXID",($,D)=>{D.pattern??(D.pattern=dP),Y6.init($,D)}),qz=R("$ZodKSUID",($,D)=>{D.pattern??(D.pattern=oP),Y6.init($,D)}),c_=R("$ZodISODateTime",($,D)=>{D.pattern??(D.pattern=q_(D)),Y6.init($,D)}),l_=R("$ZodISODate",($,D)=>{D.pattern??(D.pattern=U_),Y6.init($,D)}),i_=R("$ZodISOTime",($,D)=>{D.pattern??(D.pattern=z_(D)),Y6.init($,D)}),p_=R("$ZodISODuration",($,D)=>{D.pattern??(D.pattern=aP),Y6.init($,D)}),Hz=R("$ZodIPv4",($,D)=>{D.pattern??(D.pattern=D_),Y6.init($,D),$._zod.bag.format="ipv4"}),Kz=R("$ZodIPv6",($,D)=>{D.pattern??(D.pattern=X_),Y6.init($,D),$._zod.bag.format="ipv6",$._zod.check=(X)=>{try{new URL(`http://[${X.value}]`)}catch{X.issues.push({code:"invalid_format",format:"ipv6",input:X.value,inst:$,continue:!D.abort})}}});var Vz=R("$ZodCIDRv4",($,D)=>{D.pattern??(D.pattern=J_),Y6.init($,D)}),wz=R("$ZodCIDRv6",($,D)=>{D.pattern??(D.pattern=G_),Y6.init($,D),$._zod.check=(X)=>{let G=X.value.split("/");try{if(G.length!==2)throw Error();let[J,Y]=G;if(!Y)throw Error();let Q=Number(Y);if(`${Q}`!==Y)throw Error();if(Q<0||Q>128)throw Error();new URL(`http://[${J}]`)}catch{X.issues.push({code:"invalid_format",format:"cidrv6",input:X.value,inst:$,continue:!D.abort})}}});function r_($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var Lz=R("$ZodBase64",($,D)=>{D.pattern??(D.pattern=Y_),Y6.init($,D),$._zod.bag.contentEncoding="base64",$._zod.check=(X)=>{if(r_(X.value))return;X.issues.push({code:"invalid_format",format:"base64",input:X.value,inst:$,continue:!D.abort})}});function sp($){if(!aB.test($))return!1;let D=$.replace(/[-_]/g,(G)=>G==="-"?"+":"/"),X=D.padEnd(Math.ceil(D.length/4)*4,"=");return r_(X)}var Oz=R("$ZodBase64URL",($,D)=>{D.pattern??(D.pattern=aB),Y6.init($,D),$._zod.bag.contentEncoding="base64url",$._zod.check=(X)=>{if(sp(X.value))return;X.issues.push({code:"invalid_format",format:"base64url",input:X.value,inst:$,continue:!D.abort})}}),Fz=R("$ZodE164",($,D)=>{D.pattern??(D.pattern=W_),Y6.init($,D)});function ep($,D=null){try{let X=$.split(".");if(X.length!==3)return!1;let[G]=X;if(!G)return!1;let J=JSON.parse(atob(G));if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(D&&(!("alg"in J)||J.alg!==D))return!1;return!0}catch{return!1}}var bz=R("$ZodJWT",($,D)=>{Y6.init($,D),$._zod.check=(X)=>{if(ep(X.value,D.alg))return;X.issues.push({code:"invalid_format",format:"jwt",input:X.value,inst:$,continue:!D.abort})}});var iY=R("$ZodNumber",($,D)=>{D6.init($,D),$._zod.pattern=$._zod.bag.pattern??mY,$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=Number(X.value)}catch(Q){}let J=X.value;if(typeof J==="number"&&!Number.isNaN(J)&&Number.isFinite(J))return X;let Y=typeof J==="number"?Number.isNaN(J)?"NaN":!Number.isFinite(J)?"Infinity":void 0:void 0;return X.issues.push({expected:"number",code:"invalid_type",input:J,inst:$,...Y?{received:Y}:{}}),X}}),jz=R("$ZodNumberFormat",($,D)=>{j_.init($,D),iY.init($,D)}),Az=R("$ZodBoolean",($,D)=>{D6.init($,D),$._zod.pattern=V_,$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=Boolean(X.value)}catch(Y){}let J=X.value;if(typeof J==="boolean")return X;return X.issues.push({expected:"boolean",code:"invalid_type",input:J,inst:$}),X}});var Mz=R("$ZodNull",($,D)=>{D6.init($,D),$._zod.pattern=w_,$._zod.values=new Set([null]),$._zod.parse=(X,G)=>{let J=X.value;if(J===null)return X;return X.issues.push({expected:"null",code:"invalid_type",input:J,inst:$}),X}});var Sz=R("$ZodUnknown",($,D)=>{D6.init($,D),$._zod.parse=(X)=>X}),Pz=R("$ZodNever",($,D)=>{D6.init($,D),$._zod.parse=(X,G)=>{return X.issues.push({expected:"never",code:"invalid_type",input:X.value,inst:$}),X}});function C_($,D,X){if($.issues.length)D.issues.push(...G0(X,$.issues));D.value[X]=$.value}var _z=R("$ZodArray",($,D)=>{D6.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(!Array.isArray(J))return X.issues.push({expected:"array",code:"invalid_type",input:J,inst:$}),X;X.value=Array(J.length);let Y=[];for(let Q=0;Q<J.length;Q++){let W=J[Q],I=D.element._zod.run({value:W,issues:[]},G);if(I instanceof Promise)Y.push(I.then((U)=>C_(U,X,Q)));else C_(I,X,Q)}if(Y.length)return Promise.all(Y).then(()=>X);return X}});function lY($,D,X,G,J,Y){let Q=X in G;if($.issues.length){if(J&&Y&&!Q)return;D.issues.push(...G0(X,$.issues))}if(!Q&&!J){if(!$.issues.length)D.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[X]});return}if($.value===void 0){if(Q)D.value[X]=void 0}else D.value[X]=$.value}function n_($){let D=Object.keys($.shape);for(let G of D)if(!$.shape?.[G]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${G}": expected a Zod schema`);let X=rB($.shape);return{...$,keys:D,keySet:new Set(D),numKeys:D.length,optionalKeys:new Set(X)}}function d_($,D,X,G,J,Y){let Q=[],W=J.keySet,I=J.catchall._zod,U=I.def.type,B=I.optin==="optional",H=I.optout==="optional";for(let V in D){if(V==="__proto__")continue;if(W.has(V))continue;if(U==="never"){Q.push(V);continue}let z=I.run({value:D[V],issues:[]},G);if(z instanceof Promise)$.push(z.then((L)=>lY(L,X,V,D,B,H)));else lY(z,X,V,D,B,H)}if(Q.length)X.issues.push({code:"unrecognized_keys",keys:Q,input:D,inst:Y});if(!$.length)return X;return Promise.all($).then(()=>{return X})}var Nz=R("$ZodObject",($,D)=>{if(D6.init($,D),!Object.getOwnPropertyDescriptor(D,"shape")?.get){let W=D.shape;Object.defineProperty(D,"shape",{get:()=>{let I={...W};return Object.defineProperty(D,"shape",{value:I}),I}})}let G=iX(()=>n_(D));g$($._zod,"propValues",()=>{let W=D.shape,I={};for(let U in W){let B=W[U]._zod;if(B.values){I[U]??(I[U]=new Set);for(let H of B.values)I[U].add(H)}}return I});let J=CD,Y=D.catchall,Q;$._zod.parse=(W,I)=>{Q??(Q=G.value);let U=W.value;if(!J(U))return W.issues.push({expected:"object",code:"invalid_type",input:U,inst:$}),W;W.value={};let B=[],H=Q.shape;for(let V of Q.keys){let z=H[V],L=z._zod.optin==="optional",F=z._zod.optout==="optional",b=z._zod.run({value:U[V],issues:[]},I);if(b instanceof Promise)B.push(b.then((P)=>lY(P,W,V,U,L,F)));else lY(b,W,V,U,L,F)}if(!Y)return B.length?Promise.all(B).then(()=>W):W;return d_(B,U,W,I,G.value,$)}}),o_=R("$ZodObjectJIT",($,D)=>{Nz.init($,D);let X=$._zod.parse,G=iX(()=>n_(D)),J=(V)=>{let z=new $z(["shape","payload","ctx"]),L=G.value,F=(v)=>{let g=yY(v);return`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`};z.write("const input = payload.value;");let b=Object.create(null),P=0;for(let v of L.keys)b[v]=`key_${P++}`;z.write("const newResult = {};");for(let v of L.keys){let g=b[v],T=yY(v),o$=V[v],e$=o$?._zod?.optin==="optional",v6=o$?._zod?.optout==="optional";if(z.write(`const ${g} = ${F(v)};`),e$&&v6)z.write(`
249
- if (${g}.issues.length) {
250
- if (${T} in input) {
251
- payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
252
- ...iss,
253
- path: iss.path ? [${T}, ...iss.path] : [${T}]
254
- })));
255
- }
256
- }
257
-
258
- if (${g}.value === undefined) {
259
- if (${T} in input) {
260
- newResult[${T}] = undefined;
261
- }
262
- } else {
263
- newResult[${T}] = ${g}.value;
264
- }
265
-
266
- `);else if(!e$)z.write(`
267
- const ${g}_present = ${T} in input;
268
- if (${g}.issues.length) {
269
- payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
270
- ...iss,
271
- path: iss.path ? [${T}, ...iss.path] : [${T}]
272
- })));
273
- }
274
- if (!${g}_present && !${g}.issues.length) {
275
- payload.issues.push({
276
- code: "invalid_type",
277
- expected: "nonoptional",
278
- input: undefined,
279
- path: [${T}]
280
- });
281
- }
282
-
283
- if (${g}_present) {
284
- if (${g}.value === undefined) {
285
- newResult[${T}] = undefined;
286
- } else {
287
- newResult[${T}] = ${g}.value;
288
- }
289
- }
290
-
291
- `);else z.write(`
292
- if (${g}.issues.length) {
293
- payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
294
- ...iss,
295
- path: iss.path ? [${T}, ...iss.path] : [${T}]
296
- })));
297
- }
298
-
299
- if (${g}.value === undefined) {
300
- if (${T} in input) {
301
- newResult[${T}] = undefined;
302
- }
303
- } else {
304
- newResult[${T}] = ${g}.value;
305
- }
306
-
307
- `)}z.write("payload.value = newResult;"),z.write("return payload;");let Z=z.compile();return(v,g)=>Z(V,v,g)},Y,Q=CD,W=!cX.jitless,U=W&&lB.value,B=D.catchall,H;$._zod.parse=(V,z)=>{H??(H=G.value);let L=V.value;if(!Q(L))return V.issues.push({expected:"object",code:"invalid_type",input:L,inst:$}),V;if(W&&U&&z?.async===!1&&z.jitless!==!0){if(!Y)Y=J(D.shape);if(V=Y(V,z),!B)return V;return d_([],L,V,z,H,$)}return X(V,z)}});function y_($,D,X,G){for(let Y of $)if(Y.issues.length===0)return D.value=Y.value,D;let J=$.filter((Y)=>!h0(Y));if(J.length===1)return D.value=J[0].value,J[0];return D.issues.push({code:"invalid_union",input:D.value,inst:X,errors:$.map((Y)=>Y.issues.map((Q)=>n1(Q,G,y1())))}),D}var pY=R("$ZodUnion",($,D)=>{D6.init($,D),g$($._zod,"optin",()=>D.options.some((G)=>G._zod.optin==="optional")?"optional":void 0),g$($._zod,"optout",()=>D.options.some((G)=>G._zod.optout==="optional")?"optional":void 0),g$($._zod,"values",()=>{if(D.options.every((G)=>G._zod.values))return new Set(D.options.flatMap((G)=>Array.from(G._zod.values)));return}),g$($._zod,"pattern",()=>{if(D.options.every((G)=>G._zod.pattern)){let G=D.options.map((J)=>J._zod.pattern);return new RegExp(`^(${G.map((J)=>Y8(J.source)).join("|")})$`)}return});let X=D.options.length===1?D.options[0]._zod.run:null;$._zod.parse=(G,J)=>{if(X)return X(G,J);let Y=!1,Q=[];for(let W of D.options){let I=W._zod.run({value:G.value,issues:[]},J);if(I instanceof Promise)Q.push(I),Y=!0;else{if(I.issues.length===0)return I;Q.push(I)}}if(!Y)return y_(Q,G,$,J);return Promise.all(Q).then((W)=>{return y_(W,G,$,J)})}});var Rz=R("$ZodDiscriminatedUnion",($,D)=>{D.inclusive=!1,pY.init($,D);let X=$._zod.parse;g$($._zod,"propValues",()=>{let J={};for(let Y of D.options){let Q=Y._zod.propValues;if(!Q||Object.keys(Q).length===0)throw Error(`Invalid discriminated union option at index "${D.options.indexOf(Y)}"`);for(let[W,I]of Object.entries(Q)){if(!J[W])J[W]=new Set;for(let U of I)J[W].add(U)}}return J});let G=iX(()=>{let J=D.options,Y=new Map;for(let Q of J){let W=Q._zod.propValues?.[D.discriminator];if(!W||W.size===0)throw Error(`Invalid discriminated union option at index "${D.options.indexOf(Q)}"`);for(let I of W){if(Y.has(I))throw Error(`Duplicate discriminator value "${String(I)}"`);Y.set(I,Q)}}return Y});$._zod.parse=(J,Y)=>{let Q=J.value;if(!CD(Q))return J.issues.push({code:"invalid_type",expected:"object",input:Q,inst:$}),J;let W=G.value.get(Q?.[D.discriminator]);if(W)return W._zod.run(J,Y);if(D.unionFallback||Y.direction==="backward")return X(J,Y);return J.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:D.discriminator,options:Array.from(G.value.keys()),input:Q,path:[D.discriminator],inst:$}),J}}),Ez=R("$ZodIntersection",($,D)=>{D6.init($,D),$._zod.parse=(X,G)=>{let J=X.value,Y=D.left._zod.run({value:J,issues:[]},G),Q=D.right._zod.run({value:J,issues:[]},G);if(Y instanceof Promise||Q instanceof Promise)return Promise.all([Y,Q]).then(([I,U])=>{return g_(X,I,U)});return g_(X,Y,Q)}});function Dz($,D){if($===D)return{valid:!0,data:$};if($ instanceof Date&&D instanceof Date&&+$===+D)return{valid:!0,data:$};if(x0($)&&x0(D)){let X=Object.keys(D),G=Object.keys($).filter((Y)=>X.indexOf(Y)!==-1),J={...$,...D};for(let Y of G){let Q=Dz($[Y],D[Y]);if(!Q.valid)return{valid:!1,mergeErrorPath:[Y,...Q.mergeErrorPath]};J[Y]=Q.data}return{valid:!0,data:J}}if(Array.isArray($)&&Array.isArray(D)){if($.length!==D.length)return{valid:!1,mergeErrorPath:[]};let X=[];for(let G=0;G<$.length;G++){let J=$[G],Y=D[G],Q=Dz(J,Y);if(!Q.valid)return{valid:!1,mergeErrorPath:[G,...Q.mergeErrorPath]};X.push(Q.data)}return{valid:!0,data:X}}return{valid:!1,mergeErrorPath:[]}}function g_($,D,X){let G=new Map,J;for(let W of D.issues)if(W.code==="unrecognized_keys"){J??(J=W);for(let I of W.keys){if(!G.has(I))G.set(I,{});G.get(I).l=!0}}else $.issues.push(W);for(let W of X.issues)if(W.code==="unrecognized_keys")for(let I of W.keys){if(!G.has(I))G.set(I,{});G.get(I).r=!0}else $.issues.push(W);let Y=[...G].filter(([,W])=>W.l&&W.r).map(([W])=>W);if(Y.length&&J)$.issues.push({...J,keys:Y});if(h0($))return $;let Q=Dz(D.value,X.value);if(!Q.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(Q.mergeErrorPath)}`);return $.value=Q.data,$}var Zz=R("$ZodRecord",($,D)=>{D6.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(!x0(J))return X.issues.push({expected:"record",code:"invalid_type",input:J,inst:$}),X;let Y=[],Q=D.keyType._zod.values;if(Q){X.value={};let W=new Set;for(let U of Q)if(typeof U==="string"||typeof U==="number"||typeof U==="symbol"){W.add(typeof U==="number"?U.toString():U);let B=D.keyType._zod.run({value:U,issues:[]},G);if(B instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(B.issues.length){X.issues.push({code:"invalid_key",origin:"record",issues:B.issues.map((z)=>n1(z,G,y1())),input:U,path:[U],inst:$});continue}let H=B.value,V=D.valueType._zod.run({value:J[U],issues:[]},G);if(V instanceof Promise)Y.push(V.then((z)=>{if(z.issues.length)X.issues.push(...G0(U,z.issues));X.value[H]=z.value}));else{if(V.issues.length)X.issues.push(...G0(U,V.issues));X.value[H]=V.value}}let I;for(let U in J)if(!W.has(U))I=I??[],I.push(U);if(I&&I.length>0)X.issues.push({code:"unrecognized_keys",input:J,inst:$,keys:I})}else{X.value={};for(let W of Reflect.ownKeys(J)){if(W==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(J,W))continue;let I=D.keyType._zod.run({value:W,issues:[]},G);if(I instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof W==="string"&&mY.test(W)&&I.issues.length){let H=D.keyType._zod.run({value:Number(W),issues:[]},G);if(H instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(H.issues.length===0)I=H}if(I.issues.length){if(D.mode==="loose")X.value[W]=J[W];else X.issues.push({code:"invalid_key",origin:"record",issues:I.issues.map((H)=>n1(H,G,y1())),input:W,path:[W],inst:$});continue}let B=D.valueType._zod.run({value:J[W],issues:[]},G);if(B instanceof Promise)Y.push(B.then((H)=>{if(H.issues.length)X.issues.push(...G0(W,H.issues));X.value[I.value]=H.value}));else{if(B.issues.length)X.issues.push(...G0(W,B.issues));X.value[I.value]=B.value}}}if(Y.length)return Promise.all(Y).then(()=>X);return X}});var Tz=R("$ZodEnum",($,D)=>{D6.init($,D);let X=J8(D.entries),G=new Set(X);$._zod.values=G,$._zod.pattern=new RegExp(`^(${X.filter((J)=>pB.has(typeof J)).map((J)=>typeof J==="string"?J0(J):J.toString()).join("|")})$`),$._zod.parse=(J,Y)=>{let Q=J.value;if(G.has(Q))return J;return J.issues.push({code:"invalid_value",values:X,input:Q,inst:$}),J}}),vz=R("$ZodLiteral",($,D)=>{if(D6.init($,D),D.values.length===0)throw Error("Cannot create literal schema with no valid values");let X=new Set(D.values);$._zod.values=X,$._zod.pattern=new RegExp(`^(${D.values.map((G)=>typeof G==="string"?J0(G):G?J0(G.toString()):String(G)).join("|")})$`),$._zod.parse=(G,J)=>{let Y=G.value;if(X.has(Y))return G;return G.issues.push({code:"invalid_value",values:D.values,input:Y,inst:$}),G}});var kz=R("$ZodTransform",($,D)=>{D6.init($,D),$._zod.optin="optional",$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new D8($.constructor.name);let J=D.transform(X.value,X);if(G.async)return(J instanceof Promise?J:Promise.resolve(J)).then((Q)=>{return X.value=Q,X.fallback=!0,X});if(J instanceof Promise)throw new D0;return X.value=J,X.fallback=!0,X}});function x_($,D){if(D===void 0&&($.issues.length||$.fallback))return{issues:[],value:void 0};return $}var rY=R("$ZodOptional",($,D)=>{D6.init($,D),$._zod.optin="optional",$._zod.optout="optional",g$($._zod,"values",()=>{return D.innerType._zod.values?new Set([...D.innerType._zod.values,void 0]):void 0}),g$($._zod,"pattern",()=>{let X=D.innerType._zod.pattern;return X?new RegExp(`^(${Y8(X.source)})?$`):void 0}),$._zod.parse=(X,G)=>{if(D.innerType._zod.optin==="optional"){let J=X.value,Y=D.innerType._zod.run(X,G);if(Y instanceof Promise)return Y.then((Q)=>x_(Q,J));return x_(Y,J)}if(X.value===void 0)return X;return D.innerType._zod.run(X,G)}}),Cz=R("$ZodExactOptional",($,D)=>{rY.init($,D),g$($._zod,"values",()=>D.innerType._zod.values),g$($._zod,"pattern",()=>D.innerType._zod.pattern),$._zod.parse=(X,G)=>{return D.innerType._zod.run(X,G)}}),yz=R("$ZodNullable",($,D)=>{D6.init($,D),g$($._zod,"optin",()=>D.innerType._zod.optin),g$($._zod,"optout",()=>D.innerType._zod.optout),g$($._zod,"pattern",()=>{let X=D.innerType._zod.pattern;return X?new RegExp(`^(${Y8(X.source)}|null)$`):void 0}),g$($._zod,"values",()=>{return D.innerType._zod.values?new Set([...D.innerType._zod.values,null]):void 0}),$._zod.parse=(X,G)=>{if(X.value===null)return X;return D.innerType._zod.run(X,G)}}),gz=R("$ZodDefault",($,D)=>{D6.init($,D),$._zod.optin="optional",g$($._zod,"values",()=>D.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);if(X.value===void 0)return X.value=D.defaultValue,X;let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>h_(Y,D));return h_(J,D)}});function h_($,D){if($.value===void 0)$.value=D.defaultValue;return $}var xz=R("$ZodPrefault",($,D)=>{D6.init($,D),$._zod.optin="optional",g$($._zod,"values",()=>D.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);if(X.value===void 0)X.value=D.defaultValue;return D.innerType._zod.run(X,G)}}),hz=R("$ZodNonOptional",($,D)=>{D6.init($,D),g$($._zod,"values",()=>{let X=D.innerType._zod.values;return X?new Set([...X].filter((G)=>G!==void 0)):void 0}),$._zod.parse=(X,G)=>{let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>u_(Y,$));return u_(J,$)}});function u_($,D){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:D});return $}var uz=R("$ZodCatch",($,D)=>{D6.init($,D),$._zod.optin="optional",g$($._zod,"optout",()=>D.innerType._zod.optout),g$($._zod,"values",()=>D.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>{if(X.value=Y.value,Y.issues.length)X.value=D.catchValue({...X,error:{issues:Y.issues.map((Q)=>n1(Q,G,y1()))},input:X.value}),X.issues=[],X.fallback=!0;return X});if(X.value=J.value,J.issues.length)X.value=D.catchValue({...X,error:{issues:J.issues.map((Y)=>n1(Y,G,y1()))},input:X.value}),X.issues=[],X.fallback=!0;return X}});var nY=R("$ZodPipe",($,D)=>{D6.init($,D),g$($._zod,"values",()=>D.in._zod.values),g$($._zod,"optin",()=>D.in._zod.optin),g$($._zod,"optout",()=>D.out._zod.optout),g$($._zod,"propValues",()=>D.in._zod.propValues),$._zod.parse=(X,G)=>{if(G.direction==="backward"){let Y=D.out._zod.run(X,G);if(Y instanceof Promise)return Y.then((Q)=>cY(Q,D.in,G));return cY(Y,D.in,G)}let J=D.in._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>cY(Y,D.out,G));return cY(J,D.out,G)}});function cY($,D,X){if($.issues.length)return $.aborted=!0,$;return D._zod.run({value:$.value,issues:$.issues,fallback:$.fallback},X)}var t_=R("$ZodPreprocess",($,D)=>{nY.init($,D)}),fz=R("$ZodReadonly",($,D)=>{D6.init($,D),g$($._zod,"propValues",()=>D.innerType._zod.propValues),g$($._zod,"values",()=>D.innerType._zod.values),g$($._zod,"optin",()=>D.innerType?._zod?.optin),g$($._zod,"optout",()=>D.innerType?._zod?.optout),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then(f_);return f_(J)}});function f_($){return $.value=Object.freeze($.value),$}var mz=R("$ZodCustom",($,D)=>{g6.init($,D),D6.init($,D),$._zod.parse=(X,G)=>{return X},$._zod.check=(X)=>{let G=X.value,J=D.fn(G);if(J instanceof Promise)return J.then((Y)=>m_(Y,X,G,$));m_(J,X,G,$);return}});function m_($,D,X,G){if(!$){let J={code:"custom",input:X,inst:G,path:[...G._zod.def.path??[]],continue:!G._zod.def.abort};if(G._zod.def.params)J.params=G._zod.def.params;D.issues.push(pX(J))}}var $r=()=>{let $={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 D(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=oB(J.input),W=G[Q]??Q;return`Invalid input: expected ${Y}, received ${W}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${xY(J.values[0])}`;return`Invalid option: expected one of ${CY(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Too big: expected ${J.origin??"value"} to have ${Y}${J.maximum.toString()} ${Q.unit??"elements"}`;return`Too big: expected ${J.origin??"value"} to be ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Too small: expected ${J.origin} to have ${Y}${J.minimum.toString()} ${Q.unit}`;return`Too small: expected ${J.origin} to be ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Invalid string: must start with "${Y.prefix}"`;if(Y.format==="ends_with")return`Invalid string: must end with "${Y.suffix}"`;if(Y.format==="includes")return`Invalid string: must include "${Y.includes}"`;if(Y.format==="regex")return`Invalid string: must match pattern ${Y.pattern}`;return`Invalid ${X[Y.format]??J.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${J.divisor}`;case"unrecognized_keys":return`Unrecognized key${J.keys.length>1?"s":""}: ${CY(J.keys,", ")}`;case"invalid_key":return`Invalid key in ${J.origin}`;case"invalid_union":if(J.options&&Array.isArray(J.options)&&J.options.length>0)return`Invalid discriminator value. Expected ${J.options.map((Q)=>`'${Q}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${J.origin}`;default:return"Invalid input"}}};function cz(){return{localeError:$r()}}var a_,OI$=Symbol("ZodOutput"),FI$=Symbol("ZodInput");class s_{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...D){let X=D[0];if(this._map.set($,X),X&&typeof X==="object"&&"id"in X)this._idmap.set(X.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let D=this._map.get($);if(D&&typeof D==="object"&&"id"in D)this._idmap.delete(D.id);return this._map.delete($),this}get($){let D=$._zod.parent;if(D){let X={...this.get(D)??{}};delete X.id;let G={...X,...this._map.get($)};return Object.keys(G).length?G:void 0}return this._map.get($)}has($){return this._map.has($)}}function Dr(){return new s_}(a_=globalThis).__zod_globalRegistry??(a_.__zod_globalRegistry=Dr());var xD=globalThis.__zod_globalRegistry;function lz($,D){return new $({type:"string",...J$(D)})}function iz($,D){return new $({type:"string",format:"email",check:"string_format",abort:!1,...J$(D)})}function dY($,D){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...J$(D)})}function pz($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...J$(D)})}function rz($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...J$(D)})}function nz($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...J$(D)})}function dz($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...J$(D)})}function oz($,D){return new $({type:"string",format:"url",check:"string_format",abort:!1,...J$(D)})}function tz($,D){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...J$(D)})}function az($,D){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...J$(D)})}function sz($,D){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...J$(D)})}function ez($,D){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...J$(D)})}function $q($,D){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...J$(D)})}function Dq($,D){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...J$(D)})}function Xq($,D){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...J$(D)})}function Jq($,D){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...J$(D)})}function Gq($,D){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...J$(D)})}function Yq($,D){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...J$(D)})}function Qq($,D){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...J$(D)})}function Wq($,D){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...J$(D)})}function Iq($,D){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...J$(D)})}function Uq($,D){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...J$(D)})}function Bq($,D){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...J$(D)})}function e_($,D){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...J$(D)})}function $N($,D){return new $({type:"string",format:"date",check:"string_format",...J$(D)})}function DN($,D){return new $({type:"string",format:"time",check:"string_format",precision:null,...J$(D)})}function XN($,D){return new $({type:"string",format:"duration",check:"string_format",...J$(D)})}function zq($,D){return new $({type:"number",checks:[],...J$(D)})}function qq($,D){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...J$(D)})}function Hq($,D){return new $({type:"boolean",...J$(D)})}function Kq($,D){return new $({type:"null",...J$(D)})}function Vq($){return new $({type:"unknown"})}function wq($,D){return new $({type:"never",...J$(D)})}function oY($,D){return new sB({check:"less_than",...J$(D),value:$,inclusive:!1})}function V8($,D){return new sB({check:"less_than",...J$(D),value:$,inclusive:!0})}function tY($,D){return new eB({check:"greater_than",...J$(D),value:$,inclusive:!1})}function w8($,D){return new eB({check:"greater_than",...J$(D),value:$,inclusive:!0})}function aY($,D){return new b_({check:"multiple_of",...J$(D),value:$})}function sY($,D){return new A_({check:"max_length",...J$(D),maximum:$})}function rX($,D){return new M_({check:"min_length",...J$(D),minimum:$})}function eY($,D){return new S_({check:"length_equals",...J$(D),length:$})}function Lq($,D){return new P_({check:"string_format",format:"regex",...J$(D),pattern:$})}function Oq($){return new __({check:"string_format",format:"lowercase",...J$($)})}function Fq($){return new N_({check:"string_format",format:"uppercase",...J$($)})}function bq($,D){return new R_({check:"string_format",format:"includes",...J$(D),includes:$})}function jq($,D){return new E_({check:"string_format",format:"starts_with",...J$(D),prefix:$})}function Aq($,D){return new Z_({check:"string_format",format:"ends_with",...J$(D),suffix:$})}function u0($){return new T_({check:"overwrite",tx:$})}function Mq($){return u0((D)=>D.normalize($))}function Sq(){return u0(($)=>$.trim())}function Pq(){return u0(($)=>$.toLowerCase())}function _q(){return u0(($)=>$.toUpperCase())}function Nq(){return u0(($)=>cB($))}function JN($,D,X){return new $({type:"array",element:D,...J$(X)})}function Rq($,D,X){let G=J$(X);return G.abort??(G.abort=!0),new $({type:"custom",check:"custom",fn:D,...G})}function Eq($,D,X){return new $({type:"custom",check:"custom",fn:D,...J$(X)})}function Zq($,D){let X=Xr((G)=>{return G.addIssue=(J)=>{if(typeof J==="string")G.issues.push(pX(J,G.value,X._zod.def));else{let Y=J;if(Y.fatal)Y.continue=!1;Y.code??(Y.code="custom"),Y.input??(Y.input=G.value),Y.inst??(Y.inst=X),Y.continue??(Y.continue=!X._zod.def.abort),G.issues.push(pX(Y))}},$(G.value,G)},D);return X}function Xr($,D){let X=new g6({check:"custom",...J$(D)});return X._zod.check=$,X}function O8($){let D=$?.target??"draft-2020-12";if(D==="draft-4")D="draft-04";if(D==="draft-7")D="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??xD,target:D,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function X6($,D,X={path:[],schemaPath:[]}){var G;let J=$._zod.def,Y=D.seen.get($);if(Y){if(Y.count++,X.schemaPath.includes($))Y.cycle=X.path;return Y.schema}let Q={schema:{},count:1,cycle:void 0,path:X.path};D.seen.set($,Q);let W=$._zod.toJSONSchema?.();if(W)Q.schema=W;else{let B={...X,schemaPath:[...X.schemaPath,$],path:X.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(D,Q.schema,B);else{let V=Q.schema,z=D.processors[J.type];if(!z)throw Error(`[toJSONSchema]: Non-representable type encountered: ${J.type}`);z($,D,V,B)}let H=$._zod.parent;if(H){if(!Q.ref)Q.ref=H;X6(H,D,B),D.seen.get(H).isParent=!0}}let I=D.metadataRegistry.get($);if(I)Object.assign(Q.schema,I);if(D.io==="input"&&W1($))delete Q.schema.examples,delete Q.schema.default;if(D.io==="input"&&"_prefault"in Q.schema)(G=Q.schema).default??(G.default=Q.schema._prefault);return delete Q.schema._prefault,D.seen.get($).schema}function F8($,D){let X=$.seen.get(D);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=new Map;for(let Q of $.seen.entries()){let W=$.metadataRegistry.get(Q[0])?.id;if(W){let I=G.get(W);if(I&&I!==Q[0])throw Error(`Duplicate schema id "${W}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);G.set(W,Q[0])}}let J=(Q)=>{let W=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let H=$.external.registry.get(Q[0])?.id,V=$.external.uri??((L)=>L);if(H)return{ref:V(H)};let z=Q[1].defId??Q[1].schema.id??`schema${$.counter++}`;return Q[1].defId=z,{defId:z,ref:`${V("__shared")}#/${W}/${z}`}}if(Q[1]===X)return{ref:"#"};let U=`${"#"}/${W}/`,B=Q[1].schema.id??`__schema${$.counter++}`;return{defId:B,ref:U+B}},Y=(Q)=>{if(Q[1].schema.$ref)return;let W=Q[1],{ref:I,defId:U}=J(Q);if(W.def={...W.schema},U)W.defId=U;let B=W.schema;for(let H in B)delete B[H];B.$ref=I};if($.cycles==="throw")for(let Q of $.seen.entries()){let W=Q[1];if(W.cycle)throw Error(`Cycle detected: #/${W.cycle?.join("/")}/<root>
308
-
309
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Q of $.seen.entries()){let W=Q[1];if(D===Q[0]){Y(Q);continue}if($.external){let U=$.external.registry.get(Q[0])?.id;if(D!==Q[0]&&U){Y(Q);continue}}if($.metadataRegistry.get(Q[0])?.id){Y(Q);continue}if(W.cycle){Y(Q);continue}if(W.count>1){if($.reused==="ref"){Y(Q);continue}}}}function b8($,D){let X=$.seen.get(D);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=(W)=>{let I=$.seen.get(W);if(I.ref===null)return;let U=I.def??I.schema,B={...U},H=I.ref;if(I.ref=null,H){G(H);let z=$.seen.get(H),L=z.schema;if(L.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))U.allOf=U.allOf??[],U.allOf.push(L);else Object.assign(U,L);if(Object.assign(U,B),W._zod.parent===H)for(let b in U){if(b==="$ref"||b==="allOf")continue;if(!(b in B))delete U[b]}if(L.$ref&&z.def)for(let b in U){if(b==="$ref"||b==="allOf")continue;if(b in z.def&&JSON.stringify(U[b])===JSON.stringify(z.def[b]))delete U[b]}}let V=W._zod.parent;if(V&&V!==H){G(V);let z=$.seen.get(V);if(z?.schema.$ref){if(U.$ref=z.schema.$ref,z.def)for(let L in U){if(L==="$ref"||L==="allOf")continue;if(L in z.def&&JSON.stringify(U[L])===JSON.stringify(z.def[L]))delete U[L]}}}$.override({zodSchema:W,jsonSchema:U,path:I.path??[]})};for(let W of[...$.seen.entries()].reverse())G(W[0]);let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let W=$.external.registry.get(D)?.id;if(!W)throw Error("Schema is missing an `id` property");J.$id=$.external.uri(W)}Object.assign(J,X.def??X.schema);let Y=$.metadataRegistry.get(D)?.id;if(Y!==void 0&&J.id===Y)delete J.id;let Q=$.external?.defs??{};for(let W of $.seen.entries()){let I=W[1];if(I.def&&I.defId){if(I.def.id===I.defId)delete I.def.id;Q[I.defId]=I.def}}if($.external);else if(Object.keys(Q).length>0)if($.target==="draft-2020-12")J.$defs=Q;else J.definitions=Q;try{let W=JSON.parse(JSON.stringify(J));return Object.defineProperty(W,"~standard",{value:{...D["~standard"],jsonSchema:{input:L8(D,"input",$.processors),output:L8(D,"output",$.processors)}},enumerable:!1,writable:!1}),W}catch(W){throw Error("Error converting schema to JSON.")}}function W1($,D){let X=D??{seen:new Set};if(X.seen.has($))return!1;X.seen.add($);let G=$._zod.def;if(G.type==="transform")return!0;if(G.type==="array")return W1(G.element,X);if(G.type==="set")return W1(G.valueType,X);if(G.type==="lazy")return W1(G.getter(),X);if(G.type==="promise"||G.type==="optional"||G.type==="nonoptional"||G.type==="nullable"||G.type==="readonly"||G.type==="default"||G.type==="prefault")return W1(G.innerType,X);if(G.type==="intersection")return W1(G.left,X)||W1(G.right,X);if(G.type==="record"||G.type==="map")return W1(G.keyType,X)||W1(G.valueType,X);if(G.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return W1(G.in,X)||W1(G.out,X)}if(G.type==="object"){for(let J in G.shape)if(W1(G.shape[J],X))return!0;return!1}if(G.type==="union"){for(let J of G.options)if(W1(J,X))return!0;return!1}if(G.type==="tuple"){for(let J of G.items)if(W1(J,X))return!0;if(G.rest&&W1(G.rest,X))return!0;return!1}return!1}var GN=($,D={})=>(X)=>{let G=O8({...X,processors:D});return X6($,G),F8(G,$),b8(G,$)},L8=($,D,X={})=>(G)=>{let{libraryOptions:J,target:Y}=G??{},Q=O8({...J??{},target:Y,io:D,processors:X});return X6($,Q),F8(Q,$),b8(Q,$)};var Jr={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Tq=($,D,X,G)=>{let J=X;J.type="string";let{minimum:Y,maximum:Q,format:W,patterns:I,contentEncoding:U}=$._zod.bag;if(typeof Y==="number")J.minLength=Y;if(typeof Q==="number")J.maxLength=Q;if(W){if(J.format=Jr[W]??W,J.format==="")delete J.format;if(W==="time")delete J.format}if(U)J.contentEncoding=U;if(I&&I.size>0){let B=[...I];if(B.length===1)J.pattern=B[0].source;else if(B.length>1)J.allOf=[...B.map((H)=>({...D.target==="draft-07"||D.target==="draft-04"||D.target==="openapi-3.0"?{type:"string"}:{},pattern:H.source}))]}},vq=($,D,X,G)=>{let J=X,{minimum:Y,maximum:Q,format:W,multipleOf:I,exclusiveMaximum:U,exclusiveMinimum:B}=$._zod.bag;if(typeof W==="string"&&W.includes("int"))J.type="integer";else J.type="number";let H=typeof B==="number"&&B>=(Y??Number.NEGATIVE_INFINITY),V=typeof U==="number"&&U<=(Q??Number.POSITIVE_INFINITY),z=D.target==="draft-04"||D.target==="openapi-3.0";if(H)if(z)J.minimum=B,J.exclusiveMinimum=!0;else J.exclusiveMinimum=B;else if(typeof Y==="number")J.minimum=Y;if(V)if(z)J.maximum=U,J.exclusiveMaximum=!0;else J.exclusiveMaximum=U;else if(typeof Q==="number")J.maximum=Q;if(typeof I==="number")J.multipleOf=I},kq=($,D,X,G)=>{X.type="boolean"},QN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},WN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Cq=($,D,X,G)=>{if(D.target==="openapi-3.0")X.type="string",X.nullable=!0,X.enum=[null];else X.type="null"},IN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},UN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},yq=($,D,X,G)=>{X.not={}},BN=($,D,X,G)=>{},gq=($,D,X,G)=>{},zN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},xq=($,D,X,G)=>{let J=$._zod.def,Y=J8(J.entries);if(Y.every((Q)=>typeof Q==="number"))X.type="number";if(Y.every((Q)=>typeof Q==="string"))X.type="string";X.enum=Y},hq=($,D,X,G)=>{let J=$._zod.def,Y=[];for(let Q of J.values)if(Q===void 0){if(D.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof Q==="bigint")if(D.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else Y.push(Number(Q));else Y.push(Q);if(Y.length===0);else if(Y.length===1){let Q=Y[0];if(X.type=Q===null?"null":typeof Q,D.target==="draft-04"||D.target==="openapi-3.0")X.enum=[Q];else X.const=Q}else{if(Y.every((Q)=>typeof Q==="number"))X.type="number";if(Y.every((Q)=>typeof Q==="string"))X.type="string";if(Y.every((Q)=>typeof Q==="boolean"))X.type="boolean";if(Y.every((Q)=>Q===null))X.type="null";X.enum=Y}},qN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},HN=($,D,X,G)=>{let J=X,Y=$._zod.pattern;if(!Y)throw Error("Pattern not found in template literal");J.type="string",J.pattern=Y.source},KN=($,D,X,G)=>{let J=X,Y={type:"string",format:"binary",contentEncoding:"binary"},{minimum:Q,maximum:W,mime:I}=$._zod.bag;if(Q!==void 0)Y.minLength=Q;if(W!==void 0)Y.maxLength=W;if(I)if(I.length===1)Y.contentMediaType=I[0],Object.assign(J,Y);else Object.assign(J,Y),J.anyOf=I.map((U)=>({contentMediaType:U}));else Object.assign(J,Y)},VN=($,D,X,G)=>{X.type="boolean"},uq=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},wN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},fq=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},LN=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},ON=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},mq=($,D,X,G)=>{let J=X,Y=$._zod.def,{minimum:Q,maximum:W}=$._zod.bag;if(typeof Q==="number")J.minItems=Q;if(typeof W==="number")J.maxItems=W;J.type="array",J.items=X6(Y.element,D,{...G,path:[...G.path,"items"]})},cq=($,D,X,G)=>{let J=X,Y=$._zod.def;J.type="object",J.properties={};let Q=Y.shape;for(let U in Q)J.properties[U]=X6(Q[U],D,{...G,path:[...G.path,"properties",U]});let W=new Set(Object.keys(Q)),I=new Set([...W].filter((U)=>{let B=Y.shape[U]._zod;if(D.io==="input")return B.optin===void 0;else return B.optout===void 0}));if(I.size>0)J.required=Array.from(I);if(Y.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!Y.catchall){if(D.io==="output")J.additionalProperties=!1}else if(Y.catchall)J.additionalProperties=X6(Y.catchall,D,{...G,path:[...G.path,"additionalProperties"]})},lq=($,D,X,G)=>{let J=$._zod.def,Y=J.inclusive===!1,Q=J.options.map((W,I)=>X6(W,D,{...G,path:[...G.path,Y?"oneOf":"anyOf",I]}));if(Y)X.oneOf=Q;else X.anyOf=Q},iq=($,D,X,G)=>{let J=$._zod.def,Y=X6(J.left,D,{...G,path:[...G.path,"allOf",0]}),Q=X6(J.right,D,{...G,path:[...G.path,"allOf",1]}),W=(U)=>("allOf"in U)&&Object.keys(U).length===1,I=[...W(Y)?Y.allOf:[Y],...W(Q)?Q.allOf:[Q]];X.allOf=I},FN=($,D,X,G)=>{let J=X,Y=$._zod.def;J.type="array";let Q=D.target==="draft-2020-12"?"prefixItems":"items",W=D.target==="draft-2020-12"?"items":D.target==="openapi-3.0"?"items":"additionalItems",I=Y.items.map((V,z)=>X6(V,D,{...G,path:[...G.path,Q,z]})),U=Y.rest?X6(Y.rest,D,{...G,path:[...G.path,W,...D.target==="openapi-3.0"?[Y.items.length]:[]]}):null;if(D.target==="draft-2020-12"){if(J.prefixItems=I,U)J.items=U}else if(D.target==="openapi-3.0"){if(J.items={anyOf:I},U)J.items.anyOf.push(U);if(J.minItems=I.length,!U)J.maxItems=I.length}else if(J.items=I,U)J.additionalItems=U;let{minimum:B,maximum:H}=$._zod.bag;if(typeof B==="number")J.minItems=B;if(typeof H==="number")J.maxItems=H},pq=($,D,X,G)=>{let J=X,Y=$._zod.def;J.type="object";let Q=Y.keyType,I=Q._zod.bag?.patterns;if(Y.mode==="loose"&&I&&I.size>0){let B=X6(Y.valueType,D,{...G,path:[...G.path,"patternProperties","*"]});J.patternProperties={};for(let H of I)J.patternProperties[H.source]=B}else{if(D.target==="draft-07"||D.target==="draft-2020-12")J.propertyNames=X6(Y.keyType,D,{...G,path:[...G.path,"propertyNames"]});J.additionalProperties=X6(Y.valueType,D,{...G,path:[...G.path,"additionalProperties"]})}let U=Q._zod.values;if(U){let B=[...U].filter((H)=>typeof H==="string"||typeof H==="number");if(B.length>0)J.required=B}},rq=($,D,X,G)=>{let J=$._zod.def,Y=X6(J.innerType,D,G),Q=D.seen.get($);if(D.target==="openapi-3.0")Q.ref=J.innerType,X.nullable=!0;else X.anyOf=[Y,{type:"null"}]},nq=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType},dq=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType,X.default=JSON.parse(JSON.stringify(J.defaultValue))},oq=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);if(Y.ref=J.innerType,D.io==="input")X._prefault=JSON.parse(JSON.stringify(J.defaultValue))},tq=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType;let Q;try{Q=J.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}X.default=Q},aq=($,D,X,G)=>{let J=$._zod.def,Y=J.in._zod.traits.has("$ZodTransform"),Q=D.io==="input"?Y?J.out:J.in:J.out;X6(Q,D,G);let W=D.seen.get($);W.ref=Q},sq=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType,X.readOnly=!0},bN=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType},$Q=($,D,X,G)=>{let J=$._zod.def;X6(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType},jN=($,D,X,G)=>{let J=$._zod.innerType;X6(J,D,G);let Y=D.seen.get($);Y.ref=J},YN={string:Tq,number:vq,boolean:kq,bigint:QN,symbol:WN,null:Cq,undefined:IN,void:UN,never:yq,any:BN,unknown:gq,date:zN,enum:xq,literal:hq,nan:qN,template_literal:HN,file:KN,success:VN,custom:uq,function:wN,transform:fq,map:LN,set:ON,array:mq,object:cq,union:lq,intersection:iq,tuple:FN,record:pq,nullable:rq,nonoptional:nq,default:dq,prefault:oq,catch:tq,pipe:aq,readonly:sq,promise:bN,optional:$Q,lazy:jN};function eq($,D){if("_idmap"in $){let G=$,J=O8({...D,processors:YN}),Y={};for(let I of G._idmap.entries()){let[U,B]=I;X6(B,J)}let Q={},W={registry:G,uri:D?.uri,defs:Y};J.external=W;for(let I of G._idmap.entries()){let[U,B]=I;F8(J,B),Q[U]=b8(J,B)}if(Object.keys(Y).length>0){let I=J.target==="draft-2020-12"?"$defs":"definitions";Q.__shared={[I]:Y}}return{schemas:Q}}let X=O8({...D,processors:YN});return X6($,X),F8(X,$),b8(X,$)}var rr=R("ZodMiniType",($,D)=>{if(!$._zod)throw Error("Uninitialized schema in ZodMiniType.");D6.init($,D),$.def=D,$.type=D.type,$.parse=(X,G)=>uY($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>yD($,X,G),$.parseAsync=async(X,G)=>fY($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>gD($,X,G),$.check=(...X)=>{return $.clone({...D,checks:[...D.checks??[],...X.map((G)=>typeof G==="function"?{_zod:{check:G,def:{check:"custom"},onattach:[]}}:G)]},{parent:!0})},$.with=$.check,$.clone=(X,G)=>g1($,X,G),$.brand=()=>$,$.register=(X,G)=>{return X.add($,G),$},$.apply=(X)=>X($)});var nr=R("ZodMiniObject",($,D)=>{Nz.init($,D),rr.init($,D),g$($,"shape",()=>D.shape)});function $H($,D){let X={type:"object",shape:$??{},...J$(D)};return new nr(X)}function d1($){return!!$._zod}function uD($){let D=Object.values($);if(D.length===0)return $H({});let X=D.every(d1),G=D.every((J)=>!d1(J));if(X)return $H($);if(G)return FP($);throw Error("Mixed Zod versions detected in object shape.")}function f0($,D){if(d1($))return yD($,D);return $.safeParse(D)}async function DQ($,D){if(d1($))return await gD($,D);return await $.safeParseAsync(D)}function m0($){if(!$)return;let D;if(d1($))D=$._zod?.def?.shape;else D=$.shape;if(!D)return;if(typeof D==="function")try{return D()}catch{return}return D}function nX($){if(!$)return;if(typeof $==="object"){let D=$,X=$;if(!D._def&&!X._zod){let G=Object.values($);if(G.length>0&&G.every((J)=>typeof J==="object"&&J!==null&&(J._def!==void 0||J._zod!==void 0||typeof J.parse==="function")))return uD($)}}if(d1($)){let X=$._zod?.def;if(X&&(X.type==="object"||X.shape!==void 0))return $}else if($.shape!==void 0)return $;return}function XQ($){if($&&typeof $==="object"){if("message"in $&&typeof $.message==="string")return $.message;if("issues"in $&&Array.isArray($.issues)&&$.issues.length>0){let D=$.issues[0];if(D&&typeof D==="object"&&"message"in D)return String(D.message)}try{return JSON.stringify($)}catch{return String($)}}return String($)}function MN($){return $.description}function SN($){if(d1($))return $._zod?.def?.type==="optional";let D=$;if(typeof $.isOptional==="function")return $.isOptional();return D._def?.typeName==="ZodOptional"}function JQ($){if(d1($)){let Y=$._zod?.def;if(Y){if(Y.value!==void 0)return Y.value;if(Array.isArray(Y.values)&&Y.values.length>0)return Y.values[0]}}let X=$._def;if(X){if(X.value!==void 0)return X.value;if(Array.isArray(X.values)&&X.values.length>0)return X.values[0]}let G=$.value;if(G!==void 0)return G;return}var j8={};X4(j8,{time:()=>JH,duration:()=>GH,datetime:()=>DH,date:()=>XH,ZodISOTime:()=>NN,ZodISODuration:()=>RN,ZodISODateTime:()=>PN,ZodISODate:()=>_N});var PN=R("ZodISODateTime",($,D)=>{c_.init($,D),z6.init($,D)});function DH($){return e_(PN,$)}var _N=R("ZodISODate",($,D)=>{l_.init($,D),z6.init($,D)});function XH($){return $N(_N,$)}var NN=R("ZodISOTime",($,D)=>{i_.init($,D),z6.init($,D)});function JH($){return DN(NN,$)}var RN=R("ZodISODuration",($,D)=>{p_.init($,D),z6.init($,D)});function GH($){return XN(RN,$)}var Dn=($,D)=>{hY.init($,D),$.name="ZodError",Object.defineProperties($,{format:{value:(X)=>gP($,X)},flatten:{value:(X)=>yP($,X)},addIssue:{value:(X)=>{$.issues.push(X),$.message=JSON.stringify($.issues,lX,2)}},addIssues:{value:(X)=>{$.issues.push(...X),$.message=JSON.stringify($.issues,lX,2)}},isEmpty:{get(){return $.issues.length===0}}})};var x1=R("ZodError",Dn,{Parent:Error});var EN=I8(x1),ZN=U8(x1),TN=B8(x1),vN=z8(x1),kN=xP(x1),CN=hP(x1),yN=uP(x1),gN=fP(x1),xN=mP(x1),hN=cP(x1),uN=lP(x1),fN=iP(x1);var mN=new WeakMap;function A8($,D,X){let G=Object.getPrototypeOf($),J=mN.get(G);if(!J)J=new Set,mN.set(G,J);if(J.has(D))return;J.add(D);for(let Y in X){let Q=X[Y];Object.defineProperty(G,Y,{configurable:!0,enumerable:!1,get(){let W=Q.bind(this);return Object.defineProperty(this,Y,{configurable:!0,writable:!0,enumerable:!0,value:W}),W},set(W){Object.defineProperty(this,Y,{configurable:!0,writable:!0,enumerable:!0,value:W})}})}}var K6=R("ZodType",($,D)=>{return D6.init($,D),Object.assign($["~standard"],{jsonSchema:{input:L8($,"input"),output:L8($,"output")}}),$.toJSONSchema=GN($,{}),$.def=D,$.type=D.type,Object.defineProperty($,"_def",{value:D}),$.parse=(X,G)=>EN($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>TN($,X,G),$.parseAsync=async(X,G)=>ZN($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>vN($,X,G),$.spa=$.safeParseAsync,$.encode=(X,G)=>kN($,X,G),$.decode=(X,G)=>CN($,X,G),$.encodeAsync=async(X,G)=>yN($,X,G),$.decodeAsync=async(X,G)=>gN($,X,G),$.safeEncode=(X,G)=>xN($,X,G),$.safeDecode=(X,G)=>hN($,X,G),$.safeEncodeAsync=async(X,G)=>uN($,X,G),$.safeDecodeAsync=async(X,G)=>fN($,X,G),A8($,"ZodType",{check(...X){let G=this.def;return this.clone(_$.mergeDefs(G,{checks:[...G.checks??[],...X.map((J)=>typeof J==="function"?{_zod:{check:J,def:{check:"custom"},onattach:[]}}:J)]}),{parent:!0})},with(...X){return this.check(...X)},clone(X,G){return g1(this,X,G)},brand(){return this},register(X,G){return X.add(this,G),this},refine(X,G){return this.check(rn(X,G))},superRefine(X,G){return this.check(nn(X,G))},overwrite(X){return this.check(u0(X))},optional(){return H6(this)},exactOptional(){return kn(this)},nullable(){return pN(this)},nullish(){return H6(pN(this))},nonoptional(X){return un(this,X)},array(){return N$(this)},or(X){return I6([this,X])},and(X){return YQ(this,X)},transform(X){return rN(this,sN(X))},default(X){return gn(this,X)},prefault(X){return hn(this,X)},catch(X){return mn(this,X)},pipe(X){return rN(this,X)},readonly(){return pn(this)},describe(X){let G=this.clone();return xD.add(G,{description:X}),G},meta(...X){if(X.length===0)return xD.get(this);let G=this.clone();return xD.add(G,X[0]),G},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(X){return X(this)}}),Object.defineProperty($,"description",{get(){return xD.get($)?.description},configurable:!0}),$}),nN=R("_ZodString",($,D)=>{K8.init($,D),K6.init($,D),$._zod.processJSONSchema=(G,J,Y)=>Tq($,G,J,Y);let X=$._zod.bag;$.format=X.format??null,$.minLength=X.minimum??null,$.maxLength=X.maximum??null,A8($,"_ZodString",{regex(...G){return this.check(Lq(...G))},includes(...G){return this.check(bq(...G))},startsWith(...G){return this.check(jq(...G))},endsWith(...G){return this.check(Aq(...G))},min(...G){return this.check(rX(...G))},max(...G){return this.check(sY(...G))},length(...G){return this.check(eY(...G))},nonempty(...G){return this.check(rX(1,...G))},lowercase(G){return this.check(Oq(G))},uppercase(G){return this.check(Fq(G))},trim(){return this.check(Sq())},normalize(...G){return this.check(Mq(...G))},toLowerCase(){return this.check(Pq())},toUpperCase(){return this.check(_q())},slugify(){return this.check(Nq())}})}),Jn=R("ZodString",($,D)=>{K8.init($,D),nN.init($,D),$.email=(X)=>$.check(iz(Gn,X)),$.url=(X)=>$.check(oz(Yn,X)),$.jwt=(X)=>$.check(Bq(bn,X)),$.emoji=(X)=>$.check(tz(Qn,X)),$.guid=(X)=>$.check(dY(cN,X)),$.uuid=(X)=>$.check(pz(GQ,X)),$.uuidv4=(X)=>$.check(rz(GQ,X)),$.uuidv6=(X)=>$.check(nz(GQ,X)),$.uuidv7=(X)=>$.check(dz(GQ,X)),$.nanoid=(X)=>$.check(az(Wn,X)),$.guid=(X)=>$.check(dY(cN,X)),$.cuid=(X)=>$.check(sz(In,X)),$.cuid2=(X)=>$.check(ez(Un,X)),$.ulid=(X)=>$.check($q(Bn,X)),$.base64=(X)=>$.check(Wq(Ln,X)),$.base64url=(X)=>$.check(Iq(On,X)),$.xid=(X)=>$.check(Dq(zn,X)),$.ksuid=(X)=>$.check(Xq(qn,X)),$.ipv4=(X)=>$.check(Jq(Hn,X)),$.ipv6=(X)=>$.check(Gq(Kn,X)),$.cidrv4=(X)=>$.check(Yq(Vn,X)),$.cidrv6=(X)=>$.check(Qq(wn,X)),$.e164=(X)=>$.check(Uq(Fn,X)),$.datetime=(X)=>$.check(DH(X)),$.date=(X)=>$.check(XH(X)),$.time=(X)=>$.check(JH(X)),$.duration=(X)=>$.check(GH(X))});function _($){return lz(Jn,$)}var z6=R("ZodStringFormat",($,D)=>{Y6.init($,D),nN.init($,D)}),Gn=R("ZodEmail",($,D)=>{Gz.init($,D),z6.init($,D)});var cN=R("ZodGUID",($,D)=>{Xz.init($,D),z6.init($,D)});var GQ=R("ZodUUID",($,D)=>{Jz.init($,D),z6.init($,D)});var Yn=R("ZodURL",($,D)=>{Yz.init($,D),z6.init($,D)});var Qn=R("ZodEmoji",($,D)=>{Qz.init($,D),z6.init($,D)});var Wn=R("ZodNanoID",($,D)=>{Wz.init($,D),z6.init($,D)});var In=R("ZodCUID",($,D)=>{Iz.init($,D),z6.init($,D)});var Un=R("ZodCUID2",($,D)=>{Uz.init($,D),z6.init($,D)});var Bn=R("ZodULID",($,D)=>{Bz.init($,D),z6.init($,D)});var zn=R("ZodXID",($,D)=>{zz.init($,D),z6.init($,D)});var qn=R("ZodKSUID",($,D)=>{qz.init($,D),z6.init($,D)});var Hn=R("ZodIPv4",($,D)=>{Hz.init($,D),z6.init($,D)});var Kn=R("ZodIPv6",($,D)=>{Kz.init($,D),z6.init($,D)});var Vn=R("ZodCIDRv4",($,D)=>{Vz.init($,D),z6.init($,D)});var wn=R("ZodCIDRv6",($,D)=>{wz.init($,D),z6.init($,D)});var Ln=R("ZodBase64",($,D)=>{Lz.init($,D),z6.init($,D)});var On=R("ZodBase64URL",($,D)=>{Oz.init($,D),z6.init($,D)});var Fn=R("ZodE164",($,D)=>{Fz.init($,D),z6.init($,D)});var bn=R("ZodJWT",($,D)=>{bz.init($,D),z6.init($,D)});var dN=R("ZodNumber",($,D)=>{iY.init($,D),K6.init($,D),$._zod.processJSONSchema=(G,J,Y)=>vq($,G,J,Y),A8($,"ZodNumber",{gt(G,J){return this.check(tY(G,J))},gte(G,J){return this.check(w8(G,J))},min(G,J){return this.check(w8(G,J))},lt(G,J){return this.check(oY(G,J))},lte(G,J){return this.check(V8(G,J))},max(G,J){return this.check(V8(G,J))},int(G){return this.check(lN(G))},safe(G){return this.check(lN(G))},positive(G){return this.check(tY(0,G))},nonnegative(G){return this.check(w8(0,G))},negative(G){return this.check(oY(0,G))},nonpositive(G){return this.check(V8(0,G))},multipleOf(G,J){return this.check(aY(G,J))},step(G,J){return this.check(aY(G,J))},finite(){return this}});let X=$._zod.bag;$.minValue=Math.max(X.minimum??Number.NEGATIVE_INFINITY,X.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(X.maximum??Number.POSITIVE_INFINITY,X.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(X.format??"").includes("int")||Number.isSafeInteger(X.multipleOf??0.5),$.isFinite=!0,$.format=X.format??null});function n$($){return zq(dN,$)}var jn=R("ZodNumberFormat",($,D)=>{jz.init($,D),dN.init($,D)});function lN($){return qq(jn,$)}var An=R("ZodBoolean",($,D)=>{Az.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>kq($,X,G,J)});function x6($){return Hq(An,$)}var Mn=R("ZodNull",($,D)=>{Mz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>Cq($,X,G,J)});function oN($){return Kq(Mn,$)}var Sn=R("ZodUnknown",($,D)=>{Sz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>gq($,X,G,J)});function q6(){return Vq(Sn)}var Pn=R("ZodNever",($,D)=>{Pz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>yq($,X,G,J)});function _n($){return wq(Pn,$)}var Nn=R("ZodArray",($,D)=>{_z.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>mq($,X,G,J),$.element=D.element,A8($,"ZodArray",{min(X,G){return this.check(rX(X,G))},nonempty(X){return this.check(rX(1,X))},max(X,G){return this.check(sY(X,G))},length(X,G){return this.check(eY(X,G))},unwrap(){return this.element}})});function N$($,D){return JN(Nn,$,D)}var tN=R("ZodObject",($,D)=>{o_.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>cq($,X,G,J),_$.defineLazy($,"shape",()=>{return D.shape}),A8($,"ZodObject",{keyof(){return j1(Object.keys(this._zod.def.shape))},catchall(X){return this.clone({...this._zod.def,catchall:X})},passthrough(){return this.clone({...this._zod.def,catchall:q6()})},loose(){return this.clone({...this._zod.def,catchall:q6()})},strict(){return this.clone({...this._zod.def,catchall:_n()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(X){return _$.extend(this,X)},safeExtend(X){return _$.safeExtend(this,X)},merge(X){return _$.merge(this,X)},pick(X){return _$.pick(this,X)},omit(X){return _$.omit(this,X)},partial(...X){return _$.partial(QQ,this,X[0])},required(...X){return _$.required(eN,this,X[0])}})});function n($,D){let X={type:"object",shape:$??{},..._$.normalizeParams(D)};return new tN(X)}function I1($,D){return new tN({type:"object",shape:$,catchall:q6(),..._$.normalizeParams(D)})}var aN=R("ZodUnion",($,D)=>{pY.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>lq($,X,G,J),$.options=D.options});function I6($,D){return new aN({type:"union",options:$,..._$.normalizeParams(D)})}var Rn=R("ZodDiscriminatedUnion",($,D)=>{aN.init($,D),Rz.init($,D)});function QH($,D,X){return new Rn({type:"union",options:D,discriminator:$,..._$.normalizeParams(X)})}var En=R("ZodIntersection",($,D)=>{Ez.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>iq($,X,G,J)});function YQ($,D){return new En({type:"intersection",left:$,right:D})}var iN=R("ZodRecord",($,D)=>{Zz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>pq($,X,G,J),$.keyType=D.keyType,$.valueType=D.valueType});function Q6($,D,X){if(!D||!D._zod)return new iN({type:"record",keyType:_(),valueType:$,..._$.normalizeParams(D)});return new iN({type:"record",keyType:$,valueType:D,..._$.normalizeParams(X)})}var YH=R("ZodEnum",($,D)=>{Tz.init($,D),K6.init($,D),$._zod.processJSONSchema=(G,J,Y)=>xq($,G,J,Y),$.enum=D.entries,$.options=Object.values(D.entries);let X=new Set(Object.keys(D.entries));$.extract=(G,J)=>{let Y={};for(let Q of G)if(X.has(Q))Y[Q]=D.entries[Q];else throw Error(`Key ${Q} not found in enum`);return new YH({...D,checks:[],..._$.normalizeParams(J),entries:Y})},$.exclude=(G,J)=>{let Y={...D.entries};for(let Q of G)if(X.has(Q))delete Y[Q];else throw Error(`Key ${Q} not found in enum`);return new YH({...D,checks:[],..._$.normalizeParams(J),entries:Y})}});function j1($,D){let X=Array.isArray($)?Object.fromEntries($.map((G)=>[G,G])):$;return new YH({type:"enum",entries:X,..._$.normalizeParams(D)})}var Zn=R("ZodLiteral",($,D)=>{vz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>hq($,X,G,J),$.values=new Set(D.values),Object.defineProperty($,"value",{get(){if(D.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return D.values[0]}})});function e($,D){return new Zn({type:"literal",values:Array.isArray($)?$:[$],..._$.normalizeParams(D)})}var Tn=R("ZodTransform",($,D)=>{kz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>fq($,X,G,J),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new D8($.constructor.name);X.addIssue=(Y)=>{if(typeof Y==="string")X.issues.push(_$.issue(Y,X.value,D));else{let Q=Y;if(Q.fatal)Q.continue=!1;Q.code??(Q.code="custom"),Q.input??(Q.input=X.value),Q.inst??(Q.inst=$),X.issues.push(_$.issue(Q))}};let J=D.transform(X.value,X);if(J instanceof Promise)return J.then((Y)=>{return X.value=Y,X.fallback=!0,X});return X.value=J,X.fallback=!0,X}});function sN($){return new Tn({type:"transform",transform:$})}var QQ=R("ZodOptional",($,D)=>{rY.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>$Q($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function H6($){return new QQ({type:"optional",innerType:$})}var vn=R("ZodExactOptional",($,D)=>{Cz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>$Q($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function kn($){return new vn({type:"optional",innerType:$})}var Cn=R("ZodNullable",($,D)=>{yz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>rq($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function pN($){return new Cn({type:"nullable",innerType:$})}var yn=R("ZodDefault",($,D)=>{gz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>dq($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function gn($,D){return new yn({type:"default",innerType:$,get defaultValue(){return typeof D==="function"?D():_$.shallowClone(D)}})}var xn=R("ZodPrefault",($,D)=>{xz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>oq($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function hn($,D){return new xn({type:"prefault",innerType:$,get defaultValue(){return typeof D==="function"?D():_$.shallowClone(D)}})}var eN=R("ZodNonOptional",($,D)=>{hz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>nq($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function un($,D){return new eN({type:"nonoptional",innerType:$,..._$.normalizeParams(D)})}var fn=R("ZodCatch",($,D)=>{uz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>tq($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function mn($,D){return new fn({type:"catch",innerType:$,catchValue:typeof D==="function"?D:()=>D})}var $R=R("ZodPipe",($,D)=>{nY.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>aq($,X,G,J),$.in=D.in,$.out=D.out});function rN($,D){return new $R({type:"pipe",in:$,out:D})}var cn=R("ZodPreprocess",($,D)=>{$R.init($,D),t_.init($,D)}),ln=R("ZodReadonly",($,D)=>{fz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>sq($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function pn($){return new ln({type:"readonly",innerType:$})}var DR=R("ZodCustom",($,D)=>{mz.init($,D),K6.init($,D),$._zod.processJSONSchema=(X,G,J)=>uq($,X,G,J)});function XR($,D){return Rq(DR,$??(()=>!0),D)}function rn($,D={}){return Eq(DR,$,D)}function nn($,D){return Zq($,D)}function WH($,D){return new cn({type:"pipe",in:sN($),out:D})}y1(cz());var IH="2025-11-25";var JR=[IH,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],c0="io.modelcontextprotocol/related-task",IQ="2.0",T6=XR(($)=>$!==null&&(typeof $==="object"||typeof $==="function")),GR=I6([_(),n$().int()]),YR=_(),RU$=I1({ttl:n$().optional(),pollInterval:n$().optional()}),dn=n({ttl:n$().optional()}),on=n({taskId:_()}),UH=I1({progressToken:GR.optional(),[c0]:on.optional()}),h1=n({_meta:UH.optional()}),M8=h1.extend({task:dn.optional()}),QR=($)=>M8.safeParse($).success,r6=n({method:_(),params:h1.loose().optional()}),o1=n({_meta:UH.optional()}),t1=n({method:_(),params:o1.loose().optional()}),n6=I1({_meta:UH.optional()}),UQ=I6([_(),n$().int()]),WR=n({jsonrpc:e(IQ),id:UQ,...r6.shape}).strict(),BH=($)=>WR.safeParse($).success,IR=n({jsonrpc:e(IQ),...t1.shape}).strict(),UR=($)=>IR.safeParse($).success,zH=n({jsonrpc:e(IQ),id:UQ,result:n6}).strict(),S8=($)=>zH.safeParse($).success;var X$;(function($){$[$.ConnectionClosed=-32000]="ConnectionClosed",$[$.RequestTimeout=-32001]="RequestTimeout",$[$.ParseError=-32700]="ParseError",$[$.InvalidRequest=-32600]="InvalidRequest",$[$.MethodNotFound=-32601]="MethodNotFound",$[$.InvalidParams=-32602]="InvalidParams",$[$.InternalError=-32603]="InternalError",$[$.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(X$||(X$={}));var qH=n({jsonrpc:e(IQ),id:UQ.optional(),error:n({code:n$().int(),message:_(),data:q6().optional()})}).strict();var BR=($)=>qH.safeParse($).success;var zR=I6([WR,IR,zH,qH]),EU$=I6([zH,qH]),BQ=n6.strict(),tn=o1.extend({requestId:UQ.optional(),reason:_().optional()}),zQ=t1.extend({method:e("notifications/cancelled"),params:tn}),an=n({src:_(),mimeType:_().optional(),sizes:N$(_()).optional(),theme:j1(["light","dark"]).optional()}),P8=n({icons:N$(an).optional()}),dX=n({name:_(),title:_().optional()}),qR=dX.extend({...dX.shape,...P8.shape,version:_(),websiteUrl:_().optional(),description:_().optional()}),sn=YQ(n({applyDefaults:x6().optional()}),Q6(_(),q6())),en=WH(($)=>{if($&&typeof $==="object"&&!Array.isArray($)){if(Object.keys($).length===0)return{form:{}}}return $},YQ(n({form:sn.optional(),url:T6.optional()}),Q6(_(),q6()).optional())),$d=I1({list:T6.optional(),cancel:T6.optional(),requests:I1({sampling:I1({createMessage:T6.optional()}).optional(),elicitation:I1({create:T6.optional()}).optional()}).optional()}),Dd=I1({list:T6.optional(),cancel:T6.optional(),requests:I1({tools:I1({call:T6.optional()}).optional()}).optional()}),Xd=n({experimental:Q6(_(),T6).optional(),sampling:n({context:T6.optional(),tools:T6.optional()}).optional(),elicitation:en.optional(),roots:n({listChanged:x6().optional()}).optional(),tasks:$d.optional(),extensions:Q6(_(),T6).optional()}),Jd=h1.extend({protocolVersion:_(),capabilities:Xd,clientInfo:qR}),HH=r6.extend({method:e("initialize"),params:Jd});var Gd=n({experimental:Q6(_(),T6).optional(),logging:T6.optional(),completions:T6.optional(),prompts:n({listChanged:x6().optional()}).optional(),resources:n({subscribe:x6().optional(),listChanged:x6().optional()}).optional(),tools:n({listChanged:x6().optional()}).optional(),tasks:Dd.optional(),extensions:Q6(_(),T6).optional()}),Yd=n6.extend({protocolVersion:_(),capabilities:Gd,serverInfo:qR,instructions:_().optional()}),KH=t1.extend({method:e("notifications/initialized"),params:o1.optional()});var qQ=r6.extend({method:e("ping"),params:h1.optional()}),Qd=n({progress:n$(),total:H6(n$()),message:H6(_())}),Wd=n({...o1.shape,...Qd.shape,progressToken:GR}),HQ=t1.extend({method:e("notifications/progress"),params:Wd}),Id=h1.extend({cursor:YR.optional()}),_8=r6.extend({params:Id.optional()}),N8=n6.extend({nextCursor:YR.optional()}),Ud=j1(["working","input_required","completed","failed","cancelled"]),R8=n({taskId:_(),status:Ud,ttl:I6([n$(),oN()]),createdAt:_(),lastUpdatedAt:_(),pollInterval:H6(n$()),statusMessage:H6(_())}),oX=n6.extend({task:R8}),Bd=o1.merge(R8),E8=t1.extend({method:e("notifications/tasks/status"),params:Bd}),KQ=r6.extend({method:e("tasks/get"),params:h1.extend({taskId:_()})}),VQ=n6.merge(R8),wQ=r6.extend({method:e("tasks/result"),params:h1.extend({taskId:_()})}),ZU$=n6.loose(),LQ=_8.extend({method:e("tasks/list")}),OQ=N8.extend({tasks:N$(R8)}),FQ=r6.extend({method:e("tasks/cancel"),params:h1.extend({taskId:_()})}),HR=n6.merge(R8),KR=n({uri:_(),mimeType:H6(_()),_meta:Q6(_(),q6()).optional()}),VR=KR.extend({text:_()}),VH=_().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),wR=KR.extend({blob:VH}),Z8=j1(["user","assistant"]),tX=n({audience:N$(Z8).optional(),priority:n$().min(0).max(1).optional(),lastModified:j8.datetime({offset:!0}).optional()}),LR=n({...dX.shape,...P8.shape,uri:_(),description:H6(_()),mimeType:H6(_()),size:H6(n$()),annotations:tX.optional(),_meta:H6(I1({}))}),zd=n({...dX.shape,...P8.shape,uriTemplate:_(),description:H6(_()),mimeType:H6(_()),annotations:tX.optional(),_meta:H6(I1({}))}),bQ=_8.extend({method:e("resources/list")}),qd=N8.extend({resources:N$(LR)}),jQ=_8.extend({method:e("resources/templates/list")}),Hd=N8.extend({resourceTemplates:N$(zd)}),wH=h1.extend({uri:_()}),Kd=wH,AQ=r6.extend({method:e("resources/read"),params:Kd}),Vd=n6.extend({contents:N$(I6([VR,wR]))}),wd=t1.extend({method:e("notifications/resources/list_changed"),params:o1.optional()}),Ld=wH,Od=r6.extend({method:e("resources/subscribe"),params:Ld}),Fd=wH,bd=r6.extend({method:e("resources/unsubscribe"),params:Fd}),jd=o1.extend({uri:_()}),Ad=t1.extend({method:e("notifications/resources/updated"),params:jd}),Md=n({name:_(),description:H6(_()),required:H6(x6())}),Sd=n({...dX.shape,...P8.shape,description:H6(_()),arguments:H6(N$(Md)),_meta:H6(I1({}))}),MQ=_8.extend({method:e("prompts/list")}),Pd=N8.extend({prompts:N$(Sd)}),_d=h1.extend({name:_(),arguments:Q6(_(),_()).optional()}),SQ=r6.extend({method:e("prompts/get"),params:_d}),LH=n({type:e("text"),text:_(),annotations:tX.optional(),_meta:Q6(_(),q6()).optional()}),OH=n({type:e("image"),data:VH,mimeType:_(),annotations:tX.optional(),_meta:Q6(_(),q6()).optional()}),FH=n({type:e("audio"),data:VH,mimeType:_(),annotations:tX.optional(),_meta:Q6(_(),q6()).optional()}),Nd=n({type:e("tool_use"),name:_(),id:_(),input:Q6(_(),q6()),_meta:Q6(_(),q6()).optional()}),Rd=n({type:e("resource"),resource:I6([VR,wR]),annotations:tX.optional(),_meta:Q6(_(),q6()).optional()}),Ed=LR.extend({type:e("resource_link")}),bH=I6([LH,OH,FH,Ed,Rd]),Zd=n({role:Z8,content:bH}),Td=n6.extend({description:_().optional(),messages:N$(Zd)}),vd=t1.extend({method:e("notifications/prompts/list_changed"),params:o1.optional()}),kd=n({title:_().optional(),readOnlyHint:x6().optional(),destructiveHint:x6().optional(),idempotentHint:x6().optional(),openWorldHint:x6().optional()}),Cd=n({taskSupport:j1(["required","optional","forbidden"]).optional()}),OR=n({...dX.shape,...P8.shape,description:_().optional(),inputSchema:n({type:e("object"),properties:Q6(_(),T6).optional(),required:N$(_()).optional()}).catchall(q6()),outputSchema:n({type:e("object"),properties:Q6(_(),T6).optional(),required:N$(_()).optional()}).catchall(q6()).optional(),annotations:kd.optional(),execution:Cd.optional(),_meta:Q6(_(),q6()).optional()}),PQ=_8.extend({method:e("tools/list")}),yd=N8.extend({tools:N$(OR)}),_Q=n6.extend({content:N$(bH).default([]),structuredContent:Q6(_(),q6()).optional(),isError:x6().optional()}),TU$=_Q.or(n6.extend({toolResult:q6()})),gd=M8.extend({name:_(),arguments:Q6(_(),q6()).optional()}),aX=r6.extend({method:e("tools/call"),params:gd}),xd=t1.extend({method:e("notifications/tools/list_changed"),params:o1.optional()}),vU$=n({autoRefresh:x6().default(!0),debounceMs:n$().int().nonnegative().default(300)}),T8=j1(["debug","info","notice","warning","error","critical","alert","emergency"]),hd=h1.extend({level:T8}),jH=r6.extend({method:e("logging/setLevel"),params:hd}),ud=o1.extend({level:T8,logger:_().optional(),data:q6()}),fd=t1.extend({method:e("notifications/message"),params:ud}),md=n({name:_().optional()}),cd=n({hints:N$(md).optional(),costPriority:n$().min(0).max(1).optional(),speedPriority:n$().min(0).max(1).optional(),intelligencePriority:n$().min(0).max(1).optional()}),ld=n({mode:j1(["auto","required","none"]).optional()}),id=n({type:e("tool_result"),toolUseId:_().describe("The unique identifier for the corresponding tool call."),content:N$(bH).default([]),structuredContent:n({}).loose().optional(),isError:x6().optional(),_meta:Q6(_(),q6()).optional()}),pd=QH("type",[LH,OH,FH]),WQ=QH("type",[LH,OH,FH,Nd,id]),rd=n({role:Z8,content:I6([WQ,N$(WQ)]),_meta:Q6(_(),q6()).optional()}),nd=M8.extend({messages:N$(rd),modelPreferences:cd.optional(),systemPrompt:_().optional(),includeContext:j1(["none","thisServer","allServers"]).optional(),temperature:n$().optional(),maxTokens:n$().int(),stopSequences:N$(_()).optional(),metadata:T6.optional(),tools:N$(OR).optional(),toolChoice:ld.optional()}),dd=r6.extend({method:e("sampling/createMessage"),params:nd}),v8=n6.extend({model:_(),stopReason:H6(j1(["endTurn","stopSequence","maxTokens"]).or(_())),role:Z8,content:pd}),AH=n6.extend({model:_(),stopReason:H6(j1(["endTurn","stopSequence","maxTokens","toolUse"]).or(_())),role:Z8,content:I6([WQ,N$(WQ)])}),od=n({type:e("boolean"),title:_().optional(),description:_().optional(),default:x6().optional()}),td=n({type:e("string"),title:_().optional(),description:_().optional(),minLength:n$().optional(),maxLength:n$().optional(),format:j1(["email","uri","date","date-time"]).optional(),default:_().optional()}),ad=n({type:j1(["number","integer"]),title:_().optional(),description:_().optional(),minimum:n$().optional(),maximum:n$().optional(),default:n$().optional()}),sd=n({type:e("string"),title:_().optional(),description:_().optional(),enum:N$(_()),default:_().optional()}),ed=n({type:e("string"),title:_().optional(),description:_().optional(),oneOf:N$(n({const:_(),title:_()})),default:_().optional()}),$o=n({type:e("string"),title:_().optional(),description:_().optional(),enum:N$(_()),enumNames:N$(_()).optional(),default:_().optional()}),Do=I6([sd,ed]),Xo=n({type:e("array"),title:_().optional(),description:_().optional(),minItems:n$().optional(),maxItems:n$().optional(),items:n({type:e("string"),enum:N$(_())}),default:N$(_()).optional()}),Jo=n({type:e("array"),title:_().optional(),description:_().optional(),minItems:n$().optional(),maxItems:n$().optional(),items:n({anyOf:N$(n({const:_(),title:_()}))}),default:N$(_()).optional()}),Go=I6([Xo,Jo]),Yo=I6([$o,Do,Go]),Qo=I6([Yo,od,td,ad]),Wo=M8.extend({mode:e("form").optional(),message:_(),requestedSchema:n({type:e("object"),properties:Q6(_(),Qo),required:N$(_()).optional()})}),Io=M8.extend({mode:e("url"),message:_(),elicitationId:_(),url:_().url()}),Uo=I6([Wo,Io]),Bo=r6.extend({method:e("elicitation/create"),params:Uo}),zo=o1.extend({elicitationId:_()}),qo=t1.extend({method:e("notifications/elicitation/complete"),params:zo}),sX=n6.extend({action:j1(["accept","decline","cancel"]),content:WH(($)=>$===null?void 0:$,Q6(_(),I6([_(),n$(),x6(),N$(_())])).optional())}),Ho=n({type:e("ref/resource"),uri:_()});var Ko=n({type:e("ref/prompt"),name:_()}),Vo=h1.extend({ref:I6([Ko,Ho]),argument:n({name:_(),value:_()}),context:n({arguments:Q6(_(),_()).optional()}).optional()}),NQ=r6.extend({method:e("completion/complete"),params:Vo});function FR($){if($.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${$.params.ref.type}`)}function bR($){if($.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${$.params.ref.type}`)}var wo=n6.extend({completion:I1({values:N$(_()).max(100),total:H6(n$().int()),hasMore:H6(x6())})}),Lo=n({uri:_().startsWith("file://"),name:_().optional(),_meta:Q6(_(),q6()).optional()}),Oo=r6.extend({method:e("roots/list"),params:h1.optional()}),MH=n6.extend({roots:N$(Lo)}),Fo=t1.extend({method:e("notifications/roots/list_changed"),params:o1.optional()}),kU$=I6([qQ,HH,NQ,jH,SQ,MQ,bQ,jQ,AQ,Od,bd,aX,PQ,KQ,wQ,LQ,FQ]),CU$=I6([zQ,HQ,KH,Fo,E8]),yU$=I6([BQ,v8,AH,sX,MH,VQ,OQ,oX]),gU$=I6([qQ,dd,Bo,Oo,KQ,wQ,LQ,FQ]),xU$=I6([zQ,HQ,fd,Ad,wd,xd,vd,E8,qo]),hU$=I6([BQ,Yd,wo,Td,Pd,qd,Hd,Vd,_Q,yd,VQ,OQ,oX]);class t extends Error{constructor($,D,X){super(`MCP error ${$}: ${D}`);this.code=$,this.data=X,this.name="McpError"}static fromError($,D,X){if($===X$.UrlElicitationRequired&&X){let G=X;if(G.elicitations)return new jR(G.elicitations,D)}return new t($,D,X)}}class jR extends t{constructor($,D=`URL elicitation${$.length>1?"s":""} required`){super(X$.UrlElicitationRequired,D,{elicitations:$})}get elicitations(){return this.data?.elicitations??[]}}function l0($){return $==="completed"||$==="failed"||$==="cancelled"}var MR=Symbol("Let zodToJsonSchema decide on which parser to use");var AR={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"},SR=($)=>typeof $==="string"?{...AR,name:$}:{...AR,...$};var PR=($)=>{let D=SR($),X=D.name!==void 0?[...D.basePath,D.definitionPath,D.name]:D.basePath;return{...D,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(D.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...D.basePath,D.definitionPath,G],jsonSchema:void 0}]))}};function SH($,D,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[D]:X}}function R$($,D,X,G,J){$[D]=X,SH($,D,G,J)}var RQ=($,D)=>{let X=0;for(;X<$.length&&X<D.length;X++)if($[X]!==D[X])break;return[($.length-X).toString(),...D.slice(X)].join("/")};function V6($){if($.target!=="openAi")return{};let D=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?RQ(D,$.currentPath):D.join("/")}}function _R($,D){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==h.ZodAny)X.items=B$($.type._def,{...D,currentPath:[...D.currentPath,"items"]});if($.minLength)R$(X,"minItems",$.minLength.value,$.minLength.message,D);if($.maxLength)R$(X,"maxItems",$.maxLength.value,$.maxLength.message,D);if($.exactLength)R$(X,"minItems",$.exactLength.value,$.exactLength.message,D),R$(X,"maxItems",$.exactLength.value,$.exactLength.message,D);return X}function NR($,D){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(D.target==="jsonSchema7")if(G.inclusive)R$(X,"minimum",G.value,G.message,D);else R$(X,"exclusiveMinimum",G.value,G.message,D);else{if(!G.inclusive)X.exclusiveMinimum=!0;R$(X,"minimum",G.value,G.message,D)}break;case"max":if(D.target==="jsonSchema7")if(G.inclusive)R$(X,"maximum",G.value,G.message,D);else R$(X,"exclusiveMaximum",G.value,G.message,D);else{if(!G.inclusive)X.exclusiveMaximum=!0;R$(X,"maximum",G.value,G.message,D)}break;case"multipleOf":R$(X,"multipleOf",G.value,G.message,D);break}return X}function RR(){return{type:"boolean"}}function EQ($,D){return B$($.type._def,D)}var ER=($,D)=>{return B$($.innerType._def,D)};function PH($,D,X){let G=X??D.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Y)=>PH($,D,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bo($,D)}}var bo=($,D)=>{let X={type:"integer",format:"unix-time"};if(D.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":R$(X,"minimum",G.value,G.message,D);break;case"max":R$(X,"maximum",G.value,G.message,D);break}return X};function ZR($,D){return{...B$($.innerType._def,D),default:$.defaultValue()}}function TR($,D){return D.effectStrategy==="input"?B$($.schema._def,D):V6(D)}function vR($){return{type:"string",enum:Array.from($.values)}}var jo=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function kR($,D){let X=[B$($.left._def,{...D,currentPath:[...D.currentPath,"allOf","0"]}),B$($.right._def,{...D,currentPath:[...D.currentPath,"allOf","1"]})].filter((Y)=>!!Y),G=D.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Y)=>{if(jo(Y)){if(J.push(...Y.allOf),Y.unevaluatedProperties===void 0)G=void 0}else{let Q=Y;if("additionalProperties"in Y&&Y.additionalProperties===!1){let{additionalProperties:W,...I}=Y;Q=I}else G=void 0;J.push(Q)}}),J.length?{allOf:J,...G}:void 0}function CR($,D){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(D.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}var _H=void 0,z4={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:()=>{if(_H===void 0)_H=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _H},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function ZQ($,D){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":R$(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,D);break;case"max":R$(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,D);break;case"email":switch(D.emailStrategy){case"format:email":q4(X,"email",G.message,D);break;case"format:idn-email":q4(X,"idn-email",G.message,D);break;case"pattern:zod":U1(X,z4.email,G.message,D);break}break;case"url":q4(X,"uri",G.message,D);break;case"uuid":q4(X,"uuid",G.message,D);break;case"regex":U1(X,G.regex,G.message,D);break;case"cuid":U1(X,z4.cuid,G.message,D);break;case"cuid2":U1(X,z4.cuid2,G.message,D);break;case"startsWith":U1(X,RegExp(`^${NH(G.value,D)}`),G.message,D);break;case"endsWith":U1(X,RegExp(`${NH(G.value,D)}$`),G.message,D);break;case"datetime":q4(X,"date-time",G.message,D);break;case"date":q4(X,"date",G.message,D);break;case"time":q4(X,"time",G.message,D);break;case"duration":q4(X,"duration",G.message,D);break;case"length":R$(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,D),R$(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,D);break;case"includes":{U1(X,RegExp(NH(G.value,D)),G.message,D);break}case"ip":{if(G.version!=="v6")q4(X,"ipv4",G.message,D);if(G.version!=="v4")q4(X,"ipv6",G.message,D);break}case"base64url":U1(X,z4.base64url,G.message,D);break;case"jwt":U1(X,z4.jwt,G.message,D);break;case"cidr":{if(G.version!=="v6")U1(X,z4.ipv4Cidr,G.message,D);if(G.version!=="v4")U1(X,z4.ipv6Cidr,G.message,D);break}case"emoji":U1(X,z4.emoji(),G.message,D);break;case"ulid":{U1(X,z4.ulid,G.message,D);break}case"base64":{switch(D.base64Strategy){case"format:binary":{q4(X,"binary",G.message,D);break}case"contentEncoding:base64":{R$(X,"contentEncoding","base64",G.message,D);break}case"pattern:zod":{U1(X,z4.base64,G.message,D);break}}break}case"nanoid":U1(X,z4.nanoid,G.message,D);case"toLowerCase":case"toUpperCase":case"trim":break;default:((J)=>{})(G)}return X}function NH($,D){return D.patternStrategy==="escape"?Mo($):$}var Ao=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Mo($){let D="";for(let X=0;X<$.length;X++){if(!Ao.has($[X]))D+="\\";D+=$[X]}return D}function q4($,D,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:D,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else R$($,"format",D,X,G)}function U1($,D,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:yR(D,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else R$($,"pattern",yR(D,G),X,G)}function yR($,D){if(!D.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Y=!1,Q=!1,W=!1;for(let I=0;I<G.length;I++){if(Y){J+=G[I],Y=!1;continue}if(X.i){if(Q){if(G[I].match(/[a-z]/)){if(W)J+=G[I],J+=`${G[I-2]}-${G[I]}`.toUpperCase(),W=!1;else if(G[I+1]==="-"&&G[I+2]?.match(/[a-z]/))J+=G[I],W=!0;else J+=`${G[I]}${G[I].toUpperCase()}`;continue}}else if(G[I].match(/[a-z]/)){J+=`[${G[I]}${G[I].toUpperCase()}]`;continue}}if(X.m){if(G[I]==="^"){J+=`(^|(?<=[\r
310
- ]))`;continue}else if(G[I]==="$"){J+=`($|(?=[\r
311
- ]))`;continue}}if(X.s&&G[I]==="."){J+=Q?`${G[I]}\r
312
- `:`[${G[I]}\r
313
- ]`;continue}if(J+=G[I],G[I]==="\\")Y=!0;else if(Q&&G[I]==="]")Q=!1;else if(!Q&&G[I]==="[")Q=!0}try{new RegExp(J)}catch{return console.warn(`Could not convert regex pattern at ${D.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),$.source}return J}function TQ($,D){if(D.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(D.target==="openApi3"&&$.keyType?._def.typeName===h.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:B$($.valueType._def,{...D,currentPath:[...D.currentPath,"properties",J]})??V6(D)}),{}),additionalProperties:D.rejectedAdditionalProperties};let X={type:"object",additionalProperties:B$($.valueType._def,{...D,currentPath:[...D.currentPath,"additionalProperties"]})??D.allowedAdditionalProperties};if(D.target==="openApi3")return X;if($.keyType?._def.typeName===h.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=ZQ($.keyType._def,D);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===h.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===h.ZodBranded&&$.keyType._def.type._def.typeName===h.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=EQ($.keyType._def,D);return{...X,propertyNames:J}}return X}function gR($,D){if(D.mapStrategy==="record")return TQ($,D);let X=B$($.keyType._def,{...D,currentPath:[...D.currentPath,"items","items","0"]})||V6(D),G=B$($.valueType._def,{...D,currentPath:[...D.currentPath,"items","items","1"]})||V6(D);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function xR($){let D=$.values,G=Object.keys($.values).filter((Y)=>{return typeof D[D[Y]]!=="number"}).map((Y)=>D[Y]),J=Array.from(new Set(G.map((Y)=>typeof Y)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function hR($){return $.target==="openAi"?void 0:{not:V6({...$,currentPath:[...$.currentPath,"not"]})}}function uR($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var k8={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function mR($,D){if(D.target==="openApi3")return fR($,D);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in k8)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Y)=>{let Q=k8[Y._def.typeName];return Q&&!J.includes(Q)?[...J,Q]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Y)=>{let Q=typeof Y._def.value;switch(Q){case"string":case"number":case"boolean":return[...J,Q];case"bigint":return[...J,"integer"];case"object":if(Y._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Y,Q,W)=>W.indexOf(Y)===Q);return{type:J.length>1?J:J[0],enum:X.reduce((Y,Q)=>{return Y.includes(Q._def.value)?Y:[...Y,Q._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Y)=>!G.includes(Y))],[])};return fR($,D)}var fR=($,D)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>B$(G._def,{...D,currentPath:[...D.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!D.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function cR($,D){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(D.target==="openApi3")return{type:k8[$.innerType._def.typeName],nullable:!0};return{type:[k8[$.innerType._def.typeName],"null"]}}if(D.target==="openApi3"){let G=B$($.innerType._def,{...D,currentPath:[...D.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=B$($.innerType._def,{...D,currentPath:[...D.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function lR($,D){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",SH(X,"type",G.message,D);break;case"min":if(D.target==="jsonSchema7")if(G.inclusive)R$(X,"minimum",G.value,G.message,D);else R$(X,"exclusiveMinimum",G.value,G.message,D);else{if(!G.inclusive)X.exclusiveMinimum=!0;R$(X,"minimum",G.value,G.message,D)}break;case"max":if(D.target==="jsonSchema7")if(G.inclusive)R$(X,"maximum",G.value,G.message,D);else R$(X,"exclusiveMaximum",G.value,G.message,D);else{if(!G.inclusive)X.exclusiveMaximum=!0;R$(X,"maximum",G.value,G.message,D)}break;case"multipleOf":R$(X,"multipleOf",G.value,G.message,D);break}return X}function iR($,D){let X=D.target==="openAi",G={type:"object",properties:{}},J=[],Y=$.shape();for(let W in Y){let I=Y[W];if(I===void 0||I._def===void 0)continue;let U=Po(I);if(U&&X){if(I._def.typeName==="ZodOptional")I=I._def.innerType;if(!I.isNullable())I=I.nullable();U=!1}let B=B$(I._def,{...D,currentPath:[...D.currentPath,"properties",W],propertyPath:[...D.currentPath,"properties",W]});if(B===void 0)continue;if(G.properties[W]=B,!U)J.push(W)}if(J.length)G.required=J;let Q=So($,D);if(Q!==void 0)G.additionalProperties=Q;return G}function So($,D){if($.catchall._def.typeName!=="ZodNever")return B$($.catchall._def,{...D,currentPath:[...D.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return D.allowedAdditionalProperties;case"strict":return D.rejectedAdditionalProperties;case"strip":return D.removeAdditionalStrategy==="strict"?D.allowedAdditionalProperties:D.rejectedAdditionalProperties}}function Po($){try{return $.isOptional()}catch{return!0}}var pR=($,D)=>{if(D.currentPath.toString()===D.propertyPath?.toString())return B$($.innerType._def,D);let X=B$($.innerType._def,{...D,currentPath:[...D.currentPath,"anyOf","1"]});return X?{anyOf:[{not:V6(D)},X]}:V6(D)};var rR=($,D)=>{if(D.pipeStrategy==="input")return B$($.in._def,D);else if(D.pipeStrategy==="output")return B$($.out._def,D);let X=B$($.in._def,{...D,currentPath:[...D.currentPath,"allOf","0"]}),G=B$($.out._def,{...D,currentPath:[...D.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function nR($,D){return B$($.type._def,D)}function dR($,D){let G={type:"array",uniqueItems:!0,items:B$($.valueType._def,{...D,currentPath:[...D.currentPath,"items"]})};if($.minSize)R$(G,"minItems",$.minSize.value,$.minSize.message,D);if($.maxSize)R$(G,"maxItems",$.maxSize.value,$.maxSize.message,D);return G}function oR($,D){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>B$(X._def,{...D,currentPath:[...D.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:B$($.rest._def,{...D,currentPath:[...D.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>B$(X._def,{...D,currentPath:[...D.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function tR($){return{not:V6($)}}function aR($){return V6($)}var sR=($,D)=>{return B$($.innerType._def,D)};var eR=($,D,X)=>{switch(D){case h.ZodString:return ZQ($,X);case h.ZodNumber:return lR($,X);case h.ZodObject:return iR($,X);case h.ZodBigInt:return NR($,X);case h.ZodBoolean:return RR();case h.ZodDate:return PH($,X);case h.ZodUndefined:return tR(X);case h.ZodNull:return uR(X);case h.ZodArray:return _R($,X);case h.ZodUnion:case h.ZodDiscriminatedUnion:return mR($,X);case h.ZodIntersection:return kR($,X);case h.ZodTuple:return oR($,X);case h.ZodRecord:return TQ($,X);case h.ZodLiteral:return CR($,X);case h.ZodEnum:return vR($);case h.ZodNativeEnum:return xR($);case h.ZodNullable:return cR($,X);case h.ZodOptional:return pR($,X);case h.ZodMap:return gR($,X);case h.ZodSet:return dR($,X);case h.ZodLazy:return()=>$.getter()._def;case h.ZodPromise:return nR($,X);case h.ZodNaN:case h.ZodNever:return hR(X);case h.ZodEffects:return TR($,X);case h.ZodAny:return V6(X);case h.ZodUnknown:return aR(X);case h.ZodDefault:return ZR($,X);case h.ZodBranded:return EQ($,X);case h.ZodReadonly:return sR($,X);case h.ZodCatch:return ER($,X);case h.ZodPipeline:return rR($,X);case h.ZodFunction:case h.ZodVoid:case h.ZodSymbol:return;default:return((G)=>{return})(D)}};function B$($,D,X=!1){let G=D.seen.get($);if(D.override){let W=D.override?.($,D,G,X);if(W!==MR)return W}if(G&&!X){let W=_o(G,D);if(W!==void 0)return W}let J={def:$,path:D.currentPath,jsonSchema:void 0};D.seen.set($,J);let Y=eR($,$.typeName,D),Q=typeof Y==="function"?B$(Y(),D):Y;if(Q)No($,D,Q);if(D.postProcess){let W=D.postProcess(Q,$,D);return J.jsonSchema=Q,W}return J.jsonSchema=Q,Q}var _o=($,D)=>{switch(D.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:RQ(D.currentPath,$.path)};case"none":case"seen":{if($.path.length<D.currentPath.length&&$.path.every((X,G)=>D.currentPath[G]===X))return console.warn(`Recursive reference detected at ${D.currentPath.join("/")}! Defaulting to any`),V6(D);return D.$refStrategy==="seen"?V6(D):void 0}}},No=($,D,X)=>{if($.description){if(X.description=$.description,D.markdownDescription)X.markdownDescription=$.description}return X};var RH=($,D)=>{let X=PR(D),G=typeof D==="object"&&D.definitions?Object.entries(D.definitions).reduce((I,[U,B])=>({...I,[U]:B$(B._def,{...X,currentPath:[...X.basePath,X.definitionPath,U]},!0)??V6(X)}),{}):void 0,J=typeof D==="string"?D:D?.nameStrategy==="title"?void 0:D?.name,Y=B$($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??V6(X),Q=typeof D==="object"&&D.name!==void 0&&D.nameStrategy==="title"?D.name:void 0;if(Q!==void 0)Y.title=Q;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let W=J===void 0?G?{...Y,[X.definitionPath]:G}:Y:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Y}};if(X.target==="jsonSchema7")W.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")W.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in W)||("oneOf"in W)||("allOf"in W)||("type"in W)&&Array.isArray(W.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return W};function Ro($){if(!$)return"draft-7";if($==="jsonSchema7"||$==="draft-7")return"draft-7";if($==="jsonSchema2019-09"||$==="draft-2020-12")return"draft-2020-12";return"draft-7"}function EH($,D){if(d1($))return eq($,{target:Ro(D?.target),io:D?.pipeStrategy??"input"});return RH($,{strictUnions:D?.strictUnions??!0,pipeStrategy:D?.pipeStrategy??"input"})}function ZH($){let X=m0($)?.method;if(!X)throw Error("Schema is missing a method literal");let G=JQ(X);if(typeof G!=="string")throw Error("Schema method literal must be a string");return G}function TH($,D){let X=f0($,D);if(!X.success)throw X.error;return X.data}var Eo=60000;class vH{constructor($){if(this._options=$,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(zQ,(D)=>{this._oncancel(D)}),this.setNotificationHandler(HQ,(D)=>{this._onprogress(D)}),this.setRequestHandler(qQ,(D)=>({})),this._taskStore=$?.taskStore,this._taskMessageQueue=$?.taskMessageQueue,this._taskStore)this.setRequestHandler(KQ,async(D,X)=>{let G=await this._taskStore.getTask(D.params.taskId,X.sessionId);if(!G)throw new t(X$.InvalidParams,"Failed to retrieve task: Task not found");return{...G}}),this.setRequestHandler(wQ,async(D,X)=>{let G=async()=>{let J=D.params.taskId;if(this._taskMessageQueue){let Q;while(Q=await this._taskMessageQueue.dequeue(J,X.sessionId)){if(Q.type==="response"||Q.type==="error"){let W=Q.message,I=W.id,U=this._requestResolvers.get(I);if(U)if(this._requestResolvers.delete(I),Q.type==="response")U(W);else{let B=W,H=new t(B.error.code,B.error.message,B.error.data);U(H)}else{let B=Q.type==="response"?"Response":"Error";this._onerror(Error(`${B} handler missing for request ${I}`))}continue}await this._transport?.send(Q.message,{relatedRequestId:X.requestId})}}let Y=await this._taskStore.getTask(J,X.sessionId);if(!Y)throw new t(X$.InvalidParams,`Task not found: ${J}`);if(!l0(Y.status))return await this._waitForTaskUpdate(J,X.signal),await G();if(l0(Y.status)){let Q=await this._taskStore.getTaskResult(J,X.sessionId);return this._clearTaskQueue(J),{...Q,_meta:{...Q._meta,[c0]:{taskId:J}}}}return await G()};return await G()}),this.setRequestHandler(LQ,async(D,X)=>{try{let{tasks:G,nextCursor:J}=await this._taskStore.listTasks(D.params?.cursor,X.sessionId);return{tasks:G,nextCursor:J,_meta:{}}}catch(G){throw new t(X$.InvalidParams,`Failed to list tasks: ${G instanceof Error?G.message:String(G)}`)}}),this.setRequestHandler(FQ,async(D,X)=>{try{let G=await this._taskStore.getTask(D.params.taskId,X.sessionId);if(!G)throw new t(X$.InvalidParams,`Task not found: ${D.params.taskId}`);if(l0(G.status))throw new t(X$.InvalidParams,`Cannot cancel task in terminal status: ${G.status}`);await this._taskStore.updateTaskStatus(D.params.taskId,"cancelled","Client cancelled task execution.",X.sessionId),this._clearTaskQueue(D.params.taskId);let J=await this._taskStore.getTask(D.params.taskId,X.sessionId);if(!J)throw new t(X$.InvalidParams,`Task not found after cancellation: ${D.params.taskId}`);return{_meta:{},...J}}catch(G){if(G instanceof t)throw G;throw new t(X$.InvalidRequest,`Failed to cancel task: ${G instanceof Error?G.message:String(G)}`)}})}async _oncancel($){if(!$.params.requestId)return;this._requestHandlerAbortControllers.get($.params.requestId)?.abort($.params.reason)}_setupTimeout($,D,X,G,J=!1){this._timeoutInfo.set($,{timeoutId:setTimeout(G,D),startTime:Date.now(),timeout:D,maxTotalTimeout:X,resetTimeoutOnProgress:J,onTimeout:G})}_resetTimeout($){let D=this._timeoutInfo.get($);if(!D)return!1;let X=Date.now()-D.startTime;if(D.maxTotalTimeout&&X>=D.maxTotalTimeout)throw this._timeoutInfo.delete($),t.fromError(X$.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:D.maxTotalTimeout,totalElapsed:X});return clearTimeout(D.timeoutId),D.timeoutId=setTimeout(D.onTimeout,D.timeout),!0}_cleanupTimeout($){let D=this._timeoutInfo.get($);if(D)clearTimeout(D.timeoutId),this._timeoutInfo.delete($)}async connect($){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=$;let D=this.transport?.onclose;this._transport.onclose=()=>{D?.(),this._onclose()};let X=this.transport?.onerror;this._transport.onerror=(J)=>{X?.(J),this._onerror(J)};let G=this._transport?.onmessage;this._transport.onmessage=(J,Y)=>{if(G?.(J,Y),S8(J)||BR(J))this._onresponse(J);else if(BH(J))this._onrequest(J,Y);else if(UR(J))this._onnotification(J);else this._onerror(Error(`Unknown message type: ${JSON.stringify(J)}`))},await this._transport.start()}_onclose(){let $=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let X of this._timeoutInfo.values())clearTimeout(X.timeoutId);this._timeoutInfo.clear();for(let X of this._requestHandlerAbortControllers.values())X.abort();this._requestHandlerAbortControllers.clear();let D=t.fromError(X$.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let X of $.values())X(D)}_onerror($){this.onerror?.($)}_onnotification($){let D=this._notificationHandlers.get($.method)??this.fallbackNotificationHandler;if(D===void 0)return;Promise.resolve().then(()=>D($)).catch((X)=>this._onerror(Error(`Uncaught error in notification handler: ${X}`)))}_onrequest($,D){let X=this._requestHandlers.get($.method)??this.fallbackRequestHandler,G=this._transport,J=$.params?._meta?.[c0]?.taskId;if(X===void 0){let U={jsonrpc:"2.0",id:$.id,error:{code:X$.MethodNotFound,message:"Method not found"}};if(J&&this._taskMessageQueue)this._enqueueTaskMessage(J,{type:"error",message:U,timestamp:Date.now()},G?.sessionId).catch((B)=>this._onerror(Error(`Failed to enqueue error response: ${B}`)));else G?.send(U).catch((B)=>this._onerror(Error(`Failed to send an error response: ${B}`)));return}let Y=new AbortController;this._requestHandlerAbortControllers.set($.id,Y);let Q=QR($.params)?$.params.task:void 0,W=this._taskStore?this.requestTaskStore($,G?.sessionId):void 0,I={signal:Y.signal,sessionId:G?.sessionId,_meta:$.params?._meta,sendNotification:async(U)=>{if(Y.signal.aborted)return;let B={relatedRequestId:$.id};if(J)B.relatedTask={taskId:J};await this.notification(U,B)},sendRequest:async(U,B,H)=>{if(Y.signal.aborted)throw new t(X$.ConnectionClosed,"Request was cancelled");let V={...H,relatedRequestId:$.id};if(J&&!V.relatedTask)V.relatedTask={taskId:J};let z=V.relatedTask?.taskId??J;if(z&&W)await W.updateTaskStatus(z,"input_required");return await this.request(U,B,V)},authInfo:D?.authInfo,requestId:$.id,requestInfo:D?.requestInfo,taskId:J,taskStore:W,taskRequestedTtl:Q?.ttl,closeSSEStream:D?.closeSSEStream,closeStandaloneSSEStream:D?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(Q)this.assertTaskHandlerCapability($.method)}).then(()=>X($,I)).then(async(U)=>{if(Y.signal.aborted)return;let B={result:U,jsonrpc:"2.0",id:$.id};if(J&&this._taskMessageQueue)await this._enqueueTaskMessage(J,{type:"response",message:B,timestamp:Date.now()},G?.sessionId);else await G?.send(B)},async(U)=>{if(Y.signal.aborted)return;let B={jsonrpc:"2.0",id:$.id,error:{code:Number.isSafeInteger(U.code)?U.code:X$.InternalError,message:U.message??"Internal error",...U.data!==void 0&&{data:U.data}}};if(J&&this._taskMessageQueue)await this._enqueueTaskMessage(J,{type:"error",message:B,timestamp:Date.now()},G?.sessionId);else await G?.send(B)}).catch((U)=>this._onerror(Error(`Failed to send response: ${U}`))).finally(()=>{if(this._requestHandlerAbortControllers.get($.id)===Y)this._requestHandlerAbortControllers.delete($.id)})}_onprogress($){let{progressToken:D,...X}=$.params,G=Number(D),J=this._progressHandlers.get(G);if(!J){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify($)}`));return}let Y=this._responseHandlers.get(G),Q=this._timeoutInfo.get(G);if(Q&&Y&&Q.resetTimeoutOnProgress)try{this._resetTimeout(G)}catch(W){this._responseHandlers.delete(G),this._progressHandlers.delete(G),this._cleanupTimeout(G),Y(W);return}J(X)}_onresponse($){let D=Number($.id),X=this._requestResolvers.get(D);if(X){if(this._requestResolvers.delete(D),S8($))X($);else{let Y=new t($.error.code,$.error.message,$.error.data);X(Y)}return}let G=this._responseHandlers.get(D);if(G===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify($)}`));return}this._responseHandlers.delete(D),this._cleanupTimeout(D);let J=!1;if(S8($)&&$.result&&typeof $.result==="object"){let Y=$.result;if(Y.task&&typeof Y.task==="object"){let Q=Y.task;if(typeof Q.taskId==="string")J=!0,this._taskProgressTokens.set(Q.taskId,D)}}if(!J)this._progressHandlers.delete(D);if(S8($))G($);else{let Y=t.fromError($.error.code,$.error.message,$.error.data);G(Y)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream($,D,X){let{task:G}=X??{};if(!G){try{yield{type:"result",result:await this.request($,D,X)}}catch(Y){yield{type:"error",error:Y instanceof t?Y:new t(X$.InternalError,String(Y))}}return}let J;try{let Y=await this.request($,oX,X);if(Y.task)J=Y.task.taskId,yield{type:"taskCreated",task:Y.task};else throw new t(X$.InternalError,"Task creation did not return a task");while(!0){let Q=await this.getTask({taskId:J},X);if(yield{type:"taskStatus",task:Q},l0(Q.status)){if(Q.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:J},D,X)};else if(Q.status==="failed")yield{type:"error",error:new t(X$.InternalError,`Task ${J} failed`)};else if(Q.status==="cancelled")yield{type:"error",error:new t(X$.InternalError,`Task ${J} was cancelled`)};return}if(Q.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:J},D,X)};return}let W=Q.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((I)=>setTimeout(I,W)),X?.signal?.throwIfAborted()}}catch(Y){yield{type:"error",error:Y instanceof t?Y:new t(X$.InternalError,String(Y))}}}request($,D,X){let{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Y,task:Q,relatedTask:W}=X??{};return new Promise((I,U)=>{let B=(P)=>{U(P)};if(!this._transport){B(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod($.method),Q)this.assertTaskCapability($.method)}catch(P){B(P);return}X?.signal?.throwIfAborted();let H=this._requestMessageId++,V={...$,jsonrpc:"2.0",id:H};if(X?.onprogress)this._progressHandlers.set(H,X.onprogress),V.params={...$.params,_meta:{...$.params?._meta||{},progressToken:H}};if(Q)V.params={...V.params,task:Q};if(W)V.params={...V.params,_meta:{...V.params?._meta||{},[c0]:W}};let z=(P)=>{this._responseHandlers.delete(H),this._progressHandlers.delete(H),this._cleanupTimeout(H),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:H,reason:String(P)}},{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Y}).catch((v)=>this._onerror(Error(`Failed to send cancellation: ${v}`)));let Z=P instanceof t?P:new t(X$.RequestTimeout,String(P));U(Z)};this._responseHandlers.set(H,(P)=>{if(X?.signal?.aborted)return;if(P instanceof Error)return U(P);try{let Z=f0(D,P.result);if(!Z.success)U(Z.error);else I(Z.data)}catch(Z){U(Z)}}),X?.signal?.addEventListener("abort",()=>{z(X?.signal?.reason)});let L=X?.timeout??Eo,F=()=>z(t.fromError(X$.RequestTimeout,"Request timed out",{timeout:L}));this._setupTimeout(H,L,X?.maxTotalTimeout,F,X?.resetTimeoutOnProgress??!1);let b=W?.taskId;if(b){let P=(Z)=>{let v=this._responseHandlers.get(H);if(v)v(Z);else this._onerror(Error(`Response handler missing for side-channeled request ${H}`))};this._requestResolvers.set(H,P),this._enqueueTaskMessage(b,{type:"request",message:V,timestamp:Date.now()}).catch((Z)=>{this._cleanupTimeout(H),U(Z)})}else this._transport.send(V,{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Y}).catch((P)=>{this._cleanupTimeout(H),U(P)})})}async getTask($,D){return this.request({method:"tasks/get",params:$},VQ,D)}async getTaskResult($,D,X){return this.request({method:"tasks/result",params:$},D,X)}async listTasks($,D){return this.request({method:"tasks/list",params:$},OQ,D)}async cancelTask($,D){return this.request({method:"tasks/cancel",params:$},HR,D)}async notification($,D){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability($.method);let X=D?.relatedTask?.taskId;if(X){let Q={...$,jsonrpc:"2.0",params:{...$.params,_meta:{...$.params?._meta||{},[c0]:D.relatedTask}}};await this._enqueueTaskMessage(X,{type:"notification",message:Q,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes($.method)&&!$.params&&!D?.relatedRequestId&&!D?.relatedTask){if(this._pendingDebouncedNotifications.has($.method))return;this._pendingDebouncedNotifications.add($.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete($.method),!this._transport)return;let Q={...$,jsonrpc:"2.0"};if(D?.relatedTask)Q={...Q,params:{...Q.params,_meta:{...Q.params?._meta||{},[c0]:D.relatedTask}}};this._transport?.send(Q,D).catch((W)=>this._onerror(W))});return}let Y={...$,jsonrpc:"2.0"};if(D?.relatedTask)Y={...Y,params:{...Y.params,_meta:{...Y.params?._meta||{},[c0]:D.relatedTask}}};await this._transport.send(Y,D)}setRequestHandler($,D){let X=ZH($);this.assertRequestHandlerCapability(X),this._requestHandlers.set(X,(G,J)=>{let Y=TH($,G);return Promise.resolve(D(Y,J))})}removeRequestHandler($){this._requestHandlers.delete($)}assertCanSetRequestHandler($){if(this._requestHandlers.has($))throw Error(`A request handler for ${$} already exists, which would be overridden`)}setNotificationHandler($,D){let X=ZH($);this._notificationHandlers.set(X,(G)=>{let J=TH($,G);return Promise.resolve(D(J))})}removeNotificationHandler($){this._notificationHandlers.delete($)}_cleanupTaskProgressHandler($){let D=this._taskProgressTokens.get($);if(D!==void 0)this._progressHandlers.delete(D),this._taskProgressTokens.delete($)}async _enqueueTaskMessage($,D,X){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let G=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue($,D,X,G)}async _clearTaskQueue($,D){if(this._taskMessageQueue){let X=await this._taskMessageQueue.dequeueAll($,D);for(let G of X)if(G.type==="request"&&BH(G.message)){let J=G.message.id,Y=this._requestResolvers.get(J);if(Y)Y(new t(X$.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(J);else this._onerror(Error(`Resolver missing for request ${J} during task ${$} cleanup`))}}}async _waitForTaskUpdate($,D){let X=this._options?.defaultTaskPollInterval??1000;try{let G=await this._taskStore?.getTask($);if(G?.pollInterval)X=G.pollInterval}catch{}return new Promise((G,J)=>{if(D.aborted){J(new t(X$.InvalidRequest,"Request cancelled"));return}let Y=setTimeout(G,X);D.addEventListener("abort",()=>{clearTimeout(Y),J(new t(X$.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore($,D){let X=this._taskStore;if(!X)throw Error("No task store configured");return{createTask:async(G)=>{if(!$)throw Error("No request provided");return await X.createTask(G,$.id,{method:$.method,params:$.params},D)},getTask:async(G)=>{let J=await X.getTask(G,D);if(!J)throw new t(X$.InvalidParams,"Failed to retrieve task: Task not found");return J},storeTaskResult:async(G,J,Y)=>{await X.storeTaskResult(G,J,Y,D);let Q=await X.getTask(G,D);if(Q){let W=E8.parse({method:"notifications/tasks/status",params:Q});if(await this.notification(W),l0(Q.status))this._cleanupTaskProgressHandler(G)}},getTaskResult:(G)=>{return X.getTaskResult(G,D)},updateTaskStatus:async(G,J,Y)=>{let Q=await X.getTask(G,D);if(!Q)throw new t(X$.InvalidParams,`Task "${G}" not found - it may have been cleaned up`);if(l0(Q.status))throw new t(X$.InvalidParams,`Cannot update task "${G}" from terminal status "${Q.status}" to "${J}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await X.updateTaskStatus(G,J,Y,D);let W=await X.getTask(G,D);if(W){let I=E8.parse({method:"notifications/tasks/status",params:W});if(await this.notification(I),l0(W.status))this._cleanupTaskProgressHandler(G)}},listTasks:(G)=>{return X.listTasks(G,D)}}}}function $E($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function DE($,D){let X={...$};for(let G in D){let J=G,Y=D[J];if(Y===void 0)continue;let Q=X[J];if($E(Q)&&$E(Y))X[J]={...Q,...Y};else X[J]=Y}return X}var xk=eJ(N5(),1),hk=eJ(gk(),1);function s4$(){let $=new xk.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return hk.default($),$}class x5{constructor($){this._ajv=$??s4$()}getValidator($){let D="$id"in $&&typeof $.$id==="string"?this._ajv.getSchema($.$id)??this._ajv.compile($):this._ajv.compile($);return(X)=>{if(D(X))return{valid:!0,data:X,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(D.errors)}}}}class h5{constructor($){this._server=$}requestStream($,D,X){return this._server.requestStream($,D,X)}createMessageStream($,D){let X=this._server.getClientCapabilities();if(($.tools||$.toolChoice)&&!X?.sampling?.tools)throw Error("Client does not support sampling tools capability.");if($.messages.length>0){let G=$.messages[$.messages.length-1],J=Array.isArray(G.content)?G.content:[G.content],Y=J.some((U)=>U.type==="tool_result"),Q=$.messages.length>1?$.messages[$.messages.length-2]:void 0,W=Q?Array.isArray(Q.content)?Q.content:[Q.content]:[],I=W.some((U)=>U.type==="tool_use");if(Y){if(J.some((U)=>U.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!I)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(I){let U=new Set(W.filter((H)=>H.type==="tool_use").map((H)=>H.id)),B=new Set(J.filter((H)=>H.type==="tool_result").map((H)=>H.toolUseId));if(U.size!==B.size||![...U].every((H)=>B.has(H)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:$},v8,D)}elicitInputStream($,D){let X=this._server.getClientCapabilities(),G=$.mode??"form";switch(G){case"url":{if(!X?.elicitation?.url)throw Error("Client does not support url elicitation.");break}case"form":{if(!X?.elicitation?.form)throw Error("Client does not support form elicitation.");break}}let J=G==="form"&&$.mode===void 0?{...$,mode:"form"}:$;return this.requestStream({method:"elicitation/create",params:J},sX,D)}async getTask($,D){return this._server.getTask({taskId:$},D)}async getTaskResult($,D,X){return this._server.getTaskResult({taskId:$},D,X)}async listTasks($,D){return this._server.listTasks($?{cursor:$}:void 0,D)}async cancelTask($,D){return this._server.cancelTask({taskId:$},D)}}function uk($,D,X){if(!$)throw Error(`${X} does not support task creation (required for ${D})`);switch(D){case"tools/call":if(!$.tools?.call)throw Error(`${X} does not support task creation for tools/call (required for ${D})`);break;default:break}}function fk($,D,X){if(!$)throw Error(`${X} does not support task creation (required for ${D})`);switch(D){case"sampling/createMessage":if(!$.sampling?.createMessage)throw Error(`${X} does not support task creation for sampling/createMessage (required for ${D})`);break;case"elicitation/create":if(!$.elicitation?.create)throw Error(`${X} does not support task creation for elicitation/create (required for ${D})`);break;default:break}}class u5 extends vH{constructor($,D){super(D);if(this._serverInfo=$,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(T8.options.map((X,G)=>[X,G])),this.isMessageIgnored=(X,G)=>{let J=this._loggingLevels.get(G);return J?this.LOG_LEVEL_SEVERITY.get(X)<this.LOG_LEVEL_SEVERITY.get(J):!1},this._capabilities=D?.capabilities??{},this._instructions=D?.instructions,this._jsonSchemaValidator=D?.jsonSchemaValidator??new x5,this.setRequestHandler(HH,(X)=>this._oninitialize(X)),this.setNotificationHandler(KH,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(jH,async(X,G)=>{let J=G.sessionId||G.requestInfo?.headers["mcp-session-id"]||void 0,{level:Y}=X.params,Q=T8.safeParse(Y);if(Q.success)this._loggingLevels.set(J,Q.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new h5(this)};return this._experimental}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=DE(this._capabilities,$)}setRequestHandler($,D){let G=m0($)?.method;if(!G)throw Error("Schema is missing a method literal");let J;if(d1(G)){let Q=G;J=Q._zod?.def?.value??Q.value}else{let Q=G;J=Q._def?.value??Q.value}if(typeof J!=="string")throw Error("Schema method literal must be a string");if(J==="tools/call"){let Q=async(W,I)=>{let U=f0(aX,W);if(!U.success){let z=U.error instanceof Error?U.error.message:String(U.error);throw new t(X$.InvalidParams,`Invalid tools/call request: ${z}`)}let{params:B}=U.data,H=await Promise.resolve(D(W,I));if(B.task){let z=f0(oX,H);if(!z.success){let L=z.error instanceof Error?z.error.message:String(z.error);throw new t(X$.InvalidParams,`Invalid task creation result: ${L}`)}return z.data}let V=f0(_Q,H);if(!V.success){let z=V.error instanceof Error?V.error.message:String(V.error);throw new t(X$.InvalidParams,`Invalid tools/call result: ${z}`)}return V.data};return super.setRequestHandler($,Q)}return super.setRequestHandler($,D)}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${$})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${$})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${$})`);break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${$})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${$})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${$})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${$})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){if(!this._capabilities)return;switch($){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${$})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${$})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${$})`);break;case"ping":case"initialize":break}}assertTaskCapability($){fk(this._clientCapabilities?.tasks?.requests,$,"Client")}assertTaskHandlerCapability($){if(!this._capabilities)return;uk(this._capabilities.tasks?.requests,$,"Server")}async _oninitialize($){let D=$.params.protocolVersion;return this._clientCapabilities=$.params.capabilities,this._clientVersion=$.params.clientInfo,{protocolVersion:JR.includes(D)?D:IH,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},BQ)}async createMessage($,D){if($.tools||$.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if($.messages.length>0){let X=$.messages[$.messages.length-1],G=Array.isArray(X.content)?X.content:[X.content],J=G.some((I)=>I.type==="tool_result"),Y=$.messages.length>1?$.messages[$.messages.length-2]:void 0,Q=Y?Array.isArray(Y.content)?Y.content:[Y.content]:[],W=Q.some((I)=>I.type==="tool_use");if(J){if(G.some((I)=>I.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!W)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(W){let I=new Set(Q.filter((B)=>B.type==="tool_use").map((B)=>B.id)),U=new Set(G.filter((B)=>B.type==="tool_result").map((B)=>B.toolUseId));if(I.size!==U.size||![...I].every((B)=>U.has(B)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if($.tools)return this.request({method:"sampling/createMessage",params:$},AH,D);return this.request({method:"sampling/createMessage",params:$},v8,D)}async elicitInput($,D){switch($.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let G=$;return this.request({method:"elicitation/create",params:G},sX,D)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let G=$.mode==="form"?$:{...$,mode:"form"},J=await this.request({method:"elicitation/create",params:G},sX,D);if(J.action==="accept"&&J.content&&G.requestedSchema)try{let Q=this._jsonSchemaValidator.getValidator(G.requestedSchema)(J.content);if(!Q.valid)throw new t(X$.InvalidParams,`Elicitation response content does not match requested schema: ${Q.errorMessage}`)}catch(Y){if(Y instanceof t)throw Y;throw new t(X$.InternalError,`Error validating elicitation response: ${Y instanceof Error?Y.message:String(Y)}`)}return J}}}createElicitationCompletionNotifier($,D){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:$}},D)}async listRoots($,D){return this.request({method:"roots/list",params:$},MH,D)}async sendLoggingMessage($,D){if(this._capabilities.logging){if(!this.isMessageIgnored($.level,D))return this.notification({method:"notifications/message",params:$})}}async sendResourceUpdated($){return this.notification({method:"notifications/resources/updated",params:$})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}var ck=Symbol.for("mcp.completable");function f5($){return!!$&&typeof $==="object"&&ck in $}function lk($){return $[ck]?.complete}var mk;(function($){$.Completable="McpCompletable"})(mk||(mk={}));var e4$=/^[A-Za-z0-9._-]{1,128}$/;function $0$($){let D=[];if($.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if($.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${$.length})`]};if($.includes(" "))D.push("Tool name contains spaces, which may cause parsing issues");if($.includes(","))D.push("Tool name contains commas, which may cause parsing issues");if($.startsWith("-")||$.endsWith("-"))D.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");if($.startsWith(".")||$.endsWith("."))D.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");if(!e4$.test($)){let X=$.split("").filter((G)=>!/[A-Za-z0-9._-]/.test(G)).filter((G,J,Y)=>Y.indexOf(G)===J);return D.push(`Tool name contains invalid characters: ${X.map((G)=>`"${G}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:D}}return{isValid:!0,warnings:D}}function D0$($,D){if(D.length>0){console.warn(`Tool name validation warning for "${$}":`);for(let X of D)console.warn(` - ${X}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function m5($){let D=$0$($);return D0$($,D.warnings),D.isValid}class c5{constructor($){this._mcpServer=$}registerToolTask($,D,X){let G={taskSupport:"required",...D.execution};if(G.taskSupport==="forbidden")throw Error(`Cannot register task-based tool '${$}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool($,D.title,D.description,D.inputSchema,D.outputSchema,D.annotations,G,D._meta,X)}}class i5{constructor($,D){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new u5($,D)}get experimental(){if(!this._experimental)this._experimental={tasks:new c5(this)};return this._experimental}async connect($){return await this.server.connect($)}async close(){await this.server.close()}setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler(a0(PQ)),this.server.assertCanSetRequestHandler(a0(aX)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(PQ,()=>({tools:Object.entries(this._registeredTools).filter(([,$])=>$.enabled).map(([$,D])=>{let X={name:$,title:D.title,description:D.description,inputSchema:(()=>{let G=nX(D.inputSchema);return G?EH(G,{strictUnions:!0,pipeStrategy:"input"}):X0$})(),annotations:D.annotations,execution:D.execution,_meta:D._meta};if(D.outputSchema){let G=nX(D.outputSchema);if(G)X.outputSchema=EH(G,{strictUnions:!0,pipeStrategy:"output"})}return X})})),this.server.setRequestHandler(aX,async($,D)=>{try{let X=this._registeredTools[$.params.name];if(!X)throw new t(X$.InvalidParams,`Tool ${$.params.name} not found`);if(!X.enabled)throw new t(X$.InvalidParams,`Tool ${$.params.name} disabled`);let G=!!$.params.task,J=X.execution?.taskSupport,Y="createTask"in X.handler;if((J==="required"||J==="optional")&&!Y)throw new t(X$.InternalError,`Tool ${$.params.name} has taskSupport '${J}' but was not registered with registerToolTask`);if(J==="required"&&!G)throw new t(X$.MethodNotFound,`Tool ${$.params.name} requires task augmentation (taskSupport: 'required')`);if(J==="optional"&&!G&&Y)return await this.handleAutomaticTaskPolling(X,$,D);let Q=await this.validateToolInput(X,$.params.arguments,$.params.name),W=await this.executeToolHandler(X,Q,D);if(G)return W;return await this.validateToolOutput(X,W,$.params.name),W}catch(X){if(X instanceof t){if(X.code===X$.UrlElicitationRequired)throw X}return this.createToolError(X instanceof Error?X.message:String(X))}}),this._toolHandlersInitialized=!0}createToolError($){return{content:[{type:"text",text:$}],isError:!0}}async validateToolInput($,D,X){if(!$.inputSchema)return;let J=nX($.inputSchema)??$.inputSchema,Y=await DQ(J,D);if(!Y.success){let Q="error"in Y?Y.error:"Unknown error",W=XQ(Q);throw new t(X$.InvalidParams,`Input validation error: Invalid arguments for tool ${X}: ${W}`)}return Y.data}async validateToolOutput($,D,X){if(!$.outputSchema)return;if(!("content"in D))return;if(D.isError)return;if(!D.structuredContent)throw new t(X$.InvalidParams,`Output validation error: Tool ${X} has an output schema but no structured content was provided`);let G=nX($.outputSchema),J=await DQ(G,D.structuredContent);if(!J.success){let Y="error"in J?J.error:"Unknown error",Q=XQ(Y);throw new t(X$.InvalidParams,`Output validation error: Invalid structured content for tool ${X}: ${Q}`)}}async executeToolHandler($,D,X){let G=$.handler;if("createTask"in G){if(!X.taskStore)throw Error("No task store provided.");let Y={...X,taskStore:X.taskStore};if($.inputSchema)return await Promise.resolve(G.createTask(D,Y));else return await Promise.resolve(G.createTask(Y))}if($.inputSchema)return await Promise.resolve(G(D,X));else return await Promise.resolve(G(X))}async handleAutomaticTaskPolling($,D,X){if(!X.taskStore)throw Error("No task store provided for task-capable tool.");let G=await this.validateToolInput($,D.params.arguments,D.params.name),J=$.handler,Y={...X,taskStore:X.taskStore},Q=G?await Promise.resolve(J.createTask(G,Y)):await Promise.resolve(J.createTask(Y)),W=Q.task.taskId,I=Q.task,U=I.pollInterval??5000;while(I.status!=="completed"&&I.status!=="failed"&&I.status!=="cancelled"){await new Promise((H)=>setTimeout(H,U));let B=await X.taskStore.getTask(W);if(!B)throw new t(X$.InternalError,`Task ${W} not found during polling`);I=B}return await X.taskStore.getTaskResult(W)}setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler(a0(NQ)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(NQ,async($)=>{switch($.params.ref.type){case"ref/prompt":return FR($),this.handlePromptCompletion($,$.params.ref);case"ref/resource":return bR($),this.handleResourceCompletion($,$.params.ref);default:throw new t(X$.InvalidParams,`Invalid completion reference: ${$.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion($,D){let X=this._registeredPrompts[D.name];if(!X)throw new t(X$.InvalidParams,`Prompt ${D.name} not found`);if(!X.enabled)throw new t(X$.InvalidParams,`Prompt ${D.name} disabled`);if(!X.argsSchema)return JG;let J=m0(X.argsSchema)?.[$.params.argument.name];if(!f5(J))return JG;let Y=lk(J);if(!Y)return JG;let Q=await Y($.params.argument.value,$.params.context);return pk(Q)}async handleResourceCompletion($,D){let X=Object.values(this._registeredResourceTemplates).find((Y)=>Y.resourceTemplate.uriTemplate.toString()===D.uri);if(!X){if(this._registeredResources[D.uri])return JG;throw new t(X$.InvalidParams,`Resource template ${$.params.ref.uri} not found`)}let G=X.resourceTemplate.completeCallback($.params.argument.name);if(!G)return JG;let J=await G($.params.argument.value,$.params.context);return pk(J)}setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler(a0(bQ)),this.server.assertCanSetRequestHandler(a0(jQ)),this.server.assertCanSetRequestHandler(a0(AQ)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(bQ,async($,D)=>{let X=Object.entries(this._registeredResources).filter(([J,Y])=>Y.enabled).map(([J,Y])=>({uri:J,name:Y.name,...Y.metadata})),G=[];for(let J of Object.values(this._registeredResourceTemplates)){if(!J.resourceTemplate.listCallback)continue;let Y=await J.resourceTemplate.listCallback(D);for(let Q of Y.resources)G.push({...J.metadata,...Q})}return{resources:[...X,...G]}}),this.server.setRequestHandler(jQ,async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([D,X])=>({name:D,uriTemplate:X.resourceTemplate.uriTemplate.toString(),...X.metadata}))}}),this.server.setRequestHandler(AQ,async($,D)=>{let X=new URL($.params.uri),G=this._registeredResources[X.toString()];if(G){if(!G.enabled)throw new t(X$.InvalidParams,`Resource ${X} disabled`);return G.readCallback(X,D)}for(let J of Object.values(this._registeredResourceTemplates)){let Y=J.resourceTemplate.uriTemplate.match(X.toString());if(Y)return J.readCallback(X,Y,D)}throw new t(X$.InvalidParams,`Resource ${X} not found`)}),this._resourceHandlersInitialized=!0}setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler(a0(MQ)),this.server.assertCanSetRequestHandler(a0(SQ)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(MQ,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,$])=>$.enabled).map(([$,D])=>{return{name:$,title:D.title,description:D.description,arguments:D.argsSchema?J0$(D.argsSchema):void 0}})})),this.server.setRequestHandler(SQ,async($,D)=>{let X=this._registeredPrompts[$.params.name];if(!X)throw new t(X$.InvalidParams,`Prompt ${$.params.name} not found`);if(!X.enabled)throw new t(X$.InvalidParams,`Prompt ${$.params.name} disabled`);if(X.argsSchema){let G=nX(X.argsSchema),J=await DQ(G,$.params.arguments);if(!J.success){let W="error"in J?J.error:"Unknown error",I=XQ(W);throw new t(X$.InvalidParams,`Invalid arguments for prompt ${$.params.name}: ${I}`)}let Y=J.data,Q=X.callback;return await Promise.resolve(Q(Y,D))}else{let G=X.callback;return await Promise.resolve(G(D))}}),this._promptHandlersInitialized=!0}resource($,D,...X){let G;if(typeof X[0]==="object")G=X.shift();let J=X[0];if(typeof D==="string"){if(this._registeredResources[D])throw Error(`Resource ${D} is already registered`);let Y=this._createRegisteredResource($,void 0,D,G,J);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),Y}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let Y=this._createRegisteredResourceTemplate($,void 0,D,G,J);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),Y}}registerResource($,D,X,G){if(typeof D==="string"){if(this._registeredResources[D])throw Error(`Resource ${D} is already registered`);let J=this._createRegisteredResource($,X.title,D,X,G);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),J}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let J=this._createRegisteredResourceTemplate($,X.title,D,X,G);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),J}}_createRegisteredResource($,D,X,G,J){let Y={name:$,title:D,metadata:G,readCallback:J,enabled:!0,disable:()=>Y.update({enabled:!1}),enable:()=>Y.update({enabled:!0}),remove:()=>Y.update({uri:null}),update:(Q)=>{if(typeof Q.uri<"u"&&Q.uri!==X){if(delete this._registeredResources[X],Q.uri)this._registeredResources[Q.uri]=Y}if(typeof Q.name<"u")Y.name=Q.name;if(typeof Q.title<"u")Y.title=Q.title;if(typeof Q.metadata<"u")Y.metadata=Q.metadata;if(typeof Q.callback<"u")Y.readCallback=Q.callback;if(typeof Q.enabled<"u")Y.enabled=Q.enabled;this.sendResourceListChanged()}};return this._registeredResources[X]=Y,Y}_createRegisteredResourceTemplate($,D,X,G,J){let Y={resourceTemplate:X,title:D,metadata:G,readCallback:J,enabled:!0,disable:()=>Y.update({enabled:!1}),enable:()=>Y.update({enabled:!0}),remove:()=>Y.update({name:null}),update:(I)=>{if(typeof I.name<"u"&&I.name!==$){if(delete this._registeredResourceTemplates[$],I.name)this._registeredResourceTemplates[I.name]=Y}if(typeof I.title<"u")Y.title=I.title;if(typeof I.template<"u")Y.resourceTemplate=I.template;if(typeof I.metadata<"u")Y.metadata=I.metadata;if(typeof I.callback<"u")Y.readCallback=I.callback;if(typeof I.enabled<"u")Y.enabled=I.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[$]=Y;let Q=X.uriTemplate.variableNames;if(Array.isArray(Q)&&Q.some((I)=>!!X.completeCallback(I)))this.setCompletionRequestHandler();return Y}_createRegisteredPrompt($,D,X,G,J){let Y={title:D,description:X,argsSchema:G===void 0?void 0:uD(G),callback:J,enabled:!0,disable:()=>Y.update({enabled:!1}),enable:()=>Y.update({enabled:!0}),remove:()=>Y.update({name:null}),update:(Q)=>{if(typeof Q.name<"u"&&Q.name!==$){if(delete this._registeredPrompts[$],Q.name)this._registeredPrompts[Q.name]=Y}if(typeof Q.title<"u")Y.title=Q.title;if(typeof Q.description<"u")Y.description=Q.description;if(typeof Q.argsSchema<"u")Y.argsSchema=uD(Q.argsSchema);if(typeof Q.callback<"u")Y.callback=Q.callback;if(typeof Q.enabled<"u")Y.enabled=Q.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[$]=Y,G){if(Object.values(G).some((W)=>{let I=W instanceof QQ?W._def?.innerType:W;return f5(I)}))this.setCompletionRequestHandler()}return Y}_createRegisteredTool($,D,X,G,J,Y,Q,W,I){m5($);let U={title:D,description:X,inputSchema:ik(G),outputSchema:ik(J),annotations:Y,execution:Q,_meta:W,handler:I,enabled:!0,disable:()=>U.update({enabled:!1}),enable:()=>U.update({enabled:!0}),remove:()=>U.update({name:null}),update:(B)=>{if(typeof B.name<"u"&&B.name!==$){if(typeof B.name==="string")m5(B.name);if(delete this._registeredTools[$],B.name)this._registeredTools[B.name]=U}if(typeof B.title<"u")U.title=B.title;if(typeof B.description<"u")U.description=B.description;if(typeof B.paramsSchema<"u")U.inputSchema=uD(B.paramsSchema);if(typeof B.outputSchema<"u")U.outputSchema=uD(B.outputSchema);if(typeof B.callback<"u")U.handler=B.callback;if(typeof B.annotations<"u")U.annotations=B.annotations;if(typeof B._meta<"u")U._meta=B._meta;if(typeof B.enabled<"u")U.enabled=B.enabled;this.sendToolListChanged()}};return this._registeredTools[$]=U,this.setToolRequestHandlers(),this.sendToolListChanged(),U}tool($,...D){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let X,G,J,Y;if(typeof D[0]==="string")X=D.shift();if(D.length>1){let W=D[0];if(l5(W)){if(G=D.shift(),D.length>1&&typeof D[0]==="object"&&D[0]!==null&&!l5(D[0]))Y=D.shift()}else if(typeof W==="object"&&W!==null){if(Object.values(W).some((I)=>typeof I==="object"&&I!==null))throw Error(`Tool ${$} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);Y=D.shift()}}let Q=D[0];return this._createRegisteredTool($,void 0,X,G,J,Y,{taskSupport:"forbidden"},void 0,Q)}registerTool($,D,X){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let{title:G,description:J,inputSchema:Y,outputSchema:Q,annotations:W,_meta:I}=D;return this._createRegisteredTool($,G,J,Y,Q,W,{taskSupport:"forbidden"},I,X)}prompt($,...D){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let X;if(typeof D[0]==="string")X=D.shift();let G;if(D.length>1)G=D.shift();let J=D[0],Y=this._createRegisteredPrompt($,void 0,X,G,J);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),Y}registerPrompt($,D,X){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let{title:G,description:J,argsSchema:Y}=D,Q=this._createRegisteredPrompt($,G,J,Y,X);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),Q}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage($,D){return this.server.sendLoggingMessage($,D)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}}var X0$={type:"object",properties:{}};function rk($){return $!==null&&typeof $==="object"&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function nk($){return"_def"in $||"_zod"in $||rk($)}function l5($){if(typeof $!=="object"||$===null)return!1;if(nk($))return!1;if(Object.keys($).length===0)return!0;return Object.values($).some(rk)}function ik($){if(!$)return;if(l5($))return uD($);if(!nk($))throw Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return $}function J0$($){let D=m0($);if(!D)return[];return Object.entries(D).map(([X,G])=>{let J=MN(G),Y=SN(G);return{name:X,description:J,required:!Y}})}function a0($){let X=m0($)?.method;if(!X)throw Error("Schema is missing a method literal");let G=JQ(X);if(typeof G==="string")return G;throw Error("Schema method literal must be a string")}function pk($){return{completion:{values:$.slice(0,100),total:$.length,hasMore:$.length>100}}}var JG={completion:{values:[],hasMore:!1}};import ok from"node:process";class p5{append($){this._buffer=this._buffer?Buffer.concat([this._buffer,$]):$}readMessage(){if(!this._buffer)return null;let $=this._buffer.indexOf(`
314
- `);if($===-1)return null;let D=this._buffer.toString("utf8",0,$).replace(/\r$/,"");return this._buffer=this._buffer.subarray($+1),G0$(D)}clear(){this._buffer=void 0}}function G0$($){return zR.parse(JSON.parse($))}function dk($){return JSON.stringify($)+`
315
- `}class r5{constructor($=ok.stdin,D=ok.stdout){this._stdin=$,this._stdout=D,this._readBuffer=new p5,this._started=!1,this._ondata=(X)=>{this._readBuffer.append(X),this.processReadBuffer()},this._onerror=(X)=>{this.onerror?.(X)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){return new Promise((D)=>{let X=dk($);if(this._stdout.write(X))D();else this._stdout.once("drain",D)})}}var b6={};X4(b6,{xor:()=>Ay,xid:()=>pC,void:()=>wy,uuidv7:()=>xC,uuidv6:()=>gC,uuidv4:()=>yC,uuid:()=>CC,util:()=>x,url:()=>hC,uppercase:()=>MJ,unknown:()=>$X,union:()=>mI,undefined:()=>Ky,ulid:()=>iC,uint64:()=>qy,uint32:()=>Uy,tuple:()=>UF,trim:()=>EJ,treeifyError:()=>GK,transform:()=>lI,toUpperCase:()=>TJ,toLowerCase:()=>ZJ,toJSONSchema:()=>KI,templateLiteral:()=>yy,symbol:()=>Hy,superRefine:()=>gF,success:()=>vy,stringbool:()=>ly,stringFormat:()=>Xy,string:()=>bI,strictObject:()=>by,startsWith:()=>PJ,slugify:()=>vJ,size:()=>aD,setErrorMap:()=>yX$,set:()=>Ny,safeParseAsync:()=>xO,safeParse:()=>gO,safeEncodeAsync:()=>iO,safeEncode:()=>cO,safeDecodeAsync:()=>pO,safeDecode:()=>lO,registry:()=>uW,regexes:()=>$4,regex:()=>jJ,refine:()=>yF,record:()=>BF,readonly:()=>EF,property:()=>BI,promise:()=>gy,prettifyError:()=>YK,preprocess:()=>py,prefault:()=>AF,positive:()=>QI,pipe:()=>TG,partialRecord:()=>Sy,parseAsync:()=>yO,parse:()=>CO,overwrite:()=>F4,optional:()=>EG,object:()=>Fy,number:()=>nO,nullish:()=>Ty,nullable:()=>ZG,null:()=>sO,normalize:()=>RJ,nonpositive:()=>II,nonoptional:()=>MF,nonnegative:()=>UI,never:()=>fI,negative:()=>WI,nativeEnum:()=>Ry,nanoid:()=>mC,nan:()=>ky,multipleOf:()=>XD,minSize:()=>u4,minLength:()=>B0,mime:()=>NJ,meta:()=>my,maxSize:()=>JD,maxLength:()=>sD,map:()=>_y,mac:()=>dC,lte:()=>f1,lt:()=>x4,lowercase:()=>AJ,looseRecord:()=>Py,looseObject:()=>jy,locales:()=>SG,literal:()=>Ey,length:()=>eD,lazy:()=>vF,ksuid:()=>rC,keyof:()=>Oy,jwt:()=>Dy,json:()=>iy,iso:()=>yJ,ipv6:()=>oC,ipv4:()=>nC,intersection:()=>WF,int64:()=>zy,int32:()=>Iy,int:()=>jI,instanceof:()=>cy,includes:()=>SJ,httpUrl:()=>uC,hostname:()=>Jy,hex:()=>Gy,hash:()=>Yy,guid:()=>kC,gte:()=>H1,gt:()=>h4,globalRegistry:()=>o6,getErrorMap:()=>gX$,function:()=>xy,fromJSONSchema:()=>ny,formatError:()=>HG,float64:()=>Wy,float32:()=>Qy,flattenError:()=>qG,file:()=>Zy,exactOptional:()=>LF,enum:()=>cI,endsWith:()=>_J,encodeAsync:()=>fO,encode:()=>hO,emoji:()=>fC,email:()=>vC,e164:()=>$y,discriminatedUnion:()=>My,describe:()=>fy,decodeAsync:()=>mO,decode:()=>uO,date:()=>Ly,custom:()=>uy,cuid2:()=>lC,cuid:()=>cC,core:()=>z0,config:()=>E6,coerce:()=>hF,codec:()=>Cy,clone:()=>q1,cidrv6:()=>aC,cidrv4:()=>tC,check:()=>hy,catch:()=>_F,boolean:()=>dO,bigint:()=>By,base64url:()=>eC,base64:()=>sC,array:()=>CG,any:()=>Vy,_function:()=>xy,_default:()=>bF,_ZodString:()=>AI,ZodXor:()=>GF,ZodXID:()=>EI,ZodVoid:()=>XF,ZodUnknown:()=>$F,ZodUnion:()=>gG,ZodUndefined:()=>tO,ZodUUID:()=>f4,ZodURL:()=>vG,ZodULID:()=>RI,ZodType:()=>V$,ZodTuple:()=>IF,ZodTransform:()=>VF,ZodTemplateLiteral:()=>ZF,ZodSymbol:()=>oO,ZodSuccess:()=>SF,ZodStringFormat:()=>s$,ZodString:()=>xJ,ZodSet:()=>qF,ZodRecord:()=>xG,ZodRealError:()=>R1,ZodReadonly:()=>RF,ZodPromise:()=>kF,ZodPrefault:()=>jF,ZodPipe:()=>rI,ZodOptional:()=>iI,ZodObject:()=>yG,ZodNumberFormat:()=>DX,ZodNumber:()=>uJ,ZodNullable:()=>OF,ZodNull:()=>aO,ZodNonOptional:()=>pI,ZodNever:()=>DF,ZodNanoID:()=>PI,ZodNaN:()=>NF,ZodMap:()=>zF,ZodMAC:()=>rO,ZodLiteral:()=>HF,ZodLazy:()=>TF,ZodKSUID:()=>ZI,ZodJWT:()=>hI,ZodIssueCode:()=>CX$,ZodIntersection:()=>QF,ZodISOTime:()=>OI,ZodISODuration:()=>FI,ZodISODateTime:()=>wI,ZodISODate:()=>LI,ZodIPv6:()=>vI,ZodIPv4:()=>TI,ZodGUID:()=>RG,ZodFunction:()=>CF,ZodFirstPartyTypeKind:()=>xF,ZodFile:()=>KF,ZodExactOptional:()=>wF,ZodError:()=>vX$,ZodEnum:()=>gJ,ZodEmoji:()=>SI,ZodEmail:()=>MI,ZodE164:()=>xI,ZodDiscriminatedUnion:()=>YF,ZodDefault:()=>FF,ZodDate:()=>kG,ZodCustomStringFormat:()=>hJ,ZodCustom:()=>hG,ZodCodec:()=>nI,ZodCatch:()=>PF,ZodCUID2:()=>NI,ZodCUID:()=>_I,ZodCIDRv6:()=>CI,ZodCIDRv4:()=>kI,ZodBoolean:()=>fJ,ZodBigIntFormat:()=>uI,ZodBigInt:()=>mJ,ZodBase64URL:()=>gI,ZodBase64:()=>yI,ZodArray:()=>JF,ZodAny:()=>eO,TimePrecision:()=>UL,NEVER:()=>n5,$output:()=>JL,$input:()=>GL,$brand:()=>d5});var z0={};X4(z0,{version:()=>$V,util:()=>x,treeifyError:()=>GK,toJSONSchema:()=>KI,toDotPath:()=>DC,safeParseAsync:()=>WK,safeParse:()=>QK,safeEncodeAsync:()=>x0$,safeEncode:()=>y0$,safeDecodeAsync:()=>h0$,safeDecode:()=>g0$,registry:()=>uW,regexes:()=>$4,process:()=>d$,prettifyError:()=>YK,parseAsync:()=>LW,parse:()=>wW,meta:()=>lL,locales:()=>SG,isValidJWT:()=>bC,isValidBase64URL:()=>FC,isValidBase64:()=>AV,initializeContext:()=>GD,globalRegistry:()=>o6,globalConfig:()=>GG,formatError:()=>HG,flattenError:()=>qG,finalize:()=>QD,extractDefs:()=>YD,encodeAsync:()=>k0$,encode:()=>T0$,describe:()=>cL,decodeAsync:()=>C0$,decode:()=>v0$,createToJSONSchemaMethod:()=>pL,createStandardJSONSchemaMethod:()=>CJ,config:()=>E6,clone:()=>q1,_xor:()=>IX$,_xid:()=>tW,_void:()=>kL,_uuidv7:()=>iW,_uuidv6:()=>lW,_uuidv4:()=>cW,_uuid:()=>mW,_url:()=>_G,_uppercase:()=>MJ,_unknown:()=>TL,_union:()=>WX$,_undefined:()=>RL,_ulid:()=>oW,_uint64:()=>_L,_uint32:()=>bL,_tuple:()=>zX$,_trim:()=>EJ,_transform:()=>OX$,_toUpperCase:()=>TJ,_toLowerCase:()=>ZJ,_templateLiteral:()=>NX$,_symbol:()=>NL,_superRefine:()=>mL,_success:()=>MX$,_stringbool:()=>iL,_stringFormat:()=>kJ,_string:()=>QL,_startsWith:()=>PJ,_slugify:()=>vJ,_size:()=>aD,_set:()=>KX$,_safeParseAsync:()=>OJ,_safeParse:()=>LJ,_safeEncodeAsync:()=>SW,_safeEncode:()=>AW,_safeDecodeAsync:()=>PW,_safeDecode:()=>MW,_regex:()=>jJ,_refine:()=>fL,_record:()=>qX$,_readonly:()=>_X$,_property:()=>BI,_promise:()=>EX$,_positive:()=>QI,_pipe:()=>PX$,_parseAsync:()=>wJ,_parse:()=>VJ,_overwrite:()=>F4,_optional:()=>FX$,_number:()=>KL,_nullable:()=>bX$,_null:()=>EL,_normalize:()=>RJ,_nonpositive:()=>II,_nonoptional:()=>AX$,_nonnegative:()=>UI,_never:()=>vL,_negative:()=>WI,_nativeEnum:()=>wX$,_nanoid:()=>rW,_nan:()=>gL,_multipleOf:()=>XD,_minSize:()=>u4,_minLength:()=>B0,_min:()=>H1,_mime:()=>NJ,_maxSize:()=>JD,_maxLength:()=>sD,_max:()=>f1,_map:()=>HX$,_mac:()=>IL,_lte:()=>f1,_lt:()=>x4,_lowercase:()=>AJ,_literal:()=>LX$,_length:()=>eD,_lazy:()=>RX$,_ksuid:()=>aW,_jwt:()=>YI,_isoTime:()=>qL,_isoDuration:()=>HL,_isoDateTime:()=>BL,_isoDate:()=>zL,_ipv6:()=>eW,_ipv4:()=>sW,_intersection:()=>BX$,_int64:()=>PL,_int32:()=>FL,_int:()=>wL,_includes:()=>SJ,_guid:()=>PG,_gte:()=>H1,_gt:()=>h4,_float64:()=>OL,_float32:()=>LL,_file:()=>hL,_enum:()=>VX$,_endsWith:()=>_J,_encodeAsync:()=>bW,_encode:()=>OW,_emoji:()=>pW,_email:()=>fW,_e164:()=>GI,_discriminatedUnion:()=>UX$,_default:()=>jX$,_decodeAsync:()=>jW,_decode:()=>FW,_date:()=>CL,_custom:()=>uL,_cuid2:()=>dW,_cuid:()=>nW,_coercedString:()=>WL,_coercedNumber:()=>VL,_coercedDate:()=>yL,_coercedBoolean:()=>AL,_coercedBigint:()=>SL,_cidrv6:()=>DI,_cidrv4:()=>$I,_check:()=>EC,_catch:()=>SX$,_boolean:()=>jL,_bigint:()=>ML,_base64url:()=>JI,_base64:()=>XI,_array:()=>xL,_any:()=>ZL,TimePrecision:()=>UL,NEVER:()=>n5,JSONSchemaGenerator:()=>EO,JSONSchema:()=>ZC,Doc:()=>EW,$output:()=>JL,$input:()=>GL,$constructor:()=>j,$brand:()=>d5,$ZodXor:()=>fV,$ZodXID:()=>zV,$ZodVoid:()=>gV,$ZodUnknown:()=>CV,$ZodUnion:()=>OG,$ZodUndefined:()=>TV,$ZodUUID:()=>JV,$ZodURL:()=>YV,$ZodULID:()=>BV,$ZodType:()=>q$,$ZodTuple:()=>xW,$ZodTransform:()=>oV,$ZodTemplateLiteral:()=>Qw,$ZodSymbol:()=>ZV,$ZodSuccess:()=>Dw,$ZodStringFormat:()=>a$,$ZodString:()=>tD,$ZodSet:()=>pV,$ZodRegistry:()=>YL,$ZodRecord:()=>lV,$ZodRealError:()=>N1,$ZodReadonly:()=>Yw,$ZodPromise:()=>Iw,$ZodPrefault:()=>eV,$ZodPipe:()=>Gw,$ZodOptional:()=>hW,$ZodObjectJIT:()=>uV,$ZodObject:()=>MC,$ZodNumberFormat:()=>RV,$ZodNumber:()=>yW,$ZodNullable:()=>aV,$ZodNull:()=>vV,$ZodNonOptional:()=>$w,$ZodNever:()=>yV,$ZodNanoID:()=>WV,$ZodNaN:()=>Jw,$ZodMap:()=>iV,$ZodMAC:()=>FV,$ZodLiteral:()=>nV,$ZodLazy:()=>Uw,$ZodKSUID:()=>qV,$ZodJWT:()=>_V,$ZodIntersection:()=>cV,$ZodISOTime:()=>VV,$ZodISODuration:()=>wV,$ZodISODateTime:()=>HV,$ZodISODate:()=>KV,$ZodIPv6:()=>OV,$ZodIPv4:()=>LV,$ZodGUID:()=>XV,$ZodFunction:()=>Ww,$ZodFile:()=>dV,$ZodExactOptional:()=>tV,$ZodError:()=>zG,$ZodEnum:()=>rV,$ZodEncodeError:()=>nD,$ZodEmoji:()=>QV,$ZodEmail:()=>GV,$ZodE164:()=>PV,$ZodDiscriminatedUnion:()=>mV,$ZodDefault:()=>sV,$ZodDate:()=>xV,$ZodCustomStringFormat:()=>NV,$ZodCustom:()=>Bw,$ZodCodec:()=>FG,$ZodCheckUpperCase:()=>nK,$ZodCheckStringFormat:()=>FJ,$ZodCheckStartsWith:()=>oK,$ZodCheckSizeEquals:()=>mK,$ZodCheckRegex:()=>pK,$ZodCheckProperty:()=>aK,$ZodCheckOverwrite:()=>eK,$ZodCheckNumberFormat:()=>xK,$ZodCheckMultipleOf:()=>gK,$ZodCheckMinSize:()=>fK,$ZodCheckMinLength:()=>lK,$ZodCheckMimeType:()=>sK,$ZodCheckMaxSize:()=>uK,$ZodCheckMaxLength:()=>cK,$ZodCheckLowerCase:()=>rK,$ZodCheckLessThan:()=>NW,$ZodCheckLengthEquals:()=>iK,$ZodCheckIncludes:()=>dK,$ZodCheckGreaterThan:()=>RW,$ZodCheckEndsWith:()=>tK,$ZodCheckBigIntFormat:()=>hK,$ZodCheck:()=>G6,$ZodCatch:()=>Xw,$ZodCUID2:()=>UV,$ZodCUID:()=>IV,$ZodCIDRv6:()=>jV,$ZodCIDRv4:()=>bV,$ZodBoolean:()=>LG,$ZodBigIntFormat:()=>EV,$ZodBigInt:()=>gW,$ZodBase64URL:()=>SV,$ZodBase64:()=>MV,$ZodAsyncError:()=>g4,$ZodArray:()=>hV,$ZodAny:()=>kV});var n5=Object.freeze({status:"aborted"});function j($,D,X){function G(W,I){if(!W._zod)Object.defineProperty(W,"_zod",{value:{def:I,constr:Q,traits:new Set},enumerable:!1});if(W._zod.traits.has($))return;W._zod.traits.add($),D(W,I);let U=Q.prototype,B=Object.keys(U);for(let H=0;H<B.length;H++){let V=B[H];if(!(V in W))W[V]=U[V].bind(W)}}let J=X?.Parent??Object;class Y extends J{}Object.defineProperty(Y,"name",{value:$});function Q(W){var I;let U=X?.Parent?new Y:this;G(U,W),(I=U._zod).deferred??(I.deferred=[]);for(let B of U._zod.deferred)B();return U}return Object.defineProperty(Q,"init",{value:G}),Object.defineProperty(Q,Symbol.hasInstance,{value:(W)=>{if(X?.Parent&&W instanceof X.Parent)return!0;return W?._zod?.traits?.has($)}}),Object.defineProperty(Q,"name",{value:$}),Q}var d5=Symbol("zod_brand");class g4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class nD extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var GG={};function E6($){if($)Object.assign(GG,$);return GG}var x={};X4(x,{unwrapMessage:()=>YG,uint8ArrayToHex:()=>E0$,uint8ArrayToBase64url:()=>N0$,uint8ArrayToBase64:()=>sk,stringifyPrimitive:()=>k,slugify:()=>a5,shallowClone:()=>e5,safeExtend:()=>j0$,required:()=>S0$,randomString:()=>K0$,propertyKeyTypes:()=>IG,promiseAllObject:()=>H0$,primitiveTypes:()=>$K,prefixIssues:()=>u1,pick:()=>O0$,partial:()=>M0$,parsedType:()=>y,optionalKeys:()=>DK,omit:()=>F0$,objectClone:()=>B0$,numKeys:()=>V0$,nullish:()=>s0,normalizeParams:()=>u,mergeDefs:()=>U0,merge:()=>A0$,jsonStringifyReplacer:()=>qJ,joinValues:()=>S,issue:()=>KJ,isPlainObject:()=>$D,isObject:()=>dD,hexToUint8Array:()=>R0$,getSizableOrigin:()=>UG,getParsedType:()=>w0$,getLengthableOrigin:()=>BG,getEnumValues:()=>QG,getElementAtPath:()=>q0$,floatSafeRemainder:()=>t5,finalizeIssue:()=>_1,extend:()=>b0$,escapeRegex:()=>e1,esc:()=>KW,defineLazy:()=>b$,createTransparentProxy:()=>L0$,cloneDef:()=>z0$,clone:()=>q1,cleanRegex:()=>WG,cleanEnum:()=>P0$,captureStackTrace:()=>VW,cached:()=>HJ,base64urlToUint8Array:()=>_0$,base64ToUint8Array:()=>ak,assignProp:()=>e0,assertNotEqual:()=>Q0$,assertNever:()=>I0$,assertIs:()=>W0$,assertEqual:()=>Y0$,assert:()=>U0$,allowsEval:()=>s5,aborted:()=>DD,NUMBER_FORMAT_RANGES:()=>XK,Class:()=>ek,BIGINT_FORMAT_RANGES:()=>JK});function Y0$($){return $}function Q0$($){return $}function W0$($){}function I0$($){throw Error("Unexpected value in exhaustive check")}function U0$($){}function QG($){let D=Object.values($).filter((G)=>typeof G==="number");return Object.entries($).filter(([G,J])=>D.indexOf(+G)===-1).map(([G,J])=>J)}function S($,D="|"){return $.map((X)=>k(X)).join(D)}function qJ($,D){if(typeof D==="bigint")return D.toString();return D}function HJ($){return{get value(){{let X=$();return Object.defineProperty(this,"value",{value:X}),X}throw Error("cached value already set")}}}function s0($){return $===null||$===void 0}function WG($){let D=$.startsWith("^")?1:0,X=$.endsWith("$")?$.length-1:$.length;return $.slice(D,X)}function t5($,D){let X=($.toString().split(".")[1]||"").length,G=D.toString(),J=(G.split(".")[1]||"").length;if(J===0&&/\d?e-\d?/.test(G)){let I=G.match(/\d?e-(\d?)/);if(I?.[1])J=Number.parseInt(I[1])}let Y=X>J?X:J,Q=Number.parseInt($.toFixed(Y).replace(".","")),W=Number.parseInt(D.toFixed(Y).replace(".",""));return Q%W/10**Y}var tk=Symbol("evaluating");function b$($,D,X){let G=void 0;Object.defineProperty($,D,{get(){if(G===tk)return;if(G===void 0)G=tk,G=X();return G},set(J){Object.defineProperty($,D,{value:J})},configurable:!0})}function B0$($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function e0($,D,X){Object.defineProperty($,D,{value:X,writable:!0,enumerable:!0,configurable:!0})}function U0(...$){let D={};for(let X of $){let G=Object.getOwnPropertyDescriptors(X);Object.assign(D,G)}return Object.defineProperties({},D)}function z0$($){return U0($._zod.def)}function q0$($,D){if(!D)return $;return D.reduce((X,G)=>X?.[G],$)}function H0$($){let D=Object.keys($),X=D.map((G)=>$[G]);return Promise.all(X).then((G)=>{let J={};for(let Y=0;Y<D.length;Y++)J[D[Y]]=G[Y];return J})}function K0$($=10){let X="";for(let G=0;G<$;G++)X+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return X}function KW($){return JSON.stringify($)}function a5($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var VW="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function dD($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var s5=HJ(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function $D($){if(dD($)===!1)return!1;let D=$.constructor;if(D===void 0)return!0;if(typeof D!=="function")return!0;let X=D.prototype;if(dD(X)===!1)return!1;if(Object.prototype.hasOwnProperty.call(X,"isPrototypeOf")===!1)return!1;return!0}function e5($){if($D($))return{...$};if(Array.isArray($))return[...$];return $}function V0$($){let D=0;for(let X in $)if(Object.prototype.hasOwnProperty.call($,X))D++;return D}var w0$=($)=>{let D=typeof $;switch(D){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${D}`)}},IG=new Set(["string","number","symbol"]),$K=new Set(["string","number","bigint","boolean","symbol","undefined"]);function e1($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q1($,D,X){let G=new $._zod.constr(D??$._zod.def);if(!D||X?.parent)G._zod.parent=$;return G}function u($){let D=$;if(!D)return{};if(typeof D==="string")return{error:()=>D};if(D?.message!==void 0){if(D?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");D.error=D.message}if(delete D.message,typeof D.error==="string")return{...D,error:()=>D.error};return D}function L0$($){let D;return new Proxy({},{get(X,G,J){return D??(D=$()),Reflect.get(D,G,J)},set(X,G,J,Y){return D??(D=$()),Reflect.set(D,G,J,Y)},has(X,G){return D??(D=$()),Reflect.has(D,G)},deleteProperty(X,G){return D??(D=$()),Reflect.deleteProperty(D,G)},ownKeys(X){return D??(D=$()),Reflect.ownKeys(D)},getOwnPropertyDescriptor(X,G){return D??(D=$()),Reflect.getOwnPropertyDescriptor(D,G)},defineProperty(X,G,J){return D??(D=$()),Reflect.defineProperty(D,G,J)}})}function k($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function DK($){return Object.keys($).filter((D)=>{return $[D]._zod.optin==="optional"&&$[D]._zod.optout==="optional"})}var XK={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},JK={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function O0$($,D){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let Y=U0($._zod.def,{get shape(){let Q={};for(let W in D){if(!(W in X.shape))throw Error(`Unrecognized key: "${W}"`);if(!D[W])continue;Q[W]=X.shape[W]}return e0(this,"shape",Q),Q},checks:[]});return q1($,Y)}function F0$($,D){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let Y=U0($._zod.def,{get shape(){let Q={...$._zod.def.shape};for(let W in D){if(!(W in X.shape))throw Error(`Unrecognized key: "${W}"`);if(!D[W])continue;delete Q[W]}return e0(this,"shape",Q),Q},checks:[]});return q1($,Y)}function b0$($,D){if(!$D(D))throw Error("Invalid input to extend: expected a plain object");let X=$._zod.def.checks;if(X&&X.length>0){let Y=$._zod.def.shape;for(let Q in D)if(Object.getOwnPropertyDescriptor(Y,Q)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let J=U0($._zod.def,{get shape(){let Y={...$._zod.def.shape,...D};return e0(this,"shape",Y),Y}});return q1($,J)}function j0$($,D){if(!$D(D))throw Error("Invalid input to safeExtend: expected a plain object");let X=U0($._zod.def,{get shape(){let G={...$._zod.def.shape,...D};return e0(this,"shape",G),G}});return q1($,X)}function A0$($,D){let X=U0($._zod.def,{get shape(){let G={...$._zod.def.shape,...D._zod.def.shape};return e0(this,"shape",G),G},get catchall(){return D._zod.def.catchall},checks:[]});return q1($,X)}function M0$($,D,X){let J=D._zod.def.checks;if(J&&J.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let Q=U0(D._zod.def,{get shape(){let W=D._zod.def.shape,I={...W};if(X)for(let U in X){if(!(U in W))throw Error(`Unrecognized key: "${U}"`);if(!X[U])continue;I[U]=$?new $({type:"optional",innerType:W[U]}):W[U]}else for(let U in W)I[U]=$?new $({type:"optional",innerType:W[U]}):W[U];return e0(this,"shape",I),I},checks:[]});return q1(D,Q)}function S0$($,D,X){let G=U0(D._zod.def,{get shape(){let J=D._zod.def.shape,Y={...J};if(X)for(let Q in X){if(!(Q in Y))throw Error(`Unrecognized key: "${Q}"`);if(!X[Q])continue;Y[Q]=new $({type:"nonoptional",innerType:J[Q]})}else for(let Q in J)Y[Q]=new $({type:"nonoptional",innerType:J[Q]});return e0(this,"shape",Y),Y}});return q1(D,G)}function DD($,D=0){if($.aborted===!0)return!0;for(let X=D;X<$.issues.length;X++)if($.issues[X]?.continue!==!0)return!0;return!1}function u1($,D){return D.map((X)=>{var G;return(G=X).path??(G.path=[]),X.path.unshift($),X})}function YG($){return typeof $==="string"?$:$?.message}function _1($,D,X){let G={...$,path:$.path??[]};if(!$.message){let J=YG($.inst?._zod.def?.error?.($))??YG(D?.error?.($))??YG(X.customError?.($))??YG(X.localeError?.($))??"Invalid input";G.message=J}if(delete G.inst,delete G.continue,!D?.reportInput)delete G.input;return G}function UG($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function BG($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function y($){let D=typeof $;switch(D){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let X=$;if(X&&Object.getPrototypeOf(X)!==Object.prototype&&"constructor"in X&&X.constructor)return X.constructor.name}}return D}function KJ(...$){let[D,X,G]=$;if(typeof D==="string")return{message:D,code:"custom",input:X,inst:G};return{...D}}function P0$($){return Object.entries($).filter(([D,X])=>{return Number.isNaN(Number.parseInt(D,10))}).map((D)=>D[1])}function ak($){let D=atob($),X=new Uint8Array(D.length);for(let G=0;G<D.length;G++)X[G]=D.charCodeAt(G);return X}function sk($){let D="";for(let X=0;X<$.length;X++)D+=String.fromCharCode($[X]);return btoa(D)}function _0$($){let D=$.replace(/-/g,"+").replace(/_/g,"/"),X="=".repeat((4-D.length%4)%4);return ak(D+X)}function N0$($){return sk($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function R0$($){let D=$.replace(/^0x/,"");if(D.length%2!==0)throw Error("Invalid hex string length");let X=new Uint8Array(D.length/2);for(let G=0;G<D.length;G+=2)X[G/2]=Number.parseInt(D.slice(G,G+2),16);return X}function E0$($){return Array.from($).map((D)=>D.toString(16).padStart(2,"0")).join("")}class ek{constructor(...$){}}var $C=($,D)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:D,enumerable:!1}),$.message=JSON.stringify(D,qJ,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},zG=j("$ZodError",$C),N1=j("$ZodError",$C,{Parent:Error});function qG($,D=(X)=>X.message){let X={},G=[];for(let J of $.issues)if(J.path.length>0)X[J.path[0]]=X[J.path[0]]||[],X[J.path[0]].push(D(J));else G.push(D(J));return{formErrors:G,fieldErrors:X}}function HG($,D=(X)=>X.message){let X={_errors:[]},G=(J)=>{for(let Y of J.issues)if(Y.code==="invalid_union"&&Y.errors.length)Y.errors.map((Q)=>G({issues:Q}));else if(Y.code==="invalid_key")G({issues:Y.issues});else if(Y.code==="invalid_element")G({issues:Y.issues});else if(Y.path.length===0)X._errors.push(D(Y));else{let Q=X,W=0;while(W<Y.path.length){let I=Y.path[W];if(W!==Y.path.length-1)Q[I]=Q[I]||{_errors:[]};else Q[I]=Q[I]||{_errors:[]},Q[I]._errors.push(D(Y));Q=Q[I],W++}}};return G($),X}function GK($,D=(X)=>X.message){let X={errors:[]},G=(J,Y=[])=>{var Q,W;for(let I of J.issues)if(I.code==="invalid_union"&&I.errors.length)I.errors.map((U)=>G({issues:U},I.path));else if(I.code==="invalid_key")G({issues:I.issues},I.path);else if(I.code==="invalid_element")G({issues:I.issues},I.path);else{let U=[...Y,...I.path];if(U.length===0){X.errors.push(D(I));continue}let B=X,H=0;while(H<U.length){let V=U[H],z=H===U.length-1;if(typeof V==="string")B.properties??(B.properties={}),(Q=B.properties)[V]??(Q[V]={errors:[]}),B=B.properties[V];else B.items??(B.items=[]),(W=B.items)[V]??(W[V]={errors:[]}),B=B.items[V];if(z)B.errors.push(D(I));H++}}};return G($),X}function DC($){let D=[],X=$.map((G)=>typeof G==="object"?G.key:G);for(let G of X)if(typeof G==="number")D.push(`[${G}]`);else if(typeof G==="symbol")D.push(`[${JSON.stringify(String(G))}]`);else if(/[^\w$]/.test(G))D.push(`[${JSON.stringify(G)}]`);else{if(D.length)D.push(".");D.push(G)}return D.join("")}function YK($){let D=[],X=[...$.issues].sort((G,J)=>(G.path??[]).length-(J.path??[]).length);for(let G of X)if(D.push(`✖ ${G.message}`),G.path?.length)D.push(` → at ${DC(G.path)}`);return D.join(`
316
- `)}var VJ=($)=>(D,X,G,J)=>{let Y=G?Object.assign(G,{async:!1}):{async:!1},Q=D._zod.run({value:X,issues:[]},Y);if(Q instanceof Promise)throw new g4;if(Q.issues.length){let W=new(J?.Err??$)(Q.issues.map((I)=>_1(I,Y,E6())));throw VW(W,J?.callee),W}return Q.value},wW=VJ(N1),wJ=($)=>async(D,X,G,J)=>{let Y=G?Object.assign(G,{async:!0}):{async:!0},Q=D._zod.run({value:X,issues:[]},Y);if(Q instanceof Promise)Q=await Q;if(Q.issues.length){let W=new(J?.Err??$)(Q.issues.map((I)=>_1(I,Y,E6())));throw VW(W,J?.callee),W}return Q.value},LW=wJ(N1),LJ=($)=>(D,X,G)=>{let J=G?{...G,async:!1}:{async:!1},Y=D._zod.run({value:X,issues:[]},J);if(Y instanceof Promise)throw new g4;return Y.issues.length?{success:!1,error:new($??zG)(Y.issues.map((Q)=>_1(Q,J,E6())))}:{success:!0,data:Y.value}},QK=LJ(N1),OJ=($)=>async(D,X,G)=>{let J=G?Object.assign(G,{async:!0}):{async:!0},Y=D._zod.run({value:X,issues:[]},J);if(Y instanceof Promise)Y=await Y;return Y.issues.length?{success:!1,error:new $(Y.issues.map((Q)=>_1(Q,J,E6())))}:{success:!0,data:Y.value}},WK=OJ(N1),OW=($)=>(D,X,G)=>{let J=G?Object.assign(G,{direction:"backward"}):{direction:"backward"};return VJ($)(D,X,J)},T0$=OW(N1),FW=($)=>(D,X,G)=>{return VJ($)(D,X,G)},v0$=FW(N1),bW=($)=>async(D,X,G)=>{let J=G?Object.assign(G,{direction:"backward"}):{direction:"backward"};return wJ($)(D,X,J)},k0$=bW(N1),jW=($)=>async(D,X,G)=>{return wJ($)(D,X,G)},C0$=jW(N1),AW=($)=>(D,X,G)=>{let J=G?Object.assign(G,{direction:"backward"}):{direction:"backward"};return LJ($)(D,X,J)},y0$=AW(N1),MW=($)=>(D,X,G)=>{return LJ($)(D,X,G)},g0$=MW(N1),SW=($)=>async(D,X,G)=>{let J=G?Object.assign(G,{direction:"backward"}):{direction:"backward"};return OJ($)(D,X,J)},x0$=SW(N1),PW=($)=>async(D,X,G)=>{return OJ($)(D,X,G)},h0$=PW(N1);var $4={};X4($4,{xid:()=>zK,uuid7:()=>c0$,uuid6:()=>m0$,uuid4:()=>f0$,uuid:()=>oD,uppercase:()=>yK,unicodeEmail:()=>XC,undefined:()=>kK,ulid:()=>BK,time:()=>_K,string:()=>RK,sha512_hex:()=>UD$,sha512_base64url:()=>zD$,sha512_base64:()=>BD$,sha384_hex:()=>QD$,sha384_base64url:()=>ID$,sha384_base64:()=>WD$,sha256_hex:()=>JD$,sha256_base64url:()=>YD$,sha256_base64:()=>GD$,sha1_hex:()=>$D$,sha1_base64url:()=>XD$,sha1_base64:()=>DD$,rfc5322Email:()=>i0$,number:()=>KG,null:()=>vK,nanoid:()=>HK,md5_hex:()=>a0$,md5_base64url:()=>e0$,md5_base64:()=>s0$,mac:()=>bK,lowercase:()=>CK,ksuid:()=>qK,ipv6:()=>FK,ipv4:()=>OK,integer:()=>ZK,idnEmail:()=>p0$,html5Email:()=>l0$,hostname:()=>d0$,hex:()=>t0$,guid:()=>VK,extendedDuration:()=>u0$,emoji:()=>LK,email:()=>wK,e164:()=>SK,duration:()=>KK,domain:()=>o0$,datetime:()=>NK,date:()=>PK,cuid2:()=>UK,cuid:()=>IK,cidrv6:()=>AK,cidrv4:()=>jK,browserEmail:()=>r0$,boolean:()=>TK,bigint:()=>EK,base64url:()=>_W,base64:()=>MK});var IK=/^[cC][^\s-]{8,}$/,UK=/^[0-9a-z]+$/,BK=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zK=/^[0-9a-vA-V]{20}$/,qK=/^[A-Za-z0-9]{27}$/,HK=/^[a-zA-Z0-9_-]{21}$/,KK=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,u0$=/^[-+]?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)?)??$/,VK=/^([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})$/,oD=($)=>{if(!$)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},f0$=oD(4),m0$=oD(6),c0$=oD(7),wK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,l0$=/^[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])?)*$/,i0$=/^(([^<>()\[\]\\.,;:\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,}))$/,XC=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,p0$=XC,r0$=/^[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])?)*$/,n0$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function LK(){return new RegExp(n0$,"u")}var OK=/^(?:(?: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])$/,FK=/^(([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}|:))$/,bK=($)=>{let D=e1($??":");return new RegExp(`^(?:[0-9A-F]{2}${D}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${D}){5}[0-9a-f]{2}$`)},jK=/^((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])$/,AK=/^(([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])$/,MK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_W=/^[A-Za-z0-9_-]*$/,d0$=/^(?=.{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])?)*\.?$/,o0$=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,SK=/^\+[1-9]\d{6,14}$/,JC="(?:(?:\\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])))",PK=new RegExp(`^${JC}$`);function GC($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.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{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function _K($){return new RegExp(`^${GC($)}$`)}function NK($){let D=GC({precision:$.precision}),X=["Z"];if($.local)X.push("");if($.offset)X.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let G=`${D}(?:${X.join("|")})`;return new RegExp(`^${JC}T(?:${G})$`)}var RK=($)=>{let D=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${D}$`)},EK=/^-?\d+n?$/,ZK=/^-?\d+$/,KG=/^-?\d+(?:\.\d+)?$/,TK=/^(?:true|false)$/i,vK=/^null$/i;var kK=/^undefined$/i;var CK=/^[^A-Z]*$/,yK=/^[^a-z]*$/,t0$=/^[0-9a-fA-F]*$/;function VG($,D){return new RegExp(`^[A-Za-z0-9+/]{${$}}${D}$`)}function wG($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var a0$=/^[0-9a-fA-F]{32}$/,s0$=VG(22,"=="),e0$=wG(22),$D$=/^[0-9a-fA-F]{40}$/,DD$=VG(27,"="),XD$=wG(27),JD$=/^[0-9a-fA-F]{64}$/,GD$=VG(43,"="),YD$=wG(43),QD$=/^[0-9a-fA-F]{96}$/,WD$=VG(64,""),ID$=wG(64),UD$=/^[0-9a-fA-F]{128}$/,BD$=VG(86,"=="),zD$=wG(86);var G6=j("$ZodCheck",($,D)=>{var X;$._zod??($._zod={}),$._zod.def=D,(X=$._zod).onattach??(X.onattach=[])}),QC={number:"number",bigint:"bigint",object:"date"},NW=j("$ZodCheckLessThan",($,D)=>{G6.init($,D);let X=QC[typeof D.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Y=(D.inclusive?J.maximum:J.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(D.value<Y)if(D.inclusive)J.maximum=D.value;else J.exclusiveMaximum=D.value}),$._zod.check=(G)=>{if(D.inclusive?G.value<=D.value:G.value<D.value)return;G.issues.push({origin:X,code:"too_big",maximum:typeof D.value==="object"?D.value.getTime():D.value,input:G.value,inclusive:D.inclusive,inst:$,continue:!D.abort})}}),RW=j("$ZodCheckGreaterThan",($,D)=>{G6.init($,D);let X=QC[typeof D.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Y=(D.inclusive?J.minimum:J.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(D.value>Y)if(D.inclusive)J.minimum=D.value;else J.exclusiveMinimum=D.value}),$._zod.check=(G)=>{if(D.inclusive?G.value>=D.value:G.value>D.value)return;G.issues.push({origin:X,code:"too_small",minimum:typeof D.value==="object"?D.value.getTime():D.value,input:G.value,inclusive:D.inclusive,inst:$,continue:!D.abort})}}),gK=j("$ZodCheckMultipleOf",($,D)=>{G6.init($,D),$._zod.onattach.push((X)=>{var G;(G=X._zod.bag).multipleOf??(G.multipleOf=D.value)}),$._zod.check=(X)=>{if(typeof X.value!==typeof D.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof X.value==="bigint"?X.value%D.value===BigInt(0):t5(X.value,D.value)===0)return;X.issues.push({origin:typeof X.value,code:"not_multiple_of",divisor:D.value,input:X.value,inst:$,continue:!D.abort})}}),xK=j("$ZodCheckNumberFormat",($,D)=>{G6.init($,D),D.format=D.format||"float64";let X=D.format?.includes("int"),G=X?"int":"number",[J,Y]=XK[D.format];$._zod.onattach.push((Q)=>{let W=Q._zod.bag;if(W.format=D.format,W.minimum=J,W.maximum=Y,X)W.pattern=ZK}),$._zod.check=(Q)=>{let W=Q.value;if(X){if(!Number.isInteger(W)){Q.issues.push({expected:G,format:D.format,code:"invalid_type",continue:!1,input:W,inst:$});return}if(!Number.isSafeInteger(W)){if(W>0)Q.issues.push({input:W,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!D.abort});else Q.issues.push({input:W,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!D.abort});return}}if(W<J)Q.issues.push({origin:"number",input:W,code:"too_small",minimum:J,inclusive:!0,inst:$,continue:!D.abort});if(W>Y)Q.issues.push({origin:"number",input:W,code:"too_big",maximum:Y,inclusive:!0,inst:$,continue:!D.abort})}}),hK=j("$ZodCheckBigIntFormat",($,D)=>{G6.init($,D);let[X,G]=JK[D.format];$._zod.onattach.push((J)=>{let Y=J._zod.bag;Y.format=D.format,Y.minimum=X,Y.maximum=G}),$._zod.check=(J)=>{let Y=J.value;if(Y<X)J.issues.push({origin:"bigint",input:Y,code:"too_small",minimum:X,inclusive:!0,inst:$,continue:!D.abort});if(Y>G)J.issues.push({origin:"bigint",input:Y,code:"too_big",maximum:G,inclusive:!0,inst:$,continue:!D.abort})}}),uK=j("$ZodCheckMaxSize",($,D)=>{var X;G6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!s0(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(D.maximum<J)G._zod.bag.maximum=D.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.size<=D.maximum)return;G.issues.push({origin:UG(J),code:"too_big",maximum:D.maximum,inclusive:!0,input:J,inst:$,continue:!D.abort})}}),fK=j("$ZodCheckMinSize",($,D)=>{var X;G6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!s0(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(D.minimum>J)G._zod.bag.minimum=D.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.size>=D.minimum)return;G.issues.push({origin:UG(J),code:"too_small",minimum:D.minimum,inclusive:!0,input:J,inst:$,continue:!D.abort})}}),mK=j("$ZodCheckSizeEquals",($,D)=>{var X;G6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!s0(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=D.size,J.maximum=D.size,J.size=D.size}),$._zod.check=(G)=>{let J=G.value,Y=J.size;if(Y===D.size)return;let Q=Y>D.size;G.issues.push({origin:UG(J),...Q?{code:"too_big",maximum:D.size}:{code:"too_small",minimum:D.size},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!D.abort})}}),cK=j("$ZodCheckMaxLength",($,D)=>{var X;G6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!s0(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(D.maximum<J)G._zod.bag.maximum=D.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.length<=D.maximum)return;let Q=BG(J);G.issues.push({origin:Q,code:"too_big",maximum:D.maximum,inclusive:!0,input:J,inst:$,continue:!D.abort})}}),lK=j("$ZodCheckMinLength",($,D)=>{var X;G6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!s0(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(D.minimum>J)G._zod.bag.minimum=D.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.length>=D.minimum)return;let Q=BG(J);G.issues.push({origin:Q,code:"too_small",minimum:D.minimum,inclusive:!0,input:J,inst:$,continue:!D.abort})}}),iK=j("$ZodCheckLengthEquals",($,D)=>{var X;G6.init($,D),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!s0(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=D.length,J.maximum=D.length,J.length=D.length}),$._zod.check=(G)=>{let J=G.value,Y=J.length;if(Y===D.length)return;let Q=BG(J),W=Y>D.length;G.issues.push({origin:Q,...W?{code:"too_big",maximum:D.length}:{code:"too_small",minimum:D.length},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!D.abort})}}),FJ=j("$ZodCheckStringFormat",($,D)=>{var X,G;if(G6.init($,D),$._zod.onattach.push((J)=>{let Y=J._zod.bag;if(Y.format=D.format,D.pattern)Y.patterns??(Y.patterns=new Set),Y.patterns.add(D.pattern)}),D.pattern)(X=$._zod).check??(X.check=(J)=>{if(D.pattern.lastIndex=0,D.pattern.test(J.value))return;J.issues.push({origin:"string",code:"invalid_format",format:D.format,input:J.value,...D.pattern?{pattern:D.pattern.toString()}:{},inst:$,continue:!D.abort})});else(G=$._zod).check??(G.check=()=>{})}),pK=j("$ZodCheckRegex",($,D)=>{FJ.init($,D),$._zod.check=(X)=>{if(D.pattern.lastIndex=0,D.pattern.test(X.value))return;X.issues.push({origin:"string",code:"invalid_format",format:"regex",input:X.value,pattern:D.pattern.toString(),inst:$,continue:!D.abort})}}),rK=j("$ZodCheckLowerCase",($,D)=>{D.pattern??(D.pattern=CK),FJ.init($,D)}),nK=j("$ZodCheckUpperCase",($,D)=>{D.pattern??(D.pattern=yK),FJ.init($,D)}),dK=j("$ZodCheckIncludes",($,D)=>{G6.init($,D);let X=e1(D.includes),G=new RegExp(typeof D.position==="number"?`^.{${D.position}}${X}`:X);D.pattern=G,$._zod.onattach.push((J)=>{let Y=J._zod.bag;Y.patterns??(Y.patterns=new Set),Y.patterns.add(G)}),$._zod.check=(J)=>{if(J.value.includes(D.includes,D.position))return;J.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:D.includes,input:J.value,inst:$,continue:!D.abort})}}),oK=j("$ZodCheckStartsWith",($,D)=>{G6.init($,D);let X=new RegExp(`^${e1(D.prefix)}.*`);D.pattern??(D.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.startsWith(D.prefix))return;G.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:D.prefix,input:G.value,inst:$,continue:!D.abort})}}),tK=j("$ZodCheckEndsWith",($,D)=>{G6.init($,D);let X=new RegExp(`.*${e1(D.suffix)}$`);D.pattern??(D.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.endsWith(D.suffix))return;G.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:D.suffix,input:G.value,inst:$,continue:!D.abort})}});function YC($,D,X){if($.issues.length)D.issues.push(...u1(X,$.issues))}var aK=j("$ZodCheckProperty",($,D)=>{G6.init($,D),$._zod.check=(X)=>{let G=D.schema._zod.run({value:X.value[D.property],issues:[]},{});if(G instanceof Promise)return G.then((J)=>YC(J,X,D.property));YC(G,X,D.property);return}}),sK=j("$ZodCheckMimeType",($,D)=>{G6.init($,D);let X=new Set(D.mime);$._zod.onattach.push((G)=>{G._zod.bag.mime=D.mime}),$._zod.check=(G)=>{if(X.has(G.value.type))return;G.issues.push({code:"invalid_value",values:D.mime,input:G.value.type,inst:$,continue:!D.abort})}}),eK=j("$ZodCheckOverwrite",($,D)=>{G6.init($,D),$._zod.check=(X)=>{X.value=D.tx(X.value)}});class EW{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let X=$.split(`
317
- `).filter((Y)=>Y),G=Math.min(...X.map((Y)=>Y.length-Y.trimStart().length)),J=X.map((Y)=>Y.slice(G)).map((Y)=>" ".repeat(this.indent*2)+Y);for(let Y of J)this.content.push(Y)}compile(){let $=Function,D=this?.args,G=[...(this?.content??[""]).map((J)=>` ${J}`)];return new $(...D,G.join(`
318
- `))}}var $V={major:4,minor:3,patch:6};var q$=j("$ZodType",($,D)=>{var X;$??($={}),$._zod.def=D,$._zod.bag=$._zod.bag||{},$._zod.version=$V;let G=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))G.unshift($);for(let J of G)for(let Y of J._zod.onattach)Y($);if(G.length===0)(X=$._zod).deferred??(X.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let J=(Q,W,I)=>{let U=DD(Q),B;for(let H of W){if(H._zod.def.when){if(!H._zod.def.when(Q))continue}else if(U)continue;let V=Q.issues.length,z=H._zod.check(Q);if(z instanceof Promise&&I?.async===!1)throw new g4;if(B||z instanceof Promise)B=(B??Promise.resolve()).then(async()=>{if(await z,Q.issues.length===V)return;if(!U)U=DD(Q,V)});else{if(Q.issues.length===V)continue;if(!U)U=DD(Q,V)}}if(B)return B.then(()=>{return Q});return Q},Y=(Q,W,I)=>{if(DD(Q))return Q.aborted=!0,Q;let U=J(W,G,I);if(U instanceof Promise){if(I.async===!1)throw new g4;return U.then((B)=>$._zod.parse(B,I))}return $._zod.parse(U,I)};$._zod.run=(Q,W)=>{if(W.skipChecks)return $._zod.parse(Q,W);if(W.direction==="backward"){let U=$._zod.parse({value:Q.value,issues:[]},{...W,skipChecks:!0});if(U instanceof Promise)return U.then((B)=>{return Y(B,Q,W)});return Y(U,Q,W)}let I=$._zod.parse(Q,W);if(I instanceof Promise){if(W.async===!1)throw new g4;return I.then((U)=>J(U,G,W))}return J(I,G,W)}}b$($,"~standard",()=>({validate:(J)=>{try{let Y=QK($,J);return Y.success?{value:Y.data}:{issues:Y.error?.issues}}catch(Y){return WK($,J).then((Q)=>Q.success?{value:Q.data}:{issues:Q.error?.issues})}},vendor:"zod",version:1}))}),tD=j("$ZodString",($,D)=>{q$.init($,D),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??RK($._zod.bag),$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=String(X.value)}catch(J){}if(typeof X.value==="string")return X;return X.issues.push({expected:"string",code:"invalid_type",input:X.value,inst:$}),X}}),a$=j("$ZodStringFormat",($,D)=>{FJ.init($,D),tD.init($,D)}),XV=j("$ZodGUID",($,D)=>{D.pattern??(D.pattern=VK),a$.init($,D)}),JV=j("$ZodUUID",($,D)=>{if(D.version){let G={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[D.version];if(G===void 0)throw Error(`Invalid UUID version: "${D.version}"`);D.pattern??(D.pattern=oD(G))}else D.pattern??(D.pattern=oD());a$.init($,D)}),GV=j("$ZodEmail",($,D)=>{D.pattern??(D.pattern=wK),a$.init($,D)}),YV=j("$ZodURL",($,D)=>{a$.init($,D),$._zod.check=(X)=>{try{let G=X.value.trim(),J=new URL(G);if(D.hostname){if(D.hostname.lastIndex=0,!D.hostname.test(J.hostname))X.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:D.hostname.source,input:X.value,inst:$,continue:!D.abort})}if(D.protocol){if(D.protocol.lastIndex=0,!D.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))X.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:D.protocol.source,input:X.value,inst:$,continue:!D.abort})}if(D.normalize)X.value=J.href;else X.value=G;return}catch(G){X.issues.push({code:"invalid_format",format:"url",input:X.value,inst:$,continue:!D.abort})}}}),QV=j("$ZodEmoji",($,D)=>{D.pattern??(D.pattern=LK()),a$.init($,D)}),WV=j("$ZodNanoID",($,D)=>{D.pattern??(D.pattern=HK),a$.init($,D)}),IV=j("$ZodCUID",($,D)=>{D.pattern??(D.pattern=IK),a$.init($,D)}),UV=j("$ZodCUID2",($,D)=>{D.pattern??(D.pattern=UK),a$.init($,D)}),BV=j("$ZodULID",($,D)=>{D.pattern??(D.pattern=BK),a$.init($,D)}),zV=j("$ZodXID",($,D)=>{D.pattern??(D.pattern=zK),a$.init($,D)}),qV=j("$ZodKSUID",($,D)=>{D.pattern??(D.pattern=qK),a$.init($,D)}),HV=j("$ZodISODateTime",($,D)=>{D.pattern??(D.pattern=NK(D)),a$.init($,D)}),KV=j("$ZodISODate",($,D)=>{D.pattern??(D.pattern=PK),a$.init($,D)}),VV=j("$ZodISOTime",($,D)=>{D.pattern??(D.pattern=_K(D)),a$.init($,D)}),wV=j("$ZodISODuration",($,D)=>{D.pattern??(D.pattern=KK),a$.init($,D)}),LV=j("$ZodIPv4",($,D)=>{D.pattern??(D.pattern=OK),a$.init($,D),$._zod.bag.format="ipv4"}),OV=j("$ZodIPv6",($,D)=>{D.pattern??(D.pattern=FK),a$.init($,D),$._zod.bag.format="ipv6",$._zod.check=(X)=>{try{new URL(`http://[${X.value}]`)}catch{X.issues.push({code:"invalid_format",format:"ipv6",input:X.value,inst:$,continue:!D.abort})}}}),FV=j("$ZodMAC",($,D)=>{D.pattern??(D.pattern=bK(D.delimiter)),a$.init($,D),$._zod.bag.format="mac"}),bV=j("$ZodCIDRv4",($,D)=>{D.pattern??(D.pattern=jK),a$.init($,D)}),jV=j("$ZodCIDRv6",($,D)=>{D.pattern??(D.pattern=AK),a$.init($,D),$._zod.check=(X)=>{let G=X.value.split("/");try{if(G.length!==2)throw Error();let[J,Y]=G;if(!Y)throw Error();let Q=Number(Y);if(`${Q}`!==Y)throw Error();if(Q<0||Q>128)throw Error();new URL(`http://[${J}]`)}catch{X.issues.push({code:"invalid_format",format:"cidrv6",input:X.value,inst:$,continue:!D.abort})}}});function AV($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var MV=j("$ZodBase64",($,D)=>{D.pattern??(D.pattern=MK),a$.init($,D),$._zod.bag.contentEncoding="base64",$._zod.check=(X)=>{if(AV(X.value))return;X.issues.push({code:"invalid_format",format:"base64",input:X.value,inst:$,continue:!D.abort})}});function FC($){if(!_W.test($))return!1;let D=$.replace(/[-_]/g,(G)=>G==="-"?"+":"/"),X=D.padEnd(Math.ceil(D.length/4)*4,"=");return AV(X)}var SV=j("$ZodBase64URL",($,D)=>{D.pattern??(D.pattern=_W),a$.init($,D),$._zod.bag.contentEncoding="base64url",$._zod.check=(X)=>{if(FC(X.value))return;X.issues.push({code:"invalid_format",format:"base64url",input:X.value,inst:$,continue:!D.abort})}}),PV=j("$ZodE164",($,D)=>{D.pattern??(D.pattern=SK),a$.init($,D)});function bC($,D=null){try{let X=$.split(".");if(X.length!==3)return!1;let[G]=X;if(!G)return!1;let J=JSON.parse(atob(G));if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(D&&(!("alg"in J)||J.alg!==D))return!1;return!0}catch{return!1}}var _V=j("$ZodJWT",($,D)=>{a$.init($,D),$._zod.check=(X)=>{if(bC(X.value,D.alg))return;X.issues.push({code:"invalid_format",format:"jwt",input:X.value,inst:$,continue:!D.abort})}}),NV=j("$ZodCustomStringFormat",($,D)=>{a$.init($,D),$._zod.check=(X)=>{if(D.fn(X.value))return;X.issues.push({code:"invalid_format",format:D.format,input:X.value,inst:$,continue:!D.abort})}}),yW=j("$ZodNumber",($,D)=>{q$.init($,D),$._zod.pattern=$._zod.bag.pattern??KG,$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=Number(X.value)}catch(Q){}let J=X.value;if(typeof J==="number"&&!Number.isNaN(J)&&Number.isFinite(J))return X;let Y=typeof J==="number"?Number.isNaN(J)?"NaN":!Number.isFinite(J)?"Infinity":void 0:void 0;return X.issues.push({expected:"number",code:"invalid_type",input:J,inst:$,...Y?{received:Y}:{}}),X}}),RV=j("$ZodNumberFormat",($,D)=>{xK.init($,D),yW.init($,D)}),LG=j("$ZodBoolean",($,D)=>{q$.init($,D),$._zod.pattern=TK,$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=Boolean(X.value)}catch(Y){}let J=X.value;if(typeof J==="boolean")return X;return X.issues.push({expected:"boolean",code:"invalid_type",input:J,inst:$}),X}}),gW=j("$ZodBigInt",($,D)=>{q$.init($,D),$._zod.pattern=EK,$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=BigInt(X.value)}catch(J){}if(typeof X.value==="bigint")return X;return X.issues.push({expected:"bigint",code:"invalid_type",input:X.value,inst:$}),X}}),EV=j("$ZodBigIntFormat",($,D)=>{hK.init($,D),gW.init($,D)}),ZV=j("$ZodSymbol",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J==="symbol")return X;return X.issues.push({expected:"symbol",code:"invalid_type",input:J,inst:$}),X}}),TV=j("$ZodUndefined",($,D)=>{q$.init($,D),$._zod.pattern=kK,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(X,G)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"undefined",code:"invalid_type",input:J,inst:$}),X}}),vV=j("$ZodNull",($,D)=>{q$.init($,D),$._zod.pattern=vK,$._zod.values=new Set([null]),$._zod.parse=(X,G)=>{let J=X.value;if(J===null)return X;return X.issues.push({expected:"null",code:"invalid_type",input:J,inst:$}),X}}),kV=j("$ZodAny",($,D)=>{q$.init($,D),$._zod.parse=(X)=>X}),CV=j("$ZodUnknown",($,D)=>{q$.init($,D),$._zod.parse=(X)=>X}),yV=j("$ZodNever",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{return X.issues.push({expected:"never",code:"invalid_type",input:X.value,inst:$}),X}}),gV=j("$ZodVoid",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"void",code:"invalid_type",input:J,inst:$}),X}}),xV=j("$ZodDate",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{if(D.coerce)try{X.value=new Date(X.value)}catch(W){}let J=X.value,Y=J instanceof Date;if(Y&&!Number.isNaN(J.getTime()))return X;return X.issues.push({expected:"date",code:"invalid_type",input:J,...Y?{received:"Invalid Date"}:{},inst:$}),X}});function IC($,D,X){if($.issues.length)D.issues.push(...u1(X,$.issues));D.value[X]=$.value}var hV=j("$ZodArray",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(!Array.isArray(J))return X.issues.push({expected:"array",code:"invalid_type",input:J,inst:$}),X;X.value=Array(J.length);let Y=[];for(let Q=0;Q<J.length;Q++){let W=J[Q],I=D.element._zod.run({value:W,issues:[]},G);if(I instanceof Promise)Y.push(I.then((U)=>IC(U,X,Q)));else IC(I,X,Q)}if(Y.length)return Promise.all(Y).then(()=>X);return X}});function CW($,D,X,G,J){if($.issues.length){if(J&&!(X in G))return;D.issues.push(...u1(X,$.issues))}if($.value===void 0){if(X in G)D.value[X]=void 0}else D.value[X]=$.value}function jC($){let D=Object.keys($.shape);for(let G of D)if(!$.shape?.[G]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${G}": expected a Zod schema`);let X=DK($.shape);return{...$,keys:D,keySet:new Set(D),numKeys:D.length,optionalKeys:new Set(X)}}function AC($,D,X,G,J,Y){let Q=[],W=J.keySet,I=J.catchall._zod,U=I.def.type,B=I.optout==="optional";for(let H in D){if(W.has(H))continue;if(U==="never"){Q.push(H);continue}let V=I.run({value:D[H],issues:[]},G);if(V instanceof Promise)$.push(V.then((z)=>CW(z,X,H,D,B)));else CW(V,X,H,D,B)}if(Q.length)X.issues.push({code:"unrecognized_keys",keys:Q,input:D,inst:Y});if(!$.length)return X;return Promise.all($).then(()=>{return X})}var MC=j("$ZodObject",($,D)=>{if(q$.init($,D),!Object.getOwnPropertyDescriptor(D,"shape")?.get){let W=D.shape;Object.defineProperty(D,"shape",{get:()=>{let I={...W};return Object.defineProperty(D,"shape",{value:I}),I}})}let G=HJ(()=>jC(D));b$($._zod,"propValues",()=>{let W=D.shape,I={};for(let U in W){let B=W[U]._zod;if(B.values){I[U]??(I[U]=new Set);for(let H of B.values)I[U].add(H)}}return I});let J=dD,Y=D.catchall,Q;$._zod.parse=(W,I)=>{Q??(Q=G.value);let U=W.value;if(!J(U))return W.issues.push({expected:"object",code:"invalid_type",input:U,inst:$}),W;W.value={};let B=[],H=Q.shape;for(let V of Q.keys){let z=H[V],L=z._zod.optout==="optional",F=z._zod.run({value:U[V],issues:[]},I);if(F instanceof Promise)B.push(F.then((b)=>CW(b,W,V,U,L)));else CW(F,W,V,U,L)}if(!Y)return B.length?Promise.all(B).then(()=>W):W;return AC(B,U,W,I,G.value,$)}}),uV=j("$ZodObjectJIT",($,D)=>{MC.init($,D);let X=$._zod.parse,G=HJ(()=>jC(D)),J=(V)=>{let z=new EW(["shape","payload","ctx"]),L=G.value,F=(v)=>{let g=KW(v);return`shape[${g}]._zod.run({ value: input[${g}], issues: [] }, ctx)`};z.write("const input = payload.value;");let b=Object.create(null),P=0;for(let v of L.keys)b[v]=`key_${P++}`;z.write("const newResult = {};");for(let v of L.keys){let g=b[v],T=KW(v),e$=V[v]?._zod?.optout==="optional";if(z.write(`const ${g} = ${F(v)};`),e$)z.write(`
319
- if (${g}.issues.length) {
320
- if (${T} in input) {
321
- payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
322
- ...iss,
323
- path: iss.path ? [${T}, ...iss.path] : [${T}]
324
- })));
325
- }
326
- }
327
-
328
- if (${g}.value === undefined) {
329
- if (${T} in input) {
330
- newResult[${T}] = undefined;
331
- }
332
- } else {
333
- newResult[${T}] = ${g}.value;
334
- }
335
-
336
- `);else z.write(`
337
- if (${g}.issues.length) {
338
- payload.issues = payload.issues.concat(${g}.issues.map(iss => ({
339
- ...iss,
340
- path: iss.path ? [${T}, ...iss.path] : [${T}]
341
- })));
342
- }
343
-
344
- if (${g}.value === undefined) {
345
- if (${T} in input) {
346
- newResult[${T}] = undefined;
347
- }
348
- } else {
349
- newResult[${T}] = ${g}.value;
350
- }
351
-
352
- `)}z.write("payload.value = newResult;"),z.write("return payload;");let Z=z.compile();return(v,g)=>Z(V,v,g)},Y,Q=dD,W=!GG.jitless,U=W&&s5.value,B=D.catchall,H;$._zod.parse=(V,z)=>{H??(H=G.value);let L=V.value;if(!Q(L))return V.issues.push({expected:"object",code:"invalid_type",input:L,inst:$}),V;if(W&&U&&z?.async===!1&&z.jitless!==!0){if(!Y)Y=J(D.shape);if(V=Y(V,z),!B)return V;return AC([],L,V,z,H,$)}return X(V,z)}});function UC($,D,X,G){for(let Y of $)if(Y.issues.length===0)return D.value=Y.value,D;let J=$.filter((Y)=>!DD(Y));if(J.length===1)return D.value=J[0].value,J[0];return D.issues.push({code:"invalid_union",input:D.value,inst:X,errors:$.map((Y)=>Y.issues.map((Q)=>_1(Q,G,E6())))}),D}var OG=j("$ZodUnion",($,D)=>{q$.init($,D),b$($._zod,"optin",()=>D.options.some((J)=>J._zod.optin==="optional")?"optional":void 0),b$($._zod,"optout",()=>D.options.some((J)=>J._zod.optout==="optional")?"optional":void 0),b$($._zod,"values",()=>{if(D.options.every((J)=>J._zod.values))return new Set(D.options.flatMap((J)=>Array.from(J._zod.values)));return}),b$($._zod,"pattern",()=>{if(D.options.every((J)=>J._zod.pattern)){let J=D.options.map((Y)=>Y._zod.pattern);return new RegExp(`^(${J.map((Y)=>WG(Y.source)).join("|")})$`)}return});let X=D.options.length===1,G=D.options[0]._zod.run;$._zod.parse=(J,Y)=>{if(X)return G(J,Y);let Q=!1,W=[];for(let I of D.options){let U=I._zod.run({value:J.value,issues:[]},Y);if(U instanceof Promise)W.push(U),Q=!0;else{if(U.issues.length===0)return U;W.push(U)}}if(!Q)return UC(W,J,$,Y);return Promise.all(W).then((I)=>{return UC(I,J,$,Y)})}});function BC($,D,X,G){let J=$.filter((Y)=>Y.issues.length===0);if(J.length===1)return D.value=J[0].value,D;if(J.length===0)D.issues.push({code:"invalid_union",input:D.value,inst:X,errors:$.map((Y)=>Y.issues.map((Q)=>_1(Q,G,E6())))});else D.issues.push({code:"invalid_union",input:D.value,inst:X,errors:[],inclusive:!1});return D}var fV=j("$ZodXor",($,D)=>{OG.init($,D),D.inclusive=!1;let X=D.options.length===1,G=D.options[0]._zod.run;$._zod.parse=(J,Y)=>{if(X)return G(J,Y);let Q=!1,W=[];for(let I of D.options){let U=I._zod.run({value:J.value,issues:[]},Y);if(U instanceof Promise)W.push(U),Q=!0;else W.push(U)}if(!Q)return BC(W,J,$,Y);return Promise.all(W).then((I)=>{return BC(I,J,$,Y)})}}),mV=j("$ZodDiscriminatedUnion",($,D)=>{D.inclusive=!1,OG.init($,D);let X=$._zod.parse;b$($._zod,"propValues",()=>{let J={};for(let Y of D.options){let Q=Y._zod.propValues;if(!Q||Object.keys(Q).length===0)throw Error(`Invalid discriminated union option at index "${D.options.indexOf(Y)}"`);for(let[W,I]of Object.entries(Q)){if(!J[W])J[W]=new Set;for(let U of I)J[W].add(U)}}return J});let G=HJ(()=>{let J=D.options,Y=new Map;for(let Q of J){let W=Q._zod.propValues?.[D.discriminator];if(!W||W.size===0)throw Error(`Invalid discriminated union option at index "${D.options.indexOf(Q)}"`);for(let I of W){if(Y.has(I))throw Error(`Duplicate discriminator value "${String(I)}"`);Y.set(I,Q)}}return Y});$._zod.parse=(J,Y)=>{let Q=J.value;if(!dD(Q))return J.issues.push({code:"invalid_type",expected:"object",input:Q,inst:$}),J;let W=G.value.get(Q?.[D.discriminator]);if(W)return W._zod.run(J,Y);if(D.unionFallback)return X(J,Y);return J.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:D.discriminator,input:Q,path:[D.discriminator],inst:$}),J}}),cV=j("$ZodIntersection",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value,Y=D.left._zod.run({value:J,issues:[]},G),Q=D.right._zod.run({value:J,issues:[]},G);if(Y instanceof Promise||Q instanceof Promise)return Promise.all([Y,Q]).then(([I,U])=>{return zC(X,I,U)});return zC(X,Y,Q)}});function DV($,D){if($===D)return{valid:!0,data:$};if($ instanceof Date&&D instanceof Date&&+$===+D)return{valid:!0,data:$};if($D($)&&$D(D)){let X=Object.keys(D),G=Object.keys($).filter((Y)=>X.indexOf(Y)!==-1),J={...$,...D};for(let Y of G){let Q=DV($[Y],D[Y]);if(!Q.valid)return{valid:!1,mergeErrorPath:[Y,...Q.mergeErrorPath]};J[Y]=Q.data}return{valid:!0,data:J}}if(Array.isArray($)&&Array.isArray(D)){if($.length!==D.length)return{valid:!1,mergeErrorPath:[]};let X=[];for(let G=0;G<$.length;G++){let J=$[G],Y=D[G],Q=DV(J,Y);if(!Q.valid)return{valid:!1,mergeErrorPath:[G,...Q.mergeErrorPath]};X.push(Q.data)}return{valid:!0,data:X}}return{valid:!1,mergeErrorPath:[]}}function zC($,D,X){let G=new Map,J;for(let W of D.issues)if(W.code==="unrecognized_keys"){J??(J=W);for(let I of W.keys){if(!G.has(I))G.set(I,{});G.get(I).l=!0}}else $.issues.push(W);for(let W of X.issues)if(W.code==="unrecognized_keys")for(let I of W.keys){if(!G.has(I))G.set(I,{});G.get(I).r=!0}else $.issues.push(W);let Y=[...G].filter(([,W])=>W.l&&W.r).map(([W])=>W);if(Y.length&&J)$.issues.push({...J,keys:Y});if(DD($))return $;let Q=DV(D.value,X.value);if(!Q.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(Q.mergeErrorPath)}`);return $.value=Q.data,$}var xW=j("$ZodTuple",($,D)=>{q$.init($,D);let X=D.items;$._zod.parse=(G,J)=>{let Y=G.value;if(!Array.isArray(Y))return G.issues.push({input:Y,inst:$,expected:"tuple",code:"invalid_type"}),G;G.value=[];let Q=[],W=[...X].reverse().findIndex((B)=>B._zod.optin!=="optional"),I=W===-1?0:X.length-W;if(!D.rest){let B=Y.length>X.length,H=Y.length<I-1;if(B||H)return G.issues.push({...B?{code:"too_big",maximum:X.length,inclusive:!0}:{code:"too_small",minimum:X.length},input:Y,inst:$,origin:"array"}),G}let U=-1;for(let B of X){if(U++,U>=Y.length){if(U>=I)continue}let H=B._zod.run({value:Y[U],issues:[]},J);if(H instanceof Promise)Q.push(H.then((V)=>ZW(V,G,U)));else ZW(H,G,U)}if(D.rest){let B=Y.slice(X.length);for(let H of B){U++;let V=D.rest._zod.run({value:H,issues:[]},J);if(V instanceof Promise)Q.push(V.then((z)=>ZW(z,G,U)));else ZW(V,G,U)}}if(Q.length)return Promise.all(Q).then(()=>G);return G}});function ZW($,D,X){if($.issues.length)D.issues.push(...u1(X,$.issues));D.value[X]=$.value}var lV=j("$ZodRecord",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(!$D(J))return X.issues.push({expected:"record",code:"invalid_type",input:J,inst:$}),X;let Y=[],Q=D.keyType._zod.values;if(Q){X.value={};let W=new Set;for(let U of Q)if(typeof U==="string"||typeof U==="number"||typeof U==="symbol"){W.add(typeof U==="number"?U.toString():U);let B=D.valueType._zod.run({value:J[U],issues:[]},G);if(B instanceof Promise)Y.push(B.then((H)=>{if(H.issues.length)X.issues.push(...u1(U,H.issues));X.value[U]=H.value}));else{if(B.issues.length)X.issues.push(...u1(U,B.issues));X.value[U]=B.value}}let I;for(let U in J)if(!W.has(U))I=I??[],I.push(U);if(I&&I.length>0)X.issues.push({code:"unrecognized_keys",input:J,inst:$,keys:I})}else{X.value={};for(let W of Reflect.ownKeys(J)){if(W==="__proto__")continue;let I=D.keyType._zod.run({value:W,issues:[]},G);if(I instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof W==="string"&&KG.test(W)&&I.issues.length){let H=D.keyType._zod.run({value:Number(W),issues:[]},G);if(H instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(H.issues.length===0)I=H}if(I.issues.length){if(D.mode==="loose")X.value[W]=J[W];else X.issues.push({code:"invalid_key",origin:"record",issues:I.issues.map((H)=>_1(H,G,E6())),input:W,path:[W],inst:$});continue}let B=D.valueType._zod.run({value:J[W],issues:[]},G);if(B instanceof Promise)Y.push(B.then((H)=>{if(H.issues.length)X.issues.push(...u1(W,H.issues));X.value[I.value]=H.value}));else{if(B.issues.length)X.issues.push(...u1(W,B.issues));X.value[I.value]=B.value}}}if(Y.length)return Promise.all(Y).then(()=>X);return X}}),iV=j("$ZodMap",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(!(J instanceof Map))return X.issues.push({expected:"map",code:"invalid_type",input:J,inst:$}),X;let Y=[];X.value=new Map;for(let[Q,W]of J){let I=D.keyType._zod.run({value:Q,issues:[]},G),U=D.valueType._zod.run({value:W,issues:[]},G);if(I instanceof Promise||U instanceof Promise)Y.push(Promise.all([I,U]).then(([B,H])=>{qC(B,H,X,Q,J,$,G)}));else qC(I,U,X,Q,J,$,G)}if(Y.length)return Promise.all(Y).then(()=>X);return X}});function qC($,D,X,G,J,Y,Q){if($.issues.length)if(IG.has(typeof G))X.issues.push(...u1(G,$.issues));else X.issues.push({code:"invalid_key",origin:"map",input:J,inst:Y,issues:$.issues.map((W)=>_1(W,Q,E6()))});if(D.issues.length)if(IG.has(typeof G))X.issues.push(...u1(G,D.issues));else X.issues.push({origin:"map",code:"invalid_element",input:J,inst:Y,key:G,issues:D.issues.map((W)=>_1(W,Q,E6()))});X.value.set($.value,D.value)}var pV=j("$ZodSet",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(!(J instanceof Set))return X.issues.push({input:J,inst:$,expected:"set",code:"invalid_type"}),X;let Y=[];X.value=new Set;for(let Q of J){let W=D.valueType._zod.run({value:Q,issues:[]},G);if(W instanceof Promise)Y.push(W.then((I)=>HC(I,X)));else HC(W,X)}if(Y.length)return Promise.all(Y).then(()=>X);return X}});function HC($,D){if($.issues.length)D.issues.push(...$.issues);D.value.add($.value)}var rV=j("$ZodEnum",($,D)=>{q$.init($,D);let X=QG(D.entries),G=new Set(X);$._zod.values=G,$._zod.pattern=new RegExp(`^(${X.filter((J)=>IG.has(typeof J)).map((J)=>typeof J==="string"?e1(J):J.toString()).join("|")})$`),$._zod.parse=(J,Y)=>{let Q=J.value;if(G.has(Q))return J;return J.issues.push({code:"invalid_value",values:X,input:Q,inst:$}),J}}),nV=j("$ZodLiteral",($,D)=>{if(q$.init($,D),D.values.length===0)throw Error("Cannot create literal schema with no valid values");let X=new Set(D.values);$._zod.values=X,$._zod.pattern=new RegExp(`^(${D.values.map((G)=>typeof G==="string"?e1(G):G?e1(G.toString()):String(G)).join("|")})$`),$._zod.parse=(G,J)=>{let Y=G.value;if(X.has(Y))return G;return G.issues.push({code:"invalid_value",values:D.values,input:Y,inst:$}),G}}),dV=j("$ZodFile",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{let J=X.value;if(J instanceof File)return X;return X.issues.push({expected:"file",code:"invalid_type",input:J,inst:$}),X}}),oV=j("$ZodTransform",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new nD($.constructor.name);let J=D.transform(X.value,X);if(G.async)return(J instanceof Promise?J:Promise.resolve(J)).then((Q)=>{return X.value=Q,X});if(J instanceof Promise)throw new g4;return X.value=J,X}});function KC($,D){if($.issues.length&&D===void 0)return{issues:[],value:void 0};return $}var hW=j("$ZodOptional",($,D)=>{q$.init($,D),$._zod.optin="optional",$._zod.optout="optional",b$($._zod,"values",()=>{return D.innerType._zod.values?new Set([...D.innerType._zod.values,void 0]):void 0}),b$($._zod,"pattern",()=>{let X=D.innerType._zod.pattern;return X?new RegExp(`^(${WG(X.source)})?$`):void 0}),$._zod.parse=(X,G)=>{if(D.innerType._zod.optin==="optional"){let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>KC(Y,X.value));return KC(J,X.value)}if(X.value===void 0)return X;return D.innerType._zod.run(X,G)}}),tV=j("$ZodExactOptional",($,D)=>{hW.init($,D),b$($._zod,"values",()=>D.innerType._zod.values),b$($._zod,"pattern",()=>D.innerType._zod.pattern),$._zod.parse=(X,G)=>{return D.innerType._zod.run(X,G)}}),aV=j("$ZodNullable",($,D)=>{q$.init($,D),b$($._zod,"optin",()=>D.innerType._zod.optin),b$($._zod,"optout",()=>D.innerType._zod.optout),b$($._zod,"pattern",()=>{let X=D.innerType._zod.pattern;return X?new RegExp(`^(${WG(X.source)}|null)$`):void 0}),b$($._zod,"values",()=>{return D.innerType._zod.values?new Set([...D.innerType._zod.values,null]):void 0}),$._zod.parse=(X,G)=>{if(X.value===null)return X;return D.innerType._zod.run(X,G)}}),sV=j("$ZodDefault",($,D)=>{q$.init($,D),$._zod.optin="optional",b$($._zod,"values",()=>D.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);if(X.value===void 0)return X.value=D.defaultValue,X;let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>VC(Y,D));return VC(J,D)}});function VC($,D){if($.value===void 0)$.value=D.defaultValue;return $}var eV=j("$ZodPrefault",($,D)=>{q$.init($,D),$._zod.optin="optional",b$($._zod,"values",()=>D.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);if(X.value===void 0)X.value=D.defaultValue;return D.innerType._zod.run(X,G)}}),$w=j("$ZodNonOptional",($,D)=>{q$.init($,D),b$($._zod,"values",()=>{let X=D.innerType._zod.values;return X?new Set([...X].filter((G)=>G!==void 0)):void 0}),$._zod.parse=(X,G)=>{let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>wC(Y,$));return wC(J,$)}});function wC($,D){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:D});return $}var Dw=j("$ZodSuccess",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new nD("ZodSuccess");let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>{return X.value=Y.issues.length===0,X});return X.value=J.issues.length===0,X}}),Xw=j("$ZodCatch",($,D)=>{q$.init($,D),b$($._zod,"optin",()=>D.innerType._zod.optin),b$($._zod,"optout",()=>D.innerType._zod.optout),b$($._zod,"values",()=>D.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>{if(X.value=Y.value,Y.issues.length)X.value=D.catchValue({...X,error:{issues:Y.issues.map((Q)=>_1(Q,G,E6()))},input:X.value}),X.issues=[];return X});if(X.value=J.value,J.issues.length)X.value=D.catchValue({...X,error:{issues:J.issues.map((Y)=>_1(Y,G,E6()))},input:X.value}),X.issues=[];return X}}),Jw=j("$ZodNaN",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{if(typeof X.value!=="number"||!Number.isNaN(X.value))return X.issues.push({input:X.value,inst:$,expected:"nan",code:"invalid_type"}),X;return X}}),Gw=j("$ZodPipe",($,D)=>{q$.init($,D),b$($._zod,"values",()=>D.in._zod.values),b$($._zod,"optin",()=>D.in._zod.optin),b$($._zod,"optout",()=>D.out._zod.optout),b$($._zod,"propValues",()=>D.in._zod.propValues),$._zod.parse=(X,G)=>{if(G.direction==="backward"){let Y=D.out._zod.run(X,G);if(Y instanceof Promise)return Y.then((Q)=>TW(Q,D.in,G));return TW(Y,D.in,G)}let J=D.in._zod.run(X,G);if(J instanceof Promise)return J.then((Y)=>TW(Y,D.out,G));return TW(J,D.out,G)}});function TW($,D,X){if($.issues.length)return $.aborted=!0,$;return D._zod.run({value:$.value,issues:$.issues},X)}var FG=j("$ZodCodec",($,D)=>{q$.init($,D),b$($._zod,"values",()=>D.in._zod.values),b$($._zod,"optin",()=>D.in._zod.optin),b$($._zod,"optout",()=>D.out._zod.optout),b$($._zod,"propValues",()=>D.in._zod.propValues),$._zod.parse=(X,G)=>{if((G.direction||"forward")==="forward"){let Y=D.in._zod.run(X,G);if(Y instanceof Promise)return Y.then((Q)=>vW(Q,D,G));return vW(Y,D,G)}else{let Y=D.out._zod.run(X,G);if(Y instanceof Promise)return Y.then((Q)=>vW(Q,D,G));return vW(Y,D,G)}}});function vW($,D,X){if($.issues.length)return $.aborted=!0,$;if((X.direction||"forward")==="forward"){let J=D.transform($.value,$);if(J instanceof Promise)return J.then((Y)=>kW($,Y,D.out,X));return kW($,J,D.out,X)}else{let J=D.reverseTransform($.value,$);if(J instanceof Promise)return J.then((Y)=>kW($,Y,D.in,X));return kW($,J,D.in,X)}}function kW($,D,X,G){if($.issues.length)return $.aborted=!0,$;return X._zod.run({value:D,issues:$.issues},G)}var Yw=j("$ZodReadonly",($,D)=>{q$.init($,D),b$($._zod,"propValues",()=>D.innerType._zod.propValues),b$($._zod,"values",()=>D.innerType._zod.values),b$($._zod,"optin",()=>D.innerType?._zod?.optin),b$($._zod,"optout",()=>D.innerType?._zod?.optout),$._zod.parse=(X,G)=>{if(G.direction==="backward")return D.innerType._zod.run(X,G);let J=D.innerType._zod.run(X,G);if(J instanceof Promise)return J.then(LC);return LC(J)}});function LC($){return $.value=Object.freeze($.value),$}var Qw=j("$ZodTemplateLiteral",($,D)=>{q$.init($,D);let X=[];for(let G of D.parts)if(typeof G==="object"&&G!==null){if(!G._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...G._zod.traits].shift()}`);let J=G._zod.pattern instanceof RegExp?G._zod.pattern.source:G._zod.pattern;if(!J)throw Error(`Invalid template literal part: ${G._zod.traits}`);let Y=J.startsWith("^")?1:0,Q=J.endsWith("$")?J.length-1:J.length;X.push(J.slice(Y,Q))}else if(G===null||$K.has(typeof G))X.push(e1(`${G}`));else throw Error(`Invalid template literal part: ${G}`);$._zod.pattern=new RegExp(`^${X.join("")}$`),$._zod.parse=(G,J)=>{if(typeof G.value!=="string")return G.issues.push({input:G.value,inst:$,expected:"string",code:"invalid_type"}),G;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(G.value))return G.issues.push({input:G.value,inst:$,code:"invalid_format",format:D.format??"template_literal",pattern:$._zod.pattern.source}),G;return G}}),Ww=j("$ZodFunction",($,D)=>{return q$.init($,D),$._def=D,$._zod.def=D,$.implement=(X)=>{if(typeof X!=="function")throw Error("implement() must be called with a function");return function(...G){let J=$._def.input?wW($._def.input,G):G,Y=Reflect.apply(X,this,J);if($._def.output)return wW($._def.output,Y);return Y}},$.implementAsync=(X)=>{if(typeof X!=="function")throw Error("implementAsync() must be called with a function");return async function(...G){let J=$._def.input?await LW($._def.input,G):G,Y=await Reflect.apply(X,this,J);if($._def.output)return await LW($._def.output,Y);return Y}},$._zod.parse=(X,G)=>{if(typeof X.value!=="function")return X.issues.push({code:"invalid_type",expected:"function",input:X.value,inst:$}),X;if($._def.output&&$._def.output._zod.def.type==="promise")X.value=$.implementAsync(X.value);else X.value=$.implement(X.value);return X},$.input=(...X)=>{let G=$.constructor;if(Array.isArray(X[0]))return new G({type:"function",input:new xW({type:"tuple",items:X[0],rest:X[1]}),output:$._def.output});return new G({type:"function",input:X[0],output:$._def.output})},$.output=(X)=>{return new $.constructor({type:"function",input:$._def.input,output:X})},$}),Iw=j("$ZodPromise",($,D)=>{q$.init($,D),$._zod.parse=(X,G)=>{return Promise.resolve(X.value).then((J)=>D.innerType._zod.run({value:J,issues:[]},G))}}),Uw=j("$ZodLazy",($,D)=>{q$.init($,D),b$($._zod,"innerType",()=>D.getter()),b$($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),b$($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),b$($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),b$($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(X,G)=>{return $._zod.innerType._zod.run(X,G)}}),Bw=j("$ZodCustom",($,D)=>{G6.init($,D),q$.init($,D),$._zod.parse=(X,G)=>{return X},$._zod.check=(X)=>{let G=X.value,J=D.fn(G);if(J instanceof Promise)return J.then((Y)=>OC(Y,X,G,$));OC(J,X,G,$);return}});function OC($,D,X,G){if(!$){let J={code:"custom",input:X,inst:G,path:[...G._zod.def.path??[]],continue:!G._zod.def.abort};if(G._zod.def.params)J.params=G._zod.def.params;D.issues.push(KJ(J))}}var SG={};X4(SG,{zhTW:()=>DL,zhCN:()=>$L,yo:()=>XL,vi:()=>ew,uz:()=>sw,ur:()=>aw,uk:()=>MG,ua:()=>tw,tr:()=>ow,th:()=>dw,ta:()=>nw,sv:()=>rw,sl:()=>pw,ru:()=>iw,pt:()=>lw,ps:()=>mw,pl:()=>cw,ota:()=>fw,no:()=>uw,nl:()=>hw,ms:()=>xw,mk:()=>gw,lt:()=>yw,ko:()=>Cw,km:()=>jG,kh:()=>kw,ka:()=>vw,ja:()=>Tw,it:()=>Zw,is:()=>Ew,id:()=>Rw,hy:()=>Nw,hu:()=>_w,he:()=>Pw,frCA:()=>Sw,fr:()=>Mw,fi:()=>Aw,fa:()=>jw,es:()=>bw,eo:()=>Fw,en:()=>bG,de:()=>Ow,da:()=>Lw,cs:()=>ww,ca:()=>Vw,bg:()=>Kw,be:()=>Hw,az:()=>qw,ar:()=>zw});var HD$=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function D(J){return $[J]??null}let X={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${J.expected}، ولكن تم إدخال ${W}`;return`مدخلات غير مقبولة: يفترض إدخال ${Y}، ولكن تم إدخال ${W}`}case"invalid_value":if(J.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${k(J.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return` أكبر من اللازم: يفترض أن تكون ${J.origin??"القيمة"} ${Y} ${J.maximum.toString()} ${Q.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${J.origin??"القيمة"} ${Y} ${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`أصغر من اللازم: يفترض لـ ${J.origin} أن يكون ${Y} ${J.minimum.toString()} ${Q.unit}`;return`أصغر من اللازم: يفترض لـ ${J.origin} أن يكون ${Y} ${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${J.prefix}"`;if(Y.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${Y.suffix}"`;if(Y.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${Y.includes}"`;if(Y.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${Y.pattern}`;return`${X[Y.format]??J.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${J.divisor}`;case"unrecognized_keys":return`معرف${J.keys.length>1?"ات":""} غريب${J.keys.length>1?"ة":""}: ${S(J.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${J.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${J.origin}`;default:return"مدخل غير مقبول"}}};function zw(){return{localeError:HD$()}}var KD$=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function D(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Yanlış dəyər: gözlənilən instanceof ${J.expected}, daxil olan ${W}`;return`Yanlış dəyər: gözlənilən ${Y}, daxil olan ${W}`}case"invalid_value":if(J.values.length===1)return`Yanlış dəyər: gözlənilən ${k(J.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Çox böyük: gözlənilən ${J.origin??"dəyər"} ${Y}${J.maximum.toString()} ${Q.unit??"element"}`;return`Çox böyük: gözlənilən ${J.origin??"dəyər"} ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Çox kiçik: gözlənilən ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit}`;return`Çox kiçik: gözlənilən ${J.origin} ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Yanlış mətn: "${Y.prefix}" ilə başlamalıdır`;if(Y.format==="ends_with")return`Yanlış mətn: "${Y.suffix}" ilə bitməlidir`;if(Y.format==="includes")return`Yanlış mətn: "${Y.includes}" daxil olmalıdır`;if(Y.format==="regex")return`Yanlış mətn: ${Y.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${X[Y.format]??J.format}`}case"not_multiple_of":return`Yanlış ədəd: ${J.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${J.keys.length>1?"lar":""}: ${S(J.keys,", ")}`;case"invalid_key":return`${J.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${J.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function qw(){return{localeError:KD$()}}function SC($,D,X,G){let J=Math.abs($),Y=J%10,Q=J%100;if(Q>=11&&Q<=19)return G;if(Y===1)return D;if(Y>=2&&Y<=4)return X;return G}var VD$=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function D(J){return $[J]??null}let X={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},G={nan:"NaN",number:"лік",array:"масіў"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Няправільны ўвод: чакаўся instanceof ${J.expected}, атрымана ${W}`;return`Няправільны ўвод: чакаўся ${Y}, атрымана ${W}`}case"invalid_value":if(J.values.length===1)return`Няправільны ўвод: чакалася ${k(J.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q){let W=Number(J.maximum),I=SC(W,Q.unit.one,Q.unit.few,Q.unit.many);return`Занадта вялікі: чакалася, што ${J.origin??"значэнне"} павінна ${Q.verb} ${Y}${J.maximum.toString()} ${I}`}return`Занадта вялікі: чакалася, што ${J.origin??"значэнне"} павінна быць ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q){let W=Number(J.minimum),I=SC(W,Q.unit.one,Q.unit.few,Q.unit.many);return`Занадта малы: чакалася, што ${J.origin} павінна ${Q.verb} ${Y}${J.minimum.toString()} ${I}`}return`Занадта малы: чакалася, што ${J.origin} павінна быць ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${Y.prefix}"`;if(Y.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${Y.suffix}"`;if(Y.format==="includes")return`Няправільны радок: павінен змяшчаць "${Y.includes}"`;if(Y.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${Y.pattern}`;return`Няправільны ${X[Y.format]??J.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${J.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${J.keys.length>1?"ключы":"ключ"}: ${S(J.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${J.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${J.origin}`;default:return"Няправільны ўвод"}}};function Hw(){return{localeError:VD$()}}var wD$=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function D(J){return $[J]??null}let X={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},G={nan:"NaN",number:"число",array:"масив"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Невалиден вход: очакван instanceof ${J.expected}, получен ${W}`;return`Невалиден вход: очакван ${Y}, получен ${W}`}case"invalid_value":if(J.values.length===1)return`Невалиден вход: очакван ${k(J.values[0])}`;return`Невалидна опция: очаквано едно от ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Твърде голямо: очаква се ${J.origin??"стойност"} да съдържа ${Y}${J.maximum.toString()} ${Q.unit??"елемента"}`;return`Твърде голямо: очаква се ${J.origin??"стойност"} да бъде ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Твърде малко: очаква се ${J.origin} да съдържа ${Y}${J.minimum.toString()} ${Q.unit}`;return`Твърде малко: очаква се ${J.origin} да бъде ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Невалиден низ: трябва да започва с "${Y.prefix}"`;if(Y.format==="ends_with")return`Невалиден низ: трябва да завършва с "${Y.suffix}"`;if(Y.format==="includes")return`Невалиден низ: трябва да включва "${Y.includes}"`;if(Y.format==="regex")return`Невалиден низ: трябва да съвпада с ${Y.pattern}`;let Q="Невалиден";if(Y.format==="emoji")Q="Невалидно";if(Y.format==="datetime")Q="Невалидно";if(Y.format==="date")Q="Невалидна";if(Y.format==="time")Q="Невалидно";if(Y.format==="duration")Q="Невалидна";return`${Q} ${X[Y.format]??J.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${J.divisor}`;case"unrecognized_keys":return`Неразпознат${J.keys.length>1?"и":""} ключ${J.keys.length>1?"ове":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${J.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${J.origin}`;default:return"Невалиден вход"}}};function Kw(){return{localeError:wD$()}}var LD$=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function D(J){return $[J]??null}let X={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Tipus invàlid: s'esperava instanceof ${J.expected}, s'ha rebut ${W}`;return`Tipus invàlid: s'esperava ${Y}, s'ha rebut ${W}`}case"invalid_value":if(J.values.length===1)return`Valor invàlid: s'esperava ${k(J.values[0])}`;return`Opció invàlida: s'esperava una de ${S(J.values," o ")}`;case"too_big":{let Y=J.inclusive?"com a màxim":"menys de",Q=D(J.origin);if(Q)return`Massa gran: s'esperava que ${J.origin??"el valor"} contingués ${Y} ${J.maximum.toString()} ${Q.unit??"elements"}`;return`Massa gran: s'esperava que ${J.origin??"el valor"} fos ${Y} ${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?"com a mínim":"més de",Q=D(J.origin);if(Q)return`Massa petit: s'esperava que ${J.origin} contingués ${Y} ${J.minimum.toString()} ${Q.unit}`;return`Massa petit: s'esperava que ${J.origin} fos ${Y} ${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Format invàlid: ha de començar amb "${Y.prefix}"`;if(Y.format==="ends_with")return`Format invàlid: ha d'acabar amb "${Y.suffix}"`;if(Y.format==="includes")return`Format invàlid: ha d'incloure "${Y.includes}"`;if(Y.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${Y.pattern}`;return`Format invàlid per a ${X[Y.format]??J.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${J.divisor}`;case"unrecognized_keys":return`Clau${J.keys.length>1?"s":""} no reconeguda${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${J.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${J.origin}`;default:return"Entrada invàlida"}}};function Vw(){return{localeError:LD$()}}var OD$=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function D(J){return $[J]??null}let X={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},G={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Neplatný vstup: očekáváno instanceof ${J.expected}, obdrženo ${W}`;return`Neplatný vstup: očekáváno ${Y}, obdrženo ${W}`}case"invalid_value":if(J.values.length===1)return`Neplatný vstup: očekáváno ${k(J.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Hodnota je příliš velká: ${J.origin??"hodnota"} musí mít ${Y}${J.maximum.toString()} ${Q.unit??"prvků"}`;return`Hodnota je příliš velká: ${J.origin??"hodnota"} musí být ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Hodnota je příliš malá: ${J.origin??"hodnota"} musí mít ${Y}${J.minimum.toString()} ${Q.unit??"prvků"}`;return`Hodnota je příliš malá: ${J.origin??"hodnota"} musí být ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Neplatný řetězec: musí začínat na "${Y.prefix}"`;if(Y.format==="ends_with")return`Neplatný řetězec: musí končit na "${Y.suffix}"`;if(Y.format==="includes")return`Neplatný řetězec: musí obsahovat "${Y.includes}"`;if(Y.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${Y.pattern}`;return`Neplatný formát ${X[Y.format]??J.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${J.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${S(J.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${J.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${J.origin}`;default:return"Neplatný vstup"}}};function ww(){return{localeError:OD$()}}var FD$=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function D(J){return $[J]??null}let X={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},G={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Ugyldigt input: forventede instanceof ${J.expected}, fik ${W}`;return`Ugyldigt input: forventede ${Y}, fik ${W}`}case"invalid_value":if(J.values.length===1)return`Ugyldig værdi: forventede ${k(J.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin),W=G[J.origin]??J.origin;if(Q)return`For stor: forventede ${W??"value"} ${Q.verb} ${Y} ${J.maximum.toString()} ${Q.unit??"elementer"}`;return`For stor: forventede ${W??"value"} havde ${Y} ${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin),W=G[J.origin]??J.origin;if(Q)return`For lille: forventede ${W} ${Q.verb} ${Y} ${J.minimum.toString()} ${Q.unit}`;return`For lille: forventede ${W} havde ${Y} ${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ugyldig streng: skal starte med "${Y.prefix}"`;if(Y.format==="ends_with")return`Ugyldig streng: skal ende med "${Y.suffix}"`;if(Y.format==="includes")return`Ugyldig streng: skal indeholde "${Y.includes}"`;if(Y.format==="regex")return`Ugyldig streng: skal matche mønsteret ${Y.pattern}`;return`Ugyldig ${X[Y.format]??J.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${S(J.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${J.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${J.origin}`;default:return"Ugyldigt input"}}};function Lw(){return{localeError:FD$()}}var bD$=()=>{let $={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 D(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"Zahl",array:"Array"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Ungültige Eingabe: erwartet instanceof ${J.expected}, erhalten ${W}`;return`Ungültige Eingabe: erwartet ${Y}, erhalten ${W}`}case"invalid_value":if(J.values.length===1)return`Ungültige Eingabe: erwartet ${k(J.values[0])}`;return`Ungültige Option: erwartet eine von ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Zu groß: erwartet, dass ${J.origin??"Wert"} ${Y}${J.maximum.toString()} ${Q.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${J.origin??"Wert"} ${Y}${J.maximum.toString()} ist`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Zu klein: erwartet, dass ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit} hat`;return`Zu klein: erwartet, dass ${J.origin} ${Y}${J.minimum.toString()} ist`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ungültiger String: muss mit "${Y.prefix}" beginnen`;if(Y.format==="ends_with")return`Ungültiger String: muss mit "${Y.suffix}" enden`;if(Y.format==="includes")return`Ungültiger String: muss "${Y.includes}" enthalten`;if(Y.format==="regex")return`Ungültiger String: muss dem Muster ${Y.pattern} entsprechen`;return`Ungültig: ${X[Y.format]??J.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${J.divisor} sein`;case"unrecognized_keys":return`${J.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${S(J.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${J.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${J.origin}`;default:return"Ungültige Eingabe"}}};function Ow(){return{localeError:bD$()}}var jD$=()=>{let $={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 D(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;return`Invalid input: expected ${Y}, received ${W}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${k(J.values[0])}`;return`Invalid option: expected one of ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Too big: expected ${J.origin??"value"} to have ${Y}${J.maximum.toString()} ${Q.unit??"elements"}`;return`Too big: expected ${J.origin??"value"} to be ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Too small: expected ${J.origin} to have ${Y}${J.minimum.toString()} ${Q.unit}`;return`Too small: expected ${J.origin} to be ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Invalid string: must start with "${Y.prefix}"`;if(Y.format==="ends_with")return`Invalid string: must end with "${Y.suffix}"`;if(Y.format==="includes")return`Invalid string: must include "${Y.includes}"`;if(Y.format==="regex")return`Invalid string: must match pattern ${Y.pattern}`;return`Invalid ${X[Y.format]??J.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${J.divisor}`;case"unrecognized_keys":return`Unrecognized key${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Invalid key in ${J.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${J.origin}`;default:return"Invalid input"}}};function bG(){return{localeError:jD$()}}var AD$=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function D(J){return $[J]??null}let X={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},G={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Nevalida enigo: atendiĝis instanceof ${J.expected}, riceviĝis ${W}`;return`Nevalida enigo: atendiĝis ${Y}, riceviĝis ${W}`}case"invalid_value":if(J.values.length===1)return`Nevalida enigo: atendiĝis ${k(J.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Tro granda: atendiĝis ke ${J.origin??"valoro"} havu ${Y}${J.maximum.toString()} ${Q.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${J.origin??"valoro"} havu ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Tro malgranda: atendiĝis ke ${J.origin} havu ${Y}${J.minimum.toString()} ${Q.unit}`;return`Tro malgranda: atendiĝis ke ${J.origin} estu ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${Y.prefix}"`;if(Y.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${Y.suffix}"`;if(Y.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${Y.includes}"`;if(Y.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${Y.pattern}`;return`Nevalida ${X[Y.format]??J.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${J.divisor}`;case"unrecognized_keys":return`Nekonata${J.keys.length>1?"j":""} ŝlosilo${J.keys.length>1?"j":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${J.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${J.origin}`;default:return"Nevalida enigo"}}};function Fw(){return{localeError:AD$()}}var MD$=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function D(J){return $[J]??null}let X={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},G={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Entrada inválida: se esperaba instanceof ${J.expected}, recibido ${W}`;return`Entrada inválida: se esperaba ${Y}, recibido ${W}`}case"invalid_value":if(J.values.length===1)return`Entrada inválida: se esperaba ${k(J.values[0])}`;return`Opción inválida: se esperaba una de ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin),W=G[J.origin]??J.origin;if(Q)return`Demasiado grande: se esperaba que ${W??"valor"} tuviera ${Y}${J.maximum.toString()} ${Q.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${W??"valor"} fuera ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin),W=G[J.origin]??J.origin;if(Q)return`Demasiado pequeño: se esperaba que ${W} tuviera ${Y}${J.minimum.toString()} ${Q.unit}`;return`Demasiado pequeño: se esperaba que ${W} fuera ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Cadena inválida: debe comenzar con "${Y.prefix}"`;if(Y.format==="ends_with")return`Cadena inválida: debe terminar en "${Y.suffix}"`;if(Y.format==="includes")return`Cadena inválida: debe incluir "${Y.includes}"`;if(Y.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${Y.pattern}`;return`Inválido ${X[Y.format]??J.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${J.divisor}`;case"unrecognized_keys":return`Llave${J.keys.length>1?"s":""} desconocida${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Llave inválida en ${G[J.origin]??J.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${G[J.origin]??J.origin}`;default:return"Entrada inválida"}}};function bw(){return{localeError:MD$()}}var SD$=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function D(J){return $[J]??null}let X={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},G={nan:"NaN",number:"عدد",array:"آرایه"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`ورودی نامعتبر: می‌بایست instanceof ${J.expected} می‌بود، ${W} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${Y} می‌بود، ${W} دریافت شد`}case"invalid_value":if(J.values.length===1)return`ورودی نامعتبر: می‌بایست ${k(J.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${S(J.values,"|")} می‌بود`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`خیلی بزرگ: ${J.origin??"مقدار"} باید ${Y}${J.maximum.toString()} ${Q.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${J.origin??"مقدار"} باید ${Y}${J.maximum.toString()} باشد`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`خیلی کوچک: ${J.origin} باید ${Y}${J.minimum.toString()} ${Q.unit} باشد`;return`خیلی کوچک: ${J.origin} باید ${Y}${J.minimum.toString()} باشد`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`رشته نامعتبر: باید با "${Y.prefix}" شروع شود`;if(Y.format==="ends_with")return`رشته نامعتبر: باید با "${Y.suffix}" تمام شود`;if(Y.format==="includes")return`رشته نامعتبر: باید شامل "${Y.includes}" باشد`;if(Y.format==="regex")return`رشته نامعتبر: باید با الگوی ${Y.pattern} مطابقت داشته باشد`;return`${X[Y.format]??J.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${J.divisor} باشد`;case"unrecognized_keys":return`کلید${J.keys.length>1?"های":""} ناشناس: ${S(J.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${J.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${J.origin}`;default:return"ورودی نامعتبر"}}};function jw(){return{localeError:SD$()}}var PD$=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function D(J){return $[J]??null}let X={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Virheellinen tyyppi: odotettiin instanceof ${J.expected}, oli ${W}`;return`Virheellinen tyyppi: odotettiin ${Y}, oli ${W}`}case"invalid_value":if(J.values.length===1)return`Virheellinen syöte: täytyy olla ${k(J.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Liian suuri: ${Q.subject} täytyy olla ${Y}${J.maximum.toString()} ${Q.unit}`.trim();return`Liian suuri: arvon täytyy olla ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Liian pieni: ${Q.subject} täytyy olla ${Y}${J.minimum.toString()} ${Q.unit}`.trim();return`Liian pieni: arvon täytyy olla ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${Y.prefix}"`;if(Y.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${Y.suffix}"`;if(Y.format==="includes")return`Virheellinen syöte: täytyy sisältää "${Y.includes}"`;if(Y.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${Y.pattern}`;return`Virheellinen ${X[Y.format]??J.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${J.divisor} monikerta`;case"unrecognized_keys":return`${J.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(J.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Aw(){return{localeError:PD$()}}var _D$=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function D(J){return $[J]??null}let X={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},G={nan:"NaN",number:"nombre",array:"tableau"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Entrée invalide : instanceof ${J.expected} attendu, ${W} reçu`;return`Entrée invalide : ${Y} attendu, ${W} reçu`}case"invalid_value":if(J.values.length===1)return`Entrée invalide : ${k(J.values[0])} attendu`;return`Option invalide : une valeur parmi ${S(J.values,"|")} attendue`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Trop grand : ${J.origin??"valeur"} doit ${Q.verb} ${Y}${J.maximum.toString()} ${Q.unit??"élément(s)"}`;return`Trop grand : ${J.origin??"valeur"} doit être ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Trop petit : ${J.origin} doit ${Q.verb} ${Y}${J.minimum.toString()} ${Q.unit}`;return`Trop petit : ${J.origin} doit être ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Chaîne invalide : doit commencer par "${Y.prefix}"`;if(Y.format==="ends_with")return`Chaîne invalide : doit se terminer par "${Y.suffix}"`;if(Y.format==="includes")return`Chaîne invalide : doit inclure "${Y.includes}"`;if(Y.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${Y.pattern}`;return`${X[Y.format]??J.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${J.divisor}`;case"unrecognized_keys":return`Clé${J.keys.length>1?"s":""} non reconnue${J.keys.length>1?"s":""} : ${S(J.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${J.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${J.origin}`;default:return"Entrée invalide"}}};function Mw(){return{localeError:_D$()}}var ND$=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function D(J){return $[J]??null}let X={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Entrée invalide : attendu instanceof ${J.expected}, reçu ${W}`;return`Entrée invalide : attendu ${Y}, reçu ${W}`}case"invalid_value":if(J.values.length===1)return`Entrée invalide : attendu ${k(J.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"≤":"<",Q=D(J.origin);if(Q)return`Trop grand : attendu que ${J.origin??"la valeur"} ait ${Y}${J.maximum.toString()} ${Q.unit}`;return`Trop grand : attendu que ${J.origin??"la valeur"} soit ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?"≥":">",Q=D(J.origin);if(Q)return`Trop petit : attendu que ${J.origin} ait ${Y}${J.minimum.toString()} ${Q.unit}`;return`Trop petit : attendu que ${J.origin} soit ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Chaîne invalide : doit commencer par "${Y.prefix}"`;if(Y.format==="ends_with")return`Chaîne invalide : doit se terminer par "${Y.suffix}"`;if(Y.format==="includes")return`Chaîne invalide : doit inclure "${Y.includes}"`;if(Y.format==="regex")return`Chaîne invalide : doit correspondre au motif ${Y.pattern}`;return`${X[Y.format]??J.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${J.divisor}`;case"unrecognized_keys":return`Clé${J.keys.length>1?"s":""} non reconnue${J.keys.length>1?"s":""} : ${S(J.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${J.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${J.origin}`;default:return"Entrée invalide"}}};function Sw(){return{localeError:ND$()}}var RD$=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},D={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},X=(U)=>U?$[U]:void 0,G=(U)=>{let B=X(U);if(B)return B.label;return U??$.unknown.label},J=(U)=>`ה${G(U)}`,Y=(U)=>{return(X(U)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},Q=(U)=>{if(!U)return null;return D[U]??null},W={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},I={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let B=U.expected,H=I[B??""]??G(B),V=y(U.input),z=I[V]??$[V]?.label??V;if(/^[A-Z]/.test(U.expected))return`קלט לא תקין: צריך להיות instanceof ${U.expected}, התקבל ${z}`;return`קלט לא תקין: צריך להיות ${H}, התקבל ${z}`}case"invalid_value":{if(U.values.length===1)return`ערך לא תקין: הערך חייב להיות ${k(U.values[0])}`;let B=U.values.map((z)=>k(z));if(U.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${B[0]} או ${B[1]}`;let H=B[B.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${B.slice(0,-1).join(", ")} או ${H}`}case"too_big":{let B=Q(U.origin),H=J(U.origin??"value");if(U.origin==="string")return`${B?.longLabel??"ארוך"} מדי: ${H} צריכה להכיל ${U.maximum.toString()} ${B?.unit??""} ${U.inclusive?"או פחות":"לכל היותר"}`.trim();if(U.origin==="number"){let L=U.inclusive?`קטן או שווה ל-${U.maximum}`:`קטן מ-${U.maximum}`;return`גדול מדי: ${H} צריך להיות ${L}`}if(U.origin==="array"||U.origin==="set"){let L=U.origin==="set"?"צריכה":"צריך",F=U.inclusive?`${U.maximum} ${B?.unit??""} או פחות`:`פחות מ-${U.maximum} ${B?.unit??""}`;return`גדול מדי: ${H} ${L} להכיל ${F}`.trim()}let V=U.inclusive?"<=":"<",z=Y(U.origin??"value");if(B?.unit)return`${B.longLabel} מדי: ${H} ${z} ${V}${U.maximum.toString()} ${B.unit}`;return`${B?.longLabel??"גדול"} מדי: ${H} ${z} ${V}${U.maximum.toString()}`}case"too_small":{let B=Q(U.origin),H=J(U.origin??"value");if(U.origin==="string")return`${B?.shortLabel??"קצר"} מדי: ${H} צריכה להכיל ${U.minimum.toString()} ${B?.unit??""} ${U.inclusive?"או יותר":"לפחות"}`.trim();if(U.origin==="number"){let L=U.inclusive?`גדול או שווה ל-${U.minimum}`:`גדול מ-${U.minimum}`;return`קטן מדי: ${H} צריך להיות ${L}`}if(U.origin==="array"||U.origin==="set"){let L=U.origin==="set"?"צריכה":"צריך";if(U.minimum===1&&U.inclusive){let b=U.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${H} ${L} להכיל ${b}`}let F=U.inclusive?`${U.minimum} ${B?.unit??""} או יותר`:`יותר מ-${U.minimum} ${B?.unit??""}`;return`קטן מדי: ${H} ${L} להכיל ${F}`.trim()}let V=U.inclusive?">=":">",z=Y(U.origin??"value");if(B?.unit)return`${B.shortLabel} מדי: ${H} ${z} ${V}${U.minimum.toString()} ${B.unit}`;return`${B?.shortLabel??"קטן"} מדי: ${H} ${z} ${V}${U.minimum.toString()}`}case"invalid_format":{let B=U;if(B.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${B.prefix}"`;if(B.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${B.suffix}"`;if(B.format==="includes")return`המחרוזת חייבת לכלול "${B.includes}"`;if(B.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${B.pattern}`;let H=W[B.format],V=H?.label??B.format,L=(H?.gender??"m")==="f"?"תקינה":"תקין";return`${V} לא ${L}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${U.divisor}`;case"unrecognized_keys":return`מפתח${U.keys.length>1?"ות":""} לא מזוה${U.keys.length>1?"ים":"ה"}: ${S(U.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${J(U.origin??"array")}`;default:return"קלט לא תקין"}}};function Pw(){return{localeError:RD$()}}var ED$=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function D(J){return $[J]??null}let X={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},G={nan:"NaN",number:"szám",array:"tömb"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Érvénytelen bemenet: a várt érték instanceof ${J.expected}, a kapott érték ${W}`;return`Érvénytelen bemenet: a várt érték ${Y}, a kapott érték ${W}`}case"invalid_value":if(J.values.length===1)return`Érvénytelen bemenet: a várt érték ${k(J.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Túl nagy: ${J.origin??"érték"} mérete túl nagy ${Y}${J.maximum.toString()} ${Q.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${J.origin??"érték"} túl nagy: ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Túl kicsi: a bemeneti érték ${J.origin} mérete túl kicsi ${Y}${J.minimum.toString()} ${Q.unit}`;return`Túl kicsi: a bemeneti érték ${J.origin} túl kicsi ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Érvénytelen string: "${Y.prefix}" értékkel kell kezdődnie`;if(Y.format==="ends_with")return`Érvénytelen string: "${Y.suffix}" értékkel kell végződnie`;if(Y.format==="includes")return`Érvénytelen string: "${Y.includes}" értéket kell tartalmaznia`;if(Y.format==="regex")return`Érvénytelen string: ${Y.pattern} mintának kell megfelelnie`;return`Érvénytelen ${X[Y.format]??J.format}`}case"not_multiple_of":return`Érvénytelen szám: ${J.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${J.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${J.origin}`;default:return"Érvénytelen bemenet"}}};function _w(){return{localeError:ED$()}}function PC($,D,X){return Math.abs($)===1?D:X}function bJ($){if(!$)return"";let D=["ա","ե","ը","ի","ո","ու","օ"],X=$[$.length-1];return $+(D.includes(X)?"ն":"ը")}var ZD$=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function D(J){return $[J]??null}let X={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},G={nan:"NaN",number:"թիվ",array:"զանգված"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${J.expected}, ստացվել է ${W}`;return`Սխալ մուտքագրում․ սպասվում էր ${Y}, ստացվել է ${W}`}case"invalid_value":if(J.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${k(J.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q){let W=Number(J.maximum),I=PC(W,Q.unit.one,Q.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bJ(J.origin??"արժեք")} կունենա ${Y}${J.maximum.toString()} ${I}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bJ(J.origin??"արժեք")} լինի ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q){let W=Number(J.minimum),I=PC(W,Q.unit.one,Q.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bJ(J.origin)} կունենա ${Y}${J.minimum.toString()} ${I}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bJ(J.origin)} լինի ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${Y.prefix}"-ով`;if(Y.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${Y.suffix}"-ով`;if(Y.format==="includes")return`Սխալ տող․ պետք է պարունակի "${Y.includes}"`;if(Y.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${Y.pattern} ձևաչափին`;return`Սխալ ${X[Y.format]??J.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${J.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${J.keys.length>1?"ներ":""}. ${S(J.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${bJ(J.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${bJ(J.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Nw(){return{localeError:ZD$()}}var TD$=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function D(J){return $[J]??null}let X={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"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Input tidak valid: diharapkan instanceof ${J.expected}, diterima ${W}`;return`Input tidak valid: diharapkan ${Y}, diterima ${W}`}case"invalid_value":if(J.values.length===1)return`Input tidak valid: diharapkan ${k(J.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Terlalu besar: diharapkan ${J.origin??"value"} memiliki ${Y}${J.maximum.toString()} ${Q.unit??"elemen"}`;return`Terlalu besar: diharapkan ${J.origin??"value"} menjadi ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Terlalu kecil: diharapkan ${J.origin} memiliki ${Y}${J.minimum.toString()} ${Q.unit}`;return`Terlalu kecil: diharapkan ${J.origin} menjadi ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`String tidak valid: harus dimulai dengan "${Y.prefix}"`;if(Y.format==="ends_with")return`String tidak valid: harus berakhir dengan "${Y.suffix}"`;if(Y.format==="includes")return`String tidak valid: harus menyertakan "${Y.includes}"`;if(Y.format==="regex")return`String tidak valid: harus sesuai pola ${Y.pattern}`;return`${X[Y.format]??J.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${J.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${J.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${J.origin}`;default:return"Input tidak valid"}}};function Rw(){return{localeError:TD$()}}var vD$=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function D(J){return $[J]??null}let X={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},G={nan:"NaN",number:"númer",array:"fylki"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Rangt gildi: Þú slóst inn ${W} þar sem á að vera instanceof ${J.expected}`;return`Rangt gildi: Þú slóst inn ${W} þar sem á að vera ${Y}`}case"invalid_value":if(J.values.length===1)return`Rangt gildi: gert ráð fyrir ${k(J.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Of stórt: gert er ráð fyrir að ${J.origin??"gildi"} hafi ${Y}${J.maximum.toString()} ${Q.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${J.origin??"gildi"} sé ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Of lítið: gert er ráð fyrir að ${J.origin} hafi ${Y}${J.minimum.toString()} ${Q.unit}`;return`Of lítið: gert er ráð fyrir að ${J.origin} sé ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ógildur strengur: verður að byrja á "${Y.prefix}"`;if(Y.format==="ends_with")return`Ógildur strengur: verður að enda á "${Y.suffix}"`;if(Y.format==="includes")return`Ógildur strengur: verður að innihalda "${Y.includes}"`;if(Y.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${Y.pattern}`;return`Rangt ${X[Y.format]??J.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${J.divisor}`;case"unrecognized_keys":return`Óþekkt ${J.keys.length>1?"ir lyklar":"ur lykill"}: ${S(J.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${J.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${J.origin}`;default:return"Rangt gildi"}}};function Ew(){return{localeError:vD$()}}var kD$=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function D(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"numero",array:"vettore"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Input non valido: atteso instanceof ${J.expected}, ricevuto ${W}`;return`Input non valido: atteso ${Y}, ricevuto ${W}`}case"invalid_value":if(J.values.length===1)return`Input non valido: atteso ${k(J.values[0])}`;return`Opzione non valida: atteso uno tra ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Troppo grande: ${J.origin??"valore"} deve avere ${Y}${J.maximum.toString()} ${Q.unit??"elementi"}`;return`Troppo grande: ${J.origin??"valore"} deve essere ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Troppo piccolo: ${J.origin} deve avere ${Y}${J.minimum.toString()} ${Q.unit}`;return`Troppo piccolo: ${J.origin} deve essere ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Stringa non valida: deve iniziare con "${Y.prefix}"`;if(Y.format==="ends_with")return`Stringa non valida: deve terminare con "${Y.suffix}"`;if(Y.format==="includes")return`Stringa non valida: deve includere "${Y.includes}"`;if(Y.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${Y.pattern}`;return`Invalid ${X[Y.format]??J.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${J.divisor}`;case"unrecognized_keys":return`Chiav${J.keys.length>1?"i":"e"} non riconosciut${J.keys.length>1?"e":"a"}: ${S(J.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${J.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${J.origin}`;default:return"Input non valido"}}};function Zw(){return{localeError:kD$()}}var CD$=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function D(J){return $[J]??null}let X={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},G={nan:"NaN",number:"数値",array:"配列"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`無効な入力: instanceof ${J.expected}が期待されましたが、${W}が入力されました`;return`無効な入力: ${Y}が期待されましたが、${W}が入力されました`}case"invalid_value":if(J.values.length===1)return`無効な入力: ${k(J.values[0])}が期待されました`;return`無効な選択: ${S(J.values,"、")}のいずれかである必要があります`;case"too_big":{let Y=J.inclusive?"以下である":"より小さい",Q=D(J.origin);if(Q)return`大きすぎる値: ${J.origin??"値"}は${J.maximum.toString()}${Q.unit??"要素"}${Y}必要があります`;return`大きすぎる値: ${J.origin??"値"}は${J.maximum.toString()}${Y}必要があります`}case"too_small":{let Y=J.inclusive?"以上である":"より大きい",Q=D(J.origin);if(Q)return`小さすぎる値: ${J.origin}は${J.minimum.toString()}${Q.unit}${Y}必要があります`;return`小さすぎる値: ${J.origin}は${J.minimum.toString()}${Y}必要があります`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`無効な文字列: "${Y.prefix}"で始まる必要があります`;if(Y.format==="ends_with")return`無効な文字列: "${Y.suffix}"で終わる必要があります`;if(Y.format==="includes")return`無効な文字列: "${Y.includes}"を含む必要があります`;if(Y.format==="regex")return`無効な文字列: パターン${Y.pattern}に一致する必要があります`;return`無効な${X[Y.format]??J.format}`}case"not_multiple_of":return`無効な数値: ${J.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${J.keys.length>1?"群":""}: ${S(J.keys,"、")}`;case"invalid_key":return`${J.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${J.origin}内の無効な値`;default:return"無効な入力"}}};function Tw(){return{localeError:CD$()}}var yD$=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function D(J){return $[J]??null}let X={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},G={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${J.expected}, მიღებული ${W}`;return`არასწორი შეყვანა: მოსალოდნელი ${Y}, მიღებული ${W}`}case"invalid_value":if(J.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${k(J.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${S(J.values,"|")}-დან`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`ზედმეტად დიდი: მოსალოდნელი ${J.origin??"მნიშვნელობა"} ${Q.verb} ${Y}${J.maximum.toString()} ${Q.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${J.origin??"მნიშვნელობა"} იყოს ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`ზედმეტად პატარა: მოსალოდნელი ${J.origin} ${Q.verb} ${Y}${J.minimum.toString()} ${Q.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${J.origin} იყოს ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${Y.prefix}"-ით`;if(Y.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${Y.suffix}"-ით`;if(Y.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${Y.includes}"-ს`;if(Y.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${Y.pattern}`;return`არასწორი ${X[Y.format]??J.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${J.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${J.keys.length>1?"ები":"ი"}: ${S(J.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${J.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${J.origin}-ში`;default:return"არასწორი შეყვანა"}}};function vw(){return{localeError:yD$()}}var gD$=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function D(J){return $[J]??null}let X={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},G={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${J.expected} ប៉ុន្តែទទួលបាន ${W}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Y} ប៉ុន្តែទទួលបាន ${W}`}case"invalid_value":if(J.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${k(J.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`ធំពេក៖ ត្រូវការ ${J.origin??"តម្លៃ"} ${Y} ${J.maximum.toString()} ${Q.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${J.origin??"តម្លៃ"} ${Y} ${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`តូចពេក៖ ត្រូវការ ${J.origin} ${Y} ${J.minimum.toString()} ${Q.unit}`;return`តូចពេក៖ ត្រូវការ ${J.origin} ${Y} ${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${Y.prefix}"`;if(Y.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${Y.suffix}"`;if(Y.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${Y.includes}"`;if(Y.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${Y.pattern}`;return`មិនត្រឹមត្រូវ៖ ${X[Y.format]??J.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${J.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${S(J.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${J.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${J.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function jG(){return{localeError:gD$()}}function kw(){return jG()}var xD$=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function D(J){return $[J]??null}let X={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`잘못된 입력: 예상 타입은 instanceof ${J.expected}, 받은 타입은 ${W}입니다`;return`잘못된 입력: 예상 타입은 ${Y}, 받은 타입은 ${W}입니다`}case"invalid_value":if(J.values.length===1)return`잘못된 입력: 값은 ${k(J.values[0])} 이어야 합니다`;return`잘못된 옵션: ${S(J.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let Y=J.inclusive?"이하":"미만",Q=Y==="미만"?"이어야 합니다":"여야 합니다",W=D(J.origin),I=W?.unit??"요소";if(W)return`${J.origin??"값"}이 너무 큽니다: ${J.maximum.toString()}${I} ${Y}${Q}`;return`${J.origin??"값"}이 너무 큽니다: ${J.maximum.toString()} ${Y}${Q}`}case"too_small":{let Y=J.inclusive?"이상":"초과",Q=Y==="이상"?"이어야 합니다":"여야 합니다",W=D(J.origin),I=W?.unit??"요소";if(W)return`${J.origin??"값"}이 너무 작습니다: ${J.minimum.toString()}${I} ${Y}${Q}`;return`${J.origin??"값"}이 너무 작습니다: ${J.minimum.toString()} ${Y}${Q}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`잘못된 문자열: "${Y.prefix}"(으)로 시작해야 합니다`;if(Y.format==="ends_with")return`잘못된 문자열: "${Y.suffix}"(으)로 끝나야 합니다`;if(Y.format==="includes")return`잘못된 문자열: "${Y.includes}"을(를) 포함해야 합니다`;if(Y.format==="regex")return`잘못된 문자열: 정규식 ${Y.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${X[Y.format]??J.format}`}case"not_multiple_of":return`잘못된 숫자: ${J.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${S(J.keys,", ")}`;case"invalid_key":return`잘못된 키: ${J.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${J.origin}`;default:return"잘못된 입력"}}};function Cw(){return{localeError:xD$()}}var AG=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function _C($){let D=Math.abs($),X=D%10,G=D%100;if(G>=11&&G<=19||X===0)return"many";if(X===1)return"one";return"few"}var hD$=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function D(J,Y,Q,W){let I=$[J]??null;if(I===null)return I;return{unit:I.unit[Y],verb:I.verb[W][Q?"inclusive":"notInclusive"]}}let X={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},G={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Gautas tipas ${W}, o tikėtasi - instanceof ${J.expected}`;return`Gautas tipas ${W}, o tikėtasi - ${Y}`}case"invalid_value":if(J.values.length===1)return`Privalo būti ${k(J.values[0])}`;return`Privalo būti vienas iš ${S(J.values,"|")} pasirinkimų`;case"too_big":{let Y=G[J.origin]??J.origin,Q=D(J.origin,_C(Number(J.maximum)),J.inclusive??!1,"smaller");if(Q?.verb)return`${AG(Y??J.origin??"reikšmė")} ${Q.verb} ${J.maximum.toString()} ${Q.unit??"elementų"}`;let W=J.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${AG(Y??J.origin??"reikšmė")} turi būti ${W} ${J.maximum.toString()} ${Q?.unit}`}case"too_small":{let Y=G[J.origin]??J.origin,Q=D(J.origin,_C(Number(J.minimum)),J.inclusive??!1,"bigger");if(Q?.verb)return`${AG(Y??J.origin??"reikšmė")} ${Q.verb} ${J.minimum.toString()} ${Q.unit??"elementų"}`;let W=J.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${AG(Y??J.origin??"reikšmė")} turi būti ${W} ${J.minimum.toString()} ${Q?.unit}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Eilutė privalo prasidėti "${Y.prefix}"`;if(Y.format==="ends_with")return`Eilutė privalo pasibaigti "${Y.suffix}"`;if(Y.format==="includes")return`Eilutė privalo įtraukti "${Y.includes}"`;if(Y.format==="regex")return`Eilutė privalo atitikti ${Y.pattern}`;return`Neteisingas ${X[Y.format]??J.format}`}case"not_multiple_of":return`Skaičius privalo būti ${J.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${J.keys.length>1?"i":"as"} rakt${J.keys.length>1?"ai":"as"}: ${S(J.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let Y=G[J.origin]??J.origin;return`${AG(Y??J.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function yw(){return{localeError:hD$()}}var uD$=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function D(J){return $[J]??null}let X={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},G={nan:"NaN",number:"број",array:"низа"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Грешен внес: се очекува instanceof ${J.expected}, примено ${W}`;return`Грешен внес: се очекува ${Y}, примено ${W}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${k(J.values[0])}`;return`Грешана опција: се очекува една ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Премногу голем: се очекува ${J.origin??"вредноста"} да има ${Y}${J.maximum.toString()} ${Q.unit??"елементи"}`;return`Премногу голем: се очекува ${J.origin??"вредноста"} да биде ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Премногу мал: се очекува ${J.origin} да има ${Y}${J.minimum.toString()} ${Q.unit}`;return`Премногу мал: се очекува ${J.origin} да биде ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Неважечка низа: мора да започнува со "${Y.prefix}"`;if(Y.format==="ends_with")return`Неважечка низа: мора да завршува со "${Y.suffix}"`;if(Y.format==="includes")return`Неважечка низа: мора да вклучува "${Y.includes}"`;if(Y.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${Y.pattern}`;return`Invalid ${X[Y.format]??J.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${S(J.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${J.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${J.origin}`;default:return"Грешен внес"}}};function gw(){return{localeError:uD$()}}var fD$=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function D(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"nombor"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Input tidak sah: dijangka instanceof ${J.expected}, diterima ${W}`;return`Input tidak sah: dijangka ${Y}, diterima ${W}`}case"invalid_value":if(J.values.length===1)return`Input tidak sah: dijangka ${k(J.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Terlalu besar: dijangka ${J.origin??"nilai"} ${Q.verb} ${Y}${J.maximum.toString()} ${Q.unit??"elemen"}`;return`Terlalu besar: dijangka ${J.origin??"nilai"} adalah ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Terlalu kecil: dijangka ${J.origin} ${Q.verb} ${Y}${J.minimum.toString()} ${Q.unit}`;return`Terlalu kecil: dijangka ${J.origin} adalah ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`String tidak sah: mesti bermula dengan "${Y.prefix}"`;if(Y.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${Y.suffix}"`;if(Y.format==="includes")return`String tidak sah: mesti mengandungi "${Y.includes}"`;if(Y.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${Y.pattern}`;return`${X[Y.format]??J.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${J.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(J.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${J.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${J.origin}`;default:return"Input tidak sah"}}};function xw(){return{localeError:fD$()}}var mD$=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function D(J){return $[J]??null}let X={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"},G={nan:"NaN",number:"getal"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Ongeldige invoer: verwacht instanceof ${J.expected}, ontving ${W}`;return`Ongeldige invoer: verwacht ${Y}, ontving ${W}`}case"invalid_value":if(J.values.length===1)return`Ongeldige invoer: verwacht ${k(J.values[0])}`;return`Ongeldige optie: verwacht één van ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin),W=J.origin==="date"?"laat":J.origin==="string"?"lang":"groot";if(Q)return`Te ${W}: verwacht dat ${J.origin??"waarde"} ${Y}${J.maximum.toString()} ${Q.unit??"elementen"} ${Q.verb}`;return`Te ${W}: verwacht dat ${J.origin??"waarde"} ${Y}${J.maximum.toString()} is`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin),W=J.origin==="date"?"vroeg":J.origin==="string"?"kort":"klein";if(Q)return`Te ${W}: verwacht dat ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit} ${Q.verb}`;return`Te ${W}: verwacht dat ${J.origin} ${Y}${J.minimum.toString()} is`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ongeldige tekst: moet met "${Y.prefix}" beginnen`;if(Y.format==="ends_with")return`Ongeldige tekst: moet op "${Y.suffix}" eindigen`;if(Y.format==="includes")return`Ongeldige tekst: moet "${Y.includes}" bevatten`;if(Y.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${Y.pattern}`;return`Ongeldig: ${X[Y.format]??J.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${J.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${J.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${J.origin}`;default:return"Ongeldige invoer"}}};function hw(){return{localeError:mD$()}}var cD$=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function D(J){return $[J]??null}let X={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},G={nan:"NaN",number:"tall",array:"liste"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Ugyldig input: forventet instanceof ${J.expected}, fikk ${W}`;return`Ugyldig input: forventet ${Y}, fikk ${W}`}case"invalid_value":if(J.values.length===1)return`Ugyldig verdi: forventet ${k(J.values[0])}`;return`Ugyldig valg: forventet en av ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`For stor(t): forventet ${J.origin??"value"} til å ha ${Y}${J.maximum.toString()} ${Q.unit??"elementer"}`;return`For stor(t): forventet ${J.origin??"value"} til å ha ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`For lite(n): forventet ${J.origin} til å ha ${Y}${J.minimum.toString()} ${Q.unit}`;return`For lite(n): forventet ${J.origin} til å ha ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ugyldig streng: må starte med "${Y.prefix}"`;if(Y.format==="ends_with")return`Ugyldig streng: må ende med "${Y.suffix}"`;if(Y.format==="includes")return`Ugyldig streng: må inneholde "${Y.includes}"`;if(Y.format==="regex")return`Ugyldig streng: må matche mønsteret ${Y.pattern}`;return`Ugyldig ${X[Y.format]??J.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${S(J.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${J.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${J.origin}`;default:return"Ugyldig input"}}};function uw(){return{localeError:cD$()}}var lD$=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function D(J){return $[J]??null}let X={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},G={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Fâsit giren: umulan instanceof ${J.expected}, alınan ${W}`;return`Fâsit giren: umulan ${Y}, alınan ${W}`}case"invalid_value":if(J.values.length===1)return`Fâsit giren: umulan ${k(J.values[0])}`;return`Fâsit tercih: mûteberler ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Fazla büyük: ${J.origin??"value"}, ${Y}${J.maximum.toString()} ${Q.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${J.origin??"value"}, ${Y}${J.maximum.toString()} olmalıydı.`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Fazla küçük: ${J.origin}, ${Y}${J.minimum.toString()} ${Q.unit} sahip olmalıydı.`;return`Fazla küçük: ${J.origin}, ${Y}${J.minimum.toString()} olmalıydı.`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Fâsit metin: "${Y.prefix}" ile başlamalı.`;if(Y.format==="ends_with")return`Fâsit metin: "${Y.suffix}" ile bitmeli.`;if(Y.format==="includes")return`Fâsit metin: "${Y.includes}" ihtivâ etmeli.`;if(Y.format==="regex")return`Fâsit metin: ${Y.pattern} nakşına uymalı.`;return`Fâsit ${X[Y.format]??J.format}`}case"not_multiple_of":return`Fâsit sayı: ${J.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`${J.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${J.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function fw(){return{localeError:lD$()}}var iD$=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function D(J){return $[J]??null}let X={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},G={nan:"NaN",number:"عدد",array:"ارې"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`ناسم ورودي: باید instanceof ${J.expected} وای, مګر ${W} ترلاسه شو`;return`ناسم ورودي: باید ${Y} وای, مګر ${W} ترلاسه شو`}case"invalid_value":if(J.values.length===1)return`ناسم ورودي: باید ${k(J.values[0])} وای`;return`ناسم انتخاب: باید یو له ${S(J.values,"|")} څخه وای`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`ډیر لوی: ${J.origin??"ارزښت"} باید ${Y}${J.maximum.toString()} ${Q.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${J.origin??"ارزښت"} باید ${Y}${J.maximum.toString()} وي`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`ډیر کوچنی: ${J.origin} باید ${Y}${J.minimum.toString()} ${Q.unit} ولري`;return`ډیر کوچنی: ${J.origin} باید ${Y}${J.minimum.toString()} وي`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`ناسم متن: باید د "${Y.prefix}" سره پیل شي`;if(Y.format==="ends_with")return`ناسم متن: باید د "${Y.suffix}" سره پای ته ورسيږي`;if(Y.format==="includes")return`ناسم متن: باید "${Y.includes}" ولري`;if(Y.format==="regex")return`ناسم متن: باید د ${Y.pattern} سره مطابقت ولري`;return`${X[Y.format]??J.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${J.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${J.keys.length>1?"کلیډونه":"کلیډ"}: ${S(J.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${J.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${J.origin} کې`;default:return"ناسمه ورودي"}}};function mw(){return{localeError:iD$()}}var pD$=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function D(J){return $[J]??null}let X={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},G={nan:"NaN",number:"liczba",array:"tablica"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${J.expected}, otrzymano ${W}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${Y}, otrzymano ${W}`}case"invalid_value":if(J.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${k(J.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Za duża wartość: oczekiwano, że ${J.origin??"wartość"} będzie mieć ${Y}${J.maximum.toString()} ${Q.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${J.origin??"wartość"} będzie wynosić ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Za mała wartość: oczekiwano, że ${J.origin??"wartość"} będzie mieć ${Y}${J.minimum.toString()} ${Q.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${J.origin??"wartość"} będzie wynosić ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${Y.prefix}"`;if(Y.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${Y.suffix}"`;if(Y.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${Y.includes}"`;if(Y.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${Y.pattern}`;return`Nieprawidłow(y/a/e) ${X[Y.format]??J.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${J.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${J.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${J.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function cw(){return{localeError:pD$()}}var rD$=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function D(J){return $[J]??null}let X={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},G={nan:"NaN",number:"número",null:"nulo"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Tipo inválido: esperado instanceof ${J.expected}, recebido ${W}`;return`Tipo inválido: esperado ${Y}, recebido ${W}`}case"invalid_value":if(J.values.length===1)return`Entrada inválida: esperado ${k(J.values[0])}`;return`Opção inválida: esperada uma das ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Muito grande: esperado que ${J.origin??"valor"} tivesse ${Y}${J.maximum.toString()} ${Q.unit??"elementos"}`;return`Muito grande: esperado que ${J.origin??"valor"} fosse ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Muito pequeno: esperado que ${J.origin} tivesse ${Y}${J.minimum.toString()} ${Q.unit}`;return`Muito pequeno: esperado que ${J.origin} fosse ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Texto inválido: deve começar com "${Y.prefix}"`;if(Y.format==="ends_with")return`Texto inválido: deve terminar com "${Y.suffix}"`;if(Y.format==="includes")return`Texto inválido: deve incluir "${Y.includes}"`;if(Y.format==="regex")return`Texto inválido: deve corresponder ao padrão ${Y.pattern}`;return`${X[Y.format]??J.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${J.divisor}`;case"unrecognized_keys":return`Chave${J.keys.length>1?"s":""} desconhecida${J.keys.length>1?"s":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Chave inválida em ${J.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${J.origin}`;default:return"Campo inválido"}}};function lw(){return{localeError:rD$()}}function NC($,D,X,G){let J=Math.abs($),Y=J%10,Q=J%100;if(Q>=11&&Q<=19)return G;if(Y===1)return D;if(Y>=2&&Y<=4)return X;return G}var nD$=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function D(J){return $[J]??null}let X={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},G={nan:"NaN",number:"число",array:"массив"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Неверный ввод: ожидалось instanceof ${J.expected}, получено ${W}`;return`Неверный ввод: ожидалось ${Y}, получено ${W}`}case"invalid_value":if(J.values.length===1)return`Неверный ввод: ожидалось ${k(J.values[0])}`;return`Неверный вариант: ожидалось одно из ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q){let W=Number(J.maximum),I=NC(W,Q.unit.one,Q.unit.few,Q.unit.many);return`Слишком большое значение: ожидалось, что ${J.origin??"значение"} будет иметь ${Y}${J.maximum.toString()} ${I}`}return`Слишком большое значение: ожидалось, что ${J.origin??"значение"} будет ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q){let W=Number(J.minimum),I=NC(W,Q.unit.one,Q.unit.few,Q.unit.many);return`Слишком маленькое значение: ожидалось, что ${J.origin} будет иметь ${Y}${J.minimum.toString()} ${I}`}return`Слишком маленькое значение: ожидалось, что ${J.origin} будет ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Неверная строка: должна начинаться с "${Y.prefix}"`;if(Y.format==="ends_with")return`Неверная строка: должна заканчиваться на "${Y.suffix}"`;if(Y.format==="includes")return`Неверная строка: должна содержать "${Y.includes}"`;if(Y.format==="regex")return`Неверная строка: должна соответствовать шаблону ${Y.pattern}`;return`Неверный ${X[Y.format]??J.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${J.divisor}`;case"unrecognized_keys":return`Нераспознанн${J.keys.length>1?"ые":"ый"} ключ${J.keys.length>1?"и":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${J.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${J.origin}`;default:return"Неверные входные данные"}}};function iw(){return{localeError:nD$()}}var dD$=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function D(J){return $[J]??null}let X={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},G={nan:"NaN",number:"število",array:"tabela"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Neveljaven vnos: pričakovano instanceof ${J.expected}, prejeto ${W}`;return`Neveljaven vnos: pričakovano ${Y}, prejeto ${W}`}case"invalid_value":if(J.values.length===1)return`Neveljaven vnos: pričakovano ${k(J.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Preveliko: pričakovano, da bo ${J.origin??"vrednost"} imelo ${Y}${J.maximum.toString()} ${Q.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${J.origin??"vrednost"} ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Premajhno: pričakovano, da bo ${J.origin} imelo ${Y}${J.minimum.toString()} ${Q.unit}`;return`Premajhno: pričakovano, da bo ${J.origin} ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Neveljaven niz: mora se začeti z "${Y.prefix}"`;if(Y.format==="ends_with")return`Neveljaven niz: mora se končati z "${Y.suffix}"`;if(Y.format==="includes")return`Neveljaven niz: mora vsebovati "${Y.includes}"`;if(Y.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${Y.pattern}`;return`Neveljaven ${X[Y.format]??J.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${J.divisor}`;case"unrecognized_keys":return`Neprepoznan${J.keys.length>1?"i ključi":" ključ"}: ${S(J.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${J.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${J.origin}`;default:return"Neveljaven vnos"}}};function pw(){return{localeError:dD$()}}var oD$=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function D(J){return $[J]??null}let X={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},G={nan:"NaN",number:"antal",array:"lista"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Ogiltig inmatning: förväntat instanceof ${J.expected}, fick ${W}`;return`Ogiltig inmatning: förväntat ${Y}, fick ${W}`}case"invalid_value":if(J.values.length===1)return`Ogiltig inmatning: förväntat ${k(J.values[0])}`;return`Ogiltigt val: förväntade en av ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`För stor(t): förväntade ${J.origin??"värdet"} att ha ${Y}${J.maximum.toString()} ${Q.unit??"element"}`;return`För stor(t): förväntat ${J.origin??"värdet"} att ha ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`För lite(t): förväntade ${J.origin??"värdet"} att ha ${Y}${J.minimum.toString()} ${Q.unit}`;return`För lite(t): förväntade ${J.origin??"värdet"} att ha ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ogiltig sträng: måste börja med "${Y.prefix}"`;if(Y.format==="ends_with")return`Ogiltig sträng: måste sluta med "${Y.suffix}"`;if(Y.format==="includes")return`Ogiltig sträng: måste innehålla "${Y.includes}"`;if(Y.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${Y.pattern}"`;return`Ogiltig(t) ${X[Y.format]??J.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${S(J.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${J.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${J.origin??"värdet"}`;default:return"Ogiltig input"}}};function rw(){return{localeError:oD$()}}var tD$=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function D(J){return $[J]??null}let X={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},G={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${J.expected}, பெறப்பட்டது ${W}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Y}, பெறப்பட்டது ${W}`}case"invalid_value":if(J.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${k(J.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${S(J.values,"|")} இல் ஒன்று`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${J.origin??"மதிப்பு"} ${Y}${J.maximum.toString()} ${Q.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${J.origin??"மதிப்பு"} ${Y}${J.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${J.origin} ${Y}${J.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`தவறான சரம்: "${Y.prefix}" இல் தொடங்க வேண்டும்`;if(Y.format==="ends_with")return`தவறான சரம்: "${Y.suffix}" இல் முடிவடைய வேண்டும்`;if(Y.format==="includes")return`தவறான சரம்: "${Y.includes}" ஐ உள்ளடக்க வேண்டும்`;if(Y.format==="regex")return`தவறான சரம்: ${Y.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${X[Y.format]??J.format}`}case"not_multiple_of":return`தவறான எண்: ${J.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${J.keys.length>1?"கள்":""}: ${S(J.keys,", ")}`;case"invalid_key":return`${J.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${J.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function nw(){return{localeError:tD$()}}var aD$=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function D(J){return $[J]??null}let X={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},G={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${J.expected} แต่ได้รับ ${W}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${Y} แต่ได้รับ ${W}`}case"invalid_value":if(J.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${k(J.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"ไม่เกิน":"น้อยกว่า",Q=D(J.origin);if(Q)return`เกินกำหนด: ${J.origin??"ค่า"} ควรมี${Y} ${J.maximum.toString()} ${Q.unit??"รายการ"}`;return`เกินกำหนด: ${J.origin??"ค่า"} ควรมี${Y} ${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?"อย่างน้อย":"มากกว่า",Q=D(J.origin);if(Q)return`น้อยกว่ากำหนด: ${J.origin} ควรมี${Y} ${J.minimum.toString()} ${Q.unit}`;return`น้อยกว่ากำหนด: ${J.origin} ควรมี${Y} ${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${Y.prefix}"`;if(Y.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${Y.suffix}"`;if(Y.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${Y.includes}" อยู่ในข้อความ`;if(Y.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${Y.pattern}`;return`รูปแบบไม่ถูกต้อง: ${X[Y.format]??J.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${J.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${S(J.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${J.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${J.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function dw(){return{localeError:aD$()}}var sD$=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function D(J){return $[J]??null}let X={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Geçersiz değer: beklenen instanceof ${J.expected}, alınan ${W}`;return`Geçersiz değer: beklenen ${Y}, alınan ${W}`}case"invalid_value":if(J.values.length===1)return`Geçersiz değer: beklenen ${k(J.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Çok büyük: beklenen ${J.origin??"değer"} ${Y}${J.maximum.toString()} ${Q.unit??"öğe"}`;return`Çok büyük: beklenen ${J.origin??"değer"} ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Çok küçük: beklenen ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit}`;return`Çok küçük: beklenen ${J.origin} ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Geçersiz metin: "${Y.prefix}" ile başlamalı`;if(Y.format==="ends_with")return`Geçersiz metin: "${Y.suffix}" ile bitmeli`;if(Y.format==="includes")return`Geçersiz metin: "${Y.includes}" içermeli`;if(Y.format==="regex")return`Geçersiz metin: ${Y.pattern} desenine uymalı`;return`Geçersiz ${X[Y.format]??J.format}`}case"not_multiple_of":return`Geçersiz sayı: ${J.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${J.keys.length>1?"lar":""}: ${S(J.keys,", ")}`;case"invalid_key":return`${J.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${J.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function ow(){return{localeError:sD$()}}var eD$=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function D(J){return $[J]??null}let X={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},G={nan:"NaN",number:"число",array:"масив"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Неправильні вхідні дані: очікується instanceof ${J.expected}, отримано ${W}`;return`Неправильні вхідні дані: очікується ${Y}, отримано ${W}`}case"invalid_value":if(J.values.length===1)return`Неправильні вхідні дані: очікується ${k(J.values[0])}`;return`Неправильна опція: очікується одне з ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Занадто велике: очікується, що ${J.origin??"значення"} ${Q.verb} ${Y}${J.maximum.toString()} ${Q.unit??"елементів"}`;return`Занадто велике: очікується, що ${J.origin??"значення"} буде ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Занадто мале: очікується, що ${J.origin} ${Q.verb} ${Y}${J.minimum.toString()} ${Q.unit}`;return`Занадто мале: очікується, що ${J.origin} буде ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Неправильний рядок: повинен починатися з "${Y.prefix}"`;if(Y.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${Y.suffix}"`;if(Y.format==="includes")return`Неправильний рядок: повинен містити "${Y.includes}"`;if(Y.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${Y.pattern}`;return`Неправильний ${X[Y.format]??J.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${J.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${J.keys.length>1?"і":""}: ${S(J.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${J.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${J.origin}`;default:return"Неправильні вхідні дані"}}};function MG(){return{localeError:eD$()}}function tw(){return MG()}var $X$=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function D(J){return $[J]??null}let X={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},G={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`غلط ان پٹ: instanceof ${J.expected} متوقع تھا، ${W} موصول ہوا`;return`غلط ان پٹ: ${Y} متوقع تھا، ${W} موصول ہوا`}case"invalid_value":if(J.values.length===1)return`غلط ان پٹ: ${k(J.values[0])} متوقع تھا`;return`غلط آپشن: ${S(J.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`بہت بڑا: ${J.origin??"ویلیو"} کے ${Y}${J.maximum.toString()} ${Q.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${J.origin??"ویلیو"} کا ${Y}${J.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`بہت چھوٹا: ${J.origin} کے ${Y}${J.minimum.toString()} ${Q.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${J.origin} کا ${Y}${J.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`غلط سٹرنگ: "${Y.prefix}" سے شروع ہونا چاہیے`;if(Y.format==="ends_with")return`غلط سٹرنگ: "${Y.suffix}" پر ختم ہونا چاہیے`;if(Y.format==="includes")return`غلط سٹرنگ: "${Y.includes}" شامل ہونا چاہیے`;if(Y.format==="regex")return`غلط سٹرنگ: پیٹرن ${Y.pattern} سے میچ ہونا چاہیے`;return`غلط ${X[Y.format]??J.format}`}case"not_multiple_of":return`غلط نمبر: ${J.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${J.keys.length>1?"ز":""}: ${S(J.keys,"، ")}`;case"invalid_key":return`${J.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${J.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function aw(){return{localeError:$X$()}}var DX$=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function D(J){return $[J]??null}let X={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},G={nan:"NaN",number:"raqam",array:"massiv"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${J.expected}, qabul qilingan ${W}`;return`Noto‘g‘ri kirish: kutilgan ${Y}, qabul qilingan ${W}`}case"invalid_value":if(J.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${k(J.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Juda katta: kutilgan ${J.origin??"qiymat"} ${Y}${J.maximum.toString()} ${Q.unit} ${Q.verb}`;return`Juda katta: kutilgan ${J.origin??"qiymat"} ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Juda kichik: kutilgan ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit} ${Q.verb}`;return`Juda kichik: kutilgan ${J.origin} ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Noto‘g‘ri satr: "${Y.prefix}" bilan boshlanishi kerak`;if(Y.format==="ends_with")return`Noto‘g‘ri satr: "${Y.suffix}" bilan tugashi kerak`;if(Y.format==="includes")return`Noto‘g‘ri satr: "${Y.includes}" ni o‘z ichiga olishi kerak`;if(Y.format==="regex")return`Noto‘g‘ri satr: ${Y.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${X[Y.format]??J.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${J.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${J.keys.length>1?"lar":""}: ${S(J.keys,", ")}`;case"invalid_key":return`${J.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${J.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function sw(){return{localeError:DX$()}}var XX$=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function D(J){return $[J]??null}let X={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},G={nan:"NaN",number:"số",array:"mảng"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${J.expected}, nhận được ${W}`;return`Đầu vào không hợp lệ: mong đợi ${Y}, nhận được ${W}`}case"invalid_value":if(J.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${k(J.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Quá lớn: mong đợi ${J.origin??"giá trị"} ${Q.verb} ${Y}${J.maximum.toString()} ${Q.unit??"phần tử"}`;return`Quá lớn: mong đợi ${J.origin??"giá trị"} ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Quá nhỏ: mong đợi ${J.origin} ${Q.verb} ${Y}${J.minimum.toString()} ${Q.unit}`;return`Quá nhỏ: mong đợi ${J.origin} ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${Y.prefix}"`;if(Y.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${Y.suffix}"`;if(Y.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${Y.includes}"`;if(Y.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${Y.pattern}`;return`${X[Y.format]??J.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${J.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${S(J.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${J.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${J.origin}`;default:return"Đầu vào không hợp lệ"}}};function ew(){return{localeError:XX$()}}var JX$=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function D(J){return $[J]??null}let X={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},G={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`无效输入:期望 instanceof ${J.expected},实际接收 ${W}`;return`无效输入:期望 ${Y},实际接收 ${W}`}case"invalid_value":if(J.values.length===1)return`无效输入:期望 ${k(J.values[0])}`;return`无效选项:期望以下之一 ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`数值过大:期望 ${J.origin??"值"} ${Y}${J.maximum.toString()} ${Q.unit??"个元素"}`;return`数值过大:期望 ${J.origin??"值"} ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`数值过小:期望 ${J.origin} ${Y}${J.minimum.toString()} ${Q.unit}`;return`数值过小:期望 ${J.origin} ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`无效字符串:必须以 "${Y.prefix}" 开头`;if(Y.format==="ends_with")return`无效字符串:必须以 "${Y.suffix}" 结尾`;if(Y.format==="includes")return`无效字符串:必须包含 "${Y.includes}"`;if(Y.format==="regex")return`无效字符串:必须满足正则表达式 ${Y.pattern}`;return`无效${X[Y.format]??J.format}`}case"not_multiple_of":return`无效数字:必须是 ${J.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${S(J.keys,", ")}`;case"invalid_key":return`${J.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${J.origin} 中包含无效值(value)`;default:return"无效输入"}}};function $L(){return{localeError:JX$()}}var GX$=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function D(J){return $[J]??null}let X={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`無效的輸入值:預期為 instanceof ${J.expected},但收到 ${W}`;return`無效的輸入值:預期為 ${Y},但收到 ${W}`}case"invalid_value":if(J.values.length===1)return`無效的輸入值:預期為 ${k(J.values[0])}`;return`無效的選項:預期為以下其中之一 ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`數值過大:預期 ${J.origin??"值"} 應為 ${Y}${J.maximum.toString()} ${Q.unit??"個元素"}`;return`數值過大:預期 ${J.origin??"值"} 應為 ${Y}${J.maximum.toString()}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`數值過小:預期 ${J.origin} 應為 ${Y}${J.minimum.toString()} ${Q.unit}`;return`數值過小:預期 ${J.origin} 應為 ${Y}${J.minimum.toString()}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`無效的字串:必須以 "${Y.prefix}" 開頭`;if(Y.format==="ends_with")return`無效的字串:必須以 "${Y.suffix}" 結尾`;if(Y.format==="includes")return`無效的字串:必須包含 "${Y.includes}"`;if(Y.format==="regex")return`無效的字串:必須符合格式 ${Y.pattern}`;return`無效的 ${X[Y.format]??J.format}`}case"not_multiple_of":return`無效的數字:必須為 ${J.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${J.keys.length>1?"們":""}:${S(J.keys,"、")}`;case"invalid_key":return`${J.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${J.origin} 中有無效的值`;default:return"無效的輸入值"}}};function DL(){return{localeError:GX$()}}var YX$=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function D(J){return $[J]??null}let X={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},G={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(J)=>{switch(J.code){case"invalid_type":{let Y=G[J.expected]??J.expected,Q=y(J.input),W=G[Q]??Q;if(/^[A-Z]/.test(J.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${J.expected}, àmọ̀ a rí ${W}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${Y}, àmọ̀ a rí ${W}`}case"invalid_value":if(J.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${k(J.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${S(J.values,"|")}`;case"too_big":{let Y=J.inclusive?"<=":"<",Q=D(J.origin);if(Q)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${J.origin??"iye"} ${Q.verb} ${Y}${J.maximum} ${Q.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${Y}${J.maximum}`}case"too_small":{let Y=J.inclusive?">=":">",Q=D(J.origin);if(Q)return`Kéré ju: a ní láti jẹ́ pé ${J.origin} ${Q.verb} ${Y}${J.minimum} ${Q.unit}`;return`Kéré ju: a ní láti jẹ́ ${Y}${J.minimum}`}case"invalid_format":{let Y=J;if(Y.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${Y.prefix}"`;if(Y.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${Y.suffix}"`;if(Y.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${Y.includes}"`;if(Y.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${Y.pattern}`;return`Aṣìṣe: ${X[Y.format]??J.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${J.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${S(J.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${J.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${J.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function XL(){return{localeError:YX$()}}var RC,JL=Symbol("ZodOutput"),GL=Symbol("ZodInput");class YL{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...D){let X=D[0];if(this._map.set($,X),X&&typeof X==="object"&&"id"in X)this._idmap.set(X.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let D=this._map.get($);if(D&&typeof D==="object"&&"id"in D)this._idmap.delete(D.id);return this._map.delete($),this}get($){let D=$._zod.parent;if(D){let X={...this.get(D)??{}};delete X.id;let G={...X,...this._map.get($)};return Object.keys(G).length?G:void 0}return this._map.get($)}has($){return this._map.has($)}}function uW(){return new YL}(RC=globalThis).__zod_globalRegistry??(RC.__zod_globalRegistry=uW());var o6=globalThis.__zod_globalRegistry;function QL($,D){return new $({type:"string",...u(D)})}function WL($,D){return new $({type:"string",coerce:!0,...u(D)})}function fW($,D){return new $({type:"string",format:"email",check:"string_format",abort:!1,...u(D)})}function PG($,D){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...u(D)})}function mW($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...u(D)})}function cW($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...u(D)})}function lW($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...u(D)})}function iW($,D){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...u(D)})}function _G($,D){return new $({type:"string",format:"url",check:"string_format",abort:!1,...u(D)})}function pW($,D){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...u(D)})}function rW($,D){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...u(D)})}function nW($,D){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...u(D)})}function dW($,D){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...u(D)})}function oW($,D){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...u(D)})}function tW($,D){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...u(D)})}function aW($,D){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...u(D)})}function sW($,D){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...u(D)})}function eW($,D){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...u(D)})}function IL($,D){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...u(D)})}function $I($,D){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...u(D)})}function DI($,D){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...u(D)})}function XI($,D){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...u(D)})}function JI($,D){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...u(D)})}function GI($,D){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...u(D)})}function YI($,D){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...u(D)})}var UL={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function BL($,D){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...u(D)})}function zL($,D){return new $({type:"string",format:"date",check:"string_format",...u(D)})}function qL($,D){return new $({type:"string",format:"time",check:"string_format",precision:null,...u(D)})}function HL($,D){return new $({type:"string",format:"duration",check:"string_format",...u(D)})}function KL($,D){return new $({type:"number",checks:[],...u(D)})}function VL($,D){return new $({type:"number",coerce:!0,checks:[],...u(D)})}function wL($,D){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...u(D)})}function LL($,D){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...u(D)})}function OL($,D){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...u(D)})}function FL($,D){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...u(D)})}function bL($,D){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...u(D)})}function jL($,D){return new $({type:"boolean",...u(D)})}function AL($,D){return new $({type:"boolean",coerce:!0,...u(D)})}function ML($,D){return new $({type:"bigint",...u(D)})}function SL($,D){return new $({type:"bigint",coerce:!0,...u(D)})}function PL($,D){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...u(D)})}function _L($,D){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...u(D)})}function NL($,D){return new $({type:"symbol",...u(D)})}function RL($,D){return new $({type:"undefined",...u(D)})}function EL($,D){return new $({type:"null",...u(D)})}function ZL($){return new $({type:"any"})}function TL($){return new $({type:"unknown"})}function vL($,D){return new $({type:"never",...u(D)})}function kL($,D){return new $({type:"void",...u(D)})}function CL($,D){return new $({type:"date",...u(D)})}function yL($,D){return new $({type:"date",coerce:!0,...u(D)})}function gL($,D){return new $({type:"nan",...u(D)})}function x4($,D){return new NW({check:"less_than",...u(D),value:$,inclusive:!1})}function f1($,D){return new NW({check:"less_than",...u(D),value:$,inclusive:!0})}function h4($,D){return new RW({check:"greater_than",...u(D),value:$,inclusive:!1})}function H1($,D){return new RW({check:"greater_than",...u(D),value:$,inclusive:!0})}function QI($){return h4(0,$)}function WI($){return x4(0,$)}function II($){return f1(0,$)}function UI($){return H1(0,$)}function XD($,D){return new gK({check:"multiple_of",...u(D),value:$})}function JD($,D){return new uK({check:"max_size",...u(D),maximum:$})}function u4($,D){return new fK({check:"min_size",...u(D),minimum:$})}function aD($,D){return new mK({check:"size_equals",...u(D),size:$})}function sD($,D){return new cK({check:"max_length",...u(D),maximum:$})}function B0($,D){return new lK({check:"min_length",...u(D),minimum:$})}function eD($,D){return new iK({check:"length_equals",...u(D),length:$})}function jJ($,D){return new pK({check:"string_format",format:"regex",...u(D),pattern:$})}function AJ($){return new rK({check:"string_format",format:"lowercase",...u($)})}function MJ($){return new nK({check:"string_format",format:"uppercase",...u($)})}function SJ($,D){return new dK({check:"string_format",format:"includes",...u(D),includes:$})}function PJ($,D){return new oK({check:"string_format",format:"starts_with",...u(D),prefix:$})}function _J($,D){return new tK({check:"string_format",format:"ends_with",...u(D),suffix:$})}function BI($,D,X){return new aK({check:"property",property:$,schema:D,...u(X)})}function NJ($,D){return new sK({check:"mime_type",mime:$,...u(D)})}function F4($){return new eK({check:"overwrite",tx:$})}function RJ($){return F4((D)=>D.normalize($))}function EJ(){return F4(($)=>$.trim())}function ZJ(){return F4(($)=>$.toLowerCase())}function TJ(){return F4(($)=>$.toUpperCase())}function vJ(){return F4(($)=>a5($))}function xL($,D,X){return new $({type:"array",element:D,...u(X)})}function WX$($,D,X){return new $({type:"union",options:D,...u(X)})}function IX$($,D,X){return new $({type:"union",options:D,inclusive:!1,...u(X)})}function UX$($,D,X,G){return new $({type:"union",options:X,discriminator:D,...u(G)})}function BX$($,D,X){return new $({type:"intersection",left:D,right:X})}function zX$($,D,X,G){let J=X instanceof q$;return new $({type:"tuple",items:D,rest:J?X:null,...u(J?G:X)})}function qX$($,D,X,G){return new $({type:"record",keyType:D,valueType:X,...u(G)})}function HX$($,D,X,G){return new $({type:"map",keyType:D,valueType:X,...u(G)})}function KX$($,D,X){return new $({type:"set",valueType:D,...u(X)})}function VX$($,D,X){let G=Array.isArray(D)?Object.fromEntries(D.map((J)=>[J,J])):D;return new $({type:"enum",entries:G,...u(X)})}function wX$($,D,X){return new $({type:"enum",entries:D,...u(X)})}function LX$($,D,X){return new $({type:"literal",values:Array.isArray(D)?D:[D],...u(X)})}function hL($,D){return new $({type:"file",...u(D)})}function OX$($,D){return new $({type:"transform",transform:D})}function FX$($,D){return new $({type:"optional",innerType:D})}function bX$($,D){return new $({type:"nullable",innerType:D})}function jX$($,D,X){return new $({type:"default",innerType:D,get defaultValue(){return typeof X==="function"?X():e5(X)}})}function AX$($,D,X){return new $({type:"nonoptional",innerType:D,...u(X)})}function MX$($,D){return new $({type:"success",innerType:D})}function SX$($,D,X){return new $({type:"catch",innerType:D,catchValue:typeof X==="function"?X:()=>X})}function PX$($,D,X){return new $({type:"pipe",in:D,out:X})}function _X$($,D){return new $({type:"readonly",innerType:D})}function NX$($,D,X){return new $({type:"template_literal",parts:D,...u(X)})}function RX$($,D){return new $({type:"lazy",getter:D})}function EX$($,D){return new $({type:"promise",innerType:D})}function uL($,D,X){let G=u(X);return G.abort??(G.abort=!0),new $({type:"custom",check:"custom",fn:D,...G})}function fL($,D,X){return new $({type:"custom",check:"custom",fn:D,...u(X)})}function mL($){let D=EC((X)=>{return X.addIssue=(G)=>{if(typeof G==="string")X.issues.push(KJ(G,X.value,D._zod.def));else{let J=G;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=X.value),J.inst??(J.inst=D),J.continue??(J.continue=!D._zod.def.abort),X.issues.push(KJ(J))}},$(X.value,X)});return D}function EC($,D){let X=new G6({check:"custom",...u(D)});return X._zod.check=$,X}function cL($){let D=new G6({check:"describe"});return D._zod.onattach=[(X)=>{let G=o6.get(X)??{};o6.add(X,{...G,description:$})}],D._zod.check=()=>{},D}function lL($){let D=new G6({check:"meta"});return D._zod.onattach=[(X)=>{let G=o6.get(X)??{};o6.add(X,{...G,...$})}],D._zod.check=()=>{},D}function iL($,D){let X=u(D),G=X.truthy??["true","1","yes","on","y","enabled"],J=X.falsy??["false","0","no","off","n","disabled"];if(X.case!=="sensitive")G=G.map((z)=>typeof z==="string"?z.toLowerCase():z),J=J.map((z)=>typeof z==="string"?z.toLowerCase():z);let Y=new Set(G),Q=new Set(J),W=$.Codec??FG,I=$.Boolean??LG,B=new($.String??tD)({type:"string",error:X.error}),H=new I({type:"boolean",error:X.error}),V=new W({type:"pipe",in:B,out:H,transform:(z,L)=>{let F=z;if(X.case!=="sensitive")F=F.toLowerCase();if(Y.has(F))return!0;else if(Q.has(F))return!1;else return L.issues.push({code:"invalid_value",expected:"stringbool",values:[...Y,...Q],input:L.value,inst:V,continue:!1}),{}},reverseTransform:(z,L)=>{if(z===!0)return G[0]||"true";else return J[0]||"false"},error:X.error});return V}function kJ($,D,X,G={}){let J=u(G),Y={...u(G),check:"string_format",type:"string",format:D,fn:typeof X==="function"?X:(W)=>X.test(W),...J};if(X instanceof RegExp)Y.pattern=X;return new $(Y)}function GD($){let D=$?.target??"draft-2020-12";if(D==="draft-4")D="draft-04";if(D==="draft-7")D="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??o6,target:D,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function d$($,D,X={path:[],schemaPath:[]}){var G;let J=$._zod.def,Y=D.seen.get($);if(Y){if(Y.count++,X.schemaPath.includes($))Y.cycle=X.path;return Y.schema}let Q={schema:{},count:1,cycle:void 0,path:X.path};D.seen.set($,Q);let W=$._zod.toJSONSchema?.();if(W)Q.schema=W;else{let B={...X,schemaPath:[...X.schemaPath,$],path:X.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(D,Q.schema,B);else{let V=Q.schema,z=D.processors[J.type];if(!z)throw Error(`[toJSONSchema]: Non-representable type encountered: ${J.type}`);z($,D,V,B)}let H=$._zod.parent;if(H){if(!Q.ref)Q.ref=H;d$(H,D,B),D.seen.get(H).isParent=!0}}let I=D.metadataRegistry.get($);if(I)Object.assign(Q.schema,I);if(D.io==="input"&&K1($))delete Q.schema.examples,delete Q.schema.default;if(D.io==="input"&&Q.schema._prefault)(G=Q.schema).default??(G.default=Q.schema._prefault);return delete Q.schema._prefault,D.seen.get($).schema}function YD($,D){let X=$.seen.get(D);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=new Map;for(let Q of $.seen.entries()){let W=$.metadataRegistry.get(Q[0])?.id;if(W){let I=G.get(W);if(I&&I!==Q[0])throw Error(`Duplicate schema id "${W}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);G.set(W,Q[0])}}let J=(Q)=>{let W=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let H=$.external.registry.get(Q[0])?.id,V=$.external.uri??((L)=>L);if(H)return{ref:V(H)};let z=Q[1].defId??Q[1].schema.id??`schema${$.counter++}`;return Q[1].defId=z,{defId:z,ref:`${V("__shared")}#/${W}/${z}`}}if(Q[1]===X)return{ref:"#"};let U=`${"#"}/${W}/`,B=Q[1].schema.id??`__schema${$.counter++}`;return{defId:B,ref:U+B}},Y=(Q)=>{if(Q[1].schema.$ref)return;let W=Q[1],{ref:I,defId:U}=J(Q);if(W.def={...W.schema},U)W.defId=U;let B=W.schema;for(let H in B)delete B[H];B.$ref=I};if($.cycles==="throw")for(let Q of $.seen.entries()){let W=Q[1];if(W.cycle)throw Error(`Cycle detected: #/${W.cycle?.join("/")}/<root>
353
482
 
354
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Q of $.seen.entries()){let W=Q[1];if(D===Q[0]){Y(Q);continue}if($.external){let U=$.external.registry.get(Q[0])?.id;if(D!==Q[0]&&U){Y(Q);continue}}if($.metadataRegistry.get(Q[0])?.id){Y(Q);continue}if(W.cycle){Y(Q);continue}if(W.count>1){if($.reused==="ref"){Y(Q);continue}}}}function QD($,D){let X=$.seen.get(D);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=(Q)=>{let W=$.seen.get(Q);if(W.ref===null)return;let I=W.def??W.schema,U={...I},B=W.ref;if(W.ref=null,B){G(B);let V=$.seen.get(B),z=V.schema;if(z.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))I.allOf=I.allOf??[],I.allOf.push(z);else Object.assign(I,z);if(Object.assign(I,U),Q._zod.parent===B)for(let F in I){if(F==="$ref"||F==="allOf")continue;if(!(F in U))delete I[F]}if(z.$ref&&V.def)for(let F in I){if(F==="$ref"||F==="allOf")continue;if(F in V.def&&JSON.stringify(I[F])===JSON.stringify(V.def[F]))delete I[F]}}let H=Q._zod.parent;if(H&&H!==B){G(H);let V=$.seen.get(H);if(V?.schema.$ref){if(I.$ref=V.schema.$ref,V.def)for(let z in I){if(z==="$ref"||z==="allOf")continue;if(z in V.def&&JSON.stringify(I[z])===JSON.stringify(V.def[z]))delete I[z]}}}$.override({zodSchema:Q,jsonSchema:I,path:W.path??[]})};for(let Q of[...$.seen.entries()].reverse())G(Q[0]);let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let Q=$.external.registry.get(D)?.id;if(!Q)throw Error("Schema is missing an `id` property");J.$id=$.external.uri(Q)}Object.assign(J,X.def??X.schema);let Y=$.external?.defs??{};for(let Q of $.seen.entries()){let W=Q[1];if(W.def&&W.defId)Y[W.defId]=W.def}if($.external);else if(Object.keys(Y).length>0)if($.target==="draft-2020-12")J.$defs=Y;else J.definitions=Y;try{let Q=JSON.parse(JSON.stringify(J));return Object.defineProperty(Q,"~standard",{value:{...D["~standard"],jsonSchema:{input:CJ(D,"input",$.processors),output:CJ(D,"output",$.processors)}},enumerable:!1,writable:!1}),Q}catch(Q){throw Error("Error converting schema to JSON.")}}function K1($,D){let X=D??{seen:new Set};if(X.seen.has($))return!1;X.seen.add($);let G=$._zod.def;if(G.type==="transform")return!0;if(G.type==="array")return K1(G.element,X);if(G.type==="set")return K1(G.valueType,X);if(G.type==="lazy")return K1(G.getter(),X);if(G.type==="promise"||G.type==="optional"||G.type==="nonoptional"||G.type==="nullable"||G.type==="readonly"||G.type==="default"||G.type==="prefault")return K1(G.innerType,X);if(G.type==="intersection")return K1(G.left,X)||K1(G.right,X);if(G.type==="record"||G.type==="map")return K1(G.keyType,X)||K1(G.valueType,X);if(G.type==="pipe")return K1(G.in,X)||K1(G.out,X);if(G.type==="object"){for(let J in G.shape)if(K1(G.shape[J],X))return!0;return!1}if(G.type==="union"){for(let J of G.options)if(K1(J,X))return!0;return!1}if(G.type==="tuple"){for(let J of G.items)if(K1(J,X))return!0;if(G.rest&&K1(G.rest,X))return!0;return!1}return!1}var pL=($,D={})=>(X)=>{let G=GD({...X,processors:D});return d$($,G),YD(G,$),QD(G,$)},CJ=($,D,X={})=>(G)=>{let{libraryOptions:J,target:Y}=G??{},Q=GD({...J??{},target:Y,io:D,processors:X});return d$($,Q),YD(Q,$),QD(Q,$)};var ZX$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rL=($,D,X,G)=>{let J=X;J.type="string";let{minimum:Y,maximum:Q,format:W,patterns:I,contentEncoding:U}=$._zod.bag;if(typeof Y==="number")J.minLength=Y;if(typeof Q==="number")J.maxLength=Q;if(W){if(J.format=ZX$[W]??W,J.format==="")delete J.format;if(W==="time")delete J.format}if(U)J.contentEncoding=U;if(I&&I.size>0){let B=[...I];if(B.length===1)J.pattern=B[0].source;else if(B.length>1)J.allOf=[...B.map((H)=>({...D.target==="draft-07"||D.target==="draft-04"||D.target==="openapi-3.0"?{type:"string"}:{},pattern:H.source}))]}},nL=($,D,X,G)=>{let J=X,{minimum:Y,maximum:Q,format:W,multipleOf:I,exclusiveMaximum:U,exclusiveMinimum:B}=$._zod.bag;if(typeof W==="string"&&W.includes("int"))J.type="integer";else J.type="number";if(typeof B==="number")if(D.target==="draft-04"||D.target==="openapi-3.0")J.minimum=B,J.exclusiveMinimum=!0;else J.exclusiveMinimum=B;if(typeof Y==="number"){if(J.minimum=Y,typeof B==="number"&&D.target!=="draft-04")if(B>=Y)delete J.minimum;else delete J.exclusiveMinimum}if(typeof U==="number")if(D.target==="draft-04"||D.target==="openapi-3.0")J.maximum=U,J.exclusiveMaximum=!0;else J.exclusiveMaximum=U;if(typeof Q==="number"){if(J.maximum=Q,typeof U==="number"&&D.target!=="draft-04")if(U<=Q)delete J.maximum;else delete J.exclusiveMaximum}if(typeof I==="number")J.multipleOf=I},dL=($,D,X,G)=>{X.type="boolean"},oL=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},tL=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},aL=($,D,X,G)=>{if(D.target==="openapi-3.0")X.type="string",X.nullable=!0,X.enum=[null];else X.type="null"},sL=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},eL=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},$O=($,D,X,G)=>{X.not={}},DO=($,D,X,G)=>{},XO=($,D,X,G)=>{},JO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},GO=($,D,X,G)=>{let J=$._zod.def,Y=QG(J.entries);if(Y.every((Q)=>typeof Q==="number"))X.type="number";if(Y.every((Q)=>typeof Q==="string"))X.type="string";X.enum=Y},YO=($,D,X,G)=>{let J=$._zod.def,Y=[];for(let Q of J.values)if(Q===void 0){if(D.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof Q==="bigint")if(D.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else Y.push(Number(Q));else Y.push(Q);if(Y.length===0);else if(Y.length===1){let Q=Y[0];if(X.type=Q===null?"null":typeof Q,D.target==="draft-04"||D.target==="openapi-3.0")X.enum=[Q];else X.const=Q}else{if(Y.every((Q)=>typeof Q==="number"))X.type="number";if(Y.every((Q)=>typeof Q==="string"))X.type="string";if(Y.every((Q)=>typeof Q==="boolean"))X.type="boolean";if(Y.every((Q)=>Q===null))X.type="null";X.enum=Y}},QO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},WO=($,D,X,G)=>{let J=X,Y=$._zod.pattern;if(!Y)throw Error("Pattern not found in template literal");J.type="string",J.pattern=Y.source},IO=($,D,X,G)=>{let J=X,Y={type:"string",format:"binary",contentEncoding:"binary"},{minimum:Q,maximum:W,mime:I}=$._zod.bag;if(Q!==void 0)Y.minLength=Q;if(W!==void 0)Y.maxLength=W;if(I)if(I.length===1)Y.contentMediaType=I[0],Object.assign(J,Y);else Object.assign(J,Y),J.anyOf=I.map((U)=>({contentMediaType:U}));else Object.assign(J,Y)},UO=($,D,X,G)=>{X.type="boolean"},BO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},zO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},qO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},HO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},KO=($,D,X,G)=>{if(D.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},VO=($,D,X,G)=>{let J=X,Y=$._zod.def,{minimum:Q,maximum:W}=$._zod.bag;if(typeof Q==="number")J.minItems=Q;if(typeof W==="number")J.maxItems=W;J.type="array",J.items=d$(Y.element,D,{...G,path:[...G.path,"items"]})},wO=($,D,X,G)=>{let J=X,Y=$._zod.def;J.type="object",J.properties={};let Q=Y.shape;for(let U in Q)J.properties[U]=d$(Q[U],D,{...G,path:[...G.path,"properties",U]});let W=new Set(Object.keys(Q)),I=new Set([...W].filter((U)=>{let B=Y.shape[U]._zod;if(D.io==="input")return B.optin===void 0;else return B.optout===void 0}));if(I.size>0)J.required=Array.from(I);if(Y.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!Y.catchall){if(D.io==="output")J.additionalProperties=!1}else if(Y.catchall)J.additionalProperties=d$(Y.catchall,D,{...G,path:[...G.path,"additionalProperties"]})},qI=($,D,X,G)=>{let J=$._zod.def,Y=J.inclusive===!1,Q=J.options.map((W,I)=>d$(W,D,{...G,path:[...G.path,Y?"oneOf":"anyOf",I]}));if(Y)X.oneOf=Q;else X.anyOf=Q},LO=($,D,X,G)=>{let J=$._zod.def,Y=d$(J.left,D,{...G,path:[...G.path,"allOf",0]}),Q=d$(J.right,D,{...G,path:[...G.path,"allOf",1]}),W=(U)=>("allOf"in U)&&Object.keys(U).length===1,I=[...W(Y)?Y.allOf:[Y],...W(Q)?Q.allOf:[Q]];X.allOf=I},OO=($,D,X,G)=>{let J=X,Y=$._zod.def;J.type="array";let Q=D.target==="draft-2020-12"?"prefixItems":"items",W=D.target==="draft-2020-12"?"items":D.target==="openapi-3.0"?"items":"additionalItems",I=Y.items.map((V,z)=>d$(V,D,{...G,path:[...G.path,Q,z]})),U=Y.rest?d$(Y.rest,D,{...G,path:[...G.path,W,...D.target==="openapi-3.0"?[Y.items.length]:[]]}):null;if(D.target==="draft-2020-12"){if(J.prefixItems=I,U)J.items=U}else if(D.target==="openapi-3.0"){if(J.items={anyOf:I},U)J.items.anyOf.push(U);if(J.minItems=I.length,!U)J.maxItems=I.length}else if(J.items=I,U)J.additionalItems=U;let{minimum:B,maximum:H}=$._zod.bag;if(typeof B==="number")J.minItems=B;if(typeof H==="number")J.maxItems=H},FO=($,D,X,G)=>{let J=X,Y=$._zod.def;J.type="object";let Q=Y.keyType,I=Q._zod.bag?.patterns;if(Y.mode==="loose"&&I&&I.size>0){let B=d$(Y.valueType,D,{...G,path:[...G.path,"patternProperties","*"]});J.patternProperties={};for(let H of I)J.patternProperties[H.source]=B}else{if(D.target==="draft-07"||D.target==="draft-2020-12")J.propertyNames=d$(Y.keyType,D,{...G,path:[...G.path,"propertyNames"]});J.additionalProperties=d$(Y.valueType,D,{...G,path:[...G.path,"additionalProperties"]})}let U=Q._zod.values;if(U){let B=[...U].filter((H)=>typeof H==="string"||typeof H==="number");if(B.length>0)J.required=B}},bO=($,D,X,G)=>{let J=$._zod.def,Y=d$(J.innerType,D,G),Q=D.seen.get($);if(D.target==="openapi-3.0")Q.ref=J.innerType,X.nullable=!0;else X.anyOf=[Y,{type:"null"}]},jO=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType},AO=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType,X.default=JSON.parse(JSON.stringify(J.defaultValue))},MO=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);if(Y.ref=J.innerType,D.io==="input")X._prefault=JSON.parse(JSON.stringify(J.defaultValue))},SO=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType;let Q;try{Q=J.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}X.default=Q},PO=($,D,X,G)=>{let J=$._zod.def,Y=D.io==="input"?J.in._zod.def.type==="transform"?J.out:J.in:J.out;d$(Y,D,G);let Q=D.seen.get($);Q.ref=Y},_O=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType,X.readOnly=!0},NO=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType},HI=($,D,X,G)=>{let J=$._zod.def;d$(J.innerType,D,G);let Y=D.seen.get($);Y.ref=J.innerType},RO=($,D,X,G)=>{let J=$._zod.innerType;d$(J,D,G);let Y=D.seen.get($);Y.ref=J},zI={string:rL,number:nL,boolean:dL,bigint:oL,symbol:tL,null:aL,undefined:sL,void:eL,never:$O,any:DO,unknown:XO,date:JO,enum:GO,literal:YO,nan:QO,template_literal:WO,file:IO,success:UO,custom:BO,function:zO,transform:qO,map:HO,set:KO,array:VO,object:wO,union:qI,intersection:LO,tuple:OO,record:FO,nullable:bO,nonoptional:jO,default:AO,prefault:MO,catch:SO,pipe:PO,readonly:_O,promise:NO,optional:HI,lazy:RO};function KI($,D){if("_idmap"in $){let G=$,J=GD({...D,processors:zI}),Y={};for(let I of G._idmap.entries()){let[U,B]=I;d$(B,J)}let Q={},W={registry:G,uri:D?.uri,defs:Y};J.external=W;for(let I of G._idmap.entries()){let[U,B]=I;YD(J,B),Q[U]=QD(J,B)}if(Object.keys(Y).length>0){let I=J.target==="draft-2020-12"?"$defs":"definitions";Q.__shared={[I]:Y}}return{schemas:Q}}let X=GD({...D,processors:zI});return d$($,X),YD(X,$),QD(X,$)}class EO{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let D=$?.target??"draft-2020-12";if(D==="draft-4")D="draft-04";if(D==="draft-7")D="draft-07";this.ctx=GD({processors:zI,target:D,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,D={path:[],schemaPath:[]}){return d$($,this.ctx,D)}emit($,D){if(D){if(D.cycles)this.ctx.cycles=D.cycles;if(D.reused)this.ctx.reused=D.reused;if(D.external)this.ctx.external=D.external}YD(this.ctx,$);let X=QD(this.ctx,$),{"~standard":G,...J}=X;return J}}var ZC={};var NG={};X4(NG,{xor:()=>Ay,xid:()=>pC,void:()=>wy,uuidv7:()=>xC,uuidv6:()=>gC,uuidv4:()=>yC,uuid:()=>CC,url:()=>hC,unknown:()=>$X,union:()=>mI,undefined:()=>Ky,ulid:()=>iC,uint64:()=>qy,uint32:()=>Uy,tuple:()=>UF,transform:()=>lI,templateLiteral:()=>yy,symbol:()=>Hy,superRefine:()=>gF,success:()=>vy,stringbool:()=>ly,stringFormat:()=>Xy,string:()=>bI,strictObject:()=>by,set:()=>Ny,refine:()=>yF,record:()=>BF,readonly:()=>EF,promise:()=>gy,preprocess:()=>py,prefault:()=>AF,pipe:()=>TG,partialRecord:()=>Sy,optional:()=>EG,object:()=>Fy,number:()=>nO,nullish:()=>Ty,nullable:()=>ZG,null:()=>sO,nonoptional:()=>MF,never:()=>fI,nativeEnum:()=>Ry,nanoid:()=>mC,nan:()=>ky,meta:()=>my,map:()=>_y,mac:()=>dC,looseRecord:()=>Py,looseObject:()=>jy,literal:()=>Ey,lazy:()=>vF,ksuid:()=>rC,keyof:()=>Oy,jwt:()=>Dy,json:()=>iy,ipv6:()=>oC,ipv4:()=>nC,intersection:()=>WF,int64:()=>zy,int32:()=>Iy,int:()=>jI,instanceof:()=>cy,httpUrl:()=>uC,hostname:()=>Jy,hex:()=>Gy,hash:()=>Yy,guid:()=>kC,function:()=>xy,float64:()=>Wy,float32:()=>Qy,file:()=>Zy,exactOptional:()=>LF,enum:()=>cI,emoji:()=>fC,email:()=>vC,e164:()=>$y,discriminatedUnion:()=>My,describe:()=>fy,date:()=>Ly,custom:()=>uy,cuid2:()=>lC,cuid:()=>cC,codec:()=>Cy,cidrv6:()=>aC,cidrv4:()=>tC,check:()=>hy,catch:()=>_F,boolean:()=>dO,bigint:()=>By,base64url:()=>eC,base64:()=>sC,array:()=>CG,any:()=>Vy,_function:()=>xy,_default:()=>bF,_ZodString:()=>AI,ZodXor:()=>GF,ZodXID:()=>EI,ZodVoid:()=>XF,ZodUnknown:()=>$F,ZodUnion:()=>gG,ZodUndefined:()=>tO,ZodUUID:()=>f4,ZodURL:()=>vG,ZodULID:()=>RI,ZodType:()=>V$,ZodTuple:()=>IF,ZodTransform:()=>VF,ZodTemplateLiteral:()=>ZF,ZodSymbol:()=>oO,ZodSuccess:()=>SF,ZodStringFormat:()=>s$,ZodString:()=>xJ,ZodSet:()=>qF,ZodRecord:()=>xG,ZodReadonly:()=>RF,ZodPromise:()=>kF,ZodPrefault:()=>jF,ZodPipe:()=>rI,ZodOptional:()=>iI,ZodObject:()=>yG,ZodNumberFormat:()=>DX,ZodNumber:()=>uJ,ZodNullable:()=>OF,ZodNull:()=>aO,ZodNonOptional:()=>pI,ZodNever:()=>DF,ZodNanoID:()=>PI,ZodNaN:()=>NF,ZodMap:()=>zF,ZodMAC:()=>rO,ZodLiteral:()=>HF,ZodLazy:()=>TF,ZodKSUID:()=>ZI,ZodJWT:()=>hI,ZodIntersection:()=>QF,ZodIPv6:()=>vI,ZodIPv4:()=>TI,ZodGUID:()=>RG,ZodFunction:()=>CF,ZodFile:()=>KF,ZodExactOptional:()=>wF,ZodEnum:()=>gJ,ZodEmoji:()=>SI,ZodEmail:()=>MI,ZodE164:()=>xI,ZodDiscriminatedUnion:()=>YF,ZodDefault:()=>FF,ZodDate:()=>kG,ZodCustomStringFormat:()=>hJ,ZodCustom:()=>hG,ZodCodec:()=>nI,ZodCatch:()=>PF,ZodCUID2:()=>NI,ZodCUID:()=>_I,ZodCIDRv6:()=>CI,ZodCIDRv4:()=>kI,ZodBoolean:()=>fJ,ZodBigIntFormat:()=>uI,ZodBigInt:()=>mJ,ZodBase64URL:()=>gI,ZodBase64:()=>yI,ZodArray:()=>JF,ZodAny:()=>eO});var VI={};X4(VI,{uppercase:()=>MJ,trim:()=>EJ,toUpperCase:()=>TJ,toLowerCase:()=>ZJ,startsWith:()=>PJ,slugify:()=>vJ,size:()=>aD,regex:()=>jJ,property:()=>BI,positive:()=>QI,overwrite:()=>F4,normalize:()=>RJ,nonpositive:()=>II,nonnegative:()=>UI,negative:()=>WI,multipleOf:()=>XD,minSize:()=>u4,minLength:()=>B0,mime:()=>NJ,maxSize:()=>JD,maxLength:()=>sD,lte:()=>f1,lt:()=>x4,lowercase:()=>AJ,length:()=>eD,includes:()=>SJ,gte:()=>H1,gt:()=>h4,endsWith:()=>_J});var yJ={};X4(yJ,{time:()=>vO,duration:()=>kO,datetime:()=>ZO,date:()=>TO,ZodISOTime:()=>OI,ZodISODuration:()=>FI,ZodISODateTime:()=>wI,ZodISODate:()=>LI});var wI=j("ZodISODateTime",($,D)=>{HV.init($,D),s$.init($,D)});function ZO($){return BL(wI,$)}var LI=j("ZodISODate",($,D)=>{KV.init($,D),s$.init($,D)});function TO($){return zL(LI,$)}var OI=j("ZodISOTime",($,D)=>{VV.init($,D),s$.init($,D)});function vO($){return qL(OI,$)}var FI=j("ZodISODuration",($,D)=>{wV.init($,D),s$.init($,D)});function kO($){return HL(FI,$)}var TC=($,D)=>{zG.init($,D),$.name="ZodError",Object.defineProperties($,{format:{value:(X)=>HG($,X)},flatten:{value:(X)=>qG($,X)},addIssue:{value:(X)=>{$.issues.push(X),$.message=JSON.stringify($.issues,qJ,2)}},addIssues:{value:(X)=>{$.issues.push(...X),$.message=JSON.stringify($.issues,qJ,2)}},isEmpty:{get(){return $.issues.length===0}}})},vX$=j("ZodError",TC),R1=j("ZodError",TC,{Parent:Error});var CO=VJ(R1),yO=wJ(R1),gO=LJ(R1),xO=OJ(R1),hO=OW(R1),uO=FW(R1),fO=bW(R1),mO=jW(R1),cO=AW(R1),lO=MW(R1),iO=SW(R1),pO=PW(R1);var V$=j("ZodType",($,D)=>{return q$.init($,D),Object.assign($["~standard"],{jsonSchema:{input:CJ($,"input"),output:CJ($,"output")}}),$.toJSONSchema=pL($,{}),$.def=D,$.type=D.type,Object.defineProperty($,"_def",{value:D}),$.check=(...X)=>{return $.clone(x.mergeDefs(D,{checks:[...D.checks??[],...X.map((G)=>typeof G==="function"?{_zod:{check:G,def:{check:"custom"},onattach:[]}}:G)]}),{parent:!0})},$.with=$.check,$.clone=(X,G)=>q1($,X,G),$.brand=()=>$,$.register=(X,G)=>{return X.add($,G),$},$.parse=(X,G)=>CO($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>gO($,X,G),$.parseAsync=async(X,G)=>yO($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>xO($,X,G),$.spa=$.safeParseAsync,$.encode=(X,G)=>hO($,X,G),$.decode=(X,G)=>uO($,X,G),$.encodeAsync=async(X,G)=>fO($,X,G),$.decodeAsync=async(X,G)=>mO($,X,G),$.safeEncode=(X,G)=>cO($,X,G),$.safeDecode=(X,G)=>lO($,X,G),$.safeEncodeAsync=async(X,G)=>iO($,X,G),$.safeDecodeAsync=async(X,G)=>pO($,X,G),$.refine=(X,G)=>$.check(yF(X,G)),$.superRefine=(X)=>$.check(gF(X)),$.overwrite=(X)=>$.check(F4(X)),$.optional=()=>EG($),$.exactOptional=()=>LF($),$.nullable=()=>ZG($),$.nullish=()=>EG(ZG($)),$.nonoptional=(X)=>MF($,X),$.array=()=>CG($),$.or=(X)=>mI([$,X]),$.and=(X)=>WF($,X),$.transform=(X)=>TG($,lI(X)),$.default=(X)=>bF($,X),$.prefault=(X)=>AF($,X),$.catch=(X)=>_F($,X),$.pipe=(X)=>TG($,X),$.readonly=()=>EF($),$.describe=(X)=>{let G=$.clone();return o6.add(G,{description:X}),G},Object.defineProperty($,"description",{get(){return o6.get($)?.description},configurable:!0}),$.meta=(...X)=>{if(X.length===0)return o6.get($);let G=$.clone();return o6.add(G,X[0]),G},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(X)=>X($),$}),AI=j("_ZodString",($,D)=>{tD.init($,D),V$.init($,D),$._zod.processJSONSchema=(G,J,Y)=>rL($,G,J,Y);let X=$._zod.bag;$.format=X.format??null,$.minLength=X.minimum??null,$.maxLength=X.maximum??null,$.regex=(...G)=>$.check(jJ(...G)),$.includes=(...G)=>$.check(SJ(...G)),$.startsWith=(...G)=>$.check(PJ(...G)),$.endsWith=(...G)=>$.check(_J(...G)),$.min=(...G)=>$.check(B0(...G)),$.max=(...G)=>$.check(sD(...G)),$.length=(...G)=>$.check(eD(...G)),$.nonempty=(...G)=>$.check(B0(1,...G)),$.lowercase=(G)=>$.check(AJ(G)),$.uppercase=(G)=>$.check(MJ(G)),$.trim=()=>$.check(EJ()),$.normalize=(...G)=>$.check(RJ(...G)),$.toLowerCase=()=>$.check(ZJ()),$.toUpperCase=()=>$.check(TJ()),$.slugify=()=>$.check(vJ())}),xJ=j("ZodString",($,D)=>{tD.init($,D),AI.init($,D),$.email=(X)=>$.check(fW(MI,X)),$.url=(X)=>$.check(_G(vG,X)),$.jwt=(X)=>$.check(YI(hI,X)),$.emoji=(X)=>$.check(pW(SI,X)),$.guid=(X)=>$.check(PG(RG,X)),$.uuid=(X)=>$.check(mW(f4,X)),$.uuidv4=(X)=>$.check(cW(f4,X)),$.uuidv6=(X)=>$.check(lW(f4,X)),$.uuidv7=(X)=>$.check(iW(f4,X)),$.nanoid=(X)=>$.check(rW(PI,X)),$.guid=(X)=>$.check(PG(RG,X)),$.cuid=(X)=>$.check(nW(_I,X)),$.cuid2=(X)=>$.check(dW(NI,X)),$.ulid=(X)=>$.check(oW(RI,X)),$.base64=(X)=>$.check(XI(yI,X)),$.base64url=(X)=>$.check(JI(gI,X)),$.xid=(X)=>$.check(tW(EI,X)),$.ksuid=(X)=>$.check(aW(ZI,X)),$.ipv4=(X)=>$.check(sW(TI,X)),$.ipv6=(X)=>$.check(eW(vI,X)),$.cidrv4=(X)=>$.check($I(kI,X)),$.cidrv6=(X)=>$.check(DI(CI,X)),$.e164=(X)=>$.check(GI(xI,X)),$.datetime=(X)=>$.check(ZO(X)),$.date=(X)=>$.check(TO(X)),$.time=(X)=>$.check(vO(X)),$.duration=(X)=>$.check(kO(X))});function bI($){return QL(xJ,$)}var s$=j("ZodStringFormat",($,D)=>{a$.init($,D),AI.init($,D)}),MI=j("ZodEmail",($,D)=>{GV.init($,D),s$.init($,D)});function vC($){return fW(MI,$)}var RG=j("ZodGUID",($,D)=>{XV.init($,D),s$.init($,D)});function kC($){return PG(RG,$)}var f4=j("ZodUUID",($,D)=>{JV.init($,D),s$.init($,D)});function CC($){return mW(f4,$)}function yC($){return cW(f4,$)}function gC($){return lW(f4,$)}function xC($){return iW(f4,$)}var vG=j("ZodURL",($,D)=>{YV.init($,D),s$.init($,D)});function hC($){return _G(vG,$)}function uC($){return _G(vG,{protocol:/^https?$/,hostname:$4.domain,...x.normalizeParams($)})}var SI=j("ZodEmoji",($,D)=>{QV.init($,D),s$.init($,D)});function fC($){return pW(SI,$)}var PI=j("ZodNanoID",($,D)=>{WV.init($,D),s$.init($,D)});function mC($){return rW(PI,$)}var _I=j("ZodCUID",($,D)=>{IV.init($,D),s$.init($,D)});function cC($){return nW(_I,$)}var NI=j("ZodCUID2",($,D)=>{UV.init($,D),s$.init($,D)});function lC($){return dW(NI,$)}var RI=j("ZodULID",($,D)=>{BV.init($,D),s$.init($,D)});function iC($){return oW(RI,$)}var EI=j("ZodXID",($,D)=>{zV.init($,D),s$.init($,D)});function pC($){return tW(EI,$)}var ZI=j("ZodKSUID",($,D)=>{qV.init($,D),s$.init($,D)});function rC($){return aW(ZI,$)}var TI=j("ZodIPv4",($,D)=>{LV.init($,D),s$.init($,D)});function nC($){return sW(TI,$)}var rO=j("ZodMAC",($,D)=>{FV.init($,D),s$.init($,D)});function dC($){return IL(rO,$)}var vI=j("ZodIPv6",($,D)=>{OV.init($,D),s$.init($,D)});function oC($){return eW(vI,$)}var kI=j("ZodCIDRv4",($,D)=>{bV.init($,D),s$.init($,D)});function tC($){return $I(kI,$)}var CI=j("ZodCIDRv6",($,D)=>{jV.init($,D),s$.init($,D)});function aC($){return DI(CI,$)}var yI=j("ZodBase64",($,D)=>{MV.init($,D),s$.init($,D)});function sC($){return XI(yI,$)}var gI=j("ZodBase64URL",($,D)=>{SV.init($,D),s$.init($,D)});function eC($){return JI(gI,$)}var xI=j("ZodE164",($,D)=>{PV.init($,D),s$.init($,D)});function $y($){return GI(xI,$)}var hI=j("ZodJWT",($,D)=>{_V.init($,D),s$.init($,D)});function Dy($){return YI(hI,$)}var hJ=j("ZodCustomStringFormat",($,D)=>{NV.init($,D),s$.init($,D)});function Xy($,D,X={}){return kJ(hJ,$,D,X)}function Jy($){return kJ(hJ,"hostname",$4.hostname,$)}function Gy($){return kJ(hJ,"hex",$4.hex,$)}function Yy($,D){let X=D?.enc??"hex",G=`${$}_${X}`,J=$4[G];if(!J)throw Error(`Unrecognized hash format: ${G}`);return kJ(hJ,G,J,D)}var uJ=j("ZodNumber",($,D)=>{yW.init($,D),V$.init($,D),$._zod.processJSONSchema=(G,J,Y)=>nL($,G,J,Y),$.gt=(G,J)=>$.check(h4(G,J)),$.gte=(G,J)=>$.check(H1(G,J)),$.min=(G,J)=>$.check(H1(G,J)),$.lt=(G,J)=>$.check(x4(G,J)),$.lte=(G,J)=>$.check(f1(G,J)),$.max=(G,J)=>$.check(f1(G,J)),$.int=(G)=>$.check(jI(G)),$.safe=(G)=>$.check(jI(G)),$.positive=(G)=>$.check(h4(0,G)),$.nonnegative=(G)=>$.check(H1(0,G)),$.negative=(G)=>$.check(x4(0,G)),$.nonpositive=(G)=>$.check(f1(0,G)),$.multipleOf=(G,J)=>$.check(XD(G,J)),$.step=(G,J)=>$.check(XD(G,J)),$.finite=()=>$;let X=$._zod.bag;$.minValue=Math.max(X.minimum??Number.NEGATIVE_INFINITY,X.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(X.maximum??Number.POSITIVE_INFINITY,X.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(X.format??"").includes("int")||Number.isSafeInteger(X.multipleOf??0.5),$.isFinite=!0,$.format=X.format??null});function nO($){return KL(uJ,$)}var DX=j("ZodNumberFormat",($,D)=>{RV.init($,D),uJ.init($,D)});function jI($){return wL(DX,$)}function Qy($){return LL(DX,$)}function Wy($){return OL(DX,$)}function Iy($){return FL(DX,$)}function Uy($){return bL(DX,$)}var fJ=j("ZodBoolean",($,D)=>{LG.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>dL($,X,G,J)});function dO($){return jL(fJ,$)}var mJ=j("ZodBigInt",($,D)=>{gW.init($,D),V$.init($,D),$._zod.processJSONSchema=(G,J,Y)=>oL($,G,J,Y),$.gte=(G,J)=>$.check(H1(G,J)),$.min=(G,J)=>$.check(H1(G,J)),$.gt=(G,J)=>$.check(h4(G,J)),$.gte=(G,J)=>$.check(H1(G,J)),$.min=(G,J)=>$.check(H1(G,J)),$.lt=(G,J)=>$.check(x4(G,J)),$.lte=(G,J)=>$.check(f1(G,J)),$.max=(G,J)=>$.check(f1(G,J)),$.positive=(G)=>$.check(h4(BigInt(0),G)),$.negative=(G)=>$.check(x4(BigInt(0),G)),$.nonpositive=(G)=>$.check(f1(BigInt(0),G)),$.nonnegative=(G)=>$.check(H1(BigInt(0),G)),$.multipleOf=(G,J)=>$.check(XD(G,J));let X=$._zod.bag;$.minValue=X.minimum??null,$.maxValue=X.maximum??null,$.format=X.format??null});function By($){return ML(mJ,$)}var uI=j("ZodBigIntFormat",($,D)=>{EV.init($,D),mJ.init($,D)});function zy($){return PL(uI,$)}function qy($){return _L(uI,$)}var oO=j("ZodSymbol",($,D)=>{ZV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>tL($,X,G,J)});function Hy($){return NL(oO,$)}var tO=j("ZodUndefined",($,D)=>{TV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>sL($,X,G,J)});function Ky($){return RL(tO,$)}var aO=j("ZodNull",($,D)=>{vV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>aL($,X,G,J)});function sO($){return EL(aO,$)}var eO=j("ZodAny",($,D)=>{kV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>DO($,X,G,J)});function Vy(){return ZL(eO)}var $F=j("ZodUnknown",($,D)=>{CV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>XO($,X,G,J)});function $X(){return TL($F)}var DF=j("ZodNever",($,D)=>{yV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>$O($,X,G,J)});function fI($){return vL(DF,$)}var XF=j("ZodVoid",($,D)=>{gV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>eL($,X,G,J)});function wy($){return kL(XF,$)}var kG=j("ZodDate",($,D)=>{xV.init($,D),V$.init($,D),$._zod.processJSONSchema=(G,J,Y)=>JO($,G,J,Y),$.min=(G,J)=>$.check(H1(G,J)),$.max=(G,J)=>$.check(f1(G,J));let X=$._zod.bag;$.minDate=X.minimum?new Date(X.minimum):null,$.maxDate=X.maximum?new Date(X.maximum):null});function Ly($){return CL(kG,$)}var JF=j("ZodArray",($,D)=>{hV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>VO($,X,G,J),$.element=D.element,$.min=(X,G)=>$.check(B0(X,G)),$.nonempty=(X)=>$.check(B0(1,X)),$.max=(X,G)=>$.check(sD(X,G)),$.length=(X,G)=>$.check(eD(X,G)),$.unwrap=()=>$.element});function CG($,D){return xL(JF,$,D)}function Oy($){let D=$._zod.def.shape;return cI(Object.keys(D))}var yG=j("ZodObject",($,D)=>{uV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>wO($,X,G,J),x.defineLazy($,"shape",()=>{return D.shape}),$.keyof=()=>cI(Object.keys($._zod.def.shape)),$.catchall=(X)=>$.clone({...$._zod.def,catchall:X}),$.passthrough=()=>$.clone({...$._zod.def,catchall:$X()}),$.loose=()=>$.clone({...$._zod.def,catchall:$X()}),$.strict=()=>$.clone({...$._zod.def,catchall:fI()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(X)=>{return x.extend($,X)},$.safeExtend=(X)=>{return x.safeExtend($,X)},$.merge=(X)=>x.merge($,X),$.pick=(X)=>x.pick($,X),$.omit=(X)=>x.omit($,X),$.partial=(...X)=>x.partial(iI,$,X[0]),$.required=(...X)=>x.required(pI,$,X[0])});function Fy($,D){let X={type:"object",shape:$??{},...x.normalizeParams(D)};return new yG(X)}function by($,D){return new yG({type:"object",shape:$,catchall:fI(),...x.normalizeParams(D)})}function jy($,D){return new yG({type:"object",shape:$,catchall:$X(),...x.normalizeParams(D)})}var gG=j("ZodUnion",($,D)=>{OG.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>qI($,X,G,J),$.options=D.options});function mI($,D){return new gG({type:"union",options:$,...x.normalizeParams(D)})}var GF=j("ZodXor",($,D)=>{gG.init($,D),fV.init($,D),$._zod.processJSONSchema=(X,G,J)=>qI($,X,G,J),$.options=D.options});function Ay($,D){return new GF({type:"union",options:$,inclusive:!1,...x.normalizeParams(D)})}var YF=j("ZodDiscriminatedUnion",($,D)=>{gG.init($,D),mV.init($,D)});function My($,D,X){return new YF({type:"union",options:D,discriminator:$,...x.normalizeParams(X)})}var QF=j("ZodIntersection",($,D)=>{cV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>LO($,X,G,J)});function WF($,D){return new QF({type:"intersection",left:$,right:D})}var IF=j("ZodTuple",($,D)=>{xW.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>OO($,X,G,J),$.rest=(X)=>$.clone({...$._zod.def,rest:X})});function UF($,D,X){let G=D instanceof q$,J=G?X:D;return new IF({type:"tuple",items:$,rest:G?D:null,...x.normalizeParams(J)})}var xG=j("ZodRecord",($,D)=>{lV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>FO($,X,G,J),$.keyType=D.keyType,$.valueType=D.valueType});function BF($,D,X){return new xG({type:"record",keyType:$,valueType:D,...x.normalizeParams(X)})}function Sy($,D,X){let G=q1($);return G._zod.values=void 0,new xG({type:"record",keyType:G,valueType:D,...x.normalizeParams(X)})}function Py($,D,X){return new xG({type:"record",keyType:$,valueType:D,mode:"loose",...x.normalizeParams(X)})}var zF=j("ZodMap",($,D)=>{iV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>HO($,X,G,J),$.keyType=D.keyType,$.valueType=D.valueType,$.min=(...X)=>$.check(u4(...X)),$.nonempty=(X)=>$.check(u4(1,X)),$.max=(...X)=>$.check(JD(...X)),$.size=(...X)=>$.check(aD(...X))});function _y($,D,X){return new zF({type:"map",keyType:$,valueType:D,...x.normalizeParams(X)})}var qF=j("ZodSet",($,D)=>{pV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>KO($,X,G,J),$.min=(...X)=>$.check(u4(...X)),$.nonempty=(X)=>$.check(u4(1,X)),$.max=(...X)=>$.check(JD(...X)),$.size=(...X)=>$.check(aD(...X))});function Ny($,D){return new qF({type:"set",valueType:$,...x.normalizeParams(D)})}var gJ=j("ZodEnum",($,D)=>{rV.init($,D),V$.init($,D),$._zod.processJSONSchema=(G,J,Y)=>GO($,G,J,Y),$.enum=D.entries,$.options=Object.values(D.entries);let X=new Set(Object.keys(D.entries));$.extract=(G,J)=>{let Y={};for(let Q of G)if(X.has(Q))Y[Q]=D.entries[Q];else throw Error(`Key ${Q} not found in enum`);return new gJ({...D,checks:[],...x.normalizeParams(J),entries:Y})},$.exclude=(G,J)=>{let Y={...D.entries};for(let Q of G)if(X.has(Q))delete Y[Q];else throw Error(`Key ${Q} not found in enum`);return new gJ({...D,checks:[],...x.normalizeParams(J),entries:Y})}});function cI($,D){let X=Array.isArray($)?Object.fromEntries($.map((G)=>[G,G])):$;return new gJ({type:"enum",entries:X,...x.normalizeParams(D)})}function Ry($,D){return new gJ({type:"enum",entries:$,...x.normalizeParams(D)})}var HF=j("ZodLiteral",($,D)=>{nV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>YO($,X,G,J),$.values=new Set(D.values),Object.defineProperty($,"value",{get(){if(D.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return D.values[0]}})});function Ey($,D){return new HF({type:"literal",values:Array.isArray($)?$:[$],...x.normalizeParams(D)})}var KF=j("ZodFile",($,D)=>{dV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>IO($,X,G,J),$.min=(X,G)=>$.check(u4(X,G)),$.max=(X,G)=>$.check(JD(X,G)),$.mime=(X,G)=>$.check(NJ(Array.isArray(X)?X:[X],G))});function Zy($){return hL(KF,$)}var VF=j("ZodTransform",($,D)=>{oV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>qO($,X,G,J),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new nD($.constructor.name);X.addIssue=(Y)=>{if(typeof Y==="string")X.issues.push(x.issue(Y,X.value,D));else{let Q=Y;if(Q.fatal)Q.continue=!1;Q.code??(Q.code="custom"),Q.input??(Q.input=X.value),Q.inst??(Q.inst=$),X.issues.push(x.issue(Q))}};let J=D.transform(X.value,X);if(J instanceof Promise)return J.then((Y)=>{return X.value=Y,X});return X.value=J,X}});function lI($){return new VF({type:"transform",transform:$})}var iI=j("ZodOptional",($,D)=>{hW.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>HI($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function EG($){return new iI({type:"optional",innerType:$})}var wF=j("ZodExactOptional",($,D)=>{tV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>HI($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function LF($){return new wF({type:"optional",innerType:$})}var OF=j("ZodNullable",($,D)=>{aV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>bO($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function ZG($){return new OF({type:"nullable",innerType:$})}function Ty($){return EG(ZG($))}var FF=j("ZodDefault",($,D)=>{sV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>AO($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function bF($,D){return new FF({type:"default",innerType:$,get defaultValue(){return typeof D==="function"?D():x.shallowClone(D)}})}var jF=j("ZodPrefault",($,D)=>{eV.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>MO($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function AF($,D){return new jF({type:"prefault",innerType:$,get defaultValue(){return typeof D==="function"?D():x.shallowClone(D)}})}var pI=j("ZodNonOptional",($,D)=>{$w.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>jO($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function MF($,D){return new pI({type:"nonoptional",innerType:$,...x.normalizeParams(D)})}var SF=j("ZodSuccess",($,D)=>{Dw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>UO($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function vy($){return new SF({type:"success",innerType:$})}var PF=j("ZodCatch",($,D)=>{Xw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>SO($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function _F($,D){return new PF({type:"catch",innerType:$,catchValue:typeof D==="function"?D:()=>D})}var NF=j("ZodNaN",($,D)=>{Jw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>QO($,X,G,J)});function ky($){return gL(NF,$)}var rI=j("ZodPipe",($,D)=>{Gw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>PO($,X,G,J),$.in=D.in,$.out=D.out});function TG($,D){return new rI({type:"pipe",in:$,out:D})}var nI=j("ZodCodec",($,D)=>{rI.init($,D),FG.init($,D)});function Cy($,D,X){return new nI({type:"pipe",in:$,out:D,transform:X.decode,reverseTransform:X.encode})}var RF=j("ZodReadonly",($,D)=>{Yw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>_O($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function EF($){return new RF({type:"readonly",innerType:$})}var ZF=j("ZodTemplateLiteral",($,D)=>{Qw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>WO($,X,G,J)});function yy($,D){return new ZF({type:"template_literal",parts:$,...x.normalizeParams(D)})}var TF=j("ZodLazy",($,D)=>{Uw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>RO($,X,G,J),$.unwrap=()=>$._zod.def.getter()});function vF($){return new TF({type:"lazy",getter:$})}var kF=j("ZodPromise",($,D)=>{Iw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>NO($,X,G,J),$.unwrap=()=>$._zod.def.innerType});function gy($){return new kF({type:"promise",innerType:$})}var CF=j("ZodFunction",($,D)=>{Ww.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>zO($,X,G,J)});function xy($){return new CF({type:"function",input:Array.isArray($?.input)?UF($?.input):$?.input??CG($X()),output:$?.output??$X()})}var hG=j("ZodCustom",($,D)=>{Bw.init($,D),V$.init($,D),$._zod.processJSONSchema=(X,G,J)=>BO($,X,G,J)});function hy($){let D=new G6({check:"custom"});return D._zod.check=$,D}function uy($,D){return uL(hG,$??(()=>!0),D)}function yF($,D={}){return fL(hG,$,D)}function gF($){return mL($)}var fy=cL,my=lL;function cy($,D={}){let X=new hG({type:"custom",check:"custom",fn:(G)=>G instanceof $,abort:!0,...x.normalizeParams(D)});return X._zod.bag.Class=$,X._zod.check=(G)=>{if(!(G.value instanceof $))G.issues.push({code:"invalid_type",expected:$.name,input:G.value,inst:X,path:[...X._zod.def.path??[]]})},X}var ly=(...$)=>iL({Codec:nI,Boolean:fJ,String:xJ},...$);function iy($){let D=vF(()=>{return mI([bI($),nO(),dO(),sO(),CG(D),BF(bI(),D)])});return D}function py($,D){return TG(lI($),D)}var CX$={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function yX$($){E6({customError:$})}function gX$(){return E6().customError}var xF;(function($){})(xF||(xF={}));var i={...NG,...VI,iso:yJ},xX$=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function hX$($,D){let X=$.$schema;if(X==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(X==="http://json-schema.org/draft-07/schema#")return"draft-7";if(X==="http://json-schema.org/draft-04/schema#")return"draft-4";return D??"draft-2020-12"}function uX$($,D){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let X=$.slice(1).split("/").filter(Boolean);if(X.length===0)return D.rootSchema;let G=D.version==="draft-2020-12"?"$defs":"definitions";if(X[0]===G){let J=X[1];if(!J||!D.defs[J])throw Error(`Reference not found: ${$}`);return D.defs[J]}throw Error(`Reference not found: ${$}`)}function ry($,D){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return i.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let J=$.$ref;if(D.refs.has(J))return D.refs.get(J);if(D.processing.has(J))return i.lazy(()=>{if(!D.refs.has(J))throw Error(`Circular reference not resolved: ${J}`);return D.refs.get(J)});D.processing.add(J);let Y=uX$(J,D),Q=G1(Y,D);return D.refs.set(J,Q),D.processing.delete(J),Q}if($.enum!==void 0){let J=$.enum;if(D.version==="openapi-3.0"&&$.nullable===!0&&J.length===1&&J[0]===null)return i.null();if(J.length===0)return i.never();if(J.length===1)return i.literal(J[0]);if(J.every((Q)=>typeof Q==="string"))return i.enum(J);let Y=J.map((Q)=>i.literal(Q));if(Y.length<2)return Y[0];return i.union([Y[0],Y[1],...Y.slice(2)])}if($.const!==void 0)return i.literal($.const);let X=$.type;if(Array.isArray(X)){let J=X.map((Y)=>{let Q={...$,type:Y};return ry(Q,D)});if(J.length===0)return i.never();if(J.length===1)return J[0];return i.union(J)}if(!X)return i.any();let G;switch(X){case"string":{let J=i.string();if($.format){let Y=$.format;if(Y==="email")J=J.check(i.email());else if(Y==="uri"||Y==="uri-reference")J=J.check(i.url());else if(Y==="uuid"||Y==="guid")J=J.check(i.uuid());else if(Y==="date-time")J=J.check(i.iso.datetime());else if(Y==="date")J=J.check(i.iso.date());else if(Y==="time")J=J.check(i.iso.time());else if(Y==="duration")J=J.check(i.iso.duration());else if(Y==="ipv4")J=J.check(i.ipv4());else if(Y==="ipv6")J=J.check(i.ipv6());else if(Y==="mac")J=J.check(i.mac());else if(Y==="cidr")J=J.check(i.cidrv4());else if(Y==="cidr-v6")J=J.check(i.cidrv6());else if(Y==="base64")J=J.check(i.base64());else if(Y==="base64url")J=J.check(i.base64url());else if(Y==="e164")J=J.check(i.e164());else if(Y==="jwt")J=J.check(i.jwt());else if(Y==="emoji")J=J.check(i.emoji());else if(Y==="nanoid")J=J.check(i.nanoid());else if(Y==="cuid")J=J.check(i.cuid());else if(Y==="cuid2")J=J.check(i.cuid2());else if(Y==="ulid")J=J.check(i.ulid());else if(Y==="xid")J=J.check(i.xid());else if(Y==="ksuid")J=J.check(i.ksuid())}if(typeof $.minLength==="number")J=J.min($.minLength);if(typeof $.maxLength==="number")J=J.max($.maxLength);if($.pattern)J=J.regex(new RegExp($.pattern));G=J;break}case"number":case"integer":{let J=X==="integer"?i.number().int():i.number();if(typeof $.minimum==="number")J=J.min($.minimum);if(typeof $.maximum==="number")J=J.max($.maximum);if(typeof $.exclusiveMinimum==="number")J=J.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")J=J.gt($.minimum);if(typeof $.exclusiveMaximum==="number")J=J.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")J=J.lt($.maximum);if(typeof $.multipleOf==="number")J=J.multipleOf($.multipleOf);G=J;break}case"boolean":{G=i.boolean();break}case"null":{G=i.null();break}case"object":{let J={},Y=$.properties||{},Q=new Set($.required||[]);for(let[I,U]of Object.entries(Y)){let B=G1(U,D);J[I]=Q.has(I)?B:B.optional()}if($.propertyNames){let I=G1($.propertyNames,D),U=$.additionalProperties&&typeof $.additionalProperties==="object"?G1($.additionalProperties,D):i.any();if(Object.keys(J).length===0){G=i.record(I,U);break}let B=i.object(J).passthrough(),H=i.looseRecord(I,U);G=i.intersection(B,H);break}if($.patternProperties){let I=$.patternProperties,U=Object.keys(I),B=[];for(let V of U){let z=G1(I[V],D),L=i.string().regex(new RegExp(V));B.push(i.looseRecord(L,z))}let H=[];if(Object.keys(J).length>0)H.push(i.object(J).passthrough());if(H.push(...B),H.length===0)G=i.object({}).passthrough();else if(H.length===1)G=H[0];else{let V=i.intersection(H[0],H[1]);for(let z=2;z<H.length;z++)V=i.intersection(V,H[z]);G=V}break}let W=i.object(J);if($.additionalProperties===!1)G=W.strict();else if(typeof $.additionalProperties==="object")G=W.catchall(G1($.additionalProperties,D));else G=W.passthrough();break}case"array":{let{prefixItems:J,items:Y}=$;if(J&&Array.isArray(J)){let Q=J.map((I)=>G1(I,D)),W=Y&&typeof Y==="object"&&!Array.isArray(Y)?G1(Y,D):void 0;if(W)G=i.tuple(Q).rest(W);else G=i.tuple(Q);if(typeof $.minItems==="number")G=G.check(i.minLength($.minItems));if(typeof $.maxItems==="number")G=G.check(i.maxLength($.maxItems))}else if(Array.isArray(Y)){let Q=Y.map((I)=>G1(I,D)),W=$.additionalItems&&typeof $.additionalItems==="object"?G1($.additionalItems,D):void 0;if(W)G=i.tuple(Q).rest(W);else G=i.tuple(Q);if(typeof $.minItems==="number")G=G.check(i.minLength($.minItems));if(typeof $.maxItems==="number")G=G.check(i.maxLength($.maxItems))}else if(Y!==void 0){let Q=G1(Y,D),W=i.array(Q);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);G=W}else G=i.array(i.any());break}default:throw Error(`Unsupported type: ${X}`)}if($.description)G=G.describe($.description);if($.default!==void 0)G=G.default($.default);return G}function G1($,D){if(typeof $==="boolean")return $?i.any():i.never();let X=ry($,D),G=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let W=$.anyOf.map((U)=>G1(U,D)),I=i.union(W);X=G?i.intersection(X,I):I}if($.oneOf&&Array.isArray($.oneOf)){let W=$.oneOf.map((U)=>G1(U,D)),I=i.xor(W);X=G?i.intersection(X,I):I}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)X=G?X:i.any();else{let W=G?X:G1($.allOf[0],D),I=G?0:1;for(let U=I;U<$.allOf.length;U++)W=i.intersection(W,G1($.allOf[U],D));X=W}if($.nullable===!0&&D.version==="openapi-3.0")X=i.nullable(X);if($.readOnly===!0)X=i.readonly(X);let J={},Y=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let W of Y)if(W in $)J[W]=$[W];let Q=["contentEncoding","contentMediaType","contentSchema"];for(let W of Q)if(W in $)J[W]=$[W];for(let W of Object.keys($))if(!xX$.has(W))J[W]=$[W];if(Object.keys(J).length>0)D.registry.add(X,J);return X}function ny($,D){if(typeof $==="boolean")return $?i.any():i.never();let X=hX$($,D?.defaultTarget),G=$.$defs||$.definitions||{},J={version:X,defs:G,refs:new Map,processing:new Set,rootSchema:$,registry:D?.registry??o6};return G1($,J)}var hF={};X4(hF,{string:()=>fX$,number:()=>mX$,date:()=>iX$,boolean:()=>cX$,bigint:()=>lX$});function fX$($){return WL(xJ,$)}function mX$($){return VL(uJ,$)}function cX$($){return AL(fJ,$)}function lX$($){return SL(mJ,$)}function iX$($){return yL(kG,$)}E6(bG());function pX$($){let D=$.actions.map((J)=>J.name),X=[];if($.description)X.push($.description);else X.push(`${$.display??$.name} 管理`);X.push(`支持操作: ${D.join(", ")}`);let G=$.actions.find((J)=>J.type==="list");if(G?.pathParams&&"scope"in G.pathParams){let J=G.pathParams.scope;if(typeof J==="object"&&J.options){let Y=J.options.map((Q)=>`--${String(Q.value).replace(/s$/,"")}`);X.push(`列表范围参数: ${Y.join(", ")}`)}else X.push("列表范围参数: --product, --project, --execution")}return X.join("。")}function rX$($){let D=$.actions.map((X)=>X.name);return[D[0],...D.slice(1)]}function nX$($){let D=rX$($);return{action:b6.enum(D).describe("要执行的操作。"+$.actions.map((X)=>`${X.name}: ${X.display??X.name}`).join("; ")),id:b6.number().optional().describe("对象 ID(get/update/delete 及扩展操作必填)"),product:b6.number().optional().describe("产品 ID(范围参数)"),project:b6.number().optional().describe("项目 ID(范围参数)"),execution:b6.number().optional().describe("执行 ID(范围参数)"),params:b6.record(b6.string(),b6.unknown()).optional().describe("API 参数键值对,用于传递操作所需字段(如 title, severity 等)"),pick:b6.string().optional().describe("摘取字段(逗号分隔)"),filter:b6.array(b6.string()).optional().describe("过滤条件(如 status:active, severity<=2)"),sort:b6.string().optional().describe("排序(如 pri_asc, severity_desc)"),search:b6.array(b6.string()).optional().describe("搜索关键词"),searchFields:b6.string().optional().describe("搜索字段(逗号分隔),配合 search 使用"),page:b6.number().optional().describe("页码"),recPerPage:b6.number().optional().describe("每页条数"),all:b6.boolean().optional().describe("获取全部数据(自动翻页)"),limit:b6.number().optional().describe("限制返回数量")}}async function dX$($){let D=await $.getClient(),X=W6(),G=X?.account,Y=(await D.get("/users",{query:{browseType:"inside",recPerPage:100}})).users,Q=Array.isArray(Y)?Y:[],W=G?Q.find((I)=>String(I.account??"")===G):void 0;return{content:[{type:"text",text:JSON.stringify(W??X?.user??{},null,2)}]}}async function oX$($,D){if(!wY($.profileKey))throw new c("E1007");D.resetClient(),await D.getClient();let G=W6(),J=G?p6(G.account,G.server):$.profileKey;return{content:[{type:"text",text:JSON.stringify({status:"success",currentProfile:J},null,2)}]}}async function tX$($,D,X){let G=await X.getClient(),J=W6(),Y=J?Z0(J):g9,Q=D.action,W={id:D.id!=null?String(D.id):void 0,product:D.product!=null?String(D.product):void 0,project:D.project!=null?String(D.project):void 0,execution:D.execution!=null?String(D.execution):void 0,params:D.params?JSON.stringify(D.params):void 0,pick:D.pick,filter:D.filter,sort:D.sort,search:D.search,searchFields:D.searchFields,page:D.page!=null?String(D.page):void 0,recPerPage:D.recPerPage!=null?String(D.recPerPage):void 0,all:D.all,limit:D.limit!=null?String(D.limit):void 0,format:"json",yes:!0},I=await e3(G,$,Q,[],W,Y);if(I.action.type==="list"){let U={data:I.data};if(I.pager)U.pager=I.pager;return{content:[{type:"text",text:JSON.stringify(U,null,2)}]}}if(I.action.type==="get")return{content:[{type:"text",text:JSON.stringify(I.data,null,2)}]};return{content:[{type:"text",text:JSON.stringify(I.data??I.rawResponse,null,2)}]}}function aX$($){let D=$.every((G)=>G.type==="list"||G.type==="get"),X=$.some((G)=>G.type==="delete");return{readOnlyHint:D,destructiveHint:X,openWorldHint:!0}}function dy($,D){$.tool("zentao_profile","获取当前登录禅道账号信息",{},{readOnlyHint:!0,destructiveHint:!1,openWorldHint:!0},async()=>{try{return await dX$(D)}catch(X){if(X instanceof c)return{isError:!0,content:[{type:"text",text:`E${X.code}: ${X.message}`}]};return{isError:!0,content:[{type:"text",text:X.message??String(X)}]}}}),$.tool("zentao_switch_profile","切换当前登录账号(等价于 switch-profile)",{profileKey:b6.string().describe("目标用户配置标识,支持 account@server、account 或 account@hostname")},{readOnlyHint:!1,destructiveHint:!1,openWorldHint:!0},async(X)=>{try{return await oX$(X,D)}catch(G){if(G instanceof c)return{isError:!0,content:[{type:"text",text:`E${G.code}: ${G.message}`}]};return{isError:!0,content:[{type:"text",text:G.message??String(G)}]}}});for(let X of Ij()){let G=`zentao_${X.name}`,J=pX$(X),Y=nX$(X),Q=aX$(X.actions);$.tool(G,J,Y,Q,async(W)=>{try{return await tX$(X,W,D)}catch(I){if(I instanceof c)return{isError:!0,content:[{type:"text",text:`E${I.code}: ${I.message}`}]};return{isError:!0,content:[{type:"text",text:I.message??String(I)}]}}})}}function sX$($){let D=null;return{async getClient(){if(D)return D;return D=(await CX($)).client,D},resetClient(){D=null}}}async function uF($){let D=new i5({name:"zentao-cli",version:U4()},{capabilities:{tools:{}}}),X=sX$($);dy(D,X);let G=new r5;await D.connect(G)}function oy($){$.command("mcp").description("启动 MCP (Model Context Protocol) 服务,供 AI Agents 通过 stdio 访问禅道数据").action(async()=>{let D=$.opts();await uF({insecure:D.insecure,timeout:D.timeout})})}import{createInterface as GJ$}from"node:readline";import{spawnSync as eX$}from"node:child_process";import{fileURLToPath as $J$}from"node:url";var ty="zentao-cli",DJ$=`https://registry.npmjs.org/${ty}`;function XX($){let D=$.trim().replace(/^v/,"").match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(!D)return null;return{major:Number(D[1]),minor:Number(D[2]),patch:Number(D[3]),prerelease:D[4]??""}}function XJ$($,D){let X=$.split("."),G=D.split("."),J=Math.max(X.length,G.length);for(let Y=0;Y<J;Y++){let Q=X[Y],W=G[Y];if(Q===void 0)return-1;if(W===void 0)return 1;let I=/^\d+$/.test(Q),U=/^\d+$/.test(W);if(I&&U){let B=Number(Q),H=Number(W);if(B!==H)return B>H?1:-1}else if(I!==U)return I?-1:1;else if(Q!==W)return Q>W?1:-1}return 0}function dI($,D){for(let X of["major","minor","patch"])if($[X]!==D[X])return $[X]>D[X]?1:-1;if(!$.prerelease&&D.prerelease)return 1;if($.prerelease&&!D.prerelease)return-1;if($.prerelease===D.prerelease)return 0;return XJ$($.prerelease,D.prerelease)}function ay($){let D=XX($);return!!D&&D.prerelease===""}function JJ$($){let D=null,X=null;for(let G of $){let J=XX(G);if(!J||J.prerelease)continue;if(!X||dI(J,X)>0)D=G,X=J}return D}async function fF($){let D;try{D=await fetch(DJ$,{headers:{Accept:"application/json"},signal:$??AbortSignal.timeout(1e4)})}catch(G){throw Error(`无法连接到 npm registry: ${G.message}`)}if(!D.ok)throw Error(`npm registry 返回错误: ${D.status} ${D.statusText}`);let X=await D.json();if(X.versions&&typeof X.versions==="object"&&!Array.isArray(X.versions)){let G=JJ$(Object.keys(X.versions));if(G)return G}if(typeof X.version==="string"&&ay(X.version))return X.version;if(typeof X.version!=="string"&&!X.versions)throw Error("npm registry 返回数据格式异常");throw Error("npm registry 未找到正式版本")}function sy(){let $="";try{$=$J$(import.meta.url)}catch{$=process.argv[1]??""}let D=$.replace(/\\/g,"/");if(/\/\.bun\/|\/bun\/install\//.test(D))return"bun";return"npm"}function mF($,D="latest"){let X=`${ty}@${D}`;if($==="bun")return{cmd:"bun",args:["add","-g",X]};return{cmd:"npm",args:["install","-g",X]}}async function ey($){try{let D=U4();if(D==="unknown"||D==="0.0.0-dev")return null;let X=await fF($),G=XX(D),J=XX(X);if(!G||!J)return null;return{hasUpdate:dI(G,J)<0,current:D,latest:X}}catch{return null}}function $g($){if(!$.hasUpdate)return;if(!ay($.latest))return;if(!process.stderr.isTTY)return;let D="\x1B[0m",X="\x1B[33m",G="\x1B[36m",J="\x1B[2m",Y="\x1B[1m",Q=[`更新提醒:发现新版本 ${J}${$.current}${D} → ${X}${Y}${$.latest}${D}`,`执行 ${G}zentao upgrade${D} 升级到最新版本`];process.stderr.write(`
355
- `+Q.join(`
356
- `)+`
357
-
358
- `)}function Dg($,D="latest"){let{cmd:X,args:G}=mF($,D);return{status:eX$(X,G,{stdio:"inherit",encoding:"utf-8",shell:process.platform==="win32"}).status,cmd:X,args:G}}function YJ$($,D){return new Promise((X)=>{$.question(D,(G)=>X(G))})}async function QJ$($,D){if(!process.stdin.isTTY||!process.stderr.isTTY)console.error("非交互模式下请使用 --yes 跳过确认。"),process.exit(2);let X=GJ$({input:process.stdin,output:process.stderr});try{return(await YJ$(X,`发现新版本 ${$} → ${D},是否立即升级?[y/N] `)).trim().toLowerCase()==="y"}finally{X.close()}}function Xg($){$.command("upgrade").description("检查并升级 CLI 到最新版本").option("-y, --yes","跳过确认,直接升级").action(async(D)=>{let G=!!$.opts().silent;try{let J=U4();if(!G)process.stderr.write(`正在检查最新版本...
359
- `);let Y=await fF(),Q=XX(J),W=XX(Y);if(!Q||!W)throw Error(`版本号格式无法解析: 当前=${J}, 最新=${Y}`);if(dI(Q,W)>=0){console.log(`当前已是最新版本 ${J},无需升级。`);return}if(!(D.yes||await QJ$(J,Y))){console.log("已取消升级。");return}let U=sy(),{cmd:B,args:H}=mF(U,Y);console.log(`
360
- 执行: ${B} ${H.join(" ")}
361
- `);let{status:V}=Dg(U,Y);if(V===0)console.log(`
362
- 升级成功!${J} → ${Y}`);else console.error(`
363
- 升级失败,请手动运行:`),console.error(` ${B} ${H.join(" ")}`),process.exit(1)}catch(J){console.error(String(J.message??J)),process.exit(1)}})}function Jg($){hS($),mS($),cS($),lS($),iS($),dS($),oS($),eS($),DP($),UP($),oy($),HP($),qP($),Xg($)}function WJ$($,D){let X;for(let G=0;G<$.length;G++){let J=$[G];if(J==="--config"){X=$[G+1];break}if(J.startsWith("--config=")){X=J.slice(9);break}}if(!X){let G=D.ZENTAO_CONFIG_FILE;if(G&&G.trim()!=="")X=G}if(X&&X.trim()!=="")NS(X)}WJ$(process.argv.slice(2),process.env);pM();function IJ$($){if(!$.includes("--version"))return!1;let D=U4(),X;for(let G=0;G<$.length;G++){if($[G]==="--format"&&G+1<$.length){X=$[G+1];break}if($[G].startsWith("--format=")){X=$[G].slice(9);break}}if(X==="json"||X==="raw"){let G={cli:`zentao-cli ${D}`},J=W6();if(J)G.server=J.server;console.log(JSON.stringify(G,null,4))}else{console.log(`Zentao CLI: ${D}`);let G=W6();if(G)console.log(`Zentao Server: ${G.serverConfig?.version?G.serverConfig.version.toUpperCase():"Unknown"} (${G.server})`)}process.exit(0)}IJ$(process.argv.slice(2));var WD=new _b;function Gg($){return $.replace(/^Usage:/gm,"用法:").replace(/^Options:/gm,"选项:").replace(/^Commands:/gm,"命令:").replace(/display help for command/g,"显示命令帮助")}WD.configureOutput({writeOut:($)=>process.stdout.write(Gg($)),writeErr:($)=>process.stderr.write(Gg($))});WD.name("zentao").description("禅道命令行工具,支持在你喜爱的终端里访问和操作禅道数据").version(U4(),"-V, --version-flag","显示版本号").helpOption("-h, --help","显示命令帮助").option("--format <format>","输出格式 (markdown|json|raw)").option("--silent","静默模式").option("--insecure","跳过 SSL/TLS 证书验证").option("--timeout <ms>","请求超时时间(毫秒)",parseInt).option("--config <config_file>","指定自定义配置文件路径(亦可通过 ZENTAO_CONFIG_FILE 环境变量设置)").option("--machine-readable","启用机器可读模式,简化格式,禁用颜色输出");Jg(WD);WD.addHelpText("after",()=>{try{if(LY().length===0)return`
364
- 提示:尚未登录禅道服务,请先执行以下命令登录:
365
-
366
- zentao login -s <zentao_url> -u <account> -p <password>
367
- `}catch{}return""});WD.exitOverride(($)=>{if($.code==="commander.executeSubCommandAsync")return;let D=$ instanceof Pb&&$.code==="commander.help"&&$.exitCode===1?0:$.exitCode;process.exit(D)});var UJ$=new Set(["upgrade","version","mcp","autocomplete","completion","help","-h","--help","-V","--version-flag"]);function BJ$($){for(let D=0;D<$.length;D++){let X=$[D];if(!X.startsWith("-"))return X;if(X==="--format"||X==="--timeout"||X==="--config")D++}return}var zJ$=86400000,qJ$=3600000,Yg=BJ$(process.argv.slice(2)),HJ$=!Yg||!UJ$.has(Yg),cF=null,cJ=null;if(HJ$){let $=ZS(),D=Date.now(),X=$?.lastCheck?new Date($.lastCheck).getTime():0,J=$?.latestVersion===""?qJ$:zJ$;if(D-X>J)cJ=new AbortController,cF=ey(cJ.signal)}function KJ$(){let $=WD.opts();if($.silent)return!1;if($.machineReadable)return!1;if($.format==="json"||$.format==="raw")return!1;if(!process.stderr.isTTY)return!1;return!0}async function VJ$($,D,X){let G,J=new Promise((Y)=>{G=setTimeout(()=>{X(),Y(null)},D),G.unref?.()});try{return await Promise.race([$,J])}finally{if(G)clearTimeout(G)}}WD.parseAsync(process.argv).then(async()=>{if(!cF||!cJ)return;if(!KJ$()){cJ.abort();return}let $=cJ,D=await VJ$(cF,3000,()=>$.abort());try{TS({lastCheck:new Date().toISOString(),latestVersion:D?.latest??""})}catch{}if(D)$g(D)}).catch(($)=>{if(cJ?.abort(),$ instanceof c)console.error(u6($,WD.opts().format??"markdown")),process.exit(1);console.error($.message??$),process.exit(1)});
483
+ complete -c ${$} -n "__fish_seen_subcommand_from config" -a "${z0.join(" ")}"
484
+ complete -c ${$} -n "__fish_seen_subcommand_from autocomplete" -a "bash zsh fish"
485
+ complete -c ${$} -n "__fish_seen_subcommand_from add-skill" -a "${[...p,"all"].join(" ")}"
486
+ complete -c ${$} -n "__fish_seen_subcommand_from add-skill" -s o -l output -r -d "将所有内置技能导出到指定目录"
487
+ complete -c ${$} -n "__fish_seen_subcommand_from add-mcp" -a "${[...m,"all"].join(" ")}"
488
+ complete -c ${$} -n "__fish_seen_subcommand_from ls get create update delete do; and test (count (commandline -opc)) -eq 2" -a "$__${$}_mods"
489
+ `}function Q2(T,$){switch(T){case"bash":return T2($);case"zsh":return $2($);case"fish":return Y2($);default:throw Error(`不支持的 shell: ${T}`)}}function X2(T){return o5(h9(r0()),`.zentao-completion.${T}`)}async function J2(){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error("未提供 shell 参数,请在交互终端中选择,或显式传入 bash|zsh|fish");let T=["zsh","bash","fish"],$=e5({input:process.stdin,output:process.stderr});process.stderr.write(`请选择要生成的自动补全脚本:
490
+ `),T.forEach((Y,Q)=>{process.stderr.write(` ${Q+1}) ${Y}
491
+ `)});try{let Y=await $.question("请输入编号 (1-3): "),Q=Number(Y.trim());if(!Number.isInteger(Q)||Q<1||Q>T.length)throw Error(`无效选择: ${Y||"(empty)"}`);return T[Q-1]}finally{$.close()}}function f9(T){T.command("autocomplete").description("生成 shell 自动补全脚本").argument("[shell]","shell 类型 (bash|zsh|fish)").action(async($)=>{let Y=$??await J2(),Q=Y.toLowerCase();if(!["bash","zsh","fish"].includes(Q))throw Error(`不支持的 shell: ${Y},仅支持 bash、zsh、fish`);let X=Q2(Q,T),J=X2(Q),H=h9(J);a5(H,{recursive:!0,mode:448}),r5(J,X,"utf-8"),console.log(`自动补全脚本已保存到: ${J}`),console.log(`请在终端配置中追加: source '${J.replaceAll("'","'\\''")}'`)})}z();ZT();LT();ZT();function YT(T){return T.option("--pick <fields>","摘取指定字段(逗号分隔)").option("--filter <expr>","过滤条件(组内 AND,多次指定为 OR)",g9,[]).option("--sort <expr>","排序条件(如 pri:desc,id:asc)").option("--search <keywords>","搜索关键词(组内 AND,多次指定为 OR)",g9,[]).option("--search-fields <fields>","搜索字段(逗号分隔)").option("--page <number>","页码").option("--recPerPage <number>","每页条数").option("--all","尚未支持自动翻页,请使用 --page 和 --recPerPage").option("--limit <number>","限制获取数量").option("--data <json>","JSON 数据").option("--params <json>","API 调用参数").option("--yes","跳过确认").option("--silent","静默模式").option("--batch-fail-fast","批量操作出错时停止").option("--id <id>","对象 ID").option("--product <id>","产品 ID").option("--project <id>","项目 ID").option("--execution <id>","执行 ID")}function g9(T,$){return $.concat([T])}var u9=["login","logout","profile","config","version","help","ls","list","get","create","update","delete","do","autocomplete","mcp","add-mcp","add-skill","upgrade"],H2={productplan:"plan"};function c9(T){for(let $ of UT()){if(u9.includes($))continue;let Y=d($),Q=ST(Y),X=Q.length>0?` | 操作: ${Q.join(", ")}`:"",J=T.command($).description(`${Y.display??$}模块${X}`).argument("[args...]","参数").allowUnknownOption(!0).helpOption(!1),H=H2[$];if(H){if(u9.includes(H))throw Error(`Alias "${H}" for module "${$}" conflicts with a built-in command`);J.alias(H)}YT(J),J.action(async(W,B)=>{let V={...T.opts(),...B},L=(G)=>{if(!G){yT(Y);return}let K=C(Y,/^\d+$/.test(G)?"get":G);if(K){mT(Y,K);return}yT(Y)},F=W.findIndex((G)=>G==="--help"||G==="-h");if(F!==-1){W.splice(F,1);let G=W.filter((K)=>!K.startsWith("-"));L(G[0]);return}if(W[0]==="props"){W9(Y,V);return}if(W[0]==="help"){L();return}if(W[1]==="help"){L(W[0]);return}if(W.length===0&&!C(Y,"list")){yT(Y);return}let{client:I,profile:w}=await o({insecure:V.insecure,timeout:V.timeout}),_=W.shift(),Z=_,O=_?.split(",").map((G)=>G.trim());if(O?.length&&O.every((G)=>/^\d+$/.test(G)))W.unshift(O.join(",")),Z="get";else if(Z===void 0)Z="list";else if(Z.startsWith("-"))W.unshift(Z),Z="list";await iT(I,Y,Z,W,w,V)})}}function d9(T){let $=T.command("ls").alias("list").description("获取对象列表").argument("<module>","模块名称,例如 bug").argument("[args...]","参数");YT($),$.allowUnknownOption(!0),$.action(async(W,B,U)=>{await wT(T,W,"list",U,B)});let Y=T.command("get").description("获取单个对象").argument("<module>","模块名称,例如 bug").argument("[args...]","对象 ID(按操作要求)和其他参数");YT(Y),Y.allowUnknownOption(!0),Y.action(async(W,B,U)=>{await wT(T,W,"get",U,B)});let Q=T.command("create").description("创建对象").argument("<module>","模块名称,例如 bug").argument("[args...]","参数");YT(Q),Q.allowUnknownOption(!0),Q.action(async(W,B,U)=>{await wT(T,W,"create",U,B)});let X=T.command("update").description("更新对象").argument("<module>","模块名称,例如 bug").argument("[args...]","--id 和其他参数");YT(X),X.allowUnknownOption(!0),X.action(async(W,B,U)=>{await wT(T,W,"update",U,B)});let J=T.command("delete").description("删除对象").argument("<module>","模块名称,例如 bug").argument("[args...]","--id 和其他参数");YT(J),J.allowUnknownOption(!0),J.action(async(W,B,U)=>{await wT(T,W,"delete",U,B)});let H=T.command("do").description("执行对象操作").argument("<module>","模块名称,例如 bug").argument("<action>","操作名称,例如 resolve").argument("[args...]","--id 和其他参数");YT(H),H.allowUnknownOption(!0),H.action(async(W,B,U,V)=>{await wT(T,W,B,V,U)})}async function wT(T,$,Y,Q,X=[]){let J=d($);if(!J)throw new R("E2001",{module:$});let H=T.opts(),W={...H,...Q},{client:B,profile:U}=await o({insecure:H.insecure,timeout:H.timeout});await iT(B,J,Y,X,U,W)}S0();z();function X1(T){T.command("mcp").description("启动 MCP 服务,支持本地 stdio 或多客户端 HTTP 访问禅道数据").option("--transport <type>","传输方式 (stdio|http)","stdio").option("--host <host>","HTTP 监听地址(默认 127.0.0.1)").option("--port <port>","HTTP 监听端口(默认 9090)").option("--url <url>","HTTP 模式的固定禅道站点地址(亦可通过 ZENTAO_URL 设置)").option("--read-only","仅提供查询工具,禁止业务写入和账号切换").option("--modules <names>","仅提供指定业务模块(逗号分隔,如 product,story,task)",($)=>$.split(",").map((Y)=>Y.trim())).option("--split-tools","按模块分为 _read 查询工具和 _write 写入工具").action(async($)=>{let Y=T.opts(),Q={insecure:Y.insecure,timeout:Y.timeout,readOnly:$.readOnly,modules:$.modules,splitTools:$.splitTools};if($.transport!=="stdio"&&$.transport!=="http")throw new R("E2009",{option:"--transport",reason:"必须为 stdio 或 http"});if($.transport==="stdio"){for(let F of["host","port","url"])if($[F]!==void 0)throw new R("E2009",{option:`--${F}`,reason:"仅适用于 --transport http"});await C0(Q);return}let X=$.url??process.env.ZENTAO_URL;if(!X?.trim())throw new R("E2009",{option:"--url",reason:"HTTP 模式必须指定禅道站点,或设置 ZENTAO_URL"});let J=$.port===void 0?9090:Number($.port);if($.port!==void 0&&!/^\d+$/.test($.port)||!Number.isInteger(J)||J<1||J>65535)throw new R("E2009",{option:"--port",reason:"必须为 1–65535 的整数"});let{startMcpHttpServer:H}=await Promise.resolve().then(() => (Q1(),Y1)),W=await H({...Q,url:X,host:$.host,port:J});process.stderr.write(`MCP HTTP 服务已启动:${W.url.href}
492
+ `);let B=new URL(W.url);if(B.hostname==="0.0.0.0")B.hostname="127.0.0.1";if(B.hostname==="[::]")B.hostname="[::1]";let U={mcpServers:{"zentao-remote":{url:B.href,headers:{token:"<your-zentao-token>"}}}};process.stderr.write([`
493
+ 客户端配置示例(请替换为自己的禅道 Token):`,JSON.stringify(U,null,2),`
494
+ 也可将 headers 改为 {"Authorization":"Bearer <your-zentao-token>"},两种认证头任选其一。`,`远程客户端请将 url 替换为可访问的 HTTPS 服务地址。
495
+ `].join(`
496
+ `));let V=!1,L=()=>{if(V)return;V=!0,W.close().catch(()=>{process.stderr.write(`MCP HTTP 服务关闭失败
497
+ `),process.exitCode=1}).finally(()=>{process.removeListener("SIGINT",L),process.removeListener("SIGTERM",L)})};process.once("SIGINT",L),process.once("SIGTERM",L)})}IT();import{createInterface as P2}from"node:readline/promises";import{spawnSync as C2}from"node:child_process";import{fileURLToPath as S2}from"node:url";var J1="zentao-cli",x2=`https://registry.npmjs.org/${J1}/latest`;function oT(T){let $=T.trim().replace(/^v/,"").match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(!$)return null;return{major:Number($[1]),minor:Number($[2]),patch:Number($[3]),prerelease:$[4]??""}}function j2(T,$){let Y=T.split("."),Q=$.split("."),X=Math.max(Y.length,Q.length);for(let J=0;J<X;J++){let H=Y[J],W=Q[J];if(H===void 0)return-1;if(W===void 0)return 1;let B=/^\d+$/.test(H),U=/^\d+$/.test(W);if(B&&U){let V=Number(H),L=Number(W);if(V!==L)return V>L?1:-1}else if(B!==U)return B?-1:1;else if(H!==W)return H>W?1:-1}return 0}function H1(T,$){for(let Y of["major","minor","patch"])if(T[Y]!==$[Y])return T[Y]>$[Y]?1:-1;if(!T.prerelease&&$.prerelease)return 1;if(T.prerelease&&!$.prerelease)return-1;if(T.prerelease===$.prerelease)return 0;return j2(T.prerelease,$.prerelease)}function N2(T){let $=oT(T);return!!$&&$.prerelease===""}async function W1(){let T;try{T=await fetch(x2,{headers:{Accept:"application/json"},signal:AbortSignal.timeout(1e4)})}catch(Y){throw Error(`无法连接到 npm registry: ${Y.message}`)}if(!T.ok)throw Error(`npm registry 返回错误: ${T.status} ${T.statusText}`);let $=await T.json();if(typeof $.version==="string"&&N2($.version))return $.version;if(typeof $.version!=="string")throw Error("npm registry 返回数据格式异常");throw Error("npm registry 未找到正式版本")}function B1(){let T="";try{T=S2(import.meta.url)}catch{T=process.argv[1]??""}let $=T.replace(/\\/g,"/");if(/\/\.bun\/|\/bun\/install\//.test($))return"bun";return"npm"}function j0(T,$="latest"){let Y=`${J1}@${$}`;if(T==="bun")return{cmd:"bun",args:["add","-g",Y]};return{cmd:"npm",args:["install","-g",Y]}}function U1(T,$="latest"){let{cmd:Y,args:Q}=j0(T,$);return{status:C2(Y,Q,{stdio:"inherit",encoding:"utf-8",shell:process.platform==="win32"}).status,cmd:Y,args:Q}}async function A2(T,$){if(!process.stdin.isTTY||!process.stderr.isTTY)throw Error("非交互模式下请使用 --yes 跳过确认。");let Y=P2({input:process.stdin,output:process.stderr});try{return(await Y.question(`发现新版本 ${T} → ${$},是否立即升级?[y/N] `)).trim().toLowerCase()==="y"}finally{Y.close()}}function L1(T){T.command("upgrade").description("检查并升级 CLI 到最新版本").option("-y, --yes","跳过确认,直接升级").action(async($)=>{let Q=!!T.opts().silent,X=r();if(!Q)process.stderr.write(`正在检查最新版本...
498
+ `);let J=await W1(),H=oT(X),W=oT(J);if(!H||!W)throw Error(`版本号格式无法解析: 当前=${X}, 最新=${J}`);if(H1(H,W)>=0){console.log(`当前已是最新版本 ${X},无需升级。`);return}if(!($.yes||await A2(X,J))){console.log("已取消升级。");return}let U=B1(),{cmd:V,args:L}=j0(U,J);console.log(`
499
+ 执行: ${V} ${L.join(" ")}
500
+ `);let{status:F}=U1(U,J);if(F===0)console.log(`
501
+ 升级成功!${X} → ${J}`);else throw Error(`升级失败,请手动运行:
502
+ ${V} ${L.join(" ")}`)})}function V1(T){U9(T),Z9(T),_9(T),w9(T),z9(T),q9(T),f9(T),j9(T),v9(T),X1(T),d9(T),c9(T),L1(T)}z();c();IT();function k2(T,$){let Y;for(let Q=0;Q<T.length;Q++){let X=T[Q];if(X==="--config"){Y=T[Q+1];break}if(X.startsWith("--config=")){Y=X.slice(9);break}}if(!Y){let Q=$.ZENTAO_CONFIG_FILE;if(Q&&Q.trim()!=="")Y=Q}if(Y&&Y.trim()!=="")a0(Y)}k2(process.argv.slice(2),process.env);var WT=new y2;function R1(T){return T.replace(/^Usage:/gm,"用法:").replace(/^Options:/gm,"选项:").replace(/^Commands:/gm,"命令:").replace(/display help for command/g,"显示命令帮助")}WT.configureOutput({writeOut:(T)=>process.stdout.write(R1(T)),writeErr:(T)=>process.stderr.write(R1(T))});WT.name("zentao").description("禅道命令行工具,支持在你喜爱的终端里访问和操作禅道数据").version(r(),"-V, --version","显示版本号").helpOption("-h, --help","显示命令帮助").option("--format <format>","输出格式 (markdown|json|raw)").option("--silent","静默模式").option("--insecure","跳过 SSL/TLS 证书验证").option("--timeout <ms>","请求超时时间(毫秒)",parseInt).option("--config <config_file>","指定自定义配置文件路径(亦可通过 ZENTAO_CONFIG_FILE 环境变量设置)").option("--machine-readable","禁用 Markdown ANSI 渲染;删除操作仍需显式传入 --yes");V1(WT);WT.addHelpText("after",()=>{try{if(pT().length===0)return`
503
+ 提示:尚未登录禅道服务,请先通过本机浏览器登录:
504
+
505
+ zentao login --web
506
+
507
+ 终端交互登录可使用 zentao login --no-browser。
508
+ `}catch{}return""});WT.exitOverride((T)=>{if(T.code==="commander.executeSubCommandAsync")return;let $=T instanceof E2&&T.code==="commander.help"&&T.exitCode===1?0:T.exitCode;process.exit($)});WT.parseAsync(process.argv).catch((T)=>{if(T instanceof R)console.error(N0(T,WT.opts().format??"markdown")),process.exit(1);console.error(T.message??T),process.exit(1)});