#!/usr/bin/env node import{createRequire as YX}from"node:module";var BX=Object.create;var{getPrototypeOf:ZX,defineProperty:n3,getOwnPropertyNames:HX}=Object;var qX=Object.prototype.hasOwnProperty;var qD=(D,P,O)=>{O=D!=null?BX(ZX(D)):{};let W=P||!D||!D.__esModule?n3(O,"default",{value:D,enumerable:!0}):O;for(let F of HX(D))if(!qX.call(W,F))n3(W,F,{get:()=>D[F],enumerable:!0});return W};var S=(D,P)=>()=>(P||D((P={exports:{}}).exports,P),P.exports);var a4=(D,P)=>{for(var O in P)n3(D,O,{get:P[O],enumerable:!0,configurable:!0,set:(W)=>P[O]=()=>W})};var dD=YX(import.meta.url);var r8=S((JX)=>{class i3 extends Error{constructor(D,P,O){super(O);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=P,this.exitCode=D,this.nestedError=void 0}}class s4 extends i3{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}JX.CommanderError=i3;JX.InvalidArgumentError=s4});var zP=S((GX)=>{var{InvalidArgumentError:EX}=r8();class n4{constructor(D,P){switch(this.description=P||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,D[0]){case"<":this.required=!0,this._name=D.slice(1,-1);break;case"[":this.required=!1,this._name=D.slice(1,-1);break;default:this.required=!0,this._name=D;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,P){if(P===this.defaultValue||!Array.isArray(P))return[D];return P.concat(D)}default(D,P){return this.defaultValue=D,this.defaultValueDescription=P,this}argParser(D){return this.parseArg=D,this}choices(D){return this.argChoices=D.slice(),this.parseArg=(P,O)=>{if(!this.argChoices.includes(P))throw new EX(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(P,O);return P},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function AX(D){let P=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+P+">":"["+P+"]"}GX.Argument=n4;GX.humanReadableArgName=AX});var t3=S((CX)=>{var{humanReadableArgName:QX}=zP();class i4{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(D){let P=D.commands.filter((O)=>!O._hidden);if(D._hasImplicitHelpCommand()){let[,O,W]=D._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),F=D.createCommand(O).helpOption(!1);if(F.description(D._helpCommandDescription),W)F.arguments(W);P.push(F)}if(this.sortSubcommands)P.sort((O,W)=>{return O.name().localeCompare(W.name())});return P}compareOptions(D,P){let O=(W)=>{return W.short?W.short.replace(/^-/,""):W.long.replace(/^--/,"")};return O(D).localeCompare(O(P))}visibleOptions(D){let P=D.options.filter((F)=>!F.hidden),O=D._hasHelpOption&&D._helpShortFlag&&!D._findOption(D._helpShortFlag),W=D._hasHelpOption&&!D._findOption(D._helpLongFlag);if(O||W){let F;if(!O)F=D.createOption(D._helpLongFlag,D._helpDescription);else if(!W)F=D.createOption(D._helpShortFlag,D._helpDescription);else F=D.createOption(D._helpFlags,D._helpDescription);P.push(F)}if(this.sortOptions)P.sort(this.compareOptions);return P}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let P=[];for(let O=D.parent;O;O=O.parent){let W=O.options.filter((F)=>!F.hidden);P.push(...W)}if(this.sortOptions)P.sort(this.compareOptions);return P}visibleArguments(D){if(D._argsDescription)D.registeredArguments.forEach((P)=>{P.description=P.description||D._argsDescription[P.name()]||""});if(D.registeredArguments.find((P)=>P.description))return D.registeredArguments;return[]}subcommandTerm(D){let P=D.registeredArguments.map((O)=>QX(O)).join(" ");return D._name+(D._aliases[0]?"|"+D._aliases[0]:"")+(D.options.length?" [options]":"")+(P?" "+P:"")}optionTerm(D){return D.flags}argumentTerm(D){return D.name()}longestSubcommandTermLength(D,P){return P.visibleCommands(D).reduce((O,W)=>{return Math.max(O,P.subcommandTerm(W).length)},0)}longestOptionTermLength(D,P){return P.visibleOptions(D).reduce((O,W)=>{return Math.max(O,P.optionTerm(W).length)},0)}longestGlobalOptionTermLength(D,P){return P.visibleGlobalOptions(D).reduce((O,W)=>{return Math.max(O,P.optionTerm(W).length)},0)}longestArgumentTermLength(D,P){return P.visibleArguments(D).reduce((O,W)=>{return Math.max(O,P.argumentTerm(W).length)},0)}commandUsage(D){let P=D._name;if(D._aliases[0])P=P+"|"+D._aliases[0];let O="";for(let W=D.parent;W;W=W.parent)O=W.name()+" "+O;return O+P+" "+D.usage()}commandDescription(D){return D.description()}subcommandDescription(D){return D.summary()||D.description()}optionDescription(D){let P=[];if(D.argChoices)P.push(`choices: ${D.argChoices.map((O)=>JSON.stringify(O)).join(", ")}`);if(D.defaultValue!==void 0){if(D.required||D.optional||D.isBoolean()&&typeof D.defaultValue==="boolean")P.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`)}if(D.presetArg!==void 0&&D.optional)P.push(`preset: ${JSON.stringify(D.presetArg)}`);if(D.envVar!==void 0)P.push(`env: ${D.envVar}`);if(P.length>0)return`${D.description} (${P.join(", ")})`;return D.description}argumentDescription(D){let P=[];if(D.argChoices)P.push(`choices: ${D.argChoices.map((O)=>JSON.stringify(O)).join(", ")}`);if(D.defaultValue!==void 0)P.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(P.length>0){let O=`(${P.join(", ")})`;if(D.description)return`${D.description} ${O}`;return O}return D.description}formatHelp(D,P){let O=P.padWidth(D,P),W=P.helpWidth||80,F=2,R=2;function L(J,A){if(A){let E=`${J.padEnd(O+2)}${A}`;return P.wrap(E,W-2,O+2)}return J}function B(J){return J.join("\n").replace(/^/gm," ".repeat(2))}let Z=[`Usage: ${P.commandUsage(D)}`,""],H=P.commandDescription(D);if(H.length>0)Z=Z.concat([P.wrap(H,W,0),""]);let Y=P.visibleArguments(D).map((J)=>{return L(P.argumentTerm(J),P.argumentDescription(J))});if(Y.length>0)Z=Z.concat(["Arguments:",B(Y),""]);let q=P.visibleOptions(D).map((J)=>{return L(P.optionTerm(J),P.optionDescription(J))});if(q.length>0)Z=Z.concat(["Options:",B(q),""]);if(this.showGlobalOptions){let J=P.visibleGlobalOptions(D).map((A)=>{return L(P.optionTerm(A),P.optionDescription(A))});if(J.length>0)Z=Z.concat(["Global Options:",B(J),""])}let U=P.visibleCommands(D).map((J)=>{return L(P.subcommandTerm(J),P.subcommandDescription(J))});if(U.length>0)Z=Z.concat(["Commands:",B(U),""]);return Z.join("\n")}padWidth(D,P){return Math.max(P.longestOptionTermLength(D,P),P.longestGlobalOptionTermLength(D,P),P.longestSubcommandTermLength(D,P),P.longestArgumentTermLength(D,P))}wrap(D,P,O,W=40){let R=new RegExp(`[\\n][${" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF"}]+`);if(D.match(R))return D;let L=P-O;if(L{if(A==="\n")return"";return(E>0?H:"")+A.trimEnd()}).join("\n")}}CX.Help=i4});var o3=S((bX)=>{var{InvalidArgumentError:MX}=r8();class t4{constructor(D,P){this.flags=D,this.description=P||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let O=e4(D);if(this.short=O.shortFlag,this.long=O.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,P){return this.defaultValue=D,this.defaultValueDescription=P,this}preset(D){return this.presetArg=D,this}conflicts(D){return this.conflictsWith=this.conflictsWith.concat(D),this}implies(D){let P=D;if(typeof D==="string")P={[D]:!0};return this.implied=Object.assign(this.implied||{},P),this}env(D){return this.envVar=D,this}argParser(D){return this.parseArg=D,this}makeOptionMandatory(D=!0){return this.mandatory=!!D,this}hideHelp(D=!0){return this.hidden=!!D,this}_concatValue(D,P){if(P===this.defaultValue||!Array.isArray(P))return[D];return P.concat(D)}choices(D){return this.argChoices=D.slice(),this.parseArg=(P,O)=>{if(!this.argChoices.includes(P))throw new MX(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(P,O);return P},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){return wX(this.name().replace(/^no-/,""))}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class o4{constructor(D){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,D.forEach((P)=>{if(P.negate)this.negativeOptions.set(P.attributeName(),P);else this.positiveOptions.set(P.attributeName(),P)}),this.negativeOptions.forEach((P,O)=>{if(this.positiveOptions.has(O))this.dualOptions.add(O)})}valueFromOption(D,P){let O=P.attributeName();if(!this.dualOptions.has(O))return!0;let W=this.negativeOptions.get(O).presetArg,F=W!==void 0?W:!1;return P.negate===(F===D)}}function wX(D){return D.split("-").reduce((P,O)=>{return P+O[0].toUpperCase()+O.slice(1)})}function e4(D){let P,O,W=D.split(/[ |,]+/);if(W.length>1&&!/^[[<]/.test(W[1]))P=W.shift();if(O=W.shift(),!P&&/^-[^-]$/.test(O))P=O,O=void 0;return{shortFlag:P,longFlag:O}}bX.Option=t4;bX.splitOptionFlags=e4;bX.DualOptions=o4});var D9=S((TX)=>{function _X(D,P){if(Math.abs(D.length-P.length)>3)return Math.max(D.length,P.length);let O=[];for(let W=0;W<=D.length;W++)O[W]=[W];for(let W=0;W<=P.length;W++)O[0][W]=W;for(let W=1;W<=P.length;W++)for(let F=1;F<=D.length;F++){let R=1;if(D[F-1]===P[W-1])R=0;else R=1;if(O[F][W]=Math.min(O[F-1][W]+1,O[F][W-1]+1,O[F-1][W-1]+R),F>1&&W>1&&D[F-1]===P[W-2]&&D[F-2]===P[W-1])O[F][W]=Math.min(O[F][W],O[F-2][W-2]+1)}return O[D.length][P.length]}function uX(D,P){if(!P||P.length===0)return"";P=Array.from(new Set(P));let O=D.startsWith("--");if(O)D=D.slice(2),P=P.map((L)=>L.slice(2));let W=[],F=3,R=0.4;if(P.forEach((L)=>{if(L.length<=1)return;let B=_X(D,L),Z=Math.max(D.length,L.length);if((Z-B)/Z>R){if(BL.localeCompare(B)),O)W=W.map((L)=>`--${L}`);if(W.length>1)return`\n(Did you mean one of ${W.join(", ")}?)`;if(W.length===1)return`\n(Did you mean ${W[0]}?)`;return""}TX.suggestSimilar=uX});var R9=S((yX)=>{var kX=dD("events").EventEmitter,e3=dD("child_process"),g0=dD("path"),DW=dD("fs"),YD=dD("process"),{Argument:fX,humanReadableArgName:xX}=zP(),{CommanderError:PW}=r8(),{Help:hX}=t3(),{Option:P9,splitOptionFlags:gX,DualOptions:vX}=o3(),{suggestSimilar:O9}=D9();class OW extends kX{constructor(D){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=D||"",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._outputConfiguration={writeOut:(P)=>YD.stdout.write(P),writeErr:(P)=>YD.stderr.write(P),getOutHelpWidth:()=>YD.stdout.isTTY?YD.stdout.columns:void 0,getErrHelpWidth:()=>YD.stderr.isTTY?YD.stderr.columns:void 0,outputError:(P,O)=>O(P)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(D){return this._outputConfiguration=D._outputConfiguration,this._hasHelpOption=D._hasHelpOption,this._helpFlags=D._helpFlags,this._helpDescription=D._helpDescription,this._helpShortFlag=D._helpShortFlag,this._helpLongFlag=D._helpLongFlag,this._helpCommandName=D._helpCommandName,this._helpCommandnameAndArgs=D._helpCommandnameAndArgs,this._helpCommandDescription=D._helpCommandDescription,this._helpConfiguration=D._helpConfiguration,this._exitCallback=D._exitCallback,this._storeOptionsAsProperties=D._storeOptionsAsProperties,this._combineFlagAndOptionalValue=D._combineFlagAndOptionalValue,this._allowExcessArguments=D._allowExcessArguments,this._enablePositionalOptions=D._enablePositionalOptions,this._showHelpAfterError=D._showHelpAfterError,this._showSuggestionAfterError=D._showSuggestionAfterError,this}_getCommandAndAncestors(){let D=[];for(let P=this;P;P=P.parent)D.push(P);return D}command(D,P,O){let W=P,F=O;if(typeof W==="object"&&W!==null)F=W,W=null;F=F||{};let[,R,L]=D.match(/([^ ]+) *(.*)/),B=this.createCommand(R);if(W)B.description(W),B._executableHandler=!0;if(F.isDefault)this._defaultCommandName=B._name;if(B._hidden=!!(F.noHelp||F.hidden),B._executableFile=F.executableFile||null,L)B.arguments(L);if(this.commands.push(B),B.parent=this,B.copyInheritedSettings(this),W)return this;return B}createCommand(D){return new OW(D)}createHelp(){return Object.assign(new hX,this.configureHelp())}configureHelp(D){if(D===void 0)return this._helpConfiguration;return this._helpConfiguration=D,this}configureOutput(D){if(D===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,D),this}showHelpAfterError(D=!0){if(typeof D!=="string")D=!!D;return this._showHelpAfterError=D,this}showSuggestionAfterError(D=!0){return this._showSuggestionAfterError=!!D,this}addCommand(D,P){if(!D._name)throw new Error(`Command passed to .addCommand() must have a name - specify the name in Command constructor or using .name()`);if(P=P||{},P.isDefault)this._defaultCommandName=D._name;if(P.noHelp||P.hidden)D._hidden=!0;return this.commands.push(D),D.parent=this,this}createArgument(D,P){return new fX(D,P)}argument(D,P,O,W){let F=this.createArgument(D,P);if(typeof O==="function")F.default(W).argParser(O);else F.default(O);return this.addArgument(F),this}arguments(D){return D.trim().split(/ +/).forEach((P)=>{this.argument(P)}),this}addArgument(D){let P=this.registeredArguments.slice(-1)[0];if(P&&P.variadic)throw new Error(`only the last argument can be variadic '${P.name()}'`);if(D.required&&D.defaultValue!==void 0&&D.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${D.name()}'`);return this.registeredArguments.push(D),this}addHelpCommand(D,P){if(D===!1)this._addImplicitHelpCommand=!1;else{if(this._addImplicitHelpCommand=!0,typeof D==="string")this._helpCommandName=D.split(" ")[0],this._helpCommandnameAndArgs=D;this._helpCommandDescription=P||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===void 0)return this.commands.length&&!this._actionHandler&&!this._findCommand("help");return this._addImplicitHelpCommand}hook(D,P){let O=["preSubcommand","preAction","postAction"];if(!O.includes(D))throw new Error(`Unexpected value for event passed to hook : '${D}'. Expecting one of '${O.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycleHooks[D].push(P);else this._lifeCycleHooks[D]=[P];return this}exitOverride(D){if(D)this._exitCallback=D;else this._exitCallback=(P)=>{if(P.code!=="commander.executeSubCommandAsync")throw P};return this}_exit(D,P,O){if(this._exitCallback)this._exitCallback(new PW(D,P,O));YD.exit(D)}action(D){let P=(O)=>{let W=this.registeredArguments.length,F=O.slice(0,W);if(this._storeOptionsAsProperties)F[W]=this;else F[W]=this.opts();return F.push(this),D.apply(this,F)};return this._actionHandler=P,this}createOption(D,P){return new P9(D,P)}_callParseArg(D,P,O,W){try{return D.parseArg(P,O)}catch(F){if(F.code==="commander.invalidArgument"){let R=`${W} ${F.message}`;this.error(R,{exitCode:F.exitCode,code:F.code})}throw F}}addOption(D){let P=D.name(),O=D.attributeName();if(D.negate){let F=D.long.replace(/^--no-/,"--");if(!this._findOption(F))this.setOptionValueWithSource(O,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(O,D.defaultValue,"default");this.options.push(D);let W=(F,R,L)=>{if(F==null&&D.presetArg!==void 0)F=D.presetArg;let B=this.getOptionValue(O);if(F!==null&&D.parseArg)F=this._callParseArg(D,F,B,R);else if(F!==null&&D.variadic)F=D._concatValue(F,B);if(F==null)if(D.negate)F=!1;else if(D.isBoolean()||D.optional)F=!0;else F="";this.setOptionValueWithSource(O,F,L)};if(this.on("option:"+P,(F)=>{let R=`error: option '${D.flags}' argument '${F}' is invalid.`;W(F,R,"cli")}),D.envVar)this.on("optionEnv:"+P,(F)=>{let R=`error: option '${D.flags}' value '${F}' from env '${D.envVar}' is invalid.`;W(F,R,"env")});return this}_optionEx(D,P,O,W,F){if(typeof P==="object"&&P instanceof P9)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let R=this.createOption(P,O);if(R.makeOptionMandatory(!!D.mandatory),typeof W==="function")R.default(F).argParser(W);else if(W instanceof RegExp){let L=W;W=(B,Z)=>{let H=L.exec(B);return H?H[0]:Z},R.default(F).argParser(W)}else R.default(W);return this.addOption(R)}option(D,P,O,W){return this._optionEx({},D,P,O,W)}requiredOption(D,P,O,W){return this._optionEx({mandatory:!0},D,P,O,W)}combineFlagAndOptionalValue(D=!0){return this._combineFlagAndOptionalValue=!!D,this}allowUnknownOption(D=!0){return this._allowUnknownOption=!!D,this}allowExcessArguments(D=!0){return this._allowExcessArguments=!!D,this}enablePositionalOptions(D=!0){return this._enablePositionalOptions=!!D,this}passThroughOptions(D=!0){if(this._passThroughOptions=!!D,!!this.parent&&D&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(D=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this._storeOptionsAsProperties=!!D,this}getOptionValue(D){if(this._storeOptionsAsProperties)return this[D];return this._optionValues[D]}setOptionValue(D,P){return this.setOptionValueWithSource(D,P,void 0)}setOptionValueWithSource(D,P,O){if(this._storeOptionsAsProperties)this[D]=P;else this._optionValues[D]=P;return this._optionValueSources[D]=O,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let P;return this._getCommandAndAncestors().forEach((O)=>{if(O.getOptionValueSource(D)!==void 0)P=O.getOptionValueSource(D)}),P}_prepareUserArgs(D,P){if(D!==void 0&&!Array.isArray(D))throw new Error("first parameter to parse must be array or undefined");if(P=P||{},D===void 0){if(D=YD.argv,YD.versions&&YD.versions.electron)P.from="electron"}this.rawArgs=D.slice();let O;switch(P.from){case void 0:case"node":this._scriptPath=D[1],O=D.slice(2);break;case"electron":if(YD.defaultApp)this._scriptPath=D[1],O=D.slice(2);else O=D.slice(1);break;case"user":O=D.slice(0);break;default:throw new Error(`unexpected parse option { from: '${P.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",O}parse(D,P){let O=this._prepareUserArgs(D,P);return this._parseCommand([],O),this}async parseAsync(D,P){let O=this._prepareUserArgs(D,P);return await this._parseCommand([],O),this}_executeSubCommand(D,P){P=P.slice();let O=!1,W=[".js",".ts",".tsx",".mjs",".cjs"];function F(H,Y){let q=g0.resolve(H,Y);if(DW.existsSync(q))return q;if(W.includes(g0.extname(Y)))return;let U=W.find((J)=>DW.existsSync(`${q}${J}`));if(U)return`${q}${U}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let R=D._executableFile||`${this._name}-${D._name}`,L=this._executableDir||"";if(this._scriptPath){let H;try{H=DW.realpathSync(this._scriptPath)}catch(Y){H=this._scriptPath}L=g0.resolve(g0.dirname(H),L)}if(L){let H=F(L,R);if(!H&&!D._executableFile&&this._scriptPath){let Y=g0.basename(this._scriptPath,g0.extname(this._scriptPath));if(Y!==this._name)H=F(L,`${Y}-${D._name}`)}R=H||R}O=W.includes(g0.extname(R));let B;if(YD.platform!=="win32")if(O)P.unshift(R),P=F9(YD.execArgv).concat(P),B=e3.spawn(YD.argv[0],P,{stdio:"inherit"});else B=e3.spawn(R,P,{stdio:"inherit"});else P.unshift(R),P=F9(YD.execArgv).concat(P),B=e3.spawn(YD.execPath,P,{stdio:"inherit"});if(!B.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((Y)=>{YD.on(Y,()=>{if(B.killed===!1&&B.exitCode===null)B.kill(Y)})});let Z=this._exitCallback;if(!Z)B.on("close",YD.exit.bind(YD));else B.on("close",()=>{Z(new PW(YD.exitCode||0,"commander.executeSubCommandAsync","(close)"))});B.on("error",(H)=>{if(H.code==="ENOENT"){let Y=L?`searched for local subcommand relative to directory '${L}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",q=`'${R}' does not exist - if '${D._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - if the default executable name is not suitable, use the executableFile option to supply a custom name or path - ${Y}`;throw new Error(q)}else if(H.code==="EACCES")throw new Error(`'${R}' not executable`);if(!Z)YD.exit(1);else{let Y=new PW(1,"commander.executeSubCommandAsync","(error)");Y.nestedError=H,Z(Y)}}),this.runningCommand=B}_dispatchSubcommand(D,P,O){let W=this._findCommand(D);if(!W)this.help({error:!0});let F;return F=this._chainOrCallSubCommandHook(F,W,"preSubcommand"),F=this._chainOrCall(F,()=>{if(W._executableHandler)this._executeSubCommand(W,P.concat(O));else return W._parseCommand(P,O)}),F}_dispatchHelpCommand(D){if(!D)this.help();let P=this._findCommand(D);if(P&&!P._executableHandler)P.help();return this._dispatchSubcommand(D,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((D,P)=>{if(D.required&&this.args[P]==null)this.missingArgument(D.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 D=(O,W,F)=>{let R=W;if(W!==null&&O.parseArg){let L=`error: command-argument value '${W}' is invalid for argument '${O.name()}'.`;R=this._callParseArg(O,W,F,L)}return R};this._checkNumberOfArguments();let P=[];this.registeredArguments.forEach((O,W)=>{let F=O.defaultValue;if(O.variadic){if(W{return D(O,L,R)},O.defaultValue)}else if(F===void 0)F=[]}else if(WP());return P()}_chainOrCallHooks(D,P){let O=D,W=[];if(this._getCommandAndAncestors().reverse().filter((F)=>F._lifeCycleHooks[P]!==void 0).forEach((F)=>{F._lifeCycleHooks[P].forEach((R)=>{W.push({hookedCommand:F,callback:R})})}),P==="postAction")W.reverse();return W.forEach((F)=>{O=this._chainOrCall(O,()=>{return F.callback(F.hookedCommand,this)})}),O}_chainOrCallSubCommandHook(D,P,O){let W=D;if(this._lifeCycleHooks[O]!==void 0)this._lifeCycleHooks[O].forEach((F)=>{W=this._chainOrCall(W,()=>{return F(this,P)})});return W}_parseCommand(D,P){let O=this.parseOptions(P);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(O.operands),P=O.unknown,this.args=D.concat(P),D&&this._findCommand(D[0]))return this._dispatchSubcommand(D[0],D.slice(1),P);if(this._hasImplicitHelpCommand()&&D[0]===this._helpCommandName)return this._dispatchHelpCommand(D[1]);if(this._defaultCommandName)return W9(this,P),this._dispatchSubcommand(this._defaultCommandName,D,P);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});W9(this,O.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let W=()=>{if(O.unknown.length>0)this.unknownOption(O.unknown[0])},F=`command:${this.name()}`;if(this._actionHandler){W(),this._processArguments();let R;if(R=this._chainOrCallHooks(R,"preAction"),R=this._chainOrCall(R,()=>this._actionHandler(this.processedArgs)),this.parent)R=this._chainOrCall(R,()=>{this.parent.emit(F,D,P)});return R=this._chainOrCallHooks(R,"postAction"),R}if(this.parent&&this.parent.listenerCount(F))W(),this._processArguments(),this.parent.emit(F,D,P);else if(D.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",D,P);if(this.listenerCount("command:*"))this.emit("command:*",D,P);else if(this.commands.length)this.unknownCommand();else W(),this._processArguments()}else if(this.commands.length)W(),this.help({error:!0});else W(),this._processArguments()}_findCommand(D){if(!D)return;return this.commands.find((P)=>P._name===D||P._aliases.includes(D))}_findOption(D){return this.options.find((P)=>P.is(D))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((D)=>{D.options.forEach((P)=>{if(P.mandatory&&D.getOptionValue(P.attributeName())===void 0)D.missingMandatoryOptionValue(P)})})}_checkForConflictingLocalOptions(){let D=this.options.filter((O)=>{let W=O.attributeName();if(this.getOptionValue(W)===void 0)return!1;return this.getOptionValueSource(W)!=="default"});D.filter((O)=>O.conflictsWith.length>0).forEach((O)=>{let W=D.find((F)=>O.conflictsWith.includes(F.attributeName()));if(W)this._conflictingOption(O,W)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let P=[],O=[],W=P,F=D.slice();function R(B){return B.length>1&&B[0]==="-"}let L=null;while(F.length){let B=F.shift();if(B==="--"){if(W===O)W.push(B);W.push(...F);break}if(L&&!R(B)){this.emit(`option:${L.name()}`,B);continue}if(L=null,R(B)){let Z=this._findOption(B);if(Z){if(Z.required){let H=F.shift();if(H===void 0)this.optionMissingArgument(Z);this.emit(`option:${Z.name()}`,H)}else if(Z.optional){let H=null;if(F.length>0&&!R(F[0]))H=F.shift();this.emit(`option:${Z.name()}`,H)}else this.emit(`option:${Z.name()}`);L=Z.variadic?Z:null;continue}}if(B.length>2&&B[0]==="-"&&B[1]!=="-"){let Z=this._findOption(`-${B[1]}`);if(Z){if(Z.required||Z.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${Z.name()}`,B.slice(2));else this.emit(`option:${Z.name()}`),F.unshift(`-${B.slice(2)}`);continue}}if(/^--[^=]+=/.test(B)){let Z=B.indexOf("="),H=this._findOption(B.slice(0,Z));if(H&&(H.required||H.optional)){this.emit(`option:${H.name()}`,B.slice(Z+1));continue}}if(R(B))W=O;if((this._enablePositionalOptions||this._passThroughOptions)&&P.length===0&&O.length===0){if(this._findCommand(B)){if(P.push(B),F.length>0)O.push(...F);break}else if(B===this._helpCommandName&&this._hasImplicitHelpCommand()){if(P.push(B),F.length>0)P.push(...F);break}else if(this._defaultCommandName){if(O.push(B),F.length>0)O.push(...F);break}}if(this._passThroughOptions){if(W.push(B),F.length>0)W.push(...F);break}W.push(B)}return{operands:P,unknown:O}}opts(){if(this._storeOptionsAsProperties){let D={},P=this.options.length;for(let O=0;OObject.assign(D,P.opts()),{})}error(D,P){if(this._outputConfiguration.outputError(`${D}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0});let O=P||{},W=O.exitCode||1,F=O.code||"commander.error";this._exit(W,F,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in YD.env){let P=D.attributeName();if(this.getOptionValue(P)===void 0||["default","config","env"].includes(this.getOptionValueSource(P)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,YD.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new vX(this.options),P=(O)=>{return this.getOptionValue(O)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(O))};this.options.filter((O)=>O.implied!==void 0&&P(O.attributeName())&&D.valueFromOption(this.getOptionValue(O.attributeName()),O)).forEach((O)=>{Object.keys(O.implied).filter((W)=>!P(W)).forEach((W)=>{this.setOptionValueWithSource(W,O.implied[W],"implied")})})}missingArgument(D){let P=`error: missing required argument '${D}'`;this.error(P,{code:"commander.missingArgument"})}optionMissingArgument(D){let P=`error: option '${D.flags}' argument missing`;this.error(P,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let P=`error: required option '${D.flags}' not specified`;this.error(P,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,P){let O=(R)=>{let L=R.attributeName(),B=this.getOptionValue(L),Z=this.options.find((Y)=>Y.negate&&L===Y.attributeName()),H=this.options.find((Y)=>!Y.negate&&L===Y.attributeName());if(Z&&(Z.presetArg===void 0&&B===!1||Z.presetArg!==void 0&&B===Z.presetArg))return Z;return H||R},W=(R)=>{let L=O(R),B=L.attributeName();if(this.getOptionValueSource(B)==="env")return`environment variable '${L.envVar}'`;return`option '${L.flags}'`},F=`error: ${W(D)} cannot be used with ${W(P)}`;this.error(F,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let P="";if(D.startsWith("--")&&this._showSuggestionAfterError){let W=[],F=this;do{let R=F.createHelp().visibleOptions(F).filter((L)=>L.long).map((L)=>L.long);W=W.concat(R),F=F.parent}while(F&&!F._enablePositionalOptions);P=O9(D,W)}let O=`error: unknown option '${D}'${P}`;this.error(O,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let P=this.registeredArguments.length,O=P===1?"":"s",F=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${P} argument${O} but got ${D.length}.`;this.error(F,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],P="";if(this._showSuggestionAfterError){let W=[];this.createHelp().visibleCommands(this).forEach((F)=>{if(W.push(F.name()),F.alias())W.push(F.alias())}),P=O9(D,W)}let O=`error: unknown command '${D}'${P}`;this.error(O,{code:"commander.unknownCommand"})}version(D,P,O){if(D===void 0)return this._version;this._version=D,P=P||"-V, --version",O=O||"output the version number";let W=this.createOption(P,O);return this._versionOptionName=W.attributeName(),this.options.push(W),this.on("option:"+W.name(),()=>{this._outputConfiguration.writeOut(`${D}\n`),this._exit(0,"commander.version",D)}),this}description(D,P){if(D===void 0&&P===void 0)return this._description;if(this._description=D,P)this._argsDescription=P;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let P=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)P=this.commands[this.commands.length-1];if(D===P._name)throw new Error("Command alias can\'t be the same as its name");return P._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach((P)=>this.alias(P)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let P=this.registeredArguments.map((O)=>{return xX(O)});return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?P:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}nameFromFilename(D){return this._name=g0.basename(D,g0.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let P=this.createHelp();if(P.helpWidth===void 0)P.helpWidth=D&&D.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return P.formatHelp(this,P)}_getHelpContext(D){D=D||{};let P={error:!!D.error},O;if(P.error)O=(W)=>this._outputConfiguration.writeErr(W);else O=(W)=>this._outputConfiguration.writeOut(W);return P.write=D.write||O,P.command=this,P}outputHelp(D){let P;if(typeof D==="function")P=D,D=void 0;let O=this._getHelpContext(D);this._getCommandAndAncestors().reverse().forEach((F)=>F.emit("beforeAllHelp",O)),this.emit("beforeHelp",O);let W=this.helpInformation(O);if(P){if(W=P(W),typeof W!=="string"&&!Buffer.isBuffer(W))throw new Error("outputHelp callback must return a string or a Buffer")}if(O.write(W),this._helpLongFlag)this.emit(this._helpLongFlag);this.emit("afterHelp",O),this._getCommandAndAncestors().forEach((F)=>F.emit("afterAllHelp",O))}helpOption(D,P){if(typeof D==="boolean")return this._hasHelpOption=D,this;this._helpFlags=D||this._helpFlags,this._helpDescription=P||this._helpDescription;let O=gX(this._helpFlags);return this._helpShortFlag=O.shortFlag,this._helpLongFlag=O.longFlag,this}help(D){this.outputHelp(D);let P=YD.exitCode||0;if(P===0&&D&&typeof D!=="function"&&D.error)P=1;this._exit(P,"commander.help","(outputHelp)")}addHelpText(D,P){let O=["beforeAll","before","after","afterAll"];if(!O.includes(D))throw new Error(`Unexpected value for position to addHelpText. Expecting one of '${O.join("', '")}'`);let W=`${D}Help`;return this.on(W,(F)=>{let R;if(typeof P==="function")R=P({error:F.error,command:F.command});else R=P;if(R)F.write(`${R}\n`)}),this}}function W9(D,P){if(D._hasHelpOption&&P.find((W)=>W===D._helpLongFlag||W===D._helpShortFlag))D.outputHelp(),D._exit(0,"commander.helpDisplayed","(outputHelp)")}function F9(D){return D.map((P)=>{if(!P.startsWith("--inspect"))return P;let O,W="127.0.0.1",F="9229",R;if((R=P.match(/^(--inspect(-brk)?)$/))!==null)O=R[1];else if((R=P.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(O=R[1],/^\d+$/.test(R[3]))F=R[3];else W=R[3];else if((R=P.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)O=R[1],W=R[3],F=R[4];if(O&&F!=="0")return`${O}=${W}:${parseInt(F)+1}`;return P})}yX.Command=OW});var H9=S((q0,Z9)=>{var{Argument:lX}=zP(),{Command:L9}=R9(),{CommanderError:cX,InvalidArgumentError:B9}=r8(),{Help:pX}=t3(),{Option:dX}=o3();q0=Z9.exports=new L9;q0.program=q0;q0.Command=L9;q0.Option=dX;q0.Argument=lX;q0.Help=pX;q0.CommanderError=cX;q0.InvalidArgumentError=B9;q0.InvalidOptionArgumentError=B9});var S9=S((U9)=>{Object.defineProperty(U9,"__esModule",{value:!0});U9.versionInfo=U9.version=void 0;var rX="16.9.0";U9.version=rX;var aX=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});U9.versionInfo=aX});var hD=S((X9)=>{Object.defineProperty(X9,"__esModule",{value:!0});X9.devAssert=nX;function nX(D,P){if(!Boolean(D))throw new Error(P)}});var IP=S((E9)=>{Object.defineProperty(E9,"__esModule",{value:!0});E9.isPromise=tX;function tX(D){return typeof(D===null||D===void 0?void 0:D.then)==="function"}});var Q0=S((A9)=>{Object.defineProperty(A9,"__esModule",{value:!0});A9.isObjectLike=eX;function eX(D){return typeof D=="object"&&D!==null}});var ND=S((G9)=>{Object.defineProperty(G9,"__esModule",{value:!0});G9.invariant=PE;function PE(D,P){if(!Boolean(D))throw new Error(P!=null?P:"Unexpected invariant triggered.")}});var QP=S((z9)=>{Object.defineProperty(z9,"__esModule",{value:!0});z9.getLocation=RE;var WE=ND(),FE=/\r\n|[\n\r]/g;function RE(D,P){let O=0,W=1;for(let F of D.body.matchAll(FE)){if(typeof F.index==="number"||WE.invariant(!1),F.index>=P)break;O=F.index+F[0].length,W+=1}return{line:W,column:P+1-O}}});var WW=S((C9)=>{Object.defineProperty(C9,"__esModule",{value:!0});C9.printLocation=ZE;C9.printSourceLocation=Q9;var BE=QP();function ZE(D){return Q9(D.source,BE.getLocation(D.source,D.start))}function Q9(D,P){let O=D.locationOffset.column-1,W="".padStart(O)+D.body,F=P.line-1,R=D.locationOffset.line-1,L=P.line+R,B=P.line===1?O:0,Z=P.column+B,H=`${D.name}:${L}:${Z}\n`,Y=W.split(/\r\n|[\n\r]/g),q=Y[F];if(q.length>120){let U=Math.floor(Z/80),J=Z%80,A=[];for(let E=0;E["|",E]),["|","^".padStart(J)],["|",A[U+1]]])}return H+I9([[`${L-1} |`,Y[F-1]],[`${L} |`,q],["|","^".padStart(Z)],[`${L+1} |`,Y[F+1]]])}function I9(D){let P=D.filter(([W,F])=>F!==void 0),O=Math.max(...P.map(([W])=>W.length));return P.map(([W,F])=>W.padStart(O)+(F?" "+F:"")).join("\n")}});var g=S((b9)=>{Object.defineProperty(b9,"__esModule",{value:!0});b9.GraphQLError=void 0;b9.formatError=SE;b9.printError=JE;var YE=Q0(),$9=QP(),M9=WW();function UE(D){let P=D[0];if(P==null||"kind"in P||"length"in P)return{nodes:P,source:D[1],positions:D[2],path:D[3],originalError:D[4],extensions:D[5]};return P}class FW extends Error{constructor(D,...P){var O,W,F;let{nodes:R,source:L,positions:B,path:Z,originalError:H,extensions:Y}=UE(P);super(D);this.name="GraphQLError",this.path=Z!==null&&Z!==void 0?Z:void 0,this.originalError=H!==null&&H!==void 0?H:void 0,this.nodes=w9(Array.isArray(R)?R:R?[R]:void 0);let q=w9((O=this.nodes)===null||O===void 0?void 0:O.map((J)=>J.loc).filter((J)=>J!=null));this.source=L!==null&&L!==void 0?L:q===null||q===void 0?void 0:(W=q[0])===null||W===void 0?void 0:W.source,this.positions=B!==null&&B!==void 0?B:q===null||q===void 0?void 0:q.map((J)=>J.start),this.locations=B&&L?B.map((J)=>$9.getLocation(L,J)):q===null||q===void 0?void 0:q.map((J)=>$9.getLocation(J.source,J.start));let U=YE.isObjectLike(H===null||H===void 0?void 0:H.extensions)?H===null||H===void 0?void 0:H.extensions:void 0;if(this.extensions=(F=Y!==null&&Y!==void 0?Y:U)!==null&&F!==void 0?F:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),H!==null&&H!==void 0&&H.stack)Object.defineProperty(this,"stack",{value:H.stack,writable:!0,configurable:!0});else if(Error.captureStackTrace)Error.captureStackTrace(this,FW);else Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let D=this.message;if(this.nodes){for(let P of this.nodes)if(P.loc)D+="\n\n"+M9.printLocation(P.loc)}else if(this.source&&this.locations)for(let P of this.locations)D+="\n\n"+M9.printSourceLocation(this.source,P);return D}toJSON(){let D={message:this.message};if(this.locations!=null)D.locations=this.locations;if(this.path!=null)D.path=this.path;if(this.extensions!=null&&Object.keys(this.extensions).length>0)D.extensions=this.extensions;return D}}b9.GraphQLError=FW;function w9(D){return D===void 0||D.length===0?void 0:D}function JE(D){return D.toString()}function SE(D){return D.toJSON()}});var CP=S((V9)=>{Object.defineProperty(V9,"__esModule",{value:!0});V9.syntaxError=GE;var AE=g();function GE(D,P,O){return new AE.GraphQLError(`Syntax Error: ${O}`,{source:D,positions:[P]})}});var C0=S((T9)=>{Object.defineProperty(T9,"__esModule",{value:!0});T9.Token=T9.QueryDocumentKeys=T9.OperationTypeNode=T9.Location=void 0;T9.isNode=QE;class j9{constructor(D,P,O){this.start=D.start,this.end=P.end,this.startToken=D,this.endToken=P,this.source=O}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}T9.Location=j9;class _9{constructor(D,P,O,W,F,R){this.kind=D,this.start=P,this.end=O,this.line=W,this.column=F,this.value=R,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}T9.Token=_9;var u9={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};T9.QueryDocumentKeys=u9;var IE=new Set(Object.keys(u9));function QE(D){let P=D===null||D===void 0?void 0:D.kind;return typeof P==="string"&&IE.has(P)}var RW;T9.OperationTypeNode=RW;(function(D){D.QUERY="query",D.MUTATION="mutation",D.SUBSCRIPTION="subscription"})(RW||(T9.OperationTypeNode=RW={}))});var W8=S((f9)=>{Object.defineProperty(f9,"__esModule",{value:!0});f9.DirectiveLocation=void 0;var LW;f9.DirectiveLocation=LW;(function(D){D.QUERY="QUERY",D.MUTATION="MUTATION",D.SUBSCRIPTION="SUBSCRIPTION",D.FIELD="FIELD",D.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",D.FRAGMENT_SPREAD="FRAGMENT_SPREAD",D.INLINE_FRAGMENT="INLINE_FRAGMENT",D.VARIABLE_DEFINITION="VARIABLE_DEFINITION",D.SCHEMA="SCHEMA",D.SCALAR="SCALAR",D.OBJECT="OBJECT",D.FIELD_DEFINITION="FIELD_DEFINITION",D.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",D.INTERFACE="INTERFACE",D.UNION="UNION",D.ENUM="ENUM",D.ENUM_VALUE="ENUM_VALUE",D.INPUT_OBJECT="INPUT_OBJECT",D.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(LW||(f9.DirectiveLocation=LW={}))});var r=S((x9)=>{Object.defineProperty(x9,"__esModule",{value:!0});x9.Kind=void 0;var ZW;x9.Kind=ZW;(function(D){D.NAME="Name",D.DOCUMENT="Document",D.OPERATION_DEFINITION="OperationDefinition",D.VARIABLE_DEFINITION="VariableDefinition",D.SELECTION_SET="SelectionSet",D.FIELD="Field",D.ARGUMENT="Argument",D.FRAGMENT_SPREAD="FragmentSpread",D.INLINE_FRAGMENT="InlineFragment",D.FRAGMENT_DEFINITION="FragmentDefinition",D.VARIABLE="Variable",D.INT="IntValue",D.FLOAT="FloatValue",D.STRING="StringValue",D.BOOLEAN="BooleanValue",D.NULL="NullValue",D.ENUM="EnumValue",D.LIST="ListValue",D.OBJECT="ObjectValue",D.OBJECT_FIELD="ObjectField",D.DIRECTIVE="Directive",D.NAMED_TYPE="NamedType",D.LIST_TYPE="ListType",D.NON_NULL_TYPE="NonNullType",D.SCHEMA_DEFINITION="SchemaDefinition",D.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",D.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",D.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",D.FIELD_DEFINITION="FieldDefinition",D.INPUT_VALUE_DEFINITION="InputValueDefinition",D.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",D.UNION_TYPE_DEFINITION="UnionTypeDefinition",D.ENUM_TYPE_DEFINITION="EnumTypeDefinition",D.ENUM_VALUE_DEFINITION="EnumValueDefinition",D.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",D.DIRECTIVE_DEFINITION="DirectiveDefinition",D.SCHEMA_EXTENSION="SchemaExtension",D.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",D.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",D.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",D.UNION_TYPE_EXTENSION="UnionTypeExtension",D.ENUM_TYPE_EXTENSION="EnumTypeExtension",D.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(ZW||(x9.Kind=ZW={}))});var $P=S((g9)=>{Object.defineProperty(g9,"__esModule",{value:!0});g9.isDigit=h9;g9.isLetter=qW;g9.isNameContinue=KE;g9.isNameStart=bE;g9.isWhiteSpace=wE;function wE(D){return D===9||D===32}function h9(D){return D>=48&&D<=57}function qW(D){return D>=97&&D<=122||D>=65&&D<=90}function bE(D){return qW(D)||D===95}function KE(D){return qW(D)||h9(D)||D===95}});var a8=S((v9)=>{Object.defineProperty(v9,"__esModule",{value:!0});v9.dedentBlockStringLines=NE;v9.isPrintableAsBlockString=fE;v9.printBlockString=xE;var YW=$P();function NE(D){var P;let O=Number.MAX_SAFE_INTEGER,W=null,F=-1;for(let L=0;LB===0?L:L.slice(O)).slice((P=W)!==null&&P!==void 0?P:0,F+1)}function kE(D){let P=0;while(P1&&W.slice(1).every((J)=>J.length===0||YW.isWhiteSpace(J.charCodeAt(0))),L=O.endsWith('\\"""'),B=D.endsWith('"')&&!L,Z=D.endsWith("\\"),H=B||Z,Y=!(P!==null&&P!==void 0&&P.minimize)&&(!F||D.length>70||H||R||L),q="",U=F&&YW.isWhiteSpace(D.charCodeAt(0));if(Y&&!U||R)q+="\n";if(q+=O,Y||H)q+="\n";return'"""'+q+'"""'}});var s8=S((y9)=>{Object.defineProperty(y9,"__esModule",{value:!0});y9.TokenKind=void 0;var UW;y9.TokenKind=UW;(function(D){D.SOF="",D.EOF="",D.BANG="!",D.DOLLAR="$",D.AMP="&",D.PAREN_L="(",D.PAREN_R=")",D.SPREAD="...",D.COLON=":",D.EQUALS="=",D.AT="@",D.BRACKET_L="[",D.BRACKET_R="]",D.BRACE_L="{",D.PIPE="|",D.BRACE_R="}",D.NAME="Name",D.INT="Int",D.FLOAT="Float",D.STRING="String",D.BLOCK_STRING="BlockString",D.COMMENT="Comment"})(UW||(y9.TokenKind=UW={}))});var wP=S((r9)=>{Object.defineProperty(r9,"__esModule",{value:!0});r9.Lexer=void 0;r9.isPunctuatorTokenKind=mE;var Y0=CP(),l9=C0(),yE=a8(),C2=$P(),p=s8();class c9{constructor(D){let P=new l9.Token(p.TokenKind.SOF,0,0,0,0);this.source=D,this.lastToken=P,this.token=P,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let D=this.token;if(D.kind!==p.TokenKind.EOF)do if(D.next)D=D.next;else{let P=lE(this,D.end);D.next=P,P.prev=D,D=P}while(D.kind===p.TokenKind.COMMENT);return D}}r9.Lexer=c9;function mE(D){return D===p.TokenKind.BANG||D===p.TokenKind.DOLLAR||D===p.TokenKind.AMP||D===p.TokenKind.PAREN_L||D===p.TokenKind.PAREN_R||D===p.TokenKind.SPREAD||D===p.TokenKind.COLON||D===p.TokenKind.EQUALS||D===p.TokenKind.AT||D===p.TokenKind.BRACKET_L||D===p.TokenKind.BRACKET_R||D===p.TokenKind.BRACE_L||D===p.TokenKind.PIPE||D===p.TokenKind.BRACE_R}function F8(D){return D>=0&&D<=55295||D>=57344&&D<=1114111}function MP(D,P){return p9(D.charCodeAt(P))&&d9(D.charCodeAt(P+1))}function p9(D){return D>=55296&&D<=56319}function d9(D){return D>=56320&&D<=57343}function $2(D,P){let O=D.source.body.codePointAt(P);if(O===void 0)return p.TokenKind.EOF;else if(O>=32&&O<=126){let W=String.fromCodePoint(O);return W==='"'?"'\"'":`"${W}"`}return"U+"+O.toString(16).toUpperCase().padStart(4,"0")}function zD(D,P,O,W,F){let R=D.line,L=1+O-D.lineStart;return new l9.Token(P,O,W,R,L,F)}function lE(D,P){let O=D.source.body,W=O.length,F=P;while(F=48&&D<=57?D-48:D>=65&&D<=70?D-55:D>=97&&D<=102?D-87:-1}function sE(D,P){let O=D.source.body;switch(O.charCodeAt(P+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` `,size:2};case 114:return{value:`\r`,size:2};case 116:return{value:"\t",size:2}}throw Y0.syntaxError(D.source,P,`Invalid character escape sequence: "${O.slice(P,P+2)}".`)}function nE(D,P){let O=D.source.body,W=O.length,F=D.lineStart,R=P+3,L=R,B="",Z=[];while(R{Object.defineProperty(n9,"__esModule",{value:!0});n9.inspect=eE;var oE=10,s9=2;function eE(D){return bP(D,[])}function bP(D,P){switch(typeof D){case"string":return JSON.stringify(D);case"function":return D.name?`[function ${D.name}]`:"[function]";case"object":return DA(D,P);default:return String(D)}}function DA(D,P){if(D===null)return"null";if(P.includes(D))return"[Circular]";let O=[...P,D];if(PA(D)){let W=D.toJSON();if(W!==D)return typeof W==="string"?W:bP(W,O)}else if(Array.isArray(D))return WA(D,O);return OA(D,O)}function PA(D){return typeof D.toJSON==="function"}function OA(D,P){let O=Object.entries(D);if(O.length===0)return"{}";if(P.length>s9)return"["+FA(D)+"]";return"{ "+O.map(([F,R])=>F+": "+bP(R,P)).join(", ")+" }"}function WA(D,P){if(D.length===0)return"[]";if(P.length>s9)return"[Array]";let O=Math.min(oE,D.length),W=D.length-O,F=[];for(let R=0;R1)F.push(`... ${W} more items`);return"["+F.join(", ")+"]"}function FA(D){let P=Object.prototype.toString.call(D).replace(/^\[object /,"").replace(/]$/,"");if(P==="Object"&&typeof D.constructor==="function"){let O=D.constructor.name;if(typeof O==="string"&&O!=="")return O}return P}});var i8=S((i9)=>{Object.defineProperty(i9,"__esModule",{value:!0});i9.instanceOf=void 0;var LA=OD(),BA=globalThis.process&&!1,ZA=BA?function D(P,O){return P instanceof O}:function D(P,O){if(P instanceof O)return!0;if(typeof P==="object"&&P!==null){var W;let F=O.prototype[Symbol.toStringTag],R=Symbol.toStringTag in P?P[Symbol.toStringTag]:(W=P.constructor)===null||W===void 0?void 0:W.name;if(F===R){let L=LA.inspect(P);throw new Error(`Cannot use ${F} "${L}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`)}}return!1};i9.instanceOf=ZA});var KP=S((o9)=>{Object.defineProperty(o9,"__esModule",{value:!0});o9.Source=void 0;o9.isSource=YA;var XW=hD(),HA=OD(),qA=i8();class EW{constructor(D,P="GraphQL request",O={line:1,column:1}){typeof D==="string"||XW.devAssert(!1,`Body must be a string. Received: ${HA.inspect(D)}.`),this.body=D,this.name=P,this.locationOffset=O,this.locationOffset.line>0||XW.devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||XW.devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}o9.Source=EW;function YA(D){return qA.instanceOf(D,EW)}});var L8=S((WR)=>{Object.defineProperty(WR,"__esModule",{value:!0});WR.Parser=void 0;WR.parse=SA;WR.parseConstValue=EA;WR.parseType=AA;WR.parseValue=XA;var M2=CP(),t8=C0(),JA=W8(),y=r(),PR=wP(),DR=KP(),V=s8();function SA(D,P){return new R8(D,P).parseDocument()}function XA(D,P){let O=new R8(D,P);O.expectToken(V.TokenKind.SOF);let W=O.parseValueLiteral(!1);return O.expectToken(V.TokenKind.EOF),W}function EA(D,P){let O=new R8(D,P);O.expectToken(V.TokenKind.SOF);let W=O.parseConstValueLiteral();return O.expectToken(V.TokenKind.EOF),W}function AA(D,P){let O=new R8(D,P);O.expectToken(V.TokenKind.SOF);let W=O.parseTypeReference();return O.expectToken(V.TokenKind.EOF),W}class R8{constructor(D,P={}){let O=DR.isSource(D)?D:new DR.Source(D);this._lexer=new PR.Lexer(O),this._options=P,this._tokenCounter=0}parseName(){let D=this.expectToken(V.TokenKind.NAME);return this.node(D,{kind:y.Kind.NAME,value:D.value})}parseDocument(){return this.node(this._lexer.token,{kind:y.Kind.DOCUMENT,definitions:this.many(V.TokenKind.SOF,this.parseDefinition,V.TokenKind.EOF)})}parseDefinition(){if(this.peek(V.TokenKind.BRACE_L))return this.parseOperationDefinition();let D=this.peekDescription(),P=D?this._lexer.lookahead():this._lexer.token;if(P.kind===V.TokenKind.NAME){switch(P.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(D)throw M2.syntaxError(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(P.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(P)}parseOperationDefinition(){let D=this._lexer.token;if(this.peek(V.TokenKind.BRACE_L))return this.node(D,{kind:y.Kind.OPERATION_DEFINITION,operation:t8.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let P=this.parseOperationType(),O;if(this.peek(V.TokenKind.NAME))O=this.parseName();return this.node(D,{kind:y.Kind.OPERATION_DEFINITION,operation:P,name:O,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let D=this.expectToken(V.TokenKind.NAME);switch(D.value){case"query":return t8.OperationTypeNode.QUERY;case"mutation":return t8.OperationTypeNode.MUTATION;case"subscription":return t8.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(D)}parseVariableDefinitions(){return this.optionalMany(V.TokenKind.PAREN_L,this.parseVariableDefinition,V.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:y.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(V.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(V.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let D=this._lexer.token;return this.expectToken(V.TokenKind.DOLLAR),this.node(D,{kind:y.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:y.Kind.SELECTION_SET,selections:this.many(V.TokenKind.BRACE_L,this.parseSelection,V.TokenKind.BRACE_R)})}parseSelection(){return this.peek(V.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let D=this._lexer.token,P=this.parseName(),O,W;if(this.expectOptionalToken(V.TokenKind.COLON))O=P,W=this.parseName();else W=P;return this.node(D,{kind:y.Kind.FIELD,alias:O,name:W,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(V.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(D){let P=D?this.parseConstArgument:this.parseArgument;return this.optionalMany(V.TokenKind.PAREN_L,P,V.TokenKind.PAREN_R)}parseArgument(D=!1){let P=this._lexer.token,O=this.parseName();return this.expectToken(V.TokenKind.COLON),this.node(P,{kind:y.Kind.ARGUMENT,name:O,value:this.parseValueLiteral(D)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let D=this._lexer.token;this.expectToken(V.TokenKind.SPREAD);let P=this.expectOptionalKeyword("on");if(!P&&this.peek(V.TokenKind.NAME))return this.node(D,{kind:y.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)});return this.node(D,{kind:y.Kind.INLINE_FRAGMENT,typeCondition:P?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let D=this._lexer.token;if(this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0)return this.node(D,{kind:y.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()});return this.node(D,{kind:y.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(D){let P=this._lexer.token;switch(P.kind){case V.TokenKind.BRACKET_L:return this.parseList(D);case V.TokenKind.BRACE_L:return this.parseObject(D);case V.TokenKind.INT:return this.advanceLexer(),this.node(P,{kind:y.Kind.INT,value:P.value});case V.TokenKind.FLOAT:return this.advanceLexer(),this.node(P,{kind:y.Kind.FLOAT,value:P.value});case V.TokenKind.STRING:case V.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case V.TokenKind.NAME:switch(this.advanceLexer(),P.value){case"true":return this.node(P,{kind:y.Kind.BOOLEAN,value:!0});case"false":return this.node(P,{kind:y.Kind.BOOLEAN,value:!1});case"null":return this.node(P,{kind:y.Kind.NULL});default:return this.node(P,{kind:y.Kind.ENUM,value:P.value})}case V.TokenKind.DOLLAR:if(D)if(this.expectToken(V.TokenKind.DOLLAR),this._lexer.token.kind===V.TokenKind.NAME){let O=this._lexer.token.value;throw M2.syntaxError(this._lexer.source,P.start,`Unexpected variable "\$${O}" in constant value.`)}else throw this.unexpected(P);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let D=this._lexer.token;return this.advanceLexer(),this.node(D,{kind:y.Kind.STRING,value:D.value,block:D.kind===V.TokenKind.BLOCK_STRING})}parseList(D){let P=()=>this.parseValueLiteral(D);return this.node(this._lexer.token,{kind:y.Kind.LIST,values:this.any(V.TokenKind.BRACKET_L,P,V.TokenKind.BRACKET_R)})}parseObject(D){let P=()=>this.parseObjectField(D);return this.node(this._lexer.token,{kind:y.Kind.OBJECT,fields:this.any(V.TokenKind.BRACE_L,P,V.TokenKind.BRACE_R)})}parseObjectField(D){let P=this._lexer.token,O=this.parseName();return this.expectToken(V.TokenKind.COLON),this.node(P,{kind:y.Kind.OBJECT_FIELD,name:O,value:this.parseValueLiteral(D)})}parseDirectives(D){let P=[];while(this.peek(V.TokenKind.AT))P.push(this.parseDirective(D));return P}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(D){let P=this._lexer.token;return this.expectToken(V.TokenKind.AT),this.node(P,{kind:y.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(D)})}parseTypeReference(){let D=this._lexer.token,P;if(this.expectOptionalToken(V.TokenKind.BRACKET_L)){let O=this.parseTypeReference();this.expectToken(V.TokenKind.BRACKET_R),P=this.node(D,{kind:y.Kind.LIST_TYPE,type:O})}else P=this.parseNamedType();if(this.expectOptionalToken(V.TokenKind.BANG))return this.node(D,{kind:y.Kind.NON_NULL_TYPE,type:P});return P}parseNamedType(){return this.node(this._lexer.token,{kind:y.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(V.TokenKind.STRING)||this.peek(V.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("schema");let O=this.parseConstDirectives(),W=this.many(V.TokenKind.BRACE_L,this.parseOperationTypeDefinition,V.TokenKind.BRACE_R);return this.node(D,{kind:y.Kind.SCHEMA_DEFINITION,description:P,directives:O,operationTypes:W})}parseOperationTypeDefinition(){let D=this._lexer.token,P=this.parseOperationType();this.expectToken(V.TokenKind.COLON);let O=this.parseNamedType();return this.node(D,{kind:y.Kind.OPERATION_TYPE_DEFINITION,operation:P,type:O})}parseScalarTypeDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("scalar");let O=this.parseName(),W=this.parseConstDirectives();return this.node(D,{kind:y.Kind.SCALAR_TYPE_DEFINITION,description:P,name:O,directives:W})}parseObjectTypeDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("type");let O=this.parseName(),W=this.parseImplementsInterfaces(),F=this.parseConstDirectives(),R=this.parseFieldsDefinition();return this.node(D,{kind:y.Kind.OBJECT_TYPE_DEFINITION,description:P,name:O,interfaces:W,directives:F,fields:R})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(V.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(V.TokenKind.BRACE_L,this.parseFieldDefinition,V.TokenKind.BRACE_R)}parseFieldDefinition(){let D=this._lexer.token,P=this.parseDescription(),O=this.parseName(),W=this.parseArgumentDefs();this.expectToken(V.TokenKind.COLON);let F=this.parseTypeReference(),R=this.parseConstDirectives();return this.node(D,{kind:y.Kind.FIELD_DEFINITION,description:P,name:O,arguments:W,type:F,directives:R})}parseArgumentDefs(){return this.optionalMany(V.TokenKind.PAREN_L,this.parseInputValueDef,V.TokenKind.PAREN_R)}parseInputValueDef(){let D=this._lexer.token,P=this.parseDescription(),O=this.parseName();this.expectToken(V.TokenKind.COLON);let W=this.parseTypeReference(),F;if(this.expectOptionalToken(V.TokenKind.EQUALS))F=this.parseConstValueLiteral();let R=this.parseConstDirectives();return this.node(D,{kind:y.Kind.INPUT_VALUE_DEFINITION,description:P,name:O,type:W,defaultValue:F,directives:R})}parseInterfaceTypeDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("interface");let O=this.parseName(),W=this.parseImplementsInterfaces(),F=this.parseConstDirectives(),R=this.parseFieldsDefinition();return this.node(D,{kind:y.Kind.INTERFACE_TYPE_DEFINITION,description:P,name:O,interfaces:W,directives:F,fields:R})}parseUnionTypeDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("union");let O=this.parseName(),W=this.parseConstDirectives(),F=this.parseUnionMemberTypes();return this.node(D,{kind:y.Kind.UNION_TYPE_DEFINITION,description:P,name:O,directives:W,types:F})}parseUnionMemberTypes(){return this.expectOptionalToken(V.TokenKind.EQUALS)?this.delimitedMany(V.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("enum");let O=this.parseName(),W=this.parseConstDirectives(),F=this.parseEnumValuesDefinition();return this.node(D,{kind:y.Kind.ENUM_TYPE_DEFINITION,description:P,name:O,directives:W,values:F})}parseEnumValuesDefinition(){return this.optionalMany(V.TokenKind.BRACE_L,this.parseEnumValueDefinition,V.TokenKind.BRACE_R)}parseEnumValueDefinition(){let D=this._lexer.token,P=this.parseDescription(),O=this.parseEnumValueName(),W=this.parseConstDirectives();return this.node(D,{kind:y.Kind.ENUM_VALUE_DEFINITION,description:P,name:O,directives:W})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw M2.syntaxError(this._lexer.source,this._lexer.token.start,`${VP(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("input");let O=this.parseName(),W=this.parseConstDirectives(),F=this.parseInputFieldsDefinition();return this.node(D,{kind:y.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:P,name:O,directives:W,fields:F})}parseInputFieldsDefinition(){return this.optionalMany(V.TokenKind.BRACE_L,this.parseInputValueDef,V.TokenKind.BRACE_R)}parseTypeSystemExtension(){let D=this._lexer.lookahead();if(D.kind===V.TokenKind.NAME)switch(D.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(D)}parseSchemaExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let P=this.parseConstDirectives(),O=this.optionalMany(V.TokenKind.BRACE_L,this.parseOperationTypeDefinition,V.TokenKind.BRACE_R);if(P.length===0&&O.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.SCHEMA_EXTENSION,directives:P,operationTypes:O})}parseScalarTypeExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let P=this.parseName(),O=this.parseConstDirectives();if(O.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.SCALAR_TYPE_EXTENSION,name:P,directives:O})}parseObjectTypeExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let P=this.parseName(),O=this.parseImplementsInterfaces(),W=this.parseConstDirectives(),F=this.parseFieldsDefinition();if(O.length===0&&W.length===0&&F.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.OBJECT_TYPE_EXTENSION,name:P,interfaces:O,directives:W,fields:F})}parseInterfaceTypeExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let P=this.parseName(),O=this.parseImplementsInterfaces(),W=this.parseConstDirectives(),F=this.parseFieldsDefinition();if(O.length===0&&W.length===0&&F.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.INTERFACE_TYPE_EXTENSION,name:P,interfaces:O,directives:W,fields:F})}parseUnionTypeExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let P=this.parseName(),O=this.parseConstDirectives(),W=this.parseUnionMemberTypes();if(O.length===0&&W.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.UNION_TYPE_EXTENSION,name:P,directives:O,types:W})}parseEnumTypeExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let P=this.parseName(),O=this.parseConstDirectives(),W=this.parseEnumValuesDefinition();if(O.length===0&&W.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.ENUM_TYPE_EXTENSION,name:P,directives:O,values:W})}parseInputObjectTypeExtension(){let D=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let P=this.parseName(),O=this.parseConstDirectives(),W=this.parseInputFieldsDefinition();if(O.length===0&&W.length===0)throw this.unexpected();return this.node(D,{kind:y.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:P,directives:O,fields:W})}parseDirectiveDefinition(){let D=this._lexer.token,P=this.parseDescription();this.expectKeyword("directive"),this.expectToken(V.TokenKind.AT);let O=this.parseName(),W=this.parseArgumentDefs(),F=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let R=this.parseDirectiveLocations();return this.node(D,{kind:y.Kind.DIRECTIVE_DEFINITION,description:P,name:O,arguments:W,repeatable:F,locations:R})}parseDirectiveLocations(){return this.delimitedMany(V.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let D=this._lexer.token,P=this.parseName();if(Object.prototype.hasOwnProperty.call(JA.DirectiveLocation,P.value))return P;throw this.unexpected(D)}node(D,P){if(this._options.noLocation!==!0)P.loc=new t8.Location(D,this._lexer.lastToken,this._lexer.source);return P}peek(D){return this._lexer.token.kind===D}expectToken(D){let P=this._lexer.token;if(P.kind===D)return this.advanceLexer(),P;throw M2.syntaxError(this._lexer.source,P.start,`Expected ${OR(D)}, found ${VP(P)}.`)}expectOptionalToken(D){if(this._lexer.token.kind===D)return this.advanceLexer(),!0;return!1}expectKeyword(D){let P=this._lexer.token;if(P.kind===V.TokenKind.NAME&&P.value===D)this.advanceLexer();else throw M2.syntaxError(this._lexer.source,P.start,`Expected "${D}", found ${VP(P)}.`)}expectOptionalKeyword(D){let P=this._lexer.token;if(P.kind===V.TokenKind.NAME&&P.value===D)return this.advanceLexer(),!0;return!1}unexpected(D){let P=D!==null&&D!==void 0?D:this._lexer.token;return M2.syntaxError(this._lexer.source,P.start,`Unexpected ${VP(P)}.`)}any(D,P,O){this.expectToken(D);let W=[];while(!this.expectOptionalToken(O))W.push(P.call(this));return W}optionalMany(D,P,O){if(this.expectOptionalToken(D)){let W=[];do W.push(P.call(this));while(!this.expectOptionalToken(O));return W}return[]}many(D,P,O){this.expectToken(D);let W=[];do W.push(P.call(this));while(!this.expectOptionalToken(O));return W}delimitedMany(D,P){this.expectOptionalToken(D);let O=[];do O.push(P.call(this));while(this.expectOptionalToken(D));return O}advanceLexer(){let{maxTokens:D}=this._options,P=this._lexer.advance();if(D!==void 0&&P.kind!==V.TokenKind.EOF){if(++this._tokenCounter,this._tokenCounter>D)throw M2.syntaxError(this._lexer.source,P.start,`Document contains more that ${D} tokens. Parsing aborted.`)}}}WR.Parser=R8;function VP(D){let P=D.value;return OR(D.kind)+(P!=null?` "${P}"`:"")}function OR(D){return PR.isPunctuatorTokenKind(D)?`"${D}"`:D}});var o0=S((RR)=>{Object.defineProperty(RR,"__esModule",{value:!0});RR.didYouMean=$A;var CA=5;function $A(D,P){let[O,W]=P?[D,P]:[void 0,D],F=" Did you mean ";if(O)F+=O+" ";let R=W.map((Z)=>`"${Z}"`);switch(R.length){case 0:return"";case 1:return F+R[0]+"?";case 2:return F+R[0]+" or "+R[1]+"?"}let L=R.slice(0,CA),B=L.pop();return F+L.join(", ")+", or "+B+"?"}});var BR=S((LR)=>{Object.defineProperty(LR,"__esModule",{value:!0});LR.identityFunc=wA;function wA(D){return D}});var e0=S((ZR)=>{Object.defineProperty(ZR,"__esModule",{value:!0});ZR.keyMap=KA;function KA(D,P){let O=Object.create(null);for(let W of D)O[P(W)]=W;return O}});var o8=S((HR)=>{Object.defineProperty(HR,"__esModule",{value:!0});HR.keyValMap=jA;function jA(D,P,O){let W=Object.create(null);for(let F of D)W[P(F)]=O(F);return W}});var AW=S((qR)=>{Object.defineProperty(qR,"__esModule",{value:!0});qR.mapValue=uA;function uA(D,P){let O=Object.create(null);for(let W of Object.keys(D))O[W]=P(D[W],W);return O}});var e8=S((YR)=>{Object.defineProperty(YR,"__esModule",{value:!0});YR.naturalCompare=NA;function NA(D,P){let O=0,W=0;while(O0);let B=0;do++W,B=B*10+R-GW,R=P.charCodeAt(W);while(jP(R)&&B>0);if(LB)return 1}else{if(FR)return 1;++O,++W}}return D.length-P.length}var GW=48,kA=57;function jP(D){return!isNaN(D)&&GW<=D&&D<=kA}});var D2=S((SR)=>{Object.defineProperty(SR,"__esModule",{value:!0});SR.suggestionList=hA;var xA=e8();function hA(D,P){let O=Object.create(null),W=new JR(D),F=Math.floor(D.length*0.4)+1;for(let R of P){let L=W.measure(R,F);if(L!==void 0)O[R]=L}return Object.keys(O).sort((R,L)=>{let B=O[R]-O[L];return B!==0?B:xA.naturalCompare(R,L)})}class JR{constructor(D){this._input=D,this._inputLowerCase=D.toLowerCase(),this._inputArray=UR(this._inputLowerCase),this._rows=[new Array(D.length+1).fill(0),new Array(D.length+1).fill(0),new Array(D.length+1).fill(0)]}measure(D,P){if(this._input===D)return 0;let O=D.toLowerCase();if(this._inputLowerCase===O)return 1;let W=UR(O),F=this._inputArray;if(W.lengthP)return;let B=this._rows;for(let H=0;H<=L;H++)B[0][H]=H;for(let H=1;H<=R;H++){let Y=B[(H-1)%3],q=B[H%3],U=q[0]=H;for(let J=1;J<=L;J++){let A=W[H-1]===F[J-1]?0:1,E=Math.min(Y[J]+1,q[J-1]+1,Y[J-1]+A);if(H>1&&J>1&&W[H-1]===F[J-2]&&W[H-2]===F[J-1]){let G=B[(H-2)%3][J-2];E=Math.min(E,G+1)}if(EP)return}let Z=B[R%3][L];return Z<=P?Z:void 0}}function UR(D){let P=D.length,O=new Array(P);for(let W=0;W{Object.defineProperty(XR,"__esModule",{value:!0});XR.toObjMap=vA;function vA(D){if(D==null)return Object.create(null);if(Object.getPrototypeOf(D)===null)return D;let P=Object.create(null);for(let[O,W]of Object.entries(D))P[O]=W;return P}});var AR=S((ER)=>{Object.defineProperty(ER,"__esModule",{value:!0});ER.printString=mA;function mA(D){return`"${D.replace(lA,cA)}"`}var lA=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function cA(D){return pA[D.charCodeAt(0)]}var pA=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var w2=S((zR)=>{Object.defineProperty(zR,"__esModule",{value:!0});zR.BREAK=void 0;zR.getEnterLeaveForKind=uP;zR.getVisitFn=iA;zR.visit=sA;zR.visitInParallel=nA;var rA=hD(),aA=OD(),zW=C0(),GR=r(),B8=Object.freeze({});zR.BREAK=B8;function sA(D,P,O=zW.QueryDocumentKeys){let W=new Map;for(let Q of Object.values(GR.Kind))W.set(Q,uP(P,Q));let F=void 0,R=Array.isArray(D),L=[D],B=-1,Z=[],H=D,Y=void 0,q=void 0,U=[],J=[];do{B++;let Q=B===L.length,w=Q&&Z.length!==0;if(Q){if(Y=J.length===0?void 0:U[U.length-1],H=q,q=J.pop(),w)if(R){H=H.slice();let j=0;for(let[b,_]of Z){let m=b-j;if(_===null)H.splice(m,1),j++;else H[m]=_}}else{H=Object.defineProperties({},Object.getOwnPropertyDescriptors(H));for(let[j,b]of Z)H[j]=b}B=F.index,L=F.keys,Z=F.edits,R=F.inArray,F=F.prev}else if(q){if(Y=R?B:L[B],H=q[Y],H===null||H===void 0)continue;U.push(Y)}let C;if(!Array.isArray(H)){var A,E;zW.isNode(H)||rA.devAssert(!1,`Invalid AST Node: ${aA.inspect(H)}.`);let j=Q?(A=W.get(H.kind))===null||A===void 0?void 0:A.leave:(E=W.get(H.kind))===null||E===void 0?void 0:E.enter;if(C=j===null||j===void 0?void 0:j.call(P,H,Y,q,U,J),C===B8)break;if(C===!1){if(!Q){U.pop();continue}}else if(C!==void 0){if(Z.push([Y,C]),!Q)if(zW.isNode(C))H=C;else{U.pop();continue}}}if(C===void 0&&w)Z.push([Y,H]);if(Q)U.pop();else{var G;if(F={inArray:R,index:B,keys:L,edits:Z,prev:F},R=Array.isArray(H),L=R?H:(G=O[H.kind])!==null&&G!==void 0?G:[],B=-1,Z=[],q)J.push(q);q=H}}while(F!==void 0);if(Z.length!==0)return Z[Z.length-1][1];return D}function nA(D){let P=new Array(D.length).fill(null),O=Object.create(null);for(let W of Object.values(GR.Kind)){let F=!1,R=new Array(D.length).fill(void 0),L=new Array(D.length).fill(void 0);for(let Z=0;Z{Object.defineProperty(CR,"__esModule",{value:!0});CR.print=FG;var PG=a8(),OG=AR(),WG=w2();function FG(D){return WG.visit(D,LG)}var RG=80,LG={Name:{leave:(D)=>D.value},Variable:{leave:(D)=>"$"+D.name},Document:{leave:(D)=>N(D.definitions,"\n\n")},OperationDefinition:{leave(D){let P=d("(",N(D.variableDefinitions,", "),")"),O=N([D.operation,N([D.name,P]),N(D.directives," ")]," ");return(O==="query"?"":O+" ")+D.selectionSet}},VariableDefinition:{leave:({variable:D,type:P,defaultValue:O,directives:W})=>D+": "+P+d(" = ",O)+d(" ",N(W," "))},SelectionSet:{leave:({selections:D})=>U0(D)},Field:{leave({alias:D,name:P,arguments:O,directives:W,selectionSet:F}){let R=d("",D,": ")+P,L=R+d("(",N(O,", "),")");if(L.length>RG)L=R+d("(\n",TP(N(O,"\n")),"\n)");return N([L,N(W," "),F]," ")}},Argument:{leave:({name:D,value:P})=>D+": "+P},FragmentSpread:{leave:({name:D,directives:P})=>"..."+D+d(" ",N(P," "))},InlineFragment:{leave:({typeCondition:D,directives:P,selectionSet:O})=>N(["...",d("on ",D),N(P," "),O]," ")},FragmentDefinition:{leave:({name:D,typeCondition:P,variableDefinitions:O,directives:W,selectionSet:F})=>`fragment ${D}${d("(",N(O,", "),")")} on ${P} ${d("",N(W," ")," ")}`+F},IntValue:{leave:({value:D})=>D},FloatValue:{leave:({value:D})=>D},StringValue:{leave:({value:D,block:P})=>P?PG.printBlockString(D):OG.printString(D)},BooleanValue:{leave:({value:D})=>D?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:D})=>D},ListValue:{leave:({values:D})=>"["+N(D,", ")+"]"},ObjectValue:{leave:({fields:D})=>"{"+N(D,", ")+"}"},ObjectField:{leave:({name:D,value:P})=>D+": "+P},Directive:{leave:({name:D,arguments:P})=>"@"+D+d("(",N(P,", "),")")},NamedType:{leave:({name:D})=>D},ListType:{leave:({type:D})=>"["+D+"]"},NonNullType:{leave:({type:D})=>D+"!"},SchemaDefinition:{leave:({description:D,directives:P,operationTypes:O})=>d("",D,"\n")+N(["schema",N(P," "),U0(O)]," ")},OperationTypeDefinition:{leave:({operation:D,type:P})=>D+": "+P},ScalarTypeDefinition:{leave:({description:D,name:P,directives:O})=>d("",D,"\n")+N(["scalar",P,N(O," ")]," ")},ObjectTypeDefinition:{leave:({description:D,name:P,interfaces:O,directives:W,fields:F})=>d("",D,"\n")+N(["type",P,d("implements ",N(O," & ")),N(W," "),U0(F)]," ")},FieldDefinition:{leave:({description:D,name:P,arguments:O,type:W,directives:F})=>d("",D,"\n")+P+(QR(O)?d("(\n",TP(N(O,"\n")),"\n)"):d("(",N(O,", "),")"))+": "+W+d(" ",N(F," "))},InputValueDefinition:{leave:({description:D,name:P,type:O,defaultValue:W,directives:F})=>d("",D,"\n")+N([P+": "+O,d("= ",W),N(F," ")]," ")},InterfaceTypeDefinition:{leave:({description:D,name:P,interfaces:O,directives:W,fields:F})=>d("",D,"\n")+N(["interface",P,d("implements ",N(O," & ")),N(W," "),U0(F)]," ")},UnionTypeDefinition:{leave:({description:D,name:P,directives:O,types:W})=>d("",D,"\n")+N(["union",P,N(O," "),d("= ",N(W," | "))]," ")},EnumTypeDefinition:{leave:({description:D,name:P,directives:O,values:W})=>d("",D,"\n")+N(["enum",P,N(O," "),U0(W)]," ")},EnumValueDefinition:{leave:({description:D,name:P,directives:O})=>d("",D,"\n")+N([P,N(O," ")]," ")},InputObjectTypeDefinition:{leave:({description:D,name:P,directives:O,fields:W})=>d("",D,"\n")+N(["input",P,N(O," "),U0(W)]," ")},DirectiveDefinition:{leave:({description:D,name:P,arguments:O,repeatable:W,locations:F})=>d("",D,"\n")+"directive @"+P+(QR(O)?d("(\n",TP(N(O,"\n")),"\n)"):d("(",N(O,", "),")"))+(W?" repeatable":"")+" on "+N(F," | ")},SchemaExtension:{leave:({directives:D,operationTypes:P})=>N(["extend schema",N(D," "),U0(P)]," ")},ScalarTypeExtension:{leave:({name:D,directives:P})=>N(["extend scalar",D,N(P," ")]," ")},ObjectTypeExtension:{leave:({name:D,interfaces:P,directives:O,fields:W})=>N(["extend type",D,d("implements ",N(P," & ")),N(O," "),U0(W)]," ")},InterfaceTypeExtension:{leave:({name:D,interfaces:P,directives:O,fields:W})=>N(["extend interface",D,d("implements ",N(P," & ")),N(O," "),U0(W)]," ")},UnionTypeExtension:{leave:({name:D,directives:P,types:O})=>N(["extend union",D,N(P," "),d("= ",N(O," | "))]," ")},EnumTypeExtension:{leave:({name:D,directives:P,values:O})=>N(["extend enum",D,N(P," "),U0(O)]," ")},InputObjectTypeExtension:{leave:({name:D,directives:P,fields:O})=>N(["extend input",D,N(P," "),U0(O)]," ")}};function N(D,P=""){var O;return(O=D===null||D===void 0?void 0:D.filter((W)=>W).join(P))!==null&&O!==void 0?O:""}function U0(D){return d("{\n",TP(N(D,"\n")),"\n}")}function d(D,P,O=""){return P!=null&&P!==""?D+P+O:""}function TP(D){return d(" ",D.replace(/\n/g,"\n "))}function QR(D){var P;return(P=D===null||D===void 0?void 0:D.some((O)=>O.includes("\n")))!==null&&P!==void 0?P:!1}});var QW=S(($R)=>{Object.defineProperty($R,"__esModule",{value:!0});$R.valueFromASTUntyped=IW;var ZG=o8(),v0=r();function IW(D,P){switch(D.kind){case v0.Kind.NULL:return null;case v0.Kind.INT:return parseInt(D.value,10);case v0.Kind.FLOAT:return parseFloat(D.value);case v0.Kind.STRING:case v0.Kind.ENUM:case v0.Kind.BOOLEAN:return D.value;case v0.Kind.LIST:return D.values.map((O)=>IW(O,P));case v0.Kind.OBJECT:return ZG.keyValMap(D.fields,(O)=>O.name.value,(O)=>IW(O.value,P));case v0.Kind.VARIABLE:return P===null||P===void 0?void 0:P[D.name.value]}}});var D1=S((KR)=>{Object.defineProperty(KR,"__esModule",{value:!0});KR.assertEnumValueName=qG;KR.assertName=bR;var MR=hD(),NP=g(),wR=$P();function bR(D){if(D!=null||MR.devAssert(!1,"Must provide name."),typeof D==="string"||MR.devAssert(!1,"Expected name to be a string."),D.length===0)throw new NP.GraphQLError("Expected name to be a non-empty string.");for(let P=1;P{Object.defineProperty(mR,"__esModule",{value:!0});mR.GraphQLUnionType=mR.GraphQLScalarType=mR.GraphQLObjectType=mR.GraphQLNonNull=mR.GraphQLList=mR.GraphQLInterfaceType=mR.GraphQLInputObjectType=mR.GraphQLEnumType=void 0;mR.argsToArgsConfig=yR;mR.assertAbstractType=TG;mR.assertCompositeType=uG;mR.assertEnumType=MG;mR.assertInputObjectType=wG;mR.assertInputType=VG;mR.assertInterfaceType=CG;mR.assertLeafType=_G;mR.assertListType=bG;mR.assertNamedType=xG;mR.assertNonNullType=KG;mR.assertNullableType=kG;mR.assertObjectType=QG;mR.assertOutputType=jG;mR.assertScalarType=IG;mR.assertType=zG;mR.assertUnionType=$G;mR.assertWrappingType=NG;mR.defineArguments=gR;mR.getNamedType=hG;mR.getNullableType=fG;mR.isAbstractType=kR;mR.isCompositeType=NR;mR.isEnumType=j2;mR.isInputObjectType=O1;mR.isInputType=CW;mR.isInterfaceType=K2;mR.isLeafType=TR;mR.isListType=hP;mR.isNamedType=fR;mR.isNonNullType=O2;mR.isNullableType=bW;mR.isObjectType=H8;mR.isOutputType=$W;mR.isRequiredArgument=gG;mR.isRequiredInputField=mG;mR.isScalarType=b2;mR.isType=xP;mR.isUnionType=V2;mR.isWrappingType=W1;mR.resolveObjMapThunk=VW;mR.resolveReadonlyArrayThunk=KW;var KD=hD(),JG=o0(),VR=BR(),LD=OD(),P2=i8(),SG=Q0(),XG=e0(),uR=o8(),fP=AW(),EG=D2(),$0=_P(),P1=g(),AG=r(),jR=rD(),GG=QW(),M0=D1();function xP(D){return b2(D)||H8(D)||K2(D)||V2(D)||j2(D)||O1(D)||hP(D)||O2(D)}function zG(D){if(!xP(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL type.`);return D}function b2(D){return P2.instanceOf(D,jW)}function IG(D){if(!b2(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Scalar type.`);return D}function H8(D){return P2.instanceOf(D,_W)}function QG(D){if(!H8(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Object type.`);return D}function K2(D){return P2.instanceOf(D,uW)}function CG(D){if(!K2(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Interface type.`);return D}function V2(D){return P2.instanceOf(D,TW)}function $G(D){if(!V2(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Union type.`);return D}function j2(D){return P2.instanceOf(D,NW)}function MG(D){if(!j2(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Enum type.`);return D}function O1(D){return P2.instanceOf(D,kW)}function wG(D){if(!O1(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Input Object type.`);return D}function hP(D){return P2.instanceOf(D,MW)}function bG(D){if(!hP(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL List type.`);return D}function O2(D){return P2.instanceOf(D,wW)}function KG(D){if(!O2(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL Non-Null type.`);return D}function CW(D){return b2(D)||j2(D)||O1(D)||W1(D)&&CW(D.ofType)}function VG(D){if(!CW(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL input type.`);return D}function $W(D){return b2(D)||H8(D)||K2(D)||V2(D)||j2(D)||W1(D)&&$W(D.ofType)}function jG(D){if(!$W(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL output type.`);return D}function TR(D){return b2(D)||j2(D)}function _G(D){if(!TR(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL leaf type.`);return D}function NR(D){return H8(D)||K2(D)||V2(D)}function uG(D){if(!NR(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL composite type.`);return D}function kR(D){return K2(D)||V2(D)}function TG(D){if(!kR(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL abstract type.`);return D}class MW{constructor(D){xP(D)||KD.devAssert(!1,`Expected ${LD.inspect(D)} to be a GraphQL type.`),this.ofType=D}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}mR.GraphQLList=MW;class wW{constructor(D){bW(D)||KD.devAssert(!1,`Expected ${LD.inspect(D)} to be a GraphQL nullable type.`),this.ofType=D}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}mR.GraphQLNonNull=wW;function W1(D){return hP(D)||O2(D)}function NG(D){if(!W1(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL wrapping type.`);return D}function bW(D){return xP(D)&&!O2(D)}function kG(D){if(!bW(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL nullable type.`);return D}function fG(D){if(D)return O2(D)?D.ofType:D}function fR(D){return b2(D)||H8(D)||K2(D)||V2(D)||j2(D)||O1(D)}function xG(D){if(!fR(D))throw new Error(`Expected ${LD.inspect(D)} to be a GraphQL named type.`);return D}function hG(D){if(D){let P=D;while(W1(P))P=P.ofType;return P}}function KW(D){return typeof D==="function"?D():D}function VW(D){return typeof D==="function"?D():D}class jW{constructor(D){var P,O,W,F;let R=(P=D.parseValue)!==null&&P!==void 0?P:VR.identityFunc;if(this.name=M0.assertName(D.name),this.description=D.description,this.specifiedByURL=D.specifiedByURL,this.serialize=(O=D.serialize)!==null&&O!==void 0?O:VR.identityFunc,this.parseValue=R,this.parseLiteral=(W=D.parseLiteral)!==null&&W!==void 0?W:(L,B)=>R(GG.valueFromASTUntyped(L,B)),this.extensions=$0.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(F=D.extensionASTNodes)!==null&&F!==void 0?F:[],D.specifiedByURL==null||typeof D.specifiedByURL==="string"||KD.devAssert(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${LD.inspect(D.specifiedByURL)}.`),D.serialize==null||typeof D.serialize==="function"||KD.devAssert(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),D.parseLiteral)typeof D.parseValue==="function"&&typeof D.parseLiteral==="function"||KD.devAssert(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}mR.GraphQLScalarType=jW;class _W{constructor(D){var P;this.name=M0.assertName(D.name),this.description=D.description,this.isTypeOf=D.isTypeOf,this.extensions=$0.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(P=D.extensionASTNodes)!==null&&P!==void 0?P:[],this._fields=()=>hR(D),this._interfaces=()=>xR(D),D.isTypeOf==null||typeof D.isTypeOf==="function"||KD.devAssert(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${LD.inspect(D.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){if(typeof this._fields==="function")this._fields=this._fields();return this._fields}getInterfaces(){if(typeof this._interfaces==="function")this._interfaces=this._interfaces();return this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:vR(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}mR.GraphQLObjectType=_W;function xR(D){var P;let O=KW((P=D.interfaces)!==null&&P!==void 0?P:[]);return Array.isArray(O)||KD.devAssert(!1,`${D.name} interfaces must be an Array or a function which returns an Array.`),O}function hR(D){let P=VW(D.fields);return Z8(P)||KD.devAssert(!1,`${D.name} fields must be an object with field names as keys or a function which returns such an object.`),fP.mapValue(P,(O,W)=>{var F;Z8(O)||KD.devAssert(!1,`${D.name}.${W} field config must be an object.`),O.resolve==null||typeof O.resolve==="function"||KD.devAssert(!1,`${D.name}.${W} field resolver must be a function if provided, but got: ${LD.inspect(O.resolve)}.`);let R=(F=O.args)!==null&&F!==void 0?F:{};return Z8(R)||KD.devAssert(!1,`${D.name}.${W} args must be an object with argument names as keys.`),{name:M0.assertName(W),description:O.description,type:O.type,args:gR(R),resolve:O.resolve,subscribe:O.subscribe,deprecationReason:O.deprecationReason,extensions:$0.toObjMap(O.extensions),astNode:O.astNode}})}function gR(D){return Object.entries(D).map(([P,O])=>({name:M0.assertName(P),description:O.description,type:O.type,defaultValue:O.defaultValue,deprecationReason:O.deprecationReason,extensions:$0.toObjMap(O.extensions),astNode:O.astNode}))}function Z8(D){return SG.isObjectLike(D)&&!Array.isArray(D)}function vR(D){return fP.mapValue(D,(P)=>({description:P.description,type:P.type,args:yR(P.args),resolve:P.resolve,subscribe:P.subscribe,deprecationReason:P.deprecationReason,extensions:P.extensions,astNode:P.astNode}))}function yR(D){return uR.keyValMap(D,(P)=>P.name,(P)=>({description:P.description,type:P.type,defaultValue:P.defaultValue,deprecationReason:P.deprecationReason,extensions:P.extensions,astNode:P.astNode}))}function gG(D){return O2(D.type)&&D.defaultValue===void 0}class uW{constructor(D){var P;this.name=M0.assertName(D.name),this.description=D.description,this.resolveType=D.resolveType,this.extensions=$0.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(P=D.extensionASTNodes)!==null&&P!==void 0?P:[],this._fields=hR.bind(void 0,D),this._interfaces=xR.bind(void 0,D),D.resolveType==null||typeof D.resolveType==="function"||KD.devAssert(!1,`${this.name} must provide "resolveType" as a function, but got: ${LD.inspect(D.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){if(typeof this._fields==="function")this._fields=this._fields();return this._fields}getInterfaces(){if(typeof this._interfaces==="function")this._interfaces=this._interfaces();return this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:vR(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}mR.GraphQLInterfaceType=uW;class TW{constructor(D){var P;this.name=M0.assertName(D.name),this.description=D.description,this.resolveType=D.resolveType,this.extensions=$0.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(P=D.extensionASTNodes)!==null&&P!==void 0?P:[],this._types=vG.bind(void 0,D),D.resolveType==null||typeof D.resolveType==="function"||KD.devAssert(!1,`${this.name} must provide "resolveType" as a function, but got: ${LD.inspect(D.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){if(typeof this._types==="function")this._types=this._types();return this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}mR.GraphQLUnionType=TW;function vG(D){let P=KW(D.types);return Array.isArray(P)||KD.devAssert(!1,`Must provide Array of types or a function which returns such an array for Union ${D.name}.`),P}class NW{constructor(D){var P;this.name=M0.assertName(D.name),this.description=D.description,this.extensions=$0.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(P=D.extensionASTNodes)!==null&&P!==void 0?P:[],this._values=typeof D.values==="function"?D.values:_R(this.name,D.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){if(typeof this._values==="function")this._values=_R(this.name,this._values());return this._values}getValue(D){if(this._nameLookup===null)this._nameLookup=XG.keyMap(this.getValues(),(P)=>P.name);return this._nameLookup[D]}serialize(D){if(this._valueLookup===null)this._valueLookup=new Map(this.getValues().map((O)=>[O.value,O]));let P=this._valueLookup.get(D);if(P===void 0)throw new P1.GraphQLError(`Enum "${this.name}" cannot represent value: ${LD.inspect(D)}`);return P.name}parseValue(D){if(typeof D!=="string"){let O=LD.inspect(D);throw new P1.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${O}.`+kP(this,O))}let P=this.getValue(D);if(P==null)throw new P1.GraphQLError(`Value "${D}" does not exist in "${this.name}" enum.`+kP(this,D));return P.value}parseLiteral(D,P){if(D.kind!==AG.Kind.ENUM){let W=jR.print(D);throw new P1.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${W}.`+kP(this,W),{nodes:D})}let O=this.getValue(D.value);if(O==null){let W=jR.print(D);throw new P1.GraphQLError(`Value "${W}" does not exist in "${this.name}" enum.`+kP(this,W),{nodes:D})}return O.value}toConfig(){let D=uR.keyValMap(this.getValues(),(P)=>P.name,(P)=>({description:P.description,value:P.value,deprecationReason:P.deprecationReason,extensions:P.extensions,astNode:P.astNode}));return{name:this.name,description:this.description,values:D,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}mR.GraphQLEnumType=NW;function kP(D,P){let O=D.getValues().map((F)=>F.name),W=EG.suggestionList(P,O);return JG.didYouMean("the enum value",W)}function _R(D,P){return Z8(P)||KD.devAssert(!1,`${D} values must be an object with value names as keys.`),Object.entries(P).map(([O,W])=>{return Z8(W)||KD.devAssert(!1,`${D}.${O} must refer to an object with a "value" key representing an internal value but got: ${LD.inspect(W)}.`),{name:M0.assertEnumValueName(O),description:W.description,value:W.value!==void 0?W.value:O,deprecationReason:W.deprecationReason,extensions:$0.toObjMap(W.extensions),astNode:W.astNode}})}class kW{constructor(D){var P,O;this.name=M0.assertName(D.name),this.description=D.description,this.extensions=$0.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(P=D.extensionASTNodes)!==null&&P!==void 0?P:[],this.isOneOf=(O=D.isOneOf)!==null&&O!==void 0?O:!1,this._fields=yG.bind(void 0,D)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){if(typeof this._fields==="function")this._fields=this._fields();return this._fields}toConfig(){let D=fP.mapValue(this.getFields(),(P)=>({description:P.description,type:P.type,defaultValue:P.defaultValue,deprecationReason:P.deprecationReason,extensions:P.extensions,astNode:P.astNode}));return{name:this.name,description:this.description,fields:D,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}mR.GraphQLInputObjectType=kW;function yG(D){let P=VW(D.fields);return Z8(P)||KD.devAssert(!1,`${D.name} fields must be an object with field names as keys or a function which returns such an object.`),fP.mapValue(P,(O,W)=>{return!("resolve"in O)||KD.devAssert(!1,`${D.name}.${W} field has a resolve property, but Input Types cannot define resolvers.`),{name:M0.assertName(W),description:O.description,type:O.type,defaultValue:O.defaultValue,deprecationReason:O.deprecationReason,extensions:$0.toObjMap(O.extensions),astNode:O.astNode}})}function mG(D){return O2(D.type)&&D.defaultValue===void 0}});var F1=S((cR)=>{Object.defineProperty(cR,"__esModule",{value:!0});cR.doTypesOverlap=hz;cR.isEqualType=fW;cR.isTypeSubTypeOf=gP;var kD=a();function fW(D,P){if(D===P)return!0;if(kD.isNonNullType(D)&&kD.isNonNullType(P))return fW(D.ofType,P.ofType);if(kD.isListType(D)&&kD.isListType(P))return fW(D.ofType,P.ofType);return!1}function gP(D,P,O){if(P===O)return!0;if(kD.isNonNullType(O)){if(kD.isNonNullType(P))return gP(D,P.ofType,O.ofType);return!1}if(kD.isNonNullType(P))return gP(D,P.ofType,O);if(kD.isListType(O)){if(kD.isListType(P))return gP(D,P.ofType,O.ofType);return!1}if(kD.isListType(P))return!1;return kD.isAbstractType(O)&&(kD.isInterfaceType(P)||kD.isObjectType(P))&&D.isSubType(O,P)}function hz(D,P,O){if(P===O)return!0;if(kD.isAbstractType(P)){if(kD.isAbstractType(O))return D.getPossibleTypes(P).some((W)=>D.isSubType(O,W));return D.isSubType(P,O)}if(kD.isAbstractType(O))return D.isSubType(O,P);return!1}});var w0=S((tR)=>{Object.defineProperty(tR,"__esModule",{value:!0});tR.GraphQLString=tR.GraphQLInt=tR.GraphQLID=tR.GraphQLFloat=tR.GraphQLBoolean=tR.GRAPHQL_MIN_INT=tR.GRAPHQL_MAX_INT=void 0;tR.isSpecifiedScalarType=mz;tR.specifiedScalarTypes=void 0;var J0=OD(),pR=Q0(),VD=g(),_2=r(),R1=rD(),L1=a(),vP=2147483647;tR.GRAPHQL_MAX_INT=vP;var yP=-2147483648;tR.GRAPHQL_MIN_INT=yP;var dR=new L1.GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(D){let P=B1(D);if(typeof P==="boolean")return P?1:0;let O=P;if(typeof P==="string"&&P!=="")O=Number(P);if(typeof O!=="number"||!Number.isInteger(O))throw new VD.GraphQLError(`Int cannot represent non-integer value: ${J0.inspect(P)}`);if(O>vP||OvP||DvP||PD.name===P)}function B1(D){if(pR.isObjectLike(D)){if(typeof D.valueOf==="function"){let P=D.valueOf();if(!pR.isObjectLike(P))return P}if(typeof D.toJSON==="function")return D.toJSON()}return D}});var vD=S((H7)=>{Object.defineProperty(H7,"__esModule",{value:!0});H7.GraphQLSpecifiedByDirective=H7.GraphQLSkipDirective=H7.GraphQLOneOfDirective=H7.GraphQLIncludeDirective=H7.GraphQLDirective=H7.GraphQLDeprecatedDirective=H7.DEFAULT_DEPRECATION_REASON=void 0;H7.assertDirective=DI;H7.isDirective=P7;H7.isSpecifiedDirective=PI;H7.specifiedDirectives=void 0;var D7=hD(),nz=OD(),iz=i8(),tz=Q0(),oz=_P(),nD=W8(),ez=D1(),Z1=a(),mP=w0();function P7(D){return iz.instanceOf(D,W2)}function DI(D){if(!P7(D))throw new Error(`Expected ${nz.inspect(D)} to be a GraphQL directive.`);return D}class W2{constructor(D){var P,O;this.name=ez.assertName(D.name),this.description=D.description,this.locations=D.locations,this.isRepeatable=(P=D.isRepeatable)!==null&&P!==void 0?P:!1,this.extensions=oz.toObjMap(D.extensions),this.astNode=D.astNode,Array.isArray(D.locations)||D7.devAssert(!1,`@${D.name} locations must be an Array.`);let W=(O=D.args)!==null&&O!==void 0?O:{};tz.isObjectLike(W)&&!Array.isArray(W)||D7.devAssert(!1,`@${D.name} args must be an object with argument names as keys.`),this.args=Z1.defineArguments(W)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Z1.argsToArgsConfig(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}H7.GraphQLDirective=W2;var O7=new W2({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[nD.DirectiveLocation.FIELD,nD.DirectiveLocation.FRAGMENT_SPREAD,nD.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Z1.GraphQLNonNull(mP.GraphQLBoolean),description:"Included when true."}}});H7.GraphQLIncludeDirective=O7;var W7=new W2({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[nD.DirectiveLocation.FIELD,nD.DirectiveLocation.FRAGMENT_SPREAD,nD.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Z1.GraphQLNonNull(mP.GraphQLBoolean),description:"Skipped when true."}}});H7.GraphQLSkipDirective=W7;var F7="No longer supported";H7.DEFAULT_DEPRECATION_REASON=F7;var R7=new W2({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[nD.DirectiveLocation.FIELD_DEFINITION,nD.DirectiveLocation.ARGUMENT_DEFINITION,nD.DirectiveLocation.INPUT_FIELD_DEFINITION,nD.DirectiveLocation.ENUM_VALUE],args:{reason:{type:mP.GraphQLString,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:F7}}});H7.GraphQLDeprecatedDirective=R7;var L7=new W2({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[nD.DirectiveLocation.SCALAR],args:{url:{type:new Z1.GraphQLNonNull(mP.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});H7.GraphQLSpecifiedByDirective=L7;var B7=new W2({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[nD.DirectiveLocation.INPUT_OBJECT],args:{}});H7.GraphQLOneOfDirective=B7;var Z7=Object.freeze([O7,W7,R7,L7,B7]);H7.specifiedDirectives=Z7;function PI(D){return Z7.some(({name:P})=>P===D.name)}});var lP=S((U7)=>{Object.defineProperty(U7,"__esModule",{value:!0});U7.isIterableObject=YI;function YI(D){return typeof D==="object"&&typeof(D===null||D===void 0?void 0:D[Symbol.iterator])==="function"}});var Y1=S((X7)=>{Object.defineProperty(X7,"__esModule",{value:!0});X7.astFromValue=q1;var J7=OD(),JI=ND(),SI=lP(),XI=Q0(),iD=r(),H1=a(),EI=w0();function q1(D,P){if(H1.isNonNullType(P)){let O=q1(D,P.ofType);if((O===null||O===void 0?void 0:O.kind)===iD.Kind.NULL)return null;return O}if(D===null)return{kind:iD.Kind.NULL};if(D===void 0)return null;if(H1.isListType(P)){let O=P.ofType;if(SI.isIterableObject(D)){let W=[];for(let F of D){let R=q1(F,O);if(R!=null)W.push(R)}return{kind:iD.Kind.LIST,values:W}}return q1(D,O)}if(H1.isInputObjectType(P)){if(!XI.isObjectLike(D))return null;let O=[];for(let W of Object.values(P.getFields())){let F=q1(D[W.name],W.type);if(F)O.push({kind:iD.Kind.OBJECT_FIELD,name:{kind:iD.Kind.NAME,value:W.name},value:F})}return{kind:iD.Kind.OBJECT,fields:O}}if(H1.isLeafType(P)){let O=P.serialize(D);if(O==null)return null;if(typeof O==="boolean")return{kind:iD.Kind.BOOLEAN,value:O};if(typeof O==="number"&&Number.isFinite(O)){let W=String(O);return S7.test(W)?{kind:iD.Kind.INT,value:W}:{kind:iD.Kind.FLOAT,value:W}}if(typeof O==="string"){if(H1.isEnumType(P))return{kind:iD.Kind.ENUM,value:O};if(P===EI.GraphQLID&&S7.test(O))return{kind:iD.Kind.INT,value:O};return{kind:iD.Kind.STRING,value:O}}throw new TypeError(`Cannot convert value to AST: ${J7.inspect(O)}.`)}JI.invariant(!1,"Unexpected input type: "+J7.inspect(P))}var S7=/^-?(?:0|[1-9][0-9]*)$/});var oD=S((A7)=>{Object.defineProperty(A7,"__esModule",{value:!0});A7.introspectionTypes=A7.__TypeKind=A7.__Type=A7.__Schema=A7.__InputValue=A7.__Field=A7.__EnumValue=A7.__DirectiveLocation=A7.__Directive=A7.TypeNameMetaFieldDef=A7.TypeMetaFieldDef=A7.TypeKind=A7.SchemaMetaFieldDef=void 0;A7.isIntrospectionType=wI;var GI=OD(),zI=ND(),CD=W8(),II=rD(),QI=Y1(),T=a(),RD=w0(),xW=new T.GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:RD.GraphQLString,resolve:(D)=>D.description},types:{description:"A list of all types supported by this server.",type:new T.GraphQLNonNull(new T.GraphQLList(new T.GraphQLNonNull(tD))),resolve(D){return Object.values(D.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new T.GraphQLNonNull(tD),resolve:(D)=>D.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:tD,resolve:(D)=>D.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:tD,resolve:(D)=>D.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new T.GraphQLNonNull(new T.GraphQLList(new T.GraphQLNonNull(hW))),resolve:(D)=>D.getDirectives()}})});A7.__Schema=xW;var hW=new T.GraphQLObjectType({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new T.GraphQLNonNull(RD.GraphQLString),resolve:(D)=>D.name},description:{type:RD.GraphQLString,resolve:(D)=>D.description},isRepeatable:{type:new T.GraphQLNonNull(RD.GraphQLBoolean),resolve:(D)=>D.isRepeatable},locations:{type:new T.GraphQLNonNull(new T.GraphQLList(new T.GraphQLNonNull(gW))),resolve:(D)=>D.locations},args:{type:new T.GraphQLNonNull(new T.GraphQLList(new T.GraphQLNonNull(U1))),args:{includeDeprecated:{type:RD.GraphQLBoolean,defaultValue:!1}},resolve(D,{includeDeprecated:P}){return P?D.args:D.args.filter((O)=>O.deprecationReason==null)}}})});A7.__Directive=hW;var gW=new T.GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:CD.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:CD.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:CD.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:CD.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:CD.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:CD.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:CD.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:CD.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:CD.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:CD.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:CD.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:CD.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:CD.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:CD.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:CD.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:CD.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:CD.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:CD.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:CD.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});A7.__DirectiveLocation=gW;var tD=new T.GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new T.GraphQLNonNull(mW),resolve(D){if(T.isScalarType(D))return $D.SCALAR;if(T.isObjectType(D))return $D.OBJECT;if(T.isInterfaceType(D))return $D.INTERFACE;if(T.isUnionType(D))return $D.UNION;if(T.isEnumType(D))return $D.ENUM;if(T.isInputObjectType(D))return $D.INPUT_OBJECT;if(T.isListType(D))return $D.LIST;if(T.isNonNullType(D))return $D.NON_NULL;zI.invariant(!1,`Unexpected type: "${GI.inspect(D)}".`)}},name:{type:RD.GraphQLString,resolve:(D)=>("name"in D)?D.name:void 0},description:{type:RD.GraphQLString,resolve:(D)=>("description"in D)?D.description:void 0},specifiedByURL:{type:RD.GraphQLString,resolve:(D)=>("specifiedByURL"in D)?D.specifiedByURL:void 0},fields:{type:new T.GraphQLList(new T.GraphQLNonNull(vW)),args:{includeDeprecated:{type:RD.GraphQLBoolean,defaultValue:!1}},resolve(D,{includeDeprecated:P}){if(T.isObjectType(D)||T.isInterfaceType(D)){let O=Object.values(D.getFields());return P?O:O.filter((W)=>W.deprecationReason==null)}}},interfaces:{type:new T.GraphQLList(new T.GraphQLNonNull(tD)),resolve(D){if(T.isObjectType(D)||T.isInterfaceType(D))return D.getInterfaces()}},possibleTypes:{type:new T.GraphQLList(new T.GraphQLNonNull(tD)),resolve(D,P,O,{schema:W}){if(T.isAbstractType(D))return W.getPossibleTypes(D)}},enumValues:{type:new T.GraphQLList(new T.GraphQLNonNull(yW)),args:{includeDeprecated:{type:RD.GraphQLBoolean,defaultValue:!1}},resolve(D,{includeDeprecated:P}){if(T.isEnumType(D)){let O=D.getValues();return P?O:O.filter((W)=>W.deprecationReason==null)}}},inputFields:{type:new T.GraphQLList(new T.GraphQLNonNull(U1)),args:{includeDeprecated:{type:RD.GraphQLBoolean,defaultValue:!1}},resolve(D,{includeDeprecated:P}){if(T.isInputObjectType(D)){let O=Object.values(D.getFields());return P?O:O.filter((W)=>W.deprecationReason==null)}}},ofType:{type:tD,resolve:(D)=>("ofType"in D)?D.ofType:void 0},isOneOf:{type:RD.GraphQLBoolean,resolve:(D)=>{if(T.isInputObjectType(D))return D.isOneOf}}})});A7.__Type=tD;var vW=new T.GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new T.GraphQLNonNull(RD.GraphQLString),resolve:(D)=>D.name},description:{type:RD.GraphQLString,resolve:(D)=>D.description},args:{type:new T.GraphQLNonNull(new T.GraphQLList(new T.GraphQLNonNull(U1))),args:{includeDeprecated:{type:RD.GraphQLBoolean,defaultValue:!1}},resolve(D,{includeDeprecated:P}){return P?D.args:D.args.filter((O)=>O.deprecationReason==null)}},type:{type:new T.GraphQLNonNull(tD),resolve:(D)=>D.type},isDeprecated:{type:new T.GraphQLNonNull(RD.GraphQLBoolean),resolve:(D)=>D.deprecationReason!=null},deprecationReason:{type:RD.GraphQLString,resolve:(D)=>D.deprecationReason}})});A7.__Field=vW;var U1=new T.GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new T.GraphQLNonNull(RD.GraphQLString),resolve:(D)=>D.name},description:{type:RD.GraphQLString,resolve:(D)=>D.description},type:{type:new T.GraphQLNonNull(tD),resolve:(D)=>D.type},defaultValue:{type:RD.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(D){let{type:P,defaultValue:O}=D,W=QI.astFromValue(O,P);return W?II.print(W):null}},isDeprecated:{type:new T.GraphQLNonNull(RD.GraphQLBoolean),resolve:(D)=>D.deprecationReason!=null},deprecationReason:{type:RD.GraphQLString,resolve:(D)=>D.deprecationReason}})});A7.__InputValue=U1;var yW=new T.GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new T.GraphQLNonNull(RD.GraphQLString),resolve:(D)=>D.name},description:{type:RD.GraphQLString,resolve:(D)=>D.description},isDeprecated:{type:new T.GraphQLNonNull(RD.GraphQLBoolean),resolve:(D)=>D.deprecationReason!=null},deprecationReason:{type:RD.GraphQLString,resolve:(D)=>D.deprecationReason}})});A7.__EnumValue=yW;var $D;A7.TypeKind=$D;(function(D){D.SCALAR="SCALAR",D.OBJECT="OBJECT",D.INTERFACE="INTERFACE",D.UNION="UNION",D.ENUM="ENUM",D.INPUT_OBJECT="INPUT_OBJECT",D.LIST="LIST",D.NON_NULL="NON_NULL"})($D||(A7.TypeKind=$D={}));var mW=new T.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:$D.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:$D.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:$D.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:$D.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:$D.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:$D.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:$D.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:$D.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});A7.__TypeKind=mW;var CI={name:"__schema",type:new T.GraphQLNonNull(xW),description:"Access the current type schema of this server.",args:[],resolve:(D,P,O,{schema:W})=>W,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};A7.SchemaMetaFieldDef=CI;var $I={name:"__type",type:tD,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new T.GraphQLNonNull(RD.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(D,{name:P},O,{schema:W})=>W.getType(P),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};A7.TypeMetaFieldDef=$I;var MI={name:"__typename",type:new T.GraphQLNonNull(RD.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:(D,P,O,{parentType:W})=>W.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};A7.TypeNameMetaFieldDef=MI;var E7=Object.freeze([xW,hW,gW,tD,vW,U1,yW,mW]);A7.introspectionTypes=E7;function wI(D){return E7.some(({name:P})=>D.name===P)}});var u2=S((C7)=>{Object.defineProperty(C7,"__esModule",{value:!0});C7.GraphQLSchema=void 0;C7.assertSchema=lI;C7.isSchema=Q7;var cP=hD(),cW=OD(),gI=i8(),vI=Q0(),yI=_P(),lW=C0(),S0=a(),I7=vD(),mI=oD();function Q7(D){return gI.instanceOf(D,pW)}function lI(D){if(!Q7(D))throw new Error(`Expected ${cW.inspect(D)} to be a GraphQL schema.`);return D}class pW{constructor(D){var P,O;this.__validationErrors=D.assumeValid===!0?[]:void 0,vI.isObjectLike(D)||cP.devAssert(!1,"Must provide configuration object."),!D.types||Array.isArray(D.types)||cP.devAssert(!1,`"types" must be Array if provided but got: ${cW.inspect(D.types)}.`),!D.directives||Array.isArray(D.directives)||cP.devAssert(!1,`"directives" must be Array if provided but got: ${cW.inspect(D.directives)}.`),this.description=D.description,this.extensions=yI.toObjMap(D.extensions),this.astNode=D.astNode,this.extensionASTNodes=(P=D.extensionASTNodes)!==null&&P!==void 0?P:[],this._queryType=D.query,this._mutationType=D.mutation,this._subscriptionType=D.subscription,this._directives=(O=D.directives)!==null&&O!==void 0?O:I7.specifiedDirectives;let W=new Set(D.types);if(D.types!=null)for(let F of D.types)W.delete(F),X0(F,W);if(this._queryType!=null)X0(this._queryType,W);if(this._mutationType!=null)X0(this._mutationType,W);if(this._subscriptionType!=null)X0(this._subscriptionType,W);for(let F of this._directives)if(I7.isDirective(F))for(let R of F.args)X0(R.type,W);X0(mI.__Schema,W),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let F of W){if(F==null)continue;let R=F.name;if(R||cP.devAssert(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[R]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${R}".`);if(this._typeMap[R]=F,S0.isInterfaceType(F)){for(let L of F.getInterfaces())if(S0.isInterfaceType(L)){let B=this._implementationsMap[L.name];if(B===void 0)B=this._implementationsMap[L.name]={objects:[],interfaces:[]};B.interfaces.push(F)}}else if(S0.isObjectType(F)){for(let L of F.getInterfaces())if(S0.isInterfaceType(L)){let B=this._implementationsMap[L.name];if(B===void 0)B=this._implementationsMap[L.name]={objects:[],interfaces:[]};B.objects.push(F)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(D){switch(D){case lW.OperationTypeNode.QUERY:return this.getQueryType();case lW.OperationTypeNode.MUTATION:return this.getMutationType();case lW.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(D){return this.getTypeMap()[D]}getPossibleTypes(D){return S0.isUnionType(D)?D.getTypes():this.getImplementations(D).objects}getImplementations(D){let P=this._implementationsMap[D.name];return P!==null&&P!==void 0?P:{objects:[],interfaces:[]}}isSubType(D,P){let O=this._subTypeMap[D.name];if(O===void 0){if(O=Object.create(null),S0.isUnionType(D))for(let W of D.getTypes())O[W.name]=!0;else{let W=this.getImplementations(D);for(let F of W.objects)O[F.name]=!0;for(let F of W.interfaces)O[F.name]=!0}this._subTypeMap[D.name]=O}return O[P.name]!==void 0}getDirectives(){return this._directives}getDirective(D){return this.getDirectives().find((P)=>P.name===D)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}C7.GraphQLSchema=pW;function X0(D,P){let O=S0.getNamedType(D);if(!P.has(O)){if(P.add(O),S0.isUnionType(O))for(let W of O.getTypes())X0(W,P);else if(S0.isObjectType(O)||S0.isInterfaceType(O)){for(let W of O.getInterfaces())X0(W,P);for(let W of Object.values(O.getFields())){X0(W.type,P);for(let F of W.args)X0(F.type,P)}}else if(S0.isInputObjectType(O))for(let W of Object.values(O.getFields()))X0(W.type,P)}return P}});var S1=S((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.assertValidSchema=sI;u7.validateSchema=j7;var fD=OD(),dI=g(),dW=C0(),M7=F1(),XD=a(),V7=vD(),rI=oD(),aI=u2();function j7(D){if(aI.assertSchema(D),D.__validationErrors)return D.__validationErrors;let P=new _7(D);nI(P),iI(P),tI(P);let O=P.getErrors();return D.__validationErrors=O,O}function sI(D){let P=j7(D);if(P.length!==0)throw new Error(P.map((O)=>O.message).join("\n\n"))}class _7{constructor(D){this._errors=[],this.schema=D}reportError(D,P){let O=Array.isArray(P)?P.filter(Boolean):P;this._errors.push(new dI.GraphQLError(D,{nodes:O}))}getErrors(){return this._errors}}function nI(D){let P=D.schema,O=P.getQueryType();if(!O)D.reportError("Query root type must be provided.",P.astNode);else if(!XD.isObjectType(O)){var W;D.reportError(`Query root type must be Object type, it cannot be ${fD.inspect(O)}.`,(W=rW(P,dW.OperationTypeNode.QUERY))!==null&&W!==void 0?W:O.astNode)}let F=P.getMutationType();if(F&&!XD.isObjectType(F)){var R;D.reportError(`Mutation root type must be Object type if provided, it cannot be ${fD.inspect(F)}.`,(R=rW(P,dW.OperationTypeNode.MUTATION))!==null&&R!==void 0?R:F.astNode)}let L=P.getSubscriptionType();if(L&&!XD.isObjectType(L)){var B;D.reportError(`Subscription root type must be Object type if provided, it cannot be ${fD.inspect(L)}.`,(B=rW(P,dW.OperationTypeNode.SUBSCRIPTION))!==null&&B!==void 0?B:L.astNode)}}function rW(D,P){var O;return(O=[D.astNode,...D.extensionASTNodes].flatMap((W)=>{var F;return(F=W===null||W===void 0?void 0:W.operationTypes)!==null&&F!==void 0?F:[]}).find((W)=>W.operation===P))===null||O===void 0?void 0:O.type}function iI(D){for(let O of D.schema.getDirectives()){if(!V7.isDirective(O)){D.reportError(`Expected directive but got: ${fD.inspect(O)}.`,O===null||O===void 0?void 0:O.astNode);continue}T2(D,O);for(let W of O.args){if(T2(D,W),!XD.isInputType(W.type))D.reportError(`The type of @${O.name}(${W.name}:) must be Input Type but got: ${fD.inspect(W.type)}.`,W.astNode);if(XD.isRequiredArgument(W)&&W.deprecationReason!=null){var P;D.reportError(`Required argument @${O.name}(${W.name}:) cannot be deprecated.`,[aW(W.astNode),(P=W.astNode)===null||P===void 0?void 0:P.type])}}}}function T2(D,P){if(P.name.startsWith("__"))D.reportError(`Name "${P.name}" must not begin with "__", which is reserved by GraphQL introspection.`,P.astNode)}function tI(D){let P=FQ(D),O=D.schema.getTypeMap();for(let W of Object.values(O)){if(!XD.isNamedType(W)){D.reportError(`Expected GraphQL named type but got: ${fD.inspect(W)}.`,W.astNode);continue}if(!rI.isIntrospectionType(W))T2(D,W);if(XD.isObjectType(W))w7(D,W),b7(D,W);else if(XD.isInterfaceType(W))w7(D,W),b7(D,W);else if(XD.isUnionType(W))DQ(D,W);else if(XD.isEnumType(W))PQ(D,W);else if(XD.isInputObjectType(W))OQ(D,W),P(W)}}function w7(D,P){let O=Object.values(P.getFields());if(O.length===0)D.reportError(`Type ${P.name} must define one or more fields.`,[P.astNode,...P.extensionASTNodes]);for(let L of O){if(T2(D,L),!XD.isOutputType(L.type)){var W;D.reportError(`The type of ${P.name}.${L.name} must be Output Type but got: ${fD.inspect(L.type)}.`,(W=L.astNode)===null||W===void 0?void 0:W.type)}for(let B of L.args){let Z=B.name;if(T2(D,B),!XD.isInputType(B.type)){var F;D.reportError(`The type of ${P.name}.${L.name}(${Z}:) must be Input Type but got: ${fD.inspect(B.type)}.`,(F=B.astNode)===null||F===void 0?void 0:F.type)}if(XD.isRequiredArgument(B)&&B.deprecationReason!=null){var R;D.reportError(`Required argument ${P.name}.${L.name}(${Z}:) cannot be deprecated.`,[aW(B.astNode),(R=B.astNode)===null||R===void 0?void 0:R.type])}}}}function b7(D,P){let O=Object.create(null);for(let W of P.getInterfaces()){if(!XD.isInterfaceType(W)){D.reportError(`Type ${fD.inspect(P)} must only implement Interface types, it cannot implement ${fD.inspect(W)}.`,J1(P,W));continue}if(P===W){D.reportError(`Type ${P.name} cannot implement itself because it would create a circular reference.`,J1(P,W));continue}if(O[W.name]){D.reportError(`Type ${P.name} can only implement ${W.name} once.`,J1(P,W));continue}O[W.name]=!0,eI(D,P,W),oI(D,P,W)}}function oI(D,P,O){let W=P.getFields();for(let Z of Object.values(O.getFields())){let H=Z.name,Y=W[H];if(!Y){D.reportError(`Interface field ${O.name}.${H} expected but ${P.name} does not provide it.`,[Z.astNode,P.astNode,...P.extensionASTNodes]);continue}if(!M7.isTypeSubTypeOf(D.schema,Y.type,Z.type)){var F,R;D.reportError(`Interface field ${O.name}.${H} expects type ${fD.inspect(Z.type)} but ${P.name}.${H} is type ${fD.inspect(Y.type)}.`,[(F=Z.astNode)===null||F===void 0?void 0:F.type,(R=Y.astNode)===null||R===void 0?void 0:R.type])}for(let q of Z.args){let U=q.name,J=Y.args.find((A)=>A.name===U);if(!J){D.reportError(`Interface field argument ${O.name}.${H}(${U}:) expected but ${P.name}.${H} does not provide it.`,[q.astNode,Y.astNode]);continue}if(!M7.isEqualType(q.type,J.type)){var L,B;D.reportError(`Interface field argument ${O.name}.${H}(${U}:) expects type ${fD.inspect(q.type)} but ${P.name}.${H}(${U}:) is type ${fD.inspect(J.type)}.`,[(L=q.astNode)===null||L===void 0?void 0:L.type,(B=J.astNode)===null||B===void 0?void 0:B.type])}}for(let q of Y.args){let U=q.name;if(!Z.args.find((A)=>A.name===U)&&XD.isRequiredArgument(q))D.reportError(`Object field ${P.name}.${H} includes required argument ${U} that is missing from the Interface field ${O.name}.${H}.`,[q.astNode,Z.astNode])}}}function eI(D,P,O){let W=P.getInterfaces();for(let F of O.getInterfaces())if(!W.includes(F))D.reportError(F===P?`Type ${P.name} cannot implement ${O.name} because it would create a circular reference.`:`Type ${P.name} must implement ${F.name} because it is implemented by ${O.name}.`,[...J1(O,F),...J1(P,O)])}function DQ(D,P){let O=P.getTypes();if(O.length===0)D.reportError(`Union type ${P.name} must define one or more member types.`,[P.astNode,...P.extensionASTNodes]);let W=Object.create(null);for(let F of O){if(W[F.name]){D.reportError(`Union type ${P.name} can only include type ${F.name} once.`,K7(P,F.name));continue}if(W[F.name]=!0,!XD.isObjectType(F))D.reportError(`Union type ${P.name} can only include Object types, it cannot include ${fD.inspect(F)}.`,K7(P,String(F)))}}function PQ(D,P){let O=P.getValues();if(O.length===0)D.reportError(`Enum type ${P.name} must define one or more values.`,[P.astNode,...P.extensionASTNodes]);for(let W of O)T2(D,W)}function OQ(D,P){let O=Object.values(P.getFields());if(O.length===0)D.reportError(`Input Object type ${P.name} must define one or more fields.`,[P.astNode,...P.extensionASTNodes]);for(let R of O){if(T2(D,R),!XD.isInputType(R.type)){var W;D.reportError(`The type of ${P.name}.${R.name} must be Input Type but got: ${fD.inspect(R.type)}.`,(W=R.astNode)===null||W===void 0?void 0:W.type)}if(XD.isRequiredInputField(R)&&R.deprecationReason!=null){var F;D.reportError(`Required input field ${P.name}.${R.name} cannot be deprecated.`,[aW(R.astNode),(F=R.astNode)===null||F===void 0?void 0:F.type])}if(P.isOneOf)WQ(P,R,D)}}function WQ(D,P,O){if(XD.isNonNullType(P.type)){var W;O.reportError(`OneOf input field ${D.name}.${P.name} must be nullable.`,(W=P.astNode)===null||W===void 0?void 0:W.type)}if(P.defaultValue!==void 0)O.reportError(`OneOf input field ${D.name}.${P.name} cannot have a default value.`,P.astNode)}function FQ(D){let P=Object.create(null),O=[],W=Object.create(null);return F;function F(R){if(P[R.name])return;P[R.name]=!0,W[R.name]=O.length;let L=Object.values(R.getFields());for(let B of L)if(XD.isNonNullType(B.type)&&XD.isInputObjectType(B.type.ofType)){let Z=B.type.ofType,H=W[Z.name];if(O.push(B),H===void 0)F(Z);else{let Y=O.slice(H),q=Y.map((U)=>U.name).join(".");D.reportError(`Cannot reference Input Object "${Z.name}" within itself through a series of non-null fields: "${q}".`,Y.map((U)=>U.astNode))}O.pop()}W[R.name]=void 0}}function J1(D,P){let{astNode:O,extensionASTNodes:W}=D;return(O!=null?[O,...W]:W).flatMap((R)=>{var L;return(L=R.interfaces)!==null&&L!==void 0?L:[]}).filter((R)=>R.name.value===P.name)}function K7(D,P){let{astNode:O,extensionASTNodes:W}=D;return(O!=null?[O,...W]:W).flatMap((R)=>{var L;return(L=R.types)!==null&&L!==void 0?L:[]}).filter((R)=>R.name.value===P)}function aW(D){var P;return D===null||D===void 0?void 0:(P=D.directives)===null||P===void 0?void 0:P.find((O)=>O.name.value===V7.GraphQLDeprecatedDirective.name)}});var b0=S((N7)=>{Object.defineProperty(N7,"__esModule",{value:!0});N7.typeFromAST=nW;var sW=r(),T7=a();function nW(D,P){switch(P.kind){case sW.Kind.LIST_TYPE:{let O=nW(D,P.type);return O&&new T7.GraphQLList(O)}case sW.Kind.NON_NULL_TYPE:{let O=nW(D,P.type);return O&&new T7.GraphQLNonNull(O)}case sW.Kind.NAMED_TYPE:return D.getType(P.name.value)}}});var pP=S((h7)=>{Object.defineProperty(h7,"__esModule",{value:!0});h7.TypeInfo=void 0;h7.visitWithTypeInfo=qQ;var ZQ=C0(),ED=r(),k7=w2(),AD=a(),q8=oD(),f7=b0();class x7{constructor(D,P,O){if(this._schema=D,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=O!==null&&O!==void 0?O:HQ,P){if(AD.isInputType(P))this._inputTypeStack.push(P);if(AD.isCompositeType(P))this._parentTypeStack.push(P);if(AD.isOutputType(P))this._typeStack.push(P)}}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(D){let P=this._schema;switch(D.kind){case ED.Kind.SELECTION_SET:{let W=AD.getNamedType(this.getType());this._parentTypeStack.push(AD.isCompositeType(W)?W:void 0);break}case ED.Kind.FIELD:{let W=this.getParentType(),F,R;if(W){if(F=this._getFieldDef(P,W,D),F)R=F.type}this._fieldDefStack.push(F),this._typeStack.push(AD.isOutputType(R)?R:void 0);break}case ED.Kind.DIRECTIVE:this._directive=P.getDirective(D.name.value);break;case ED.Kind.OPERATION_DEFINITION:{let W=P.getRootType(D.operation);this._typeStack.push(AD.isObjectType(W)?W:void 0);break}case ED.Kind.INLINE_FRAGMENT:case ED.Kind.FRAGMENT_DEFINITION:{let W=D.typeCondition,F=W?f7.typeFromAST(P,W):AD.getNamedType(this.getType());this._typeStack.push(AD.isOutputType(F)?F:void 0);break}case ED.Kind.VARIABLE_DEFINITION:{let W=f7.typeFromAST(P,D.type);this._inputTypeStack.push(AD.isInputType(W)?W:void 0);break}case ED.Kind.ARGUMENT:{var O;let W,F,R=(O=this.getDirective())!==null&&O!==void 0?O:this.getFieldDef();if(R){if(W=R.args.find((L)=>L.name===D.name.value),W)F=W.type}this._argument=W,this._defaultValueStack.push(W?W.defaultValue:void 0),this._inputTypeStack.push(AD.isInputType(F)?F:void 0);break}case ED.Kind.LIST:{let W=AD.getNullableType(this.getInputType()),F=AD.isListType(W)?W.ofType:W;this._defaultValueStack.push(void 0),this._inputTypeStack.push(AD.isInputType(F)?F:void 0);break}case ED.Kind.OBJECT_FIELD:{let W=AD.getNamedType(this.getInputType()),F,R;if(AD.isInputObjectType(W)){if(R=W.getFields()[D.name.value],R)F=R.type}this._defaultValueStack.push(R?R.defaultValue:void 0),this._inputTypeStack.push(AD.isInputType(F)?F:void 0);break}case ED.Kind.ENUM:{let W=AD.getNamedType(this.getInputType()),F;if(AD.isEnumType(W))F=W.getValue(D.value);this._enumValue=F;break}default:}}leave(D){switch(D.kind){case ED.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case ED.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case ED.Kind.DIRECTIVE:this._directive=null;break;case ED.Kind.OPERATION_DEFINITION:case ED.Kind.INLINE_FRAGMENT:case ED.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case ED.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case ED.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ED.Kind.LIST:case ED.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ED.Kind.ENUM:this._enumValue=null;break;default:}}}h7.TypeInfo=x7;function HQ(D,P,O){let W=O.name.value;if(W===q8.SchemaMetaFieldDef.name&&D.getQueryType()===P)return q8.SchemaMetaFieldDef;if(W===q8.TypeMetaFieldDef.name&&D.getQueryType()===P)return q8.TypeMetaFieldDef;if(W===q8.TypeNameMetaFieldDef.name&&AD.isCompositeType(P))return q8.TypeNameMetaFieldDef;if(AD.isObjectType(P)||AD.isInterfaceType(P))return P.getFields()[W]}function qQ(D,P){return{enter(...O){let W=O[0];D.enter(W);let F=k7.getEnterLeaveForKind(P,W.kind).enter;if(F){let R=F.apply(P,O);if(R!==void 0){if(D.leave(W),ZQ.isNode(R))D.enter(R)}return R}},leave(...O){let W=O[0],F=k7.getEnterLeaveForKind(P,W.kind).leave,R;if(F)R=F.apply(P,O);return D.leave(W),R}}}});var N2=S((d7)=>{Object.defineProperty(d7,"__esModule",{value:!0});d7.isConstValueNode=iW;d7.isDefinitionNode=UQ;d7.isExecutableDefinitionNode=v7;d7.isSelectionNode=JQ;d7.isTypeDefinitionNode=l7;d7.isTypeExtensionNode=p7;d7.isTypeNode=SQ;d7.isTypeSystemDefinitionNode=m7;d7.isTypeSystemExtensionNode=c7;d7.isValueNode=y7;var s=r();function UQ(D){return v7(D)||m7(D)||c7(D)}function v7(D){return D.kind===s.Kind.OPERATION_DEFINITION||D.kind===s.Kind.FRAGMENT_DEFINITION}function JQ(D){return D.kind===s.Kind.FIELD||D.kind===s.Kind.FRAGMENT_SPREAD||D.kind===s.Kind.INLINE_FRAGMENT}function y7(D){return D.kind===s.Kind.VARIABLE||D.kind===s.Kind.INT||D.kind===s.Kind.FLOAT||D.kind===s.Kind.STRING||D.kind===s.Kind.BOOLEAN||D.kind===s.Kind.NULL||D.kind===s.Kind.ENUM||D.kind===s.Kind.LIST||D.kind===s.Kind.OBJECT}function iW(D){return y7(D)&&(D.kind===s.Kind.LIST?D.values.some(iW):D.kind===s.Kind.OBJECT?D.fields.some((P)=>iW(P.value)):D.kind!==s.Kind.VARIABLE)}function SQ(D){return D.kind===s.Kind.NAMED_TYPE||D.kind===s.Kind.LIST_TYPE||D.kind===s.Kind.NON_NULL_TYPE}function m7(D){return D.kind===s.Kind.SCHEMA_DEFINITION||l7(D)||D.kind===s.Kind.DIRECTIVE_DEFINITION}function l7(D){return D.kind===s.Kind.SCALAR_TYPE_DEFINITION||D.kind===s.Kind.OBJECT_TYPE_DEFINITION||D.kind===s.Kind.INTERFACE_TYPE_DEFINITION||D.kind===s.Kind.UNION_TYPE_DEFINITION||D.kind===s.Kind.ENUM_TYPE_DEFINITION||D.kind===s.Kind.INPUT_OBJECT_TYPE_DEFINITION}function c7(D){return D.kind===s.Kind.SCHEMA_EXTENSION||p7(D)}function p7(D){return D.kind===s.Kind.SCALAR_TYPE_EXTENSION||D.kind===s.Kind.OBJECT_TYPE_EXTENSION||D.kind===s.Kind.INTERFACE_TYPE_EXTENSION||D.kind===s.Kind.UNION_TYPE_EXTENSION||D.kind===s.Kind.ENUM_TYPE_EXTENSION||D.kind===s.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var tW=S((a7)=>{Object.defineProperty(a7,"__esModule",{value:!0});a7.ExecutableDefinitionsRule=KQ;var wQ=g(),r7=r(),bQ=N2();function KQ(D){return{Document(P){for(let O of P.definitions)if(!bQ.isExecutableDefinitionNode(O)){let W=O.kind===r7.Kind.SCHEMA_DEFINITION||O.kind===r7.Kind.SCHEMA_EXTENSION?"schema":'"'+O.name.value+'"';D.reportError(new wQ.GraphQLError(`The ${W} definition is not executable.`,{nodes:O}))}return!1}}}});var oW=S((n7)=>{Object.defineProperty(n7,"__esModule",{value:!0});n7.FieldsOnCorrectTypeRule=TQ;var s7=o0(),jQ=e8(),_Q=D2(),uQ=g(),X1=a();function TQ(D){return{Field(P){let O=D.getParentType();if(O){if(!D.getFieldDef()){let F=D.getSchema(),R=P.name.value,L=s7.didYouMean("to use an inline fragment on",NQ(F,O,R));if(L==="")L=s7.didYouMean(kQ(O,R));D.reportError(new uQ.GraphQLError(`Cannot query field "${R}" on type "${O.name}".`+L,{nodes:P}))}}}}}function NQ(D,P,O){if(!X1.isAbstractType(P))return[];let W=new Set,F=Object.create(null);for(let L of D.getPossibleTypes(P)){if(!L.getFields()[O])continue;W.add(L),F[L.name]=1;for(let B of L.getInterfaces()){var R;if(!B.getFields()[O])continue;W.add(B),F[B.name]=((R=F[B.name])!==null&&R!==void 0?R:0)+1}}return[...W].sort((L,B)=>{let Z=F[B.name]-F[L.name];if(Z!==0)return Z;if(X1.isInterfaceType(L)&&D.isSubType(L,B))return-1;if(X1.isInterfaceType(B)&&D.isSubType(B,L))return 1;return jQ.naturalCompare(L.name,B.name)}).map((L)=>L.name)}function kQ(D,P){if(X1.isObjectType(D)||X1.isInterfaceType(D)){let O=Object.keys(D.getFields());return _Q.suggestionList(P,O)}return[]}});var eW=S((DL)=>{Object.defineProperty(DL,"__esModule",{value:!0});DL.FragmentsOnCompositeTypesRule=xQ;var i7=g(),t7=rD(),o7=a(),e7=b0();function xQ(D){return{InlineFragment(P){let O=P.typeCondition;if(O){let W=e7.typeFromAST(D.getSchema(),O);if(W&&!o7.isCompositeType(W)){let F=t7.print(O);D.reportError(new i7.GraphQLError(`Fragment cannot condition on non composite type "${F}".`,{nodes:O}))}}},FragmentDefinition(P){let O=e7.typeFromAST(D.getSchema(),P.typeCondition);if(O&&!o7.isCompositeType(O)){let W=t7.print(P.typeCondition);D.reportError(new i7.GraphQLError(`Fragment "${P.name.value}" cannot condition on non composite type "${W}".`,{nodes:P.typeCondition}))}}}}});var D6=S((RL)=>{Object.defineProperty(RL,"__esModule",{value:!0});RL.KnownArgumentNamesOnDirectivesRule=FL;RL.KnownArgumentNamesRule=yQ;var PL=o0(),OL=D2(),WL=g(),gQ=r(),vQ=vD();function yQ(D){return{...FL(D),Argument(P){let O=D.getArgument(),W=D.getFieldDef(),F=D.getParentType();if(!O&&W&&F){let R=P.name.value,L=W.args.map((Z)=>Z.name),B=OL.suggestionList(R,L);D.reportError(new WL.GraphQLError(`Unknown argument "${R}" on field "${F.name}.${W.name}".`+PL.didYouMean(B),{nodes:P}))}}}}function FL(D){let P=Object.create(null),O=D.getSchema(),W=O?O.getDirectives():vQ.specifiedDirectives;for(let L of W)P[L.name]=L.args.map((B)=>B.name);let F=D.getDocument().definitions;for(let L of F)if(L.kind===gQ.Kind.DIRECTIVE_DEFINITION){var R;let B=(R=L.arguments)!==null&&R!==void 0?R:[];P[L.name.value]=B.map((Z)=>Z.name.value)}return{Directive(L){let B=L.name.value,Z=P[B];if(L.arguments&&Z)for(let H of L.arguments){let Y=H.name.value;if(!Z.includes(Y)){let q=OL.suggestionList(Y,Z);D.reportError(new WL.GraphQLError(`Unknown argument "${Y}" on directive "@${B}".`+PL.didYouMean(q),{nodes:H}))}}return!1}}}});var W6=S((BL)=>{Object.defineProperty(BL,"__esModule",{value:!0});BL.KnownDirectivesRule=dQ;var cQ=OD(),P6=ND(),LL=g(),O6=C0(),MD=W8(),ZD=r(),pQ=vD();function dQ(D){let P=Object.create(null),O=D.getSchema(),W=O?O.getDirectives():pQ.specifiedDirectives;for(let R of W)P[R.name]=R.locations;let F=D.getDocument().definitions;for(let R of F)if(R.kind===ZD.Kind.DIRECTIVE_DEFINITION)P[R.name.value]=R.locations.map((L)=>L.value);return{Directive(R,L,B,Z,H){let Y=R.name.value,q=P[Y];if(!q){D.reportError(new LL.GraphQLError(`Unknown directive "@${Y}".`,{nodes:R}));return}let U=rQ(H);if(U&&!q.includes(U))D.reportError(new LL.GraphQLError(`Directive "@${Y}" may not be used on ${U}.`,{nodes:R}))}}}function rQ(D){let P=D[D.length-1];switch("kind"in P||P6.invariant(!1),P.kind){case ZD.Kind.OPERATION_DEFINITION:return aQ(P.operation);case ZD.Kind.FIELD:return MD.DirectiveLocation.FIELD;case ZD.Kind.FRAGMENT_SPREAD:return MD.DirectiveLocation.FRAGMENT_SPREAD;case ZD.Kind.INLINE_FRAGMENT:return MD.DirectiveLocation.INLINE_FRAGMENT;case ZD.Kind.FRAGMENT_DEFINITION:return MD.DirectiveLocation.FRAGMENT_DEFINITION;case ZD.Kind.VARIABLE_DEFINITION:return MD.DirectiveLocation.VARIABLE_DEFINITION;case ZD.Kind.SCHEMA_DEFINITION:case ZD.Kind.SCHEMA_EXTENSION:return MD.DirectiveLocation.SCHEMA;case ZD.Kind.SCALAR_TYPE_DEFINITION:case ZD.Kind.SCALAR_TYPE_EXTENSION:return MD.DirectiveLocation.SCALAR;case ZD.Kind.OBJECT_TYPE_DEFINITION:case ZD.Kind.OBJECT_TYPE_EXTENSION:return MD.DirectiveLocation.OBJECT;case ZD.Kind.FIELD_DEFINITION:return MD.DirectiveLocation.FIELD_DEFINITION;case ZD.Kind.INTERFACE_TYPE_DEFINITION:case ZD.Kind.INTERFACE_TYPE_EXTENSION:return MD.DirectiveLocation.INTERFACE;case ZD.Kind.UNION_TYPE_DEFINITION:case ZD.Kind.UNION_TYPE_EXTENSION:return MD.DirectiveLocation.UNION;case ZD.Kind.ENUM_TYPE_DEFINITION:case ZD.Kind.ENUM_TYPE_EXTENSION:return MD.DirectiveLocation.ENUM;case ZD.Kind.ENUM_VALUE_DEFINITION:return MD.DirectiveLocation.ENUM_VALUE;case ZD.Kind.INPUT_OBJECT_TYPE_DEFINITION:case ZD.Kind.INPUT_OBJECT_TYPE_EXTENSION:return MD.DirectiveLocation.INPUT_OBJECT;case ZD.Kind.INPUT_VALUE_DEFINITION:{let O=D[D.length-3];return"kind"in O||P6.invariant(!1),O.kind===ZD.Kind.INPUT_OBJECT_TYPE_DEFINITION?MD.DirectiveLocation.INPUT_FIELD_DEFINITION:MD.DirectiveLocation.ARGUMENT_DEFINITION}default:P6.invariant(!1,"Unexpected kind: "+cQ.inspect(P.kind))}}function aQ(D){switch(D){case O6.OperationTypeNode.QUERY:return MD.DirectiveLocation.QUERY;case O6.OperationTypeNode.MUTATION:return MD.DirectiveLocation.MUTATION;case O6.OperationTypeNode.SUBSCRIPTION:return MD.DirectiveLocation.SUBSCRIPTION}}});var F6=S((ZL)=>{Object.defineProperty(ZL,"__esModule",{value:!0});ZL.KnownFragmentNamesRule=iQ;var nQ=g();function iQ(D){return{FragmentSpread(P){let O=P.name.value;if(!D.getFragment(O))D.reportError(new nQ.GraphQLError(`Unknown fragment "${O}".`,{nodes:P.name}))}}}});var L6=S((qL)=>{Object.defineProperty(qL,"__esModule",{value:!0});qL.KnownTypeNamesRule=WC;var oQ=o0(),eQ=D2(),DC=g(),R6=N2(),PC=oD(),OC=w0();function WC(D){let P=D.getSchema(),O=P?P.getTypeMap():Object.create(null),W=Object.create(null);for(let R of D.getDocument().definitions)if(R6.isTypeDefinitionNode(R))W[R.name.value]=!0;let F=[...Object.keys(O),...Object.keys(W)];return{NamedType(R,L,B,Z,H){let Y=R.name.value;if(!O[Y]&&!W[Y]){var q;let U=(q=H[2])!==null&&q!==void 0?q:B,J=U!=null&&FC(U);if(J&&HL.includes(Y))return;let A=eQ.suggestionList(Y,J?HL.concat(F):F);D.reportError(new DC.GraphQLError(`Unknown type "${Y}".`+oQ.didYouMean(A),{nodes:R}))}}}}var HL=[...OC.specifiedScalarTypes,...PC.introspectionTypes].map((D)=>D.name);function FC(D){return"kind"in D&&(R6.isTypeSystemDefinitionNode(D)||R6.isTypeSystemExtensionNode(D))}});var B6=S((YL)=>{Object.defineProperty(YL,"__esModule",{value:!0});YL.LoneAnonymousOperationRule=ZC;var LC=g(),BC=r();function ZC(D){let P=0;return{Document(O){P=O.definitions.filter((W)=>W.kind===BC.Kind.OPERATION_DEFINITION).length},OperationDefinition(O){if(!O.name&&P>1)D.reportError(new LC.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:O}))}}}});var Z6=S((JL)=>{Object.defineProperty(JL,"__esModule",{value:!0});JL.LoneSchemaDefinitionRule=qC;var UL=g();function qC(D){var P,O,W;let F=D.getSchema(),R=(P=(O=(W=F===null||F===void 0?void 0:F.astNode)!==null&&W!==void 0?W:F===null||F===void 0?void 0:F.getQueryType())!==null&&O!==void 0?O:F===null||F===void 0?void 0:F.getMutationType())!==null&&P!==void 0?P:F===null||F===void 0?void 0:F.getSubscriptionType(),L=0;return{SchemaDefinition(B){if(R){D.reportError(new UL.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:B}));return}if(L>0)D.reportError(new UL.GraphQLError("Must provide only one schema definition.",{nodes:B}));++L}}}});var H6=S((XL)=>{Object.defineProperty(XL,"__esModule",{value:!0});XL.MaxIntrospectionDepthRule=SC;var UC=g(),SL=r(),JC=3;function SC(D){function P(O,W=Object.create(null),F=0){if(O.kind===SL.Kind.FRAGMENT_SPREAD){let R=O.name.value;if(W[R]===!0)return!1;let L=D.getFragment(R);if(!L)return!1;try{return W[R]=!0,P(L,W,F)}finally{W[R]=void 0}}if(O.kind===SL.Kind.FIELD&&(O.name.value==="fields"||O.name.value==="interfaces"||O.name.value==="possibleTypes"||O.name.value==="inputFields")){if(F++,F>=JC)return!0}if("selectionSet"in O&&O.selectionSet){for(let R of O.selectionSet.selections)if(P(R,W,F))return!0}return!1}return{Field(O){if(O.name.value==="__schema"||O.name.value==="__type"){if(P(O))return D.reportError(new UC.GraphQLError("Maximum introspection depth exceeded",{nodes:[O]})),!1}}}}});var q6=S((EL)=>{Object.defineProperty(EL,"__esModule",{value:!0});EL.NoFragmentCyclesRule=AC;var EC=g();function AC(D){let P=Object.create(null),O=[],W=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(R){return F(R),!1}};function F(R){if(P[R.name.value])return;let L=R.name.value;P[L]=!0;let B=D.getFragmentSpreads(R.selectionSet);if(B.length===0)return;W[L]=O.length;for(let Z of B){let H=Z.name.value,Y=W[H];if(O.push(Z),Y===void 0){let q=D.getFragment(H);if(q)F(q)}else{let q=O.slice(Y),U=q.slice(0,-1).map((J)=>'"'+J.name.value+'"').join(", ");D.reportError(new EC.GraphQLError(`Cannot spread fragment "${H}" within itself`+(U!==""?` via ${U}.`:"."),{nodes:q}))}O.pop()}W[L]=void 0}}});var Y6=S((AL)=>{Object.defineProperty(AL,"__esModule",{value:!0});AL.NoUndefinedVariablesRule=IC;var zC=g();function IC(D){let P=Object.create(null);return{OperationDefinition:{enter(){P=Object.create(null)},leave(O){let W=D.getRecursiveVariableUsages(O);for(let{node:F}of W){let R=F.name.value;if(P[R]!==!0)D.reportError(new zC.GraphQLError(O.name?`Variable "\$${R}" is not defined by operation "${O.name.value}".`:`Variable "\$${R}" is not defined.`,{nodes:[F,O]}))}}},VariableDefinition(O){P[O.variable.name.value]=!0}}}});var U6=S((GL)=>{Object.defineProperty(GL,"__esModule",{value:!0});GL.NoUnusedFragmentsRule=$C;var CC=g();function $C(D){let P=[],O=[];return{OperationDefinition(W){return P.push(W),!1},FragmentDefinition(W){return O.push(W),!1},Document:{leave(){let W=Object.create(null);for(let F of P)for(let R of D.getRecursivelyReferencedFragments(F))W[R.name.value]=!0;for(let F of O){let R=F.name.value;if(W[R]!==!0)D.reportError(new CC.GraphQLError(`Fragment "${R}" is never used.`,{nodes:F}))}}}}}});var J6=S((zL)=>{Object.defineProperty(zL,"__esModule",{value:!0});zL.NoUnusedVariablesRule=bC;var wC=g();function bC(D){let P=[];return{OperationDefinition:{enter(){P=[]},leave(O){let W=Object.create(null),F=D.getRecursiveVariableUsages(O);for(let{node:R}of F)W[R.name.value]=!0;for(let R of P){let L=R.variable.name.value;if(W[L]!==!0)D.reportError(new wC.GraphQLError(O.name?`Variable "\$${L}" is never used in operation "${O.name.value}".`:`Variable "\$${L}" is never used.`,{nodes:R}))}}},VariableDefinition(O){P.push(O)}}}});var X6=S((IL)=>{Object.defineProperty(IL,"__esModule",{value:!0});IL.sortValueNode=S6;var VC=e8(),y0=r();function S6(D){switch(D.kind){case y0.Kind.OBJECT:return{...D,fields:jC(D.fields)};case y0.Kind.LIST:return{...D,values:D.values.map(S6)};case y0.Kind.INT:case y0.Kind.FLOAT:case y0.Kind.STRING:case y0.Kind.BOOLEAN:case y0.Kind.NULL:case y0.Kind.ENUM:case y0.Kind.VARIABLE:return D}}function jC(D){return D.map((P)=>({...P,value:S6(P.value)})).sort((P,O)=>VC.naturalCompare(P.name.value,O.name.value))}});var I6=S((VL)=>{Object.defineProperty(VL,"__esModule",{value:!0});VL.OverlappingFieldsCanBeMergedRule=kC;var QL=OD(),uC=g(),E6=r(),TC=rD(),yD=a(),NC=X6(),$L=b0();function ML(D){if(Array.isArray(D))return D.map(([P,O])=>`subfields "${P}" conflict because `+ML(O)).join(" and ");return D}function kC(D){let P=new KL,O=new Map;return{SelectionSet(W){let F=fC(D,O,P,D.getParentType(),W);for(let[[R,L],B,Z]of F){let H=ML(L);D.reportError(new uC.GraphQLError(`Fields "${R}" conflict because ${H}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:B.concat(Z)}))}}}}function fC(D,P,O,W,F){let R=[],[L,B]=aP(D,P,W,F);if(hC(D,R,P,O,L),B.length!==0)for(let Z=0;Z1)for(let B=0;B[R.value,L]));return O.every((R)=>{let L=R.value,B=F.get(R.name.value);if(B===void 0)return!1;return CL(L)===CL(B)})}function CL(D){return TC.print(NC.sortValueNode(D))}function A6(D,P){if(yD.isListType(D))return yD.isListType(P)?A6(D.ofType,P.ofType):!0;if(yD.isListType(P))return!0;if(yD.isNonNullType(D))return yD.isNonNullType(P)?A6(D.ofType,P.ofType):!0;if(yD.isNonNullType(P))return!0;if(yD.isLeafType(D)||yD.isLeafType(P))return D!==P;return!1}function aP(D,P,O,W){let F=P.get(W);if(F)return F;let R=Object.create(null),L=Object.create(null);bL(D,O,W,R,L);let B=[R,Object.keys(L)];return P.set(W,B),B}function G6(D,P,O){let W=P.get(O.selectionSet);if(W)return W;let F=$L.typeFromAST(D.getSchema(),O.typeCondition);return aP(D,P,F,O.selectionSet)}function bL(D,P,O,W,F){for(let R of O.selections)switch(R.kind){case E6.Kind.FIELD:{let L=R.name.value,B;if(yD.isObjectType(P)||yD.isInterfaceType(P))B=P.getFields()[L];let Z=R.alias?R.alias.value:L;if(!W[Z])W[Z]=[];W[Z].push([P,R,B]);break}case E6.Kind.FRAGMENT_SPREAD:F[R.name.value]=!0;break;case E6.Kind.INLINE_FRAGMENT:{let L=R.typeCondition,B=L?$L.typeFromAST(D.getSchema(),L):P;bL(D,B,R.selectionSet,W,F);break}}}function vC(D,P,O,W){if(D.length>0)return[[P,D.map(([F])=>F)],[O,...D.map(([,F])=>F).flat()],[W,...D.map(([,,F])=>F).flat()]]}class KL{constructor(){this._data=new Map}has(D,P,O){var W;let[F,R]=D{Object.defineProperty(uL,"__esModule",{value:!0});uL.PossibleFragmentSpreadsRule=lC;var sP=OD(),jL=g(),Q6=a(),_L=F1(),mC=b0();function lC(D){return{InlineFragment(P){let O=D.getType(),W=D.getParentType();if(Q6.isCompositeType(O)&&Q6.isCompositeType(W)&&!_L.doTypesOverlap(D.getSchema(),O,W)){let F=sP.inspect(W),R=sP.inspect(O);D.reportError(new jL.GraphQLError(`Fragment cannot be spread here as objects of type "${F}" can never be of type "${R}".`,{nodes:P}))}},FragmentSpread(P){let O=P.name.value,W=cC(D,O),F=D.getParentType();if(W&&F&&!_L.doTypesOverlap(D.getSchema(),W,F)){let R=sP.inspect(F),L=sP.inspect(W);D.reportError(new jL.GraphQLError(`Fragment "${O}" cannot be spread here as objects of type "${R}" can never be of type "${L}".`,{nodes:P}))}}}}function cC(D,P){let O=D.getFragment(P);if(O){let W=mC.typeFromAST(D.getSchema(),O.typeCondition);if(Q6.isCompositeType(W))return W}}});var $6=S((fL)=>{Object.defineProperty(fL,"__esModule",{value:!0});fL.PossibleTypeExtensionsRule=sC;var dC=o0(),NL=OD(),kL=ND(),rC=D2(),TL=g(),UD=r(),aC=N2(),Y8=a();function sC(D){let P=D.getSchema(),O=Object.create(null);for(let F of D.getDocument().definitions)if(aC.isTypeDefinitionNode(F))O[F.name.value]=F;return{ScalarTypeExtension:W,ObjectTypeExtension:W,InterfaceTypeExtension:W,UnionTypeExtension:W,EnumTypeExtension:W,InputObjectTypeExtension:W};function W(F){let R=F.name.value,L=O[R],B=P===null||P===void 0?void 0:P.getType(R),Z;if(L)Z=nC[L.kind];else if(B)Z=iC(B);if(Z){if(Z!==F.kind){let H=tC(F.kind);D.reportError(new TL.GraphQLError(`Cannot extend non-${H} type "${R}".`,{nodes:L?[L,F]:F}))}}else{let H=Object.keys({...O,...P===null||P===void 0?void 0:P.getTypeMap()}),Y=rC.suggestionList(R,H);D.reportError(new TL.GraphQLError(`Cannot extend type "${R}" because it is not defined.`+dC.didYouMean(Y),{nodes:F.name}))}}}var nC={[UD.Kind.SCALAR_TYPE_DEFINITION]:UD.Kind.SCALAR_TYPE_EXTENSION,[UD.Kind.OBJECT_TYPE_DEFINITION]:UD.Kind.OBJECT_TYPE_EXTENSION,[UD.Kind.INTERFACE_TYPE_DEFINITION]:UD.Kind.INTERFACE_TYPE_EXTENSION,[UD.Kind.UNION_TYPE_DEFINITION]:UD.Kind.UNION_TYPE_EXTENSION,[UD.Kind.ENUM_TYPE_DEFINITION]:UD.Kind.ENUM_TYPE_EXTENSION,[UD.Kind.INPUT_OBJECT_TYPE_DEFINITION]:UD.Kind.INPUT_OBJECT_TYPE_EXTENSION};function iC(D){if(Y8.isScalarType(D))return UD.Kind.SCALAR_TYPE_EXTENSION;if(Y8.isObjectType(D))return UD.Kind.OBJECT_TYPE_EXTENSION;if(Y8.isInterfaceType(D))return UD.Kind.INTERFACE_TYPE_EXTENSION;if(Y8.isUnionType(D))return UD.Kind.UNION_TYPE_EXTENSION;if(Y8.isEnumType(D))return UD.Kind.ENUM_TYPE_EXTENSION;if(Y8.isInputObjectType(D))return UD.Kind.INPUT_OBJECT_TYPE_EXTENSION;kL.invariant(!1,"Unexpected type: "+NL.inspect(D))}function tC(D){switch(D){case UD.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case UD.Kind.OBJECT_TYPE_EXTENSION:return"object";case UD.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case UD.Kind.UNION_TYPE_EXTENSION:return"union";case UD.Kind.ENUM_TYPE_EXTENSION:return"enum";case UD.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:kL.invariant(!1,"Unexpected kind: "+NL.inspect(D))}}});var w6=S((mL)=>{Object.defineProperty(mL,"__esModule",{value:!0});mL.ProvidedRequiredArgumentsOnDirectivesRule=yL;mL.ProvidedRequiredArgumentsRule=P$;var hL=OD(),xL=e0(),gL=g(),vL=r(),eC=rD(),M6=a(),D$=vD();function P$(D){return{...yL(D),Field:{leave(P){var O;let W=D.getFieldDef();if(!W)return!1;let F=new Set((O=P.arguments)===null||O===void 0?void 0:O.map((R)=>R.name.value));for(let R of W.args)if(!F.has(R.name)&&M6.isRequiredArgument(R)){let L=hL.inspect(R.type);D.reportError(new gL.GraphQLError(`Field "${W.name}" argument "${R.name}" of type "${L}" is required, but it was not provided.`,{nodes:P}))}}}}}function yL(D){var P;let O=Object.create(null),W=D.getSchema(),F=(P=W===null||W===void 0?void 0:W.getDirectives())!==null&&P!==void 0?P:D$.specifiedDirectives;for(let B of F)O[B.name]=xL.keyMap(B.args.filter(M6.isRequiredArgument),(Z)=>Z.name);let R=D.getDocument().definitions;for(let B of R)if(B.kind===vL.Kind.DIRECTIVE_DEFINITION){var L;let Z=(L=B.arguments)!==null&&L!==void 0?L:[];O[B.name.value]=xL.keyMap(Z.filter(O$),(H)=>H.name.value)}return{Directive:{leave(B){let Z=B.name.value,H=O[Z];if(H){var Y;let q=(Y=B.arguments)!==null&&Y!==void 0?Y:[],U=new Set(q.map((J)=>J.name.value));for(let[J,A]of Object.entries(H))if(!U.has(J)){let E=M6.isType(A.type)?hL.inspect(A.type):eC.print(A.type);D.reportError(new gL.GraphQLError(`Directive "@${Z}" argument "${J}" of type "${E}" is required, but it was not provided.`,{nodes:B}))}}}}}}function O$(D){return D.type.kind===vL.Kind.NON_NULL_TYPE&&D.defaultValue==null}});var b6=S((dL)=>{Object.defineProperty(dL,"__esModule",{value:!0});dL.ScalarLeafsRule=R$;var lL=OD(),cL=g(),pL=a();function R$(D){return{Field(P){let O=D.getType(),W=P.selectionSet;if(O){if(pL.isLeafType(pL.getNamedType(O))){if(W){let F=P.name.value,R=lL.inspect(O);D.reportError(new cL.GraphQLError(`Field "${F}" must not have a selection since type "${R}" has no subfields.`,{nodes:W}))}}else if(!W){let F=P.name.value,R=lL.inspect(O);D.reportError(new cL.GraphQLError(`Field "${F}" of type "${R}" must have a selection of subfields. Did you mean "${F} { ... }"?`,{nodes:P}))}}}}}});var K6=S((rL)=>{Object.defineProperty(rL,"__esModule",{value:!0});rL.printPathArray=B$;function B$(D){return D.map((P)=>typeof P==="number"?"["+P.toString()+"]":"."+P).join("")}});var E1=S((aL)=>{Object.defineProperty(aL,"__esModule",{value:!0});aL.addPath=H$;aL.pathToArray=q$;function H$(D,P,O){return{prev:D,key:P,typename:O}}function q$(D){let P=[],O=D;while(O)P.push(O.key),O=O.prev;return P.reverse()}});var V6=S((sL)=>{Object.defineProperty(sL,"__esModule",{value:!0});sL.coerceInputValue=z$;var J$=o0(),nP=OD(),S$=ND(),X$=lP(),E$=Q0(),E0=E1(),A$=K6(),G$=D2(),m0=g(),A1=a();function z$(D,P,O=I$){return G1(D,P,O,void 0)}function I$(D,P,O){let W="Invalid value "+nP.inspect(P);if(D.length>0)W+=` at "value${A$.printPathArray(D)}"`;throw O.message=W+": "+O.message,O}function G1(D,P,O,W){if(A1.isNonNullType(P)){if(D!=null)return G1(D,P.ofType,O,W);O(E0.pathToArray(W),D,new m0.GraphQLError(`Expected non-nullable type "${nP.inspect(P)}" not to be null.`));return}if(D==null)return null;if(A1.isListType(P)){let F=P.ofType;if(X$.isIterableObject(D))return Array.from(D,(R,L)=>{let B=E0.addPath(W,L,void 0);return G1(R,F,O,B)});return[G1(D,F,O,W)]}if(A1.isInputObjectType(P)){if(!E$.isObjectLike(D)){O(E0.pathToArray(W),D,new m0.GraphQLError(`Expected type "${P.name}" to be an object.`));return}let F={},R=P.getFields();for(let L of Object.values(R)){let B=D[L.name];if(B===void 0){if(L.defaultValue!==void 0)F[L.name]=L.defaultValue;else if(A1.isNonNullType(L.type)){let Z=nP.inspect(L.type);O(E0.pathToArray(W),D,new m0.GraphQLError(`Field "${L.name}" of required type "${Z}" was not provided.`))}continue}F[L.name]=G1(B,L.type,O,E0.addPath(W,L.name,P.name))}for(let L of Object.keys(D))if(!R[L]){let B=G$.suggestionList(L,Object.keys(P.getFields()));O(E0.pathToArray(W),D,new m0.GraphQLError(`Field "${L}" is not defined by type "${P.name}".`+J$.didYouMean(B)))}if(P.isOneOf){let L=Object.keys(F);if(L.length!==1)O(E0.pathToArray(W),D,new m0.GraphQLError(`Exactly one key must be specified for OneOf type "${P.name}".`));let B=L[0],Z=F[B];if(Z===null)O(E0.pathToArray(W).concat(B),Z,new m0.GraphQLError(`Field "${B}" must be non-null.`))}return F}if(A1.isLeafType(P)){let F;try{F=P.parseValue(D)}catch(R){if(R instanceof m0.GraphQLError)O(E0.pathToArray(W),D,R);else O(E0.pathToArray(W),D,new m0.GraphQLError(`Expected type "${P.name}". `+R.message,{originalError:R}));return}if(F===void 0)O(E0.pathToArray(W),D,new m0.GraphQLError(`Expected type "${P.name}".`));return F}S$.invariant(!1,"Unexpected input type: "+nP.inspect(P))}});var I1=S((iL)=>{Object.defineProperty(iL,"__esModule",{value:!0});iL.valueFromAST=z1;var C$=OD(),$$=ND(),M$=e0(),U8=r(),k2=a();function z1(D,P,O){if(!D)return;if(D.kind===U8.Kind.VARIABLE){let W=D.name.value;if(O==null||O[W]===void 0)return;let F=O[W];if(F===null&&k2.isNonNullType(P))return;return F}if(k2.isNonNullType(P)){if(D.kind===U8.Kind.NULL)return;return z1(D,P.ofType,O)}if(D.kind===U8.Kind.NULL)return null;if(k2.isListType(P)){let W=P.ofType;if(D.kind===U8.Kind.LIST){let R=[];for(let L of D.values)if(nL(L,O)){if(k2.isNonNullType(W))return;R.push(null)}else{let B=z1(L,W,O);if(B===void 0)return;R.push(B)}return R}let F=z1(D,W,O);if(F===void 0)return;return[F]}if(k2.isInputObjectType(P)){if(D.kind!==U8.Kind.OBJECT)return;let W=Object.create(null),F=M$.keyMap(D.fields,(R)=>R.name.value);for(let R of Object.values(P.getFields())){let L=F[R.name];if(!L||nL(L.value,O)){if(R.defaultValue!==void 0)W[R.name]=R.defaultValue;else if(k2.isNonNullType(R.type))return;continue}let B=z1(L.value,R.type,O);if(B===void 0)return;W[R.name]=B}if(P.isOneOf){let R=Object.keys(W);if(R.length!==1)return;if(W[R[0]]===null)return}return W}if(k2.isLeafType(P)){let W;try{W=P.parseLiteral(D,O)}catch(F){return}if(W===void 0)return;return W}$$.invariant(!1,"Unexpected input type: "+C$.inspect(P))}function nL(D,P){return D.kind===U8.Kind.VARIABLE&&(P==null||P[D.name.value]===void 0)}});var X8=S((OB)=>{Object.defineProperty(OB,"__esModule",{value:!0});OB.getArgumentValues=DB;OB.getDirectiveValues=T$;OB.getVariableValues=_$;var J8=OD(),b$=e0(),K$=K6(),l0=g(),tL=r(),oL=rD(),S8=a(),V$=V6(),j$=b0(),eL=I1();function _$(D,P,O,W){let F=[],R=W===null||W===void 0?void 0:W.maxErrors;try{let L=u$(D,P,O,(B)=>{if(R!=null&&F.length>=R)throw new l0.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");F.push(B)});if(F.length===0)return{coerced:L}}catch(L){F.push(L)}return{errors:F}}function u$(D,P,O,W){let F={};for(let R of P){let L=R.variable.name.value,B=j$.typeFromAST(D,R.type);if(!S8.isInputType(B)){let H=oL.print(R.type);W(new l0.GraphQLError(`Variable "\$${L}" expected value of type "${H}" which cannot be used as an input type.`,{nodes:R.type}));continue}if(!PB(O,L)){if(R.defaultValue)F[L]=eL.valueFromAST(R.defaultValue,B);else if(S8.isNonNullType(B)){let H=J8.inspect(B);W(new l0.GraphQLError(`Variable "\$${L}" of required type "${H}" was not provided.`,{nodes:R}))}continue}let Z=O[L];if(Z===null&&S8.isNonNullType(B)){let H=J8.inspect(B);W(new l0.GraphQLError(`Variable "\$${L}" of non-null type "${H}" must not be null.`,{nodes:R}));continue}F[L]=V$.coerceInputValue(Z,B,(H,Y,q)=>{let U=`Variable "\$${L}" got invalid value `+J8.inspect(Y);if(H.length>0)U+=` at "${L}${K$.printPathArray(H)}"`;W(new l0.GraphQLError(U+"; "+q.message,{nodes:R,originalError:q}))})}return F}function DB(D,P,O){var W;let F={},R=(W=P.arguments)!==null&&W!==void 0?W:[],L=b$.keyMap(R,(B)=>B.name.value);for(let B of D.args){let{name:Z,type:H}=B,Y=L[Z];if(!Y){if(B.defaultValue!==void 0)F[Z]=B.defaultValue;else if(S8.isNonNullType(H))throw new l0.GraphQLError(`Argument "${Z}" of required type "${J8.inspect(H)}" was not provided.`,{nodes:P});continue}let q=Y.value,U=q.kind===tL.Kind.NULL;if(q.kind===tL.Kind.VARIABLE){let A=q.name.value;if(O==null||!PB(O,A)){if(B.defaultValue!==void 0)F[Z]=B.defaultValue;else if(S8.isNonNullType(H))throw new l0.GraphQLError(`Argument "${Z}" of required type "${J8.inspect(H)}" was provided the variable "\$${A}" which was not provided a runtime value.`,{nodes:q});continue}U=O[A]==null}if(U&&S8.isNonNullType(H))throw new l0.GraphQLError(`Argument "${Z}" of non-null type "${J8.inspect(H)}" must not be null.`,{nodes:q});let J=eL.valueFromAST(q,H,O);if(J===void 0)throw new l0.GraphQLError(`Argument "${Z}" has invalid value ${oL.print(q)}.`,{nodes:q});F[Z]=J}return F}function T$(D,P,O){var W;let F=(W=P.directives)===null||W===void 0?void 0:W.find((R)=>R.name.value===D.name);if(F)return DB(D,F,O)}function PB(D,P){return Object.prototype.hasOwnProperty.call(D,P)}});var tP=S((LB)=>{Object.defineProperty(LB,"__esModule",{value:!0});LB.collectFields=g$;LB.collectSubfields=v$;var j6=r(),x$=a(),WB=vD(),h$=b0(),FB=X8();function g$(D,P,O,W,F){let R=new Map;return iP(D,P,O,W,F,R,new Set),R}function v$(D,P,O,W,F){let R=new Map,L=new Set;for(let B of F)if(B.selectionSet)iP(D,P,O,W,B.selectionSet,R,L);return R}function iP(D,P,O,W,F,R,L){for(let B of F.selections)switch(B.kind){case j6.Kind.FIELD:{if(!_6(O,B))continue;let Z=y$(B),H=R.get(Z);if(H!==void 0)H.push(B);else R.set(Z,[B]);break}case j6.Kind.INLINE_FRAGMENT:{if(!_6(O,B)||!RB(D,B,W))continue;iP(D,P,O,W,B.selectionSet,R,L);break}case j6.Kind.FRAGMENT_SPREAD:{let Z=B.name.value;if(L.has(Z)||!_6(O,B))continue;L.add(Z);let H=P[Z];if(!H||!RB(D,H,W))continue;iP(D,P,O,W,H.selectionSet,R,L);break}}}function _6(D,P){let O=FB.getDirectiveValues(WB.GraphQLSkipDirective,P,D);if((O===null||O===void 0?void 0:O.if)===!0)return!1;let W=FB.getDirectiveValues(WB.GraphQLIncludeDirective,P,D);if((W===null||W===void 0?void 0:W.if)===!1)return!1;return!0}function RB(D,P,O){let W=P.typeCondition;if(!W)return!0;let F=h$.typeFromAST(D,W);if(F===O)return!0;if(x$.isAbstractType(F))return D.isSubType(F,O);return!1}function y$(D){return D.alias?D.alias.value:D.name.value}});var u6=S((ZB)=>{Object.defineProperty(ZB,"__esModule",{value:!0});ZB.SingleFieldSubscriptionsRule=d$;var BB=g(),c$=r(),p$=tP();function d$(D){return{OperationDefinition(P){if(P.operation==="subscription"){let O=D.getSchema(),W=O.getSubscriptionType();if(W){let F=P.name?P.name.value:null,R=Object.create(null),L=D.getDocument(),B=Object.create(null);for(let H of L.definitions)if(H.kind===c$.Kind.FRAGMENT_DEFINITION)B[H.name.value]=H;let Z=p$.collectFields(O,B,R,W,P.selectionSet);if(Z.size>1){let q=[...Z.values()].slice(1).flat();D.reportError(new BB.GraphQLError(F!=null?`Subscription "${F}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:q}))}for(let H of Z.values())if(H[0].name.value.startsWith("__"))D.reportError(new BB.GraphQLError(F!=null?`Subscription "${F}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:H}))}}}}}});var oP=S((HB)=>{Object.defineProperty(HB,"__esModule",{value:!0});HB.groupBy=a$;function a$(D,P){let O=new Map;for(let W of D){let F=P(W),R=O.get(F);if(R===void 0)O.set(F,[W]);else R.push(W)}return O}});var T6=S((qB)=>{Object.defineProperty(qB,"__esModule",{value:!0});qB.UniqueArgumentDefinitionNamesRule=t$;var n$=oP(),i$=g();function t$(D){return{DirectiveDefinition(W){var F;let R=(F=W.arguments)!==null&&F!==void 0?F:[];return O(`@${W.name.value}`,R)},InterfaceTypeDefinition:P,InterfaceTypeExtension:P,ObjectTypeDefinition:P,ObjectTypeExtension:P};function P(W){var F;let R=W.name.value,L=(F=W.fields)!==null&&F!==void 0?F:[];for(let Z of L){var B;let H=Z.name.value,Y=(B=Z.arguments)!==null&&B!==void 0?B:[];O(`${R}.${H}`,Y)}return!1}function O(W,F){let R=n$.groupBy(F,(L)=>L.name.value);for(let[L,B]of R)if(B.length>1)D.reportError(new i$.GraphQLError(`Argument "${W}(${L}:)" can only be defined once.`,{nodes:B.map((Z)=>Z.name)}));return!1}}});var N6=S((YB)=>{Object.defineProperty(YB,"__esModule",{value:!0});YB.UniqueArgumentNamesRule=PM;var e$=oP(),DM=g();function PM(D){return{Field:P,Directive:P};function P(O){var W;let F=(W=O.arguments)!==null&&W!==void 0?W:[],R=e$.groupBy(F,(L)=>L.name.value);for(let[L,B]of R)if(B.length>1)D.reportError(new DM.GraphQLError(`There can be only one argument named "${L}".`,{nodes:B.map((Z)=>Z.name)}))}}});var k6=S((JB)=>{Object.defineProperty(JB,"__esModule",{value:!0});JB.UniqueDirectiveNamesRule=WM;var UB=g();function WM(D){let P=Object.create(null),O=D.getSchema();return{DirectiveDefinition(W){let F=W.name.value;if(O!==null&&O!==void 0&&O.getDirective(F)){D.reportError(new UB.GraphQLError(`Directive "@${F}" already exists in the schema. It cannot be redefined.`,{nodes:W.name}));return}if(P[F])D.reportError(new UB.GraphQLError(`There can be only one directive named "@${F}".`,{nodes:[P[F],W.name]}));else P[F]=W.name;return!1}}}});var x6=S((XB)=>{Object.defineProperty(XB,"__esModule",{value:!0});XB.UniqueDirectivesPerLocationRule=BM;var RM=g(),f6=r(),SB=N2(),LM=vD();function BM(D){let P=Object.create(null),O=D.getSchema(),W=O?O.getDirectives():LM.specifiedDirectives;for(let B of W)P[B.name]=!B.isRepeatable;let F=D.getDocument().definitions;for(let B of F)if(B.kind===f6.Kind.DIRECTIVE_DEFINITION)P[B.name.value]=!B.repeatable;let R=Object.create(null),L=Object.create(null);return{enter(B){if(!("directives"in B)||!B.directives)return;let Z;if(B.kind===f6.Kind.SCHEMA_DEFINITION||B.kind===f6.Kind.SCHEMA_EXTENSION)Z=R;else if(SB.isTypeDefinitionNode(B)||SB.isTypeExtensionNode(B)){let H=B.name.value;if(Z=L[H],Z===void 0)L[H]=Z=Object.create(null)}else Z=Object.create(null);for(let H of B.directives){let Y=H.name.value;if(P[Y])if(Z[Y])D.reportError(new RM.GraphQLError(`The directive "@${Y}" can only be used once at this location.`,{nodes:[Z[Y],H]}));else Z[Y]=H}}}}});var h6=S((AB)=>{Object.defineProperty(AB,"__esModule",{value:!0});AB.UniqueEnumValueNamesRule=qM;var EB=g(),HM=a();function qM(D){let P=D.getSchema(),O=P?P.getTypeMap():Object.create(null),W=Object.create(null);return{EnumTypeDefinition:F,EnumTypeExtension:F};function F(R){var L;let B=R.name.value;if(!W[B])W[B]=Object.create(null);let Z=(L=R.values)!==null&&L!==void 0?L:[],H=W[B];for(let Y of Z){let q=Y.name.value,U=O[B];if(HM.isEnumType(U)&&U.getValue(q))D.reportError(new EB.GraphQLError(`Enum value "${B}.${q}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:Y.name}));else if(H[q])D.reportError(new EB.GraphQLError(`Enum value "${B}.${q}" can only be defined once.`,{nodes:[H[q],Y.name]}));else H[q]=Y.name}return!1}}});var v6=S((zB)=>{Object.defineProperty(zB,"__esModule",{value:!0});zB.UniqueFieldDefinitionNamesRule=UM;var GB=g(),g6=a();function UM(D){let P=D.getSchema(),O=P?P.getTypeMap():Object.create(null),W=Object.create(null);return{InputObjectTypeDefinition:F,InputObjectTypeExtension:F,InterfaceTypeDefinition:F,InterfaceTypeExtension:F,ObjectTypeDefinition:F,ObjectTypeExtension:F};function F(R){var L;let B=R.name.value;if(!W[B])W[B]=Object.create(null);let Z=(L=R.fields)!==null&&L!==void 0?L:[],H=W[B];for(let Y of Z){let q=Y.name.value;if(JM(O[B],q))D.reportError(new GB.GraphQLError(`Field "${B}.${q}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:Y.name}));else if(H[q])D.reportError(new GB.GraphQLError(`Field "${B}.${q}" can only be defined once.`,{nodes:[H[q],Y.name]}));else H[q]=Y.name}return!1}}function JM(D,P){if(g6.isObjectType(D)||g6.isInterfaceType(D)||g6.isInputObjectType(D))return D.getFields()[P]!=null;return!1}});var y6=S((IB)=>{Object.defineProperty(IB,"__esModule",{value:!0});IB.UniqueFragmentNamesRule=EM;var XM=g();function EM(D){let P=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(O){let W=O.name.value;if(P[W])D.reportError(new XM.GraphQLError(`There can be only one fragment named "${W}".`,{nodes:[P[W],O.name]}));else P[W]=O.name;return!1}}}});var m6=S((QB)=>{Object.defineProperty(QB,"__esModule",{value:!0});QB.UniqueInputFieldNamesRule=IM;var GM=ND(),zM=g();function IM(D){let P=[],O=Object.create(null);return{ObjectValue:{enter(){P.push(O),O=Object.create(null)},leave(){let W=P.pop();W||GM.invariant(!1),O=W}},ObjectField(W){let F=W.name.value;if(O[F])D.reportError(new zM.GraphQLError(`There can be only one input field named "${F}".`,{nodes:[O[F],W.name]}));else O[F]=W.name}}}});var l6=S((CB)=>{Object.defineProperty(CB,"__esModule",{value:!0});CB.UniqueOperationNamesRule=$M;var CM=g();function $M(D){let P=Object.create(null);return{OperationDefinition(O){let W=O.name;if(W)if(P[W.value])D.reportError(new CM.GraphQLError(`There can be only one operation named "${W.value}".`,{nodes:[P[W.value],W]}));else P[W.value]=W;return!1},FragmentDefinition:()=>!1}}});var c6=S((MB)=>{Object.defineProperty(MB,"__esModule",{value:!0});MB.UniqueOperationTypesRule=wM;var $B=g();function wM(D){let P=D.getSchema(),O=Object.create(null),W=P?{query:P.getQueryType(),mutation:P.getMutationType(),subscription:P.getSubscriptionType()}:{};return{SchemaDefinition:F,SchemaExtension:F};function F(R){var L;let B=(L=R.operationTypes)!==null&&L!==void 0?L:[];for(let Z of B){let H=Z.operation,Y=O[H];if(W[H])D.reportError(new $B.GraphQLError(`Type for ${H} already defined in the schema. It cannot be redefined.`,{nodes:Z}));else if(Y)D.reportError(new $B.GraphQLError(`There can be only one ${H} type in schema.`,{nodes:[Y,Z]}));else O[H]=Z}return!1}}});var p6=S((bB)=>{Object.defineProperty(bB,"__esModule",{value:!0});bB.UniqueTypeNamesRule=KM;var wB=g();function KM(D){let P=Object.create(null),O=D.getSchema();return{ScalarTypeDefinition:W,ObjectTypeDefinition:W,InterfaceTypeDefinition:W,UnionTypeDefinition:W,EnumTypeDefinition:W,InputObjectTypeDefinition:W};function W(F){let R=F.name.value;if(O!==null&&O!==void 0&&O.getType(R)){D.reportError(new wB.GraphQLError(`Type "${R}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:F.name}));return}if(P[R])D.reportError(new wB.GraphQLError(`There can be only one type named "${R}".`,{nodes:[P[R],F.name]}));else P[R]=F.name;return!1}}});var d6=S((KB)=>{Object.defineProperty(KB,"__esModule",{value:!0});KB.UniqueVariableNamesRule=uM;var jM=oP(),_M=g();function uM(D){return{OperationDefinition(P){var O;let W=(O=P.variableDefinitions)!==null&&O!==void 0?O:[],F=jM.groupBy(W,(R)=>R.variable.name.value);for(let[R,L]of F)if(L.length>1)D.reportError(new _M.GraphQLError(`There can be only one variable named "\$${R}".`,{nodes:L.map((B)=>B.variable.name)}))}}}});var a6=S((VB)=>{Object.defineProperty(VB,"__esModule",{value:!0});VB.ValuesOfCorrectTypeRule=xM;var NM=o0(),Q1=OD(),kM=e0(),fM=D2(),V0=g(),r6=r(),eP=rD(),K0=a();function xM(D){let P={};return{OperationDefinition:{enter(){P={}}},VariableDefinition(O){P[O.variable.name.value]=O},ListValue(O){let W=K0.getNullableType(D.getParentInputType());if(!K0.isListType(W))return f2(D,O),!1},ObjectValue(O){let W=K0.getNamedType(D.getInputType());if(!K0.isInputObjectType(W))return f2(D,O),!1;let F=kM.keyMap(O.fields,(R)=>R.name.value);for(let R of Object.values(W.getFields()))if(!F[R.name]&&K0.isRequiredInputField(R)){let B=Q1.inspect(R.type);D.reportError(new V0.GraphQLError(`Field "${W.name}.${R.name}" of required type "${B}" was not provided.`,{nodes:O}))}if(W.isOneOf)hM(D,O,W,F,P)},ObjectField(O){let W=K0.getNamedType(D.getParentInputType());if(!D.getInputType()&&K0.isInputObjectType(W)){let R=fM.suggestionList(O.name.value,Object.keys(W.getFields()));D.reportError(new V0.GraphQLError(`Field "${O.name.value}" is not defined by type "${W.name}".`+NM.didYouMean(R),{nodes:O}))}},NullValue(O){let W=D.getInputType();if(K0.isNonNullType(W))D.reportError(new V0.GraphQLError(`Expected value of type "${Q1.inspect(W)}", found ${eP.print(O)}.`,{nodes:O}))},EnumValue:(O)=>f2(D,O),IntValue:(O)=>f2(D,O),FloatValue:(O)=>f2(D,O),StringValue:(O)=>f2(D,O),BooleanValue:(O)=>f2(D,O)}}function f2(D,P){let O=D.getInputType();if(!O)return;let W=K0.getNamedType(O);if(!K0.isLeafType(W)){let F=Q1.inspect(O);D.reportError(new V0.GraphQLError(`Expected value of type "${F}", found ${eP.print(P)}.`,{nodes:P}));return}try{if(W.parseLiteral(P,void 0)===void 0){let R=Q1.inspect(O);D.reportError(new V0.GraphQLError(`Expected value of type "${R}", found ${eP.print(P)}.`,{nodes:P}))}}catch(F){let R=Q1.inspect(O);if(F instanceof V0.GraphQLError)D.reportError(F);else D.reportError(new V0.GraphQLError(`Expected value of type "${R}", found ${eP.print(P)}; `+F.message,{nodes:P,originalError:F}))}}function hM(D,P,O,W,F){var R;let L=Object.keys(W);if(L.length!==1){D.reportError(new V0.GraphQLError(`OneOf Input Object "${O.name}" must specify exactly one key.`,{nodes:[P]}));return}let Z=(R=W[L[0]])===null||R===void 0?void 0:R.value,H=!Z||Z.kind===r6.Kind.NULL,Y=(Z===null||Z===void 0?void 0:Z.kind)===r6.Kind.VARIABLE;if(H){D.reportError(new V0.GraphQLError(`Field "${O.name}.${L[0]}" must be non-null.`,{nodes:[P]}));return}if(Y){let q=Z.name.value;if(F[q].type.kind!==r6.Kind.NON_NULL_TYPE)D.reportError(new V0.GraphQLError(`Variable "${q}" must be non-nullable to be used for OneOf Input Object "${O.name}".`,{nodes:[P]}))}}});var s6=S((jB)=>{Object.defineProperty(jB,"__esModule",{value:!0});jB.VariablesAreInputTypesRule=cM;var vM=g(),yM=rD(),mM=a(),lM=b0();function cM(D){return{VariableDefinition(P){let O=lM.typeFromAST(D.getSchema(),P.type);if(O!==void 0&&!mM.isInputType(O)){let W=P.variable.name.value,F=yM.print(P.type);D.reportError(new vM.GraphQLError(`Variable "\$${W}" cannot be non-input type "${F}".`,{nodes:P.type}))}}}}});var n6=S((NB)=>{Object.defineProperty(NB,"__esModule",{value:!0});NB.VariablesInAllowedPositionRule=sM;var _B=OD(),dM=g(),rM=r(),uB=a(),TB=F1(),aM=b0();function sM(D){let P=Object.create(null);return{OperationDefinition:{enter(){P=Object.create(null)},leave(O){let W=D.getRecursiveVariableUsages(O);for(let{node:F,type:R,defaultValue:L}of W){let B=F.name.value,Z=P[B];if(Z&&R){let H=D.getSchema(),Y=aM.typeFromAST(H,Z.type);if(Y&&!nM(H,Y,Z.defaultValue,R,L)){let q=_B.inspect(Y),U=_B.inspect(R);D.reportError(new dM.GraphQLError(`Variable "\$${B}" of type "${q}" used in position expecting type "${U}".`,{nodes:[Z,F]}))}}}}},VariableDefinition(O){P[O.variable.name.value]=O}}}function nM(D,P,O,W,F){if(uB.isNonNullType(W)&&!uB.isNonNullType(P)){if(!(O!=null&&O.kind!==rM.Kind.NULL)&&F===void 0)return!1;let B=W.ofType;return TB.isTypeSubTypeOf(D,P,B)}return TB.isTypeSubTypeOf(D,P,W)}});var i6=S((lB)=>{Object.defineProperty(lB,"__esModule",{value:!0});lB.specifiedSDLRules=lB.specifiedRules=lB.recommendedRules=void 0;var tM=tW(),oM=oW(),eM=eW(),kB=D6(),fB=W6(),Dw=F6(),xB=L6(),Pw=B6(),Ow=Z6(),Ww=H6(),Fw=q6(),Rw=Y6(),Lw=U6(),Bw=J6(),Zw=I6(),Hw=C6(),qw=$6(),hB=w6(),Yw=b6(),Uw=u6(),Jw=T6(),gB=N6(),Sw=k6(),vB=x6(),Xw=h6(),Ew=v6(),Aw=y6(),yB=m6(),Gw=l6(),zw=c6(),Iw=p6(),Qw=d6(),Cw=a6(),$w=s6(),Mw=n6(),mB=Object.freeze([Ww.MaxIntrospectionDepthRule]);lB.recommendedRules=mB;var ww=Object.freeze([tM.ExecutableDefinitionsRule,Gw.UniqueOperationNamesRule,Pw.LoneAnonymousOperationRule,Uw.SingleFieldSubscriptionsRule,xB.KnownTypeNamesRule,eM.FragmentsOnCompositeTypesRule,$w.VariablesAreInputTypesRule,Yw.ScalarLeafsRule,oM.FieldsOnCorrectTypeRule,Aw.UniqueFragmentNamesRule,Dw.KnownFragmentNamesRule,Lw.NoUnusedFragmentsRule,Hw.PossibleFragmentSpreadsRule,Fw.NoFragmentCyclesRule,Qw.UniqueVariableNamesRule,Rw.NoUndefinedVariablesRule,Bw.NoUnusedVariablesRule,fB.KnownDirectivesRule,vB.UniqueDirectivesPerLocationRule,kB.KnownArgumentNamesRule,gB.UniqueArgumentNamesRule,Cw.ValuesOfCorrectTypeRule,hB.ProvidedRequiredArgumentsRule,Mw.VariablesInAllowedPositionRule,Zw.OverlappingFieldsCanBeMergedRule,yB.UniqueInputFieldNamesRule,...mB]);lB.specifiedRules=ww;var bw=Object.freeze([Ow.LoneSchemaDefinitionRule,zw.UniqueOperationTypesRule,Iw.UniqueTypeNamesRule,Xw.UniqueEnumValueNamesRule,Ew.UniqueFieldDefinitionNamesRule,Jw.UniqueArgumentDefinitionNamesRule,Sw.UniqueDirectiveNamesRule,xB.KnownTypeNamesRule,fB.KnownDirectivesRule,vB.UniqueDirectivesPerLocationRule,qw.PossibleTypeExtensionsRule,kB.KnownArgumentNamesOnDirectivesRule,gB.UniqueArgumentNamesRule,yB.UniqueInputFieldNamesRule,hB.ProvidedRequiredArgumentsOnDirectivesRule]);lB.specifiedSDLRules=bw});var t6=S((sB)=>{Object.defineProperty(sB,"__esModule",{value:!0});sB.ValidationContext=sB.SDLValidationContext=sB.ASTValidationContext=void 0;var pB=r(),jw=w2(),dB=pP();class DO{constructor(D,P){this._ast=D,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=P}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(D){this._onError(D)}getDocument(){return this._ast}getFragment(D){let P;if(this._fragments)P=this._fragments;else{P=Object.create(null);for(let O of this.getDocument().definitions)if(O.kind===pB.Kind.FRAGMENT_DEFINITION)P[O.name.value]=O;this._fragments=P}return P[D]}getFragmentSpreads(D){let P=this._fragmentSpreads.get(D);if(!P){P=[];let O=[D],W;while(W=O.pop())for(let F of W.selections)if(F.kind===pB.Kind.FRAGMENT_SPREAD)P.push(F);else if(F.selectionSet)O.push(F.selectionSet);this._fragmentSpreads.set(D,P)}return P}getRecursivelyReferencedFragments(D){let P=this._recursivelyReferencedFragments.get(D);if(!P){P=[];let O=Object.create(null),W=[D.selectionSet],F;while(F=W.pop())for(let R of this.getFragmentSpreads(F)){let L=R.name.value;if(O[L]!==!0){O[L]=!0;let B=this.getFragment(L);if(B)P.push(B),W.push(B.selectionSet)}}this._recursivelyReferencedFragments.set(D,P)}return P}}sB.ASTValidationContext=DO;class rB extends DO{constructor(D,P,O){super(D,O);this._schema=P}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}sB.SDLValidationContext=rB;class aB extends DO{constructor(D,P,O,W){super(P,W);this._schema=D,this._typeInfo=O,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(D){let P=this._variableUsages.get(D);if(!P){let O=[],W=new dB.TypeInfo(this._schema);jw.visit(D,dB.visitWithTypeInfo(W,{VariableDefinition:()=>!1,Variable(F){O.push({node:F,type:W.getInputType(),defaultValue:W.getDefaultValue()})}})),P=O,this._variableUsages.set(D,P)}return P}getRecursiveVariableUsages(D){let P=this._recursiveVariableUsages.get(D);if(!P){P=this.getVariableUsages(D);for(let O of this.getRecursivelyReferencedFragments(D))P=P.concat(this.getVariableUsages(O));this._recursiveVariableUsages.set(D,P)}return P}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}sB.ValidationContext=aB});var C1=S((eB)=>{Object.defineProperty(eB,"__esModule",{value:!0});eB.assertValidSDL=xw;eB.assertValidSDLExtension=hw;eB.validate=fw;eB.validateSDL=o6;var Tw=hD(),Nw=g(),PO=w2(),kw=S1(),iB=pP(),tB=i6(),oB=t6();function fw(D,P,O=tB.specifiedRules,W,F=new iB.TypeInfo(D)){var R;let L=(R=W===null||W===void 0?void 0:W.maxErrors)!==null&&R!==void 0?R:100;P||Tw.devAssert(!1,"Must provide document."),kw.assertValidSchema(D);let B=Object.freeze({}),Z=[],H=new oB.ValidationContext(D,P,F,(q)=>{if(Z.length>=L)throw Z.push(new Nw.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),B;Z.push(q)}),Y=PO.visitInParallel(O.map((q)=>q(H)));try{PO.visit(P,iB.visitWithTypeInfo(F,Y))}catch(q){if(q!==B)throw q}return Z}function o6(D,P,O=tB.specifiedSDLRules){let W=[],F=new oB.SDLValidationContext(D,P,(L)=>{W.push(L)}),R=O.map((L)=>L(F));return PO.visit(D,PO.visitInParallel(R)),W}function xw(D){let P=o6(D);if(P.length!==0)throw new Error(P.map((O)=>O.message).join("\n\n"))}function hw(D,P){let O=o6(D,P);if(O.length!==0)throw new Error(O.map((W)=>W.message).join("\n\n"))}});var PZ=S((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});DZ.memoize3=lw;function lw(D){let P;return function O(W,F,R){if(P===void 0)P=new WeakMap;let L=P.get(W);if(L===void 0)L=new WeakMap,P.set(W,L);let B=L.get(F);if(B===void 0)B=new WeakMap,L.set(F,B);let Z=B.get(R);if(Z===void 0)Z=D(W,F,R),B.set(R,Z);return Z}}});var WZ=S((OZ)=>{Object.defineProperty(OZ,"__esModule",{value:!0});OZ.promiseForObject=pw;function pw(D){return Promise.all(Object.values(D)).then((P)=>{let O=Object.create(null);for(let[W,F]of Object.keys(D).entries())O[F]=P[W];return O})}});var RZ=S((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.promiseReduce=aw;var rw=IP();function aw(D,P,O){let W=O;for(let F of D)W=rw.isPromise(W)?W.then((R)=>P(R,F)):P(W,F);return W}});var ZZ=S((BZ)=>{Object.defineProperty(BZ,"__esModule",{value:!0});BZ.toError=iw;var nw=OD();function iw(D){return D instanceof Error?D:new LZ(D)}class LZ extends Error{constructor(D){super("Unexpected error value: "+nw.inspect(D));this.name="NonErrorThrown",this.thrownValue=D}}});var OO=S((HZ)=>{Object.defineProperty(HZ,"__esModule",{value:!0});HZ.locatedError=Db;var ow=ZZ(),ew=g();function Db(D,P,O){var W;let F=ow.toError(D);if(Pb(F))return F;return new ew.GraphQLError(F.message,{nodes:(W=F.nodes)!==null&&W!==void 0?W:P,source:F.source,positions:F.positions,path:O,originalError:F})}function Pb(D){return Array.isArray(D.path)}});var M1=S(($Z)=>{Object.defineProperty($Z,"__esModule",{value:!0});$Z.assertValidExecutionArguments=AZ;$Z.buildExecutionContext=GZ;$Z.buildResolveInfo=IZ;$Z.defaultTypeResolver=$Z.defaultFieldResolver=void 0;$Z.execute=EZ;$Z.executeSync=Hb;$Z.getFieldDef=CZ;var D5=hD(),x2=OD(),Wb=ND(),Fb=lP(),W5=Q0(),A0=IP(),Rb=PZ(),h2=E1(),qZ=WZ(),Lb=RZ(),eD=g(),FO=OO(),e6=C0(),YZ=r(),F2=a(),E8=oD(),Bb=S1(),SZ=tP(),XZ=X8(),Zb=Rb.memoize3((D,P,O)=>SZ.collectSubfields(D.schema,D.fragments,D.variableValues,P,O));function EZ(D){arguments.length<2||D5.devAssert(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:P,document:O,variableValues:W,rootValue:F}=D;AZ(P,O,W);let R=GZ(D);if(!("schema"in R))return{errors:R};try{let{operation:L}=R,B=qb(R,L,F);if(A0.isPromise(B))return B.then((Z)=>WO(Z,R.errors),(Z)=>{return R.errors.push(Z),WO(null,R.errors)});return WO(B,R.errors)}catch(L){return R.errors.push(L),WO(null,R.errors)}}function Hb(D){let P=EZ(D);if(A0.isPromise(P))throw new Error("GraphQL execution failed to complete synchronously.");return P}function WO(D,P){return P.length===0?{data:D}:{errors:P,data:D}}function AZ(D,P,O){P||D5.devAssert(!1,"Must provide document."),Bb.assertValidSchema(D),O==null||W5.isObjectLike(O)||D5.devAssert(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function GZ(D){var P,O;let{schema:W,document:F,rootValue:R,contextValue:L,variableValues:B,operationName:Z,fieldResolver:H,typeResolver:Y,subscribeFieldResolver:q}=D,U,J=Object.create(null);for(let G of F.definitions)switch(G.kind){case YZ.Kind.OPERATION_DEFINITION:if(Z==null){if(U!==void 0)return[new eD.GraphQLError("Must provide operation name if query contains multiple operations.")];U=G}else if(((P=G.name)===null||P===void 0?void 0:P.value)===Z)U=G;break;case YZ.Kind.FRAGMENT_DEFINITION:J[G.name.value]=G;break;default:}if(!U){if(Z!=null)return[new eD.GraphQLError(`Unknown operation named "${Z}".`)];return[new eD.GraphQLError("Must provide an operation.")]}let A=(O=U.variableDefinitions)!==null&&O!==void 0?O:[],E=XZ.getVariableValues(W,A,B!==null&&B!==void 0?B:{},{maxErrors:50});if(E.errors)return E.errors;return{schema:W,fragments:J,rootValue:R,contextValue:L,operation:U,variableValues:E.coerced,fieldResolver:H!==null&&H!==void 0?H:O5,typeResolver:Y!==null&&Y!==void 0?Y:QZ,subscribeFieldResolver:q!==null&&q!==void 0?q:O5,errors:[]}}function qb(D,P,O){let W=D.schema.getRootType(P.operation);if(W==null)throw new eD.GraphQLError(`Schema is not configured to execute ${P.operation} operation.`,{nodes:P});let F=SZ.collectFields(D.schema,D.fragments,D.variableValues,W,P.selectionSet),R=void 0;switch(P.operation){case e6.OperationTypeNode.QUERY:return RO(D,W,O,R,F);case e6.OperationTypeNode.MUTATION:return Yb(D,W,O,R,F);case e6.OperationTypeNode.SUBSCRIPTION:return RO(D,W,O,R,F)}}function Yb(D,P,O,W,F){return Lb.promiseReduce(F.entries(),(R,[L,B])=>{let Z=h2.addPath(W,L,P.name),H=zZ(D,P,O,B,Z);if(H===void 0)return R;if(A0.isPromise(H))return H.then((Y)=>{return R[L]=Y,R});return R[L]=H,R},Object.create(null))}function RO(D,P,O,W,F){let R=Object.create(null),L=!1;try{for(let[B,Z]of F.entries()){let H=h2.addPath(W,B,P.name),Y=zZ(D,P,O,Z,H);if(Y!==void 0){if(R[B]=Y,A0.isPromise(Y))L=!0}}}catch(B){if(L)return qZ.promiseForObject(R).finally(()=>{throw B});throw B}if(!L)return R;return qZ.promiseForObject(R)}function zZ(D,P,O,W,F){var R;let L=CZ(D.schema,P,W[0]);if(!L)return;let B=L.type,Z=(R=L.resolve)!==null&&R!==void 0?R:D.fieldResolver,H=IZ(D,L,W,P,F);try{let Y=XZ.getArgumentValues(L,W[0],D.variableValues),q=D.contextValue,U=Z(O,Y,q,H),J;if(A0.isPromise(U))J=U.then((A)=>$1(D,B,W,H,F,A));else J=$1(D,B,W,H,F,U);if(A0.isPromise(J))return J.then(void 0,(A)=>{let E=FO.locatedError(A,W,h2.pathToArray(F));return LO(E,B,D)});return J}catch(Y){let q=FO.locatedError(Y,W,h2.pathToArray(F));return LO(q,B,D)}}function IZ(D,P,O,W,F){return{fieldName:P.name,fieldNodes:O,returnType:P.type,parentType:W,path:F,schema:D.schema,fragments:D.fragments,rootValue:D.rootValue,operation:D.operation,variableValues:D.variableValues}}function LO(D,P,O){if(F2.isNonNullType(P))throw D;return O.errors.push(D),null}function $1(D,P,O,W,F,R){if(R instanceof Error)throw R;if(F2.isNonNullType(P)){let L=$1(D,P.ofType,O,W,F,R);if(L===null)throw new Error(`Cannot return null for non-nullable field ${W.parentType.name}.${W.fieldName}.`);return L}if(R==null)return null;if(F2.isListType(P))return Ub(D,P,O,W,F,R);if(F2.isLeafType(P))return Jb(P,R);if(F2.isAbstractType(P))return Sb(D,P,O,W,F,R);if(F2.isObjectType(P))return P5(D,P,O,W,F,R);Wb.invariant(!1,"Cannot complete value of unexpected output type: "+x2.inspect(P))}function Ub(D,P,O,W,F,R){if(!Fb.isIterableObject(R))throw new eD.GraphQLError(`Expected Iterable, but did not find one for field "${W.parentType.name}.${W.fieldName}".`);let L=P.ofType,B=!1,Z=Array.from(R,(H,Y)=>{let q=h2.addPath(F,Y,void 0);try{let U;if(A0.isPromise(H))U=H.then((J)=>$1(D,L,O,W,q,J));else U=$1(D,L,O,W,q,H);if(A0.isPromise(U))return B=!0,U.then(void 0,(J)=>{let A=FO.locatedError(J,O,h2.pathToArray(q));return LO(A,L,D)});return U}catch(U){let J=FO.locatedError(U,O,h2.pathToArray(q));return LO(J,L,D)}});return B?Promise.all(Z):Z}function Jb(D,P){let O=D.serialize(P);if(O==null)throw new Error(`Expected \`${x2.inspect(D)}.serialize(${x2.inspect(P)})\` to return non-nullable value, returned: ${x2.inspect(O)}`);return O}function Sb(D,P,O,W,F,R){var L;let B=(L=P.resolveType)!==null&&L!==void 0?L:D.typeResolver,Z=D.contextValue,H=B(R,Z,W,P);if(A0.isPromise(H))return H.then((Y)=>P5(D,UZ(Y,D,P,O,W,R),O,W,F,R));return P5(D,UZ(H,D,P,O,W,R),O,W,F,R)}function UZ(D,P,O,W,F,R){if(D==null)throw new eD.GraphQLError(`Abstract type "${O.name}" must resolve to an Object type at runtime for field "${F.parentType.name}.${F.fieldName}". Either the "${O.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,W);if(F2.isObjectType(D))throw new eD.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof D!=="string")throw new eD.GraphQLError(`Abstract type "${O.name}" must resolve to an Object type at runtime for field "${F.parentType.name}.${F.fieldName}" with value ${x2.inspect(R)}, received "${x2.inspect(D)}".`);let L=P.schema.getType(D);if(L==null)throw new eD.GraphQLError(`Abstract type "${O.name}" was resolved to a type "${D}" that does not exist inside the schema.`,{nodes:W});if(!F2.isObjectType(L))throw new eD.GraphQLError(`Abstract type "${O.name}" was resolved to a non-object type "${D}".`,{nodes:W});if(!P.schema.isSubType(O,L))throw new eD.GraphQLError(`Runtime Object type "${L.name}" is not a possible type for "${O.name}".`,{nodes:W});return L}function P5(D,P,O,W,F,R){let L=Zb(D,P,O);if(P.isTypeOf){let B=P.isTypeOf(R,D.contextValue,W);if(A0.isPromise(B))return B.then((Z)=>{if(!Z)throw JZ(P,R,O);return RO(D,P,R,F,L)});if(!B)throw JZ(P,R,O)}return RO(D,P,R,F,L)}function JZ(D,P,O){return new eD.GraphQLError(`Expected value of type "${D.name}" but got: ${x2.inspect(P)}.`,{nodes:O})}var QZ=function(D,P,O,W){if(W5.isObjectLike(D)&&typeof D.__typename==="string")return D.__typename;let F=O.schema.getPossibleTypes(W),R=[];for(let L=0;L{for(let B=0;B{Object.defineProperty(bZ,"__esModule",{value:!0});bZ.graphql=Vb;bZ.graphqlSync=jb;var Cb=hD(),$b=IP(),Mb=L8(),wb=S1(),bb=C1(),Kb=M1();function Vb(D){return new Promise((P)=>P(wZ(D)))}function jb(D){let P=wZ(D);if($b.isPromise(P))throw new Error("GraphQL execution failed to complete synchronously.");return P}function wZ(D){arguments.length<2||Cb.devAssert(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:P,source:O,rootValue:W,contextValue:F,variableValues:R,operationName:L,fieldResolver:B,typeResolver:Z}=D,H=wb.validateSchema(P);if(H.length>0)return{errors:H};let Y;try{Y=Mb.parse(O)}catch(U){return{errors:[U]}}let q=bb.validate(P,Y);if(q.length>0)return{errors:q};return Kb.execute({schema:P,document:Y,rootValue:W,contextValue:F,variableValues:R,operationName:L,fieldResolver:B,typeResolver:Z})}});var _Z=S(($)=>{Object.defineProperty($,"__esModule",{value:!0});Object.defineProperty($,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return G0.DEFAULT_DEPRECATION_REASON}});Object.defineProperty($,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return c0.GRAPHQL_MAX_INT}});Object.defineProperty($,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return c0.GRAPHQL_MIN_INT}});Object.defineProperty($,"GraphQLBoolean",{enumerable:!0,get:function(){return c0.GraphQLBoolean}});Object.defineProperty($,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return G0.GraphQLDeprecatedDirective}});Object.defineProperty($,"GraphQLDirective",{enumerable:!0,get:function(){return G0.GraphQLDirective}});Object.defineProperty($,"GraphQLEnumType",{enumerable:!0,get:function(){return v.GraphQLEnumType}});Object.defineProperty($,"GraphQLFloat",{enumerable:!0,get:function(){return c0.GraphQLFloat}});Object.defineProperty($,"GraphQLID",{enumerable:!0,get:function(){return c0.GraphQLID}});Object.defineProperty($,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return G0.GraphQLIncludeDirective}});Object.defineProperty($,"GraphQLInputObjectType",{enumerable:!0,get:function(){return v.GraphQLInputObjectType}});Object.defineProperty($,"GraphQLInt",{enumerable:!0,get:function(){return c0.GraphQLInt}});Object.defineProperty($,"GraphQLInterfaceType",{enumerable:!0,get:function(){return v.GraphQLInterfaceType}});Object.defineProperty($,"GraphQLList",{enumerable:!0,get:function(){return v.GraphQLList}});Object.defineProperty($,"GraphQLNonNull",{enumerable:!0,get:function(){return v.GraphQLNonNull}});Object.defineProperty($,"GraphQLObjectType",{enumerable:!0,get:function(){return v.GraphQLObjectType}});Object.defineProperty($,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return G0.GraphQLOneOfDirective}});Object.defineProperty($,"GraphQLScalarType",{enumerable:!0,get:function(){return v.GraphQLScalarType}});Object.defineProperty($,"GraphQLSchema",{enumerable:!0,get:function(){return F5.GraphQLSchema}});Object.defineProperty($,"GraphQLSkipDirective",{enumerable:!0,get:function(){return G0.GraphQLSkipDirective}});Object.defineProperty($,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return G0.GraphQLSpecifiedByDirective}});Object.defineProperty($,"GraphQLString",{enumerable:!0,get:function(){return c0.GraphQLString}});Object.defineProperty($,"GraphQLUnionType",{enumerable:!0,get:function(){return v.GraphQLUnionType}});Object.defineProperty($,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return mD.SchemaMetaFieldDef}});Object.defineProperty($,"TypeKind",{enumerable:!0,get:function(){return mD.TypeKind}});Object.defineProperty($,"TypeMetaFieldDef",{enumerable:!0,get:function(){return mD.TypeMetaFieldDef}});Object.defineProperty($,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return mD.TypeNameMetaFieldDef}});Object.defineProperty($,"__Directive",{enumerable:!0,get:function(){return mD.__Directive}});Object.defineProperty($,"__DirectiveLocation",{enumerable:!0,get:function(){return mD.__DirectiveLocation}});Object.defineProperty($,"__EnumValue",{enumerable:!0,get:function(){return mD.__EnumValue}});Object.defineProperty($,"__Field",{enumerable:!0,get:function(){return mD.__Field}});Object.defineProperty($,"__InputValue",{enumerable:!0,get:function(){return mD.__InputValue}});Object.defineProperty($,"__Schema",{enumerable:!0,get:function(){return mD.__Schema}});Object.defineProperty($,"__Type",{enumerable:!0,get:function(){return mD.__Type}});Object.defineProperty($,"__TypeKind",{enumerable:!0,get:function(){return mD.__TypeKind}});Object.defineProperty($,"assertAbstractType",{enumerable:!0,get:function(){return v.assertAbstractType}});Object.defineProperty($,"assertCompositeType",{enumerable:!0,get:function(){return v.assertCompositeType}});Object.defineProperty($,"assertDirective",{enumerable:!0,get:function(){return G0.assertDirective}});Object.defineProperty($,"assertEnumType",{enumerable:!0,get:function(){return v.assertEnumType}});Object.defineProperty($,"assertEnumValueName",{enumerable:!0,get:function(){return jZ.assertEnumValueName}});Object.defineProperty($,"assertInputObjectType",{enumerable:!0,get:function(){return v.assertInputObjectType}});Object.defineProperty($,"assertInputType",{enumerable:!0,get:function(){return v.assertInputType}});Object.defineProperty($,"assertInterfaceType",{enumerable:!0,get:function(){return v.assertInterfaceType}});Object.defineProperty($,"assertLeafType",{enumerable:!0,get:function(){return v.assertLeafType}});Object.defineProperty($,"assertListType",{enumerable:!0,get:function(){return v.assertListType}});Object.defineProperty($,"assertName",{enumerable:!0,get:function(){return jZ.assertName}});Object.defineProperty($,"assertNamedType",{enumerable:!0,get:function(){return v.assertNamedType}});Object.defineProperty($,"assertNonNullType",{enumerable:!0,get:function(){return v.assertNonNullType}});Object.defineProperty($,"assertNullableType",{enumerable:!0,get:function(){return v.assertNullableType}});Object.defineProperty($,"assertObjectType",{enumerable:!0,get:function(){return v.assertObjectType}});Object.defineProperty($,"assertOutputType",{enumerable:!0,get:function(){return v.assertOutputType}});Object.defineProperty($,"assertScalarType",{enumerable:!0,get:function(){return v.assertScalarType}});Object.defineProperty($,"assertSchema",{enumerable:!0,get:function(){return F5.assertSchema}});Object.defineProperty($,"assertType",{enumerable:!0,get:function(){return v.assertType}});Object.defineProperty($,"assertUnionType",{enumerable:!0,get:function(){return v.assertUnionType}});Object.defineProperty($,"assertValidSchema",{enumerable:!0,get:function(){return VZ.assertValidSchema}});Object.defineProperty($,"assertWrappingType",{enumerable:!0,get:function(){return v.assertWrappingType}});Object.defineProperty($,"getNamedType",{enumerable:!0,get:function(){return v.getNamedType}});Object.defineProperty($,"getNullableType",{enumerable:!0,get:function(){return v.getNullableType}});Object.defineProperty($,"introspectionTypes",{enumerable:!0,get:function(){return mD.introspectionTypes}});Object.defineProperty($,"isAbstractType",{enumerable:!0,get:function(){return v.isAbstractType}});Object.defineProperty($,"isCompositeType",{enumerable:!0,get:function(){return v.isCompositeType}});Object.defineProperty($,"isDirective",{enumerable:!0,get:function(){return G0.isDirective}});Object.defineProperty($,"isEnumType",{enumerable:!0,get:function(){return v.isEnumType}});Object.defineProperty($,"isInputObjectType",{enumerable:!0,get:function(){return v.isInputObjectType}});Object.defineProperty($,"isInputType",{enumerable:!0,get:function(){return v.isInputType}});Object.defineProperty($,"isInterfaceType",{enumerable:!0,get:function(){return v.isInterfaceType}});Object.defineProperty($,"isIntrospectionType",{enumerable:!0,get:function(){return mD.isIntrospectionType}});Object.defineProperty($,"isLeafType",{enumerable:!0,get:function(){return v.isLeafType}});Object.defineProperty($,"isListType",{enumerable:!0,get:function(){return v.isListType}});Object.defineProperty($,"isNamedType",{enumerable:!0,get:function(){return v.isNamedType}});Object.defineProperty($,"isNonNullType",{enumerable:!0,get:function(){return v.isNonNullType}});Object.defineProperty($,"isNullableType",{enumerable:!0,get:function(){return v.isNullableType}});Object.defineProperty($,"isObjectType",{enumerable:!0,get:function(){return v.isObjectType}});Object.defineProperty($,"isOutputType",{enumerable:!0,get:function(){return v.isOutputType}});Object.defineProperty($,"isRequiredArgument",{enumerable:!0,get:function(){return v.isRequiredArgument}});Object.defineProperty($,"isRequiredInputField",{enumerable:!0,get:function(){return v.isRequiredInputField}});Object.defineProperty($,"isScalarType",{enumerable:!0,get:function(){return v.isScalarType}});Object.defineProperty($,"isSchema",{enumerable:!0,get:function(){return F5.isSchema}});Object.defineProperty($,"isSpecifiedDirective",{enumerable:!0,get:function(){return G0.isSpecifiedDirective}});Object.defineProperty($,"isSpecifiedScalarType",{enumerable:!0,get:function(){return c0.isSpecifiedScalarType}});Object.defineProperty($,"isType",{enumerable:!0,get:function(){return v.isType}});Object.defineProperty($,"isUnionType",{enumerable:!0,get:function(){return v.isUnionType}});Object.defineProperty($,"isWrappingType",{enumerable:!0,get:function(){return v.isWrappingType}});Object.defineProperty($,"resolveObjMapThunk",{enumerable:!0,get:function(){return v.resolveObjMapThunk}});Object.defineProperty($,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return v.resolveReadonlyArrayThunk}});Object.defineProperty($,"specifiedDirectives",{enumerable:!0,get:function(){return G0.specifiedDirectives}});Object.defineProperty($,"specifiedScalarTypes",{enumerable:!0,get:function(){return c0.specifiedScalarTypes}});Object.defineProperty($,"validateSchema",{enumerable:!0,get:function(){return VZ.validateSchema}});var F5=u2(),v=a(),G0=vD(),c0=w0(),mD=oD(),VZ=S1(),jZ=D1()});var TZ=S((t)=>{Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return w1.BREAK}});Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return gb.DirectiveLocation}});Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return kb.Kind}});Object.defineProperty(t,"Lexer",{enumerable:!0,get:function(){return xb.Lexer}});Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return R5.Location}});Object.defineProperty(t,"OperationTypeNode",{enumerable:!0,get:function(){return R5.OperationTypeNode}});Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return Tb.Source}});Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return R5.Token}});Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return fb.TokenKind}});Object.defineProperty(t,"getEnterLeaveForKind",{enumerable:!0,get:function(){return w1.getEnterLeaveForKind}});Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return Nb.getLocation}});Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return w1.getVisitFn}});Object.defineProperty(t,"isConstValueNode",{enumerable:!0,get:function(){return j0.isConstValueNode}});Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return j0.isDefinitionNode}});Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return j0.isExecutableDefinitionNode}});Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return j0.isSelectionNode}});Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return j0.isTypeDefinitionNode}});Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return j0.isTypeExtensionNode}});Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return j0.isTypeNode}});Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return j0.isTypeSystemDefinitionNode}});Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return j0.isTypeSystemExtensionNode}});Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return j0.isValueNode}});Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return BO.parse}});Object.defineProperty(t,"parseConstValue",{enumerable:!0,get:function(){return BO.parseConstValue}});Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return BO.parseType}});Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return BO.parseValue}});Object.defineProperty(t,"print",{enumerable:!0,get:function(){return hb.print}});Object.defineProperty(t,"printLocation",{enumerable:!0,get:function(){return uZ.printLocation}});Object.defineProperty(t,"printSourceLocation",{enumerable:!0,get:function(){return uZ.printSourceLocation}});Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return w1.visit}});Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return w1.visitInParallel}});var Tb=KP(),Nb=QP(),uZ=WW(),kb=r(),fb=s8(),xb=wP(),BO=L8(),hb=rD(),w1=w2(),R5=C0(),j0=N2(),gb=W8()});var kZ=S((NZ)=>{Object.defineProperty(NZ,"__esModule",{value:!0});NZ.isAsyncIterable=vb;function vb(D){return typeof(D===null||D===void 0?void 0:D[Symbol.asyncIterator])==="function"}});var xZ=S((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.mapAsyncIterator=mb;function mb(D,P){let O=D[Symbol.asyncIterator]();async function W(F){if(F.done)return F;try{return{value:await P(F.value),done:!1}}catch(R){if(typeof O.return==="function")try{await O.return()}catch(L){}throw R}}return{async next(){return W(await O.next())},async return(){return typeof O.return==="function"?W(await O.return()):{value:void 0,done:!0}},async throw(F){if(typeof O.throw==="function")return W(await O.throw(F));throw F},[Symbol.asyncIterator](){return this}}}});var mZ=S((yZ)=>{Object.defineProperty(yZ,"__esModule",{value:!0});yZ.createSourceEventStream=vZ;yZ.subscribe=nb;var cb=hD(),pb=OD(),gZ=kZ(),hZ=E1(),L5=g(),db=OO(),rb=tP(),b1=M1(),ab=xZ(),sb=X8();async function nb(D){arguments.length<2||cb.devAssert(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let P=await vZ(D);if(!gZ.isAsyncIterable(P))return P;let O=(W)=>b1.execute({...D,rootValue:W});return ab.mapAsyncIterator(P,O)}function ib(D){let P=D[0];if(P&&"document"in P)return P;return{schema:P,document:D[1],rootValue:D[2],contextValue:D[3],variableValues:D[4],operationName:D[5],subscribeFieldResolver:D[6]}}async function vZ(...D){let P=ib(D),{schema:O,document:W,variableValues:F}=P;b1.assertValidExecutionArguments(O,W,F);let R=b1.buildExecutionContext(P);if(!("schema"in R))return{errors:R};try{let L=await tb(R);if(!gZ.isAsyncIterable(L))throw new Error(`Subscription field must return Async Iterable. Received: ${pb.inspect(L)}.`);return L}catch(L){if(L instanceof L5.GraphQLError)return{errors:[L]};throw L}}async function tb(D){let{schema:P,fragments:O,operation:W,variableValues:F,rootValue:R}=D,L=P.getSubscriptionType();if(L==null)throw new L5.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:W});let B=rb.collectFields(P,O,F,L,W.selectionSet),[Z,H]=[...B.entries()][0],Y=b1.getFieldDef(P,L,H[0]);if(!Y){let A=H[0].name.value;throw new L5.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:H})}let q=hZ.addPath(void 0,Z,L.name),U=b1.buildResolveInfo(D,Y,H,L,q);try{var J;let A=sb.getArgumentValues(Y,H[0],F),E=D.contextValue,Q=await((J=Y.subscribe)!==null&&J!==void 0?J:D.subscribeFieldResolver)(R,A,E,U);if(Q instanceof Error)throw Q;return Q}catch(A){throw db.locatedError(A,H,hZ.pathToArray(q))}}});var cZ=S((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});Object.defineProperty(D0,"createSourceEventStream",{enumerable:!0,get:function(){return lZ.createSourceEventStream}});Object.defineProperty(D0,"defaultFieldResolver",{enumerable:!0,get:function(){return ZO.defaultFieldResolver}});Object.defineProperty(D0,"defaultTypeResolver",{enumerable:!0,get:function(){return ZO.defaultTypeResolver}});Object.defineProperty(D0,"execute",{enumerable:!0,get:function(){return ZO.execute}});Object.defineProperty(D0,"executeSync",{enumerable:!0,get:function(){return ZO.executeSync}});Object.defineProperty(D0,"getArgumentValues",{enumerable:!0,get:function(){return B5.getArgumentValues}});Object.defineProperty(D0,"getDirectiveValues",{enumerable:!0,get:function(){return B5.getDirectiveValues}});Object.defineProperty(D0,"getVariableValues",{enumerable:!0,get:function(){return B5.getVariableValues}});Object.defineProperty(D0,"responsePathAsArray",{enumerable:!0,get:function(){return DK.pathToArray}});Object.defineProperty(D0,"subscribe",{enumerable:!0,get:function(){return lZ.subscribe}});var DK=E1(),ZO=M1(),lZ=mZ(),B5=X8()});var dZ=S((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.NoDeprecatedCustomRule=PK;var Z5=ND(),K1=g(),H5=a();function PK(D){return{Field(P){let O=D.getFieldDef(),W=O===null||O===void 0?void 0:O.deprecationReason;if(O&&W!=null){let F=D.getParentType();F!=null||Z5.invariant(!1),D.reportError(new K1.GraphQLError(`The field ${F.name}.${O.name} is deprecated. ${W}`,{nodes:P}))}},Argument(P){let O=D.getArgument(),W=O===null||O===void 0?void 0:O.deprecationReason;if(O&&W!=null){let F=D.getDirective();if(F!=null)D.reportError(new K1.GraphQLError(`Directive "@${F.name}" argument "${O.name}" is deprecated. ${W}`,{nodes:P}));else{let R=D.getParentType(),L=D.getFieldDef();R!=null&&L!=null||Z5.invariant(!1),D.reportError(new K1.GraphQLError(`Field "${R.name}.${L.name}" argument "${O.name}" is deprecated. ${W}`,{nodes:P}))}}},ObjectField(P){let O=H5.getNamedType(D.getParentInputType());if(H5.isInputObjectType(O)){let W=O.getFields()[P.name.value],F=W===null||W===void 0?void 0:W.deprecationReason;if(F!=null)D.reportError(new K1.GraphQLError(`The input field ${O.name}.${W.name} is deprecated. ${F}`,{nodes:P}))}},EnumValue(P){let O=D.getEnumValue(),W=O===null||O===void 0?void 0:O.deprecationReason;if(O&&W!=null){let F=H5.getNamedType(D.getInputType());F!=null||Z5.invariant(!1),D.reportError(new K1.GraphQLError(`The enum value "${F.name}.${O.name}" is deprecated. ${W}`,{nodes:P}))}}}}});var aZ=S((rZ)=>{Object.defineProperty(rZ,"__esModule",{value:!0});rZ.NoSchemaIntrospectionCustomRule=LK;var WK=g(),FK=a(),RK=oD();function LK(D){return{Field(P){let O=FK.getNamedType(D.getType());if(O&&RK.isIntrospectionType(O))D.reportError(new WK.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${P.name.value}".`,{nodes:P}))}}}});var nZ=S((l)=>{Object.defineProperty(l,"__esModule",{value:!0});Object.defineProperty(l,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return qK.ExecutableDefinitionsRule}});Object.defineProperty(l,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return YK.FieldsOnCorrectTypeRule}});Object.defineProperty(l,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return UK.FragmentsOnCompositeTypesRule}});Object.defineProperty(l,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return JK.KnownArgumentNamesRule}});Object.defineProperty(l,"KnownDirectivesRule",{enumerable:!0,get:function(){return SK.KnownDirectivesRule}});Object.defineProperty(l,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return XK.KnownFragmentNamesRule}});Object.defineProperty(l,"KnownTypeNamesRule",{enumerable:!0,get:function(){return EK.KnownTypeNamesRule}});Object.defineProperty(l,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return AK.LoneAnonymousOperationRule}});Object.defineProperty(l,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return hK.LoneSchemaDefinitionRule}});Object.defineProperty(l,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return xK.MaxIntrospectionDepthRule}});Object.defineProperty(l,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return dK.NoDeprecatedCustomRule}});Object.defineProperty(l,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return GK.NoFragmentCyclesRule}});Object.defineProperty(l,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return rK.NoSchemaIntrospectionCustomRule}});Object.defineProperty(l,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return zK.NoUndefinedVariablesRule}});Object.defineProperty(l,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return IK.NoUnusedFragmentsRule}});Object.defineProperty(l,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return QK.NoUnusedVariablesRule}});Object.defineProperty(l,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return CK.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(l,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return $K.PossibleFragmentSpreadsRule}});Object.defineProperty(l,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return pK.PossibleTypeExtensionsRule}});Object.defineProperty(l,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return MK.ProvidedRequiredArgumentsRule}});Object.defineProperty(l,"ScalarLeafsRule",{enumerable:!0,get:function(){return wK.ScalarLeafsRule}});Object.defineProperty(l,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return bK.SingleFieldSubscriptionsRule}});Object.defineProperty(l,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return lK.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(l,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return KK.UniqueArgumentNamesRule}});Object.defineProperty(l,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return cK.UniqueDirectiveNamesRule}});Object.defineProperty(l,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return VK.UniqueDirectivesPerLocationRule}});Object.defineProperty(l,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return yK.UniqueEnumValueNamesRule}});Object.defineProperty(l,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return mK.UniqueFieldDefinitionNamesRule}});Object.defineProperty(l,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return jK.UniqueFragmentNamesRule}});Object.defineProperty(l,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return _K.UniqueInputFieldNamesRule}});Object.defineProperty(l,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return uK.UniqueOperationNamesRule}});Object.defineProperty(l,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return gK.UniqueOperationTypesRule}});Object.defineProperty(l,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return vK.UniqueTypeNamesRule}});Object.defineProperty(l,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return TK.UniqueVariableNamesRule}});Object.defineProperty(l,"ValidationContext",{enumerable:!0,get:function(){return HK.ValidationContext}});Object.defineProperty(l,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return NK.ValuesOfCorrectTypeRule}});Object.defineProperty(l,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return kK.VariablesAreInputTypesRule}});Object.defineProperty(l,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return fK.VariablesInAllowedPositionRule}});Object.defineProperty(l,"recommendedRules",{enumerable:!0,get:function(){return sZ.recommendedRules}});Object.defineProperty(l,"specifiedRules",{enumerable:!0,get:function(){return sZ.specifiedRules}});Object.defineProperty(l,"validate",{enumerable:!0,get:function(){return ZK.validate}});var ZK=C1(),HK=t6(),sZ=i6(),qK=tW(),YK=oW(),UK=eW(),JK=D6(),SK=W6(),XK=F6(),EK=L6(),AK=B6(),GK=q6(),zK=Y6(),IK=U6(),QK=J6(),CK=I6(),$K=C6(),MK=w6(),wK=b6(),bK=u6(),KK=N6(),VK=x6(),jK=y6(),_K=m6(),uK=l6(),TK=d6(),NK=a6(),kK=s6(),fK=n6(),xK=H6(),hK=Z6(),gK=c6(),vK=p6(),yK=h6(),mK=v6(),lK=T6(),cK=k6(),pK=$6(),dK=dZ(),rK=aZ()});var iZ=S((g2)=>{Object.defineProperty(g2,"__esModule",{value:!0});Object.defineProperty(g2,"GraphQLError",{enumerable:!0,get:function(){return q5.GraphQLError}});Object.defineProperty(g2,"formatError",{enumerable:!0,get:function(){return q5.formatError}});Object.defineProperty(g2,"locatedError",{enumerable:!0,get:function(){return sK.locatedError}});Object.defineProperty(g2,"printError",{enumerable:!0,get:function(){return q5.printError}});Object.defineProperty(g2,"syntaxError",{enumerable:!0,get:function(){return aK.syntaxError}});var q5=g(),aK=CP(),sK=OO()});var Y5=S((tZ)=>{Object.defineProperty(tZ,"__esModule",{value:!0});tZ.getIntrospectionQuery=nK;function nK(D){let P={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...D},O=P.descriptions?"description":"",W=P.specifiedByUrl?"specifiedByURL":"",F=P.directiveIsRepeatable?"isRepeatable":"",R=P.schemaDescription?O:"";function L(Z){return P.inputValueDeprecation?Z:""}let B=P.oneOf?"isOneOf":"";return` query IntrospectionQuery { __schema { ${R} queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name ${O} ${F} locations args${L("(includeDeprecated: true)")} { ...InputValue } } } } fragment FullType on __Type { kind name ${O} ${W} ${B} fields(includeDeprecated: true) { name ${O} args${L("(includeDeprecated: true)")} { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields${L("(includeDeprecated: true)")} { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name ${O} isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name ${O} type { ...TypeRef } defaultValue ${L("isDeprecated")} ${L("deprecationReason")} } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } } } } `}});var eZ=S((oZ)=>{Object.defineProperty(oZ,"__esModule",{value:!0});oZ.getOperationAST=oK;var tK=r();function oK(D,P){let O=null;for(let F of D.definitions)if(F.kind===tK.Kind.OPERATION_DEFINITION){var W;if(P==null){if(O)return null;O=F}else if(((W=F.name)===null||W===void 0?void 0:W.value)===P)return F}return O}});var PH=S((DH)=>{Object.defineProperty(DH,"__esModule",{value:!0});DH.getOperationRootType=DV;var HO=g();function DV(D,P){if(P.operation==="query"){let O=D.getQueryType();if(!O)throw new HO.GraphQLError("Schema does not define the required query root type.",{nodes:P});return O}if(P.operation==="mutation"){let O=D.getMutationType();if(!O)throw new HO.GraphQLError("Schema is not configured for mutations.",{nodes:P});return O}if(P.operation==="subscription"){let O=D.getSubscriptionType();if(!O)throw new HO.GraphQLError("Schema is not configured for subscriptions.",{nodes:P});return O}throw new HO.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:P})}});var WH=S((OH)=>{Object.defineProperty(OH,"__esModule",{value:!0});OH.introspectionFromSchema=LV;var OV=ND(),WV=L8(),FV=M1(),RV=Y5();function LV(D,P){let O={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...P},W=WV.parse(RV.getIntrospectionQuery(O)),F=FV.executeSync({schema:D,document:W});return!F.errors&&F.data||OV.invariant(!1),F.data}});var LH=S((RH)=>{Object.defineProperty(RH,"__esModule",{value:!0});RH.buildClientSchema=SV;var ZV=hD(),aD=OD(),FH=Q0(),qO=o8(),HV=L8(),sD=a(),qV=vD(),_0=oD(),YV=w0(),UV=u2(),JV=I1();function SV(D,P){FH.isObjectLike(D)&&FH.isObjectLike(D.__schema)||ZV.devAssert(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${aD.inspect(D)}.`);let O=D.__schema,W=qO.keyValMap(O.types,(z)=>z.name,(z)=>U(z));for(let z of[...YV.specifiedScalarTypes,..._0.introspectionTypes])if(W[z.name])W[z.name]=z;let F=O.queryType?Y(O.queryType):null,R=O.mutationType?Y(O.mutationType):null,L=O.subscriptionType?Y(O.subscriptionType):null,B=O.directives?O.directives.map(K):[];return new UV.GraphQLSchema({description:O.description,query:F,mutation:R,subscription:L,types:Object.values(W),directives:B,assumeValid:P===null||P===void 0?void 0:P.assumeValid});function Z(z){if(z.kind===_0.TypeKind.LIST){let k=z.ofType;if(!k)throw new Error("Decorated type deeper than introspection query.");return new sD.GraphQLList(Z(k))}if(z.kind===_0.TypeKind.NON_NULL){let k=z.ofType;if(!k)throw new Error("Decorated type deeper than introspection query.");let SD=Z(k);return new sD.GraphQLNonNull(sD.assertNullableType(SD))}return H(z)}function H(z){let k=z.name;if(!k)throw new Error(`Unknown type reference: ${aD.inspect(z)}.`);let SD=W[k];if(!SD)throw new Error(`Invalid or incomplete schema, unknown type: ${k}. Ensure that a full introspection query is used in order to build a client schema.`);return SD}function Y(z){return sD.assertObjectType(H(z))}function q(z){return sD.assertInterfaceType(H(z))}function U(z){if(z!=null&&z.name!=null&&z.kind!=null)switch(z.kind){case _0.TypeKind.SCALAR:return J(z);case _0.TypeKind.OBJECT:return E(z);case _0.TypeKind.INTERFACE:return G(z);case _0.TypeKind.UNION:return Q(z);case _0.TypeKind.ENUM:return w(z);case _0.TypeKind.INPUT_OBJECT:return C(z)}let k=aD.inspect(z);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${k}.`)}function J(z){return new sD.GraphQLScalarType({name:z.name,description:z.description,specifiedByURL:z.specifiedByURL})}function A(z){if(z.interfaces===null&&z.kind===_0.TypeKind.INTERFACE)return[];if(!z.interfaces){let k=aD.inspect(z);throw new Error(`Introspection result missing interfaces: ${k}.`)}return z.interfaces.map(q)}function E(z){return new sD.GraphQLObjectType({name:z.name,description:z.description,interfaces:()=>A(z),fields:()=>j(z)})}function G(z){return new sD.GraphQLInterfaceType({name:z.name,description:z.description,interfaces:()=>A(z),fields:()=>j(z)})}function Q(z){if(!z.possibleTypes){let k=aD.inspect(z);throw new Error(`Introspection result missing possibleTypes: ${k}.`)}return new sD.GraphQLUnionType({name:z.name,description:z.description,types:()=>z.possibleTypes.map(Y)})}function w(z){if(!z.enumValues){let k=aD.inspect(z);throw new Error(`Introspection result missing enumValues: ${k}.`)}return new sD.GraphQLEnumType({name:z.name,description:z.description,values:qO.keyValMap(z.enumValues,(k)=>k.name,(k)=>({description:k.description,deprecationReason:k.deprecationReason}))})}function C(z){if(!z.inputFields){let k=aD.inspect(z);throw new Error(`Introspection result missing inputFields: ${k}.`)}return new sD.GraphQLInputObjectType({name:z.name,description:z.description,fields:()=>_(z.inputFields),isOneOf:z.isOneOf})}function j(z){if(!z.fields)throw new Error(`Introspection result missing fields: ${aD.inspect(z)}.`);return qO.keyValMap(z.fields,(k)=>k.name,b)}function b(z){let k=Z(z.type);if(!sD.isOutputType(k)){let SD=aD.inspect(k);throw new Error(`Introspection must provide output type for fields, but received: ${SD}.`)}if(!z.args){let SD=aD.inspect(z);throw new Error(`Introspection result missing field args: ${SD}.`)}return{description:z.description,deprecationReason:z.deprecationReason,type:k,args:_(z.args)}}function _(z){return qO.keyValMap(z,(k)=>k.name,m)}function m(z){let k=Z(z.type);if(!sD.isInputType(k)){let WD=aD.inspect(k);throw new Error(`Introspection must provide input type for arguments, but received: ${WD}.`)}let SD=z.defaultValue!=null?JV.valueFromAST(HV.parseValue(z.defaultValue),k):void 0;return{description:z.description,type:k,defaultValue:SD,deprecationReason:z.deprecationReason}}function K(z){if(!z.args){let k=aD.inspect(z);throw new Error(`Introspection result missing directive args: ${k}.`)}if(!z.locations){let k=aD.inspect(z);throw new Error(`Introspection result missing directive locations: ${k}.`)}return new qV.GraphQLDirective({name:z.name,description:z.description,isRepeatable:z.isRepeatable,locations:z.locations.slice(),args:_(z.args)})}}});var J5=S((XH)=>{Object.defineProperty(XH,"__esModule",{value:!0});XH.extendSchema=QV;XH.extendSchemaImpl=SH;var EV=hD(),AV=OD(),GV=ND(),zV=e0(),V1=AW(),P0=r(),BH=N2(),JD=a(),j1=vD(),UH=oD(),JH=w0(),ZH=u2(),IV=C1(),U5=X8(),HH=I1();function QV(D,P,O){if(ZH.assertSchema(D),P!=null&&P.kind===P0.Kind.DOCUMENT||EV.devAssert(!1,"Must provide valid Document AST."),(O===null||O===void 0?void 0:O.assumeValid)!==!0&&(O===null||O===void 0?void 0:O.assumeValidSDL)!==!0)IV.assertValidSDLExtension(P,D);let W=D.toConfig(),F=SH(W,P,O);return W===F?D:new ZH.GraphQLSchema(F)}function SH(D,P,O){var W,F,R,L;let B=[],Z=Object.create(null),H=[],Y,q=[];for(let I of P.definitions)if(I.kind===P0.Kind.SCHEMA_DEFINITION)Y=I;else if(I.kind===P0.Kind.SCHEMA_EXTENSION)q.push(I);else if(BH.isTypeDefinitionNode(I))B.push(I);else if(BH.isTypeExtensionNode(I)){let f=I.name.value,u=Z[f];Z[f]=u?u.concat([I]):[I]}else if(I.kind===P0.Kind.DIRECTIVE_DEFINITION)H.push(I);if(Object.keys(Z).length===0&&B.length===0&&H.length===0&&q.length===0&&Y==null)return D;let U=Object.create(null);for(let I of D.types)U[I.name]=w(I);for(let I of B){var J;let f=I.name.value;U[f]=(J=qH[f])!==null&&J!==void 0?J:LX(I)}let A={query:D.query&&G(D.query),mutation:D.mutation&&G(D.mutation),subscription:D.subscription&&G(D.subscription),...Y&&SD([Y]),...SD(q)};return{description:(W=Y)===null||W===void 0?void 0:(F=W.description)===null||F===void 0?void 0:F.value,...A,types:Object.values(U),directives:[...D.directives.map(Q),...H.map(RX)],extensions:Object.create(null),astNode:(R=Y)!==null&&R!==void 0?R:D.astNode,extensionASTNodes:D.extensionASTNodes.concat(q),assumeValid:(L=O===null||O===void 0?void 0:O.assumeValid)!==null&&L!==void 0?L:!1};function E(I){if(JD.isListType(I))return new JD.GraphQLList(E(I.ofType));if(JD.isNonNullType(I))return new JD.GraphQLNonNull(E(I.ofType));return G(I)}function G(I){return U[I.name]}function Q(I){let f=I.toConfig();return new j1.GraphQLDirective({...f,args:V1.mapValue(f.args,k)})}function w(I){if(UH.isIntrospectionType(I)||JH.isSpecifiedScalarType(I))return I;if(JD.isScalarType(I))return b(I);if(JD.isObjectType(I))return _(I);if(JD.isInterfaceType(I))return m(I);if(JD.isUnionType(I))return K(I);if(JD.isEnumType(I))return j(I);if(JD.isInputObjectType(I))return C(I);GV.invariant(!1,"Unexpected type: "+AV.inspect(I))}function C(I){var f;let u=I.toConfig(),h=(f=Z[u.name])!==null&&f!==void 0?f:[];return new JD.GraphQLInputObjectType({...u,fields:()=>({...V1.mapValue(u.fields,(BD)=>({...BD,type:E(BD.type)})),...p4(h)}),extensionASTNodes:u.extensionASTNodes.concat(h)})}function j(I){var f;let u=I.toConfig(),h=(f=Z[I.name])!==null&&f!==void 0?f:[];return new JD.GraphQLEnumType({...u,values:{...u.values,...d4(h)},extensionASTNodes:u.extensionASTNodes.concat(h)})}function b(I){var f;let u=I.toConfig(),h=(f=Z[u.name])!==null&&f!==void 0?f:[],BD=u.specifiedByURL;for(let HD of h){var QD;BD=(QD=YH(HD))!==null&&QD!==void 0?QD:BD}return new JD.GraphQLScalarType({...u,specifiedByURL:BD,extensionASTNodes:u.extensionASTNodes.concat(h)})}function _(I){var f;let u=I.toConfig(),h=(f=Z[u.name])!==null&&f!==void 0?f:[];return new JD.GraphQLObjectType({...u,interfaces:()=>[...I.getInterfaces().map(G),...AP(h)],fields:()=>({...V1.mapValue(u.fields,z),...EP(h)}),extensionASTNodes:u.extensionASTNodes.concat(h)})}function m(I){var f;let u=I.toConfig(),h=(f=Z[u.name])!==null&&f!==void 0?f:[];return new JD.GraphQLInterfaceType({...u,interfaces:()=>[...I.getInterfaces().map(G),...AP(h)],fields:()=>({...V1.mapValue(u.fields,z),...EP(h)}),extensionASTNodes:u.extensionASTNodes.concat(h)})}function K(I){var f;let u=I.toConfig(),h=(f=Z[u.name])!==null&&f!==void 0?f:[];return new JD.GraphQLUnionType({...u,types:()=>[...I.getTypes().map(G),...r4(h)],extensionASTNodes:u.extensionASTNodes.concat(h)})}function z(I){return{...I,type:E(I.type),args:I.args&&V1.mapValue(I.args,k)}}function k(I){return{...I,type:E(I.type)}}function SD(I){let f={};for(let h of I){var u;let BD=(u=h.operationTypes)!==null&&u!==void 0?u:[];for(let QD of BD)f[QD.operation]=WD(QD.type)}return f}function WD(I){var f;let u=I.name.value,h=(f=qH[u])!==null&&f!==void 0?f:U[u];if(h===void 0)throw new Error(`Unknown type: "${u}".`);return h}function t0(I){if(I.kind===P0.Kind.LIST_TYPE)return new JD.GraphQLList(t0(I.type));if(I.kind===P0.Kind.NON_NULL_TYPE)return new JD.GraphQLNonNull(t0(I.type));return WD(I)}function RX(I){var f;return new j1.GraphQLDirective({name:I.name.value,description:(f=I.description)===null||f===void 0?void 0:f.value,locations:I.locations.map(({value:u})=>u),isRepeatable:I.repeatable,args:c4(I.arguments),astNode:I})}function EP(I){let f=Object.create(null);for(let BD of I){var u;let QD=(u=BD.fields)!==null&&u!==void 0?u:[];for(let HD of QD){var h;f[HD.name.value]={type:t0(HD.type),description:(h=HD.description)===null||h===void 0?void 0:h.value,args:c4(HD.arguments),deprecationReason:YO(HD),astNode:HD}}}return f}function c4(I){let f=I!==null&&I!==void 0?I:[],u=Object.create(null);for(let BD of f){var h;let QD=t0(BD.type);u[BD.name.value]={type:QD,description:(h=BD.description)===null||h===void 0?void 0:h.value,defaultValue:HH.valueFromAST(BD.defaultValue,QD),deprecationReason:YO(BD),astNode:BD}}return u}function p4(I){let f=Object.create(null);for(let BD of I){var u;let QD=(u=BD.fields)!==null&&u!==void 0?u:[];for(let HD of QD){var h;let O8=t0(HD.type);f[HD.name.value]={type:O8,description:(h=HD.description)===null||h===void 0?void 0:h.value,defaultValue:HH.valueFromAST(HD.defaultValue,O8),deprecationReason:YO(HD),astNode:HD}}}return f}function d4(I){let f=Object.create(null);for(let BD of I){var u;let QD=(u=BD.values)!==null&&u!==void 0?u:[];for(let HD of QD){var h;f[HD.name.value]={description:(h=HD.description)===null||h===void 0?void 0:h.value,deprecationReason:YO(HD),astNode:HD}}}return f}function AP(I){return I.flatMap((f)=>{var u,h;return(u=(h=f.interfaces)===null||h===void 0?void 0:h.map(WD))!==null&&u!==void 0?u:[]})}function r4(I){return I.flatMap((f)=>{var u,h;return(u=(h=f.types)===null||h===void 0?void 0:h.map(WD))!==null&&u!==void 0?u:[]})}function LX(I){var f;let u=I.name.value,h=(f=Z[u])!==null&&f!==void 0?f:[];switch(I.kind){case P0.Kind.OBJECT_TYPE_DEFINITION:{var BD;let H0=[I,...h];return new JD.GraphQLObjectType({name:u,description:(BD=I.description)===null||BD===void 0?void 0:BD.value,interfaces:()=>AP(H0),fields:()=>EP(H0),astNode:I,extensionASTNodes:h})}case P0.Kind.INTERFACE_TYPE_DEFINITION:{var QD;let H0=[I,...h];return new JD.GraphQLInterfaceType({name:u,description:(QD=I.description)===null||QD===void 0?void 0:QD.value,interfaces:()=>AP(H0),fields:()=>EP(H0),astNode:I,extensionASTNodes:h})}case P0.Kind.ENUM_TYPE_DEFINITION:{var HD;let H0=[I,...h];return new JD.GraphQLEnumType({name:u,description:(HD=I.description)===null||HD===void 0?void 0:HD.value,values:d4(H0),astNode:I,extensionASTNodes:h})}case P0.Kind.UNION_TYPE_DEFINITION:{var O8;let H0=[I,...h];return new JD.GraphQLUnionType({name:u,description:(O8=I.description)===null||O8===void 0?void 0:O8.value,types:()=>r4(H0),astNode:I,extensionASTNodes:h})}case P0.Kind.SCALAR_TYPE_DEFINITION:{var a3;return new JD.GraphQLScalarType({name:u,description:(a3=I.description)===null||a3===void 0?void 0:a3.value,specifiedByURL:YH(I),astNode:I,extensionASTNodes:h})}case P0.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var s3;let H0=[I,...h];return new JD.GraphQLInputObjectType({name:u,description:(s3=I.description)===null||s3===void 0?void 0:s3.value,fields:()=>p4(H0),astNode:I,extensionASTNodes:h,isOneOf:CV(I)})}}}}var qH=zV.keyMap([...JH.specifiedScalarTypes,...UH.introspectionTypes],(D)=>D.name);function YO(D){let P=U5.getDirectiveValues(j1.GraphQLDeprecatedDirective,D);return P===null||P===void 0?void 0:P.reason}function YH(D){let P=U5.getDirectiveValues(j1.GraphQLSpecifiedByDirective,D);return P===null||P===void 0?void 0:P.url}function CV(D){return Boolean(U5.getDirectiveValues(j1.GraphQLOneOfDirective,D))}});var GH=S((AH)=>{Object.defineProperty(AH,"__esModule",{value:!0});AH.buildASTSchema=EH;AH.buildSchema=TV;var wV=hD(),bV=r(),KV=L8(),VV=vD(),jV=u2(),_V=C1(),uV=J5();function EH(D,P){if(D!=null&&D.kind===bV.Kind.DOCUMENT||wV.devAssert(!1,"Must provide valid Document AST."),(P===null||P===void 0?void 0:P.assumeValid)!==!0&&(P===null||P===void 0?void 0:P.assumeValidSDL)!==!0)_V.assertValidSDL(D);let O={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},W=uV.extendSchemaImpl(O,D,P);if(W.astNode==null)for(let R of W.types)switch(R.name){case"Query":W.query=R;break;case"Mutation":W.mutation=R;break;case"Subscription":W.subscription=R;break}let F=[...W.directives,...VV.specifiedDirectives.filter((R)=>W.directives.every((L)=>L.name!==R.name))];return new jV.GraphQLSchema({...W,directives:F})}function TV(D,P){let O=KV.parse(D,{noLocation:P===null||P===void 0?void 0:P.noLocation,allowLegacyFragmentVariables:P===null||P===void 0?void 0:P.allowLegacyFragmentVariables});return EH(O,{assumeValidSDL:P===null||P===void 0?void 0:P.assumeValidSDL,assumeValid:P===null||P===void 0?void 0:P.assumeValid})}});var CH=S((QH)=>{Object.defineProperty(QH,"__esModule",{value:!0});QH.lexicographicSortSchema=mV;var fV=OD(),xV=ND(),hV=o8(),zH=e8(),gD=a(),gV=vD(),vV=oD(),yV=u2();function mV(D){let P=D.toConfig(),O=hV.keyValMap(S5(P.types),(U)=>U.name,q);return new yV.GraphQLSchema({...P,types:Object.values(O),directives:S5(P.directives).map(L),query:R(P.query),mutation:R(P.mutation),subscription:R(P.subscription)});function W(U){if(gD.isListType(U))return new gD.GraphQLList(W(U.ofType));else if(gD.isNonNullType(U))return new gD.GraphQLNonNull(W(U.ofType));return F(U)}function F(U){return O[U.name]}function R(U){return U&&F(U)}function L(U){let J=U.toConfig();return new gV.GraphQLDirective({...J,locations:IH(J.locations,(A)=>A),args:B(J.args)})}function B(U){return UO(U,(J)=>({...J,type:W(J.type)}))}function Z(U){return UO(U,(J)=>({...J,type:W(J.type),args:J.args&&B(J.args)}))}function H(U){return UO(U,(J)=>({...J,type:W(J.type)}))}function Y(U){return S5(U).map(F)}function q(U){if(gD.isScalarType(U)||vV.isIntrospectionType(U))return U;if(gD.isObjectType(U)){let J=U.toConfig();return new gD.GraphQLObjectType({...J,interfaces:()=>Y(J.interfaces),fields:()=>Z(J.fields)})}if(gD.isInterfaceType(U)){let J=U.toConfig();return new gD.GraphQLInterfaceType({...J,interfaces:()=>Y(J.interfaces),fields:()=>Z(J.fields)})}if(gD.isUnionType(U)){let J=U.toConfig();return new gD.GraphQLUnionType({...J,types:()=>Y(J.types)})}if(gD.isEnumType(U)){let J=U.toConfig();return new gD.GraphQLEnumType({...J,values:UO(J.values,(A)=>A)})}if(gD.isInputObjectType(U)){let J=U.toConfig();return new gD.GraphQLInputObjectType({...J,fields:()=>H(J.fields)})}xV.invariant(!1,"Unexpected type: "+fV.inspect(U))}}function UO(D,P){let O=Object.create(null);for(let W of Object.keys(D).sort(zH.naturalCompare))O[W]=P(D[W]);return O}function S5(D){return IH(D,(P)=>P.name)}function IH(D,P){return D.slice().sort((O,W)=>{let F=P(O),R=P(W);return zH.naturalCompare(F,R)})}});var _H=S((jH)=>{Object.defineProperty(jH,"__esModule",{value:!0});jH.printIntrospectionSchema=nV;jH.printSchema=sV;jH.printType=wH;var cV=OD(),pV=ND(),dV=a8(),E5=r(),JO=rD(),A8=a(),A5=vD(),$H=oD(),rV=w0(),aV=Y1();function sV(D){return MH(D,(P)=>!A5.isSpecifiedDirective(P),iV)}function nV(D){return MH(D,A5.isSpecifiedDirective,$H.isIntrospectionType)}function iV(D){return!rV.isSpecifiedScalarType(D)&&!$H.isIntrospectionType(D)}function MH(D,P,O){let W=D.getDirectives().filter(P),F=Object.values(D.getTypeMap()).filter(O);return[tV(D),...W.map((R)=>Rj(R)),...F.map((R)=>wH(R))].filter(Boolean).join("\n\n")}function tV(D){if(D.description==null&&oV(D))return;let P=[],O=D.getQueryType();if(O)P.push(` query: ${O.name}`);let W=D.getMutationType();if(W)P.push(` mutation: ${W.name}`);let F=D.getSubscriptionType();if(F)P.push(` subscription: ${F.name}`);return O0(D)+`schema {\n${P.join("\n")}\n}`}function oV(D){let P=D.getQueryType();if(P&&P.name!=="Query")return!1;let O=D.getMutationType();if(O&&O.name!=="Mutation")return!1;let W=D.getSubscriptionType();if(W&&W.name!=="Subscription")return!1;return!0}function wH(D){if(A8.isScalarType(D))return eV(D);if(A8.isObjectType(D))return Dj(D);if(A8.isInterfaceType(D))return Pj(D);if(A8.isUnionType(D))return Oj(D);if(A8.isEnumType(D))return Wj(D);if(A8.isInputObjectType(D))return Fj(D);pV.invariant(!1,"Unexpected type: "+cV.inspect(D))}function eV(D){return O0(D)+`scalar ${D.name}`+Lj(D)}function bH(D){let P=D.getInterfaces();return P.length?" implements "+P.map((O)=>O.name).join(" & "):""}function Dj(D){return O0(D)+`type ${D.name}`+bH(D)+KH(D)}function Pj(D){return O0(D)+`interface ${D.name}`+bH(D)+KH(D)}function Oj(D){let P=D.getTypes(),O=P.length?" = "+P.join(" | "):"";return O0(D)+"union "+D.name+O}function Wj(D){let P=D.getValues().map((O,W)=>O0(O," ",!W)+" "+O.name+z5(O.deprecationReason));return O0(D)+`enum ${D.name}`+G5(P)}function Fj(D){let P=Object.values(D.getFields()).map((O,W)=>O0(O," ",!W)+" "+X5(O));return O0(D)+`input ${D.name}`+(D.isOneOf?" @oneOf":"")+G5(P)}function KH(D){let P=Object.values(D.getFields()).map((O,W)=>O0(O," ",!W)+" "+O.name+VH(O.args," ")+": "+String(O.type)+z5(O.deprecationReason));return G5(P)}function G5(D){return D.length!==0?" {\n"+D.join("\n")+"\n}":""}function VH(D,P=""){if(D.length===0)return"";if(D.every((O)=>!O.description))return"("+D.map(X5).join(", ")+")";return"(\n"+D.map((O,W)=>O0(O," "+P,!W)+" "+P+X5(O)).join("\n")+"\n"+P+")"}function X5(D){let P=aV.astFromValue(D.defaultValue,D.type),O=D.name+": "+String(D.type);if(P)O+=` = ${JO.print(P)}`;return O+z5(D.deprecationReason)}function Rj(D){return O0(D)+"directive @"+D.name+VH(D.args)+(D.isRepeatable?" repeatable":"")+" on "+D.locations.join(" | ")}function z5(D){if(D==null)return"";if(D!==A5.DEFAULT_DEPRECATION_REASON)return` @deprecated(reason: ${JO.print({kind:E5.Kind.STRING,value:D})})`;return" @deprecated"}function Lj(D){if(D.specifiedByURL==null)return"";return` @specifiedBy(url: ${JO.print({kind:E5.Kind.STRING,value:D.specifiedByURL})})`}function O0(D,P="",O=!0){let{description:W}=D;if(W==null)return"";let F=JO.print({kind:E5.Kind.STRING,value:W,block:dV.isPrintableAsBlockString(W)});return(P&&!O?"\n"+P:P)+F.replace(/\n/g,"\n"+P)+"\n"}});var TH=S((uH)=>{Object.defineProperty(uH,"__esModule",{value:!0});uH.concatAST=Yj;var qj=r();function Yj(D){let P=[];for(let O of D)P.push(...O.definitions);return{kind:qj.Kind.DOCUMENT,definitions:P}}});var xH=S((fH)=>{Object.defineProperty(fH,"__esModule",{value:!0});fH.separateOperations=Sj;var SO=r(),Jj=w2();function Sj(D){let P=[],O=Object.create(null);for(let F of D.definitions)switch(F.kind){case SO.Kind.OPERATION_DEFINITION:P.push(F);break;case SO.Kind.FRAGMENT_DEFINITION:O[F.name.value]=NH(F.selectionSet);break;default:}let W=Object.create(null);for(let F of P){let R=new Set;for(let B of NH(F.selectionSet))kH(R,O,B);let L=F.name?F.name.value:"";W[L]={kind:SO.Kind.DOCUMENT,definitions:D.definitions.filter((B)=>B===F||B.kind===SO.Kind.FRAGMENT_DEFINITION&&R.has(B.name.value))}}return W}function kH(D,P,O){if(!D.has(O)){D.add(O);let W=P[O];if(W!==void 0)for(let F of W)kH(D,P,F)}}function NH(D){let P=[];return Jj.visit(D,{FragmentSpread(O){P.push(O.name.value)}}),P}});var yH=S((vH)=>{Object.defineProperty(vH,"__esModule",{value:!0});vH.stripIgnoredCharacters=Aj;var Ej=a8(),hH=wP(),gH=KP(),I5=s8();function Aj(D){let P=gH.isSource(D)?D:new gH.Source(D),O=P.body,W=new hH.Lexer(P),F="",R=!1;while(W.advance().kind!==I5.TokenKind.EOF){let L=W.token,B=L.kind,Z=!hH.isPunctuatorTokenKind(L.kind);if(R){if(Z||L.kind===I5.TokenKind.SPREAD)F+=" "}let H=O.slice(L.start,L.end);if(B===I5.TokenKind.BLOCK_STRING)F+=Ej.printBlockString(L.value,{minimize:!0});else F+=H;R=Z}return F}});var cH=S((lH)=>{Object.defineProperty(lH,"__esModule",{value:!0});lH.assertValidName=Cj;lH.isValidNameError=mH;var zj=hD(),Ij=g(),Qj=D1();function Cj(D){let P=mH(D);if(P)throw P;return D}function mH(D){if(typeof D==="string"||zj.devAssert(!1,"Expected name to be a string."),D.startsWith("__"))return new Ij.GraphQLError(`Name "${D}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Qj.assertName(D)}catch(P){return P}}});var eH=S((tH)=>{Object.defineProperty(tH,"__esModule",{value:!0});tH.DangerousChangeType=tH.BreakingChangeType=void 0;tH.findBreakingChanges=_j;tH.findDangerousChanges=uj;var wj=OD(),nH=ND(),pH=e0(),bj=rD(),e=a(),Kj=w0(),Vj=Y1(),jj=X6(),GD;tH.BreakingChangeType=GD;(function(D){D.TYPE_REMOVED="TYPE_REMOVED",D.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",D.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",D.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",D.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",D.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",D.FIELD_REMOVED="FIELD_REMOVED",D.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",D.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",D.ARG_REMOVED="ARG_REMOVED",D.ARG_CHANGED_KIND="ARG_CHANGED_KIND",D.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",D.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",D.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",D.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",D.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(GD||(tH.BreakingChangeType=GD={}));var z0;tH.DangerousChangeType=z0;(function(D){D.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",D.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",D.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",D.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",D.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",D.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(z0||(tH.DangerousChangeType=z0={}));function _j(D,P){return iH(D,P).filter((O)=>(O.type in GD))}function uj(D,P){return iH(D,P).filter((O)=>(O.type in z0))}function iH(D,P){return[...Nj(D,P),...Tj(D,P)]}function Tj(D,P){let O=[],W=p0(D.getDirectives(),P.getDirectives());for(let F of W.removed)O.push({type:GD.DIRECTIVE_REMOVED,description:`${F.name} was removed.`});for(let[F,R]of W.persisted){let L=p0(F.args,R.args);for(let B of L.added)if(e.isRequiredArgument(B))O.push({type:GD.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${B.name} on directive ${F.name} was added.`});for(let B of L.removed)O.push({type:GD.DIRECTIVE_ARG_REMOVED,description:`${B.name} was removed from ${F.name}.`});if(F.isRepeatable&&!R.isRepeatable)O.push({type:GD.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${F.name}.`});for(let B of F.locations)if(!R.locations.includes(B))O.push({type:GD.DIRECTIVE_LOCATION_REMOVED,description:`${B} was removed from ${F.name}.`})}return O}function Nj(D,P){let O=[],W=p0(Object.values(D.getTypeMap()),Object.values(P.getTypeMap()));for(let F of W.removed)O.push({type:GD.TYPE_REMOVED,description:Kj.isSpecifiedScalarType(F)?`Standard scalar ${F.name} was removed because it is not referenced anymore.`:`${F.name} was removed.`});for(let[F,R]of W.persisted)if(e.isEnumType(F)&&e.isEnumType(R))O.push(...xj(F,R));else if(e.isUnionType(F)&&e.isUnionType(R))O.push(...fj(F,R));else if(e.isInputObjectType(F)&&e.isInputObjectType(R))O.push(...kj(F,R));else if(e.isObjectType(F)&&e.isObjectType(R))O.push(...rH(F,R),...dH(F,R));else if(e.isInterfaceType(F)&&e.isInterfaceType(R))O.push(...rH(F,R),...dH(F,R));else if(F.constructor!==R.constructor)O.push({type:GD.TYPE_CHANGED_KIND,description:`${F.name} changed from ${aH(F)} to ${aH(R)}.`});return O}function kj(D,P){let O=[],W=p0(Object.values(D.getFields()),Object.values(P.getFields()));for(let F of W.added)if(e.isRequiredInputField(F))O.push({type:GD.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${F.name} on input type ${D.name} was added.`});else O.push({type:z0.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${F.name} on input type ${D.name} was added.`});for(let F of W.removed)O.push({type:GD.FIELD_REMOVED,description:`${D.name}.${F.name} was removed.`});for(let[F,R]of W.persisted)if(!u1(F.type,R.type))O.push({type:GD.FIELD_CHANGED_KIND,description:`${D.name}.${F.name} changed type from ${String(F.type)} to ${String(R.type)}.`});return O}function fj(D,P){let O=[],W=p0(D.getTypes(),P.getTypes());for(let F of W.added)O.push({type:z0.TYPE_ADDED_TO_UNION,description:`${F.name} was added to union type ${D.name}.`});for(let F of W.removed)O.push({type:GD.TYPE_REMOVED_FROM_UNION,description:`${F.name} was removed from union type ${D.name}.`});return O}function xj(D,P){let O=[],W=p0(D.getValues(),P.getValues());for(let F of W.added)O.push({type:z0.VALUE_ADDED_TO_ENUM,description:`${F.name} was added to enum type ${D.name}.`});for(let F of W.removed)O.push({type:GD.VALUE_REMOVED_FROM_ENUM,description:`${F.name} was removed from enum type ${D.name}.`});return O}function dH(D,P){let O=[],W=p0(D.getInterfaces(),P.getInterfaces());for(let F of W.added)O.push({type:z0.IMPLEMENTED_INTERFACE_ADDED,description:`${F.name} added to interfaces implemented by ${D.name}.`});for(let F of W.removed)O.push({type:GD.IMPLEMENTED_INTERFACE_REMOVED,description:`${D.name} no longer implements interface ${F.name}.`});return O}function rH(D,P){let O=[],W=p0(Object.values(D.getFields()),Object.values(P.getFields()));for(let F of W.removed)O.push({type:GD.FIELD_REMOVED,description:`${D.name}.${F.name} was removed.`});for(let[F,R]of W.persisted)if(O.push(...hj(D,F,R)),!_1(F.type,R.type))O.push({type:GD.FIELD_CHANGED_KIND,description:`${D.name}.${F.name} changed type from ${String(F.type)} to ${String(R.type)}.`});return O}function hj(D,P,O){let W=[],F=p0(P.args,O.args);for(let R of F.removed)W.push({type:GD.ARG_REMOVED,description:`${D.name}.${P.name} arg ${R.name} was removed.`});for(let[R,L]of F.persisted)if(!u1(R.type,L.type))W.push({type:GD.ARG_CHANGED_KIND,description:`${D.name}.${P.name} arg ${R.name} has changed type from ${String(R.type)} to ${String(L.type)}.`});else if(R.defaultValue!==void 0)if(L.defaultValue===void 0)W.push({type:z0.ARG_DEFAULT_VALUE_CHANGE,description:`${D.name}.${P.name} arg ${R.name} defaultValue was removed.`});else{let Z=sH(R.defaultValue,R.type),H=sH(L.defaultValue,L.type);if(Z!==H)W.push({type:z0.ARG_DEFAULT_VALUE_CHANGE,description:`${D.name}.${P.name} arg ${R.name} has changed defaultValue from ${Z} to ${H}.`})}for(let R of F.added)if(e.isRequiredArgument(R))W.push({type:GD.REQUIRED_ARG_ADDED,description:`A required arg ${R.name} on ${D.name}.${P.name} was added.`});else W.push({type:z0.OPTIONAL_ARG_ADDED,description:`An optional arg ${R.name} on ${D.name}.${P.name} was added.`});return W}function _1(D,P){if(e.isListType(D))return e.isListType(P)&&_1(D.ofType,P.ofType)||e.isNonNullType(P)&&_1(D,P.ofType);if(e.isNonNullType(D))return e.isNonNullType(P)&&_1(D.ofType,P.ofType);return e.isNamedType(P)&&D.name===P.name||e.isNonNullType(P)&&_1(D,P.ofType)}function u1(D,P){if(e.isListType(D))return e.isListType(P)&&u1(D.ofType,P.ofType);if(e.isNonNullType(D))return e.isNonNullType(P)&&u1(D.ofType,P.ofType)||!e.isNonNullType(P)&&u1(D.ofType,P);return e.isNamedType(P)&&D.name===P.name}function aH(D){if(e.isScalarType(D))return"a Scalar type";if(e.isObjectType(D))return"an Object type";if(e.isInterfaceType(D))return"an Interface type";if(e.isUnionType(D))return"a Union type";if(e.isEnumType(D))return"an Enum type";if(e.isInputObjectType(D))return"an Input type";nH.invariant(!1,"Unexpected type: "+wj.inspect(D))}function sH(D,P){let O=Vj.astFromValue(D,P);return O!=null||nH.invariant(!1),bj.print(jj.sortValueNode(O))}function p0(D,P){let O=[],W=[],F=[],R=pH.keyMap(D,({name:B})=>B),L=pH.keyMap(P,({name:B})=>B);for(let B of D){let Z=L[B.name];if(Z===void 0)W.push(B);else F.push([B,Z])}for(let B of P)if(R[B.name]===void 0)O.push(B);return{added:O,persisted:F,removed:W}}});var Wq=S((o)=>{Object.defineProperty(o,"__esModule",{value:!0});Object.defineProperty(o,"BreakingChangeType",{enumerable:!0,get:function(){return XO.BreakingChangeType}});Object.defineProperty(o,"DangerousChangeType",{enumerable:!0,get:function(){return XO.DangerousChangeType}});Object.defineProperty(o,"TypeInfo",{enumerable:!0,get:function(){return Pq.TypeInfo}});Object.defineProperty(o,"assertValidName",{enumerable:!0,get:function(){return Oq.assertValidName}});Object.defineProperty(o,"astFromValue",{enumerable:!0,get:function(){return ij.astFromValue}});Object.defineProperty(o,"buildASTSchema",{enumerable:!0,get:function(){return Dq.buildASTSchema}});Object.defineProperty(o,"buildClientSchema",{enumerable:!0,get:function(){return pj.buildClientSchema}});Object.defineProperty(o,"buildSchema",{enumerable:!0,get:function(){return Dq.buildSchema}});Object.defineProperty(o,"coerceInputValue",{enumerable:!0,get:function(){return tj.coerceInputValue}});Object.defineProperty(o,"concatAST",{enumerable:!0,get:function(){return oj.concatAST}});Object.defineProperty(o,"doTypesOverlap",{enumerable:!0,get:function(){return $5.doTypesOverlap}});Object.defineProperty(o,"extendSchema",{enumerable:!0,get:function(){return dj.extendSchema}});Object.defineProperty(o,"findBreakingChanges",{enumerable:!0,get:function(){return XO.findBreakingChanges}});Object.defineProperty(o,"findDangerousChanges",{enumerable:!0,get:function(){return XO.findDangerousChanges}});Object.defineProperty(o,"getIntrospectionQuery",{enumerable:!0,get:function(){return yj.getIntrospectionQuery}});Object.defineProperty(o,"getOperationAST",{enumerable:!0,get:function(){return mj.getOperationAST}});Object.defineProperty(o,"getOperationRootType",{enumerable:!0,get:function(){return lj.getOperationRootType}});Object.defineProperty(o,"introspectionFromSchema",{enumerable:!0,get:function(){return cj.introspectionFromSchema}});Object.defineProperty(o,"isEqualType",{enumerable:!0,get:function(){return $5.isEqualType}});Object.defineProperty(o,"isTypeSubTypeOf",{enumerable:!0,get:function(){return $5.isTypeSubTypeOf}});Object.defineProperty(o,"isValidNameError",{enumerable:!0,get:function(){return Oq.isValidNameError}});Object.defineProperty(o,"lexicographicSortSchema",{enumerable:!0,get:function(){return rj.lexicographicSortSchema}});Object.defineProperty(o,"printIntrospectionSchema",{enumerable:!0,get:function(){return C5.printIntrospectionSchema}});Object.defineProperty(o,"printSchema",{enumerable:!0,get:function(){return C5.printSchema}});Object.defineProperty(o,"printType",{enumerable:!0,get:function(){return C5.printType}});Object.defineProperty(o,"separateOperations",{enumerable:!0,get:function(){return ej.separateOperations}});Object.defineProperty(o,"stripIgnoredCharacters",{enumerable:!0,get:function(){return D_.stripIgnoredCharacters}});Object.defineProperty(o,"typeFromAST",{enumerable:!0,get:function(){return aj.typeFromAST}});Object.defineProperty(o,"valueFromAST",{enumerable:!0,get:function(){return sj.valueFromAST}});Object.defineProperty(o,"valueFromASTUntyped",{enumerable:!0,get:function(){return nj.valueFromASTUntyped}});Object.defineProperty(o,"visitWithTypeInfo",{enumerable:!0,get:function(){return Pq.visitWithTypeInfo}});var yj=Y5(),mj=eZ(),lj=PH(),cj=WH(),pj=LH(),Dq=GH(),dj=J5(),rj=CH(),C5=_H(),aj=b0(),sj=I1(),nj=QW(),ij=Y1(),Pq=pP(),tj=V6(),oj=TH(),ej=xH(),D_=yH(),$5=F1(),Oq=cH(),XO=eH()});var T0=S((X)=>{Object.defineProperty(X,"__esModule",{value:!0});Object.defineProperty(X,"BREAK",{enumerable:!0,get:function(){return DD.BREAK}});Object.defineProperty(X,"BreakingChangeType",{enumerable:!0,get:function(){return PD.BreakingChangeType}});Object.defineProperty(X,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return M.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(X,"DangerousChangeType",{enumerable:!0,get:function(){return PD.DangerousChangeType}});Object.defineProperty(X,"DirectiveLocation",{enumerable:!0,get:function(){return DD.DirectiveLocation}});Object.defineProperty(X,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return c.ExecutableDefinitionsRule}});Object.defineProperty(X,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return c.FieldsOnCorrectTypeRule}});Object.defineProperty(X,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return c.FragmentsOnCompositeTypesRule}});Object.defineProperty(X,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return M.GRAPHQL_MAX_INT}});Object.defineProperty(X,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return M.GRAPHQL_MIN_INT}});Object.defineProperty(X,"GraphQLBoolean",{enumerable:!0,get:function(){return M.GraphQLBoolean}});Object.defineProperty(X,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return M.GraphQLDeprecatedDirective}});Object.defineProperty(X,"GraphQLDirective",{enumerable:!0,get:function(){return M.GraphQLDirective}});Object.defineProperty(X,"GraphQLEnumType",{enumerable:!0,get:function(){return M.GraphQLEnumType}});Object.defineProperty(X,"GraphQLError",{enumerable:!0,get:function(){return T1.GraphQLError}});Object.defineProperty(X,"GraphQLFloat",{enumerable:!0,get:function(){return M.GraphQLFloat}});Object.defineProperty(X,"GraphQLID",{enumerable:!0,get:function(){return M.GraphQLID}});Object.defineProperty(X,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return M.GraphQLIncludeDirective}});Object.defineProperty(X,"GraphQLInputObjectType",{enumerable:!0,get:function(){return M.GraphQLInputObjectType}});Object.defineProperty(X,"GraphQLInt",{enumerable:!0,get:function(){return M.GraphQLInt}});Object.defineProperty(X,"GraphQLInterfaceType",{enumerable:!0,get:function(){return M.GraphQLInterfaceType}});Object.defineProperty(X,"GraphQLList",{enumerable:!0,get:function(){return M.GraphQLList}});Object.defineProperty(X,"GraphQLNonNull",{enumerable:!0,get:function(){return M.GraphQLNonNull}});Object.defineProperty(X,"GraphQLObjectType",{enumerable:!0,get:function(){return M.GraphQLObjectType}});Object.defineProperty(X,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return M.GraphQLOneOfDirective}});Object.defineProperty(X,"GraphQLScalarType",{enumerable:!0,get:function(){return M.GraphQLScalarType}});Object.defineProperty(X,"GraphQLSchema",{enumerable:!0,get:function(){return M.GraphQLSchema}});Object.defineProperty(X,"GraphQLSkipDirective",{enumerable:!0,get:function(){return M.GraphQLSkipDirective}});Object.defineProperty(X,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return M.GraphQLSpecifiedByDirective}});Object.defineProperty(X,"GraphQLString",{enumerable:!0,get:function(){return M.GraphQLString}});Object.defineProperty(X,"GraphQLUnionType",{enumerable:!0,get:function(){return M.GraphQLUnionType}});Object.defineProperty(X,"Kind",{enumerable:!0,get:function(){return DD.Kind}});Object.defineProperty(X,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return c.KnownArgumentNamesRule}});Object.defineProperty(X,"KnownDirectivesRule",{enumerable:!0,get:function(){return c.KnownDirectivesRule}});Object.defineProperty(X,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return c.KnownFragmentNamesRule}});Object.defineProperty(X,"KnownTypeNamesRule",{enumerable:!0,get:function(){return c.KnownTypeNamesRule}});Object.defineProperty(X,"Lexer",{enumerable:!0,get:function(){return DD.Lexer}});Object.defineProperty(X,"Location",{enumerable:!0,get:function(){return DD.Location}});Object.defineProperty(X,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return c.LoneAnonymousOperationRule}});Object.defineProperty(X,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return c.LoneSchemaDefinitionRule}});Object.defineProperty(X,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return c.MaxIntrospectionDepthRule}});Object.defineProperty(X,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return c.NoDeprecatedCustomRule}});Object.defineProperty(X,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return c.NoFragmentCyclesRule}});Object.defineProperty(X,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return c.NoSchemaIntrospectionCustomRule}});Object.defineProperty(X,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return c.NoUndefinedVariablesRule}});Object.defineProperty(X,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return c.NoUnusedFragmentsRule}});Object.defineProperty(X,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return c.NoUnusedVariablesRule}});Object.defineProperty(X,"OperationTypeNode",{enumerable:!0,get:function(){return DD.OperationTypeNode}});Object.defineProperty(X,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return c.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(X,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return c.PossibleFragmentSpreadsRule}});Object.defineProperty(X,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return c.PossibleTypeExtensionsRule}});Object.defineProperty(X,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return c.ProvidedRequiredArgumentsRule}});Object.defineProperty(X,"ScalarLeafsRule",{enumerable:!0,get:function(){return c.ScalarLeafsRule}});Object.defineProperty(X,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return M.SchemaMetaFieldDef}});Object.defineProperty(X,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return c.SingleFieldSubscriptionsRule}});Object.defineProperty(X,"Source",{enumerable:!0,get:function(){return DD.Source}});Object.defineProperty(X,"Token",{enumerable:!0,get:function(){return DD.Token}});Object.defineProperty(X,"TokenKind",{enumerable:!0,get:function(){return DD.TokenKind}});Object.defineProperty(X,"TypeInfo",{enumerable:!0,get:function(){return PD.TypeInfo}});Object.defineProperty(X,"TypeKind",{enumerable:!0,get:function(){return M.TypeKind}});Object.defineProperty(X,"TypeMetaFieldDef",{enumerable:!0,get:function(){return M.TypeMetaFieldDef}});Object.defineProperty(X,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return M.TypeNameMetaFieldDef}});Object.defineProperty(X,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return c.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(X,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return c.UniqueArgumentNamesRule}});Object.defineProperty(X,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return c.UniqueDirectiveNamesRule}});Object.defineProperty(X,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return c.UniqueDirectivesPerLocationRule}});Object.defineProperty(X,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return c.UniqueEnumValueNamesRule}});Object.defineProperty(X,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return c.UniqueFieldDefinitionNamesRule}});Object.defineProperty(X,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return c.UniqueFragmentNamesRule}});Object.defineProperty(X,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return c.UniqueInputFieldNamesRule}});Object.defineProperty(X,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return c.UniqueOperationNamesRule}});Object.defineProperty(X,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return c.UniqueOperationTypesRule}});Object.defineProperty(X,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return c.UniqueTypeNamesRule}});Object.defineProperty(X,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return c.UniqueVariableNamesRule}});Object.defineProperty(X,"ValidationContext",{enumerable:!0,get:function(){return c.ValidationContext}});Object.defineProperty(X,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return c.ValuesOfCorrectTypeRule}});Object.defineProperty(X,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return c.VariablesAreInputTypesRule}});Object.defineProperty(X,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return c.VariablesInAllowedPositionRule}});Object.defineProperty(X,"__Directive",{enumerable:!0,get:function(){return M.__Directive}});Object.defineProperty(X,"__DirectiveLocation",{enumerable:!0,get:function(){return M.__DirectiveLocation}});Object.defineProperty(X,"__EnumValue",{enumerable:!0,get:function(){return M.__EnumValue}});Object.defineProperty(X,"__Field",{enumerable:!0,get:function(){return M.__Field}});Object.defineProperty(X,"__InputValue",{enumerable:!0,get:function(){return M.__InputValue}});Object.defineProperty(X,"__Schema",{enumerable:!0,get:function(){return M.__Schema}});Object.defineProperty(X,"__Type",{enumerable:!0,get:function(){return M.__Type}});Object.defineProperty(X,"__TypeKind",{enumerable:!0,get:function(){return M.__TypeKind}});Object.defineProperty(X,"assertAbstractType",{enumerable:!0,get:function(){return M.assertAbstractType}});Object.defineProperty(X,"assertCompositeType",{enumerable:!0,get:function(){return M.assertCompositeType}});Object.defineProperty(X,"assertDirective",{enumerable:!0,get:function(){return M.assertDirective}});Object.defineProperty(X,"assertEnumType",{enumerable:!0,get:function(){return M.assertEnumType}});Object.defineProperty(X,"assertEnumValueName",{enumerable:!0,get:function(){return M.assertEnumValueName}});Object.defineProperty(X,"assertInputObjectType",{enumerable:!0,get:function(){return M.assertInputObjectType}});Object.defineProperty(X,"assertInputType",{enumerable:!0,get:function(){return M.assertInputType}});Object.defineProperty(X,"assertInterfaceType",{enumerable:!0,get:function(){return M.assertInterfaceType}});Object.defineProperty(X,"assertLeafType",{enumerable:!0,get:function(){return M.assertLeafType}});Object.defineProperty(X,"assertListType",{enumerable:!0,get:function(){return M.assertListType}});Object.defineProperty(X,"assertName",{enumerable:!0,get:function(){return M.assertName}});Object.defineProperty(X,"assertNamedType",{enumerable:!0,get:function(){return M.assertNamedType}});Object.defineProperty(X,"assertNonNullType",{enumerable:!0,get:function(){return M.assertNonNullType}});Object.defineProperty(X,"assertNullableType",{enumerable:!0,get:function(){return M.assertNullableType}});Object.defineProperty(X,"assertObjectType",{enumerable:!0,get:function(){return M.assertObjectType}});Object.defineProperty(X,"assertOutputType",{enumerable:!0,get:function(){return M.assertOutputType}});Object.defineProperty(X,"assertScalarType",{enumerable:!0,get:function(){return M.assertScalarType}});Object.defineProperty(X,"assertSchema",{enumerable:!0,get:function(){return M.assertSchema}});Object.defineProperty(X,"assertType",{enumerable:!0,get:function(){return M.assertType}});Object.defineProperty(X,"assertUnionType",{enumerable:!0,get:function(){return M.assertUnionType}});Object.defineProperty(X,"assertValidName",{enumerable:!0,get:function(){return PD.assertValidName}});Object.defineProperty(X,"assertValidSchema",{enumerable:!0,get:function(){return M.assertValidSchema}});Object.defineProperty(X,"assertWrappingType",{enumerable:!0,get:function(){return M.assertWrappingType}});Object.defineProperty(X,"astFromValue",{enumerable:!0,get:function(){return PD.astFromValue}});Object.defineProperty(X,"buildASTSchema",{enumerable:!0,get:function(){return PD.buildASTSchema}});Object.defineProperty(X,"buildClientSchema",{enumerable:!0,get:function(){return PD.buildClientSchema}});Object.defineProperty(X,"buildSchema",{enumerable:!0,get:function(){return PD.buildSchema}});Object.defineProperty(X,"coerceInputValue",{enumerable:!0,get:function(){return PD.coerceInputValue}});Object.defineProperty(X,"concatAST",{enumerable:!0,get:function(){return PD.concatAST}});Object.defineProperty(X,"createSourceEventStream",{enumerable:!0,get:function(){return u0.createSourceEventStream}});Object.defineProperty(X,"defaultFieldResolver",{enumerable:!0,get:function(){return u0.defaultFieldResolver}});Object.defineProperty(X,"defaultTypeResolver",{enumerable:!0,get:function(){return u0.defaultTypeResolver}});Object.defineProperty(X,"doTypesOverlap",{enumerable:!0,get:function(){return PD.doTypesOverlap}});Object.defineProperty(X,"execute",{enumerable:!0,get:function(){return u0.execute}});Object.defineProperty(X,"executeSync",{enumerable:!0,get:function(){return u0.executeSync}});Object.defineProperty(X,"extendSchema",{enumerable:!0,get:function(){return PD.extendSchema}});Object.defineProperty(X,"findBreakingChanges",{enumerable:!0,get:function(){return PD.findBreakingChanges}});Object.defineProperty(X,"findDangerousChanges",{enumerable:!0,get:function(){return PD.findDangerousChanges}});Object.defineProperty(X,"formatError",{enumerable:!0,get:function(){return T1.formatError}});Object.defineProperty(X,"getArgumentValues",{enumerable:!0,get:function(){return u0.getArgumentValues}});Object.defineProperty(X,"getDirectiveValues",{enumerable:!0,get:function(){return u0.getDirectiveValues}});Object.defineProperty(X,"getEnterLeaveForKind",{enumerable:!0,get:function(){return DD.getEnterLeaveForKind}});Object.defineProperty(X,"getIntrospectionQuery",{enumerable:!0,get:function(){return PD.getIntrospectionQuery}});Object.defineProperty(X,"getLocation",{enumerable:!0,get:function(){return DD.getLocation}});Object.defineProperty(X,"getNamedType",{enumerable:!0,get:function(){return M.getNamedType}});Object.defineProperty(X,"getNullableType",{enumerable:!0,get:function(){return M.getNullableType}});Object.defineProperty(X,"getOperationAST",{enumerable:!0,get:function(){return PD.getOperationAST}});Object.defineProperty(X,"getOperationRootType",{enumerable:!0,get:function(){return PD.getOperationRootType}});Object.defineProperty(X,"getVariableValues",{enumerable:!0,get:function(){return u0.getVariableValues}});Object.defineProperty(X,"getVisitFn",{enumerable:!0,get:function(){return DD.getVisitFn}});Object.defineProperty(X,"graphql",{enumerable:!0,get:function(){return Rq.graphql}});Object.defineProperty(X,"graphqlSync",{enumerable:!0,get:function(){return Rq.graphqlSync}});Object.defineProperty(X,"introspectionFromSchema",{enumerable:!0,get:function(){return PD.introspectionFromSchema}});Object.defineProperty(X,"introspectionTypes",{enumerable:!0,get:function(){return M.introspectionTypes}});Object.defineProperty(X,"isAbstractType",{enumerable:!0,get:function(){return M.isAbstractType}});Object.defineProperty(X,"isCompositeType",{enumerable:!0,get:function(){return M.isCompositeType}});Object.defineProperty(X,"isConstValueNode",{enumerable:!0,get:function(){return DD.isConstValueNode}});Object.defineProperty(X,"isDefinitionNode",{enumerable:!0,get:function(){return DD.isDefinitionNode}});Object.defineProperty(X,"isDirective",{enumerable:!0,get:function(){return M.isDirective}});Object.defineProperty(X,"isEnumType",{enumerable:!0,get:function(){return M.isEnumType}});Object.defineProperty(X,"isEqualType",{enumerable:!0,get:function(){return PD.isEqualType}});Object.defineProperty(X,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return DD.isExecutableDefinitionNode}});Object.defineProperty(X,"isInputObjectType",{enumerable:!0,get:function(){return M.isInputObjectType}});Object.defineProperty(X,"isInputType",{enumerable:!0,get:function(){return M.isInputType}});Object.defineProperty(X,"isInterfaceType",{enumerable:!0,get:function(){return M.isInterfaceType}});Object.defineProperty(X,"isIntrospectionType",{enumerable:!0,get:function(){return M.isIntrospectionType}});Object.defineProperty(X,"isLeafType",{enumerable:!0,get:function(){return M.isLeafType}});Object.defineProperty(X,"isListType",{enumerable:!0,get:function(){return M.isListType}});Object.defineProperty(X,"isNamedType",{enumerable:!0,get:function(){return M.isNamedType}});Object.defineProperty(X,"isNonNullType",{enumerable:!0,get:function(){return M.isNonNullType}});Object.defineProperty(X,"isNullableType",{enumerable:!0,get:function(){return M.isNullableType}});Object.defineProperty(X,"isObjectType",{enumerable:!0,get:function(){return M.isObjectType}});Object.defineProperty(X,"isOutputType",{enumerable:!0,get:function(){return M.isOutputType}});Object.defineProperty(X,"isRequiredArgument",{enumerable:!0,get:function(){return M.isRequiredArgument}});Object.defineProperty(X,"isRequiredInputField",{enumerable:!0,get:function(){return M.isRequiredInputField}});Object.defineProperty(X,"isScalarType",{enumerable:!0,get:function(){return M.isScalarType}});Object.defineProperty(X,"isSchema",{enumerable:!0,get:function(){return M.isSchema}});Object.defineProperty(X,"isSelectionNode",{enumerable:!0,get:function(){return DD.isSelectionNode}});Object.defineProperty(X,"isSpecifiedDirective",{enumerable:!0,get:function(){return M.isSpecifiedDirective}});Object.defineProperty(X,"isSpecifiedScalarType",{enumerable:!0,get:function(){return M.isSpecifiedScalarType}});Object.defineProperty(X,"isType",{enumerable:!0,get:function(){return M.isType}});Object.defineProperty(X,"isTypeDefinitionNode",{enumerable:!0,get:function(){return DD.isTypeDefinitionNode}});Object.defineProperty(X,"isTypeExtensionNode",{enumerable:!0,get:function(){return DD.isTypeExtensionNode}});Object.defineProperty(X,"isTypeNode",{enumerable:!0,get:function(){return DD.isTypeNode}});Object.defineProperty(X,"isTypeSubTypeOf",{enumerable:!0,get:function(){return PD.isTypeSubTypeOf}});Object.defineProperty(X,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return DD.isTypeSystemDefinitionNode}});Object.defineProperty(X,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return DD.isTypeSystemExtensionNode}});Object.defineProperty(X,"isUnionType",{enumerable:!0,get:function(){return M.isUnionType}});Object.defineProperty(X,"isValidNameError",{enumerable:!0,get:function(){return PD.isValidNameError}});Object.defineProperty(X,"isValueNode",{enumerable:!0,get:function(){return DD.isValueNode}});Object.defineProperty(X,"isWrappingType",{enumerable:!0,get:function(){return M.isWrappingType}});Object.defineProperty(X,"lexicographicSortSchema",{enumerable:!0,get:function(){return PD.lexicographicSortSchema}});Object.defineProperty(X,"locatedError",{enumerable:!0,get:function(){return T1.locatedError}});Object.defineProperty(X,"parse",{enumerable:!0,get:function(){return DD.parse}});Object.defineProperty(X,"parseConstValue",{enumerable:!0,get:function(){return DD.parseConstValue}});Object.defineProperty(X,"parseType",{enumerable:!0,get:function(){return DD.parseType}});Object.defineProperty(X,"parseValue",{enumerable:!0,get:function(){return DD.parseValue}});Object.defineProperty(X,"print",{enumerable:!0,get:function(){return DD.print}});Object.defineProperty(X,"printError",{enumerable:!0,get:function(){return T1.printError}});Object.defineProperty(X,"printIntrospectionSchema",{enumerable:!0,get:function(){return PD.printIntrospectionSchema}});Object.defineProperty(X,"printLocation",{enumerable:!0,get:function(){return DD.printLocation}});Object.defineProperty(X,"printSchema",{enumerable:!0,get:function(){return PD.printSchema}});Object.defineProperty(X,"printSourceLocation",{enumerable:!0,get:function(){return DD.printSourceLocation}});Object.defineProperty(X,"printType",{enumerable:!0,get:function(){return PD.printType}});Object.defineProperty(X,"recommendedRules",{enumerable:!0,get:function(){return c.recommendedRules}});Object.defineProperty(X,"resolveObjMapThunk",{enumerable:!0,get:function(){return M.resolveObjMapThunk}});Object.defineProperty(X,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return M.resolveReadonlyArrayThunk}});Object.defineProperty(X,"responsePathAsArray",{enumerable:!0,get:function(){return u0.responsePathAsArray}});Object.defineProperty(X,"separateOperations",{enumerable:!0,get:function(){return PD.separateOperations}});Object.defineProperty(X,"specifiedDirectives",{enumerable:!0,get:function(){return M.specifiedDirectives}});Object.defineProperty(X,"specifiedRules",{enumerable:!0,get:function(){return c.specifiedRules}});Object.defineProperty(X,"specifiedScalarTypes",{enumerable:!0,get:function(){return M.specifiedScalarTypes}});Object.defineProperty(X,"stripIgnoredCharacters",{enumerable:!0,get:function(){return PD.stripIgnoredCharacters}});Object.defineProperty(X,"subscribe",{enumerable:!0,get:function(){return u0.subscribe}});Object.defineProperty(X,"syntaxError",{enumerable:!0,get:function(){return T1.syntaxError}});Object.defineProperty(X,"typeFromAST",{enumerable:!0,get:function(){return PD.typeFromAST}});Object.defineProperty(X,"validate",{enumerable:!0,get:function(){return c.validate}});Object.defineProperty(X,"validateSchema",{enumerable:!0,get:function(){return M.validateSchema}});Object.defineProperty(X,"valueFromAST",{enumerable:!0,get:function(){return PD.valueFromAST}});Object.defineProperty(X,"valueFromASTUntyped",{enumerable:!0,get:function(){return PD.valueFromASTUntyped}});Object.defineProperty(X,"version",{enumerable:!0,get:function(){return Fq.version}});Object.defineProperty(X,"versionInfo",{enumerable:!0,get:function(){return Fq.versionInfo}});Object.defineProperty(X,"visit",{enumerable:!0,get:function(){return DD.visit}});Object.defineProperty(X,"visitInParallel",{enumerable:!0,get:function(){return DD.visitInParallel}});Object.defineProperty(X,"visitWithTypeInfo",{enumerable:!0,get:function(){return PD.visitWithTypeInfo}});var Fq=S9(),Rq=KZ(),M=_Z(),DD=TZ(),u0=cZ(),c=nZ(),T1=iZ(),PD=Wq()});var Nq=S((Zd,Tq)=>{Tq.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var p5=S((Hd,fq)=>{var g1=Nq(),kq={};for(let D of Object.keys(g1))kq[g1[D]]=D;var x={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};fq.exports=x;for(let D of Object.keys(x)){if(!("channels"in x[D]))throw new Error("missing channels property: "+D);if(!("labels"in x[D]))throw new Error("missing channel labels property: "+D);if(x[D].labels.length!==x[D].channels)throw new Error("channel and label counts mismatch: "+D);let{channels:P,labels:O}=x[D];delete x[D].channels,delete x[D].labels,Object.defineProperty(x[D],"channels",{value:P}),Object.defineProperty(x[D],"labels",{value:O})}x.rgb.hsl=function(D){let P=D[0]/255,O=D[1]/255,W=D[2]/255,F=Math.min(P,O,W),R=Math.max(P,O,W),L=R-F,B,Z;if(R===F)B=0;else if(P===R)B=(O-W)/L;else if(O===R)B=2+(W-P)/L;else if(W===R)B=4+(P-O)/L;if(B=Math.min(B*60,360),B<0)B+=360;let H=(F+R)/2;if(R===F)Z=0;else if(H<=0.5)Z=L/(R+F);else Z=L/(2-R-F);return[B,Z*100,H*100]};x.rgb.hsv=function(D){let P,O,W,F,R,L=D[0]/255,B=D[1]/255,Z=D[2]/255,H=Math.max(L,B,Z),Y=H-Math.min(L,B,Z),q=function(U){return(H-U)/6/Y+0.5};if(Y===0)F=0,R=0;else{if(R=Y/H,P=q(L),O=q(B),W=q(Z),L===H)F=W-O;else if(B===H)F=0.3333333333333333+P-W;else if(Z===H)F=0.6666666666666666+O-P;if(F<0)F+=1;else if(F>1)F-=1}return[F*360,R*100,H*100]};x.rgb.hwb=function(D){let P=D[0],O=D[1],W=D[2],F=x.rgb.hsl(D)[0],R=0.00392156862745098*Math.min(P,Math.min(O,W));return W=1-0.00392156862745098*Math.max(P,Math.max(O,W)),[F,R*100,W*100]};x.rgb.cmyk=function(D){let P=D[0]/255,O=D[1]/255,W=D[2]/255,F=Math.min(1-P,1-O,1-W),R=(1-P-F)/(1-F)||0,L=(1-O-F)/(1-F)||0,B=(1-W-F)/(1-F)||0;return[R*100,L*100,B*100,F*100]};function Q_(D,P){return(D[0]-P[0])**2+(D[1]-P[1])**2+(D[2]-P[2])**2}x.rgb.keyword=function(D){let P=kq[D];if(P)return P;let O=1/0,W;for(let F of Object.keys(g1)){let R=g1[F],L=Q_(D,R);if(L0.04045?((P+0.055)/1.055)**2.4:P/12.92,O=O>0.04045?((O+0.055)/1.055)**2.4:O/12.92,W=W>0.04045?((W+0.055)/1.055)**2.4:W/12.92;let F=P*0.4124+O*0.3576+W*0.1805,R=P*0.2126+O*0.7152+W*0.0722,L=P*0.0193+O*0.1192+W*0.9505;return[F*100,R*100,L*100]};x.rgb.lab=function(D){let P=x.rgb.xyz(D),O=P[0],W=P[1],F=P[2];O/=95.047,W/=100,F/=108.883,O=O>0.008856?O**0.3333333333333333:7.787*O+0.13793103448275862,W=W>0.008856?W**0.3333333333333333:7.787*W+0.13793103448275862,F=F>0.008856?F**0.3333333333333333:7.787*F+0.13793103448275862;let R=116*W-16,L=500*(O-W),B=200*(W-F);return[R,L,B]};x.hsl.rgb=function(D){let P=D[0]/360,O=D[1]/100,W=D[2]/100,F,R,L;if(O===0)return L=W*255,[L,L,L];if(W<0.5)F=W*(1+O);else F=W+O-W*O;let B=2*W-F,Z=[0,0,0];for(let H=0;H<3;H++){if(R=P+0.3333333333333333*-(H-1),R<0)R++;if(R>1)R--;if(6*R<1)L=B+(F-B)*6*R;else if(2*R<1)L=F;else if(3*R<2)L=B+(F-B)*(0.6666666666666666-R)*6;else L=B;Z[H]=L*255}return Z};x.hsl.hsv=function(D){let P=D[0],O=D[1]/100,W=D[2]/100,F=O,R=Math.max(W,0.01);W*=2,O*=W<=1?W:2-W,F*=R<=1?R:2-R;let L=(W+O)/2,B=W===0?2*F/(R+F):2*O/(W+O);return[P,B*100,L*100]};x.hsv.rgb=function(D){let P=D[0]/60,O=D[1]/100,W=D[2]/100,F=Math.floor(P)%6,R=P-Math.floor(P),L=255*W*(1-O),B=255*W*(1-O*R),Z=255*W*(1-O*(1-R));switch(W*=255,F){case 0:return[W,Z,L];case 1:return[B,W,L];case 2:return[L,W,Z];case 3:return[L,B,W];case 4:return[Z,L,W];case 5:return[W,L,B]}};x.hsv.hsl=function(D){let P=D[0],O=D[1]/100,W=D[2]/100,F=Math.max(W,0.01),R,L;L=(2-O)*W;let B=(2-O)*F;return R=O*F,R/=B<=1?B:2-B,R=R||0,L/=2,[P,R*100,L*100]};x.hwb.rgb=function(D){let P=D[0]/360,O=D[1]/100,W=D[2]/100,F=O+W,R;if(F>1)O/=F,W/=F;let L=Math.floor(6*P),B=1-W;if(R=6*P-L,(L&1)!==0)R=1-R;let Z=O+R*(B-O),H,Y,q;switch(L){default:case 6:case 0:H=B,Y=Z,q=O;break;case 1:H=Z,Y=B,q=O;break;case 2:H=O,Y=B,q=Z;break;case 3:H=O,Y=Z,q=B;break;case 4:H=Z,Y=O,q=B;break;case 5:H=B,Y=O,q=Z;break}return[H*255,Y*255,q*255]};x.cmyk.rgb=function(D){let P=D[0]/100,O=D[1]/100,W=D[2]/100,F=D[3]/100,R=1-Math.min(1,P*(1-F)+F),L=1-Math.min(1,O*(1-F)+F),B=1-Math.min(1,W*(1-F)+F);return[R*255,L*255,B*255]};x.xyz.rgb=function(D){let P=D[0]/100,O=D[1]/100,W=D[2]/100,F,R,L;return F=P*3.2406+O*-1.5372+W*-0.4986,R=P*-0.9689+O*1.8758+W*0.0415,L=P*0.0557+O*-0.204+W*1.057,F=F>0.0031308?1.055*F**0.4166666666666667-0.055:F*12.92,R=R>0.0031308?1.055*R**0.4166666666666667-0.055:R*12.92,L=L>0.0031308?1.055*L**0.4166666666666667-0.055:L*12.92,F=Math.min(Math.max(0,F),1),R=Math.min(Math.max(0,R),1),L=Math.min(Math.max(0,L),1),[F*255,R*255,L*255]};x.xyz.lab=function(D){let P=D[0],O=D[1],W=D[2];P/=95.047,O/=100,W/=108.883,P=P>0.008856?P**0.3333333333333333:7.787*P+0.13793103448275862,O=O>0.008856?O**0.3333333333333333:7.787*O+0.13793103448275862,W=W>0.008856?W**0.3333333333333333:7.787*W+0.13793103448275862;let F=116*O-16,R=500*(P-O),L=200*(O-W);return[F,R,L]};x.lab.xyz=function(D){let P=D[0],O=D[1],W=D[2],F,R,L;R=(P+16)/116,F=O/500+R,L=R-W/200;let B=R**3,Z=F**3,H=L**3;return R=B>0.008856?B:(R-0.13793103448275862)/7.787,F=Z>0.008856?Z:(F-0.13793103448275862)/7.787,L=H>0.008856?H:(L-0.13793103448275862)/7.787,F*=95.047,R*=100,L*=108.883,[F,R,L]};x.lab.lch=function(D){let P=D[0],O=D[1],W=D[2],F;if(F=Math.atan2(W,O)*360/2/Math.PI,F<0)F+=360;let L=Math.sqrt(O*O+W*W);return[P,L,F]};x.lch.lab=function(D){let P=D[0],O=D[1],F=D[2]/360*2*Math.PI,R=O*Math.cos(F),L=O*Math.sin(F);return[P,R,L]};x.rgb.ansi16=function(D,P=null){let[O,W,F]=D,R=P===null?x.rgb.hsv(D)[2]:P;if(R=Math.round(R/50),R===0)return 30;let L=30+(Math.round(F/255)<<2|Math.round(W/255)<<1|Math.round(O/255));if(R===2)L+=60;return L};x.hsv.ansi16=function(D){return x.rgb.ansi16(x.hsv.rgb(D),D[2])};x.rgb.ansi256=function(D){let P=D[0],O=D[1],W=D[2];if(P===O&&O===W){if(P<8)return 16;if(P>248)return 231;return Math.round((P-8)/247*24)+232}return 16+36*Math.round(P/255*5)+6*Math.round(O/255*5)+Math.round(W/255*5)};x.ansi16.rgb=function(D){let P=D%10;if(P===0||P===7){if(D>50)P+=3.5;return P=P/10.5*255,[P,P,P]}let O=(~~(D>50)+1)*0.5,W=(P&1)*O*255,F=(P>>1&1)*O*255,R=(P>>2&1)*O*255;return[W,F,R]};x.ansi256.rgb=function(D){if(D>=232){let R=(D-232)*10+8;return[R,R,R]}D-=16;let P,O=Math.floor(D/36)/5*255,W=Math.floor((P=D%36)/6)/5*255,F=P%6/5*255;return[O,W,F]};x.rgb.hex=function(D){let O=(((Math.round(D[0])&255)<<16)+((Math.round(D[1])&255)<<8)+(Math.round(D[2])&255)).toString(16).toUpperCase();return"000000".substring(O.length)+O};x.hex.rgb=function(D){let P=D.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!P)return[0,0,0];let O=P[0];if(P[0].length===3)O=O.split("").map((B)=>{return B+B}).join("");let W=parseInt(O,16),F=W>>16&255,R=W>>8&255,L=W&255;return[F,R,L]};x.rgb.hcg=function(D){let P=D[0]/255,O=D[1]/255,W=D[2]/255,F=Math.max(Math.max(P,O),W),R=Math.min(Math.min(P,O),W),L=F-R,B,Z;if(L<1)B=R/(1-L);else B=0;if(L<=0)Z=0;else if(F===P)Z=(O-W)/L%6;else if(F===O)Z=2+(W-P)/L;else Z=4+(P-O)/L;return Z/=6,Z%=1,[Z*360,L*100,B*100]};x.hsl.hcg=function(D){let P=D[1]/100,O=D[2]/100,W=O<0.5?2*P*O:2*P*(1-O),F=0;if(W<1)F=(O-0.5*W)/(1-W);return[D[0],W*100,F*100]};x.hsv.hcg=function(D){let P=D[1]/100,O=D[2]/100,W=P*O,F=0;if(W<1)F=(O-W)/(1-W);return[D[0],W*100,F*100]};x.hcg.rgb=function(D){let P=D[0]/360,O=D[1]/100,W=D[2]/100;if(O===0)return[W*255,W*255,W*255];let F=[0,0,0],R=P%1*6,L=R%1,B=1-L,Z=0;switch(Math.floor(R)){case 0:F[0]=1,F[1]=L,F[2]=0;break;case 1:F[0]=B,F[1]=1,F[2]=0;break;case 2:F[0]=0,F[1]=1,F[2]=L;break;case 3:F[0]=0,F[1]=B,F[2]=1;break;case 4:F[0]=L,F[1]=0,F[2]=1;break;default:F[0]=1,F[1]=0,F[2]=B}return Z=(1-O)*W,[(O*F[0]+Z)*255,(O*F[1]+Z)*255,(O*F[2]+Z)*255]};x.hcg.hsv=function(D){let P=D[1]/100,O=D[2]/100,W=P+O*(1-P),F=0;if(W>0)F=P/W;return[D[0],F*100,W*100]};x.hcg.hsl=function(D){let P=D[1]/100,W=D[2]/100*(1-P)+0.5*P,F=0;if(W>0&&W<0.5)F=P/(2*W);else if(W>=0.5&&W<1)F=P/(2*(1-W));return[D[0],F*100,W*100]};x.hcg.hwb=function(D){let P=D[1]/100,O=D[2]/100,W=P+O*(1-P);return[D[0],(W-P)*100,(1-W)*100]};x.hwb.hcg=function(D){let P=D[1]/100,W=1-D[2]/100,F=W-P,R=0;if(F<1)R=(W-F)/(1-F);return[D[0],F*100,R*100]};x.apple.rgb=function(D){return[D[0]/65535*255,D[1]/65535*255,D[2]/65535*255]};x.rgb.apple=function(D){return[D[0]/255*65535,D[1]/255*65535,D[2]/255*65535]};x.gray.rgb=function(D){return[D[0]/100*255,D[0]/100*255,D[0]/100*255]};x.gray.hsl=function(D){return[0,0,D[0]]};x.gray.hsv=x.gray.hsl;x.gray.hwb=function(D){return[0,100,D[0]]};x.gray.cmyk=function(D){return[0,0,0,D[0]]};x.gray.lab=function(D){return[D[0],0,0]};x.gray.hex=function(D){let P=Math.round(D[0]/100*255)&255,W=((P<<16)+(P<<8)+P).toString(16).toUpperCase();return"000000".substring(W.length)+W};x.rgb.gray=function(D){return[(D[0]+D[1]+D[2])/3/255*100]}});var hq=S((qd,xq)=>{var _O=p5();function C_(){let D={},P=Object.keys(_O);for(let O=P.length,W=0;W{var d5=p5(),b_=hq(),b8={},K_=Object.keys(d5);function V_(D){let P=function(...O){let W=O[0];if(W===void 0||W===null)return W;if(W.length>1)O=W;return D(O)};if("conversion"in D)P.conversion=D.conversion;return P}function j_(D){let P=function(...O){let W=O[0];if(W===void 0||W===null)return W;if(W.length>1)O=W;let F=D(O);if(typeof F==="object")for(let R=F.length,L=0;L{b8[D]={},Object.defineProperty(b8[D],"channels",{value:d5[D].channels}),Object.defineProperty(b8[D],"labels",{value:d5[D].labels});let P=b_(D);Object.keys(P).forEach((W)=>{let F=P[W];b8[D][W]=j_(F),b8[D][W].raw=V_(F)})});gq.exports=b8});var v1=S((Ud,pq)=>{var yq=(D,P)=>(...O)=>{return`\x1B[${D(...O)+P}m`},mq=(D,P)=>(...O)=>{let W=D(...O);return`\x1B[${38+P};5;${W}m`},lq=(D,P)=>(...O)=>{let W=D(...O);return`\x1B[${38+P};2;${W[0]};${W[1]};${W[2]}m`},uO=(D)=>D,cq=(D,P,O)=>[D,P,O],K8=(D,P,O)=>{Object.defineProperty(D,P,{get:()=>{let W=O();return Object.defineProperty(D,P,{value:W,enumerable:!0,configurable:!0}),W},enumerable:!0,configurable:!0})},r5,V8=(D,P,O,W)=>{if(r5===void 0)r5=vq();let F=W?10:0,R={};for(let[L,B]of Object.entries(r5)){let Z=L==="ansi16"?"ansi":L;if(L===P)R[Z]=D(O,F);else if(typeof B==="object")R[Z]=D(B[P],F)}return R};function __(){let D=new Map,P={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};P.color.gray=P.color.blackBright,P.bgColor.bgGray=P.bgColor.bgBlackBright,P.color.grey=P.color.blackBright,P.bgColor.bgGrey=P.bgColor.bgBlackBright;for(let[O,W]of Object.entries(P)){for(let[F,R]of Object.entries(W))P[F]={open:`\x1B[${R[0]}m`,close:`\x1B[${R[1]}m`},W[F]=P[F],D.set(R[0],R[1]);Object.defineProperty(P,O,{value:W,enumerable:!1})}return Object.defineProperty(P,"codes",{value:D,enumerable:!1}),P.color.close="\x1B[39m",P.bgColor.close="\x1B[49m",K8(P.color,"ansi",()=>V8(yq,"ansi16",uO,!1)),K8(P.color,"ansi256",()=>V8(mq,"ansi256",uO,!1)),K8(P.color,"ansi16m",()=>V8(lq,"rgb",cq,!1)),K8(P.bgColor,"ansi",()=>V8(yq,"ansi16",uO,!0)),K8(P.bgColor,"ansi256",()=>V8(mq,"ansi256",uO,!0)),K8(P.bgColor,"ansi16m",()=>V8(lq,"rgb",cq,!0)),P}Object.defineProperty(pq,"exports",{enumerable:!0,get:__})});var TO=S((Jd,dq)=>{dq.exports=(D,P=process.argv)=>{let O=D.startsWith("-")?"":D.length===1?"-":"--",W=P.indexOf(O+D),F=P.indexOf("--");return W!==-1&&(F===-1||W{var u_=dD("os"),rq=dD("tty"),W0=TO(),{env:_D}=process,Z2;if(W0("no-color")||W0("no-colors")||W0("color=false")||W0("color=never"))Z2=0;else if(W0("color")||W0("colors")||W0("color=true")||W0("color=always"))Z2=1;if("FORCE_COLOR"in _D)if(_D.FORCE_COLOR==="true")Z2=1;else if(_D.FORCE_COLOR==="false")Z2=0;else Z2=_D.FORCE_COLOR.length===0?1:Math.min(parseInt(_D.FORCE_COLOR,10),3);function a5(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function s5(D,P){if(Z2===0)return 0;if(W0("color=16m")||W0("color=full")||W0("color=truecolor"))return 3;if(W0("color=256"))return 2;if(D&&!P&&Z2===void 0)return 0;let O=Z2||0;if(_D.TERM==="dumb")return O;if(process.platform==="win32"){let W=u_.release().split(".");if(Number(W[0])>=10&&Number(W[2])>=10586)return Number(W[2])>=14931?3:2;return 1}if("CI"in _D){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((W)=>(W in _D))||_D.CI_NAME==="codeship")return 1;return O}if("TEAMCITY_VERSION"in _D)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_D.TEAMCITY_VERSION)?1:0;if(_D.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in _D){let W=parseInt((_D.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(_D.TERM_PROGRAM){case"iTerm.app":return W>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(_D.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_D.TERM))return 1;if("COLORTERM"in _D)return 1;return O}function T_(D){let P=s5(D,D&&D.isTTY);return a5(P)}aq.exports={supportsColor:T_,stdout:a5(s5(!0,rq.isatty(1))),stderr:a5(s5(!0,rq.isatty(2)))}});var iq=S((Xd,nq)=>{var N_=(D,P,O)=>{let W=D.indexOf(P);if(W===-1)return D;let F=P.length,R=0,L="";do L+=D.substr(R,W-R)+P+O,R=W+F,W=D.indexOf(P,R);while(W!==-1);return L+=D.substr(R),L},k_=(D,P,O,W)=>{let F=0,R="";do{let L=D[W-1]==="\r";R+=D.substr(F,(L?W-1:W)-F)+P+(L?"\r\n":"\n")+O,F=W+1,W=D.indexOf("\n",F)}while(W!==-1);return R+=D.substr(F),R};nq.exports={stringReplaceAll:N_,stringEncaseCRLFWithFirstIndex:k_}});var PY=S((Ed,DY)=>{var f_=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,tq=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,x_=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,h_=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,g_=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function eq(D){let P=D[0]==="u",O=D[1]==="{";if(P&&!O&&D.length===5||D[0]==="x"&&D.length===3)return String.fromCharCode(parseInt(D.slice(1),16));if(P&&O)return String.fromCodePoint(parseInt(D.slice(2,-1),16));return g_.get(D)||D}function v_(D,P){let O=[],W=P.trim().split(/\s*,\s*/g),F;for(let R of W){let L=Number(R);if(!Number.isNaN(L))O.push(L);else if(F=R.match(x_))O.push(F[2].replace(h_,(B,Z,H)=>Z?eq(Z):H));else throw new Error(`Invalid Chalk template style argument: ${R} (in style '${D}')`)}return O}function y_(D){tq.lastIndex=0;let P=[],O;while((O=tq.exec(D))!==null){let W=O[1];if(O[2]){let F=v_(W,O[2]);P.push([W].concat(F))}else P.push([W])}return P}function oq(D,P){let O={};for(let F of P)for(let R of F.styles)O[R[0]]=F.inverse?null:R.slice(1);let W=D;for(let[F,R]of Object.entries(O)){if(!Array.isArray(R))continue;if(!(F in W))throw new Error(`Unknown Chalk style: ${F}`);W=R.length>0?W[F](...R):W[F]}return W}DY.exports=(D,P)=>{let O=[],W=[],F=[];if(P.replace(f_,(R,L,B,Z,H,Y)=>{if(L)F.push(eq(L));else if(Z){let q=F.join("");F=[],W.push(O.length===0?q:oq(D,O)(q)),O.push({inverse:B,styles:y_(Z)})}else if(H){if(O.length===0)throw new Error("Found extraneous } in Chalk template literal");W.push(oq(D,O)(F.join(""))),F=[],O.pop()}else F.push(Y)}),W.push(F.join("")),O.length>0){let R=`Chalk template literal is missing ${O.length} closing bracket${O.length===1?"":"s"} (\`}\`)`;throw new Error(R)}return W.join("")}});var e5=S((Ad,ZY)=>{var y1=v1(),{stdout:i5,stderr:t5}=sq(),{stringReplaceAll:m_,stringEncaseCRLFWithFirstIndex:l_}=iq(),{isArray:NO}=Array,WY=["ansi","ansi","ansi256","ansi16m"],j8=Object.create(null),c_=(D,P={})=>{if(P.level&&!(Number.isInteger(P.level)&&P.level>=0&&P.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let O=i5?i5.level:0;D.level=P.level===void 0?O:P.level};class FY{constructor(D){return RY(D)}}var RY=(D)=>{let P={};return c_(P,D),P.template=(...O)=>BY(P.template,...O),Object.setPrototypeOf(P,kO.prototype),Object.setPrototypeOf(P.template,P),P.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},P.template.Instance=FY,P.template};function kO(D){return RY(D)}for(let[D,P]of Object.entries(y1))j8[D]={get(){let O=fO(this,o5(P.open,P.close,this._styler),this._isEmpty);return Object.defineProperty(this,D,{value:O}),O}};j8.visible={get(){let D=fO(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:D}),D}};var LY=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let D of LY)j8[D]={get(){let{level:P}=this;return function(...O){let W=o5(y1.color[WY[P]][D](...O),y1.color.close,this._styler);return fO(this,W,this._isEmpty)}}};for(let D of LY){let P="bg"+D[0].toUpperCase()+D.slice(1);j8[P]={get(){let{level:O}=this;return function(...W){let F=o5(y1.bgColor[WY[O]][D](...W),y1.bgColor.close,this._styler);return fO(this,F,this._isEmpty)}}}}var p_=Object.defineProperties(()=>{},{...j8,level:{enumerable:!0,get(){return this._generator.level},set(D){this._generator.level=D}}}),o5=(D,P,O)=>{let W,F;if(O===void 0)W=D,F=P;else W=O.openAll+D,F=P+O.closeAll;return{open:D,close:P,openAll:W,closeAll:F,parent:O}},fO=(D,P,O)=>{let W=(...F)=>{if(NO(F[0])&&NO(F[0].raw))return OY(W,BY(W,...F));return OY(W,F.length===1?""+F[0]:F.join(" "))};return Object.setPrototypeOf(W,p_),W._generator=D,W._styler=P,W._isEmpty=O,W},OY=(D,P)=>{if(D.level<=0||!P)return D._isEmpty?"":P;let O=D._styler;if(O===void 0)return P;let{openAll:W,closeAll:F}=O;if(P.indexOf("\x1B")!==-1)while(O!==void 0)P=m_(P,O.close,O.open),O=O.parent;let R=P.indexOf("\n");if(R!==-1)P=l_(P,F,W,R);return W+P+F},n5,BY=(D,...P)=>{let[O]=P;if(!NO(O)||!NO(O.raw))return P.join(" ");let W=P.slice(1),F=[O.raw[0]];for(let R=1;R{d_.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\uD83D\uDE04 ","\uD83D\uDE1D "]},monkey:{interval:300,frames:["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},hearts:{interval:100,frames:["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","\u2764\uFE0F "]},clock:{interval:100,frames:["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},earth:{interval:180,frames:["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},runner:{interval:140,frames:["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\uD83C\uDF24 ","\u26C5\uFE0F ","\uD83C\uDF25 ","\u2601\uFE0F ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u26C8 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u2601\uFE0F ","\uD83C\uDF25 ","\u26C5\uFE0F ","\uD83C\uDF24 ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\uD83C\uDF32","\uD83C\uDF84"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","\u270B ","\uD83E\uDD1A ","\uD83D\uDC46 "]},fistBump:{interval:80,frames:["\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\u3000\uD83E\uDD1C\u3000\u3000\uD83E\uDD1B\u3000 ","\u3000\u3000\uD83E\uDD1C\uD83E\uDD1B\u3000\u3000 ","\u3000\uD83E\uDD1C\u2728\uD83E\uDD1B\u3000\u3000 ","\uD83E\uDD1C\u3000\u2728\u3000\uD83E\uDD1B\u3000 "]},soccerHeader:{interval:80,frames:[" \uD83E\uDDD1\u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F\uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 "]},mindblown:{interval:160,frames:["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},orangePulse:{interval:100,frames:["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},bluePulse:{interval:100,frames:["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},orangeBluePulse:{interval:100,frames:["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},timeTravel:{interval:100,frames:["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var UY=S((zd,YY)=>{var hO=Object.assign({},HY()),qY=Object.keys(hO);Object.defineProperty(hO,"random",{get(){let D=Math.floor(Math.random()*qY.length),P=qY[D];return hO[P]}});YY.exports=hO});var AY=S((xd,EY)=>{EY.exports=s_;function a_(D){let P={defaultWidth:0,output:process.stdout,tty:dD("tty")};if(!D)return P;return Object.keys(P).forEach(function(O){if(!D[O])D[O]=P[O]}),D}function s_(D){let P=a_(D);if(P.output.getWindowSize)return P.output.getWindowSize()[0]||P.defaultWidth;if(P.tty.getWindowSize)return P.tty.getWindowSize()[1]||P.defaultWidth;if(P.output.columns)return P.output.columns;if(process.env.CLI_WIDTH){let O=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(O)&&O!==0)return O}return P.defaultWidth}});var zY=S((hd,GY)=>{GY.exports=({onlyFirst:D=!1}={})=>{let P=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(P,D?void 0:"g")}});var QY=S((gd,IY)=>{var n_=zY();IY.exports=(D)=>typeof D==="string"?D.replace(n_(),""):D});var $Y=S((vd,PF)=>{var CY=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};PF.exports=CY;PF.exports.default=CY});var wY=S((yd,MY)=>{MY.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var KY=S((md,OF)=>{var i_=QY(),t_=$Y(),o_=wY(),bY=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=i_(D),D.length===0)return 0;D=D.replace(o_()," ");let P=0;for(let O=0;O=127&&W<=159)continue;if(W>=768&&W<=879)continue;if(W>65535)O++;P+=t_(W)?2:1}return P};OF.exports=bY;OF.exports.default=bY});var jY=S((ld,VY)=>{VY.exports=({onlyFirst:D=!1}={})=>{let P=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(P,D?void 0:"g")}});var uY=S((cd,_Y)=>{var e_=jY();_Y.exports=(D)=>typeof D==="string"?D.replace(e_(),""):D});var kY=S((pd,NY)=>{var m1=KY(),Du=uY(),Pu=v1(),FF=new Set(["\x1B","\x9B"]),TY=(D)=>`${FF.values().next().value}[${D}m`,Ou=(D)=>D.split(" ").map((P)=>m1(P)),WF=(D,P,O)=>{let W=[...P],F=!1,R=m1(Du(D[D.length-1]));for(let[L,B]of W.entries()){let Z=m1(B);if(R+Z<=O)D[D.length-1]+=B;else D.push(B),R=0;if(FF.has(B))F=!0;else if(F&&B==="m"){F=!1;continue}if(F)continue;if(R+=Z,R===O&&L0&&D.length>1)D[D.length-2]+=D.pop()},Wu=(D)=>{let P=D.split(" "),O=P.length;while(O>0){if(m1(P[O-1])>0)break;O--}if(O===P.length)return D;return P.slice(0,O).join(" ")+P.slice(O).join("")},Fu=(D,P,O={})=>{if(O.trim!==!1&&D.trim()==="")return"";let W="",F="",R,L=Ou(D),B=[""];for(let[Z,H]of D.split(" ").entries()){if(O.trim!==!1)B[B.length-1]=B[B.length-1].trimLeft();let Y=m1(B[B.length-1]);if(Z!==0){if(Y>=P&&(O.wordWrap===!1||O.trim===!1))B.push(""),Y=0;if(Y>0||O.trim===!1)B[B.length-1]+=" ",Y++}if(O.hard&&L[Z]>P){let q=P-Y,U=1+Math.floor((L[Z]-q-1)/P);if(Math.floor((L[Z]-1)/P)P&&Y>0&&L[Z]>0){if(O.wordWrap===!1&&YP&&O.wordWrap===!1){WF(B,H,P);continue}B[B.length-1]+=H}if(O.trim!==!1)B=B.map(Wu);W=B.join("\n");for(let[Z,H]of[...W].entries()){if(F+=H,FF.has(H)){let q=parseFloat(/\d[^m]*/.exec(W.slice(Z,Z+4)));R=q===39?null:q}let Y=Pu.codes.get(Number(R));if(R&&Y){if(W[Z+1]==="\n")F+=TY(Y);else if(H==="\n")F+=TY(R)}}return F};NY.exports=(D,P,O)=>{return String(D).normalize().replace(/\r\n/g,"\n").split("\n").map((W)=>Fu(W,P,O)).join("\n")}});var lY=S((Or,mY)=>{var Bu=dD("stream");class yY extends Bu{#O=null;constructor(D={}){super(D);this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=D.replace,this._prompt=D.prompt||null,this._hadControl=!1}#P(D,P){if(this._dest)return this._dest[D];if(this._src)return this._src[D];return P}#D(D,...P){if(typeof this._dest?.[D]==="function")this._dest[D](...P);if(typeof this._src?.[D]==="function")this._src[D](...P)}get isTTY(){if(this.#O!==null)return this.#O;return this.#P("isTTY",!1)}set isTTY(D){this.#O=D}get rows(){return this.#P("rows")}get columns(){return this.#P("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(D){this._src=D}pipe(D,P){return this._dest=D,super.pipe(D,P)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(D){if(this.muted){if(!this.replace)return!0;if(D.match(/^\u001b/)){if(D.indexOf(this._prompt)===0)D=D.slice(this._prompt.length),D=D.replace(/./g,this.replace),D=this._prompt+D;return this._hadControl=!0,this.emit("data",D)}else{if(this._prompt&&this._hadControl&&D.indexOf(this._prompt)===0)this._hadControl=!1,this.emit("data",this._prompt),D=D.slice(this._prompt.length);D=D.toString().replace(/./g,this.replace)}}this.emit("data",D)}end(D){if(this.muted)if(D&&this.replace)D=D.toString().replace(/./g,this.replace);else D=null;if(D)this.emit("data",D);this.emit("end")}destroy(...D){return this.#D("destroy",...D)}destroySoon(...D){return this.#D("destroySoon",...D)}close(...D){return this.#D("close",...D)}}mY.exports=yY});var sY=S((Zr,aY)=>{aY.exports=({onlyFirst:D=!1}={})=>{let P=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(P,D?void 0:"g")}});var iY=S((Hr,nY)=>{var qu=sY();nY.exports=(D)=>typeof D==="string"?D.replace(qu(),""):D});var UF=S((Yu,YF)=>{var n=Yu;Yu.default=n;var FD="\x1B[",c1="\x1B]",_8="\x07",mO=";",tY=process.env.TERM_PROGRAM==="Apple_Terminal";n.cursorTo=(D,P)=>{if(typeof D!=="number")throw new TypeError("The `x` argument is required");if(typeof P!=="number")return FD+(D+1)+"G";return FD+(P+1)+";"+(D+1)+"H"};n.cursorMove=(D,P)=>{if(typeof D!=="number")throw new TypeError("The `x` argument is required");let O="";if(D<0)O+=FD+-D+"D";else if(D>0)O+=FD+D+"C";if(P<0)O+=FD+-P+"A";else if(P>0)O+=FD+P+"B";return O};n.cursorUp=(D=1)=>FD+D+"A";n.cursorDown=(D=1)=>FD+D+"B";n.cursorForward=(D=1)=>FD+D+"C";n.cursorBackward=(D=1)=>FD+D+"D";n.cursorLeft=FD+"G";n.cursorSavePosition=tY?"\x1B7":FD+"s";n.cursorRestorePosition=tY?"\x1B8":FD+"u";n.cursorGetPosition=FD+"6n";n.cursorNextLine=FD+"E";n.cursorPrevLine=FD+"F";n.cursorHide=FD+"?25l";n.cursorShow=FD+"?25h";n.eraseLines=(D)=>{let P="";for(let O=0;O{return[c1,"8",mO,mO,P,_8,D,c1,"8",mO,mO,_8].join("")};n.image=(D,P={})=>{let O=`${c1}1337;File=inline=1`;if(P.width)O+=`;width=${P.width}`;if(P.height)O+=`;height=${P.height}`;if(P.preserveAspectRatio===!1)O+=";preserveAspectRatio=0";return O+":"+D.toString("base64")+_8};n.iTerm={setCwd:(D=process.cwd())=>`${c1}50;CurrentDir=${D}${_8}`,annotation:(D,P={})=>{let O=`${c1}1337;`,W=typeof P.x!=="undefined",F=typeof P.y!=="undefined";if((W||F)&&!(W&&F&&typeof P.length!=="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(D=D.replace(/\|/g,""),O+=P.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",P.length>0)O+=(W?[D,P.length,P.x,P.y]:[P.length,D]).join("|");else O+=D;return O+_8}}});var BU=S((vr,LU)=>{var Iu=dD("os"),RU=dD("tty"),F0=TO(),{env:uD}=process,Y2;if(F0("no-color")||F0("no-colors")||F0("color=false")||F0("color=never"))Y2=0;else if(F0("color")||F0("colors")||F0("color=true")||F0("color=always"))Y2=1;if("FORCE_COLOR"in uD)if(uD.FORCE_COLOR==="true")Y2=1;else if(uD.FORCE_COLOR==="false")Y2=0;else Y2=uD.FORCE_COLOR.length===0?1:Math.min(parseInt(uD.FORCE_COLOR,10),3);function JF(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function SF(D,P){if(Y2===0)return 0;if(F0("color=16m")||F0("color=full")||F0("color=truecolor"))return 3;if(F0("color=256"))return 2;if(D&&!P&&Y2===void 0)return 0;let O=Y2||0;if(uD.TERM==="dumb")return O;if(process.platform==="win32"){let W=Iu.release().split(".");if(Number(W[0])>=10&&Number(W[2])>=10586)return Number(W[2])>=14931?3:2;return 1}if("CI"in uD){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((W)=>(W in uD))||uD.CI_NAME==="codeship")return 1;return O}if("TEAMCITY_VERSION"in uD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(uD.TEAMCITY_VERSION)?1:0;if(uD.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in uD){let W=parseInt((uD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(uD.TERM_PROGRAM){case"iTerm.app":return W>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(uD.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(uD.TERM))return 1;if("COLORTERM"in uD)return 1;return O}function Qu(D){let P=SF(D,D&&D.isTTY);return JF(P)}LU.exports={supportsColor:Qu,stdout:JF(SF(!0,RU.isatty(1))),stderr:JF(SF(!0,RU.isatty(2)))}});var HU=S((yr,ZU)=>{var Cu=(D,P,O)=>{let W=D.indexOf(P);if(W===-1)return D;let F=P.length,R=0,L="";do L+=D.substr(R,W-R)+P+O,R=W+F,W=D.indexOf(P,R);while(W!==-1);return L+=D.substr(R),L},$u=(D,P,O,W)=>{let F=0,R="";do{let L=D[W-1]==="\r";R+=D.substr(F,(L?W-1:W)-F)+P+(L?"\r\n":"\n")+O,F=W+1,W=D.indexOf("\n",F)}while(W!==-1);return R+=D.substr(F),R};ZU.exports={stringReplaceAll:Cu,stringEncaseCRLFWithFirstIndex:$u}});var SU=S((mr,JU)=>{var Mu=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,qU=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,wu=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,bu=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Ku=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function UU(D){let P=D[0]==="u",O=D[1]==="{";if(P&&!O&&D.length===5||D[0]==="x"&&D.length===3)return String.fromCharCode(parseInt(D.slice(1),16));if(P&&O)return String.fromCodePoint(parseInt(D.slice(2,-1),16));return Ku.get(D)||D}function Vu(D,P){let O=[],W=P.trim().split(/\s*,\s*/g),F;for(let R of W){let L=Number(R);if(!Number.isNaN(L))O.push(L);else if(F=R.match(wu))O.push(F[2].replace(bu,(B,Z,H)=>Z?UU(Z):H));else throw new Error(`Invalid Chalk template style argument: ${R} (in style '${D}')`)}return O}function ju(D){qU.lastIndex=0;let P=[],O;while((O=qU.exec(D))!==null){let W=O[1];if(O[2]){let F=Vu(W,O[2]);P.push([W].concat(F))}else P.push([W])}return P}function YU(D,P){let O={};for(let F of P)for(let R of F.styles)O[R[0]]=F.inverse?null:R.slice(1);let W=D;for(let[F,R]of Object.entries(O)){if(!Array.isArray(R))continue;if(!(F in W))throw new Error(`Unknown Chalk style: ${F}`);W=R.length>0?W[F](...R):W[F]}return W}JU.exports=(D,P)=>{let O=[],W=[],F=[];if(P.replace(Mu,(R,L,B,Z,H,Y)=>{if(L)F.push(UU(L));else if(Z){let q=F.join("");F=[],W.push(O.length===0?q:YU(D,O)(q)),O.push({inverse:B,styles:ju(Z)})}else if(H){if(O.length===0)throw new Error("Found extraneous } in Chalk template literal");W.push(YU(D,O)(F.join(""))),F=[],O.pop()}else F.push(Y)}),W.push(F.join("")),O.length>0){let R=`Chalk template literal is missing ${O.length} closing bracket${O.length===1?"":"s"} (\`}\`)`;throw new Error(R)}return W.join("")}});var CU=S((lr,QU)=>{var p1=v1(),{stdout:EF,stderr:AF}=BU(),{stringReplaceAll:_u,stringEncaseCRLFWithFirstIndex:uu}=HU(),{isArray:dO}=Array,EU=["ansi","ansi","ansi256","ansi16m"],T8=Object.create(null),Tu=(D,P={})=>{if(P.level&&!(Number.isInteger(P.level)&&P.level>=0&&P.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let O=EF?EF.level:0;D.level=P.level===void 0?O:P.level};class AU{constructor(D){return GU(D)}}var GU=(D)=>{let P={};return Tu(P,D),P.template=(...O)=>IU(P.template,...O),Object.setPrototypeOf(P,rO.prototype),Object.setPrototypeOf(P.template,P),P.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},P.template.Instance=AU,P.template};function rO(D){return GU(D)}for(let[D,P]of Object.entries(p1))T8[D]={get(){let O=aO(this,GF(P.open,P.close,this._styler),this._isEmpty);return Object.defineProperty(this,D,{value:O}),O}};T8.visible={get(){let D=aO(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:D}),D}};var zU=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let D of zU)T8[D]={get(){let{level:P}=this;return function(...O){let W=GF(p1.color[EU[P]][D](...O),p1.color.close,this._styler);return aO(this,W,this._isEmpty)}}};for(let D of zU){let P="bg"+D[0].toUpperCase()+D.slice(1);T8[P]={get(){let{level:O}=this;return function(...W){let F=GF(p1.bgColor[EU[O]][D](...W),p1.bgColor.close,this._styler);return aO(this,F,this._isEmpty)}}}}var Nu=Object.defineProperties(()=>{},{...T8,level:{enumerable:!0,get(){return this._generator.level},set(D){this._generator.level=D}}}),GF=(D,P,O)=>{let W,F;if(O===void 0)W=D,F=P;else W=O.openAll+D,F=P+O.closeAll;return{open:D,close:P,openAll:W,closeAll:F,parent:O}},aO=(D,P,O)=>{let W=(...F)=>{if(dO(F[0])&&dO(F[0].raw))return XU(W,IU(W,...F));return XU(W,F.length===1?""+F[0]:F.join(" "))};return Object.setPrototypeOf(W,Nu),W._generator=D,W._styler=P,W._isEmpty=O,W},XU=(D,P)=>{if(D.level<=0||!P)return D._isEmpty?"":P;let O=D._styler;if(O===void 0)return P;let{openAll:W,closeAll:F}=O;if(P.indexOf("\x1B")!==-1)while(O!==void 0)P=_u(P,O.close,O.open),O=O.parent;let R=P.indexOf("\n");if(R!==-1)P=uu(P,F,W,R);return W+P+F},XF,IU=(D,...P)=>{let[O]=P;if(!dO(O)||!dO(O.raw))return P.join(" ");let W=P.slice(1),F=[O.raw[0]];for(let R=1;R{var fu=dD("os"),wU=dD("tty"),R0=TO(),{env:TD}=process,J2;if(R0("no-color")||R0("no-colors")||R0("color=false")||R0("color=never"))J2=0;else if(R0("color")||R0("colors")||R0("color=true")||R0("color=always"))J2=1;if("FORCE_COLOR"in TD)if(TD.FORCE_COLOR==="true")J2=1;else if(TD.FORCE_COLOR==="false")J2=0;else J2=TD.FORCE_COLOR.length===0?1:Math.min(parseInt(TD.FORCE_COLOR,10),3);function zF(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function IF(D,P){if(J2===0)return 0;if(R0("color=16m")||R0("color=full")||R0("color=truecolor"))return 3;if(R0("color=256"))return 2;if(D&&!P&&J2===void 0)return 0;let O=J2||0;if(TD.TERM==="dumb")return O;if(process.platform==="win32"){let W=fu.release().split(".");if(Number(W[0])>=10&&Number(W[2])>=10586)return Number(W[2])>=14931?3:2;return 1}if("CI"in TD){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((W)=>(W in TD))||TD.CI_NAME==="codeship")return 1;return O}if("TEAMCITY_VERSION"in TD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(TD.TEAMCITY_VERSION)?1:0;if(TD.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in TD){let W=parseInt((TD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(TD.TERM_PROGRAM){case"iTerm.app":return W>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(TD.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(TD.TERM))return 1;if("COLORTERM"in TD)return 1;return O}function xu(D){let P=IF(D,D&&D.isTTY);return zF(P)}bU.exports={supportsColor:xu,stdout:zF(IF(!0,wU.isatty(1))),stderr:zF(IF(!0,wU.isatty(2)))}});var jU=S((tr,VU)=>{var hu=(D,P,O)=>{let W=D.indexOf(P);if(W===-1)return D;let F=P.length,R=0,L="";do L+=D.substr(R,W-R)+P+O,R=W+F,W=D.indexOf(P,R);while(W!==-1);return L+=D.substr(R),L},gu=(D,P,O,W)=>{let F=0,R="";do{let L=D[W-1]==="\r";R+=D.substr(F,(L?W-1:W)-F)+P+(L?"\r\n":"\n")+O,F=W+1,W=D.indexOf("\n",F)}while(W!==-1);return R+=D.substr(F),R};VU.exports={stringReplaceAll:hu,stringEncaseCRLFWithFirstIndex:gu}});var kU=S((or,NU)=>{var vu=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,_U=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,yu=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,mu=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,lu=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function TU(D){let P=D[0]==="u",O=D[1]==="{";if(P&&!O&&D.length===5||D[0]==="x"&&D.length===3)return String.fromCharCode(parseInt(D.slice(1),16));if(P&&O)return String.fromCodePoint(parseInt(D.slice(2,-1),16));return lu.get(D)||D}function cu(D,P){let O=[],W=P.trim().split(/\s*,\s*/g),F;for(let R of W){let L=Number(R);if(!Number.isNaN(L))O.push(L);else if(F=R.match(yu))O.push(F[2].replace(mu,(B,Z,H)=>Z?TU(Z):H));else throw new Error(`Invalid Chalk template style argument: ${R} (in style '${D}')`)}return O}function pu(D){_U.lastIndex=0;let P=[],O;while((O=_U.exec(D))!==null){let W=O[1];if(O[2]){let F=cu(W,O[2]);P.push([W].concat(F))}else P.push([W])}return P}function uU(D,P){let O={};for(let F of P)for(let R of F.styles)O[R[0]]=F.inverse?null:R.slice(1);let W=D;for(let[F,R]of Object.entries(O)){if(!Array.isArray(R))continue;if(!(F in W))throw new Error(`Unknown Chalk style: ${F}`);W=R.length>0?W[F](...R):W[F]}return W}NU.exports=(D,P)=>{let O=[],W=[],F=[];if(P.replace(vu,(R,L,B,Z,H,Y)=>{if(L)F.push(TU(L));else if(Z){let q=F.join("");F=[],W.push(O.length===0?q:uU(D,O)(q)),O.push({inverse:B,styles:pu(Z)})}else if(H){if(O.length===0)throw new Error("Found extraneous } in Chalk template literal");W.push(uU(D,O)(F.join(""))),F=[],O.pop()}else F.push(Y)}),W.push(F.join("")),O.length>0){let R=`Chalk template literal is missing ${O.length} closing bracket${O.length===1?"":"s"} (\`}\`)`;throw new Error(R)}return W.join("")}});var eO=S((er,mU)=>{var d1=v1(),{stdout:CF,stderr:$F}=KU(),{stringReplaceAll:du,stringEncaseCRLFWithFirstIndex:ru}=jU(),{isArray:nO}=Array,xU=["ansi","ansi","ansi256","ansi16m"],k8=Object.create(null),au=(D,P={})=>{if(P.level&&!(Number.isInteger(P.level)&&P.level>=0&&P.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let O=CF?CF.level:0;D.level=P.level===void 0?O:P.level};class hU{constructor(D){return gU(D)}}var gU=(D)=>{let P={};return au(P,D),P.template=(...O)=>yU(P.template,...O),Object.setPrototypeOf(P,iO.prototype),Object.setPrototypeOf(P.template,P),P.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},P.template.Instance=hU,P.template};function iO(D){return gU(D)}for(let[D,P]of Object.entries(d1))k8[D]={get(){let O=tO(this,MF(P.open,P.close,this._styler),this._isEmpty);return Object.defineProperty(this,D,{value:O}),O}};k8.visible={get(){let D=tO(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:D}),D}};var vU=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let D of vU)k8[D]={get(){let{level:P}=this;return function(...O){let W=MF(d1.color[xU[P]][D](...O),d1.color.close,this._styler);return tO(this,W,this._isEmpty)}}};for(let D of vU){let P="bg"+D[0].toUpperCase()+D.slice(1);k8[P]={get(){let{level:O}=this;return function(...W){let F=MF(d1.bgColor[xU[O]][D](...W),d1.bgColor.close,this._styler);return tO(this,F,this._isEmpty)}}}}var su=Object.defineProperties(()=>{},{...k8,level:{enumerable:!0,get(){return this._generator.level},set(D){this._generator.level=D}}}),MF=(D,P,O)=>{let W,F;if(O===void 0)W=D,F=P;else W=O.openAll+D,F=P+O.closeAll;return{open:D,close:P,openAll:W,closeAll:F,parent:O}},tO=(D,P,O)=>{let W=(...F)=>{if(nO(F[0])&&nO(F[0].raw))return fU(W,yU(W,...F));return fU(W,F.length===1?""+F[0]:F.join(" "))};return Object.setPrototypeOf(W,su),W._generator=D,W._styler=P,W._isEmpty=O,W},fU=(D,P)=>{if(D.level<=0||!P)return D._isEmpty?"":P;let O=D._styler;if(O===void 0)return P;let{openAll:W,closeAll:F}=O;if(P.indexOf("\x1B")!==-1)while(O!==void 0)P=du(P,O.close,O.open),O=O.parent;let R=P.indexOf("\n");if(R!==-1)P=ru(P,F,W,R);return W+P+F},QF,yU=(D,...P)=>{let[O]=P;if(!nO(O)||!nO(O.raw))return P.join(" ");let W=P.slice(1),F=[O.raw[0]];for(let R=1;R{var jF=Symbol.for("yaml.alias"),rU=Symbol.for("yaml.document"),R3=Symbol.for("yaml.map"),aU=Symbol.for("yaml.pair"),_F=Symbol.for("yaml.scalar"),L3=Symbol.for("yaml.seq"),s0=Symbol.for("yaml.node.type"),OT=(D)=>!!D&&typeof D==="object"&&D[s0]===jF,WT=(D)=>!!D&&typeof D==="object"&&D[s0]===rU,FT=(D)=>!!D&&typeof D==="object"&&D[s0]===R3,RT=(D)=>!!D&&typeof D==="object"&&D[s0]===aU,sU=(D)=>!!D&&typeof D==="object"&&D[s0]===_F,LT=(D)=>!!D&&typeof D==="object"&&D[s0]===L3;function nU(D){if(D&&typeof D==="object")switch(D[s0]){case R3:case L3:return!0}return!1}function BT(D){if(D&&typeof D==="object")switch(D[s0]){case jF:case R3:case _F:case L3:return!0}return!1}var ZT=(D)=>(sU(D)||nU(D))&&!!D.anchor;HT.ALIAS=jF;HT.DOC=rU;HT.MAP=R3;HT.NODE_TYPE=s0;HT.PAIR=aU;HT.SCALAR=_F;HT.SEQ=L3;HT.hasAnchor=ZT;HT.isAlias=OT;HT.isCollection=nU;HT.isDocument=WT;HT.isMap=FT;HT.isNode=BT;HT.isPair=RT;HT.isScalar=sU;HT.isSeq=LT});var a1=S((bT)=>{var bD=i(),pD=Symbol("break visit"),iU=Symbol("skip children"),f0=Symbol("remove node");function B3(D,P){let O=tU(P);if(bD.isDocument(D)){if(f8(null,D.contents,O,Object.freeze([D]))===f0)D.contents=null}else f8(null,D,O,Object.freeze([]))}B3.BREAK=pD;B3.SKIP=iU;B3.REMOVE=f0;function f8(D,P,O,W){let F=oU(D,P,O,W);if(bD.isNode(F)||bD.isPair(F))return eU(D,W,F),f8(D,F,O,W);if(typeof F!=="symbol"){if(bD.isCollection(P)){W=Object.freeze(W.concat(P));for(let R=0;R{var DJ=i(),jT=a1(),_T={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},uT=(D)=>D.replace(/[!,[\]{}]/g,(P)=>_T[P]);class B0{constructor(D,P){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},B0.defaultYaml,D),this.tags=Object.assign({},B0.defaultTags,P)}clone(){let D=new B0(this.yaml,this.tags);return D.docStart=this.docStart,D}atDocument(){let D=new B0(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:B0.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},B0.defaultTags);break}return D}add(D,P){if(this.atNextDocument)this.yaml={explicit:B0.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},B0.defaultTags),this.atNextDocument=!1;let O=D.trim().split(/[ \t]+/),W=O.shift();switch(W){case"%TAG":{if(O.length!==2){if(P(0,"%TAG directive should contain exactly two parts"),O.length<2)return!1}let[F,R]=O;return this.tags[F]=R,!0}case"%YAML":{if(this.yaml.explicit=!0,O.length!==1)return P(0,"%YAML directive should contain exactly one part"),!1;let[F]=O;if(F==="1.1"||F==="1.2")return this.yaml.version=F,!0;else{let R=/^\d+\.\d+$/.test(F);return P(6,`Unsupported YAML version ${F}`,R),!1}}default:return P(0,`Unknown directive ${W}`,!0),!1}}tagName(D,P){if(D==="!")return"!";if(D[0]!=="!")return P(`Not a valid tag: ${D}`),null;if(D[1]==="<"){let R=D.slice(2,-1);if(R==="!"||R==="!!")return P(`Verbatim tags aren't resolved, so ${D} is invalid.`),null;if(D[D.length-1]!==">")P("Verbatim tags must end with a >");return R}let[,O,W]=D.match(/^(.*!)([^!]*)$/s);if(!W)P(`The ${D} tag has no suffix`);let F=this.tags[O];if(F)try{return F+decodeURIComponent(W)}catch(R){return P(String(R)),null}if(O==="!")return D;return P(`Could not resolve tag: ${D}`),null}tagString(D){for(let[P,O]of Object.entries(this.tags))if(D.startsWith(O))return P+uT(D.substring(O.length));return D[0]==="!"?D:`!<${D}>`}toString(D){let P=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],O=Object.entries(this.tags),W;if(D&&O.length>0&&DJ.isNode(D.contents)){let F={};jT.visit(D.contents,(R,L)=>{if(DJ.isNode(L)&&L.tag)F[L.tag]=!0}),W=Object.keys(F)}else W=[];for(let[F,R]of O){if(F==="!!"&&R==="tag:yaml.org,2002:")continue;if(!D||W.some((L)=>L.startsWith(R)))P.push(`%TAG ${F} ${R}`)}return P.join("\n")}}B0.defaultYaml={explicit:!1,version:"1.2"};B0.defaultTags={"!!":"tag:yaml.org,2002:"};TT.Directives=B0});var H3=S((hT)=>{var PJ=i(),kT=a1();function fT(D){if(/[\x00-\x19\s,[\]{}]/.test(D)){let O=`Anchor must not contain whitespace or control characters: ${JSON.stringify(D)}`;throw new Error(O)}return!0}function OJ(D){let P=new Set;return kT.visit(D,{Value(O,W){if(W.anchor)P.add(W.anchor)}}),P}function WJ(D,P){for(let O=1;;++O){let W=`${D}${O}`;if(!P.has(W))return W}}function xT(D,P){let O=[],W=new Map,F=null;return{onAnchor:(R)=>{if(O.push(R),!F)F=OJ(D);let L=WJ(P,F);return F.add(L),L},setAnchors:()=>{for(let R of O){let L=W.get(R);if(typeof L==="object"&&L.anchor&&(PJ.isScalar(L.node)||PJ.isCollection(L.node)))L.node.anchor=L.anchor;else{let B=new Error("Failed to resolve repeated object (this should not happen)");throw B.source=R,B}}},sourceObjects:W}}hT.anchorIsValid=fT;hT.anchorNames=OJ;hT.createNodeAnchors=xT;hT.findNewAnchor=WJ});var TF=S((lT)=>{function s1(D,P,O,W){if(W&&typeof W==="object")if(Array.isArray(W))for(let F=0,R=W.length;F{var pT=i();function FJ(D,P,O){if(Array.isArray(D))return D.map((W,F)=>FJ(W,String(F),O));if(D&&typeof D.toJSON==="function"){if(!O||!pT.hasAnchor(D))return D.toJSON(P,O);let W={aliasCount:0,count:1,res:void 0};O.anchors.set(D,W),O.onCreate=(R)=>{W.res=R,delete O.onCreate};let F=D.toJSON(P,O);if(O.onCreate)O.onCreate(F);return F}if(typeof D==="bigint"&&!O?.keep)return Number(D);return D}dT.toJS=FJ});var q3=S((nT)=>{var aT=TF(),RJ=i(),sT=S2();class LJ{constructor(D){Object.defineProperty(this,RJ.NODE_TYPE,{value:D})}clone(){let D=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)D.range=this.range.slice();return D}toJS(D,{mapAsMap:P,maxAliasCount:O,onAnchor:W,reviver:F}={}){if(!RJ.isDocument(D))throw new TypeError("A document argument is required");let R={anchors:new Map,doc:D,keep:!0,mapAsMap:P===!0,mapKeyWarned:!1,maxAliasCount:typeof O==="number"?O:100},L=sT.toJS(this,"",R);if(typeof W==="function")for(let{count:B,res:Z}of R.anchors.values())W(Z,B);return typeof F==="function"?aT.applyReviver(F,{"":L},"",L):L}}nT.NodeBase=LJ});var n1=S((DN)=>{var tT=H3(),BJ=a1(),Y3=i(),oT=q3(),eT=S2();class ZJ extends oT.NodeBase{constructor(D){super(Y3.ALIAS);this.source=D,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(D){let P=void 0;return BJ.visit(D,{Node:(O,W)=>{if(W===this)return BJ.visit.BREAK;if(W.anchor===this.source)P=W}}),P}toJSON(D,P){if(!P)return{source:this.source};let{anchors:O,doc:W,maxAliasCount:F}=P,R=this.resolve(W);if(!R){let B=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(B)}let L=O.get(R);if(!L)eT.toJS(R,null,P),L=O.get(R);if(!L||L.res===void 0)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(F>=0){if(L.count+=1,L.aliasCount===0)L.aliasCount=U3(W,R,O);if(L.count*L.aliasCount>F)throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return L.res}toString(D,P,O){let W=`*${this.source}`;if(D){if(tT.anchorIsValid(this.source),D.options.verifyAliasOrder&&!D.anchors.has(this.source)){let F=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(F)}if(D.implicitKey)return`${W} `}return W}}function U3(D,P,O){if(Y3.isAlias(P)){let W=P.resolve(D),F=O&&W&&O.get(W);return F?F.count*F.aliasCount:0}else if(Y3.isCollection(P)){let W=0;for(let F of P.items){let R=U3(D,F,O);if(R>W)W=R}return W}else if(Y3.isPair(P)){let W=U3(D,P.key,O),F=U3(D,P.value,O);return Math.max(W,F)}return 1}DN.Alias=ZJ});var ID=S((LN)=>{var ON=i(),WN=q3(),FN=S2(),RN=(D)=>!D||typeof D!=="function"&&typeof D!=="object";class a2 extends WN.NodeBase{constructor(D){super(ON.SCALAR);this.value=D}toJSON(D,P){return P?.keep?this.value:FN.toJS(this.value,D,P)}toString(){return String(this.value)}}a2.BLOCK_FOLDED="BLOCK_FOLDED";a2.BLOCK_LITERAL="BLOCK_LITERAL";a2.PLAIN="PLAIN";a2.QUOTE_DOUBLE="QUOTE_DOUBLE";a2.QUOTE_SINGLE="QUOTE_SINGLE";LN.Scalar=a2;LN.isScalarValue=RN});var i1=S((JN)=>{var HN=n1(),s2=i(),HJ=ID(),qN="tag:yaml.org,2002:";function YN(D,P,O){if(P){let W=O.filter((R)=>R.tag===P),F=W.find((R)=>!R.format)??W[0];if(!F)throw new Error(`Tag ${P} not found`);return F}return O.find((W)=>W.identify?.(D)&&!W.format)}function UN(D,P,O){if(s2.isDocument(D))D=D.contents;if(s2.isNode(D))return D;if(s2.isPair(D)){let q=O.schema[s2.MAP].createNode?.(O.schema,null,O);return q.items.push(D),q}if(D instanceof String||D instanceof Number||D instanceof Boolean||typeof BigInt!=="undefined"&&D instanceof BigInt)D=D.valueOf();let{aliasDuplicateObjects:W,onAnchor:F,onTagObj:R,schema:L,sourceObjects:B}=O,Z=void 0;if(W&&D&&typeof D==="object")if(Z=B.get(D),Z){if(!Z.anchor)Z.anchor=F(D);return new HN.Alias(Z.anchor)}else Z={anchor:null,node:null},B.set(D,Z);if(P?.startsWith("!!"))P=qN+P.slice(2);let H=YN(D,P,L.tags);if(!H){if(D&&typeof D.toJSON==="function")D=D.toJSON();if(!D||typeof D!=="object"){let q=new HJ.Scalar(D);if(Z)Z.node=q;return q}H=D instanceof Map?L[s2.MAP]:(Symbol.iterator in Object(D))?L[s2.SEQ]:L[s2.MAP]}if(R)R(H),delete O.onTagObj;let Y=H?.createNode?H.createNode(O.schema,D,O):typeof H?.nodeClass?.from==="function"?H.nodeClass.from(O.schema,D,O):new HJ.Scalar(D);if(P)Y.tag=P;else if(!H.default)Y.tag=H.tag;if(Z)Z.node=Y;return Y}JN.createNode=UN});var J3=S((AN)=>{var XN=i1(),x0=i(),EN=q3();function NF(D,P,O){let W=O;for(let F=P.length-1;F>=0;--F){let R=P[F];if(typeof R==="number"&&Number.isInteger(R)&&R>=0){let L=[];L[R]=W,W=L}else W=new Map([[R,W]])}return XN.createNode(W,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:D,sourceObjects:new Map})}var qJ=(D)=>D==null||typeof D==="object"&&!!D[Symbol.iterator]().next().done;class YJ extends EN.NodeBase{constructor(D,P){super(D);Object.defineProperty(this,"schema",{value:P,configurable:!0,enumerable:!1,writable:!0})}clone(D){let P=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(D)P.schema=D;if(P.items=P.items.map((O)=>x0.isNode(O)||x0.isPair(O)?O.clone(D):O),this.range)P.range=this.range.slice();return P}addIn(D,P){if(qJ(D))this.add(P);else{let[O,...W]=D,F=this.get(O,!0);if(x0.isCollection(F))F.addIn(W,P);else if(F===void 0&&this.schema)this.set(O,NF(this.schema,W,P));else throw new Error(`Expected YAML collection at ${O}. Remaining path: ${W}`)}}deleteIn(D){let[P,...O]=D;if(O.length===0)return this.delete(P);let W=this.get(P,!0);if(x0.isCollection(W))return W.deleteIn(O);else throw new Error(`Expected YAML collection at ${P}. Remaining path: ${O}`)}getIn(D,P){let[O,...W]=D,F=this.get(O,!0);if(W.length===0)return!P&&x0.isScalar(F)?F.value:F;else return x0.isCollection(F)?F.getIn(W,P):void 0}hasAllNullValues(D){return this.items.every((P)=>{if(!x0.isPair(P))return!1;let O=P.value;return O==null||D&&x0.isScalar(O)&&O.value==null&&!O.commentBefore&&!O.comment&&!O.tag})}hasIn(D){let[P,...O]=D;if(O.length===0)return this.has(P);let W=this.get(P,!0);return x0.isCollection(W)?W.hasIn(O):!1}setIn(D,P){let[O,...W]=D;if(W.length===0)this.set(O,P);else{let F=this.get(O,!0);if(x0.isCollection(F))F.setIn(W,P);else if(F===void 0&&this.schema)this.set(O,NF(this.schema,W,P));else throw new Error(`Expected YAML collection at ${O}. Remaining path: ${W}`)}}}AN.Collection=YJ;AN.collectionFromPath=NF;AN.isEmptyPath=qJ});var t1=S(($N)=>{var QN=(D)=>D.replace(/^(?!$)(?: $)?/gm,"#");function kF(D,P){if(/^\n+$/.test(D))return D.substring(1);return P?D.replace(/^(?! *$)/gm,P):D}var CN=(D,P,O)=>D.endsWith("\n")?kF(O,P):O.includes("\n")?"\n"+kF(O,P):(D.endsWith(" ")?"":" ")+O;$N.indentComment=kF;$N.lineComment=CN;$N.stringifyComment=QN});var JJ=S((VN)=>{function KN(D,P,O="flow",{indentAtStart:W,lineWidth:F=80,minContentWidth:R=20,onFold:L,onOverflow:B}={}){if(!F||F<0)return D;if(FF-Math.max(2,R))H.push(0);else q=F-W;let U=void 0,J=void 0,A=!1,E=-1,G=-1,Q=-1;if(O==="block"){if(E=UJ(D,E,P.length),E!==-1)q=E+Z}for(let C;C=D[E+=1];){if(O==="quoted"&&C==="\\"){switch(G=E,D[E+1]){case"x":E+=3;break;case"u":E+=5;break;case"U":E+=9;break;default:E+=1}Q=E}if(C==="\n"){if(O==="block")E=UJ(D,E,P.length);q=E+P.length+Z,U=void 0}else{if(C===" "&&J&&J!==" "&&J!=="\n"&&J!=="\t"){let j=D[E+1];if(j&&j!==" "&&j!=="\n"&&j!=="\t")U=E}if(E>=q)if(U)H.push(U),q=U+Z,U=void 0;else if(O==="quoted"){while(J===" "||J==="\t")J=C,C=D[E+=1],A=!0;let j=E>Q+1?E-2:G-1;if(Y[j])return D;H.push(j),Y[j]=!0,q=j+Z,U=void 0}else A=!0}J=C}if(A&&B)B();if(H.length===0)return D;if(L)L();let w=D.slice(0,H[0]);for(let C=0;C{var h0=ID(),X2=JJ(),X3=(D,P)=>({indentAtStart:P?D.indent.length:D.indentAtStart,lineWidth:D.options.lineWidth,minContentWidth:D.options.minContentWidth}),E3=(D)=>/^(%|---|\.\.\.)/m.test(D);function NN(D,P,O){if(!P||P<0)return!1;let W=P-O,F=D.length;if(F<=W)return!1;for(let R=0,L=0;RW)return!0;if(L=R+1,F-L<=W)return!1}return!0}function o1(D,P){let O=JSON.stringify(D);if(P.options.doubleQuotedAsJSON)return O;let{implicitKey:W}=P,F=P.options.doubleQuotedMinMultiLineLength,R=P.indent||(E3(D)?" ":""),L="",B=0;for(let Z=0,H=O[Z];H;H=O[++Z]){if(H===" "&&O[Z+1]==="\\"&&O[Z+2]==="n")L+=O.slice(B,Z)+"\\ ",Z+=1,B=Z,H="\\";if(H==="\\")switch(O[Z+1]){case"u":{L+=O.slice(B,Z);let Y=O.substr(Z+2,4);switch(Y){case"0000":L+="\\0";break;case"0007":L+="\\a";break;case"000b":L+="\\v";break;case"001b":L+="\\e";break;case"0085":L+="\\N";break;case"00a0":L+="\\_";break;case"2028":L+="\\L";break;case"2029":L+="\\P";break;default:if(Y.substr(0,2)==="00")L+="\\x"+Y.substr(2);else L+=O.substr(Z,6)}Z+=5,B=Z+1}break;case"n":if(W||O[Z+2]==='"'||O.length\n";let q,U;for(U=O.length;U>0;--U){let _=O[U-1];if(_!=="\n"&&_!=="\t"&&_!==" ")break}let J=O.substring(U),A=J.indexOf("\n");if(A===-1)q="-";else if(O===J||A!==J.length-1){if(q="+",R)R()}else q="";if(J){if(O=O.slice(0,-J.length),J[J.length-1]==="\n")J=J.slice(0,-1);J=J.replace(xF,`\$&${H}`)}let E=!1,G,Q=-1;for(G=0;G")+(E?H?"2":"1":"")+q;if(D){if(j+=" "+B(D.replace(/ ?[\r\n]+/g," ")),F)F()}if(Y)return O=O.replace(/\n+/g,`\$&${H}`),`${j}\n${H}${w}${O}${J}`;O=O.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`\$&${H}`);let b=X2.foldFlowLines(`${w}${O}${J}`,H,X2.FOLD_BLOCK,X3(W,!0));return`${j}\n${H}${b}`}function kN(D,P,O,W){let{type:F,value:R}=D,{actualString:L,implicitKey:B,indent:Z,indentStep:H,inFlow:Y}=P;if(B&&R.includes("\n")||Y&&/[[\]{},]/.test(R))return h8(R,P);if(!R||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(R))return B||Y||!R.includes("\n")?h8(R,P):S3(D,P,O,W);if(!B&&!Y&&F!==h0.Scalar.PLAIN&&R.includes("\n"))return S3(D,P,O,W);if(E3(R)){if(Z==="")return P.forceBlockIndent=!0,S3(D,P,O,W);else if(B&&Z===H)return h8(R,P)}let q=R.replace(/\n+/g,`\$&\n${Z}`);if(L){let U=(E)=>E.default&&E.tag!=="tag:yaml.org,2002:str"&&E.test?.test(q),{compat:J,tags:A}=P.doc.schema;if(A.some(U)||J?.some(U))return h8(R,P)}return B?q:X2.foldFlowLines(q,Z,X2.FOLD_FLOW,X3(P,!1))}function fN(D,P,O,W){let{implicitKey:F,inFlow:R}=P,L=typeof D.value==="string"?D:Object.assign({},D,{value:String(D.value)}),{type:B}=D;if(B!==h0.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(L.value))B=h0.Scalar.QUOTE_DOUBLE}let Z=(Y)=>{switch(Y){case h0.Scalar.BLOCK_FOLDED:case h0.Scalar.BLOCK_LITERAL:return F||R?h8(L.value,P):S3(L,P,O,W);case h0.Scalar.QUOTE_DOUBLE:return o1(L.value,P);case h0.Scalar.QUOTE_SINGLE:return fF(L.value,P);case h0.Scalar.PLAIN:return kN(L,P,O,W);default:return null}},H=Z(B);if(H===null){let{defaultKeyType:Y,defaultStringType:q}=P.options,U=F&&Y||q;if(H=Z(U),H===null)throw new Error(`Unsupported default string type ${U}`)}return H}xN.stringifyString=fN});var DP=S((dN)=>{var gN=H3(),E2=i(),vN=t1(),yN=e1();function mN(D,P){let O=Object.assign({blockQuote:!0,commentString:vN.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},D.schema.toStringOptions,P),W;switch(O.collectionStyle){case"block":W=!1;break;case"flow":W=!0;break;default:W=null}return{anchors:new Set,doc:D,flowCollectionPadding:O.flowCollectionPadding?" ":"",indent:"",indentStep:typeof O.indent==="number"?" ".repeat(O.indent):" ",inFlow:W,options:O}}function lN(D,P){if(P.tag){let F=D.filter((R)=>R.tag===P.tag);if(F.length>0)return F.find((R)=>R.format===P.format)??F[0]}let O=void 0,W;if(E2.isScalar(P)){W=P.value;let F=D.filter((R)=>R.identify?.(W));if(F.length>1){let R=F.filter((L)=>L.test);if(R.length>0)F=R}O=F.find((R)=>R.format===P.format)??F.find((R)=>!R.format)}else W=P,O=D.find((F)=>F.nodeClass&&W instanceof F.nodeClass);if(!O){let F=W?.constructor?.name??typeof W;throw new Error(`Tag not resolved for ${F} value`)}return O}function cN(D,P,{anchors:O,doc:W}){if(!W.directives)return"";let F=[],R=(E2.isScalar(D)||E2.isCollection(D))&&D.anchor;if(R&&gN.anchorIsValid(R))O.add(R),F.push(`&${R}`);let L=D.tag?D.tag:P.default?null:P.tag;if(L)F.push(W.directives.tagString(L));return F.join(" ")}function pN(D,P,O,W){if(E2.isPair(D))return D.toString(P,O,W);if(E2.isAlias(D)){if(P.doc.directives)return D.toString(P);if(P.resolvedAliases?.has(D))throw new TypeError("Cannot stringify circular structure without alias nodes");else{if(P.resolvedAliases)P.resolvedAliases.add(D);else P.resolvedAliases=new Set([D]);D=D.resolve(P.doc)}}let F=void 0,R=E2.isNode(D)?D:P.doc.createNode(D,{onTagObj:(Z)=>F=Z});if(!F)F=lN(P.doc.schema.tags,R);let L=cN(R,F,P);if(L.length>0)P.indentAtStart=(P.indentAtStart??0)+L.length+1;let B=typeof F.stringify==="function"?F.stringify(R,P,O,W):E2.isScalar(R)?yN.stringifyString(R,P,O,W):R.toString(P,O,W);if(!L)return B;return E2.isScalar(R)||B[0]==="{"||B[0]==="["?`${L} ${B}`:`${L}\n${P.indent}${B}`}dN.createStringifyContext=mN;dN.stringify=pN});var EJ=S((nN)=>{var n0=i(),SJ=ID(),XJ=DP(),PP=t1();function sN({key:D,value:P},O,W,F){let{allNullValues:R,doc:L,indent:B,indentStep:Z,options:{commentString:H,indentSeq:Y,simpleKeys:q}}=O,U=n0.isNode(D)&&D.comment||null;if(q){if(U)throw new Error("With simple keys, key nodes cannot have comments");if(n0.isCollection(D)||!n0.isNode(D)&&typeof D==="object")throw new Error("With simple keys, collection cannot be used as a key value")}let J=!q&&(!D||U&&P==null&&!O.inFlow||n0.isCollection(D)||(n0.isScalar(D)?D.type===SJ.Scalar.BLOCK_FOLDED||D.type===SJ.Scalar.BLOCK_LITERAL:typeof D==="object"));O=Object.assign({},O,{allNullValues:!1,implicitKey:!J&&(q||!R),indent:B+Z});let A=!1,E=!1,G=XJ.stringify(D,O,()=>A=!0,()=>E=!0);if(!J&&!O.inFlow&&G.length>1024){if(q)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");J=!0}if(O.inFlow){if(R||P==null){if(A&&W)W();return G===""?"?":J?`? ${G}`:G}}else if(R&&!q||P==null&&J){if(G=`? ${G}`,U&&!A)G+=PP.lineComment(G,O.indent,H(U));else if(E&&F)F();return G}if(A)U=null;if(J){if(U)G+=PP.lineComment(G,O.indent,H(U));G=`? ${G}\n${B}:`}else if(G=`${G}:`,U)G+=PP.lineComment(G,O.indent,H(U));let Q,w,C;if(n0.isNode(P))Q=!!P.spaceBefore,w=P.commentBefore,C=P.comment;else if(Q=!1,w=null,C=null,P&&typeof P==="object")P=L.createNode(P);if(O.implicitKey=!1,!J&&!U&&n0.isScalar(P))O.indentAtStart=G.length+1;if(E=!1,!Y&&Z.length>=2&&!O.inFlow&&!J&&n0.isSeq(P)&&!P.flow&&!P.tag&&!P.anchor)O.indent=O.indent.substring(2);let j=!1,b=XJ.stringify(P,O,()=>j=!0,()=>E=!0),_=" ";if(U||Q||w){if(_=Q?"\n":"",w){let m=H(w);_+=`\n${PP.indentComment(m,O.indent)}`}if(b===""&&!O.inFlow){if(_==="\n")_="\n\n"}else _+=`\n${O.indent}`}else if(!J&&n0.isCollection(P)){let m=b[0],K=b.indexOf("\n"),z=K!==-1,k=O.inFlow??P.flow??P.items.length===0;if(z||!k){let SD=!1;if(z&&(m==="&"||m==="!")){let WD=b.indexOf(" ");if(m==="&"&&WD!==-1&&WD{function tN(D,...P){if(D==="debug")console.log(...P)}function oN(D,P){if(D==="debug"||D==="warn")if(typeof process!=="undefined"&&process.emitWarning)process.emitWarning(P);else console.warn(P)}eN.debug=tN;eN.warn=oN});var z3=S((Wk)=>{var OP=i(),AJ=ID(),A3="<<",G3={identify:(D)=>D===A3||typeof D==="symbol"&&D.description===A3,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new AJ.Scalar(Symbol(A3)),{addToJSMap:GJ}),stringify:()=>A3},Ok=(D,P)=>(G3.identify(P)||OP.isScalar(P)&&(!P.type||P.type===AJ.Scalar.PLAIN)&&G3.identify(P.value))&&D?.doc.schema.tags.some((O)=>O.tag===G3.tag&&O.default);function GJ(D,P,O){if(O=D&&OP.isAlias(O)?O.resolve(D.doc):O,OP.isSeq(O))for(let W of O.items)gF(D,P,W);else if(Array.isArray(O))for(let W of O)gF(D,P,W);else gF(D,P,O)}function gF(D,P,O){let W=D&&OP.isAlias(O)?O.resolve(D.doc):O;if(!OP.isMap(W))throw new Error("Merge sources must be maps or map aliases");let F=W.toJSON(null,D,Map);for(let[R,L]of F)if(P instanceof Map){if(!P.has(R))P.set(R,L)}else if(P instanceof Set)P.add(R);else if(!Object.prototype.hasOwnProperty.call(P,R))Object.defineProperty(P,R,{value:L,writable:!0,enumerable:!0,configurable:!0});return P}Wk.addMergeToJSMap=GJ;Wk.isMergeKey=Ok;Wk.merge=G3});var yF=S((Yk)=>{var Bk=hF(),zJ=z3(),Zk=DP(),IJ=i(),vF=S2();function Hk(D,P,{key:O,value:W}){if(IJ.isNode(O)&&O.addToJSMap)O.addToJSMap(D,P,W);else if(zJ.isMergeKey(D,O))zJ.addMergeToJSMap(D,P,W);else{let F=vF.toJS(O,"",D);if(P instanceof Map)P.set(F,vF.toJS(W,F,D));else if(P instanceof Set)P.add(F);else{let R=qk(O,F,D),L=vF.toJS(W,R,D);if(R in P)Object.defineProperty(P,R,{value:L,writable:!0,enumerable:!0,configurable:!0});else P[R]=L}}return P}function qk(D,P,O){if(P===null)return"";if(typeof P!=="object")return String(P);if(IJ.isNode(D)&&O?.doc){let W=Zk.createStringifyContext(O.doc,{});W.anchors=new Set;for(let R of O.anchors.keys())W.anchors.add(R.anchor);W.inFlow=!0,W.inStringifyKey=!0;let F=D.toString(W);if(!O.mapKeyWarned){let R=JSON.stringify(F);if(R.length>40)R=R.substring(0,36)+'..."';Bk.warn(O.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${R}. Set mapAsMap: true to use object keys.`),O.mapKeyWarned=!0}return F}return JSON.stringify(P)}Yk.addPairToJSMap=Hk});var A2=S((Ek)=>{var QJ=i1(),Jk=EJ(),Sk=yF(),I3=i();function Xk(D,P,O){let W=QJ.createNode(D,void 0,O),F=QJ.createNode(P,void 0,O);return new Q3(W,F)}class Q3{constructor(D,P=null){Object.defineProperty(this,I3.NODE_TYPE,{value:I3.PAIR}),this.key=D,this.value=P}clone(D){let{key:P,value:O}=this;if(I3.isNode(P))P=P.clone(D);if(I3.isNode(O))O=O.clone(D);return new Q3(P,O)}toJSON(D,P){let O=P?.mapAsMap?new Map:{};return Sk.addPairToJSMap(P,O,this)}toString(D,P,O){return D?.doc?Jk.stringifyPair(this,D,P,O):JSON.stringify(this)}}Ek.Pair=Q3;Ek.createPair=Xk});var mF=S((Ck)=>{var n2=i(),CJ=DP(),C3=t1();function zk(D,P,O){return(P.inFlow??D.flow?Qk:Ik)(D,P,O)}function Ik({comment:D,items:P},O,{blockItemPrefix:W,flowChars:F,itemIndent:R,onChompKeep:L,onComment:B}){let{indent:Z,options:{commentString:H}}=O,Y=Object.assign({},O,{indent:R,type:null}),q=!1,U=[];for(let A=0;AG=null,()=>q=!0);if(G)Q+=C3.lineComment(Q,R,H(G));if(q&&G)q=!1;U.push(W+Q)}let J;if(U.length===0)J=F.start+F.end;else{J=U[0];for(let A=1;AG=null);if(AY||Q.includes("\n")))H=!0;q.push(Q),Y=q.length}let{start:U,end:J}=O;if(q.length===0)return U+J;else{if(!H){let A=q.reduce((E,G)=>E+G.length+2,2);H=P.options.lineWidth>0&&A>P.options.lineWidth}if(H){let A=U;for(let E of q)A+=E?`\n${R}${F}${E}`:"\n";return`${A}\n${F}${J}`}else return`${U}${L}${q.join(" ")}${L}${J}`}}function $3({indent:D,options:{commentString:P}},O,W,F){if(W&&F)W=W.replace(/^\n+/,"");if(W){let R=C3.indentComment(P(W),D);O.push(R.trimStart())}}Ck.stringifyCollection=zk});var z2=S((Vk)=>{var Mk=mF(),wk=yF(),bk=J3(),G2=i(),M3=A2(),Kk=ID();function WP(D,P){let O=G2.isScalar(P)?P.value:P;for(let W of D)if(G2.isPair(W)){if(W.key===P||W.key===O)return W;if(G2.isScalar(W.key)&&W.key.value===O)return W}return}class $J extends bk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(D){super(G2.MAP,D);this.items=[]}static from(D,P,O){let{keepUndefined:W,replacer:F}=O,R=new this(D),L=(B,Z)=>{if(typeof F==="function")Z=F.call(P,B,Z);else if(Array.isArray(F)&&!F.includes(B))return;if(Z!==void 0||W)R.items.push(M3.createPair(B,Z,O))};if(P instanceof Map)for(let[B,Z]of P)L(B,Z);else if(P&&typeof P==="object")for(let B of Object.keys(P))L(B,P[B]);if(typeof D.sortMapEntries==="function")R.items.sort(D.sortMapEntries);return R}add(D,P){let O;if(G2.isPair(D))O=D;else if(!D||typeof D!=="object"||!("key"in D))O=new M3.Pair(D,D?.value);else O=new M3.Pair(D.key,D.value);let W=WP(this.items,O.key),F=this.schema?.sortMapEntries;if(W){if(!P)throw new Error(`Key ${O.key} already set`);if(G2.isScalar(W.value)&&Kk.isScalarValue(O.value))W.value.value=O.value;else W.value=O.value}else if(F){let R=this.items.findIndex((L)=>F(O,L)<0);if(R===-1)this.items.push(O);else this.items.splice(R,0,O)}else this.items.push(O)}delete(D){let P=WP(this.items,D);if(!P)return!1;return this.items.splice(this.items.indexOf(P),1).length>0}get(D,P){let W=WP(this.items,D)?.value;return(!P&&G2.isScalar(W)?W.value:W)??void 0}has(D){return!!WP(this.items,D)}set(D,P){this.add(new M3.Pair(D,P),!0)}toJSON(D,P,O){let W=O?new O:P?.mapAsMap?new Map:{};if(P?.onCreate)P.onCreate(W);for(let F of this.items)wk.addPairToJSMap(P,W,F);return W}toString(D,P,O){if(!D)return JSON.stringify(this);for(let W of this.items)if(!G2.isPair(W))throw new Error(`Map items must all be pairs; found ${JSON.stringify(W)} instead`);if(!D.allNullValues&&this.hasAllNullValues(!1))D=Object.assign({},D,{allNullValues:!0});return Mk.stringifyCollection(this,D,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:D.indent||"",onChompKeep:O,onComment:P})}}Vk.YAMLMap=$J;Vk.findPair=WP});var g8=S((Nk)=>{var uk=i(),MJ=z2(),Tk={collection:"map",default:!0,nodeClass:MJ.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(D,P){if(!uk.isMap(D))P("Expected a mapping for this tag");return D},createNode:(D,P,O)=>MJ.YAMLMap.from(D,P,O)};Nk.map=Tk});var I2=S((yk)=>{var fk=i1(),xk=mF(),hk=J3(),b3=i(),gk=ID(),vk=S2();class wJ extends hk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(D){super(b3.SEQ,D);this.items=[]}add(D){this.items.push(D)}delete(D){let P=w3(D);if(typeof P!=="number")return!1;return this.items.splice(P,1).length>0}get(D,P){let O=w3(D);if(typeof O!=="number")return;let W=this.items[O];return!P&&b3.isScalar(W)?W.value:W}has(D){let P=w3(D);return typeof P==="number"&&P=0?P:null}yk.YAMLSeq=wJ});var v8=S((pk)=>{var lk=i(),bJ=I2(),ck={collection:"seq",default:!0,nodeClass:bJ.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(D,P){if(!lk.isSeq(D))P("Expected a sequence for this tag");return D},createNode:(D,P,O)=>bJ.YAMLSeq.from(D,P,O)};pk.seq=ck});var FP=S((sk)=>{var rk=e1(),ak={identify:(D)=>typeof D==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(D)=>D,stringify(D,P,O,W){return P=Object.assign({actualString:!0},P),rk.stringifyString(D,P,O,W)}};sk.string=ak});var K3=S((ik)=>{var KJ=ID(),VJ={identify:(D)=>D==null,createNode:()=>new KJ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new KJ.Scalar(null),stringify:({source:D},P)=>typeof D==="string"&&VJ.test.test(D)?D:P.options.nullStr};ik.nullTag=VJ});var lF=S((ek)=>{var ok=ID(),jJ={identify:(D)=>typeof D==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(D)=>new ok.Scalar(D[0]==="t"||D[0]==="T"),stringify({source:D,value:P},O){if(D&&jJ.test.test(D)){let W=D[0]==="t"||D[0]==="T";if(P===W)return D}return P?O.options.trueStr:O.options.falseStr}};ek.boolTag=jJ});var y8=S((Of)=>{function Pf({format:D,minFractionDigits:P,tag:O,value:W}){if(typeof W==="bigint")return String(W);let F=typeof W==="number"?W:Number(W);if(!isFinite(F))return isNaN(F)?".nan":F<0?"-.inf":".inf";let R=JSON.stringify(W);if(!D&&P&&(!O||O==="tag:yaml.org,2002:float")&&/^\d/.test(R)){let L=R.indexOf(".");if(L<0)L=R.length,R+=".";let B=P-(R.length-L-1);while(B-- >0)R+="0"}return R}Of.stringifyNumber=Pf});var pF=S((Zf)=>{var Ff=ID(),cF=y8(),Rf={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(D)=>D.slice(-3).toLowerCase()==="nan"?NaN:D[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:cF.stringifyNumber},Lf={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(D)=>parseFloat(D),stringify(D){let P=Number(D.value);return isFinite(P)?P.toExponential():cF.stringifyNumber(D)}},Bf={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(D){let P=new Ff.Scalar(parseFloat(D)),O=D.indexOf(".");if(O!==-1&&D[D.length-1]==="0")P.minFractionDigits=D.length-O-1;return P},stringify:cF.stringifyNumber};Zf.float=Bf;Zf.floatExp=Lf;Zf.floatNaN=Rf});var rF=S((Xf)=>{var _J=y8(),V3=(D)=>typeof D==="bigint"||Number.isInteger(D),dF=(D,P,O,{intAsBigInt:W})=>W?BigInt(D):parseInt(D.substring(P),O);function uJ(D,P,O){let{value:W}=D;if(V3(W)&&W>=0)return O+W.toString(P);return _J.stringifyNumber(D)}var Uf={identify:(D)=>V3(D)&&D>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(D,P,O)=>dF(D,2,8,O),stringify:(D)=>uJ(D,8,"0o")},Jf={identify:V3,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(D,P,O)=>dF(D,0,10,O),stringify:_J.stringifyNumber},Sf={identify:(D)=>V3(D)&&D>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(D,P,O)=>dF(D,2,16,O),stringify:(D)=>uJ(D,16,"0x")};Xf.int=Jf;Xf.intHex=Sf;Xf.intOct=Uf});var TJ=S((wf)=>{var zf=g8(),If=K3(),Qf=v8(),Cf=FP(),$f=lF(),aF=pF(),sF=rF(),Mf=[zf.map,Qf.seq,Cf.string,If.nullTag,$f.boolTag,sF.intOct,sF.int,sF.intHex,aF.floatNaN,aF.floatExp,aF.float];wf.schema=Mf});var kJ=S((Nf)=>{var Kf=ID(),Vf=g8(),jf=v8();function NJ(D){return typeof D==="bigint"||Number.isInteger(D)}var j3=({value:D})=>JSON.stringify(D),_f=[{identify:(D)=>typeof D==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(D)=>D,stringify:j3},{identify:(D)=>D==null,createNode:()=>new Kf.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:j3},{identify:(D)=>typeof D==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:(D)=>D==="true",stringify:j3},{identify:NJ,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(D,P,{intAsBigInt:O})=>O?BigInt(D):parseInt(D,10),stringify:({value:D})=>NJ(D)?D.toString():JSON.stringify(D)},{identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(D)=>parseFloat(D),stringify:j3}],uf={default:!0,tag:"",test:/^/,resolve(D,P){return P(`Unresolved plain scalar ${JSON.stringify(D)}`),D}},Tf=[Vf.map,jf.seq].concat(_f,uf);Nf.schema=Tf});var iF=S((hf)=>{var nF=ID(),ff=e1(),xf={identify:(D)=>D instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(D,P){if(typeof Buffer==="function")return Buffer.from(D,"base64");else if(typeof atob==="function"){let O=atob(D.replace(/[\n\r]/g,"")),W=new Uint8Array(O.length);for(let F=0;F{var _3=i(),tF=A2(),vf=ID(),yf=I2();function fJ(D,P){if(_3.isSeq(D))for(let O=0;O1)P("Each pair must have its own sequence indicator");let F=W.items[0]||new tF.Pair(new vf.Scalar(null));if(W.commentBefore)F.key.commentBefore=F.key.commentBefore?`${W.commentBefore}\n${F.key.commentBefore}`:W.commentBefore;if(W.comment){let R=F.value??F.key;R.comment=R.comment?`${W.comment}\n${R.comment}`:W.comment}W=F}D.items[O]=_3.isPair(W)?W:new tF.Pair(W)}else P("Expected a sequence for this tag");return D}function xJ(D,P,O){let{replacer:W}=O,F=new yf.YAMLSeq(D);F.tag="tag:yaml.org,2002:pairs";let R=0;if(P&&Symbol.iterator in Object(P))for(let L of P){if(typeof W==="function")L=W.call(P,String(R++),L);let B,Z;if(Array.isArray(L))if(L.length===2)B=L[0],Z=L[1];else throw new TypeError(`Expected [key, value] tuple: ${L}`);else if(L&&L instanceof Object){let H=Object.keys(L);if(H.length===1)B=H[0],Z=L[B];else throw new TypeError(`Expected tuple with one key, not ${H.length} keys`)}else B=L;F.items.push(tF.createPair(B,Z,O))}return F}var mf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:fJ,createNode:xJ};lf.createPairs=xJ;lf.pairs=mf;lf.resolvePairs=fJ});var eF=S((sf)=>{var hJ=i(),oF=S2(),RP=z2(),rf=I2(),gJ=u3();class i2 extends rf.YAMLSeq{constructor(){super();this.add=RP.YAMLMap.prototype.add.bind(this),this.delete=RP.YAMLMap.prototype.delete.bind(this),this.get=RP.YAMLMap.prototype.get.bind(this),this.has=RP.YAMLMap.prototype.has.bind(this),this.set=RP.YAMLMap.prototype.set.bind(this),this.tag=i2.tag}toJSON(D,P){if(!P)return super.toJSON(D);let O=new Map;if(P?.onCreate)P.onCreate(O);for(let W of this.items){let F,R;if(hJ.isPair(W))F=oF.toJS(W.key,"",P),R=oF.toJS(W.value,F,P);else F=oF.toJS(W,"",P);if(O.has(F))throw new Error("Ordered maps must not include duplicate keys");O.set(F,R)}return O}static from(D,P,O){let W=gJ.createPairs(D,P,O),F=new this;return F.items=W.items,F}}i2.tag="tag:yaml.org,2002:omap";var af={collection:"seq",identify:(D)=>D instanceof Map,nodeClass:i2,default:!1,tag:"tag:yaml.org,2002:omap",resolve(D,P){let O=gJ.resolvePairs(D,P),W=[];for(let{key:F}of O.items)if(hJ.isScalar(F))if(W.includes(F.value))P(`Ordered maps must not include duplicate keys: ${F.value}`);else W.push(F.value);return Object.assign(new i2,O)},createNode:(D,P,O)=>i2.from(D,P,O)};sf.YAMLOMap=i2;sf.omap=af});var cJ=S((of)=>{var vJ=ID();function yJ({value:D,source:P},O){if(P&&(D?mJ:lJ).test.test(P))return P;return D?O.options.trueStr:O.options.falseStr}var mJ={identify:(D)=>D===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new vJ.Scalar(!0),stringify:yJ},lJ={identify:(D)=>D===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new vJ.Scalar(!1),stringify:yJ};of.falseTag=lJ;of.trueTag=mJ});var pJ=S((Rx)=>{var Px=ID(),D4=y8(),Ox={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(D)=>D.slice(-3).toLowerCase()==="nan"?NaN:D[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:D4.stringifyNumber},Wx={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(D)=>parseFloat(D.replace(/_/g,"")),stringify(D){let P=Number(D.value);return isFinite(P)?P.toExponential():D4.stringifyNumber(D)}},Fx={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(D){let P=new Px.Scalar(parseFloat(D.replace(/_/g,""))),O=D.indexOf(".");if(O!==-1){let W=D.substring(O+1).replace(/_/g,"");if(W[W.length-1]==="0")P.minFractionDigits=W.length}return P},stringify:D4.stringifyNumber};Rx.float=Fx;Rx.floatExp=Wx;Rx.floatNaN=Ox});var rJ=S((Jx)=>{var dJ=y8(),LP=(D)=>typeof D==="bigint"||Number.isInteger(D);function T3(D,P,O,{intAsBigInt:W}){let F=D[0];if(F==="-"||F==="+")P+=1;if(D=D.substring(P).replace(/_/g,""),W){switch(O){case 2:D=`0b${D}`;break;case 8:D=`0o${D}`;break;case 16:D=`0x${D}`;break}let L=BigInt(D);return F==="-"?BigInt(-1)*L:L}let R=parseInt(D,O);return F==="-"?-1*R:R}function P4(D,P,O){let{value:W}=D;if(LP(W)){let F=W.toString(P);return W<0?"-"+O+F.substr(1):O+F}return dJ.stringifyNumber(D)}var Hx={identify:LP,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(D,P,O)=>T3(D,2,2,O),stringify:(D)=>P4(D,2,"0b")},qx={identify:LP,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(D,P,O)=>T3(D,1,8,O),stringify:(D)=>P4(D,8,"0")},Yx={identify:LP,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(D,P,O)=>T3(D,0,10,O),stringify:dJ.stringifyNumber},Ux={identify:LP,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(D,P,O)=>T3(D,2,16,O),stringify:(D)=>P4(D,16,"0x")};Jx.int=Yx;Jx.intBin=Hx;Jx.intHex=Ux;Jx.intOct=qx});var O4=S((zx)=>{var f3=i(),N3=A2(),k3=z2();class t2 extends k3.YAMLMap{constructor(D){super(D);this.tag=t2.tag}add(D){let P;if(f3.isPair(D))P=D;else if(D&&typeof D==="object"&&"key"in D&&"value"in D&&D.value===null)P=new N3.Pair(D.key,null);else P=new N3.Pair(D,null);if(!k3.findPair(this.items,P.key))this.items.push(P)}get(D,P){let O=k3.findPair(this.items,D);return!P&&f3.isPair(O)?f3.isScalar(O.key)?O.key.value:O.key:O}set(D,P){if(typeof P!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof P}`);let O=k3.findPair(this.items,D);if(O&&!P)this.items.splice(this.items.indexOf(O),1);else if(!O&&P)this.items.push(new N3.Pair(D))}toJSON(D,P){return super.toJSON(D,P,Set)}toString(D,P,O){if(!D)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},D,{allNullValues:!0}),P,O);else throw new Error("Set items must all have null values")}static from(D,P,O){let{replacer:W}=O,F=new this(D);if(P&&Symbol.iterator in Object(P))for(let R of P){if(typeof W==="function")R=W.call(P,R,R);F.items.push(N3.createPair(R,null,O))}return F}}t2.tag="tag:yaml.org,2002:set";var Gx={collection:"map",identify:(D)=>D instanceof Set,nodeClass:t2,default:!1,tag:"tag:yaml.org,2002:set",createNode:(D,P,O)=>t2.from(D,P,O),resolve(D,P){if(f3.isMap(D))if(D.hasAllNullValues(!0))return Object.assign(new t2,D);else P("Set items must all have null values");else P("Expected a mapping for this tag");return D}};zx.YAMLSet=t2;zx.set=Gx});var F4=S((wx)=>{var Cx=y8();function W4(D,P){let O=D[0],W=O==="-"||O==="+"?D.substring(1):D,F=(L)=>P?BigInt(L):Number(L),R=W.replace(/_/g,"").split(":").reduce((L,B)=>L*F(60)+F(B),F(0));return O==="-"?F(-1)*R:R}function aJ(D){let{value:P}=D,O=(L)=>L;if(typeof P==="bigint")O=(L)=>BigInt(L);else if(isNaN(P)||!isFinite(P))return Cx.stringifyNumber(D);let W="";if(P<0)W="-",P*=O(-1);let F=O(60),R=[P%F];if(P<60)R.unshift(0);else if(P=(P-R[0])/F,R.unshift(P%F),P>=60)P=(P-R[0])/F,R.unshift(P);return W+R.map((L)=>String(L).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var $x={identify:(D)=>typeof D==="bigint"||Number.isInteger(D),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(D,P,{intAsBigInt:O})=>W4(D,O),stringify:aJ},Mx={identify:(D)=>typeof D==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(D)=>W4(D,!1),stringify:aJ},sJ={identify:(D)=>D instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(D){let P=D.match(sJ.test);if(!P)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,O,W,F,R,L,B]=P.map(Number),Z=P[7]?Number((P[7]+"00").substr(1,3)):0,H=Date.UTC(O,W-1,F,R||0,L||0,B||0,Z),Y=P[8];if(Y&&Y!=="Z"){let q=W4(Y,!1);if(Math.abs(q)<30)q*=60;H-=60000*q}return new Date(H)},stringify:({value:D})=>D.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};wx.floatTime=Mx;wx.intTime=$x;wx.timestamp=sJ});var iJ=S((vx)=>{var jx=g8(),_x=K3(),ux=v8(),Tx=FP(),Nx=iF(),nJ=cJ(),R4=pJ(),x3=rJ(),kx=z3(),fx=eF(),xx=u3(),hx=O4(),L4=F4(),gx=[jx.map,ux.seq,Tx.string,_x.nullTag,nJ.trueTag,nJ.falseTag,x3.intBin,x3.intOct,x3.int,x3.intHex,R4.floatNaN,R4.floatExp,R4.float,Nx.binary,kx.merge,fx.omap,xx.pairs,hx.set,L4.intTime,L4.floatTime,L4.timestamp];vx.schema=gx});var LS=S((sx)=>{var DS=g8(),mx=K3(),PS=v8(),lx=FP(),cx=lF(),B4=pF(),Z4=rF(),px=TJ(),dx=kJ(),OS=iF(),BP=z3(),WS=eF(),FS=u3(),tJ=iJ(),RS=O4(),h3=F4(),oJ=new Map([["core",px.schema],["failsafe",[DS.map,PS.seq,lx.string]],["json",dx.schema],["yaml11",tJ.schema],["yaml-1.1",tJ.schema]]),eJ={binary:OS.binary,bool:cx.boolTag,float:B4.float,floatExp:B4.floatExp,floatNaN:B4.floatNaN,floatTime:h3.floatTime,int:Z4.int,intHex:Z4.intHex,intOct:Z4.intOct,intTime:h3.intTime,map:DS.map,merge:BP.merge,null:mx.nullTag,omap:WS.omap,pairs:FS.pairs,seq:PS.seq,set:RS.set,timestamp:h3.timestamp},rx={"tag:yaml.org,2002:binary":OS.binary,"tag:yaml.org,2002:merge":BP.merge,"tag:yaml.org,2002:omap":WS.omap,"tag:yaml.org,2002:pairs":FS.pairs,"tag:yaml.org,2002:set":RS.set,"tag:yaml.org,2002:timestamp":h3.timestamp};function ax(D,P,O){let W=oJ.get(P);if(W&&!D)return O&&!W.includes(BP.merge)?W.concat(BP.merge):W.slice();let F=W;if(!F)if(Array.isArray(D))F=[];else{let R=Array.from(oJ.keys()).filter((L)=>L!=="yaml11").map((L)=>JSON.stringify(L)).join(", ");throw new Error(`Unknown schema "${P}"; use one of ${R} or define customTags array`)}if(Array.isArray(D))for(let R of D)F=F.concat(R);else if(typeof D==="function")F=D(F.slice());if(O)F=F.concat(BP.merge);return F.reduce((R,L)=>{let B=typeof L==="string"?eJ[L]:L;if(!B){let Z=JSON.stringify(L),H=Object.keys(eJ).map((Y)=>JSON.stringify(Y)).join(", ");throw new Error(`Unknown custom tag ${Z}; use one of ${H}`)}if(!R.includes(B))R.push(B);return R},[])}sx.coreKnownTags=rx;sx.getTags=ax});var Y4=S((Ph)=>{var H4=i(),tx=g8(),ox=v8(),ex=FP(),g3=LS(),Dh=(D,P)=>D.keyP.key?1:0;class q4{constructor({compat:D,customTags:P,merge:O,resolveKnownTags:W,schema:F,sortMapEntries:R,toStringDefaults:L}){this.compat=Array.isArray(D)?g3.getTags(D,"compat"):D?g3.getTags(null,D):null,this.name=typeof F==="string"&&F||"core",this.knownTags=W?g3.coreKnownTags:{},this.tags=g3.getTags(P,this.name,O),this.toStringOptions=L??null,Object.defineProperty(this,H4.MAP,{value:tx.map}),Object.defineProperty(this,H4.SCALAR,{value:ex.string}),Object.defineProperty(this,H4.SEQ,{value:ox.seq}),this.sortMapEntries=typeof R==="function"?R:R===!0?Dh:null}clone(){let D=Object.create(q4.prototype,Object.getOwnPropertyDescriptors(this));return D.tags=this.tags.slice(),D}}Ph.Schema=q4});var BS=S((Rh)=>{var Wh=i(),U4=DP(),ZP=t1();function Fh(D,P){let O=[],W=P.directives===!0;if(P.directives!==!1&&D.directives){let Z=D.directives.toString(D);if(Z)O.push(Z),W=!0;else if(D.directives.docStart)W=!0}if(W)O.push("---");let F=U4.createStringifyContext(D,P),{commentString:R}=F.options;if(D.commentBefore){if(O.length!==1)O.unshift("");let Z=R(D.commentBefore);O.unshift(ZP.indentComment(Z,""))}let L=!1,B=null;if(D.contents){if(Wh.isNode(D.contents)){if(D.contents.spaceBefore&&W)O.push("");if(D.contents.commentBefore){let Y=R(D.contents.commentBefore);O.push(ZP.indentComment(Y,""))}F.forceBlockIndent=!!D.comment,B=D.contents.comment}let Z=B?void 0:()=>L=!0,H=U4.stringify(D.contents,F,()=>B=null,Z);if(B)H+=ZP.lineComment(H,"",R(B));if((H[0]==="|"||H[0]===">")&&O[O.length-1]==="---")O[O.length-1]=`--- ${H}`;else O.push(H)}else O.push(U4.stringify(D.contents,F));if(D.directives?.docEnd)if(D.comment){let Z=R(D.comment);if(Z.includes("\n"))O.push("..."),O.push(ZP.indentComment(Z,""));else O.push(`... ${Z}`)}else O.push("...");else{let Z=D.comment;if(Z&&L)Z=Z.replace(/^\n+/,"");if(Z){if((!L||B)&&O[O.length-1]!=="")O.push("");O.push(ZP.indentComment(R(Z),""))}}return O.join("\n")+"\n"}Rh.stringifyDocument=Fh});var HP=S((Sh)=>{var Bh=n1(),m8=J3(),Z0=i(),Zh=A2(),Hh=S2(),qh=Y4(),Yh=BS(),J4=H3(),Uh=TF(),Jh=i1(),S4=uF();class X4{constructor(D,P,O){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Z0.NODE_TYPE,{value:Z0.DOC});let W=null;if(typeof P==="function"||Array.isArray(P))W=P;else if(O===void 0&&P)O=P,P=void 0;let F=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},O);this.options=F;let{version:R}=F;if(O?._directives){if(this.directives=O._directives.atDocument(),this.directives.yaml.explicit)R=this.directives.yaml.version}else this.directives=new S4.Directives({version:R});this.setSchema(R,O),this.contents=D===void 0?null:this.createNode(D,W,O)}clone(){let D=Object.create(X4.prototype,{[Z0.NODE_TYPE]:{value:Z0.DOC}});if(D.commentBefore=this.commentBefore,D.comment=this.comment,D.errors=this.errors.slice(),D.warnings=this.warnings.slice(),D.options=Object.assign({},this.options),this.directives)D.directives=this.directives.clone();if(D.schema=this.schema.clone(),D.contents=Z0.isNode(this.contents)?this.contents.clone(D.schema):this.contents,this.range)D.range=this.range.slice();return D}add(D){if(l8(this.contents))this.contents.add(D)}addIn(D,P){if(l8(this.contents))this.contents.addIn(D,P)}createAlias(D,P){if(!D.anchor){let O=J4.anchorNames(this);D.anchor=!P||O.has(P)?J4.findNewAnchor(P||"a",O):P}return new Bh.Alias(D.anchor)}createNode(D,P,O){let W=void 0;if(typeof P==="function")D=P.call({"":D},"",D),W=P;else if(Array.isArray(P)){let E=(Q)=>typeof Q==="number"||Q instanceof String||Q instanceof Number,G=P.filter(E).map(String);if(G.length>0)P=P.concat(G);W=P}else if(O===void 0&&P)O=P,P=void 0;let{aliasDuplicateObjects:F,anchorPrefix:R,flow:L,keepUndefined:B,onTagObj:Z,tag:H}=O??{},{onAnchor:Y,setAnchors:q,sourceObjects:U}=J4.createNodeAnchors(this,R||"a"),J={aliasDuplicateObjects:F??!0,keepUndefined:B??!1,onAnchor:Y,onTagObj:Z,replacer:W,schema:this.schema,sourceObjects:U},A=Jh.createNode(D,H,J);if(L&&Z0.isCollection(A))A.flow=!0;return q(),A}createPair(D,P,O={}){let W=this.createNode(D,null,O),F=this.createNode(P,null,O);return new Zh.Pair(W,F)}delete(D){return l8(this.contents)?this.contents.delete(D):!1}deleteIn(D){if(m8.isEmptyPath(D)){if(this.contents==null)return!1;return this.contents=null,!0}return l8(this.contents)?this.contents.deleteIn(D):!1}get(D,P){return Z0.isCollection(this.contents)?this.contents.get(D,P):void 0}getIn(D,P){if(m8.isEmptyPath(D))return!P&&Z0.isScalar(this.contents)?this.contents.value:this.contents;return Z0.isCollection(this.contents)?this.contents.getIn(D,P):void 0}has(D){return Z0.isCollection(this.contents)?this.contents.has(D):!1}hasIn(D){if(m8.isEmptyPath(D))return this.contents!==void 0;return Z0.isCollection(this.contents)?this.contents.hasIn(D):!1}set(D,P){if(this.contents==null)this.contents=m8.collectionFromPath(this.schema,[D],P);else if(l8(this.contents))this.contents.set(D,P)}setIn(D,P){if(m8.isEmptyPath(D))this.contents=P;else if(this.contents==null)this.contents=m8.collectionFromPath(this.schema,Array.from(D),P);else if(l8(this.contents))this.contents.setIn(D,P)}setSchema(D,P={}){if(typeof D==="number")D=String(D);let O;switch(D){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new S4.Directives({version:"1.1"});O={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=D;else this.directives=new S4.Directives({version:D});O={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;O=null;break;default:{let W=JSON.stringify(D);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${W}`)}}if(P.schema instanceof Object)this.schema=P.schema;else if(O)this.schema=new qh.Schema(Object.assign(O,P));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:D,jsonArg:P,mapAsMap:O,maxAliasCount:W,onAnchor:F,reviver:R}={}){let L={anchors:new Map,doc:this,keep:!D,mapAsMap:O===!0,mapKeyWarned:!1,maxAliasCount:typeof W==="number"?W:100},B=Hh.toJS(this.contents,P??"",L);if(typeof F==="function")for(let{count:Z,res:H}of L.anchors.values())F(H,Z);return typeof R==="function"?Uh.applyReviver(R,{"":B},"",B):B}toJSON(D,P){return this.toJS({json:!0,jsonArg:D,mapAsMap:!1,onAnchor:P})}toString(D={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in D&&(!Number.isInteger(D.indent)||Number(D.indent)<=0)){let P=JSON.stringify(D.indent);throw new Error(`"indent" option must be a positive integer, not ${P}`)}return Yh.stringifyDocument(this,D)}}function l8(D){if(Z0.isCollection(D))return!0;throw new Error("Expected a YAML collection as document contents")}Sh.Document=X4});var qP=S((Ah)=>{class v3 extends Error{constructor(D,P,O,W){super();this.name=D,this.code=O,this.message=W,this.pos=P}}class ZS extends v3{constructor(D,P,O){super("YAMLParseError",D,P,O)}}class HS extends v3{constructor(D,P,O){super("YAMLWarning",D,P,O)}}var Eh=(D,P)=>(O)=>{if(O.pos[0]===-1)return;O.linePos=O.pos.map((B)=>P.linePos(B));let{line:W,col:F}=O.linePos[0];O.message+=` at line ${W}, column ${F}`;let R=F-1,L=D.substring(P.lineStarts[W-1],P.lineStarts[W]).replace(/[\n\r]+$/,"");if(R>=60&&L.length>80){let B=Math.min(R-39,L.length-79);L="\u2026"+L.substring(B),R-=B-1}if(L.length>80)L=L.substring(0,79)+"\u2026";if(W>1&&/^ *$/.test(L.substring(0,R))){let B=D.substring(P.lineStarts[W-2],P.lineStarts[W-1]);if(B.length>80)B=B.substring(0,79)+`\u2026 `;L=B+L}if(/[^ ]/.test(L)){let B=1,Z=O.linePos[1];if(Z&&Z.line===W&&Z.col>F)B=Math.max(1,Math.min(Z.col-F,80-R));let H=" ".repeat(R)+"^".repeat(B);O.message+=`:\n\n${L}\n${H}\n`}};Ah.YAMLError=v3;Ah.YAMLParseError=ZS;Ah.YAMLWarning=HS;Ah.prettifyError=Eh});var YP=S(($h)=>{function Ch(D,{flow:P,indicator:O,next:W,offset:F,onError:R,parentIndent:L,startOnNewline:B}){let Z=!1,H=B,Y=B,q="",U="",J=!1,A=!1,E=null,G=null,Q=null,w=null,C=null,j=null,b=null;for(let K of D){if(A){if(K.type!=="space"&&K.type!=="newline"&&K.type!=="comma")R(K.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");A=!1}if(E){if(H&&K.type!=="comment"&&K.type!=="newline")R(E,"TAB_AS_INDENT","Tabs are not allowed as indentation");E=null}switch(K.type){case"space":if(!P&&(O!=="doc-start"||W?.type!=="flow-collection")&&K.source.includes("\t"))E=K;Y=!0;break;case"comment":{if(!Y)R(K,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let z=K.source.substring(1)||" ";if(!q)q=z;else q+=U+z;U="",H=!1;break}case"newline":if(H)if(q)q+=K.source;else Z=!0;else U+=K.source;if(H=!0,J=!0,G||Q)w=K;Y=!0;break;case"anchor":if(G)R(K,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(K.source.endsWith(":"))R(K.offset+K.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);if(G=K,b===null)b=K.offset;H=!1,Y=!1,A=!0;break;case"tag":{if(Q)R(K,"MULTIPLE_TAGS","A node can have at most one tag");if(Q=K,b===null)b=K.offset;H=!1,Y=!1,A=!0;break}case O:if(G||Q)R(K,"BAD_PROP_ORDER",`Anchors and tags must be after the ${K.source} indicator`);if(j)R(K,"UNEXPECTED_TOKEN",`Unexpected ${K.source} in ${P??"collection"}`);j=K,H=O==="seq-item-ind"||O==="explicit-key-ind",Y=!1;break;case"comma":if(P){if(C)R(K,"UNEXPECTED_TOKEN",`Unexpected , in ${P}`);C=K,H=!1,Y=!1;break}default:R(K,"UNEXPECTED_TOKEN",`Unexpected ${K.type} token`),H=!1,Y=!1}}let _=D[D.length-1],m=_?_.offset+_.source.length:F;if(A&&W&&W.type!=="space"&&W.type!=="newline"&&W.type!=="comma"&&(W.type!=="scalar"||W.source!==""))R(W.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(E&&(H&&E.indent<=L||W?.type==="block-map"||W?.type==="block-seq"))R(E,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:C,found:j,spaceBefore:Z,comment:q,hasNewline:J,anchor:G,tag:Q,newlineAfterProp:w,end:m,start:b??m}}$h.resolveProps=Ch});var y3=S((wh)=>{function E4(D){if(!D)return null;switch(D.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(D.source.includes("\n"))return!0;if(D.end){for(let P of D.end)if(P.type==="newline")return!0}return!1;case"flow-collection":for(let P of D.items){for(let O of P.start)if(O.type==="newline")return!0;if(P.sep){for(let O of P.sep)if(O.type==="newline")return!0}if(E4(P.key)||E4(P.value))return!0}return!1;default:return!0}}wh.containsNewline=E4});var A4=S((jh)=>{var Kh=y3();function Vh(D,P,O){if(P?.type==="flow-collection"){let W=P.end[0];if(W.indent===D&&(W.source==="]"||W.source==="}")&&Kh.containsNewline(P))O(W,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}jh.flowIndentCheck=Vh});var G4=S((Th)=>{var qS=i();function uh(D,P,O){let{uniqueKeys:W}=D.options;if(W===!1)return!1;let F=typeof W==="function"?W:(R,L)=>R===L||qS.isScalar(R)&&qS.isScalar(L)&&R.value===L.value;return P.some((R)=>F(R.key,O))}Th.mapIncludes=uh});var XS=S((gh)=>{var YS=A2(),kh=z2(),US=YP(),fh=y3(),JS=A4(),xh=G4(),SS="All mapping items must start at the same column";function hh({composeNode:D,composeEmptyNode:P},O,W,F,R){let B=new(R?.nodeClass??kh.YAMLMap)(O.schema);if(O.atRoot)O.atRoot=!1;let Z=W.offset,H=null;for(let Y of W.items){let{start:q,key:U,sep:J,value:A}=Y,E=US.resolveProps(q,{indicator:"explicit-key-ind",next:U??J?.[0],offset:Z,onError:F,parentIndent:W.indent,startOnNewline:!0}),G=!E.found;if(G){if(U){if(U.type==="block-seq")F(Z,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in U&&U.indent!==W.indent)F(Z,"BAD_INDENT",SS)}if(!E.anchor&&!E.tag&&!J){if(H=E.end,E.comment)if(B.comment)B.comment+="\n"+E.comment;else B.comment=E.comment;continue}if(E.newlineAfterProp||fh.containsNewline(U))F(U??q[q.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(E.found?.indent!==W.indent)F(Z,"BAD_INDENT",SS);O.atKey=!0;let Q=E.end,w=U?D(O,U,E,F):P(O,Q,q,null,E,F);if(O.schema.compat)JS.flowIndentCheck(W.indent,U,F);if(O.atKey=!1,xh.mapIncludes(O,B.items,w))F(Q,"DUPLICATE_KEY","Map keys must be unique");let C=US.resolveProps(J??[],{indicator:"map-value-ind",next:A,offset:w.range[2],onError:F,parentIndent:W.indent,startOnNewline:!U||U.type==="block-scalar"});if(Z=C.end,C.found){if(G){if(A?.type==="block-map"&&!C.hasNewline)F(Z,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(O.options.strict&&E.start{var yh=I2(),mh=YP(),lh=A4();function ch({composeNode:D,composeEmptyNode:P},O,W,F,R){let B=new(R?.nodeClass??yh.YAMLSeq)(O.schema);if(O.atRoot)O.atRoot=!1;if(O.atKey)O.atKey=!1;let Z=W.offset,H=null;for(let{start:Y,value:q}of W.items){let U=mh.resolveProps(Y,{indicator:"seq-item-ind",next:q,offset:Z,onError:F,parentIndent:W.indent,startOnNewline:!0});if(!U.found)if(U.anchor||U.tag||q)if(q&&q.type==="block-seq")F(U.end,"BAD_INDENT","All sequence items must start at the same column");else F(Z,"MISSING_CHAR","Sequence item without - indicator");else{if(H=U.end,U.comment)B.comment=U.comment;continue}let J=q?D(O,q,U,F):P(O,U.end,Y,null,U,F);if(O.schema.compat)lh.flowIndentCheck(W.indent,q,F);Z=J.range[2],B.items.push(J)}return B.range=[W.offset,Z,H??Z],B}ph.resolveBlockSeq=ch});var c8=S((ah)=>{function rh(D,P,O,W){let F="";if(D){let R=!1,L="";for(let B of D){let{source:Z,type:H}=B;switch(H){case"space":R=!0;break;case"comment":{if(O&&!R)W(B,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let Y=Z.substring(1)||" ";if(!F)F=Y;else F+=L+Y;L="";break}case"newline":if(F)L+=Z;R=!0;break;default:W(B,"UNEXPECTED_TOKEN",`Unexpected ${H} at node end`)}P+=Z.length}}return{comment:F,offset:P}}ah.resolveEnd=rh});var zS=S((Og)=>{var nh=i(),ih=A2(),AS=z2(),th=I2(),oh=c8(),GS=YP(),eh=y3(),Dg=G4(),z4="Block collections are not allowed within flow collections",I4=(D)=>D&&(D.type==="block-map"||D.type==="block-seq");function Pg({composeNode:D,composeEmptyNode:P},O,W,F,R){let L=W.start.source==="{",B=L?"flow map":"flow sequence",H=new(R?.nodeClass??(L?AS.YAMLMap:th.YAMLSeq))(O.schema);H.flow=!0;let Y=O.atRoot;if(Y)O.atRoot=!1;if(O.atKey)O.atKey=!1;let q=W.offset+W.start.source.length;for(let G=0;G0){let G=oh.resolveEnd(A,E,O.options.strict,F);if(G.comment)if(H.comment)H.comment+="\n"+G.comment;else H.comment=G.comment;H.range=[W.offset,E,G.offset]}else H.range=[W.offset,E,E];return H}Og.resolveFlowCollection=Pg});var IS=S((Ug)=>{var Fg=i(),Rg=ID(),Lg=z2(),Bg=I2(),Zg=XS(),Hg=ES(),qg=zS();function Q4(D,P,O,W,F,R){let L=O.type==="block-map"?Zg.resolveBlockMap(D,P,O,W,R):O.type==="block-seq"?Hg.resolveBlockSeq(D,P,O,W,R):qg.resolveFlowCollection(D,P,O,W,R),B=L.constructor;if(F==="!"||F===B.tagName)return L.tag=B.tagName,L;if(F)L.tag=F;return L}function Yg(D,P,O,W,F){let R=W.tag,L=!R?null:P.directives.tagName(R.source,(U)=>F(R,"TAG_RESOLVE_FAILED",U));if(O.type==="block-seq"){let{anchor:U,newlineAfterProp:J}=W,A=U&&R?U.offset>R.offset?U:R:U??R;if(A&&(!J||J.offsetU.tag===L&&U.collection===B);if(!Z){let U=P.schema.knownTags[L];if(U&&U.collection===B)P.schema.tags.push(Object.assign({},U,{default:!1})),Z=U;else{if(U?.collection)F(R,"BAD_COLLECTION_TYPE",`${U.tag} used for ${B} collection, but expects ${U.collection}`,!0);else F(R,"TAG_RESOLVE_FAILED",`Unresolved tag: ${L}`,!0);return Q4(D,P,O,F,L)}}let H=Q4(D,P,O,F,L,Z),Y=Z.resolve?.(H,(U)=>F(R,"TAG_RESOLVE_FAILED",U),P.options)??H,q=Fg.isNode(Y)?Y:new Rg.Scalar(Y);if(q.range=H.range,q.tag=L,Z?.format)q.format=Z.format;return q}Ug.composeCollection=Yg});var $4=S((Ag)=>{var C4=ID();function Sg(D,P,O){let W=P.offset,F=Xg(P,D.options.strict,O);if(!F)return{value:"",type:null,comment:"",range:[W,W,W]};let R=F.mode===">"?C4.Scalar.BLOCK_FOLDED:C4.Scalar.BLOCK_LITERAL,L=P.source?Eg(P.source):[],B=L.length;for(let E=L.length-1;E>=0;--E){let G=L[E][1];if(G===""||G==="\r")B=E;else break}if(B===0){let E=F.chomp==="+"&&L.length>0?"\n".repeat(Math.max(1,L.length-1)):"",G=W+F.length;if(P.source)G+=P.source.length;return{value:E,type:R,comment:F.comment,range:[W,G,G]}}let Z=P.indent+F.indent,H=P.offset+F.length,Y=0;for(let E=0;EZ)Z=G.length}else{if(G.length=B;--E)if(L[E][0].length>Z)B=E+1;let q="",U="",J=!1;for(let E=0;EZ||Q[0]==="\t"){if(U===" ")U="\n";else if(!J&&U==="\n")U="\n\n";q+=U+G.slice(Z)+Q,U="\n",J=!0}else if(Q==="")if(U==="\n")q+="\n";else U="\n";else q+=U+Q,U=" ",J=!1}switch(F.chomp){case"-":break;case"+":for(let E=B;E{var M4=ID(),zg=c8();function Ig(D,P,O){let{offset:W,type:F,source:R,end:L}=D,B,Z,H=(U,J,A)=>O(W+U,J,A);switch(F){case"scalar":B=M4.Scalar.PLAIN,Z=Qg(R,H);break;case"single-quoted-scalar":B=M4.Scalar.QUOTE_SINGLE,Z=Cg(R,H);break;case"double-quoted-scalar":B=M4.Scalar.QUOTE_DOUBLE,Z=$g(R,H);break;default:return O(D,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${F}`),{value:"",type:null,comment:"",range:[W,W+R.length,W+R.length]}}let Y=W+R.length,q=zg.resolveEnd(L,Y,P,O);return{value:Z,type:B,comment:q.comment,range:[W,Y,q.offset]}}function Qg(D,P){let O="";switch(D[0]){case"\t":O="a tab character";break;case",":O="flow indicator character ,";break;case"%":O="directive indicator character %";break;case"|":case">":{O=`block scalar indicator ${D[0]}`;break}case"@":case"`":{O=`reserved character ${D[0]}`;break}}if(O)P(0,"BAD_SCALAR_START",`Plain value cannot start with ${O}`);return QS(D)}function Cg(D,P){if(D[D.length-1]!=="'"||D.length===1)P(D.length,"MISSING_CHAR","Missing closing 'quote");return QS(D.slice(1,-1)).replace(/''/g,"'")}function QS(D){let P,O;try{P=new RegExp("(.*?)(?R?D.slice(R,W+1):F}else O+=F}if(D[D.length-1]!=='"'||D.length===1)P(D.length,"MISSING_CHAR",'Missing closing "quote');return O}function Mg(D,P){let O="",W=D[P+1];while(W===" "||W==="\t"||W==="\n"||W==="\r"){if(W==="\r"&&D[P+2]!=="\n")break;if(W==="\n")O+="\n";P+=1,W=D[P+1]}if(!O)O=" ";return{fold:O,offset:P}}var wg={"0":"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function bg(D,P,O,W){let F=D.substr(P,O),L=F.length===O&&/^[0-9a-fA-F]+$/.test(F)?parseInt(F,16):NaN;if(isNaN(L)){let B=D.substr(P-2,O+2);return W(P-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${B}`),B}return String.fromCodePoint(L)}Kg.resolveFlowScalar=Ig});var $S=S((kg)=>{var o2=i(),CS=ID(),jg=$4(),_g=w4();function ug(D,P,O,W){let{value:F,type:R,comment:L,range:B}=P.type==="block-scalar"?jg.resolveBlockScalar(D,P,W):_g.resolveFlowScalar(P,D.options.strict,W),Z=O?D.directives.tagName(O.source,(q)=>W(O,"TAG_RESOLVE_FAILED",q)):null,H;if(D.options.stringKeys&&D.atKey)H=D.schema[o2.SCALAR];else if(Z)H=Tg(D.schema,F,Z,O,W);else if(P.type==="scalar")H=Ng(D,F,P,W);else H=D.schema[o2.SCALAR];let Y;try{let q=H.resolve(F,(U)=>W(O??P,"TAG_RESOLVE_FAILED",U),D.options);Y=o2.isScalar(q)?q:new CS.Scalar(q)}catch(q){let U=q instanceof Error?q.message:String(q);W(O??P,"TAG_RESOLVE_FAILED",U),Y=new CS.Scalar(F)}if(Y.range=B,Y.source=F,R)Y.type=R;if(Z)Y.tag=Z;if(H.format)Y.format=H.format;if(L)Y.comment=L;return Y}function Tg(D,P,O,W,F){if(O==="!")return D[o2.SCALAR];let R=[];for(let B of D.tags)if(!B.collection&&B.tag===O)if(B.default&&B.test)R.push(B);else return B;for(let B of R)if(B.test?.test(P))return B;let L=D.knownTags[O];if(L&&!L.collection)return D.tags.push(Object.assign({},L,{default:!1,test:void 0})),L;return F(W,"TAG_RESOLVE_FAILED",`Unresolved tag: ${O}`,O!=="tag:yaml.org,2002:str"),D[o2.SCALAR]}function Ng({atKey:D,directives:P,schema:O},W,F,R){let L=O.tags.find((B)=>(B.default===!0||D&&B.default==="key")&&B.test?.test(W))||O[o2.SCALAR];if(O.compat){let B=O.compat.find((Z)=>Z.default&&Z.test?.test(W))??O[o2.SCALAR];if(L.tag!==B.tag){let Z=P.tagString(L.tag),H=P.tagString(B.tag),Y=`Value may be parsed as either ${Z} or ${H}`;R(F,"TAG_RESOLVE_FAILED",Y,!0)}}return L}kg.composeScalar=ug});var MS=S((hg)=>{function xg(D,P,O){if(P){if(O===null)O=P.length;for(let W=O-1;W>=0;--W){let F=P[W];switch(F.type){case"space":case"comment":case"newline":D-=F.source.length;continue}F=P[++W];while(F?.type==="space")D+=F.source.length,F=P[++W];break}}return D}hg.emptyScalarPosition=xg});var KS=S((rg)=>{var vg=n1(),yg=i(),mg=IS(),wS=$S(),lg=c8(),cg=MS(),pg={composeNode:bS,composeEmptyNode:b4};function bS(D,P,O,W){let F=D.atKey,{spaceBefore:R,comment:L,anchor:B,tag:Z}=O,H,Y=!0;switch(P.type){case"alias":if(H=dg(D,P,W),B||Z)W(P,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(H=wS.composeScalar(D,P,Z,W),B)H.anchor=B.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(H=mg.composeCollection(pg,D,P,O,W),B)H.anchor=B.source.substring(1);break;default:{let q=P.type==="error"?P.message:`Unsupported token (type: ${P.type})`;W(P,"UNEXPECTED_TOKEN",q),H=b4(D,P.offset,void 0,null,O,W),Y=!1}}if(B&&H.anchor==="")W(B,"BAD_ALIAS","Anchor cannot be an empty string");if(F&&D.options.stringKeys&&(!yg.isScalar(H)||typeof H.value!=="string"||H.tag&&H.tag!=="tag:yaml.org,2002:str"))W(Z??P,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(R)H.spaceBefore=!0;if(L)if(P.type==="scalar"&&P.source==="")H.comment=L;else H.commentBefore=L;if(D.options.keepSourceTokens&&Y)H.srcToken=P;return H}function b4(D,P,O,W,{spaceBefore:F,comment:R,anchor:L,tag:B,end:Z},H){let Y={type:"scalar",offset:cg.emptyScalarPosition(P,O,W),indent:-1,source:""},q=wS.composeScalar(D,Y,B,H);if(L){if(q.anchor=L.source.substring(1),q.anchor==="")H(L,"BAD_ALIAS","Anchor cannot be an empty string")}if(F)q.spaceBefore=!0;if(R)q.comment=R,q.range[2]=Z;return q}function dg({options:D},{offset:P,source:O,end:W},F){let R=new vg.Alias(O.substring(1));if(R.source==="")F(P,"BAD_ALIAS","Alias cannot be an empty string");if(R.source.endsWith(":"))F(P+O.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let L=P+O.length,B=lg.resolveEnd(W,L,D.strict,F);if(R.range=[P,L,B.offset],B.comment)R.comment=B.comment;return R}rg.composeEmptyNode=b4;rg.composeNode=bS});var jS=S((eg)=>{var ng=HP(),VS=KS(),ig=c8(),tg=YP();function og(D,P,{offset:O,start:W,value:F,end:R},L){let B=Object.assign({_directives:P},D),Z=new ng.Document(void 0,B),H={atKey:!1,atRoot:!0,directives:Z.directives,options:Z.options,schema:Z.schema},Y=tg.resolveProps(W,{indicator:"doc-start",next:F??R?.[0],offset:O,onError:L,parentIndent:0,startOnNewline:!0});if(Y.found){if(Z.directives.docStart=!0,F&&(F.type==="block-map"||F.type==="block-seq")&&!Y.hasNewline)L(Y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}Z.contents=F?VS.composeNode(H,F,Y,L):VS.composeEmptyNode(H,Y.end,W,null,Y,L);let q=Z.contents.range[2],U=ig.resolveEnd(R,q,!1,L);if(U.comment)Z.comment=U.comment;return Z.range=[O,q,U.offset],Z}eg.composeDoc=og});var K4=S((Rv)=>{var Pv=uF(),Ov=HP(),UP=qP(),_S=i(),Wv=jS(),Fv=c8();function JP(D){if(typeof D==="number")return[D,D+1];if(Array.isArray(D))return D.length===2?D:[D[0],D[1]];let{offset:P,source:O}=D;return[P,P+(typeof O==="string"?O.length:1)]}function uS(D){let P="",O=!1,W=!1;for(let F=0;F{let R=JP(P);if(F)this.warnings.push(new UP.YAMLWarning(R,O,W));else this.errors.push(new UP.YAMLParseError(R,O,W))},this.directives=new Pv.Directives({version:D.version||"1.2"}),this.options=D}decorate(D,P){let{comment:O,afterEmptyLine:W}=uS(this.prelude);if(O){let F=D.contents;if(P)D.comment=D.comment?`${D.comment}\n${O}`:O;else if(W||D.directives.docStart||!F)D.commentBefore=O;else if(_S.isCollection(F)&&!F.flow&&F.items.length>0){let R=F.items[0];if(_S.isPair(R))R=R.key;let L=R.commentBefore;R.commentBefore=L?`${O}\n${L}`:O}else{let R=F.commentBefore;F.commentBefore=R?`${O}\n${R}`:O}}if(P)Array.prototype.push.apply(D.errors,this.errors),Array.prototype.push.apply(D.warnings,this.warnings);else D.errors=this.errors,D.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:uS(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(D,P=!1,O=-1){for(let W of D)yield*this.next(W);yield*this.end(P,O)}*next(D){if(process.env.LOG_STREAM)console.dir(D,{depth:null});switch(D.type){case"directive":this.directives.add(D.source,(P,O,W)=>{let F=JP(D);F[0]+=P,this.onError(F,"BAD_DIRECTIVE",O,W)}),this.prelude.push(D.source),this.atDirectives=!0;break;case"document":{let P=Wv.composeDoc(this.options,this.directives,D,this.onError);if(this.atDirectives&&!P.directives.docStart)this.onError(D,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(P,!1),this.doc)yield this.doc;this.doc=P,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(D.source);break;case"error":{let P=D.source?`${D.message}: ${JSON.stringify(D.source)}`:D.message,O=new UP.YAMLParseError(JP(D),"UNEXPECTED_TOKEN",P);if(this.atDirectives||!this.doc)this.errors.push(O);else this.doc.errors.push(O);break}case"doc-end":{if(!this.doc){this.errors.push(new UP.YAMLParseError(JP(D),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let P=Fv.resolveEnd(D.end,D.offset+D.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),P.comment){let O=this.doc.comment;this.doc.comment=O?`${O}\n${P.comment}`:P.comment}this.doc.range[2]=P.offset;break}default:this.errors.push(new UP.YAMLParseError(JP(D),"UNEXPECTED_TOKEN",`Unsupported token ${D.type}`))}}*end(D=!1,P=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(D){let O=Object.assign({_directives:this.directives},this.options),W=new Ov.Document(void 0,O);if(this.atDirectives)this.onError(P,"MISSING_CHAR","Missing directives-end indicator line");W.range=[0,P,P],this.decorate(W,!1),yield W}}}Rv.Composer=TS});var fS=S((Sv)=>{var Bv=$4(),Zv=w4(),Hv=qP(),NS=e1();function qv(D,P=!0,O){if(D){let W=(F,R,L)=>{let B=typeof F==="number"?F:Array.isArray(F)?F[0]:F.offset;if(O)O(B,R,L);else throw new Hv.YAMLParseError([B,B+1],R,L)};switch(D.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Zv.resolveFlowScalar(D,P,W);case"block-scalar":return Bv.resolveBlockScalar({options:{strict:P}},D,W)}}return null}function Yv(D,P){let{implicitKey:O=!1,indent:W,inFlow:F=!1,offset:R=-1,type:L="PLAIN"}=P,B=NS.stringifyString({type:L,value:D},{implicitKey:O,indent:W>0?" ".repeat(W):"",inFlow:F,options:{blockQuote:!0,lineWidth:-1}}),Z=P.end??[{type:"newline",offset:-1,indent:W,source:"\n"}];switch(B[0]){case"|":case">":{let H=B.indexOf("\n"),Y=B.substring(0,H),q=B.substring(H+1)+"\n",U=[{type:"block-scalar-header",offset:R,indent:W,source:Y}];if(!kS(U,Z))U.push({type:"newline",offset:-1,indent:W,source:"\n"});return{type:"block-scalar",offset:R,indent:W,props:U,source:q}}case'"':return{type:"double-quoted-scalar",offset:R,indent:W,source:B,end:Z};case"'":return{type:"single-quoted-scalar",offset:R,indent:W,source:B,end:Z};default:return{type:"scalar",offset:R,indent:W,source:B,end:Z}}}function Uv(D,P,O={}){let{afterKey:W=!1,implicitKey:F=!1,inFlow:R=!1,type:L}=O,B="indent"in D?D.indent:null;if(W&&typeof B==="number")B+=2;if(!L)switch(D.type){case"single-quoted-scalar":L="QUOTE_SINGLE";break;case"double-quoted-scalar":L="QUOTE_DOUBLE";break;case"block-scalar":{let H=D.props[0];if(H.type!=="block-scalar-header")throw new Error("Invalid block scalar header");L=H.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:L="PLAIN"}let Z=NS.stringifyString({type:L,value:P},{implicitKey:F||B===null,indent:B!==null&&B>0?" ".repeat(B):"",inFlow:R,options:{blockQuote:!0,lineWidth:-1}});switch(Z[0]){case"|":case">":Jv(D,Z);break;case'"':V4(D,Z,"double-quoted-scalar");break;case"'":V4(D,Z,"single-quoted-scalar");break;default:V4(D,Z,"scalar")}}function Jv(D,P){let O=P.indexOf("\n"),W=P.substring(0,O),F=P.substring(O+1)+"\n";if(D.type==="block-scalar"){let R=D.props[0];if(R.type!=="block-scalar-header")throw new Error("Invalid block scalar header");R.source=W,D.source=F}else{let{offset:R}=D,L="indent"in D?D.indent:-1,B=[{type:"block-scalar-header",offset:R,indent:L,source:W}];if(!kS(B,"end"in D?D.end:void 0))B.push({type:"newline",offset:-1,indent:L,source:"\n"});for(let Z of Object.keys(D))if(Z!=="type"&&Z!=="offset")delete D[Z];Object.assign(D,{type:"block-scalar",indent:L,props:B,source:F})}}function kS(D,P){if(P)for(let O of P)switch(O.type){case"space":case"comment":D.push(O);break;case"newline":return D.push(O),!0}return!1}function V4(D,P,O){switch(D.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":D.type=O,D.source=P;break;case"block-scalar":{let W=D.props.slice(1),F=P.length;if(D.props[0].type==="block-scalar-header")F-=D.props[0].source.length;for(let R of W)R.offset+=F;delete D.props,Object.assign(D,{type:O,source:P,end:W});break}case"block-map":case"block-seq":{let F={type:"newline",offset:D.offset+P.length,indent:D.indent,source:"\n"};delete D.items,Object.assign(D,{type:O,source:P,end:[F]});break}default:{let W="indent"in D?D.indent:-1,F="end"in D&&Array.isArray(D.end)?D.end.filter((R)=>R.type==="space"||R.type==="comment"||R.type==="newline"):[];for(let R of Object.keys(D))if(R!=="type"&&R!=="offset")delete D[R];Object.assign(D,{type:O,indent:W,source:P,end:F})}}}Sv.createScalarToken=Yv;Sv.resolveAsScalar=qv;Sv.setScalarValue=Uv});var xS=S((zv)=>{var Gv=(D)=>("type"in D)?l3(D):m3(D);function l3(D){switch(D.type){case"block-scalar":{let P="";for(let O of D.props)P+=l3(O);return P+D.source}case"block-map":case"block-seq":{let P="";for(let O of D.items)P+=m3(O);return P}case"flow-collection":{let P=D.start.source;for(let O of D.items)P+=m3(O);for(let O of D.end)P+=O.source;return P}case"document":{let P=m3(D);if(D.end)for(let O of D.end)P+=O.source;return P}default:{let P=D.source;if("end"in D&&D.end)for(let O of D.end)P+=O.source;return P}}}function m3({start:D,key:P,sep:O,value:W}){let F="";for(let R of D)F+=R.source;if(P)F+=l3(P);if(O)for(let R of O)F+=R.source;if(W)F+=l3(W);return F}zv.stringify=Gv});var vS=S((Cv)=>{var j4=Symbol("break visit"),Qv=Symbol("skip children"),hS=Symbol("remove item");function e2(D,P){if("type"in D&&D.type==="document")D={start:D.start,value:D.value};gS(Object.freeze([]),D,P)}e2.BREAK=j4;e2.SKIP=Qv;e2.REMOVE=hS;e2.itemAtPath=(D,P)=>{let O=D;for(let[W,F]of P){let R=O?.[W];if(R&&"items"in R)O=R.items[F];else return}return O};e2.parentCollection=(D,P)=>{let O=e2.itemAtPath(D,P.slice(0,-1)),W=P[P.length-1][0],F=O?.[W];if(F&&"items"in F)return F;throw new Error("Parent collection not found")};function gS(D,P,O){let W=O(P,D);if(typeof W==="symbol")return W;for(let F of["key","value"]){let R=P[F];if(R&&"items"in R){for(let L=0;L{var _4=fS(),Mv=xS(),wv=vS(),u4="\uFEFF",T4="\x02",N4="\x18",k4="\x1F",bv=(D)=>!!D&&("items"in D),Kv=(D)=>!!D&&(D.type==="scalar"||D.type==="single-quoted-scalar"||D.type==="double-quoted-scalar"||D.type==="block-scalar");function Vv(D){switch(D){case u4:return"";case T4:return"";case N4:return"";case k4:return"";default:return JSON.stringify(D)}}function jv(D){switch(D){case u4:return"byte-order-mark";case T4:return"doc-mode";case N4:return"flow-error-end";case k4:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(D[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}_v.createScalarToken=_4.createScalarToken;_v.resolveAsScalar=_4.resolveAsScalar;_v.setScalarValue=_4.setScalarValue;_v.stringify=Mv.stringify;_v.visit=wv.visit;_v.BOM=u4;_v.DOCUMENT=T4;_v.FLOW_END=N4;_v.SCALAR=k4;_v.isCollection=bv;_v.isScalar=Kv;_v.prettyToken=Vv;_v.tokenType=jv});var x4=S((rv)=>{var SP=c3();function I0(D){switch(D){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}var yS=new Set("0123456789ABCDEFabcdef"),pv=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),p3=new Set(",[]{}"),dv=new Set(" ,[]{}\n\r\t"),f4=(D)=>!D||dv.has(D);class mS{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(D,P=!1){if(D){if(typeof D!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+D:D,this.lineEndPos=null}this.atEnd=!P;let O=this.next??"stream";while(O&&(P||this.hasChars(1)))O=yield*this.parseNext(O)}atLineEnd(){let D=this.pos,P=this.buffer[D];while(P===" "||P==="\t")P=this.buffer[++D];if(!P||P==="#"||P==="\n")return!0;if(P==="\r")return this.buffer[D+1]==="\n";return!1}charAt(D){return this.buffer[this.pos+D]}continueScalar(D){let P=this.buffer[D];if(this.indentNext>0){let O=0;while(P===" ")P=this.buffer[++O+D];if(P==="\r"){let W=this.buffer[O+D+1];if(W==="\n"||!W&&!this.atEnd)return D+O+1}return P==="\n"||O>=this.indentNext||!P&&!this.atEnd?D+O:-1}if(P==="-"||P==="."){let O=this.buffer.substr(D,3);if((O==="---"||O==="...")&&I0(this.buffer[D+3]))return-1}return D}getLine(){let D=this.lineEndPos;if(typeof D!=="number"||D!==-1&&Dthis.indentValue&&!I0(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[D,P]=this.peek(2);if(!P&&!this.atEnd)return this.setNext("block-start");if((D==="-"||D==="?"||D===":")&&I0(P)){let O=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=O,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let D=this.getLine();if(D===null)return this.setNext("doc");let P=yield*this.pushIndicators();switch(D[P]){case"#":yield*this.pushCount(D.length-P);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(f4),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return P+=yield*this.parseBlockScalarHeader(),P+=yield*this.pushSpaces(!0),yield*this.pushCount(D.length-P),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let D,P,O=-1;do{if(D=yield*this.pushNewline(),D>0)P=yield*this.pushSpaces(!1),this.indentValue=O=P;else P=0;P+=yield*this.pushSpaces(!0)}while(D+P>0);let W=this.getLine();if(W===null)return this.setNext("flow");if(O!==-1&&O"0"&&P<="9")this.blockScalarIndent=Number(P)-1;else if(P!=="-")break}return yield*this.pushUntil((P)=>I0(P)||P==="#")}*parseBlockScalar(){let D=this.pos-1,P=0,O;D:for(let F=this.pos;O=this.buffer[F];++F)switch(O){case" ":P+=1;break;case"\n":D=F,P=0;break;case"\r":{let R=this.buffer[F+1];if(!R&&!this.atEnd)return this.setNext("block-scalar");if(R==="\n")break}default:break D}if(!O&&!this.atEnd)return this.setNext("block-scalar");if(P>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=P;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let F=this.continueScalar(D+1);if(F===-1)break;D=this.buffer.indexOf("\n",F)}while(D!==-1);if(D===-1){if(!this.atEnd)return this.setNext("block-scalar");D=this.buffer.length}}let W=D+1;O=this.buffer[W];while(O===" ")O=this.buffer[++W];if(O==="\t"){while(O==="\t"||O===" "||O==="\r"||O==="\n")O=this.buffer[++W];D=W-1}else if(!this.blockScalarKeep)do{let F=D-1,R=this.buffer[F];if(R==="\r")R=this.buffer[--F];let L=F;while(R===" ")R=this.buffer[--F];if(R==="\n"&&F>=this.pos&&F+1+P>L)D=F;else break}while(!0);return yield SP.SCALAR,yield*this.pushToIndex(D+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let D=this.flowLevel>0,P=this.pos-1,O=this.pos-1,W;while(W=this.buffer[++O])if(W===":"){let F=this.buffer[O+1];if(I0(F)||D&&p3.has(F))break;P=O}else if(I0(W)){let F=this.buffer[O+1];if(W==="\r")if(F==="\n")O+=1,W="\n",F=this.buffer[O+1];else P=O;if(F==="#"||D&&p3.has(F))break;if(W==="\n"){let R=this.continueScalar(O+1);if(R===-1)break;O=Math.max(O,R-2)}}else{if(D&&p3.has(W))break;P=O}if(!W&&!this.atEnd)return this.setNext("plain-scalar");return yield SP.SCALAR,yield*this.pushToIndex(P+1,!0),D?"flow":"doc"}*pushCount(D){if(D>0)return yield this.buffer.substr(this.pos,D),this.pos+=D,D;return 0}*pushToIndex(D,P){let O=this.buffer.slice(this.pos,D);if(O)return yield O,this.pos+=O.length,O.length;else if(P)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(f4))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let D=this.flowLevel>0,P=this.charAt(1);if(I0(P)||D&&p3.has(P)){if(!D)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let D=this.pos+2,P=this.buffer[D];while(!I0(P)&&P!==">")P=this.buffer[++D];return yield*this.pushToIndex(P===">"?D+1:D,!1)}else{let D=this.pos+1,P=this.buffer[D];while(P)if(pv.has(P))P=this.buffer[++D];else if(P==="%"&&yS.has(this.buffer[D+1])&&yS.has(this.buffer[D+2]))P=this.buffer[D+=3];else break;return yield*this.pushToIndex(D,!1)}}*pushNewline(){let D=this.buffer[this.pos];if(D==="\n")return yield*this.pushCount(1);else if(D==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(D){let P=this.pos-1,O;do O=this.buffer[++P];while(O===" "||D&&O==="\t");let W=P-this.pos;if(W>0)yield this.buffer.substr(this.pos,W),this.pos=P;return W}*pushUntil(D){let P=this.pos,O=this.buffer[P];while(!D(O))O=this.buffer[++P];return yield*this.pushToIndex(P,!1)}}rv.Lexer=mS});var h4=S((sv)=>{class lS{constructor(){this.lineStarts=[],this.addNewLine=(D)=>this.lineStarts.push(D),this.linePos=(D)=>{let P=0,O=this.lineStarts.length;while(P>1;if(this.lineStarts[F]{var cS=c3(),iv=x4();function D8(D,P){for(let O=0;O=0)switch(D[P].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break D}while(D[++P]?.type==="space");return D.splice(P,D.length)}function dS(D){if(D.start.type==="flow-seq-start"){for(let P of D.items)if(P.sep&&!P.value&&!D8(P.start,"explicit-key-ind")&&!D8(P.sep,"map-value-ind")){if(P.key)P.value=P.key;if(delete P.key,rS(P.value))if(P.value.end)Array.prototype.push.apply(P.value.end,P.sep);else P.value.end=P.sep;else Array.prototype.push.apply(P.start,P.sep);delete P.sep}}}class aS{constructor(D){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new iv.Lexer,this.onNewLine=D}*parse(D,P=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let O of this.lexer.lex(D,P))yield*this.next(O);if(!P)yield*this.end()}*next(D){if(this.source=D,process.env.LOG_TOKENS)console.log("|",cS.prettyToken(D));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=D.length;return}let P=cS.tokenType(D);if(!P){let O=`Not a YAML token: ${D}`;yield*this.pop({type:"error",offset:this.offset,message:O,source:D}),this.offset+=D.length}else if(P==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=P,yield*this.step(),P){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+D.length);break;case"space":if(this.atNewLine&&D[0]===" ")this.indent+=D.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=D.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=D.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let D=this.peek(1);if(this.type==="doc-end"&&(!D||D.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!D)return yield*this.stream();switch(D.type){case"document":return yield*this.document(D);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(D);case"block-scalar":return yield*this.blockScalar(D);case"block-map":return yield*this.blockMap(D);case"block-seq":return yield*this.blockSequence(D);case"flow-collection":return yield*this.flowCollection(D);case"doc-end":return yield*this.documentEnd(D)}yield*this.pop()}peek(D){return this.stack[this.stack.length-D]}*pop(D){let P=D??this.stack.pop();if(!P)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield P;else{let O=this.peek(1);if(P.type==="block-scalar")P.indent="indent"in O?O.indent:0;else if(P.type==="flow-collection"&&O.type==="document")P.indent=0;if(P.type==="flow-collection")dS(P);switch(O.type){case"document":O.value=P;break;case"block-scalar":O.props.push(P);break;case"block-map":{let W=O.items[O.items.length-1];if(W.value){O.items.push({start:[],key:P,sep:[]}),this.onKeyLine=!0;return}else if(W.sep)W.value=P;else{Object.assign(W,{key:P,sep:[]}),this.onKeyLine=!W.explicitKey;return}break}case"block-seq":{let W=O.items[O.items.length-1];if(W.value)O.items.push({start:[],value:P});else W.value=P;break}case"flow-collection":{let W=O.items[O.items.length-1];if(!W||W.value)O.items.push({start:[],key:P,sep:[]});else if(W.sep)W.value=P;else Object.assign(W,{key:P,sep:[]});return}default:yield*this.pop(),yield*this.pop(P)}if((O.type==="document"||O.type==="block-map"||O.type==="block-seq")&&(P.type==="block-map"||P.type==="block-seq")){let W=P.items[P.items.length-1];if(W&&!W.sep&&!W.value&&W.start.length>0&&pS(W.start)===-1&&(P.indent===0||W.start.every((F)=>F.type!=="comment"||F.indent=D.indent){let O=!this.onKeyLine&&this.indent===D.indent,W=O&&(P.sep||P.explicitKey)&&this.type!=="seq-item-ind",F=[];if(W&&P.sep&&!P.value){let R=[];for(let L=0;LD.indent)R.length=0;break;default:R.length=0}}if(R.length>=2)F=P.sep.splice(R[1])}switch(this.type){case"anchor":case"tag":if(W||P.value)F.push(this.sourceToken),D.items.push({start:F}),this.onKeyLine=!0;else if(P.sep)P.sep.push(this.sourceToken);else P.start.push(this.sourceToken);return;case"explicit-key-ind":if(!P.sep&&!P.explicitKey)P.start.push(this.sourceToken),P.explicitKey=!0;else if(W||P.value)F.push(this.sourceToken),D.items.push({start:F,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(P.explicitKey)if(!P.sep)if(D8(P.start,"newline"))Object.assign(P,{key:null,sep:[this.sourceToken]});else{let R=p8(P.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:R,key:null,sep:[this.sourceToken]}]})}else if(P.value)D.items.push({start:[],key:null,sep:[this.sourceToken]});else if(D8(P.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:F,key:null,sep:[this.sourceToken]}]});else if(rS(P.key)&&!D8(P.sep,"newline")){let R=p8(P.start),L=P.key,B=P.sep;B.push(this.sourceToken),delete P.key,delete P.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:R,key:L,sep:B}]})}else if(F.length>0)P.sep=P.sep.concat(F,this.sourceToken);else P.sep.push(this.sourceToken);else if(!P.sep)Object.assign(P,{key:null,sep:[this.sourceToken]});else if(P.value||W)D.items.push({start:F,key:null,sep:[this.sourceToken]});else if(D8(P.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else P.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let R=this.flowScalar(this.type);if(W||P.value)D.items.push({start:F,key:R,sep:[]}),this.onKeyLine=!0;else if(P.sep)this.stack.push(R);else Object.assign(P,{key:R,sep:[]}),this.onKeyLine=!0;return}default:{let R=this.startBlockValue(D);if(R){if(O&&R.type!=="block-seq")D.items.push({start:F});this.stack.push(R);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(D){let P=D.items[D.items.length-1];switch(this.type){case"newline":if(P.value){let O="end"in P.value?P.value.end:void 0;if((Array.isArray(O)?O[O.length-1]:void 0)?.type==="comment")O?.push(this.sourceToken);else D.items.push({start:[this.sourceToken]})}else P.start.push(this.sourceToken);return;case"space":case"comment":if(P.value)D.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(P.start,D.indent)){let W=D.items[D.items.length-2]?.value?.end;if(Array.isArray(W)){Array.prototype.push.apply(W,P.start),W.push(this.sourceToken),D.items.pop();return}}P.start.push(this.sourceToken)}return;case"anchor":case"tag":if(P.value||this.indent<=D.indent)break;P.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==D.indent)break;if(P.value||D8(P.start,"seq-item-ind"))D.items.push({start:[this.sourceToken]});else P.start.push(this.sourceToken);return}if(this.indent>D.indent){let O=this.startBlockValue(D);if(O){this.stack.push(O);return}}yield*this.pop(),yield*this.step()}*flowCollection(D){let P=D.items[D.items.length-1];if(this.type==="flow-error-end"){let O;do yield*this.pop(),O=this.peek(1);while(O&&O.type==="flow-collection")}else if(D.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!P||P.sep)D.items.push({start:[this.sourceToken]});else P.start.push(this.sourceToken);return;case"map-value-ind":if(!P||P.value)D.items.push({start:[],key:null,sep:[this.sourceToken]});else if(P.sep)P.sep.push(this.sourceToken);else Object.assign(P,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!P||P.value)D.items.push({start:[this.sourceToken]});else if(P.sep)P.sep.push(this.sourceToken);else P.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let W=this.flowScalar(this.type);if(!P||P.value)D.items.push({start:[],key:W,sep:[]});else if(P.sep)this.stack.push(W);else Object.assign(P,{key:W,sep:[]});return}case"flow-map-end":case"flow-seq-end":D.end.push(this.sourceToken);return}let O=this.startBlockValue(D);if(O)this.stack.push(O);else yield*this.pop(),yield*this.step()}else{let O=this.peek(2);if(O.type==="block-map"&&(this.type==="map-value-ind"&&O.indent===D.indent||this.type==="newline"&&!O.items[O.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&O.type!=="flow-collection"){let W=d3(O),F=p8(W);dS(D);let R=D.end.splice(1,D.end.length);R.push(this.sourceToken);let L={type:"block-map",offset:D.offset,indent:D.indent,items:[{start:F,key:D,sep:R}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=L}else yield*this.lineEnd(D)}}flowScalar(D){if(this.onNewLine){let P=this.source.indexOf("\n")+1;while(P!==0)this.onNewLine(this.offset+P),P=this.source.indexOf("\n",P)+1}return{type:D,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(D){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let P=d3(D),O=p8(P);return O.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:O,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let P=d3(D),O=p8(P);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:O,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(D,P){if(this.type!=="comment")return!1;if(this.indent<=P)return!1;return D.every((O)=>O.type==="newline"||O.type==="space")}*documentEnd(D){if(this.type!=="doc-mode"){if(D.end)D.end.push(this.sourceToken);else D.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(D){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(D.end)D.end.push(this.sourceToken);else D.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}tv.Parser=aS});var oS=S((Ly)=>{var sS=K4(),ev=HP(),XP=qP(),Dy=hF(),Py=i(),Oy=h4(),nS=g4();function iS(D){let P=D.prettyErrors!==!1;return{lineCounter:D.lineCounter||P&&new Oy.LineCounter||null,prettyErrors:P}}function Wy(D,P={}){let{lineCounter:O,prettyErrors:W}=iS(P),F=new nS.Parser(O?.addNewLine),R=new sS.Composer(P),L=Array.from(R.compose(F.parse(D)));if(W&&O)for(let B of L)B.errors.forEach(XP.prettifyError(D,O)),B.warnings.forEach(XP.prettifyError(D,O));if(L.length>0)return L;return Object.assign([],{empty:!0},R.streamInfo())}function tS(D,P={}){let{lineCounter:O,prettyErrors:W}=iS(P),F=new nS.Parser(O?.addNewLine),R=new sS.Composer(P),L=null;for(let B of R.compose(F.parse(D),!0,D.length))if(!L)L=B;else if(L.options.logLevel!=="silent"){L.errors.push(new XP.YAMLParseError(B.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(W&&O)L.errors.forEach(XP.prettifyError(D,O)),L.warnings.forEach(XP.prettifyError(D,O));return L}function Fy(D,P,O){let W=void 0;if(typeof P==="function")W=P;else if(O===void 0&&P&&typeof P==="object")O=P;let F=tS(D,O);if(!F)return null;if(F.warnings.forEach((R)=>Dy.warn(F.options.logLevel,R)),F.errors.length>0)if(F.options.logLevel!=="silent")throw F.errors[0];else F.errors=[];return F.toJS(Object.assign({reviver:W},O))}function Ry(D,P,O){let W=null;if(typeof P==="function"||Array.isArray(P))W=P;else if(O===void 0&&P)O=P;if(typeof O==="string")O=O.length;if(typeof O==="number"){let F=Math.round(O);O=F<1?void 0:F>8?{indent:8}:{indent:F}}if(D===void 0){let{keepUndefined:F}=O??P??{};if(!F)return}if(Py.isDocument(D)&&!W)return D.toString(O);return new ev.Document(D,W,O).toString(O)}Ly.parse=Fy;Ly.parseAllDocuments=Wy;Ly.parseDocument=tS;Ly.stringify=Ry});var DX=S(($y)=>{var Yy=K4(),Uy=HP(),Jy=Y4(),v4=qP(),Sy=n1(),Q2=i(),Xy=A2(),Ey=ID(),Ay=z2(),Gy=I2(),zy=c3(),Iy=x4(),Qy=h4(),Cy=g4(),r3=oS(),eS=a1();$y.Composer=Yy.Composer;$y.Document=Uy.Document;$y.Schema=Jy.Schema;$y.YAMLError=v4.YAMLError;$y.YAMLParseError=v4.YAMLParseError;$y.YAMLWarning=v4.YAMLWarning;$y.Alias=Sy.Alias;$y.isAlias=Q2.isAlias;$y.isCollection=Q2.isCollection;$y.isDocument=Q2.isDocument;$y.isMap=Q2.isMap;$y.isNode=Q2.isNode;$y.isPair=Q2.isPair;$y.isScalar=Q2.isScalar;$y.isSeq=Q2.isSeq;$y.Pair=Xy.Pair;$y.Scalar=Ey.Scalar;$y.YAMLMap=Ay.YAMLMap;$y.YAMLSeq=Gy.YAMLSeq;$y.CST=zy;$y.Lexer=Iy.Lexer;$y.LineCounter=Qy.LineCounter;$y.Parser=Cy.Parser;$y.parse=r3.parse;$y.parseAllDocuments=r3.parseAllDocuments;$y.parseDocument=r3.parseDocument;$y.stringify=r3.stringify;$y.visit=eS.visit;$y.visitAsync=eS.visitAsync});var GP={name:"@samarium.sdk/new",version:"0.15.2",main:"bin/samarium",type:"module",repository:{type:"git",url:"https://github.com/liontariai/samarium",directory:"packages/new"},keywords:["graphql","typescript","compiler","api","sdk","openapi","oas3","oas3.1","swagger","graphql-sdk","graphql-codegen"],homepage:"https://github.com/liontariai/samarium",bin:{samarium:"bin/samarium"},publishConfig:{access:"public"},files:["bin/**/*","README.md","package.json"],scripts:{prettier:"prettier --write .",bundle:"bun bundle.js",prepublishOnly:"bun run bundle",test:"bun test"},prettier:{tabWidth:4},devDependencies:{"bun-types":"^1.1.29","@samarium.sdk/make":"workspace:*"},peerDependencies:{typescript:"^5.0.0"},dependencies:{"@inquirer/prompts":"^5.0.5",commander:"^11.1.0","detect-indent":"^7.0.1",prettier:"^3.2.5",yaml:"^2.6.0"}};var q9=qD(H9(),1),{program:Ym,createCommand:Um,createArgument:Jm,createOption:Sm,CommanderError:Xm,InvalidArgumentError:Em,InvalidOptionArgumentError:Am,Command:Y9,Argument:Gm,Option:zm,Help:Im}=q9.default;var Iq=qD(T0(),1);var CO=qD(T0(),1);class R2 extends Error{response;request;constructor(D,P){let O=`${R2.extractMessage(D)}: ${JSON.stringify({response:D,request:P})}`;super(O);if(Object.setPrototypeOf(this,R2.prototype),this.response=D,this.request=P,typeof Error.captureStackTrace==="function")Error.captureStackTrace(this,R2)}static extractMessage(D){return D.errors?.[0]?.message??`GraphQL Error (Code: ${String(D.status)})`}}var M5=(D)=>D.toUpperCase(),EO=(D)=>{return typeof D==="function"?D():D},w5=(D,P)=>D.map((O,W)=>[O,P[W]]),v2=(D)=>{let P={};if(D instanceof Headers)P=P_(D);else if(Array.isArray(D))D.forEach(([O,W])=>{if(O&&W!==void 0)P[O]=W});else if(D)P=D;return P},P_=(D)=>{let P={};return D.forEach((O,W)=>{P[W]=O}),P},Bq=(D)=>{try{let P=D();if(O_(P))return P.catch((O)=>{return Lq(O)});return P}catch(P){return Lq(P)}},Lq=(D)=>{if(D instanceof Error)return D;return new Error(String(D))},O_=(D)=>{return typeof D==="object"&&D!==null&&"then"in D&&typeof D.then==="function"&&"catch"in D&&typeof D.catch==="function"&&"finally"in D&&typeof D.finally==="function"},AO=(D)=>{throw new Error(`Unhandled case: ${String(D)}`)},N1=(D)=>{return typeof D==="object"&&D!==null&&!Array.isArray(D)};var Zq=(D,P)=>{return D.documents?D:{documents:D,requestHeaders:P,signal:void 0}};var Hq=(D,P,O)=>{return D.query?D:{query:D,variables:P,requestHeaders:O,signal:void 0}};var Uq=qD(T0(),1);var b5="Accept",GO="Content-Type",k1="application/json",zO="application/graphql-response+json";var K5=(D)=>D.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Jq=(D)=>{let P=D.toLowerCase();return P.includes(zO)||P.includes(k1)},V5=(D)=>{try{if(Array.isArray(D))return{_tag:"Batch",executionResults:D.map(qq)};else if(N1(D))return{_tag:"Single",executionResult:qq(D)};else throw new Error(`Invalid execution result: result is not object or array. \nGot:\n${String(D)}`)}catch(P){return P}},qq=(D)=>{if(typeof D!=="object"||D===null)throw new Error("Invalid execution result: result is not object");let P=void 0,O=void 0,W=void 0;if("errors"in D){if(!N1(D.errors)&&!Array.isArray(D.errors))throw new Error("Invalid execution result: errors is not plain object OR array");P=D.errors}if("data"in D){if(!N1(D.data)&&D.data!==null)throw new Error("Invalid execution result: data is not plain object");O=D.data}if("extensions"in D){if(!N1(D.extensions))throw new Error("Invalid execution result: extensions is not plain object");W=D.extensions}return{data:O,errors:P,extensions:W}},Sq=(D)=>D._tag==="Batch"?D.executionResults.some(Yq):Yq(D.executionResult),Yq=(D)=>Array.isArray(D.errors)?D.errors.length>0:Boolean(D.errors),j5=(D)=>{return typeof D==="object"&&D!==null&&"kind"in D&&D.kind===Uq.Kind.OPERATION_DEFINITION};var Xq=qD(T0(),1),Eq=qD(T0(),1),Aq=qD(T0(),1),W_=(D)=>{let P=void 0,O=D.definitions.filter(j5);if(O.length===1)P=O[0].name?.value;return P},F_=(D)=>{let P=!1,O=D.definitions.filter(j5);if(O.length===1)P=O[0].operation===Xq.OperationTypeNode.MUTATION;return P},f1=(D,P)=>{let O=typeof D==="string"?D:Aq.print(D),W=!1,F=void 0;if(P)return{expression:O,isMutation:W,operationName:F};let R=Bq(()=>typeof D==="string"?Eq.parse(D):D);if(R instanceof Error)return{expression:O,isMutation:W,operationName:F};return F=W_(R),W=F_(R),{expression:O,operationName:F,isMutation:W}};var IO=JSON;var QO=async(D)=>{let P={...D,method:D.request._tag==="Single"?D.request.document.isMutation?"POST":M5(D.method??"post"):D.request.hasMutations?"POST":M5(D.method??"post"),fetchOptions:{...D.fetchOptions,errorPolicy:D.fetchOptions.errorPolicy??"none"}},W=await L_(P.method)(P);if(!W.ok)return new R2({status:W.status,headers:W.headers},{query:D.request._tag==="Single"?D.request.document.expression:D.request.query,variables:D.request.variables});let F=await R_(W,D.fetchOptions.jsonSerializer??IO);if(F instanceof Error)throw F;let R={status:W.status,headers:W.headers};if(Sq(F)&&P.fetchOptions.errorPolicy==="none"){let L=F._tag==="Batch"?{...F.executionResults,...R}:{...F.executionResult,...R};return new R2(L,{query:D.request._tag==="Single"?D.request.document.expression:D.request.query,variables:D.request.variables})}switch(F._tag){case"Single":return{...R,...Gq(P)(F.executionResult)};case"Batch":return{...R,data:F.executionResults.map(Gq(P))};default:AO(F)}},Gq=(D)=>(P)=>{return{extensions:P.extensions,data:P.data,errors:D.fetchOptions.errorPolicy==="all"?P.errors:void 0}},R_=async(D,P)=>{let O=D.headers.get(GO),W=await D.text();if(O&&Jq(O))return V5(P.parse(W));else return V5(W)},L_=(D)=>async(P)=>{let O=new Headers(P.headers),W=null,F=void 0;if(!O.has(b5))O.set(b5,[zO,k1].join(", "));if(D==="POST"){if(F=(P.fetchOptions.jsonSerializer??IO).stringify(B_(P)),typeof F==="string"&&!O.has(GO))O.set(GO,k1)}else W=Z_(P);let R={method:D,headers:O,body:F,...P.fetchOptions},L=new URL(P.url),B=R;if(P.middleware){let H=await Promise.resolve(P.middleware({...R,url:P.url,operationName:P.request._tag==="Single"?P.request.document.operationName:void 0,variables:P.request.variables})),{url:Y,...q}=H;L=new URL(Y),B=q}if(W)W.forEach((H,Y)=>{L.searchParams.append(Y,H)});return await(P.fetch??fetch)(L,B)},B_=(D)=>{switch(D.request._tag){case"Single":return{query:D.request.document.expression,variables:D.request.variables,operationName:D.request.document.operationName};case"Batch":return w5(D.request.query,D.request.variables??[]).map(([P,O])=>({query:P,variables:O}));default:throw AO(D.request)}},Z_=(D)=>{let P=D.fetchOptions.jsonSerializer??IO,O=new URLSearchParams;switch(D.request._tag){case"Single":{if(O.append("query",K5(D.request.document.expression)),D.request.variables)O.append("variables",P.stringify(D.request.variables));if(D.request.document.operationName)O.append("operationName",D.request.document.operationName);return O}case"Batch":{let W=D.request.variables?.map((L)=>P.stringify(L))??[],F=D.request.query.map(K5),R=w5(F,W).map(([L,B])=>({query:L,variables:B}));return O.append("query",P.stringify(R)),O}default:throw AO(D.request)}};class y2{url;requestConfig;constructor(D,P={}){this.url=D,this.requestConfig=P}rawRequest=async(...D)=>{let[P,O,W]=D,F=Hq(P,O,W),{headers:R,fetch:L=globalThis.fetch,method:B="POST",requestMiddleware:Z,responseMiddleware:H,excludeOperationName:Y,...q}=this.requestConfig,{url:U}=this;if(F.signal!==void 0)q.signal=F.signal;let J=f1(F.query,Y),A=await QO({url:U,request:{_tag:"Single",document:J,variables:F.variables},headers:{...v2(EO(R)),...v2(F.requestHeaders)},fetch:L,method:B,fetchOptions:q,middleware:Z});if(H)await H(A,{operationName:J.operationName,variables:O,url:this.url});if(A instanceof Error)throw A;return A};async request(D,...P){let[O,W]=P,F=zq(D,O,W),{headers:R,fetch:L=globalThis.fetch,method:B="POST",requestMiddleware:Z,responseMiddleware:H,excludeOperationName:Y,...q}=this.requestConfig,{url:U}=this;if(F.signal!==void 0)q.signal=F.signal;let J=f1(F.document,Y),A=await QO({url:U,request:{_tag:"Single",document:J,variables:F.variables},headers:{...v2(EO(R)),...v2(F.requestHeaders)},fetch:L,method:B,fetchOptions:q,middleware:Z});if(H)await H(A,{operationName:J.operationName,variables:F.variables,url:this.url});if(A instanceof Error)throw A;return A.data}async batchRequests(D,P){let O=Zq(D,P),{headers:W,excludeOperationName:F,...R}=this.requestConfig;if(O.signal!==void 0)R.signal=O.signal;let L=O.documents.map(({document:q})=>f1(q,F)),B=L.map(({expression:q})=>q),Z=L.some(({isMutation:q})=>q),H=O.documents.map(({variables:q})=>q),Y=await QO({url:this.url,request:{_tag:"Batch",operationName:void 0,query:B,hasMutations:Z,variables:H},headers:{...v2(EO(W)),...v2(O.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:R,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware)await this.requestConfig.responseMiddleware(Y,{operationName:void 0,variables:H,url:this.url});if(Y instanceof Error)throw Y;return Y.data}setHeaders(D){return this.requestConfig.headers=D,this}setHeader(D,P){let{headers:O}=this.requestConfig;if(O)O[D]=P;else this.requestConfig.headers={[D]:P};return this}setEndpoint(D){return this.url=D,this}}var zq=(D,P,O)=>{return D.document?D:{document:D,variables:P,requestHeaders:O,signal:void 0}};async function m2(D,P){try{let W=await new y2(D).request(CO.getIntrospectionQuery(),void 0,new Headers(P?.map((R)=>R.split("="))));return CO.buildClientSchema(W)}catch(O){throw O}}import H_ from"fs";var _5=async(D,P)=>{let O=await m2(D.url,D.headers),W=Iq.printSchema(O);H_.writeFileSync(P,W)};class u5{P;O;static FieldValueWrapperType;static EnumTypesMapped;static HelperTypes;static HelperFunctions;typeMeta;typeName;originalFullTypeName;constructor(D,P,O){this.collector=P;this.options=O;this.typeMeta=P.getType(D),this.originalFullTypeName=D,this.typeName=this.originalTypeNameToTypescriptFriendlyName(D)}originalTypeNameToTypescriptFriendlyName(D){return D.replaceAll("[","").replaceAll("]","Array").replaceAll("!","NotNull")}originalTypeNameToTypescriptTypeNameWithoutModifiers(D,P=""){return`${D.replaceAll("[","").replaceAll("]","").replaceAll("!","")}${P}`}originalTypeNameToTypescriptTypeName(D,P=""){return`${this.originalTypeNameToTypescriptTypeNameWithoutModifiers(D,P)}${Array.from({length:D.split("[").length-1}).fill("[]").join("")}`}static makeRootOperationFunction(D){throw new Error("Method not implemented.")}}var $O=qD(T0(),1);var Qq="const Proxy = global.Proxy;\nProxy.prototype = {};\n\nexport const _ = Symbol(\"_\") as any;\nexport const OPTIONS = Symbol(\"OPTIONS\");\nexport class RootOperation {\n public static [OPTIONS] = {\n headers: {},\n _auth_fn: undefined as\n | (() => string | { [key: string]: string })\n | (() => Promise)\n | undefined,\n scalars: {\n DateTime: (value: string) => new Date(value),\n DateTimeISO: (value: string) => new Date(value),\n Date: (value: string) => new Date(value),\n Time: (value: string) => new Date(value),\n JSON: (value: string) => JSON.parse(value),\n },\n };\n\n private utilSet = (obj: Record, path: string[], value: any) =>\n path.reduce(\n (o, p, i, a) => (o[p] = a.length - 1 === i ? value : o[p] || {}),\n obj,\n );\n\n private rootCollector: OperationSelectionCollector | undefined = undefined;\n public registerRootCollector(collector: OperationSelectionCollector) {\n this.rootCollector = collector;\n }\n public async execute(headers: Record = {}) {\n if (!this.rootCollector) {\n throw new Error(\"RootOperation has no registered collector\");\n }\n\n type selection = ReturnType<\n typeof OperationSelectionCollector.prototype.renderSelections\n >;\n const operations: {\n [key: string]: {\n selection: selection;\n rootSlw: SelectionWrapperImpl;\n };\n } = {};\n for (const [\n opName,\n opSelection,\n ] of this.rootCollector?.selections.entries()) {\n if (opSelection[SLW_LAZY_FLAG]) continue;\n\n let rootSlw = opSelection;\n while (!rootSlw[SLW_IS_ROOT_TYPE]) {\n if (!rootSlw[SLW_PARENT_SLW]) break;\n rootSlw = rootSlw[SLW_PARENT_SLW]!;\n }\n\n const selection = rootSlw[SLW_COLLECTOR]!.renderSelections(\n [opName],\n {},\n new Map(),\n opSelection === rootSlw ? [] : [opSelection],\n );\n\n operations[opName] = {\n selection,\n rootSlw,\n };\n }\n\n const ops = Object.entries(operations).reduce(\n (acc, [opName, { selection, rootSlw }]) => ({\n ...acc,\n [opName]: {\n query: `${rootSlw[SLW_IS_ROOT_TYPE]?.toLowerCase()} ${opName} ${\n selection.variableDefinitions.length\n ? `(${selection.variableDefinitions.join(\", \")}) `\n : \"\"\n }${selection.selection}`,\n variables: selection.variables,\n fragments: selection.usedFragments,\n },\n }),\n {} as Record<\n string,\n {\n query: string;\n variables: any;\n fragments: Map;\n }\n >,\n );\n // const subscription = `{${subscriptions.join(\"\")}}`;\n\n const results = Object.fromEntries(\n await Promise.all([\n ...Object.entries(ops).map(\n async ([opName, op]) =>\n [\n opName,\n await this.executeOperation(op, headers),\n ] as const,\n ),\n ]),\n );\n\n return results;\n }\n\n private async executeOperation(\n query: {\n query: string;\n variables: any;\n fragments: Map;\n },\n headers: Record = {},\n ) {\n const res = await fetch(\"[ENDPOINT]\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers,\n },\n body: JSON.stringify({\n query: `${[...query.fragments.values()].join(\"\\n\")}\\n ${query.query}`.trim(),\n variables: query.variables,\n }),\n });\n const result = (await res.json()) as { data: any; errors: any[] };\n\n const { data, errors } = result ?? {};\n if (errors?.length > 0) {\n for (const error of errors) {\n if (error.path) {\n this.utilSet(data, error.path, error);\n }\n }\n if (!data) {\n const err = new Error(JSON.stringify(errors), {\n cause: \"Only errors were returned from the server.\",\n });\n throw err;\n }\n }\n return data;\n }\n}\n\nexport type OperationSelectionCollectorRef = {\n ref: OperationSelectionCollector;\n};\nexport class OperationSelectionCollector {\n constructor(\n public readonly name?: string,\n public readonly parent?:\n | OperationSelectionCollector\n | OperationSelectionCollectorRef,\n public readonly op?: RootOperation,\n ) {\n if (op) op.registerRootCollector(this);\n }\n\n private executed = false;\n private operationResult: any | undefined = undefined;\n public async execute(\n headers: Record = RootOperation[OPTIONS].headers,\n ) {\n if (!this.op) {\n throw new Error(\n \"OperationSelectionCollector is not registered to a root operation\",\n );\n }\n this.operationResult = await this.op.execute(headers);\n this.executed = true;\n }\n public get isExecuted() {\n return this.executed;\n }\n\n public readonly selections = new Map<\n string,\n SelectionWrapperImpl\n >();\n public registerSelection(\n id: string,\n selection: SelectionWrapperImpl,\n ) {\n this.selections.set(id, selection);\n }\n\n public renderSelections(\n path: string[] = [],\n opVars: Record = {},\n usedFragments: Map = new Map(),\n renderOnlyTheseSelections: SelectionWrapperImpl<\n string,\n string,\n number,\n any\n >[] = [],\n ) {\n const result: Record = {};\n const varDefs: string[] = [];\n const variables: Record = {};\n\n for (const [key, value] of [...this.selections.entries()].filter(\n ([k, v]) =>\n renderOnlyTheseSelections.length === 0 ||\n renderOnlyTheseSelections.find(\n (r) => r[SLW_UID] === v[SLW_UID],\n ),\n )) {\n const subPath = [...path, key];\n const {\n selection: fieldSelection,\n variableDefinitions: fieldVarDefs,\n variables: fieldVars,\n\n directive: directiveRendered,\n } = value[SLW_RENDER_WITH_ARGS](opVars);\n\n Object.assign(variables, fieldVars);\n Object.assign(opVars, fieldVars);\n varDefs.push(...fieldVarDefs);\n\n if (directiveRendered) {\n const {\n variableDefinitions: directiveVarDefs,\n variables: directiveVars,\n } = directiveRendered;\n\n varDefs.push(...directiveVarDefs);\n Object.assign(variables, directiveVars);\n Object.assign(opVars, directiveVars);\n }\n\n value[SLW_REGISTER_PATH](subPath);\n\n if (value[SLW_PARENT_COLLECTOR] === undefined) {\n if (directiveRendered) {\n result[key] =\n `${fieldSelection} ${directiveRendered.rendered}`;\n } else {\n result[key] = fieldSelection;\n }\n } else if (\n value[SLW_COLLECTOR] instanceof OperationSelectionCollector\n ) {\n const {\n selection: subSelection,\n variableDefinitions: subVarDefs,\n variables: subVars,\n } = value[SLW_COLLECTOR].renderSelections(\n subPath,\n opVars,\n usedFragments,\n );\n\n if (value[SLW_IS_ON_TYPE_FRAGMENT]) {\n if (directiveRendered) {\n result[key] =\n `... on ${value[SLW_IS_ON_TYPE_FRAGMENT]} ${directiveRendered.rendered} ${subSelection}`;\n } else {\n result[key] =\n `... on ${value[SLW_IS_ON_TYPE_FRAGMENT]} ${subSelection}`;\n }\n } else if (value[SLW_IS_FRAGMENT]) {\n const fragmentName = `${key}_${subVarDefs.map((v) => v.split(\":\")[0].slice(1)).join(\"_\")}`;\n\n if (directiveRendered) {\n result[key] =\n `...${fragmentName} ${directiveRendered.rendered}`;\n } else {\n result[key] = `...${fragmentName}`;\n }\n\n const fragment = `fragment ${fragmentName} on ${value[SLW_FIELD_TYPENAME]} ${subSelection}`;\n if (!usedFragments.has(fragmentName)) {\n usedFragments.set(fragmentName, fragment);\n } else if (usedFragments.get(fragmentName) !== fragment) {\n console.warn(\n `Fragment ${fragmentName} is already defined with a different selection`,\n );\n }\n } else {\n if (directiveRendered) {\n result[key] =\n `${fieldSelection} ${directiveRendered.rendered} ${subSelection}`;\n } else {\n result[key] = `${fieldSelection} ${subSelection}`;\n }\n }\n\n Object.assign(variables, subVars);\n Object.assign(opVars, subVars);\n varDefs.push(...subVarDefs);\n }\n }\n let rendered = \"{ \";\n for (const [key, value] of Object.entries(result).filter(\n ([k, v]) => v !== undefined,\n ) as [string, string][]) {\n const keyIsFieldName =\n value.startsWith(`${key} {`) || value.startsWith(`${key} (`);\n const isSubSelection = value.startsWith(\"{\");\n const isOnType = value.startsWith(\"... on\");\n const isFragment = value.startsWith(\"...\");\n if (key === value) {\n rendered += `${key} `;\n } else if (isOnType || isFragment || keyIsFieldName) {\n rendered += `${value} `;\n } else {\n rendered += `${key}${!isSubSelection ? \":\" : \"\"} ${value} `;\n }\n }\n rendered += \"}\";\n return {\n selection: rendered,\n variableDefinitions: varDefs,\n variables,\n usedFragments,\n };\n }\n\n private utilGet = (obj: Record, path: (string | number)[]) =>\n path.reduce((o, p) => o?.[p], obj);\n public getOperationResultPath(\n path: (string | number)[] = [],\n type?: string,\n ): T {\n if (!this.op) {\n throw new Error(\n \"OperationSelectionCollector is not registered to a root operation\",\n );\n }\n\n let result = this.operationResult;\n\n if (path.length === 0) return result as T;\n\n result = this.utilGet(result, path) as T;\n\n if (type && result && type in RootOperation[OPTIONS].scalars) {\n let depth = 0;\n let finalResult = result instanceof Array ? [...result] : result;\n\n while (result instanceof Array) {\n result = result[0];\n depth++;\n }\n\n const deepParse = (\n res: any | any[],\n depth: number,\n parse: (v: string) => any,\n ) => {\n if (depth === 0) {\n return parse(res);\n }\n return res.map((rarr: any) =>\n deepParse(rarr, depth - 1, parse),\n );\n };\n\n return deepParse(\n finalResult,\n depth,\n RootOperation[OPTIONS].scalars[\n type as keyof (typeof RootOperation)[typeof OPTIONS][\"scalars\"]\n ],\n ) as T;\n }\n\n return result as T;\n }\n}\n\nexport const SLW_UID = Symbol(\"SLW_UID\");\nexport const SLW_FIELD_NAME = Symbol(\"SLW_FIELD_NAME\");\nexport const SLW_FIELD_TYPENAME = Symbol(\"SLW_FIELD_TYPENAME\");\nexport const SLW_FIELD_ARR_DEPTH = Symbol(\"SLW_FIELD_ARR_DEPTH\");\nexport const SLW_IS_ROOT_TYPE = Symbol(\"SLW_IS_ROOT_TYPE\");\nexport const SLW_IS_ON_TYPE_FRAGMENT = Symbol(\"SLW_IS_ON_TYPE_FRAGMENT\");\nexport const SLW_IS_FRAGMENT = Symbol(\"SLW_IS_FRAGMENT\");\nexport const SLW_VALUE = Symbol(\"SLW_VALUE\");\nexport const SLW_ARGS = Symbol(\"SLW_ARGS\");\nexport const SLW_ARGS_META = Symbol(\"SLW_ARGS_META\");\nexport const SLW_DIRECTIVE = Symbol(\"SLW_DIRECTIVE\");\nexport const SLW_DIRECTIVE_ARGS = Symbol(\"SLW_DIRECTIVE_ARGS\");\nexport const SLW_DIRECTIVE_ARGS_META = Symbol(\"SLW_DIRECTIVE_ARGS_META\");\nexport const SLW_PARENT_SLW = Symbol(\"SLW_PARENT_SLW\");\nexport const SLW_LAZY_FLAG = Symbol(\"SLW_LAZY_FLAG\");\n\nexport const OP = Symbol(\"OP\");\nexport const ROOT_OP_COLLECTOR = Symbol(\"ROOT_OP_COLLECTOR\");\nexport const SLW_PARENT_COLLECTOR = Symbol(\"SLW_PARENT_COLLECTOR\");\nexport const SLW_COLLECTOR = Symbol(\"SLW_COLLECTOR\");\nexport const SLW_OP_PATH = Symbol(\"SLW_OP_PATH\");\nexport const SLW_REGISTER_PATH = Symbol(\"SLW_REGISTER_PATH\");\nexport const SLW_RENDER_WITH_ARGS = Symbol(\"SLW_RENDER_WITH_ARGS\");\n\nexport const SLW_RECREATE_VALUE_CALLBACK = Symbol(\n \"SLW_RECREATE_VALUE_CALLBACK\",\n);\n\nexport const SLW_CLONE = Symbol(\"SLW_CLONE\");\n\nexport class SelectionWrapperImpl<\n fieldName extends string,\n typeNamePure extends string,\n typeArrDepth extends number,\n valueT extends any = any,\n argsT extends Record | undefined = undefined,\n> {\n private generateUniqueId(): string {\n return (\n performance.now().toString(36) +\n Math.random().toString(36).substring(2)\n );\n }\n [SLW_CLONE](\n overrides: {\n SLW_OP_PATH?: string;\n } = {},\n ) {\n const slw = new SelectionWrapper(\n this[SLW_FIELD_NAME],\n this[SLW_FIELD_TYPENAME],\n this[SLW_FIELD_ARR_DEPTH],\n this[SLW_VALUE],\n this[SLW_COLLECTOR],\n this[SLW_PARENT_COLLECTOR],\n this[SLW_ARGS],\n this[SLW_ARGS_META],\n this[SLW_RECREATE_VALUE_CALLBACK],\n );\n slw[SLW_IS_ROOT_TYPE] = this[SLW_IS_ROOT_TYPE];\n slw[SLW_IS_ON_TYPE_FRAGMENT] = this[SLW_IS_ON_TYPE_FRAGMENT];\n slw[SLW_IS_FRAGMENT] = this[SLW_IS_FRAGMENT];\n slw[SLW_PARENT_SLW] = this[SLW_PARENT_SLW];\n slw[SLW_OP_PATH] = overrides.SLW_OP_PATH ?? this[SLW_OP_PATH];\n return slw;\n }\n\n readonly [SLW_UID] = this.generateUniqueId();\n [ROOT_OP_COLLECTOR]?: OperationSelectionCollectorRef;\n readonly [SLW_PARENT_COLLECTOR]?: OperationSelectionCollector;\n readonly [SLW_COLLECTOR]?: OperationSelectionCollector;\n\n [SLW_FIELD_NAME]?: fieldName;\n [SLW_FIELD_TYPENAME]?: typeNamePure;\n [SLW_FIELD_ARR_DEPTH]?: typeArrDepth;\n [SLW_VALUE]?: valueT;\n\n [SLW_IS_ROOT_TYPE]?: \"Query\" | \"Mutation\" | \"Subscription\";\n [SLW_IS_ON_TYPE_FRAGMENT]?: string;\n [SLW_IS_FRAGMENT]?: string;\n\n [SLW_ARGS]?: argsT;\n [SLW_ARGS_META]?: Record;\n [SLW_DIRECTIVE]?: string;\n [SLW_DIRECTIVE_ARGS]?: Record;\n [SLW_DIRECTIVE_ARGS_META]?: Record;\n\n [SLW_PARENT_SLW]?: SelectionWrapperImpl;\n [SLW_LAZY_FLAG]?: boolean;\n\n [SLW_RECREATE_VALUE_CALLBACK]?: () => valueT;\n constructor(\n fieldName?: fieldName,\n typeNamePure?: typeNamePure,\n typeArrDepth?: typeArrDepth,\n value?: valueT,\n collector?: OperationSelectionCollector,\n parent?: OperationSelectionCollector | OperationSelectionCollectorRef,\n args?: argsT,\n argsMeta?: Record,\n reCreateValueCallback?: () => valueT,\n ) {\n this[SLW_FIELD_NAME] = fieldName;\n this[SLW_FIELD_TYPENAME] = typeNamePure;\n this[SLW_FIELD_ARR_DEPTH] = typeArrDepth;\n this[SLW_VALUE] = value;\n\n this[SLW_ARGS] = args;\n this[SLW_ARGS_META] = argsMeta;\n\n if (parent instanceof OperationSelectionCollector) {\n this[SLW_PARENT_COLLECTOR] = parent;\n } else if (parent && \"ref\" in parent) {\n this[SLW_PARENT_COLLECTOR] = parent.ref;\n }\n\n if (collector instanceof OperationSelectionCollector) {\n this[SLW_COLLECTOR] = collector;\n\n let rootCollector = collector;\n while (\n rootCollector?.parent instanceof OperationSelectionCollector\n ) {\n rootCollector = rootCollector.parent;\n }\n if (rootCollector.parent && \"ref\" in rootCollector.parent) {\n this[ROOT_OP_COLLECTOR] = rootCollector.parent;\n }\n }\n\n if (reCreateValueCallback) {\n this[SLW_RECREATE_VALUE_CALLBACK] = reCreateValueCallback;\n }\n }\n\n [SLW_OP_PATH]?: string;\n [SLW_REGISTER_PATH](path: string[]) {\n if (!this[SLW_OP_PATH]) this[SLW_OP_PATH] = path.join(\".\");\n }\n [SLW_RENDER_WITH_ARGS](opVars: Record = {}) {\n const renderArgsString = (\n args: Record,\n argsMeta: Record,\n ) => {\n const argToVarMap: Record = {};\n let argsString = \"(\";\n const argsStringParts = [];\n for (const key of Object.keys(args)) {\n let varName = key;\n if (opVars[key] !== undefined) {\n varName = `${key}_${\n Object.keys(opVars).filter((k) => k.startsWith(key))\n .length\n }`;\n argToVarMap[varName] = varName;\n args[varName] = args[key];\n argsMeta[varName] = argsMeta[key];\n delete args[key];\n }\n argsStringParts.push(`${key}: $${varName}`);\n }\n argsString += argsStringParts.join(\", \").trim() + \")\";\n return { argsString, argToVarMap };\n };\n\n const directiveRender = {\n rendered: undefined as string | undefined,\n variables: {} as Record,\n variableDefinitions: [] as string[],\n };\n if (this[SLW_DIRECTIVE]) {\n const directive = this[SLW_DIRECTIVE];\n\n if (this[SLW_DIRECTIVE_ARGS]) {\n const args = this[SLW_DIRECTIVE_ARGS];\n const argsMeta = this[SLW_DIRECTIVE_ARGS_META]!;\n\n const { argsString, argToVarMap } = renderArgsString(\n args,\n argsMeta,\n );\n\n directiveRender.rendered = `@${directive}${Object.keys(args).length ? argsString : \"\"}`;\n directiveRender.variables = args;\n directiveRender.variableDefinitions = Object.keys(args).map(\n (key) => {\n const varName = argToVarMap[key] ?? key;\n return `$${varName}: ${argsMeta[key]}`;\n },\n );\n } else {\n directiveRender.rendered = `@${directive}`;\n }\n }\n\n if (this[SLW_ARGS]) {\n const args = this[SLW_ARGS];\n const argsMeta = this[SLW_ARGS_META]!;\n\n const { argsString, argToVarMap } = renderArgsString(\n args,\n argsMeta,\n );\n return {\n selection: `${this[SLW_FIELD_NAME]}${Object.keys(args).length ? argsString : \"\"}`,\n variables: args,\n variableDefinitions: Object.keys(args).map((key) => {\n const varName = argToVarMap[key] ?? key;\n return `$${varName}: ${argsMeta[key]}`;\n }),\n\n directive: directiveRender.rendered\n ? directiveRender\n : undefined,\n };\n }\n return {\n selection: this[SLW_FIELD_NAME],\n variables: {},\n variableDefinitions: [] as string[],\n\n directive: directiveRender.rendered ? directiveRender : undefined,\n };\n }\n}\nexport class SelectionWrapper<\n fieldName extends string,\n typeNamePure extends string,\n typeArrDepth extends number,\n valueT extends any = any,\n argsT extends Record | undefined = undefined,\n> extends Proxy<\n SelectionWrapperImpl\n> {\n constructor(\n fieldName?: fieldName,\n typeNamePure?: typeNamePure,\n typeArrDepth?: typeArrDepth,\n value?: valueT,\n collector?: OperationSelectionCollector,\n parent?: OperationSelectionCollector | OperationSelectionCollectorRef,\n args?: argsT,\n argsMeta?: Record,\n reCreateValueCallback?: () => valueT,\n ) {\n super(\n new SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT,\n argsT\n >(\n fieldName,\n typeNamePure,\n typeArrDepth,\n value,\n collector,\n parent,\n args,\n argsMeta,\n reCreateValueCallback,\n ),\n {\n // implement ProxyHandler methods\n ownKeys() {\n return Reflect.ownKeys(value ?? {});\n },\n getOwnPropertyDescriptor(target, prop) {\n return Reflect.getOwnPropertyDescriptor(value ?? {}, prop);\n },\n has(target, prop) {\n if (prop === Symbol.for(\"nodejs.util.inspect.custom\"))\n return true;\n return Reflect.has(value ?? {}, prop);\n },\n get: (target, prop) => {\n if (prop === \"$lazy\") {\n const that = this;\n function lazy(\n this: {\n parentSlw: SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT,\n argsT\n >;\n key: string;\n },\n args?: argsT,\n ) {\n const { parentSlw, key } = this;\n const newRootOpCollectorRef = {\n ref: new OperationSelectionCollector(\n undefined,\n undefined,\n new RootOperation(),\n ),\n };\n\n const newThisCollector =\n new OperationSelectionCollector(\n undefined,\n newRootOpCollectorRef,\n );\n const r =\n that[SLW_RECREATE_VALUE_CALLBACK]?.bind(\n newThisCollector,\n )();\n\n const newThat = new SelectionWrapper(\n that[SLW_FIELD_NAME],\n that[SLW_FIELD_TYPENAME],\n that[SLW_FIELD_ARR_DEPTH],\n r,\n newThisCollector,\n newRootOpCollectorRef,\n that[SLW_ARGS],\n that[SLW_ARGS_META],\n );\n Object.keys(r!).forEach(\n (key) =>\n (newThat as valueT)[key as keyof valueT],\n );\n\n newThat[SLW_IS_ROOT_TYPE] = that[SLW_IS_ROOT_TYPE];\n newThat[SLW_IS_ON_TYPE_FRAGMENT] =\n that[SLW_IS_ON_TYPE_FRAGMENT];\n newThat[SLW_IS_FRAGMENT] = that[SLW_IS_FRAGMENT];\n\n newThat[SLW_PARENT_SLW] = parentSlw;\n parentSlw[SLW_COLLECTOR]?.registerSelection(\n key,\n newThat,\n );\n newThat[SLW_ARGS] = {\n ...(that[SLW_ARGS] ?? {}),\n ...args,\n } as argsT;\n\n newThat[SLW_OP_PATH] = that[SLW_OP_PATH];\n\n newRootOpCollectorRef.ref.registerSelection(\n newThat[SLW_FIELD_NAME]!,\n newThat,\n );\n\n return new Promise((resolve, reject) => {\n newRootOpCollectorRef.ref\n .execute()\n .catch(reject)\n .then(() => {\n resolve(newThat);\n });\n });\n }\n target[SLW_LAZY_FLAG] = true;\n lazy[SLW_LAZY_FLAG] = true;\n return lazy;\n }\n if (\n prop === SLW_UID ||\n prop === SLW_FIELD_NAME ||\n prop === SLW_FIELD_TYPENAME ||\n prop === SLW_FIELD_ARR_DEPTH ||\n prop === SLW_IS_ROOT_TYPE ||\n prop === SLW_IS_ON_TYPE_FRAGMENT ||\n prop === SLW_IS_FRAGMENT ||\n prop === SLW_VALUE ||\n prop === SLW_ARGS ||\n prop === SLW_ARGS_META ||\n prop === SLW_DIRECTIVE ||\n prop === SLW_DIRECTIVE_ARGS ||\n prop === SLW_DIRECTIVE_ARGS_META ||\n prop === SLW_PARENT_SLW ||\n prop === SLW_LAZY_FLAG ||\n prop === ROOT_OP_COLLECTOR ||\n prop === SLW_PARENT_COLLECTOR ||\n prop === SLW_COLLECTOR ||\n prop === SLW_OP_PATH ||\n prop === SLW_REGISTER_PATH ||\n prop === SLW_RENDER_WITH_ARGS ||\n prop === SLW_RECREATE_VALUE_CALLBACK ||\n prop === SLW_CLONE\n ) {\n return target[\n prop as keyof SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT\n >\n ];\n }\n if (prop === SLW_VALUE) {\n return value;\n }\n if (prop === \"then\") {\n return this;\n }\n\n let slw_value = target[SLW_VALUE] as\n | Record\n | undefined;\n\n if (target[ROOT_OP_COLLECTOR]?.ref.isExecuted) {\n const getResultDataForTarget = (\n t: SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT,\n argsT\n >,\n ): valueT | undefined => {\n const data = t[\n ROOT_OP_COLLECTOR\n ]!.ref.getOperationResultPath(\n (t[SLW_OP_PATH]?.split(\".\") ?? []).map((p) =>\n !isNaN(+p) ? +p : p,\n ),\n t[SLW_FIELD_TYPENAME],\n );\n return data;\n };\n\n if (!Object.hasOwn(slw_value ?? {}, String(prop))) {\n // check if the selected field is an array\n if (typeArrDepth) {\n if (!isNaN(+String(prop))) {\n const elm = target[SLW_CLONE]({\n SLW_OP_PATH:\n target[SLW_OP_PATH] +\n \".\" +\n String(prop),\n });\n return elm;\n }\n\n const data = getResultDataForTarget(target) as\n | valueT[]\n | undefined;\n\n if (data === undefined) return undefined;\n\n const proxiedData = Array.from(\n { length: data.length },\n (_, i) =>\n target[SLW_CLONE]({\n SLW_OP_PATH:\n target[SLW_OP_PATH] +\n \".\" +\n String(i),\n }),\n );\n\n const proto =\n Object.getPrototypeOf(proxiedData);\n if (Object.hasOwn(proto, prop)) {\n const v = (proxiedData as any)[prop];\n if (typeof v === \"function\")\n return v.bind(proxiedData);\n return v;\n }\n\n return () => proxiedData;\n }\n\n const data = getResultDataForTarget(target);\n if (data === undefined) return undefined;\n const proto = Object.getPrototypeOf(data);\n if (Object.hasOwn(proto, prop)) {\n const v = (data as any)[prop];\n if (typeof v === \"function\")\n return v.bind(data);\n return v;\n }\n\n return () => data;\n }\n\n let slw = slw_value?.[String(prop)];\n const slwOpPathIsIndexAccess = !isNaN(\n +target[SLW_OP_PATH]?.split(\".\").pop()!,\n );\n if (slwOpPathIsIndexAccess) {\n // index access detected, cloning\n slw = slw[SLW_CLONE]({\n SLW_OP_PATH:\n target[SLW_OP_PATH] + \".\" + String(prop),\n });\n }\n\n if (\n slw instanceof SelectionWrapperImpl &&\n slw[SLW_PARENT_COLLECTOR]\n ) {\n return slw;\n } else if (slw instanceof SelectionWrapperImpl) {\n return getResultDataForTarget(slw);\n } else if (slw[SLW_LAZY_FLAG]) {\n return slw;\n }\n\n return getResultDataForTarget(target);\n }\n\n if (\n Object.hasOwn(slw_value ?? {}, String(prop)) &&\n slw_value?.[String(prop)] instanceof\n SelectionWrapperImpl\n ) {\n if (target[SLW_COLLECTOR]) {\n target[SLW_COLLECTOR].registerSelection(\n String(prop),\n slw_value[String(prop)],\n );\n }\n if (!slw_value[String(prop)][SLW_PARENT_SLW]) {\n slw_value[String(prop)][SLW_PARENT_SLW] = target;\n }\n }\n if (slw_value?.[String(prop)]?.[SLW_LAZY_FLAG]) {\n if (!slw_value[String(prop)][SLW_PARENT_SLW]) {\n const lazyFn = slw_value[String(prop)];\n slw_value[String(prop)] = lazyFn.bind({\n parentSlw: target,\n key: String(prop),\n });\n slw_value[String(prop)][SLW_PARENT_SLW] = target;\n slw_value[String(prop)][SLW_LAZY_FLAG] = true;\n }\n }\n\n return slw_value?.[String(prop)] ?? undefined;\n },\n },\n );\n }\n}\n";class L2 extends u5{P;O;static ScalarTypeMap=new Map([["String","string"],["Int","number"],["Float","number"],["Boolean","boolean"],["ID","string"],["Date","Date"],["DateTime","Date"],["DateTimeISO","Date"],["Time","Date"],["JSON","Record"]]);ScalarTypeMap=L2.ScalarTypeMap;static FieldValueWrapperType=Qq;static EnumTypesMapped=(D)=>{return`export interface EnumTypesMapped { ${Array.from(D.enumsTypes.keys()).map((P)=>P.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")).map((P)=>`"${P}": ${P},`).join("\n")} };`};static HelperTypes=` export interface ScalarTypeMapWithCustom {}; export interface ScalarTypeMapDefault { ${Array.from(L2.ScalarTypeMap).map(([D,P])=>`"${D}": ${P};`).join("\n")} }; type SelectionFnParent = { collector: OperationSelectionCollector | OperationSelectionCollectorRef; fieldName?: string; args?: Record; argsMeta?: Record; isRootType?: "Query" | "Mutation" | "Subscription"; onTypeFragment?: string; isFragment?: string; } | undefined; type CleanupNever = Omit & { [K in keyof A as A[K] extends never ? never : K]: A[K]; }; type Prettify = { [K in keyof T]: T[K]; } & {}; type SLWsFromSelection< S, R = { [K in keyof S]: S[K] extends SelectionWrapperImpl< infer FN, infer TNP, infer TAD > ? S[K] : never; }, > = Prettify>; type ReturnTypeFromFragment = T extends ( this: any, ...args: any[] ) => infer R ? R : never; type ArgumentsTypeFromFragment = T extends ( this: any, ...args: infer A ) => any ? A : never; type ReplaceReturnType = T extends (...a: any) => any ? ( ...a: Parameters ) => ReturnType extends Promise ? Promise : R : never; type SLW_TPN_ToType = TNP extends keyof ScalarTypeMapWithCustom ? ScalarTypeMapWithCustom[TNP] : TNP extends keyof ScalarTypeMapDefault ? ScalarTypeMapDefault[TNP] : TNP extends keyof EnumTypesMapped ? EnumTypesMapped[TNP] : never; type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...0[]]; type ToTArrayWithDepth = D extends 0 ? T : ToTArrayWithDepth; export type SLFN< T extends object, F, N extends string, TNP extends string, TAD extends number, E extends { [key: string | number | symbol]: any } = {}, REP extends string | number | symbol = never, > = ( makeSLFNInput: () => F, SLFN_name: N, SLFN_typeNamePure: TNP, SLFN_typeArrDepth: TAD, ) => ( this: any, s: (selection: FF) => TT, ) => ToTArrayWithDepth< { [K in keyof TT]: TT[K] extends SelectionWrapperImpl< infer FN, infer TTNP, infer TTAD, infer VT, infer AT > ? ToTArrayWithDepth, TTAD> : TT[K]; }, TAD > & { [k in keyof EE]: k extends REP ? EE[k] extends (...args: any) => any ? ReplaceReturnType< EE[k], ToTArrayWithDepth< { [K in keyof TT]: TT[K] extends SelectionWrapperImpl< infer FN, infer TTNP, infer TTAD, infer VT, infer AT > ? ToTArrayWithDepth, TTAD> : TT[K]; }, TAD > > : ToTArrayWithDepth< { [K in keyof TT]: TT[K] extends SelectionWrapperImpl< infer FN, infer TTNP, infer TTAD, infer VT, infer AT > ? ToTArrayWithDepth, TTAD> : TT[K]; }, TAD > : EE[k]; }; `;static HelperFunctions=` const selectScalars = (selection: Record) => Object.fromEntries( Object.entries(selection).filter( ([k, v]) => v instanceof SelectionWrapperImpl, ), ) as S; const makeSLFN = < T extends object, F, N extends string, TNP extends string, TAD extends number, >( makeSLFNInput: () => F, SLFN_name: N, SLFN_typeNamePure: TNP, SLFN_typeArrDepth: TAD, ) => { function _SLFN( this: any, s: (selection: FF) => TT, ) { let parent: SelectionFnParent = this ?? { collector: new OperationSelectionCollector(), }; function innerFn(this: any) { const selection: FF = makeSLFNInput.bind(this)() as any; const r = s(selection); const _result = new SelectionWrapper( parent?.fieldName, SLFN_typeNamePure, SLFN_typeArrDepth, r, this, parent?.collector, parent?.args, parent?.argsMeta, function (this: OperationSelectionCollector) { return s(makeSLFNInput.bind(this)() as FF); }, ); _result[SLW_IS_ROOT_TYPE] = parent?.isRootType; _result[SLW_IS_ON_TYPE_FRAGMENT] = parent?.onTypeFragment; _result[SLW_IS_FRAGMENT] = parent?.isFragment; Object.keys(r).forEach((key) => (_result as T)[key as keyof T]); const result = _result as unknown as T; if (parent?.onTypeFragment) { return { [parent.onTypeFragment]: result, } as unknown as typeof result; } if (parent?.isFragment) { return { [parent.isFragment]: result, } as unknown as typeof result; } return result; } return innerFn.bind( new OperationSelectionCollector(SLFN_name, parent?.collector), )(); } return _SLFN as ReturnType>; }; `;constructor(D,P,O){super(D,P,O);this.collector=P;this.options=O}makeEnumType(){let D=this.originalTypeNameToTypescriptTypeNameWithoutModifiers(this.originalFullTypeName);if(this.collector.hasEnumType(this.typeMeta))return D;if(this.typeMeta.enumValues.length===0)console.warn(`Schema contains empty enum: ${this.typeMeta.name}. \n This is not allowed in GraphQL, but it happens. Please check your schema. Code is still generated and will work, but the type is being set to undefined.`);let P=` export type ${D} = ${this.typeMeta.enumValues.length===0?"undefined":this.typeMeta.enumValues.map((O)=>`"${O.name}"`).join(" | ")}; export enum ${D}Enum { ${this.typeMeta.enumValues.map((O)=>`${O.description?`/** ${O.description} */\n`:""}${O.name} = "${O.name}",`).join("\n")} }; `;return this.collector.addEnumType(this.typeMeta,P),D}makeSelectionTypeInputValueForFieldWrapperType(D,P){let O=this.ScalarTypeMap.get(P.name.replaceAll("!","").replaceAll("[","").replaceAll("]",""))??"any";if(P.isList)return`${Array.from({length:P.isList}).map((W)=>"Array<").join("")}${O}${Array.from({length:P.isList}).map((W)=>">").join("")}`;return O}makeSelectionTypeInputValueForField(D,P=[],O=!1){let W=()=>{let R=D.args.some((B)=>B.type.isNonNull),L=`${P.join()}${D.name.slice(0,1).toUpperCase()}${D.name.slice(1)}Args`;if(!this.collector.hasArgumentType(L)){let Z=`{ ${D.args.map((H)=>{let Y=H.type.isScalar,q=H.type.isEnum,U=H.type.isInput,J=`${H.name}${H.type.isNonNull?"":"?"}`,A="any";if(Y)A=this.ScalarTypeMap.get(H.type.name.replaceAll("!",""))??"any";else if(U||q)A=this.originalTypeNameToTypescriptTypeName(H.type.name);return`${H.description?`/** ${H.description??`${J}`} */`:""} ${J}: ${A};`}).join(" ")} }`;this.collector.addArgumentType(L,`export type ${L} = ${Z};`)}return{argsTypeName:L,hasAtLeastOneNonNullArg:R}},F=D.description?`/* ${D.description} */\n`:"";if(D.type.isScalar||D.type.isEnum){let R=this.makeSelectionTypeInputValueForFieldWrapperType(D.name,D.type);if(this.collector.addSelectionType(D.type,R),D.hasArgs){let{argsTypeName:L,hasAtLeastOneNonNullArg:B}=W();return`${F}${D.name}: (args${B?"":"?"}: ${L}) => ${R};`}return`${F}${D.name}${D.type.isNonNull?"":"?"}: ${R};`}else if(D.type.ofType){let R=new L2(D.type.ofType.name,this.collector,this.options).makeSelectionFunction();if(D.hasArgs){let{argsTypeName:L,hasAtLeastOneNonNullArg:B}=W();return`${F}${D.name}: (args${B?"":"?"}: ${L} ) => typeof ${R};`}if(O)return`${F}${D.name}${D.type.isNonNull?"":"?"}: ${this.originalTypeNameToTypescriptTypeName(D.type.ofType.name)};`;return`${F}${D.name}: typeof ${R};`}else throw console.error(D.type),new Error(`Unknown type for field ${D.name}: ${D.type.name}`)}makeSelectionType(){if(this.typeMeta.isDirective)return"";if(this.typeMeta.isScalar||this.typeMeta.isEnum)return this.makeSelectionTypeInputValueForFieldWrapperType(this.typeName,this.typeMeta);let D=this.typeMeta.isInput?this.originalTypeNameToTypescriptTypeNameWithoutModifiers(this.originalFullTypeName):`${this.typeName}SelectionFields`;if(this.collector.hasSelectionType(this.typeMeta))return D;let P="";if(this.typeMeta.isUnion){let O=this.typeMeta.possibleTypes.map((W)=>`${this.originalTypeNameToTypescriptFriendlyName(W.name)}SelectionFields`).join(" | ");P=` export type ${D} = ${O}; `}else P=` export type ${D} = { ${(this.typeMeta.isInput?this.typeMeta.inputFields:this.typeMeta.fields).map((O)=>this.makeSelectionTypeInputValueForField(O,this.typeMeta.isInput?[]:[this.typeName],this.typeMeta.isInput)).join("\n")} }; `;return this.collector.addSelectionType(this.typeMeta,P),D}makeSelectionFunctionInputObjectValueForFieldWrapper(D,P){let O=`${P.join()}${D.name.slice(0,1).toUpperCase()}${D.name.slice(1)}Args`;return`${D.hasArgs?`(args: ${O}) => `:""}new SelectionWrapper( "${D.name}", "${D.type.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${D.type.isList??0}, {}, this, undefined, ${D.hasArgs?`args, ${O}Meta`:""})`}makeSelectionFunctionInputObjectValueForField(D,P){let O=()=>{let F=`${P.join()}${D.name.slice(0,1).toUpperCase()}${D.name.slice(1)}Args`;if(!this.collector.hasArgumentMeta(F)){let L=`{ ${D.args.map((B)=>{return`${B.name}: "${B.type.name}",`}).join(" ")} }`;this.collector.addArgumentMeta(F,`export const ${F}Meta = ${L} as const;`)}return{argsTypeName:F}},W=D.type;if(W.isScalar||W.isEnum){let F=this.makeSelectionFunctionInputObjectValueForFieldWrapper(D,P);if(D.hasArgs)O();return this.collector.addSelectionFunction(W,F),`${D.name}: ${F}`}else if(W.ofType){let F=new L2(W.ofType.name,this.collector,this.options).makeSelectionFunction();if(D.hasArgs){let{argsTypeName:R}=O();return`${D.name}: (args: ${R}) => ${F}.bind({ collector: this, fieldName: "${D.name}", args, argsMeta: ${R}Meta })`}return`${D.name}: ${F}.bind({ collector: this, fieldName: "${D.name}" })`}else throw console.error(W),new Error(`Unknown type for field ${D.name}: ${W.name}`)}makeDirective(){if(!this.typeMeta.isDirective)return"";let D=`_directive_${this.typeMeta.isDirective.name}`;if(this.collector.hasDirectiveFunction(this.typeMeta.isDirective))return D;let P=`${this.typeName}Args`;if(!this.collector.hasArgumentType(P)){let W=this.typeMeta.isDirective.args.map((F)=>{let R=F.type.isScalar,L=F.type.isEnum,B=F.type.isInput,Z=`${F.name}${F.type.isNonNull?"":"?"}`,H="any";if(R)H=this.ScalarTypeMap.get(F.type.name.replaceAll("!",""))??"any";else if(B||L)H=this.originalTypeNameToTypescriptTypeName(F.type.name);return` /** ${F.description??`${Z}`} */ ${Z}: ${H};`}).join(" ");this.collector.addArgumentType(P,`export type ${P} = { ${W} };`)}if(!this.collector.hasArgumentMeta(P)){let F=`{ ${this.typeMeta.isDirective.args.map((R)=>{return`${R.name}: "${R.type.name}",`}).join(" ")} }`;this.collector.addArgumentMeta(P,`export const ${P}Meta = ${F} as const;`)}let O=` export const ${D} = ( args: ${P} ) => ( f: F ) => { (f as any)[SLW_DIRECTIVE] = "${this.typeMeta.isDirective.name}"; (f as any)[SLW_DIRECTIVE_ARGS] = args; (f as any)[SLW_DIRECTIVE_ARGS_META] = ${P}Meta; return f; } `;return this.collector.addDirectiveFunction(this.typeMeta.isDirective,O),D}makeSelectionFunction(){if(this.typeMeta.isScalar||this.typeMeta.isEnum)return`new SelectionWrapper( "${this.typeName}", "${this.typeMeta.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${this.typeMeta.isList??0}, {}, this )`;let D=`${this.typeName}Selection`;if(this.collector.hasSelectionFunction(this.typeMeta))return D;else this.collector.addSelectionFunction(this.typeMeta,D);let P=this.typeMeta.fields.some((B)=>B.type.isScalar||B.type.isEnum),O=this.typeMeta.name===this.collector.QueryTypeName||this.typeMeta.name===this.collector.MutationTypeName||this.typeMeta.name===this.collector.SubscriptionTypeName,W="";if(this.typeMeta.isUnion)W=` \$on: { ${this.typeMeta.possibleTypes.map((B)=>`${B.name}: ${this.originalTypeNameToTypescriptFriendlyName(B.name)}Selection.bind({ collector: this, fieldName: "", onTypeFragment: "${B.name}", }),`).join("\n")} } `;else W=` \$fragment: any>(f: F) => f.bind({ collector: this, fieldName: "", isFragment: f.name, }) as ((...args: ArgumentsTypeFromFragment) => ReturnTypeFromFragment), ${P?` \$scalars: () => selectScalars( make${D}Input.bind(this)(), ) as SLWsFromSelection< ReturnType >, `:""}`;let F=new Map,R=` export function make${D}Input(this: any) ${this.typeMeta.isUnion?"":`: ReturnTypeFrom${D}`} { return { ${this.typeMeta.fields.map((B)=>[B,this.makeSelectionFunctionInputObjectValueForField(B,this.typeMeta.isInput?[]:[this.typeName])]).map(([B,Z])=>{return F.set(B.name,`${B.hasArgs?`( args: ${this.typeName}${B.name.slice(0,1).toUpperCase()}${B.name.slice(1)}Args ) =>`:""} ${B.type.isScalar||B.type.isEnum?`SelectionWrapperImpl<"${B.name}", "${B.type.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${B.type.isList}, {}, ${B.hasArgs?`${this.typeName}${B.name.slice(0,1).toUpperCase()}${B.name.slice(1)}Args`:"undefined"}>`:`ReturnType< SLFN< {}, ReturnType, "${super.originalTypeNameToTypescriptFriendlyName(B.type.name)}Selection", "${super.originalTypeNameToTypescriptTypeNameWithoutModifiers(B.type.name)}", ${B.type.isList??0} ${O?`, { \$lazy: ( ${B.hasArgs?`args: ${this.typeName}${B.name.slice(0,1).toUpperCase()}${B.name.slice(1)}Args`:""} ) => Promise<"T"> }, "\$lazy" `:""} > >`}`),`${Z},`}).join("\n")} ${W} } as const; }; export const ${D} = makeSLFN( ${`make${D}Input`}, "${D}", "${this.originalFullTypeName.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${this.typeMeta.isList??0} ); `,L=this.typeMeta.isUnion?"":` type ReturnTypeFrom${D} = { ${Array.from(F).map(([B,Z])=>`${B}: ${Z}`).join("\n")} } & { \$fragment: any>( f: F, ) => ( ...args: ArgumentsTypeFromFragment ) => ReturnTypeFromFragment; ${P?` \$scalars: () => SLWsFromSelection>; `:""} };`;return this.collector.addSelectionFunction(this.typeMeta,`${L} ${R} `),D}static makeRootOperationFunction(D,P){let{QueryTypeName:O,MutationTypeName:W,SubscriptionTypeName:F}=D,R=[...D.types.values()].filter((B)=>B.isDirective?.locations.some((Z)=>[$O.DirectiveLocation.FIELD,$O.DirectiveLocation.FRAGMENT_SPREAD,$O.DirectiveLocation.INLINE_FRAGMENT].includes(Z))).map((B)=>{return`"${B.isDirective.name}": ${new L2(B.name,D,{}).makeDirective()}`});return` ${R?.length?`export const \$directives = { ${R.join(",\n")} } as const;`:""} export function _makeRootOperationInput(this: any) { return { ${O&&D.types.has(O)?`query: ${O}Selection.bind({ collector: this, isRootType: "Query", }),`:""} ${W&&D.types.has(W)?`mutation: ${W}Selection.bind({ collector: this, isRootType: "Mutation", }),`:""} ${F&&D.types.has(F)?`subscription: ${F}Selection.bind({ collector: this, isRootType: "Subscription", }),`:""} ${R?.length?` \$directives,`:""} } as const; }; ${P?`type __AuthenticationArg__ = | string | { [key: string]: string } | (() => string | { [key: string]: string }) | (() => Promise);`:""} function __client__ < T extends object, F extends ReturnType>( this: any, s: (selection: F) => T ) { const root = new OperationSelectionCollector(undefined, undefined, new RootOperation()); const rootRef = { ref: root }; const selection: F = _makeRootOperationInput.bind(rootRef)() as any; const r = s(selection); const _result = new SelectionWrapper(undefined, undefined, undefined, r, root, undefined) as unknown as T; Object.keys(r).forEach((key) => (_result as T)[key as keyof T]); type excludeLazy = { [key in Exclude]: T[key] }; // remove the \$lazy property from the result const result = _result as { [k in keyof T]: T[k] extends { \$lazy: any } ? // if T[k] is an array and has a \$lazy property, return the type of the array elements T[k] extends (infer U)[] & { \$lazy: any } ? U[] : // if T[k] is an object and has a \$lazy property, return the type of the object excludeLazy : // if T[k] is a function and has a \$lazy property, return the type of the function T[k] extends (args: infer A) => Promise ? (args: A) => Promise : T[k]; }; type _TR = typeof result; type __HasPromisesAndOrNonPromisesK = { [k in keyof _TR]: _TR[k] extends (args: any) => Promise ? "promise" : "non-promise"; }; type __HasPromisesAndOrNonPromises = __HasPromisesAndOrNonPromisesK[keyof __HasPromisesAndOrNonPromisesK]; type finalReturnTypeBasedOnIfHasLazyPromises = __HasPromisesAndOrNonPromises extends "non-promise" ? Promise<_TR> : __HasPromisesAndOrNonPromises extends "promise" ? _TR : Promise<_TR>; let headers: Record | undefined = undefined; let returnValue: finalReturnTypeBasedOnIfHasLazyPromises; if (Object.values(result).some((v) => typeof v !== "function")) { returnValue = new Promise((resolve, reject) => { ${P?` const doExecute = () => { root.execute(headers) .then(() => { resolve(result); }) .catch(reject); } if (typeof RootOperation[OPTIONS]._auth_fn === "function") { const tokenOrPromise = RootOperation[OPTIONS]._auth_fn(); if (tokenOrPromise instanceof Promise) { tokenOrPromise.then((t) => { if (typeof t === "string") headers = { "${P.headerName}": t }; else headers = t; doExecute(); }); } else if (typeof tokenOrPromise === "string") { headers = { "${P.headerName}": tokenOrPromise }; doExecute(); } else { headers = tokenOrPromise; doExecute(); } } else { doExecute(); } `:` root.execute(headers) .then(() => { resolve(result); }) .catch(reject); `} }) as finalReturnTypeBasedOnIfHasLazyPromises; } else { returnValue = result as finalReturnTypeBasedOnIfHasLazyPromises; } ${P?` Object.defineProperty(returnValue, "auth", { enumerable: false, get: function () { return function ( auth: __AuthenticationArg__, ) { if (typeof auth === "string") { headers = { "${P.headerName}": auth }; } else if (typeof auth === "function") { const tokenOrPromise = auth(); if (tokenOrPromise instanceof Promise) { return tokenOrPromise.then((t) => { if (typeof t === "string") headers = { "${P.headerName}": t }; else headers = t; return returnValue; }); } if (typeof tokenOrPromise === "string") { headers = { "${P.headerName}": tokenOrPromise }; } else { headers = tokenOrPromise; } } else { headers = auth; } return returnValue; }; }, }); return returnValue as finalReturnTypeBasedOnIfHasLazyPromises & { auth: ( auth: __AuthenticationArg__, ) => finalReturnTypeBasedOnIfHasLazyPromises; }; `:` return returnValue; `} }; const __init__ = (options: { ${P?"auth?: __AuthenticationArg__;":""} headers?: { [key: string]: string }; scalars?: { [key in keyof ScalarTypeMapDefault]?: ( v: string, ) => ScalarTypeMapDefault[key]; } & { [key in keyof ScalarTypeMapWithCustom]?: ( v: string, ) => ScalarTypeMapWithCustom[key]; }; }) => { ${P?` if (typeof options.auth === "string") { RootOperation[OPTIONS].headers = { "${P.headerName}": options.auth, }; } else if (typeof options.auth === "function" ) { RootOperation[OPTIONS]._auth_fn = options.auth; } else if (options.auth) { RootOperation[OPTIONS].headers = options.auth; } `:""} if (options.headers) { RootOperation[OPTIONS].headers = { ...RootOperation[OPTIONS].headers, ...options.headers, }; } if (options.scalars) { RootOperation[OPTIONS].scalars = { ...RootOperation[OPTIONS].scalars, ...options.scalars, }; } }; Object.defineProperty(__client__, "init", { enumerable: false, value: __init__, }); export default __client__ as typeof __client__ & { init: typeof __init__; }; `}}class G8{P;O;static FieldValueWrapperType;static EnumTypesMapped;static HelperTypes;static HelperFunctions;typeMeta;typeName;originalFullTypeName;constructor(D,P,O){this.collector=P;this.options=O;this.typeMeta=P.getType(D),this.originalFullTypeName=D,this.typeName=this.originalTypeNameToTypescriptFriendlyName(D)}static originalTypeNameToTypescriptFriendlyName(D){return D.replaceAll("[","").replaceAll("]","Array").replaceAll("!","")}originalTypeNameToTypescriptFriendlyName(D){return G8.originalTypeNameToTypescriptFriendlyName(D)}static originalTypeNameToTypescriptTypeNameWithoutModifiers(D,P=""){return`${D.replaceAll("[","").replaceAll("]","").replaceAll("!","")}${P}`}originalTypeNameToTypescriptTypeNameWithoutModifiers(D,P=""){return G8.originalTypeNameToTypescriptTypeNameWithoutModifiers(D,P)}static originalTypeNameToTypescriptTypeName(D,P=""){return`${this.originalTypeNameToTypescriptTypeNameWithoutModifiers(D,P)}${Array.from({length:D.split("[").length-1}).fill("[]").join("")}`}originalTypeNameToTypescriptTypeName(D,P=""){return G8.originalTypeNameToTypescriptTypeName(D,P)}static makeRootOperationFunction(D,P,O,W){throw new Error("Method not implemented.")}}var Cq="const Proxy = global.Proxy;\nProxy.prototype = {};\n\nexport const _ = Symbol(\"_\") as any;\nexport const OPTIONS = Symbol(\"OPTIONS\");\nexport class RootOperation {\n public static [OPTIONS] = {\n headers: {},\n _auth_fn: undefined as\n | (() => string | { [key: string]: string })\n | (() => Promise)\n | undefined,\n scalars: {\n DateTime: (value: string) => new Date(value),\n DateTimeISO: (value: string) => new Date(value),\n Date: (value: string) => new Date(value),\n Time: (value: string) => new Date(value),\n JSON: (value: string) => JSON.parse(value),\n },\n };\n\n private utilSet = (obj: Record, path: string[], value: any) =>\n path.reduce(\n (o, p, i, a) => (o[p] = a.length - 1 === i ? value : o[p] || {}),\n obj,\n );\n\n private rootCollector: OperationSelectionCollector | undefined = undefined;\n public registerRootCollector(collector: OperationSelectionCollector) {\n this.rootCollector = collector;\n }\n public async execute(headers: Record = {}) {\n if (!this.rootCollector) {\n throw new Error(\"RootOperation has no registered collector\");\n }\n\n type selection = ReturnType<\n typeof OperationSelectionCollector.prototype.renderSelections\n >;\n const operations: {\n [key: string]: {\n selection: selection;\n rootSlw: SelectionWrapperImpl;\n };\n } = {};\n for (const [\n opName,\n opSelection,\n ] of this.rootCollector?.selections.entries()) {\n if (opSelection[SLW_LAZY_FLAG]) continue;\n\n const rootSlw = opSelection;\n const selection = rootSlw[SLW_PARENT_COLLECTOR]!.renderSelections(\n [],\n [rootSlw],\n );\n\n operations[opName] = {\n selection,\n rootSlw,\n };\n }\n\n const ops = Object.entries(operations).reduce(\n (acc, [opName, { selection, rootSlw }]) => {\n const bodyVarDefCount = Object.entries(\n selection.variableDefinitions,\n ).filter(([_, v]) => v.location === \"body\").length;\n const body =\n bodyVarDefCount === 0\n ? undefined\n : bodyVarDefCount === 1 &&\n Object.keys(selection.variableDefinitions)\n .length === 1\n ? selection.variables\n : bodyVarDefCount === 1 &&\n \"$body\" in selection.variableDefinitions &&\n \"$body\" in selection.variables\n ? selection.variables[\"$body\"]\n : Object.fromEntries(\n Object.entries(selection.variableDefinitions)\n .filter(([_, v]) => v.location === \"body\")\n .map(([k, _]) => [\n k,\n selection.variables[k],\n ]),\n );\n\n return {\n ...acc,\n [opName]: {\n path: rootSlw[ROOT_OP_META]!.path,\n method: rootSlw[ROOT_OP_META]!.method,\n header: Object.fromEntries(\n Object.entries(selection.variableDefinitions)\n .filter(([_, v]) => v.location === \"header\")\n .map(([k, v]) => [k, selection.variables[k]]),\n ),\n params: {\n path: Object.fromEntries(\n Object.entries(selection.variableDefinitions)\n .filter(([_, v]) => v.location === \"path\")\n .map(([k, v]) => [\n k,\n selection.variables[k],\n ]),\n ),\n query: Object.fromEntries(\n Object.entries(selection.variableDefinitions)\n .filter(([_, v]) => v.location === \"query\")\n .map(([k, v]) => [\n k,\n selection.variables[k],\n ]),\n ),\n },\n body,\n cookie: Object.fromEntries(\n Object.entries(selection.variableDefinitions)\n .filter(([_, v]) => v.location === \"cookie\")\n .map(([k, v]) => [k, selection.variables[k]]),\n ),\n },\n };\n },\n {} as Record<\n string,\n {\n path: string;\n method:\n | \"get\"\n | \"post\"\n | \"put\"\n | \"delete\"\n | \"patch\"\n | \"head\"\n | \"options\"\n | \"trace\";\n header: Record;\n params: {\n path: Record;\n query: Record;\n };\n body: Record;\n cookie: Record;\n }\n >,\n );\n // const subscription = `{${subscriptions.join(\"\")}}`;\n\n const results = Object.fromEntries(\n await Promise.all([\n ...Object.entries(ops).map(\n async ([opName, op]) =>\n [\n opName,\n await this.executeOperation(op, headers),\n ] as const,\n ),\n ]),\n );\n\n return results;\n }\n\n private async executeOperation(\n request: {\n path: string;\n method:\n | \"get\"\n | \"post\"\n | \"put\"\n | \"delete\"\n | \"patch\"\n | \"head\"\n | \"options\"\n | \"trace\";\n header: Record;\n params: {\n path: Record;\n query: Record;\n };\n body: Record;\n cookie: Record;\n },\n headers: Record = {},\n ) {\n let finalPath = request.path.replace(/\\{([^}]+)\\}/g, (_, key) => {\n return request.params.path[key];\n });\n const finalQuery = new URLSearchParams(request.params.query).toString();\n // remove the '{?arg1, arg2, ...}' part from the finalPath and add the finalQuery to the end\n finalPath = `${finalPath.replace(/\\{.*?\\}$/, \"\")}${\n finalQuery ? `?${finalQuery}` : \"\"\n }`;\n const cookies = new URLSearchParams(request.cookie).toString();\n\n const res = await fetch(`[ENDPOINT]${finalPath}`, {\n method: request.method,\n headers: {\n ...(request.body ? { \"Content-Type\": \"application/json\" } : {}),\n ...(request.header ? request.header : {}),\n ...(cookies ? { Cookie: cookies } : {}),\n ...headers,\n },\n body: request.body ? JSON.stringify(request.body) : undefined,\n });\n\n if (!res.ok) {\n throw new Error(`${res.statusText}: ${await res.text()}`);\n }\n\n const data = (await res.json()) as any;\n\n return data;\n }\n}\n\nexport type OperationSelectionCollectorRef = {\n ref: OperationSelectionCollector;\n};\nexport class OperationSelectionCollector {\n constructor(\n public readonly name?: string,\n public readonly parent?:\n | OperationSelectionCollector\n | OperationSelectionCollectorRef,\n public readonly op?: RootOperation,\n ) {\n if (op) op.registerRootCollector(this);\n }\n\n private executed = false;\n private operationResult: any | undefined = undefined;\n public async execute(\n headers: Record = RootOperation[OPTIONS].headers,\n ) {\n if (!this.op) {\n throw new Error(\n \"OperationSelectionCollector is not registered to a root operation\",\n );\n }\n this.operationResult = await this.op.execute(headers);\n this.executed = true;\n }\n public get isExecuted() {\n return this.executed;\n }\n\n public readonly selections = new Map<\n string,\n SelectionWrapperImpl\n >();\n public registerSelection(\n id: string,\n selection: SelectionWrapperImpl,\n ) {\n this.selections.set(id, selection);\n }\n\n public renderSelections(\n path: string[] = [],\n renderOnlyTheseSelections: SelectionWrapperImpl<\n string,\n string,\n number,\n any\n >[] = [],\n ) {\n const varDefs: Record<\n string,\n {\n type: string;\n location: \"path\" | \"query\" | \"header\" | \"cookie\" | \"body\";\n }\n > = {};\n const variables: Record = {};\n\n for (const [key, value] of [...this.selections.entries()].filter(\n ([k, v]) =>\n renderOnlyTheseSelections.length === 0 ||\n renderOnlyTheseSelections.find(\n (r) => r[SLW_UID] === v[SLW_UID],\n ),\n )) {\n const subPath = [...path, key];\n const { variableDefinitions: fieldVarDefs, variables: fieldVars } =\n value[SLW_RENDER_WITH_ARGS]();\n\n Object.assign(variables, fieldVars);\n Object.assign(varDefs, fieldVarDefs);\n\n value[SLW_REGISTER_PATH](subPath);\n\n if (value[SLW_PARENT_COLLECTOR] === undefined) {\n // do nothing\n } else if (\n value[SLW_COLLECTOR] instanceof OperationSelectionCollector\n ) {\n const { variableDefinitions: subVarDefs, variables: subVars } =\n value[SLW_COLLECTOR].renderSelections(subPath);\n\n Object.assign(variables, subVars);\n Object.assign(varDefs, subVarDefs);\n }\n }\n\n return {\n variableDefinitions: varDefs,\n variables,\n };\n }\n\n private utilGet = (obj: Record, path: (string | number)[]) =>\n path.reduce((o, p) => o?.[p], obj);\n public getOperationResultPath(\n path: (string | number)[] = [],\n type?: string,\n ): T {\n if (!this.op) {\n throw new Error(\n \"OperationSelectionCollector is not registered to a root operation\",\n );\n }\n\n let result = this.operationResult;\n\n if (path.length === 0) return result as T;\n\n result = this.utilGet(result, path) as T;\n\n if (type && result && type in RootOperation[OPTIONS].scalars) {\n let depth = 0;\n let finalResult = result instanceof Array ? [...result] : result;\n\n while (result instanceof Array) {\n result = result[0];\n depth++;\n }\n\n const deepParse = (\n res: any | any[],\n depth: number,\n parse: (v: string) => any,\n ) => {\n if (depth === 0) {\n return parse(res);\n }\n return res.map((rarr: any) =>\n deepParse(rarr, depth - 1, parse),\n );\n };\n\n return deepParse(\n finalResult,\n depth,\n RootOperation[OPTIONS].scalars[\n type as keyof (typeof RootOperation)[typeof OPTIONS][\"scalars\"]\n ],\n ) as T;\n }\n\n return result as T;\n }\n}\n\nexport const SLW_UID = Symbol(\"SLW_UID\");\nexport const SLW_FIELD_NAME = Symbol(\"SLW_FIELD_NAME\");\nexport const SLW_FIELD_TYPENAME = Symbol(\"SLW_FIELD_TYPENAME\");\nexport const SLW_FIELD_ARR_DEPTH = Symbol(\"SLW_FIELD_ARR_DEPTH\");\n\nexport const ROOT_OP_META = Symbol(\"ROOT_OP_META\");\n\nexport const SLW_VALUE = Symbol(\"SLW_VALUE\");\nexport const SLW_ARGS = Symbol(\"SLW_ARGS\");\nexport const SLW_ARGS_META = Symbol(\"SLW_ARGS_META\");\nexport const SLW_PARENT_SLW = Symbol(\"SLW_PARENT_SLW\");\nexport const SLW_LAZY_FLAG = Symbol(\"SLW_LAZY_FLAG\");\n\nexport const OP = Symbol(\"OP\");\nexport const ROOT_OP_COLLECTOR = Symbol(\"ROOT_OP_COLLECTOR\");\nexport const SLW_PARENT_COLLECTOR = Symbol(\"SLW_PARENT_COLLECTOR\");\nexport const SLW_COLLECTOR = Symbol(\"SLW_COLLECTOR\");\nexport const SLW_OP_PATH = Symbol(\"SLW_OP_PATH\");\nexport const SLW_REGISTER_PATH = Symbol(\"SLW_REGISTER_PATH\");\nexport const SLW_RENDER_WITH_ARGS = Symbol(\"SLW_RENDER_WITH_ARGS\");\n\nexport const SLW_RECREATE_VALUE_CALLBACK = Symbol(\n \"SLW_RECREATE_VALUE_CALLBACK\",\n);\n\nexport const SLW_CLONE = Symbol(\"SLW_CLONE\");\n\nexport const OP_SCALAR_RESULT = Symbol(\"OP_SCALAR_RESULT\");\nexport const SLW_IS_SCALAR_OP = Symbol(\"SLW_IS_SCALAR_OP\");\n\nexport class SelectionWrapperImpl<\n fieldName extends string,\n typeNamePure extends string,\n typeArrDepth extends number,\n valueT extends any = any,\n argsT extends Record | any | undefined = undefined,\n> {\n private generateUniqueId(): string {\n return (\n performance.now().toString(36) +\n Math.random().toString(36).substring(2)\n );\n }\n [SLW_CLONE](\n overrides: {\n SLW_OP_PATH?: string;\n } = {},\n ) {\n const slw = new SelectionWrapper(\n this[SLW_FIELD_NAME],\n this[SLW_FIELD_TYPENAME],\n this[SLW_FIELD_ARR_DEPTH],\n this[SLW_VALUE],\n this[SLW_COLLECTOR],\n this[SLW_PARENT_COLLECTOR],\n this[SLW_ARGS],\n this[SLW_ARGS_META],\n this[SLW_RECREATE_VALUE_CALLBACK],\n this[SLW_IS_SCALAR_OP],\n );\n slw[ROOT_OP_META] = this[ROOT_OP_META];\n slw[SLW_PARENT_SLW] = this[SLW_PARENT_SLW];\n slw[SLW_OP_PATH] = overrides.SLW_OP_PATH ?? this[SLW_OP_PATH];\n return slw;\n }\n\n readonly [SLW_UID] = this.generateUniqueId();\n [ROOT_OP_COLLECTOR]?: OperationSelectionCollectorRef;\n readonly [SLW_PARENT_COLLECTOR]?: OperationSelectionCollector;\n readonly [SLW_COLLECTOR]?: OperationSelectionCollector;\n\n [SLW_FIELD_NAME]?: fieldName;\n [SLW_FIELD_TYPENAME]?: typeNamePure;\n [SLW_FIELD_ARR_DEPTH]?: typeArrDepth;\n [SLW_VALUE]?: valueT;\n\n [ROOT_OP_META]?: {\n path: string;\n method:\n | \"get\"\n | \"post\"\n | \"put\"\n | \"delete\"\n | \"patch\"\n | \"head\"\n | \"options\"\n | \"trace\";\n };\n\n [SLW_ARGS]?: argsT;\n [SLW_ARGS_META]?: Record<\n string,\n {\n type: string;\n location: \"path\" | \"query\" | \"header\" | \"cookie\" | \"body\";\n }\n >;\n\n [SLW_PARENT_SLW]?: SelectionWrapperImpl;\n [SLW_LAZY_FLAG]?: boolean;\n\n [SLW_RECREATE_VALUE_CALLBACK]?: () => valueT;\n\n [SLW_IS_SCALAR_OP]?: boolean;\n\n constructor(\n fieldName?: fieldName,\n typeNamePure?: typeNamePure,\n typeArrDepth?: typeArrDepth,\n value?: valueT,\n collector?: OperationSelectionCollector,\n parent?: OperationSelectionCollector | OperationSelectionCollectorRef,\n args?: argsT,\n argsMeta?: Record<\n string,\n {\n type: string;\n location: \"path\" | \"query\" | \"header\" | \"cookie\" | \"body\";\n }\n >,\n reCreateValueCallback?: () => valueT,\n isScalarOp?: boolean,\n ) {\n this[SLW_FIELD_NAME] = fieldName;\n this[SLW_FIELD_TYPENAME] = typeNamePure;\n this[SLW_FIELD_ARR_DEPTH] = typeArrDepth;\n this[SLW_VALUE] = value;\n\n this[SLW_ARGS] = args;\n this[SLW_ARGS_META] = argsMeta;\n\n if (parent instanceof OperationSelectionCollector) {\n this[SLW_PARENT_COLLECTOR] = parent;\n } else if (parent && \"ref\" in parent) {\n this[SLW_PARENT_COLLECTOR] = parent.ref;\n }\n\n if (collector instanceof OperationSelectionCollector) {\n this[SLW_COLLECTOR] = collector;\n\n let rootCollector = collector;\n while (\n rootCollector?.parent instanceof OperationSelectionCollector\n ) {\n rootCollector = rootCollector.parent;\n }\n if (rootCollector.parent && \"ref\" in rootCollector.parent) {\n this[ROOT_OP_COLLECTOR] = rootCollector.parent;\n }\n }\n\n if (reCreateValueCallback) {\n this[SLW_RECREATE_VALUE_CALLBACK] = reCreateValueCallback;\n }\n if (isScalarOp !== undefined) {\n this[SLW_IS_SCALAR_OP] = isScalarOp;\n }\n }\n\n [SLW_OP_PATH]?: string;\n [SLW_REGISTER_PATH](path: string[]) {\n if (!this[SLW_OP_PATH]) this[SLW_OP_PATH] = path.join(\".\");\n }\n [SLW_RENDER_WITH_ARGS]() {\n if (this[SLW_ARGS]) {\n const args = this[SLW_ARGS];\n const argsMeta = this[SLW_ARGS_META]!;\n\n if (typeof args !== \"object\" || Array.isArray(args)) {\n return {\n variables: args,\n variableDefinitions: argsMeta,\n };\n }\n\n return {\n variables: args ?? {},\n variableDefinitions: argsMeta?.[\"$body\"]\n ? argsMeta ?? {}\n : args\n ? Object.keys(args).reduce(\n (acc, key) => {\n acc[key] = argsMeta?.[key];\n return acc;\n },\n {} as Record<\n string,\n {\n type: string;\n location:\n | \"path\"\n | \"query\"\n | \"header\"\n | \"cookie\"\n | \"body\";\n }\n >,\n )\n : {},\n };\n }\n return {\n variables: {},\n variableDefinitions: {} as Record<\n string,\n {\n type: string;\n location: \"path\" | \"query\" | \"header\" | \"cookie\" | \"body\";\n }\n >,\n };\n }\n}\nexport class SelectionWrapper<\n fieldName extends string,\n typeNamePure extends string,\n typeArrDepth extends number,\n valueT extends any = any,\n argsT extends Record | any | undefined = undefined,\n> extends Proxy<\n SelectionWrapperImpl\n> {\n constructor(\n fieldName?: fieldName,\n typeNamePure?: typeNamePure,\n typeArrDepth?: typeArrDepth,\n value?: valueT,\n collector?: OperationSelectionCollector,\n parent?: OperationSelectionCollector | OperationSelectionCollectorRef,\n args?: argsT,\n argsMeta?: Record<\n string,\n {\n type: string;\n location: \"path\" | \"query\" | \"header\" | \"cookie\" | \"body\";\n }\n >,\n reCreateValueCallback?: () => valueT,\n isScalarOp?: boolean,\n ) {\n super(\n new SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT,\n argsT\n >(\n fieldName,\n typeNamePure,\n typeArrDepth,\n value,\n collector,\n parent,\n args,\n argsMeta,\n reCreateValueCallback,\n isScalarOp,\n ),\n {\n // implement ProxyHandler methods\n ownKeys() {\n return Reflect.ownKeys(value ?? {});\n },\n getOwnPropertyDescriptor(target, prop) {\n return Reflect.getOwnPropertyDescriptor(value ?? {}, prop);\n },\n has(target, prop) {\n if (prop === Symbol.for(\"nodejs.util.inspect.custom\"))\n return true;\n return Reflect.has(value ?? {}, prop);\n },\n get: (target, prop) => {\n if (prop === \"$lazy\") {\n const that = this;\n function lazy(\n this: {\n parentSlw: SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT,\n argsT\n >;\n key: string;\n },\n args?: argsT,\n ) {\n const { parentSlw, key } = this;\n const newRootOpCollectorRef = {\n ref: new OperationSelectionCollector(\n undefined,\n undefined,\n new RootOperation(),\n ),\n };\n\n const newThisCollector =\n new OperationSelectionCollector(\n undefined,\n newRootOpCollectorRef,\n );\n const r =\n that[SLW_RECREATE_VALUE_CALLBACK]?.bind(\n newThisCollector,\n )();\n\n const newThat = new SelectionWrapper(\n that[SLW_FIELD_NAME],\n that[SLW_FIELD_TYPENAME],\n that[SLW_FIELD_ARR_DEPTH],\n r,\n newThisCollector,\n newRootOpCollectorRef,\n that[SLW_ARGS],\n that[SLW_ARGS_META],\n that[SLW_RECREATE_VALUE_CALLBACK],\n that[SLW_IS_SCALAR_OP],\n );\n Object.keys(r!).forEach(\n (key) =>\n (newThat as valueT)[key as keyof valueT],\n );\n\n newThat[ROOT_OP_META] = that[ROOT_OP_META];\n\n newThat[SLW_PARENT_SLW] = parentSlw;\n parentSlw[SLW_COLLECTOR]?.registerSelection(\n key,\n newThat,\n );\n newThat[SLW_ARGS] = {\n ...(that[SLW_ARGS] ?? {}),\n ...(args as any), // need to fix this\n } as argsT;\n\n newThat[SLW_OP_PATH] = that[SLW_OP_PATH];\n\n newRootOpCollectorRef.ref.registerSelection(\n newThat[SLW_FIELD_NAME]!,\n newThat,\n );\n\n return new Promise((resolve, reject) => {\n newRootOpCollectorRef.ref\n .execute()\n .catch(reject)\n .then(() => {\n resolve(newThat);\n });\n });\n }\n target[SLW_LAZY_FLAG] = true;\n lazy[SLW_LAZY_FLAG] = true;\n return lazy;\n }\n if (prop === SLW_VALUE && target[SLW_IS_SCALAR_OP]) {\n return (target[SLW_VALUE] as any)[OP_SCALAR_RESULT];\n }\n if (\n prop === SLW_UID ||\n prop === SLW_FIELD_NAME ||\n prop === SLW_FIELD_TYPENAME ||\n prop === SLW_FIELD_ARR_DEPTH ||\n prop === ROOT_OP_META ||\n prop === SLW_ARGS ||\n prop === SLW_ARGS_META ||\n prop === SLW_PARENT_SLW ||\n prop === SLW_LAZY_FLAG ||\n prop === ROOT_OP_COLLECTOR ||\n prop === SLW_PARENT_COLLECTOR ||\n prop === SLW_COLLECTOR ||\n prop === SLW_OP_PATH ||\n prop === SLW_VALUE ||\n prop === SLW_REGISTER_PATH ||\n prop === SLW_RENDER_WITH_ARGS ||\n prop === SLW_RECREATE_VALUE_CALLBACK ||\n prop === SLW_CLONE ||\n prop === SLW_IS_SCALAR_OP\n ) {\n return target[\n prop as keyof SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT\n >\n ];\n }\n if (prop === SLW_VALUE) {\n return value;\n }\n if (prop === \"then\") {\n return this;\n }\n\n let slw_value = target[SLW_VALUE] as\n | Record\n | undefined;\n\n if (target[ROOT_OP_COLLECTOR]?.ref.isExecuted) {\n const getResultDataForTarget = (\n t: SelectionWrapperImpl<\n fieldName,\n typeNamePure,\n typeArrDepth,\n valueT,\n argsT\n >,\n ): valueT | undefined => {\n const data = t[\n ROOT_OP_COLLECTOR\n ]!.ref.getOperationResultPath(\n (t[SLW_OP_PATH]?.split(\".\") ?? []).map((p) =>\n !isNaN(+p) ? +p : p,\n ),\n t[SLW_FIELD_TYPENAME],\n );\n return data;\n };\n\n if (!Object.hasOwn(slw_value ?? {}, String(prop))) {\n // check if the selected field is an array\n if (typeArrDepth) {\n if (!isNaN(+String(prop))) {\n const elm = target[SLW_CLONE]({\n SLW_OP_PATH:\n target[SLW_OP_PATH] +\n \".\" +\n String(prop),\n });\n return elm;\n }\n\n const data = getResultDataForTarget(target) as\n | valueT[]\n | undefined;\n\n if (data === undefined) return undefined;\n\n const proxiedData = Array.from(\n { length: data.length },\n (_, i) =>\n target[SLW_CLONE]({\n SLW_OP_PATH:\n target[SLW_OP_PATH] +\n \".\" +\n String(i),\n }),\n );\n\n const proto =\n Object.getPrototypeOf(proxiedData);\n if (Object.hasOwn(proto, prop)) {\n const v = (proxiedData as any)[prop];\n if (typeof v === \"function\")\n return v.bind(proxiedData);\n return v;\n }\n\n return () => proxiedData;\n }\n\n const data = getResultDataForTarget(target);\n if (data === undefined) return undefined;\n const proto = Object.getPrototypeOf(data);\n if (Object.hasOwn(proto, prop)) {\n const v = (data as any)[prop];\n if (typeof v === \"function\")\n return v.bind(data);\n return v;\n }\n\n return () => data;\n }\n\n let slw = slw_value?.[String(prop)];\n const slwOpPathIsIndexAccess = !isNaN(\n +target[SLW_OP_PATH]?.split(\".\").pop()!,\n );\n if (slwOpPathIsIndexAccess) {\n // index access detected, cloning\n slw = slw[SLW_CLONE]({\n SLW_OP_PATH:\n target[SLW_OP_PATH] + \".\" + String(prop),\n });\n }\n\n if (\n slw instanceof SelectionWrapperImpl &&\n slw[SLW_PARENT_COLLECTOR]\n ) {\n return slw;\n } else if (slw instanceof SelectionWrapperImpl) {\n return getResultDataForTarget(slw);\n } else if (slw[SLW_LAZY_FLAG]) {\n return slw;\n }\n\n return getResultDataForTarget(target);\n }\n\n if (\n Object.hasOwn(slw_value ?? {}, String(prop)) &&\n slw_value?.[String(prop)] instanceof\n SelectionWrapperImpl\n ) {\n if (target[SLW_COLLECTOR]) {\n target[SLW_COLLECTOR].registerSelection(\n String(prop),\n slw_value[String(prop)],\n );\n }\n if (!slw_value[String(prop)][SLW_PARENT_SLW]) {\n slw_value[String(prop)][SLW_PARENT_SLW] = target;\n }\n }\n if (slw_value?.[String(prop)]?.[SLW_LAZY_FLAG]) {\n if (!slw_value[String(prop)][SLW_PARENT_SLW]) {\n const lazyFn = slw_value[String(prop)];\n slw_value[String(prop)] = lazyFn.bind({\n parentSlw: target,\n key: String(prop),\n });\n slw_value[String(prop)][SLW_PARENT_SLW] = target;\n slw_value[String(prop)][SLW_LAZY_FLAG] = true;\n }\n }\n\n return slw_value?.[String(prop)] ?? undefined;\n },\n },\n );\n }\n}\n";class d0 extends G8{P;O;static ScalarTypeMap=new Map([["String","string"],["Int","number"],["Float","number"],["Boolean","boolean"],["ID","string"],["Date","Date"],["DateTime","Date"],["DateTimeISO","Date"],["Time","Date"],["JSON","Record"]]);ScalarTypeMap=()=>new Map([...d0.ScalarTypeMap.entries()]);static FieldValueWrapperType=Cq;static EnumTypesMapped=(D)=>{return`export interface EnumTypesMapped { ${Array.from(D.enumsTypes.keys()).map((P)=>P.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")).filter((P,O,W)=>W.indexOf(P)===O).map((P)=>`"${P}": ${P},`).join("\n")} };`};static UnionTypesMapped=(D)=>{return`export interface UnionTypesMapped { ${Array.from(D.types.entries()).filter(([P,O])=>O.isUnion).map(([P,O])=>[P.replaceAll("[","").replaceAll("]","").replaceAll("!",""),O]).filter(([P,O],W,F)=>F.map(([R])=>R).indexOf(P)===W).map(([P,O])=>`"${P}": ${P}${O.isList&&!O.isInput?"Array":""};`).filter((P,O,W)=>W.indexOf(P)===O).join("\n")} };`};static HelperTypes=(D)=>` export interface ScalarTypeMapWithCustom { ${D.map((P)=>`"${P.name}": ${P.scalarTSType};`).join("\n")} } export interface ScalarTypeMapDefault { ${Array.from(d0.ScalarTypeMap).map(([P,O])=>`"${P}": ${O};`).join("\n")} }; type SelectionFnParent = { collector: OperationSelectionCollector | OperationSelectionCollectorRef; fieldName?: string; opPath?: string; method?: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace"; args?: Record; argsMeta?: Record; } | undefined; type CleanupNever = Omit & { [K in keyof A as A[K] extends never ? never : K]: A[K]; }; type Prettify = { [K in keyof T]: T[K]; } & {}; type SLWsFromSelection< S, R = { [K in keyof S]: S[K] extends SelectionWrapperImpl< infer FN, infer TNP, infer TAD > ? S[K] : never; }, > = Prettify>; type ReturnTypeFromFragment = T extends ( this: any, ...args: any[] ) => infer R ? R : never; type ArgumentsTypeFromFragment = T extends ( this: any, ...args: infer A ) => any ? A : never; type ReplaceReturnType = T extends (...a: any) => any ? ( ...a: Parameters ) => ReturnType extends Promise ? Promise : R : never; type SLW_TPN_ToType = TNP extends keyof ScalarTypeMapWithCustom ? ScalarTypeMapWithCustom[TNP] : TNP extends keyof ScalarTypeMapDefault ? ScalarTypeMapDefault[TNP] : TNP extends keyof EnumTypesMapped ? EnumTypesMapped[TNP] : TNP extends keyof UnionTypesMapped ? UnionTypesMapped[TNP] : never; type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...0[]]; type ToTArrayWithDepth = D extends 0 ? T : ToTArrayWithDepth; export type SLFNScalarOp< F extends object, N extends string, TNP extends string, TAD extends number, ARGS extends any, E extends { [key: string | number | symbol]: any } = { \$lazy: ARGS extends undefined ? () => Promise<"T"> : (args: ARGS) => Promise<"T">; }, REP extends string | number | symbol = "\$lazy", > = ( makeSLFNInput: () => F, SLFN_name: N, SLFN_typeNamePure: TNP, SLFN_typeArrDepth: TAD, ) => ( this: any, ) => ToTArrayWithDepth< typeof OP_SCALAR_RESULT extends keyof FF ? ToTArrayWithDepth, TAD> : never, TAD > & { [k in keyof EE]: k extends REP ? EE[k] extends (...args: any) => any ? ReplaceReturnType< EE[k], ToTArrayWithDepth< typeof OP_SCALAR_RESULT extends keyof FF ? ToTArrayWithDepth, TAD> : never, TAD > > : ToTArrayWithDepth< typeof OP_SCALAR_RESULT extends keyof FF ? ToTArrayWithDepth, TAD> : never, TAD > : EE[k]; }; export type SLFN< T extends object, F, N extends string, TNP extends string, TAD extends number, E extends { [key: string | number | symbol]: any } = {}, REP extends string | number | symbol = never, > = ( makeSLFNInput: () => F, SLFN_name: N, SLFN_typeNamePure: TNP, SLFN_typeArrDepth: TAD, ) => ( this: any, s: (selection: FF) => TT, ) => ToTArrayWithDepth< typeof OP_SCALAR_RESULT extends keyof TT ? ToTArrayWithDepth, TAD> : { [K in keyof TT]: TT[K] extends SelectionWrapperImpl< infer FN, infer TTNP, infer TTAD, infer VT, infer AT > ? ToTArrayWithDepth, TTAD> : TT[K]; }, TAD > & { [k in keyof EE]: k extends REP ? EE[k] extends (...args: any) => any ? ReplaceReturnType< EE[k], ToTArrayWithDepth< { [K in keyof TT]: TT[K] extends SelectionWrapperImpl< infer FN, infer TTNP, infer TTAD, infer VT, infer AT > ? ToTArrayWithDepth, TTAD> : TT[K]; }, TAD > > : ToTArrayWithDepth< { [K in keyof TT]: TT[K] extends SelectionWrapperImpl< infer FN, infer TTNP, infer TTAD, infer VT, infer AT > ? ToTArrayWithDepth, TTAD> : TT[K]; }, TAD > : EE[k]; }; `;static HelperFunctions=` const selectScalars = (selection: Record) => Object.fromEntries( Object.entries(selection).filter( ([k, v]) => v instanceof SelectionWrapperImpl, ), ) as S; const makeScalarOperationSelection = < name extends string, typeName extends string, isList extends number, args extends any, argsMeta extends Record< string, { type: string; location: "path" | "body" | "query" | "header" | "cookie"; } >, >( name: name, typeName: typeName, isList: isList, args?: args, argsMeta?: argsMeta, ) => function(this: any) { return { [OP_SCALAR_RESULT]: new SelectionWrapper( name, typeName, isList, {}, this, undefined, args, argsMeta, undefined, true, ), } as const; }; const makeSLFNScalarOp = < F extends object, N extends string, TNP extends string, TAD extends number, ARGS extends any, >( makeSLFNInput: () => F, SLFN_name: N, SLFN_typeNamePure: TNP, SLFN_typeArrDepth: TAD, ARGS: ARGS, ) => { function _SLFN(this: any) { let parent: SelectionFnParent = this ?? { collector: new OperationSelectionCollector(), }; function innerFn(this: any) { const r: FF = makeSLFNInput.bind(this)() as any; const _result = new SelectionWrapper( parent?.fieldName, SLFN_typeNamePure, SLFN_typeArrDepth, r, this, parent?.collector, parent?.args, parent?.argsMeta, function (this: OperationSelectionCollector) { return makeSLFNInput.bind(this)() as FF; }, true, ); _result[ROOT_OP_META] = parent?.opPath ? { path: parent.opPath, method: parent.method!, } : undefined; Object.keys(r).forEach((key) => (_result as FF)[key as keyof FF]); const result = _result as unknown as FF; if ((result as any)[OP_SCALAR_RESULT]) { return (result as any)[OP_SCALAR_RESULT]; } return result; } return innerFn.bind( new OperationSelectionCollector(SLFN_name, parent?.collector), )(); } return _SLFN as ReturnType>; }; const makeSLFN = < T extends object, F, N extends string, TNP extends string, TAD extends number, >( makeSLFNInput: () => F, SLFN_name: N, SLFN_typeNamePure: TNP, SLFN_typeArrDepth: TAD, ) => { function _SLFN( this: any, s: (selection: FF) => TT, ) { let parent: SelectionFnParent = this ?? { collector: new OperationSelectionCollector(), }; function innerFn(this: any) { const selection: FF = makeSLFNInput.bind(this)() as any; const r = s(selection); const _result = new SelectionWrapper( parent?.fieldName, SLFN_typeNamePure, SLFN_typeArrDepth, r, this, parent?.collector, parent?.args, parent?.argsMeta, function (this: OperationSelectionCollector) { return s(makeSLFNInput.bind(this)() as FF); }, ); _result[ROOT_OP_META] = parent?.opPath ? { path: parent.opPath, method: parent.method!, } : undefined; Object.keys(r).forEach((key) => (_result as T)[key as keyof T]); const result = _result as unknown as T; if ((result as any)[OP_SCALAR_RESULT]) { return (result as any)[OP_SCALAR_RESULT]; } return result; } return innerFn.bind( new OperationSelectionCollector(SLFN_name, parent?.collector), )(); } return _SLFN as ReturnType>; }; `;constructor(D,P,O){super(D,P,O);this.collector=P;this.options=O}makeEnumType(){let D=this.originalTypeNameToTypescriptTypeNameWithoutModifiers(this.originalFullTypeName);if(this.typeMeta.enumValues.length===0)console.warn(`Schema contains empty enum: ${this.typeMeta.name}. \n This is not allowed in GraphQL, but it happens. Please check your schema. Code is still generated and will work, but the type is being set to undefined.`);let P=(R)=>{if(!isNaN(Number(R))){if(Number(R)<0)return`minus_${R.slice(1)}`;return`_${R}`}return R.replace(/[^a-zA-Z0-9_]/g,"_").replace(/^[0-9]/,"_$&")},O=this.typeMeta.enumValues.length===0?"undefined":this.typeMeta.enumValues.map((R)=>`"${R.name}"`).join(" | "),W=this.typeMeta.enumValues.map((R)=>`${R.description?`/** ${R.description} */\n`:""}${P(R.name)} = "${R.name}",`).join("\n"),F=(R)=>` export type ${R} = ${O}; export enum ${R}Enum { ${W} }; `;if(this.collector.hasEnumTypeName(D)&&this.collector.getEnumTypeByName(D)!==F(D)){let R=0,L=[D];while(this.collector.hasEnumTypeName(L.join("_")))L=[D,(++R).toString()];this.typeMeta.name=L.join("_"),this.collector.addEnumType(this.typeMeta,F(this.typeMeta.name))}else this.typeMeta.name=D,this.collector.addEnumType(this.typeMeta,F(D));return D}makeSelectionTypeInputValueForFieldWrapperType(D,P){let O="";if(P.isEnum)O=P.ofType.name.replaceAll("!","").replaceAll("[","").replaceAll("]","");else O=this.ScalarTypeMap().get(P.name.replaceAll("!","").replaceAll("[","").replaceAll("]",""))??(P.scalarTSType?`ScalarTypeMapWithCustom["${P.name.replaceAll("!","").replaceAll("[","").replaceAll("]","")}"]`:"any");if(P.isList)return`${Array.from({length:P.isList}).map((W)=>"Array<").join("")}${O}${Array.from({length:P.isList}).map((W)=>">").join("")}`;return O}makeSelectionTypeInputValueForField(D,P=[],O=!1){let W=D.description?`/* ${D.description} */\n`:"";if(D.type.isScalar||D.type.isEnum){let F=this.makeSelectionTypeInputValueForFieldWrapperType(D.name,D.type);return this.collector.addSelectionType(D.type,F),`${W}${D.name}${D.type.isNonNull?"":"?"}: ${F};`}else if(D.type.isUnion&&D.type.possibleTypes.every((F)=>F.isScalar||F.isEnum))return`${W}${D.name}${D.type.isNonNull?"":"?"}: ${Array.from({length:D.type.isList}).map((F)=>"Array<").join("")}${D.type.name.replaceAll("!","").replaceAll("[","").replaceAll("]","")} ${Array.from({length:D.type.isList}).map((F)=>">").join("")};`;else if(D.type.ofType){let F=new d0(D.type.ofType.name,this.collector,this.options).makeSelectionType();return`${W}${D.name}${D.type.isNonNull?"":"?"}: ${this.originalTypeNameToTypescriptTypeName(D.type.ofType.name,!D.type.isInput&&D.type.isList?"Array":"").replaceAll("!","")}`}else throw console.error(D.type),new Error(`Unknown type for field ${D.name}: ${D.type.name}`)}makeSelectionType(){if(this.typeMeta.isScalar||this.typeMeta.isEnum)return this.makeSelectionTypeInputValueForFieldWrapperType(this.typeName,this.typeMeta);let D=this.typeMeta.isInput?`${this.originalTypeNameToTypescriptTypeNameWithoutModifiers(this.originalFullTypeName)}`:this.typeName;if(this.collector.hasSelectionType(this.typeMeta))return D;let P="";if(this.typeMeta.isUnion){let O=this.typeMeta.possibleTypes.map((W)=>W.isScalar||W.isEnum?this.makeSelectionTypeInputValueForFieldWrapperType(W.name,W):this.typeMeta.isInput?`${this.originalTypeNameToTypescriptTypeNameWithoutModifiers(W.name)}`:`${this.originalTypeNameToTypescriptFriendlyName(W.name)}`).join(" | ");P=` export type ${D} = ${O}; `}else P=` export type ${D} = { ${(this.typeMeta.isInput?this.typeMeta.inputFields:this.typeMeta.fields).map((O)=>this.makeSelectionTypeInputValueForField(O,this.typeMeta.isInput?[]:[this.typeName],this.typeMeta.isInput)).join("\n")} }; `;return this.collector.addSelectionType(this.typeMeta,P),D}makeSelectionFunctionInputObjectValueForFieldWrapper(D,P){return`new SelectionWrapper( "${D.name}", "${D.type.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${D.type.isList??0}, {}, this, undefined, )`}makeSelectionFunctionInputObjectValueForField(D,P){let O=D.type;if(O.isScalar||O.isEnum||O.isUnion&&O.possibleTypes.every((W)=>W.isScalar||W.isEnum)){let W=this.makeSelectionFunctionInputObjectValueForFieldWrapper(D,P);return this.collector.addSelectionFunction(O,W),`${D.name}: ${W}`}else if(O.ofType){let W=new d0(O.ofType.name,this.collector,this.options).makeSelectionFunction();return`${D.name}: ${W}.bind({ collector: this, fieldName: "${D.name}" })`}else throw console.error(O),new Error(`Unknown type for field ${D.name}: ${O.name}`)}makeSelectionFunction(){if(this.typeMeta.isScalar||this.typeMeta.isEnum)return`new SelectionWrapper( "${this.typeName}", "${this.typeMeta.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${this.typeMeta.isList??0}, {}, this )`;let D=`${this.typeName}Selection`;if(this.collector.hasSelectionFunction(this.typeMeta))return D;else this.collector.addSelectionFunction(this.typeMeta,D);let P=this.typeMeta.fields.some((L)=>L.type.isScalar||L.type.isEnum),O="";if(this.typeMeta.isUnion&&this.typeMeta.possibleTypes.filter((L)=>!L.isScalar&&!L.isEnum).length)O=` \$on: { ${this.typeMeta.possibleTypes.filter((L)=>!L.isScalar&&!L.isEnum).map((L)=>`${L.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}: ${this.originalTypeNameToTypescriptFriendlyName(L.name)}Selection.bind({ collector: this, fieldName: "", }),`).join("\n")} } `;else O=` ${P?` \$scalars: () => selectScalars( make${D}Input.bind(this)(), ) as SLWsFromSelection< ReturnType >, `:""}`;let W=new Map,F=` export function make${D}Input(this: any) ${this.typeMeta.isUnion?"":`: ReturnTypeFrom${D}`} { return { ${this.typeMeta.fields.map((L)=>[L,this.makeSelectionFunctionInputObjectValueForField(L,this.typeMeta.isInput?[]:[this.typeName])]).map(([L,B])=>{return W.set(L.name,`${L.type.isScalar||L.type.isEnum||L.type.isUnion&&L.type.possibleTypes.every((Z)=>Z.isScalar||Z.isEnum)?`SelectionWrapperImpl<"${L.name}", "${L.type.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${L.type.isList}, {}, undefined>`:`ReturnType< SLFN< {}, ReturnType, "${super.originalTypeNameToTypescriptFriendlyName(L.type.name)}Selection", "${super.originalTypeNameToTypescriptTypeNameWithoutModifiers(L.type.name)}", ${L.type.isList??0} > >`}`),`${B},`}).join("\n")} ${O} } as const; }; export const ${D} = makeSLFN( ${`make${D}Input`}, "${D}", "${this.originalFullTypeName.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${this.typeMeta.isList??0} ); `,R=this.typeMeta.isUnion?"":` type ReturnTypeFrom${D} = { ${Array.from(W).map(([L,B])=>`${L}: ${B}`).join("\n")} } & { ${P?` \$scalars: () => SLWsFromSelection>; `:""} };`;return this.collector.addSelectionFunction(this.typeMeta,`${R} ${F} `),D}static makeOperationFunctions(D,P,O){let W=new Map,F=[],R=[],L=(B)=>{if(B.includes("-")||!isNaN(+B.at(0)))return`"${B}"`;return B};for(let B of D){let Z=B.args.filter((G)=>G.location==="query").some((G)=>B.args.filter((Q)=>Q.location==="path").some((Q)=>Q.name===G.name)),H=B.args.filter((G)=>G.location==="body").some((G)=>B.args.filter((Q)=>Q.location==="query").some((Q)=>Q.name===G.name)||B.args.filter((Q)=>Q.location==="path").some((Q)=>Q.name===G.name)),Y=()=>{if(!B.args.length)return;let G=`${B.name.slice(0,1).toUpperCase()}${B.name.slice(1)}Args`;if(!P.hasArgumentMeta(G)){let w=`{ ${B.args.map((C)=>{if(C.name==="$"&&(Z||H))return C.type.inputFields.map((j)=>`${L(j.name)}: { type: "${j.type.name}", location: "${C.location}", },`).join("\n");else if(C.name==="$"&&!Z&&!H)return`${C.location==="query"?"$query":"$body"}: { type: "${C.type.name}", location: "${C.location}", },`;return`${L(C.name)}: { type: "${C.type.name}", location: "${C.location}", },`}).join(" ")} }`;P.addArgumentMeta(G,`export const ${G}Meta = ${w} as const;`)}return{argsTypeName:G}},q=()=>{let G=(C)=>{let j=C.type.isScalar,b=C.type.isEnum,_=C.type.isInput,m=`${L(C.name)}${C.type.isNonNull?"":"?"}`,K="any";if(j)K=this.ScalarTypeMap.get(C.type.name.replaceAll("!",""))??"any";else if(_||b)K=`${this.originalTypeNameToTypescriptTypeName(C.type.name)}`;return{description:C.description,argKey:m,argType:K}};if(!B.args.length)return;let Q=B.args.some((C)=>C.type.isNonNull),w=`${B.name.slice(0,1).toUpperCase()}${B.name.slice(1)}Args`;if(!P.hasArgumentType(w)){let C;if(B.args.length===1&&B.args[0].name==="$")C=B.args[0].type.isScalar&&B.args[0].type.scalarTSType?`ScalarTypeMapWithCustom["${B.args[0].type.name.replaceAll("!","").replaceAll("[","").replaceAll("]","")}"]`:new d0(B.args[0].type.name,P,O).makeSelectionType();else C=`{ ${B.args.map((b)=>{if(b.name==="$"&&(Z||H))return b.type.inputFields.map((z)=>{let{description:k,argType:SD,argKey:WD}=G(z);return` ${k?`/** ${k??`${WD}`} */`:""} ${WD}: ${SD}; `}).join("\n");else if(b.name==="$"&&!Z&&!H){let{description:z,argType:k}=G(b);return` ${z?`/** ${z??`${b.location==="query"?"$query":"$body"}`} */`:""} ${b.location==="query"?"$query":"$body"}: ${k}; `}let{description:_,argType:m,argKey:K}=G(b);return` ${_?`/** ${_??`${K}`} */`:""} ${K}: ${m}; `}).join(" ")} }`;P.addArgumentType(w,`export type ${w} = ${C};`)}return{argsTypeName:w,hasAtLeastOneNonNullArg:Q}},U=Y(),J=q(),A=B.type.isScalar||B.type.isEnum?`makeSLFNScalarOp( makeScalarOperationSelection( "${B.name}", "${B.type.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${B.type.isList??0}, ${U?`args, ${U.argsTypeName}Meta`:""} ), "${B.name}", "${B.type.name.replaceAll("[","").replaceAll("]","").replaceAll("!","")}", ${B.type.isList??0}, ${J?"args":"undefined"} )`:new d0(B.type.name,P,O).makeSelectionFunction(),E=` ${B.name}: (${J?`args: ${J.argsTypeName}`:""}) => ${A}.bind({ collector: this, fieldName: "${B.name}", opPath: "${B.path}", method: "${B.method}", ${U?`args, argsMeta: ${U.argsTypeName}Meta`:""} })${B.type.isScalar||B.type.isEnum?"()":""}, `;if(!B.type.isScalar&&!B.type.isEnum)W.set(B.name,`( ${J?`args: ${J.argsTypeName}`:""} ) => ReturnType< SLFN< {}, ReturnType, "${super.originalTypeNameToTypescriptFriendlyName(B.type.name)}Selection", "${super.originalTypeNameToTypescriptTypeNameWithoutModifiers(B.type.name)}", ${B.type.isList??0}, { \$lazy: ( ${J?`args: ${J.argsTypeName}`:""} ) => Promise<"T"> }, "\$lazy" > >,`);if(!B.type.isScalar&&!B.type.isEnum)F.push(E);else R.push(E)}return{fnsWithoutScalarOps:F,fnsScalarOps:R,makeSelectionFunctionInputReturnTypeParts:W}}static makeRootOperationFunction(D,P,O,W){let{fnsWithoutScalarOps:F,fnsScalarOps:R,makeSelectionFunctionInputReturnTypeParts:L}=this.makeOperationFunctions(D,P,O);return` export type ReturnTypeFromRootOperationWithoutScalarOps = { ${Array.from(L).map(([Z,H])=>`${Z}: ${H}`).join("\n")} }; export function _makeRootOperationInput(this: any) { const withoutScalarOps = { ${F.join("\n")} } as const; const withScalarOps = { ${R.join("\n")} } as const; return { ...withoutScalarOps, ...withScalarOps, } as ReturnTypeFromRootOperationWithoutScalarOps & typeof withScalarOps; }; ${W?`type __AuthenticationArg__ = | string | { [key: string]: string } | (() => string | { [key: string]: string }) | (() => Promise);`:""} function __client__ < T extends object, F extends ReturnType>( this: any, s: (selection: F) => T ) { const root = new OperationSelectionCollector(undefined, undefined, new RootOperation()); const rootRef = { ref: root }; const selection: F = _makeRootOperationInput.bind(rootRef)() as any; const r = s(selection); const _result = new SelectionWrapper(undefined, undefined, undefined, r, root, undefined) as unknown as T; Object.keys(r).forEach((key) => (_result as T)[key as keyof T]); // remove the \$lazy property from the result const result = _result as { [k in keyof T]: T[k] extends infer U & { \$lazy: (args: any) => Promise; } ? R : // if T[k] is a function and has a \$lazy property, return the type of the function T[k] extends () => Promise ? () => Promise : T[k] extends (args: infer A) => Promise ? (args: A) => Promise : T[k]; }; type _TR = typeof result; type __HasPromisesAndOrNonPromisesK = { [k in keyof _TR]: _TR[k] extends (args: any) => Promise ? "promise" : "non-promise"; }; type __HasPromisesAndOrNonPromises = __HasPromisesAndOrNonPromisesK[keyof __HasPromisesAndOrNonPromisesK]; type finalReturnTypeBasedOnIfHasLazyPromises = __HasPromisesAndOrNonPromises extends "non-promise" ? Promise<_TR> : __HasPromisesAndOrNonPromises extends "promise" ? _TR : Promise<_TR>; let headers: Record | undefined = undefined; let returnValue: finalReturnTypeBasedOnIfHasLazyPromises; if (Object.values(result).some((v) => typeof v !== "function")) { returnValue = { then: (resolve: any, reject: any) => { ${W?` const doExecute = () => { root.execute(headers) .then(() => { resolve(result); }) .catch(reject); } if (typeof RootOperation[OPTIONS]._auth_fn === "function") { const tokenOrPromise = RootOperation[OPTIONS]._auth_fn(); if (tokenOrPromise instanceof Promise) { tokenOrPromise.then((t) => { if (typeof t === "string") headers = { "${W.headerName}": t }; else headers = t; doExecute(); }); } else if (typeof tokenOrPromise === "string") { headers = { "${W.headerName}": tokenOrPromise }; doExecute(); } else { headers = tokenOrPromise; doExecute(); } } else { doExecute(); } `:` root.execute(headers) .then(() => { resolve(result); }) .catch(reject); `} }, } as finalReturnTypeBasedOnIfHasLazyPromises; } else { returnValue = result as finalReturnTypeBasedOnIfHasLazyPromises; } ${W?` Object.defineProperty(returnValue, "auth", { enumerable: false, get: function () { return function ( auth: __AuthenticationArg__, ) { if (typeof auth === "string") { headers = { "${W.headerName}": auth }; } else if (typeof auth === "function") { const tokenOrPromise = auth(); if (tokenOrPromise instanceof Promise) { return tokenOrPromise.then((t) => { if (typeof t === "string") headers = { "${W.headerName}": t }; else headers = t; return returnValue; }); } if (typeof tokenOrPromise === "string") { headers = { "${W.headerName}": tokenOrPromise }; } else { headers = tokenOrPromise; } } else { headers = auth; } return returnValue; }; }, }); return returnValue as finalReturnTypeBasedOnIfHasLazyPromises & { auth: ( auth: __AuthenticationArg__, ) => finalReturnTypeBasedOnIfHasLazyPromises; }; `:` return returnValue; `} }; const __init__ = (options: { ${W?"auth?: __AuthenticationArg__;":""} headers?: { [key: string]: string }; scalars?: { [key in keyof ScalarTypeMapDefault]?: ( v: string, ) => ScalarTypeMapDefault[key]; } & { [key in keyof ScalarTypeMapWithCustom]?: ( v: string, ) => ScalarTypeMapWithCustom[key]; }; }) => { ${W?` if (typeof options.auth === "string") { RootOperation[OPTIONS].headers = { "${W.headerName}": options.auth, }; } else if (typeof options.auth === "function" ) { RootOperation[OPTIONS]._auth_fn = options.auth; } else if (options.auth) { RootOperation[OPTIONS].headers = options.auth; } `:""} if (options.headers) { RootOperation[OPTIONS].headers = { ...RootOperation[OPTIONS].headers, ...options.headers, }; } if (options.scalars) { RootOperation[OPTIONS].scalars = { ...RootOperation[OPTIONS].scalars, ...options.scalars, }; } }; Object.defineProperty(__client__, "init", { enumerable: false, value: __init__, }); export default __client__ as typeof __client__ & { init: typeof __init__; }; `}}var z8={};a4(z8,{Generator:()=>wq});var wO=qD(T0(),1);var wD=qD(T0(),1);var Mq=(D,P,O)=>{let W={types:[],directives:[],query:[],mutation:[],subscription:[]},F=D.getQueryType();if(F)for(let B of Object.values(F.getFields()))W.query.push(T5(D,B,"query",P,O));let R=D.getMutationType();if(R)for(let B of Object.values(R.getFields()))W.mutation.push(T5(D,B,"mutation",P,O));let L=D.getSubscriptionType();if(L)for(let B of Object.values(L.getFields()))W.subscription.push(T5(D,B,"subscription",P,O));for(let B in D.getTypeMap()){if(!P.includeSchemaDefinition){if(["__Schema","__Type","__TypeKind","__Field","__InputValue","__EnumValue","__Directive"].includes(B))continue}let Z=D.getTypeMap()[B];if(wD.isObjectType(Z)||wD.isInterfaceType(Z))W.types.push(x1(D,Z,P,O))}for(let B of D.getDirectives())W.directives.push(S_(D,B,P,O));return W},T5=(D,P,O,W,F)=>{let R={name:P.name,description:P.description,operation:O,args:[],type:x1(D,P.type,W,F)};for(let L in P.args){let B=P.args[L];R.args.push(MO(D,B,W,F))}return R},MO=(D,P,O,W)=>{return{name:P.name,hasArgs:!1,args:[],description:P.description,type:x1(D,P.type,O,W)}},x1=(D,P,O,W)=>{let F=wD.getNamedType(P),R={name:P.toString(),description:F.description,isList:P.toString().split("[").length-1,isNonNull:P.toString().endsWith("!"),isScalar:F instanceof wD.GraphQLScalarType,isEnum:F instanceof wD.GraphQLEnumType,isInput:F instanceof wD.GraphQLInputObjectType,isInterface:F instanceof wD.GraphQLInterfaceType,isObject:F instanceof wD.GraphQLObjectType,isUnion:F instanceof wD.GraphQLUnionType,isQuery:!1,isMutation:!1,isSubscription:!1,fields:[],possibleTypes:[],enumValues:[],inputFields:[]};if(W?.hasType(R.name))return W.getType(R.name);else W?.addType(R);if(R.ofType=R,R.isEnum)for(let L of F.getValues())R.enumValues.push({name:L.name,description:L.description});if(R.isInput){let L=F.getFields();for(let B in L)R.inputFields.push(MO(D,L[B],O,W))}if(R.isInterface){let L=F.getFields();for(let B in L)R.fields.push($q(D,L[B],O,W))}if(R.isObject){let L=F.getFields();for(let B in L)R.fields.push($q(D,L[B],O,W))}if(R.isUnion)for(let L of F.getTypes())R.possibleTypes.push(x1(D,L,O,W));if(F instanceof wD.GraphQLObjectType){if(F.name==="Query")R.isQuery=!0;else if(F.name==="Mutation")R.isMutation=!0;else if(F.name==="Subscription")R.isSubscription=!0}if(W)W.addType(R);return R},$q=(D,P,O,W)=>{let F={name:P.name,description:P.description,hasArgs:Object.keys(P.args).length>0,args:[],type:x1(D,P.type,O,W)};for(let R in P.args){let L=P.args[R];F.args.push(MO(D,L,O,W))}return F},S_=(D,P,O,W)=>{let F={name:P.name,description:P.description,locations:P.locations,args:[]};for(let R in P.args){let L=P.args[R];F.args.push(MO(D,L,O,W))}if(W)W.addType({name:`Directive_${P.name}`,description:P.description,isList:0,isNonNull:!1,isScalar:!1,isEnum:!1,isInput:!1,isInterface:!1,isObject:!1,isUnion:!1,isQuery:!1,isMutation:!1,isSubscription:!1,fields:[],possibleTypes:[],enumValues:[],inputFields:[],isDirective:F});return F};class N5{D;P;O;OperationTypeNames;constructor(D,P,O){this.QueryTypeName=D;this.MutationTypeName=P;this.SubscriptionTypeName=O;this.OperationTypeNames=[D,P,O].filter((W)=>W)}_types=new Map;get types(){return this._types}addType(D){this._types.set(D.name,D)}hasType(D){return this._types.has(D)}getType(D){return this._types.get(D)}_enumsTypes=new Map;get enumsTypes(){return this._enumsTypes}addEnumType(D,P){this._enumsTypes.set(D,P)}hasEnumType(D){if(!D)return!1;return this._enumsTypes.has(D)}getEnumType(D){return this._enumsTypes.get(D)}_argumentTypes=new Map;get argumentTypes(){return this._argumentTypes}addArgumentType(D,P){this._argumentTypes.set(D,P)}hasArgumentType(D){return this._argumentTypes.has(D)}getArgumentType(D){return this._argumentTypes.get(D)}_argumentMeta=new Map;get argumentMeta(){return this._argumentMeta}addArgumentMeta(D,P){this._argumentMeta.set(D,P)}hasArgumentMeta(D){return this._argumentMeta.has(D)}getArgumentMeta(D){return this._argumentMeta.get(D)}_directivesFunctions=new Map;get directivesFunctions(){return this._directivesFunctions}addDirectiveFunction(D,P){this._directivesFunctions.set(D,P)}hasDirectiveFunction(D){return this._directivesFunctions.has(D)}getDirectiveFunction(D){return this._directivesFunctions.get(D)}_selectionTypes=new Map;get selectionTypes(){return this._selectionTypes}addSelectionType(D,P){this._selectionTypes.set(D,P)}hasSelectionType(D){if(!D)return!1;return this._selectionTypes.has(D)}getSelectionType(D){return this._selectionTypes.get(D)}_selectionFunctions=new Map;get selectionFunctions(){return this._selectionFunctions}addSelectionFunction(D,P){this._selectionFunctions.set(D,P)}hasSelectionFunction(D){if(!D)return!1;return this._selectionFunctions.has(D)}getSelectionFunction(D){return this._selectionFunctions.get(D)}}class wq{D;constructor(D){this.Codegen=D}async generate({schema:D,options:P,authConfig:O}){let W=D.getQueryType()?.name,F=D.getMutationType()?.name,R=D.getSubscriptionType()?.name,L=new N5(W,F,R);Mq(D,P,L);for(let[Z,H]of L.types.entries()){if(!H.isEnum)continue;new this.Codegen(Z,L,P).makeEnumType()}for(let[Z,H]of L.types.entries()){if(!H.isInput)continue;new this.Codegen(Z,L,P).makeSelectionType()}for(let[Z,H]of L.types.entries()){if(!H.isDirective?.locations.some((Y)=>[wO.DirectiveLocation.FIELD,wO.DirectiveLocation.FRAGMENT_SPREAD,wO.DirectiveLocation.INLINE_FRAGMENT].includes(Y)))continue;new this.Codegen(Z,L,P).makeDirective()}for(let[Z,H]of L.types.entries()){if(H.isScalar||H.isInput||H.isEnum||H.isDirective)continue;new this.Codegen(Z,L,P).makeSelectionType(),new this.Codegen(Z,L,P).makeSelectionFunction()}return[this.Codegen.FieldValueWrapperType,this.Codegen.HelperTypes,this.Codegen.HelperFunctions,...[...L.enumsTypes.entries()].map(([Z,H])=>H).filter((Z,H,Y)=>Y.indexOf(Z)===H),...[...L.argumentTypes.entries()].map(([Z,H])=>H).filter((Z,H,Y)=>Y.indexOf(Z)===H),...[...L.argumentMeta.entries()].map(([Z,H])=>H).filter((Z,H,Y)=>Y.indexOf(Z)===H),...[...L.selectionTypes.entries()].filter(([Z])=>Z.isInput).map(([Z,H])=>H).filter((Z,H,Y)=>Y.indexOf(Z)===H),this.Codegen.EnumTypesMapped(L),...[...L.selectionFunctions.entries()].filter(([Z])=>!Z.isScalar&&!Z.isEnum&&!Z.isInput).map(([Z,H])=>H),...[...L.directivesFunctions.entries()].map(([Z,H])=>H),this.Codegen.makeRootOperationFunction(L,O)].join("\n")}}var Q8={};a4(Q8,{Generator:()=>Kq});var jD=(D)=>{let P="";for(let O of D.filter(Boolean))P+=O.charAt(0).toUpperCase()+O.slice(1)+"$";return P.slice(0,-1).replaceAll("-","_")},bq=(D,P,O)=>{let W={types:[],operations:[],customScalars:[]};for(let[F,R]of Object.entries(D?.components?.schemas??{}))W.types.push(lD(D,F,R,"schemas",{isNonNull:!1},O));for(let[F,R]of Object.entries(D?.paths??{})){if("$ref"in R)continue;for(let[L,B]of Object.entries(R)){if(!B)continue;if("$ref"in B){console.warn(`TODO: Handle \$ref in methodValue for ${F}`);continue}W.operations.push(A_(D,F,L,B,P,O))}}return W},k5=(D,P,O,W)=>{let F={name:D,description:P,isScalar:!0,scalarTSType:O,isEnum:!1,isObject:!1,isUnion:!1,isList:0,isNonNull:!1,fields:[],possibleTypes:[],inputFields:[],isInput:!1,enumValues:[]};return F.ofType=F,W.addType(F),W.addCustomScalar(F),F},f5=(D,P)=>{let O=P?.isInput??D.isInput,W=P?.isNonNull??D.isNonNull;return`${D.name.slice(0,O&&W?-1:void 0)}${O?`${W?"Input!":"Input"}`:""}`.replaceAll("-","_")},x5=(D,P)=>{if(D.isInput||D.isScalar)return D;let O=f5(D,{isInput:!0}),W={...D,name:O,isInput:!0,isObject:!1,inputFields:D.fields.map((F)=>({...F,location:"$",type:x5(F.type,P)})),fields:[],possibleTypes:D.possibleTypes.map((F)=>x5(F,P))};return W.ofType=W,P.addType(W),W},lD=(D,P,O,W,F,R)=>{if("ofType"in O)return O;if("$ref"in O){let H=O.$ref.split("/");H.shift();let Y=H.shift(),q=H.shift(),U=H.shift(),J=D[Y]?.[q]?.[U];if(J)return lD(D,jD([F.operationResponseType?"":P,U]),J,q,{isNonNull:F.isNonNull},R);throw new Error(`Reference ${O.$ref} not found`)}if("schema"in O)return lD(D,P,O.schema,"schemas",{isNonNull:F.isNonNull,operationResponseType:F.operationResponseType},R);let L=O;if("properties"in L&&!("type"in L))L.type="object";let B={name:F.operationResponseType?P:F.isNonNull?`${P}!`:P,description:L.description,isObject:"type"in L&&(L.type==="object"||JSON.stringify(L.type)===JSON.stringify(["object","null"])),fields:[],isUnion:!!L.oneOf||!!L.anyOf||!!L.allOf,possibleTypes:[],isList:0,isNonNull:F.isNonNull,isScalar:!1,scalarTSType:void 0,isEnum:{schemas:!!L.enum,parameters:!1,responses:!1,requestBodies:!1,headers:!1}[W],enumValues:[],isInput:W==="parameters"||W==="headers"||W==="requestBodies",inputFields:[],ofType:void 0};B.isScalar=!B.isObject&&!B.isUnion&&!B.isEnum&&!B.isInput;let Z=f5(B);if(R.hasType(Z))return R.getType(Z);else B.name=Z,R.addType(B);if(B.ofType=B,B.isEnum){let H=L;for(let Y of[...H.enum??[]])B.enumValues.push({name:String(Y),description:L.description,type:lD(D,P,L,W,{isNonNull:F.isNonNull},R)})}if(B.isInput){let H=L;if("content"in H){let Y=H;for(let[q,U]of Object.entries(Y.content??{})){R.removeType(Z);let J=x5(lD(D,P,U,W,{isNonNull:Y.required??!1},R),R);if(J.fields.length===1&&!!J.fields[0].type.scalarTSType)return R.removeType(Z),B=J.fields[0].type,R.addType(B),B;else return R.removeType(Z),B=J,R.addType(B),B}}if("schema"in H&&"in"in H){let Y=H;if(Y.schema)B.inputFields.push(I8(D,Y.name,Y.schema,W,Y.in,{isNonNull:Y.required??!1},R));else B.inputFields.push(I8(D,Y.name,lD(D,jD([P,"Input",Y.name]),Y.content["application/json"],W,{isNonNull:Y.required??!1},R),W,Y.in,{isNonNull:Y.required??!1},R))}if("schema"in H&&!("in"in H)){let Y=H;if(Y.schema)B.inputFields.push(I8(D,jD([P,"Header"]),Y.schema,W,"header",{isNonNull:Y.required??!1},R));else B.inputFields.push(I8(D,jD([P,"Header"]),lD(D,jD([P,"Input","Header"]),Y.content["application/json"],W,{isNonNull:Y.required??!1},R),W,"header",{isNonNull:Y.required??!1},R))}}if(B.isObject){let H=L,Y=H.properties;for(let[J,A]of Object.entries(Y??{})){let E="$ref"in A;R.removeType(jD([P,J]));let G=lD(D,jD([P,J]),A,W,{isNonNull:H.required?.includes(J)??!1},R),Q=X_(D,J,G,{isNonNull:H.required?.includes(J)??!1},R);B.fields.push(Q)}let q,U=H.additionalProperties;if(U===!0||JSON.stringify(U)===JSON.stringify({}))q=k5(jD([P,"AdditionalProperties"]),"Additional properties","Record",R),B.fields.push({name:jD([P,"Any"]),description:"Additional properties",type:q});else if(typeof U==="object")if("type"in U&&U.type==="string")q=k5(jD([P,"AdditionalProperties"]),"Additional properties","Record",R),B.fields.push({name:jD([P,"AdditionalProperties"]),description:"Additional properties",type:q});else{let J="$ref"in U,A=lD(D,J?"":jD([P,"AdditionalProperties"]),U,W,{isNonNull:!1},R),E=A.name.replaceAll("!","").replaceAll("[","").replaceAll("]","");E={Int:"number",Float:"number",String:"string",Boolean:"boolean"}[E]??E;let G=E+(A.isList?Array.from({length:A.isList}).map((Q)=>"[]").join(""):"");if(A.isScalar&&A.scalarTSType)q=A,B.fields.push({name:jD([P,E]),description:"Additional properties",type:q});else q=k5(jD([P,E]),"Additional properties",`Record`,R),B.fields.push({name:jD([P,E]),description:"Additional properties",type:q})}if(q&&B.fields.length===1)return R.removeType(Z),R.addType(q),q}if(B.isUnion){let H=0;for(let Y of[...L.oneOf??[],...L.anyOf??[],...L.allOf??[]]){H++,R.removeType(Z);let q="$ref"in Y;B.possibleTypes.push(lD(D,q?"":`${P}Subtype${H}`,Y,W,{isNonNull:F.isNonNull},R))}if(B.possibleTypes.length===1){let Y=B.possibleTypes[0];B={...Y,isList:B.isList,ofType:Y,name:B.name}}}if(B.isScalar){let H=L;if(H.type==="array"){R.removeType(Z);let Y="$ref"in L.items;B.isList++;let q=lD(D,Y?"":P,L.items,"schemas",{isNonNull:F.isNonNull},R),U=B.isList+=q?.isList??0;B={...q,isList:U,name:`[${q.name}]`},B.ofType=B}else if(typeof H.type==="string"){R.removeType(Z),B.name=jD([H.type]);let Y={double:"Float",float:"Float",integer:"Int",long:"Int",int32:"Int",int64:"Int",number:"Float",byte:"Int"};if(H.format&&H.format.toLowerCase()in Y)B.name=Y[H.format.toLowerCase()]}else if(Array.isArray(H))R.removeType(Z),B.name=jD(H);if(F.isNonNull&&!B.name.endsWith("!"))R.removeType(Z),B.name=`${B.name}!`;B.name=f5(B)}return R.addType(B),B},I8=(D,P,O,W,F,R,L)=>{return{name:P,description:O.description,location:F,type:lD(D,P,O,W,R,L)}},X_=(D,P,O,W,F)=>{return{name:P,description:O.description,type:lD(D,P,O,"schemas",W,F)}},E_={get:"Get",post:"Create",put:"Update",delete:"Delete",patch:"Patch",options:"Options",head:"Head",trace:"Trace"},A_=(D,P,O,W,F,R)=>{if(!W.responses)throw new Error("Operation responses not found");let L=Object.entries(W.responses).filter(([q,U])=>q.toString().startsWith("2")).sort(([q,U],[J,A])=>+q-+J),B=L.length>0?L[0][1]:W.responses.default,Z=Object.entries(W.responses).filter(([q,U])=>q.toString().startsWith("4")||q.toString().startsWith("5"));if(!B)throw new Error("Operation success response not found");let H=W.operationId?.replaceAll("-","_")??jD([E_[O],...P.split("/").flatMap((q)=>["By",q.replace(/{([^}]+)}/g,"$1")].filter((U)=>U.length>0))]),Y={name:H,description:W.description,path:P,method:O,args:[],type:lD(D,H,"content"in B?B.content["application/json"]??Object.entries(B.content).find(([q,U])=>U)?.[1]:B,"responses",{isNonNull:!1,operationResponseType:!0},R)};for(let q of W.parameters??[]){let U="$ref"in q?q.$ref.split("/").pop():q.name,J="in"in q?q.in:q.$ref.split("/").at(-2),A={parameters:"query",requestBodies:"body",headers:"header",cookie:"cookie",path:"path",query:"query",header:"header"}[J];Y.args.push(I8(D,U,q,"parameters",A,{isNonNull:"$ref"in q?!1:q.required??!1},R))}if(W.requestBody){let q=W.requestBody,U=I8(D,`${H}RequestBody`,q,"requestBodies","body",{isNonNull:q.required??!1},R);U.name="$",Y.args.push(U)}return Y};class h5{constructor(){}_types=new Map;get types(){return this._types}addType(D){this._types.set(D.name,D)}hasType(D){return this._types.has(D)}getType(D){return this._types.get(D)}removeType(D){this._types.delete(D)}_customScalars=new Map;get customScalars(){return this._customScalars}addCustomScalar(D){this._customScalars.set(D.name,D)}hasCustomScalar(D){return this._customScalars.has(D)}getCustomScalar(D){return this._customScalars.get(D)}removeCustomScalar(D){this._customScalars.delete(D)}_enumsTypes=new Map;get enumsTypes(){return this._enumsTypes}addEnumType(D,P){this._enumsTypes.set(D,P)}hasEnumType(D){if(!D)return!1;return this._enumsTypes.has(D)}hasEnumTypeName(D){for(let[P,O]of this._enumsTypes.entries())if(P.name===D)return!0;return!1}getEnumType(D){return this._enumsTypes.get(D)}getEnumTypeByName(D){for(let[P,O]of this._enumsTypes.entries())if(P.name===D)return O;return""}_argumentTypes=new Map;get argumentTypes(){return this._argumentTypes}addArgumentType(D,P){this._argumentTypes.set(D,P)}hasArgumentType(D){return this._argumentTypes.has(D)}getArgumentType(D){return this._argumentTypes.get(D)}_argumentMeta=new Map;get argumentMeta(){return this._argumentMeta}addArgumentMeta(D,P){this._argumentMeta.set(D,P)}hasArgumentMeta(D){return this._argumentMeta.has(D)}getArgumentMeta(D){return this._argumentMeta.get(D)}_selectionTypes=new Map;get selectionTypes(){return this._selectionTypes}addSelectionType(D,P){this._selectionTypes.set(D,P)}hasSelectionType(D){if(!D)return!1;return this._selectionTypes.has(D)}getSelectionType(D){return this._selectionTypes.get(D)}_selectionFunctions=new Map;get selectionFunctions(){return this._selectionFunctions}addSelectionFunction(D,P){this._selectionFunctions.set(D,P)}hasSelectionFunction(D){if(!D)return!1;return this._selectionFunctions.has(D)}getSelectionFunction(D){return this._selectionFunctions.get(D)}}class Kq{D;constructor(D){this.Codegen=D}async generate({schema:D,options:P,authConfig:O}){let W=new h5,F=bq(D,P,W);for(let[B,Z]of W.types.entries()){if(!Z.isEnum)continue;new this.Codegen(B,W,P).makeEnumType()}for(let[B,Z]of W.types.entries()){if(!Z.isInput)continue;new this.Codegen(B,W,P).makeSelectionType()}for(let[B,Z]of W.types.entries()){if(Z.isScalar||Z.isInput||Z.isEnum)continue;new this.Codegen(B,W,P).makeSelectionType(),new this.Codegen(B,W,P).makeSelectionFunction()}let R=this.Codegen.makeRootOperationFunction(F.operations,W,P,O);return[this.Codegen.FieldValueWrapperType,this.Codegen.HelperTypes(Array.from(W.customScalars.values())),this.Codegen.HelperFunctions,...[...W.enumsTypes.entries()].map(([B,Z])=>Z).filter((B,Z,H)=>H.indexOf(B)===Z),...[...W.argumentTypes.entries()].map(([B,Z])=>Z).filter((B,Z,H)=>H.indexOf(B)===Z),...[...W.argumentMeta.entries()].map(([B,Z])=>Z).filter((B,Z,H)=>H.indexOf(B)===Z),...[...W.selectionTypes.entries()].filter(([B])=>!B.isScalar&&!B.isEnum&&!(B.isScalar&&B.isUnion)).map(([B,Z])=>Z).filter((B,Z,H)=>H.indexOf(B)===Z),this.Codegen.EnumTypesMapped(W),this.Codegen.UnionTypesMapped(W),...[...W.selectionFunctions.entries()].filter(([B])=>!B.isScalar&&!B.isEnum&&!B.isInput&&!(B.isScalar&&B.isUnion)).map(([B,Z])=>Z).filter((B)=>!B.startsWith("new SelectionWrapper")).filter((B,Z,H)=>H.indexOf(B)===Z),R].join("\n")}}var B2={GraphQL:{default:L2},OpenAPI:{default:d0}};import cU from"fs";import r1 from"fs";import bF from"path";var C8=(D)=>{process.stdout.write("\x1Bc"),process.stdout.write(` _____ _ / ___| (_) \\ \`--. __ _ _ __ ___ __ _ _ __ _ _ _ _ __ ___ \\\`--. \\ / _\` || '_ \` _ \\ / _\` || '__|| || | | || '_ \` _ \\ /\\__/ /| (_| || | | | | || (_| || | | || |_| || | | | | | \\____/ \\__,_||_| |_| |_| \\__,_||_| |_| \\__,_||_| |_| |_| `),console.log(" "),console.log(`v${GP.version}`),console.log(" "),console.log("Welcome to the Samarium CLI Assistant"),console.log(" "),console.log(`This assistant will help you compile an ${D} API into a samarium typescript sdk.`),console.log(" ")};var bO=(D)=>D.name==="up"||D.name==="k"||D.ctrl&&D.name==="p",g5=(D)=>D.name==="down"||D.name==="j"||D.ctrl&&D.name==="n";var KO=(D)=>D.name==="backspace",Vq=(D)=>"123456789".includes(D.name),$8=(D)=>D.name==="enter"||D.name==="return";class v5 extends Error{message="Prompt was canceled"}class y5 extends Error{}class m5 extends Error{}class h1 extends Error{}import{AsyncResource as r_}from"node:async_hooks";import{AsyncLocalStorage as G_,AsyncResource as z_}from"node:async_hooks";var jq=new G_;function I_(D){return{rl:D,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function _q(D,P){let O=I_(D);return jq.run(O,()=>{P(O)})}function M8(){let D=jq.getStore();if(!D)throw new m5("[Inquirer] Hook functions can only be called from within a prompt");return D}function l5(){return M8().rl}function c5(D){let P=(...O)=>{let W=M8(),F=!1,R=W.handleChange;W.handleChange=()=>{F=!0};let L=D(...O);if(F)R();return W.handleChange=R,L};return z_.bind(P)}function w8(D){let P=M8(),{index:O}=P,W={get(){return P.hooks[O]},set(R){P.hooks[O]=R},initialized:O in P.hooks},F=D(W);return P.index++,F}function uq(){M8().handleChange()}var VO={queue(D){let P=M8(),{index:O}=P;P.hooksEffect.push(()=>{P.hooksCleanup[O]?.();let W=D(l5());if(W!=null&&typeof W!=="function")throw new h1("useEffect return value must be a cleanup function or nothing.");P.hooksCleanup[O]=W})},run(){let D=M8();c5(()=>{D.hooksEffect.forEach((P)=>{P()}),D.hooksEffect.length=0})()}};function xD(D){return w8((P)=>{let O=(F)=>{if(P.get()!==F)P.set(F),uq()};if(P.initialized)return[P.get(),O];let W=typeof D==="function"?D():D;return P.set(W),[W,O]})}function jO(D,P){w8((O)=>{let W=O.get();if(!Array.isArray(W)||P.some((R,L)=>!Object.is(R,W[L])))VO.queue(D);O.set(P)})}var N0=qD(e5(),1),DF=qD(UY(),1),JY={prefix:N0.default.green("?"),spinner:{interval:DF.default.dots.interval,frames:DF.default.dots.frames.map((D)=>N0.default.yellow(D))},style:{answer:N0.default.cyan,message:N0.default.bold,error:(D)=>N0.default.red(`> ${D}`),defaultAnswer:(D)=>N0.default.dim(`(${D})`),help:N0.default.dim,highlight:N0.default.cyan,key:(D)=>N0.default.cyan.bold(`<${D}>`)}};function SY(D){if(typeof D!=="object"||D===null)return!1;let P=D;while(Object.getPrototypeOf(P)!==null)P=Object.getPrototypeOf(P);return Object.getPrototypeOf(D)===P}function XY(...D){let P={};for(let O of D)for(let[W,F]of Object.entries(O)){let R=P[W];P[W]=SY(R)&&SY(F)?XY(R,F):F}return P}function r0(...D){let P=[JY,...D.filter((O)=>O!=null)];return XY(...P)}function l2({isLoading:D=!1,theme:P}){let[O,W]=xD(0),{prefix:F,spinner:R}=r0(P);if(jO(()=>{if(D){let L=setTimeout(r_.bind(()=>{W(O+1)}),R.interval);return()=>clearTimeout(L)}},[D,O]),D){let L=O%R.frames.length;return R.frames[L]}return F}function gO(D,P){return w8((O)=>{let W=O.get();if(!W||W.dependencies.length!==P.length||W.dependencies.some((F,R)=>F!==P[R])){let F=D();return O.set({value:F,dependencies:P}),F}return W.value})}function H2(D){return xD({current:D})[0]}function c2(D){let P=H2(D);P.current=D,jO((O)=>{let W=c5((F,R)=>{P.current(R,O)});return O.input.on("keypress",W),()=>{O.input.removeListener("keypress",W)}},[])}var fY=qD(AY(),1),xY=qD(kY(),1);function l1(D,P){return D.split("\n").flatMap((O)=>xY.default(O,P,{trim:!1,hard:!0}).split("\n").map((W)=>W.trimEnd())).join("\n")}function vO(){return fY.default({defaultWidth:80,output:l5().output})}function Ru(D,P){return l1(D,P).split("\n")}function Lu(D,P){let O=P.length,W=(D%O+O)%O;return[...P.slice(W),...P.slice(0,W)]}function hY({items:D,width:P,renderItem:O,active:W,position:F,pageSize:R}){let L=D.map((A,E)=>({item:A,index:E,isActive:E===W})),B=Lu(W-F,L).slice(0,R),Z=(A)=>Ru(O(B[A]),P),H=Array.from({length:R}),Y=Z(F).slice(0,R),q=F+Y.length<=R?F:R-Y.length;H.splice(q,Y.length,...Y);let U=q+Y.length,J=F+1;while(U=R)break;J++}U=q-1,J=F-1;while(U>=0&&J>=0){for(let A of Z(J).reverse())if(H[U--]=A,U<0)break;J--}return H.filter((A)=>typeof A==="string")}function gY({active:D,pageSize:P,total:O}){let W=Math.floor(P/2);if(O<=P||D=O-W)return D+P-O;return W}function vY({active:D,lastActive:P,total:O,pageSize:W,pointer:F}){if(O<=W)return D;if(P{}}var PU=qD(lY(),1);var p2=[];p2.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")p2.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")p2.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var yO=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",BF=Symbol.for("signal-exit emitter"),ZF=globalThis,Zu=Object.defineProperty.bind(Object);class cY{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ZF[BF])return ZF[BF];Zu(ZF,BF,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,P){this.listeners[D].push(P)}removeListener(D,P){let O=this.listeners[D],W=O.indexOf(P);if(W===-1)return;if(W===0&&O.length===1)O.length=0;else O.splice(W,1)}emit(D,P,O){if(this.emitted[D])return!1;this.emitted[D]=!0;let W=!1;for(let F of this.listeners[D])W=F(P,O)===!0||W;if(D==="exit")W=this.emit("afterExit",P,O)||W;return W}}class qF{}var Hu=(D)=>{return{onExit(P,O){return D.onExit(P,O)},load(){return D.load()},unload(){return D.unload()}}};class pY extends qF{onExit(){return()=>{}}load(){}unload(){}}class dY extends qF{#O=HF.platform==="win32"?"SIGINT":"SIGHUP";#P=new cY;#D;#R;#L;#F={};#W=!1;constructor(D){super();this.#D=D,this.#F={};for(let P of p2)this.#F[P]=()=>{let O=this.#D.listeners(P),{count:W}=this.#P,F=D;if(typeof F.__signal_exit_emitter__==="object"&&typeof F.__signal_exit_emitter__.count==="number")W+=F.__signal_exit_emitter__.count;if(O.length===W){this.unload();let R=this.#P.emit("exit",null,P),L=P==="SIGHUP"?this.#O:P;if(!R)D.kill(D.pid,L)}};this.#L=D.reallyExit,this.#R=D.emit}onExit(D,P){if(!yO(this.#D))return()=>{};if(this.#W===!1)this.load();let O=P?.alwaysLast?"afterExit":"exit";return this.#P.on(O,D),()=>{if(this.#P.removeListener(O,D),this.#P.listeners.exit.length===0&&this.#P.listeners.afterExit.length===0)this.unload()}}load(){if(this.#W)return;this.#W=!0,this.#P.count+=1;for(let D of p2)try{let P=this.#F[D];if(P)this.#D.on(D,P)}catch(P){}this.#D.emit=(D,...P)=>{return this.#Z(D,...P)},this.#D.reallyExit=(D)=>{return this.#B(D)}}unload(){if(!this.#W)return;this.#W=!1,p2.forEach((D)=>{let P=this.#F[D];if(!P)throw new Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,P)}catch(O){}}),this.#D.emit=this.#R,this.#D.reallyExit=this.#L,this.#P.count-=1}#B(D){if(!yO(this.#D))return 0;return this.#D.exitCode=D||0,this.#P.emit("exit",this.#D.exitCode,null),this.#L.call(this.#D,this.#D.exitCode)}#Z(D,...P){let O=this.#R;if(D==="exit"&&yO(this.#D)){if(typeof P[0]==="number")this.#D.exitCode=P[0];let W=O.call(this.#D,D,...P);return this.#P.emit("exit",this.#D.exitCode,null),W}else return O.call(this.#D,D,...P)}}var HF=globalThis.process,{onExit:rY,load:Rr,unload:Lr}=Hu(yO(HF)?new dY(HF):new pY);var eY=qD(iY(),1),q2=qD(UF(),1);var oY=(D)=>D.split("\n").length,Ju=(D)=>D.split("\n").pop()??"";class lO{rl;height=0;extraLinesUnderPrompt=0;cursorPos;constructor(D){this.rl=D,this.rl=D,this.cursorPos=D.getCursorPos()}render(D,P=""){let O=Ju(D),W=eY.default(O),F=W;if(this.rl.line.length>0)F=F.slice(0,-this.rl.line.length);this.rl.setPrompt(F),this.cursorPos=this.rl.getCursorPos();let R=vO();if(D=l1(D,R),P=l1(P,R),W.length%R===0)D+="\n";let L=D+(P?"\n"+P:""),Z=Math.floor(W.length/R)-this.cursorPos.rows+(P?oY(P):0);if(Z>0)L+=q2.default.cursorUp(Z);L+=q2.default.cursorTo(this.cursorPos.cols),this.clean(),this.rl.output.unmute(),this.extraLinesUnderPrompt=Z,this.height=oY(L),this.rl.output.write(L),this.rl.output.mute()}checkCursorPos(){let D=this.rl.getCursorPos();if(D.cols!==this.cursorPos.cols)this.rl.output.unmute(),this.rl.output.write(q2.default.cursorTo(D.cols)),this.rl.output.mute(),this.cursorPos=D}clean(){this.rl.output.unmute(),this.rl.output.write([this.extraLinesUnderPrompt>0?q2.default.cursorDown(this.extraLinesUnderPrompt):"",q2.default.eraseLines(this.height)].join("")),this.extraLinesUnderPrompt=0,this.rl.output.mute()}clearContent(){this.rl.output.unmute(),this.rl.output.write([this.extraLinesUnderPrompt>0?q2.default.cursorDown(this.extraLinesUnderPrompt):"","\n"].join("")),this.rl.output.mute()}done(){this.rl.setPrompt(""),this.rl.output.unmute(),this.rl.output.write(q2.default.cursorShow),this.rl.output.end(),this.rl.close()}}function d2(D){return(O,W)=>{let F=W?.input??process.stdin,R=new PU.default;R.pipe(W?.output??process.stdout);let L=DU.createInterface({terminal:!0,input:F,output:R}),B=new lO(L),Z=()=>{},H=new LF((Y,q)=>{_q(L,(U)=>{function J(){B.checkCursorPos()}let A=rY((w,C)=>{E(),q(new y5(`User force closed the prompt with ${w} ${C}`))});function E(){try{U.hooksCleanup.forEach((w)=>{w?.()})}catch(w){q(w)}if(W?.clearPromptOnDone)B.clean();else B.clearContent();B.done(),A(),U.rl.input.removeListener("keypress",J)}Z=()=>{E(),q(new v5)};function G(w){setImmediate(()=>{E(),Y(w)})}function Q(w){U.index=0,U.handleChange=()=>Q(w);try{let C=D(O,G),[j,b]=typeof C==="string"?[C]:C;B.render(j,b),VO.run()}catch(C){E(),q(C)}}Q(O),U.rl.input.on("keypress",J)})});return H.cancel=Z,H}}var FU=qD(e5(),1);import k0 from"node:process";function Su(){if(k0.platform!=="win32")return k0.env.TERM!=="linux";return Boolean(k0.env.WT_SESSION)||Boolean(k0.env.TERMINUS_SUBLIME)||k0.env.ConEmuTask==="{cmd::Cmder}"||k0.env.TERM_PROGRAM==="Terminus-Sublime"||k0.env.TERM_PROGRAM==="vscode"||k0.env.TERM==="xterm-256color"||k0.env.TERM==="alacritty"||k0.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var OU={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},WU={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Xu={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Eu={...OU,...WU},Au={...OU,...Xu},Gu=Su(),zu=Gu?Eu:Au,cO=zu,zr=Object.entries(WU);class u8{separator=FU.default.dim(Array.from({length:15}).join(cO.line));type="separator";constructor(D){if(D)this.separator=D}static isSeparator(D){return Boolean(D&&D.type==="separator")}}var pO=d2((D,P)=>{let{transformer:O=(U)=>U?"yes":"no"}=D,[W,F]=xD("pending"),[R,L]=xD(""),B=r0(D.theme),Z=l2({theme:B});c2((U,J)=>{if($8(U)){let A=D.default!==!1;if(/^(y|yes)/i.test(R))A=!0;else if(/^(n|no)/i.test(R))A=!1;L(O(A)),F("done"),P(A)}else L(J.line)});let H=R,Y="";if(W==="done")H=B.style.answer(R);else Y=` ${B.style.defaultAnswer(D.default===!1?"y/N":"Y/n")}`;let q=B.style.message(D.message);return`${Z} ${q}${Y} ${H}`});var a0=d2((D,P)=>{let{validate:O=()=>!0}=D,W=r0(D.theme),[F,R]=xD("pending"),[L="",B]=xD(D.default),[Z,H]=xD(),[Y,q]=xD(""),J=l2({isLoading:F==="loading",theme:W});c2(async(w,C)=>{if(F!=="pending")return;if($8(w)){let j=Y||L;R("loading");let b=await O(j);if(b===!0)q(j),R("done"),P(j);else C.write(Y),H(b||"You must provide a valid value"),R("pending")}else if(KO(w)&&!Y)B(void 0);else if(w.name==="tab"&&!Y)B(void 0),C.clearLine(0),C.write(L),q(L);else q(C.line),H(void 0)});let A=W.style.message(D.message),E=Y;if(typeof D.transformer==="function")E=D.transformer(Y,{isFinal:F==="done"});else if(F==="done")E=W.style.answer(Y);let G;if(L&&F!=="done"&&!Y)G=W.style.defaultAnswer(L);let Q="";if(Z)Q=W.style.error(Z);return[[J,A,G,E].filter((w)=>w!==void 0).join(" "),Q]});var $U=qD(CU(),1);var MU=qD(UF(),1);var ku={icon:{cursor:cO.pointer},style:{disabled:(D)=>$U.default.dim(`- ${D}`)},helpMode:"auto"};function N8(D){return!u8.isSeparator(D)&&!D.disabled}var U2=d2((D,P)=>{let{choices:O,loop:W=!0,pageSize:F=7}=D,R=H2(!0),L=r0(ku,D.theme),B=l2({theme:L}),[Z,H]=xD("pending"),Y=H2(),q=gO(()=>{let b=O.findIndex(N8),_=O.findLastIndex(N8);if(b<0)throw new h1("[select prompt] No selectable choices. All choices are disabled.");return{first:b,last:_}},[O]),U=gO(()=>{if(!("default"in D))return-1;return O.findIndex((b)=>N8(b)&&b.value===D.default)},[D.default,O]),[J,A]=xD(U===-1?q.first:U),E=O[J];c2((b,_)=>{if(clearTimeout(Y.current),$8(b))H("done"),P(E.value);else if(bO(b)||g5(b)){if(_.clearLine(0),W||bO(b)&&J!==q.first||g5(b)&&J!==q.last){let m=bO(b)?-1:1,K=J;do K=(K+m+O.length)%O.length;while(!N8(O[K]));A(K)}}else if(Vq(b)){_.clearLine(0);let m=Number(b.name)-1,K=O[m];if(K!=null&&N8(K))A(m)}else if(KO(b))_.clearLine(0);else{let m=_.line.toLowerCase(),K=O.findIndex((z)=>{if(u8.isSeparator(z)||!N8(z))return!1;return String(z.name||z.value).toLowerCase().startsWith(m)});if(K>=0)A(K);Y.current=setTimeout(()=>{_.clearLine(0)},700)}});let G=L.style.message(D.message),Q="",w="";if(L.helpMode==="always"||L.helpMode==="auto"&&R.current)if(R.current=!1,O.length>F)w=`\n${L.style.help("(Use arrow keys to reveal more choices)")}`;else Q=L.style.help("(Use arrow keys)");let C=RF({items:O,active:J,renderItem({item:b,isActive:_}){if(u8.isSeparator(b))return` ${b.separator}`;let m=b.name||b.value;if(b.disabled){let k=typeof b.disabled==="string"?b.disabled:"(disabled)";return L.style.disabled(`${m} ${k}`)}let K=_?L.style.highlight:(k)=>k,z=_?L.icon.cursor:" ";return K(`${z} ${m}`)},pageSize:F,loop:W});if(Z==="done"){let b=E.name||String(E.value);return`${B} ${G} ${L.style.answer(b)}`}let j=E.description?`\n${E.description}`:"";return`${[B,G,Q].filter(Boolean).join(" ")}\n${C}${j}${w}${MU.default.cursorHide}`});var r2=qD(eO(),1);var nu=/^(?:( )+|\t+)/;function lU(D,P){let O=new Map,W=0,F,R;for(let L of D.split(/\n/g)){if(!L)continue;let B,Z,H,Y,q,U=L.match(nu);if(U===null)W=0,F="";else{if(B=U[0].length,Z=U[1]?"space":"tab",P&&Z==="space"&&B===1)continue;if(Z!==F)W=0;F=Z,H=1,Y=0;let J=B-W;if(W=B,J===0)H=0,Y=1;else{let A=J>0?J:-J;R=iu(Z,A)}q=O.get(R),q=q===void 0?[1,0]:[q[0]+H,q[1]+Y],O.set(R,q)}}return O}function iu(D,P){return(D==="space"?"s":"t")+String(P)}function tu(D){let O=D[0]==="s"?"space":"tab",W=Number(D.slice(1));return{type:O,amount:W}}function ou(D){let P,O=0,W=0;for(let[F,[R,L]]of D)if(R>O||R===O&&L>W)O=R,W=L,P=F;return P}function eu(D,P){return(D==="space"?" ":"\t").repeat(P)}function wF(D){if(typeof D!=="string")throw new TypeError("Expected a string");let P=lU(D,!0);if(P.size===0)P=lU(D,!1);let O=ou(P),W,F=0,R="";if(O!==void 0)({type:W,amount:F}=tu(O)),R=eu(W,F);return{amount:F,type:W,indent:R}}var L0=async(D,P,O,W=!1)=>{let F=/<([^>]+)>|\[([^\]]+)\]/g,R,L=[];while(R=F.exec(P))L.push(R[1]??R[2]);if(L.length>0){if(!W)C8(D),W=!1;let B=P.replace(F,(Z)=>`\x1B[32m${Z}\x1B[0m`);if(await pO({message:`${O} contains placeholders: ${B} . Do you want to replace them with actual values?`})){let Z=[];for(let H of L){let Y=await a0({message:`Enter value for placeholder ${H}:`});Z.push(Y)}P=P.replace(F,()=>Z.shift()??""),console.log(`${O} has been updated to: ${P}`),console.log(" ")}else console.log(`${O} has not been updated. Using the original value: ${P}`),console.log(" ");return P}return P},D3=async(D)=>{let P="";while(!P){P=await a0({message:D});try{new URL(P)}catch(O){console.log("Invalid URL"),P=""}}return P},P3=async()=>{let D=await U2({message:"The endpoint seems to need authorization, choose the header name, or enter a custom name:",default:"Authorization",choices:[{name:"Authorization",value:"Authorization"},{name:"X-Authorization",value:"X-Authorization"},{name:"X-Api-Key",value:"X-Api-Key"},{name:"custom",value:"custom"}]});if(D==="custom")while(!D||D==="custom")D=await a0({message:"Enter the header name:"});let P="";while(!P)P=await a0({message:"Enter the header value:"});return[D,P]},O3=async(D=["."])=>{while(!0){let P=r1.readdirSync(D.join("/"),{withFileTypes:!0}),O=await U2({message:`Navigate to the output directory: ${D.join("/")}`,default:".",choices:[{name:"[create new directory]",value:"[new_dir]",description:"Current directory"},{name:".",value:".",description:"Current directory"},{name:"..",value:"..",description:"Parent directory"},...P.filter((W)=>W.isDirectory()).map((W)=>({name:W.name,value:W.name}))]});if(D.push(O),O==="[new_dir]"){D.pop();let W=await a0({message:"Enter the new directory name:"});r1.mkdirSync(bF.resolve(...D,W)),D.push(W);break}if(O===".")break;if(O===".."){D.pop(),D.pop();continue}}return D},W3=async(D)=>{let P=await a0({message:D,default:"sdk.ts"});if(!P.endsWith(".ts"))P+=".ts";return P},cD={import:r2.default.rgb(185,126,180),name:r2.default.rgb(156,220,254),from:r2.default.rgb(185,126,180),string:r2.default.rgb(206,145,120)},F3=async(D,P)=>{let O=!1;if(r1.existsSync("tsconfig.json")&&await pO({message:` File 'tsconfig.json' detected. Do you want to add an import alias for the generated file?`,default:!1})){console.log(" ");let W=await a0({message:"Enter the alias name:",default:D.replace(".ts","")}),F=r1.readFileSync("tsconfig.json","utf-8");F=F.replace(/\/\/.*/g,"");let R=wF(F).indent||" ",L=JSON.parse(F),B=L.compilerOptions?.baseUrl||".",Z=bF.relative(bF.resolve(process.cwd(),B),P);if(!L.compilerOptions)L.compilerOptions={};if(!L.compilerOptions.paths)L.compilerOptions.paths={};L.compilerOptions.paths[W]=[Z],r1.writeFileSync("tsconfig.json",JSON.stringify(L,null,R)),console.log(` ${r2.default.green("Done! Alias added to 'tsconfig.json'.")} ${r2.default.green("Go ahead and import the generated file in your project:")} ${cD.import("import")} ${cD.name(W)} ${cD.from("from")} ${cD.string(`"${W}"`)}; `),O=!0}return O};var KF=async(D,P,O,W={})=>{let F=!0;if(D.url=await L0("GraphQL",D.url,"The URL",F),D.headers?.length)for(let Z of D.headers){let H=await L0("GraphQL",Z,"The header",F);D.headers[D.headers.indexOf(Z)]=H}if(W.endpoint)W.endpoint=await L0("GraphQL",W.endpoint,"The endpoint",F);if(W.authHeaderName)W.authHeaderName=await L0("GraphQL",W.authHeaderName,"The auth header name",F);O=await L0("GraphQL",O,"The output file",F);let R;try{R=await m2(D.url,D.headers)}catch(Z){if(Z.response?.status===401||Z.response?.status===403){console.error(`Introspection failed: HTTP ${Z.response.status} Unauthorized. Please check your headers.`);return}console.error("Failed to introspect schema",Z);return}let B=await new z8.Generator(B2.GraphQL[P]).generate({schema:R,options:{},authConfig:D.headers?{headerName:D.headers.length===1?D.headers[0].split("=")[0]:"Authorization"}:void 0});if(!O.endsWith(".ts"))O+=".ts";cU.mkdirSync(O.split("/").slice(0,-1).join("/"),{recursive:!0}),cU.writeFileSync(O,B.replace("[ENDPOINT]",W.endpoint??D.url))};var VF=qD(eO(),1);import DT from"fs";import pU from"path";var dU=async()=>{C8("GraphQL");let D=await D3("Enter the graphql endpoint url:"),P,O;try{P=await m2(D)}catch(L){if(L.response?.status===401||L.response?.status===403){let[B,Z]=await P3();try{P=await m2(D,[`${B}=${Z}`]),O=B}catch(H){console.error("Error: ",H.message);return}}else{console.error("Error: ",L.message),console.error("Failed to introspect schema");return}}if(!P){console.error("Failed to introspect schema");return}let W=await O3(["."]),F=await W3("Enter the output filename:"),R=pU.resolve(...W,F);try{let B=await new z8.Generator(B2.GraphQL.default).generate({schema:P,options:{},authConfig:O?{headerName:O}:void 0});DT.writeFileSync(R,B.replace("[ENDPOINT]",D))}catch(L){console.error("Error: ",L.message),console.error("Failed to generate code");return}if(!await F3(F,R))console.log(` ${VF.default.green(`Done! Generated file saved at ${R}.`)} ${VF.default.green("Go ahead and import the generated file in your project:")} ${cD.import("import")} ${cD.name(F.replace(".ts",""))} ${cD.from("from")} ${cD.string(`"./${pU.relative(process.cwd(),R.replace(".ts",""))}"`)}; `);console.log(" "),console.log("Please star the repo if you liked it! https://github.com/liontariai/samarium"),console.log(" ")};var PX=qD(DX(),1);async function P8(D,P){let W=await(await fetch(D,{headers:P?.map((F)=>F.split("="))})).text();try{return JSON.parse(W)}catch(F){return PX.default.parse(W)}}import ey from"fs";var y4=async(D,P)=>{let O=await P8(D.url,D.headers);ey.writeFileSync(P,JSON.stringify(O,null,2))};import OX from"fs";var m4=async(D,P,O,W={})=>{let F=!0;if(D.url=await L0("OpenAPI",D.url,"The URL",F),D.headers?.length)for(let Z of D.headers){let H=await L0("OpenAPI",Z,"The header",F);D.headers[D.headers.indexOf(Z)]=H}if(W.endpoint)W.endpoint=await L0("OpenAPI",W.endpoint,"The endpoint",F);if(W.authHeaderName)W.authHeaderName=await L0("OpenAPI",W.authHeaderName,"The auth header name",F);O=await L0("OpenAPI",O,"The output file",F);let R;try{R=await P8(D.url,D.headers)}catch(Z){if(Z.response?.status===401||Z.response?.status===403){console.error(`Introspection failed: HTTP ${Z.response.status} Unauthorized. Please check your headers.`);return}console.error("Failed to introspect schema",Z);return}let B=await new Q8.Generator(B2.OpenAPI[P]).generate({schema:R,options:{},authConfig:D.headers?{headerName:D.headers.length===1?D.headers[0].split("=")[0]:"Authorization"}:void 0});if(!O.endsWith(".ts"))O+=".ts";OX.mkdirSync(O.split("/").slice(0,-1).join("/"),{recursive:!0}),OX.writeFileSync(O,B.replace("[ENDPOINT]",W.endpoint??R.servers?.[0]?.url??D.url))};var l4=qD(eO(),1);import Dm from"fs";import WX from"path";var FX=async()=>{C8("OpenAPI");let D=await D3("Enter the url to the OpenAPI schema json or yaml file:"),P,O;try{P=await P8(D)}catch(L){if(L.response?.status===401||L.response?.status===403){let[B,Z]=await P3();try{P=await P8(D,[`${B}=${Z}`]),O=B}catch(H){console.error("Error: ",H.message);return}}else{console.error("Error: ",L.message),console.error("Failed to introspect schema");return}}if(!P){console.error("Failed to introspect schema");return}let W=await O3(["."]),F=await W3("Enter the output filename:"),R=WX.resolve(...W,F);try{let B=await new Q8.Generator(B2.OpenAPI.default).generate({schema:P,options:{},authConfig:O?{headerName:O}:void 0});Dm.writeFileSync(R,B.replace("[ENDPOINT]",P.servers?.[0]?.url??D))}catch(L){console.error("Error: ",L.message),console.error("Failed to generate code");return}if(!await F3(F,R))console.log(` ${l4.default.green(`Done! Generated file saved at ${R}.`)} ${l4.default.green("Go ahead and import the generated file in your project:")} ${cD.import("import")} ${cD.name(F.replace(".ts",""))} ${cD.from("from")} ${cD.string(`"./${WX.relative(process.cwd(),R.replace(".ts",""))}"`)}; `);console.log(" "),console.log("Please star the repo if you liked it! https://github.com/liontariai/samarium"),console.log(" ")};function d8(D,P){return P.concat([D])}var i0=new Y9;i0.name("samarium").description("CLI Description").version(GP.version);i0.command("ui",{isDefault:!0}).description("Start the assistant UI").action(async()=>{if(await U2({message:"Do you want to compile GraphQL or OpenAPI?",choices:[{name:"GraphQL",value:"GraphQL",description:"GraphQL"},{name:"OpenAPI",value:"OpenAPI",description:"OpenAPI"}]})==="GraphQL")await dU().catch((P)=>{});else await FX().catch((P)=>{})});i0.command("introspect ").option("-h, --header [header]","Header to send with the request, e.g. 'Authorization=Bearer 1234'",d8,[]).description("This command is deprecated. Use the explicit command instead: introspect-gql or introspect-openapi").action(async(D,P,{header:O}={})=>{if(await U2({message:"Do you want to introspect GraphQL or OpenAPI?",choices:[{name:"GraphQL",value:"GraphQL",description:"GraphQL"},{name:"OpenAPI",value:"OpenAPI",description:"OpenAPI"}]})==="GraphQL")await _5({url:D,headers:O},P);else await y4({url:D,headers:O},P)});i0.command("introspect-gql ").option("-h, --header [header]","Header to send with the request, e.g. 'Authorization=Bearer 1234'",d8,[]).description("Introspect a GraphQL schema").action(async(D,P,{header:O}={})=>{await _5({url:D,headers:O},P)});i0.command("introspect-openapi ").option("-h, --header [header]","Header to send with the request, e.g. 'Authorization=Bearer 1234'",d8,[]).description("Introspect an OpenAPI schema").action(async(D,P,{header:O}={})=>{await y4({url:D,headers:O},P)});i0.command("generate ").alias("g").description("This command is deprecated. Use the explicit command instead: generate-gql or generate-openapi").option("-h, --header [header]","Header to send with the request, e.g. 'Authorization=Bearer 1234'",d8,[]).option("--endpoint [endpoint]","Endpoint to use in the generated code, defaults to the schema introspection URL").option("--auth-header-name [authHeaderName]","Name of the header to use for authorization. Defaults to first header name, if headers are provided.").action(async(D,P,{header:O,endpoint:W,authHeaderName:F}={})=>{if(await U2({message:"Do you want to compile GraphQL or OpenAPI?",choices:[{name:"GraphQL",value:"GraphQL",description:"GraphQL"},{name:"OpenAPI",value:"OpenAPI",description:"OpenAPI"}]})==="GraphQL")await KF({url:D,headers:O},"default",P,{endpoint:W,authHeaderName:F});else await m4({url:D,headers:O},"default",P,{endpoint:W,authHeaderName:F})});i0.command("generate-gql ").option("-h, --header [header]","Header to send with the request, e.g. 'Authorization=Bearer 1234'",d8,[]).option("--endpoint [endpoint]","Endpoint to use in the generated code, defaults to the schema introspection URL").option("--auth-header-name [authHeaderName]","Name of the header to use for authorization. Defaults to first header name, if headers are provided.").description("Generate code from a GraphQL schema").action(async(D,P,{header:O,endpoint:W,authHeaderName:F}={})=>{await KF({url:D,headers:O},"default",P,{endpoint:W,authHeaderName:F})});i0.command("generate-openapi ").alias("generate-oas").option("-h, --header [header]","Header to send with the request, e.g. 'Authorization=Bearer 1234'",d8,[]).option("--endpoint [endpoint]","Endpoint to use in the generated code, defaults to the schema introspection URL").option("--auth-header-name [authHeaderName]","Name of the header to use for authorization. Defaults to first header name, if headers are provided.").description("Generate code from a GraphQL schema").action(async(D,P,{header:O,endpoint:W,authHeaderName:F}={})=>{await m4({url:D,headers:O},"default",P,{endpoint:W,authHeaderName:F})});i0.parse(process.argv);