media-gen-cli 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +63 -0
- package/LICENSE +21 -0
- package/README.md +296 -0
- package/dist/media-gen.mjs +360 -0
- package/package.json +63 -0
- package/skills/media-generation/LICENSE +21 -0
- package/skills/media-generation/RELEASE_NOTES.md +98 -0
- package/skills/media-generation/SKILL.md +273 -0
- package/skills/media-generation/scripts/install.cmd +46 -0
- package/skills/media-generation/scripts/install.ps1 +58 -0
- package/skills/media-generation/scripts/install.sh +48 -0
- package/skills/media-generation/scripts/media-gen.cmd +3 -0
- package/skills/media-generation/scripts/media-gen.mjs +360 -0
- package/skills/media-generation/scripts/media-gen.ps1 +3 -0
- package/skills/media-generation/scripts/media-gen.sh +4 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
var ky=Object.create;var cs=Object.defineProperty;var Iy=Object.getOwnPropertyDescriptor;var Dy=Object.getOwnPropertyNames;var jy=Object.getPrototypeOf,Ny=Object.prototype.hasOwnProperty;var R=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,i)=>(typeof require<"u"?require:e)[i]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var A=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ls=(t,e)=>{for(var i in e)cs(t,i,{get:e[i],enumerable:!0})},Fy=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Dy(e))!Ny.call(t,r)&&r!==i&&cs(t,r,{get:()=>e[r],enumerable:!(n=Iy(e,r))||n.enumerable});return t};var Ee=(t,e,i)=>(i=t!=null?ky(jy(t)):{},Fy(e||!t||!t.__esModule?cs(i,"default",{value:t,enumerable:!0}):i,t));var an=_(ps=>{var sr=class extends Error{constructor(e,i,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=i,this.exitCode=e,this.nestedError=void 0}},us=class extends sr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ps.CommanderError=sr;ps.InvalidArgumentError=us});var ar=_(fs=>{var{InvalidArgumentError:Ly}=an(),ds=class{constructor(e,i){switch(this.description=i||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,i){return i===this.defaultValue||!Array.isArray(i)?[e]:i.concat(e)}default(e,i){return this.defaultValue=e,this.defaultValueDescription=i,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(i,n)=>{if(!this.argChoices.includes(i))throw new Ly(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(i,n):i},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function My(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}fs.Argument=ds;fs.humanReadableArgName=My});var hs=_(Ul=>{var{humanReadableArgName:By}=ar(),ms=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let i=e.commands.filter(r=>!r._hidden),n=e._getHelpCommand();return n&&!n._hidden&&i.push(n),this.sortSubcommands&&i.sort((r,o)=>r.name().localeCompare(o.name())),i}compareOptions(e,i){let n=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return n(e).localeCompare(n(i))}visibleOptions(e){let i=e.options.filter(r=>!r.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),o=n.long&&e._findOption(n.long);!r&&!o?i.push(n):n.long&&!o?i.push(e.createOption(n.long,n.description)):n.short&&!r&&i.push(e.createOption(n.short,n.description))}return this.sortOptions&&i.sort(this.compareOptions),i}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let i=[];for(let n=e.parent;n;n=n.parent){let r=n.options.filter(o=>!o.hidden);i.push(...r)}return this.sortOptions&&i.sort(this.compareOptions),i}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(i=>{i.description=i.description||e._argsDescription[i.name()]||""}),e.registeredArguments.find(i=>i.description)?e.registeredArguments:[]}subcommandTerm(e){let i=e.registeredArguments.map(n=>By(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(i?" "+i:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,i){return i.visibleCommands(e).reduce((n,r)=>Math.max(n,i.subcommandTerm(r).length),0)}longestOptionTermLength(e,i){return i.visibleOptions(e).reduce((n,r)=>Math.max(n,i.optionTerm(r).length),0)}longestGlobalOptionTermLength(e,i){return i.visibleGlobalOptions(e).reduce((n,r)=>Math.max(n,i.optionTerm(r).length),0)}longestArgumentTermLength(e,i){return i.visibleArguments(e).reduce((n,r)=>Math.max(n,i.argumentTerm(r).length),0)}commandUsage(e){let i=e._name;e._aliases[0]&&(i=i+"|"+e._aliases[0]);let n="";for(let r=e.parent;r;r=r.parent)n=r.name()+" "+n;return n+i+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let i=[];return e.argChoices&&i.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&i.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&i.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&i.push(`env: ${e.envVar}`),i.length>0?`${e.description} (${i.join(", ")})`:e.description}argumentDescription(e){let i=[];if(e.argChoices&&i.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&i.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),i.length>0){let n=`(${i.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,i){let n=i.padWidth(e,i),r=i.helpWidth||80,o=2,s=2;function a(d,g){if(g){let v=`${d.padEnd(n+s)}${g}`;return i.wrap(v,r-o,n+s)}return d}function c(d){return d.join(`
|
|
6
|
+
`).replace(/^/gm," ".repeat(o))}let l=[`Usage: ${i.commandUsage(e)}`,""],u=i.commandDescription(e);u.length>0&&(l=l.concat([i.wrap(u,r,0),""]));let p=i.visibleArguments(e).map(d=>a(i.argumentTerm(d),i.argumentDescription(d)));p.length>0&&(l=l.concat(["Arguments:",c(p),""]));let f=i.visibleOptions(e).map(d=>a(i.optionTerm(d),i.optionDescription(d)));if(f.length>0&&(l=l.concat(["Options:",c(f),""])),this.showGlobalOptions){let d=i.visibleGlobalOptions(e).map(g=>a(i.optionTerm(g),i.optionDescription(g)));d.length>0&&(l=l.concat(["Global Options:",c(d),""]))}let m=i.visibleCommands(e).map(d=>a(i.subcommandTerm(d),i.subcommandDescription(d)));return m.length>0&&(l=l.concat(["Commands:",c(m),""])),l.join(`
|
|
7
|
+
`)}padWidth(e,i){return Math.max(i.longestOptionTermLength(e,i),i.longestGlobalOptionTermLength(e,i),i.longestSubcommandTermLength(e,i),i.longestArgumentTermLength(e,i))}wrap(e,i,n,r=40){let o=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${o}]+`);if(e.match(s))return e;let a=i-n;if(a<r)return e;let c=e.slice(0,n),l=e.slice(n).replace(`\r
|
|
8
|
+
`,`
|
|
9
|
+
`),u=" ".repeat(n),f="\\s\u200B",m=new RegExp(`
|
|
10
|
+
|.{1,${a-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g"),d=l.match(m)||[];return c+d.map((g,v)=>g===`
|
|
11
|
+
`?"":(v>0?u:"")+g.trimEnd()).join(`
|
|
12
|
+
`)}};Ul.Help=ms});var ys=_(xs=>{var{InvalidArgumentError:$y}=an(),gs=class{constructor(e,i){this.flags=e,this.description=i||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=qy(e);this.short=n.shortFlag,this.long=n.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(e,i){return this.defaultValue=e,this.defaultValueDescription=i,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let i=e;return typeof e=="string"&&(i={[e]:!0}),this.implied=Object.assign(this.implied||{},i),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,i){return i===this.defaultValue||!Array.isArray(i)?[e]:i.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(i,n)=>{if(!this.argChoices.includes(i))throw new $y(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(i,n):i},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Uy(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},vs=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(i=>{i.negate?this.negativeOptions.set(i.attributeName(),i):this.positiveOptions.set(i.attributeName(),i)}),this.negativeOptions.forEach((i,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,i){let n=i.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,o=r!==void 0?r:!1;return i.negate===(o===e)}};function Uy(t){return t.split("-").reduce((e,i)=>e+i[0].toUpperCase()+i.slice(1))}function qy(t){let e,i,n=t.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),i=n.shift(),!e&&/^-[^-]$/.test(i)&&(e=i,i=void 0),{shortFlag:e,longFlag:i}}xs.Option=gs;xs.DualOptions=vs});var Vl=_(ql=>{function Vy(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let i=[];for(let n=0;n<=t.length;n++)i[n]=[n];for(let n=0;n<=e.length;n++)i[0][n]=n;for(let n=1;n<=e.length;n++)for(let r=1;r<=t.length;r++){let o=1;t[r-1]===e[n-1]?o=0:o=1,i[r][n]=Math.min(i[r-1][n]+1,i[r][n-1]+1,i[r-1][n-1]+o),r>1&&n>1&&t[r-1]===e[n-2]&&t[r-2]===e[n-1]&&(i[r][n]=Math.min(i[r][n],i[r-2][n-2]+1))}return i[t.length][e.length]}function zy(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let i=t.startsWith("--");i&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let n=[],r=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=Vy(t,s),c=Math.max(t.length,s.length);(c-a)/c>o&&(a<r?(r=a,n=[s]):a===r&&n.push(s))}),n.sort((s,a)=>s.localeCompare(a)),i&&(n=n.map(s=>`--${s}`)),n.length>1?`
|
|
13
|
+
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
14
|
+
(Did you mean ${n[0]}?)`:""}ql.suggestSimilar=zy});var Kl=_(Wl=>{var Hy=R("node:events").EventEmitter,bs=R("node:child_process"),Ot=R("node:path"),ws=R("node:fs"),oe=R("node:process"),{Argument:Gy,humanReadableArgName:Wy}=ar(),{CommanderError:_s}=an(),{Help:Ky}=hs(),{Option:zl,DualOptions:Jy}=ys(),{suggestSimilar:Hl}=Vl(),Es=class t extends Hy{constructor(e){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=e||"",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:i=>oe.stdout.write(i),writeErr:i=>oe.stderr.write(i),getOutHelpWidth:()=>oe.stdout.isTTY?oe.stdout.columns:void 0,getErrHelpWidth:()=>oe.stderr.isTTY?oe.stderr.columns:void 0,outputError:(i,n)=>n(i)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let i=this;i;i=i.parent)e.push(i);return e}command(e,i,n){let r=i,o=n;typeof r=="object"&&r!==null&&(o=r,r=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(s);return r&&(c.description(r),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),r?this:c}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Ky,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,i){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);return i=i||{},i.isDefault&&(this._defaultCommandName=e._name),(i.noHelp||i.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,i){return new Gy(e,i)}argument(e,i,n,r){let o=this.createArgument(e,i);return typeof n=="function"?o.default(r).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(i=>{this.argument(i)}),this}addArgument(e){let i=this.registeredArguments.slice(-1)[0];if(i&&i.variadic)throw new Error(`only the last argument can be variadic '${i.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,i){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,r]=e.match(/([^ ]+) *(.*)/),o=i??"display help for command",s=this.createCommand(n);return s.helpOption(!1),r&&s.arguments(r),o&&s.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(e,i){return typeof e!="object"?(this.helpCommand(e,i),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,i){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
16
|
+
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(i):this._lifeCycleHooks[e]=[i],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=i=>{if(i.code!=="commander.executeSubCommandAsync")throw i},this}_exit(e,i,n){this._exitCallback&&this._exitCallback(new _s(e,i,n)),oe.exit(e)}action(e){let i=n=>{let r=this.registeredArguments.length,o=n.slice(0,r);return this._storeOptionsAsProperties?o[r]=this:o[r]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=i,this}createOption(e,i){return new zl(e,i)}_callParseArg(e,i,n,r){try{return e.parseArg(i,n)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${r} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let i=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(i){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
17
|
+
- already used by option '${i.flags}'`)}this.options.push(e)}_registerCommand(e){let i=r=>[r.name()].concat(r.aliases()),n=i(e).find(r=>this._findCommand(r));if(n){let r=i(this._findCommand(n)).join("|"),o=i(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let i=e.name(),n=e.attributeName();if(e.negate){let o=e.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let r=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let c=this.getOptionValue(n);o!==null&&e.parseArg?o=this._callParseArg(e,o,c,s):o!==null&&e.variadic&&(o=e._concatValue(o,c)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(n,o,a)};return this.on("option:"+i,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;r(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+i,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;r(o,s,"env")}),this}_optionEx(e,i,n,r,o){if(typeof i=="object"&&i instanceof zl)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(i,n);if(s.makeOptionMandatory(!!e.mandatory),typeof r=="function")s.default(o).argParser(r);else if(r instanceof RegExp){let a=r;r=(c,l)=>{let u=a.exec(c);return u?u[0]:l},s.default(o).argParser(r)}else s.default(r);return this.addOption(s)}option(e,i,n,r){return this._optionEx({},e,i,n,r)}requiredOption(e,i,n,r){return this._optionEx({mandatory:!0},e,i,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,i){return this.setOptionValueWithSource(e,i,void 0)}setOptionValueWithSource(e,i,n){return this._storeOptionsAsProperties?this[e]=i:this._optionValues[e]=i,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let i;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(i=n.getOptionValueSource(e))}),i}_prepareUserArgs(e,i){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(i=i||{},e===void 0&&i.from===void 0){oe.versions?.electron&&(i.from="electron");let r=oe.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(i.from="eval")}e===void 0&&(e=oe.argv),this.rawArgs=e.slice();let n;switch(i.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":oe.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${i.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,i){let n=this._prepareUserArgs(e,i);return this._parseCommand([],n),this}async parseAsync(e,i){let n=this._prepareUserArgs(e,i);return await this._parseCommand([],n),this}_executeSubCommand(e,i){i=i.slice();let n=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function o(u,p){let f=Ot.resolve(u,p);if(ws.existsSync(f))return f;if(r.includes(Ot.extname(p)))return;let m=r.find(d=>ws.existsSync(`${f}${d}`));if(m)return`${f}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=ws.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Ot.resolve(Ot.dirname(u),a)}if(a){let u=o(a,s);if(!u&&!e._executableFile&&this._scriptPath){let p=Ot.basename(this._scriptPath,Ot.extname(this._scriptPath));p!==this._name&&(u=o(a,`${p}-${e._name}`))}s=u||s}n=r.includes(Ot.extname(s));let c;oe.platform!=="win32"?n?(i.unshift(s),i=Gl(oe.execArgv).concat(i),c=bs.spawn(oe.argv[0],i,{stdio:"inherit"})):c=bs.spawn(s,i,{stdio:"inherit"}):(i.unshift(s),i=Gl(oe.execArgv).concat(i),c=bs.spawn(oe.execPath,i,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{oe.on(p,()=>{c.killed===!1&&c.exitCode===null&&c.kill(p)})});let l=this._exitCallback;c.on("close",u=>{u=u??1,l?l(new _s(u,"commander.executeSubCommandAsync","(close)")):oe.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT"){let p=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",f=`'${s}' does not exist
|
|
18
|
+
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
19
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
20
|
+
- ${p}`;throw new Error(f)}else if(u.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)oe.exit(1);else{let p=new _s(1,"commander.executeSubCommandAsync","(error)");p.nestedError=u,l(p)}}),this.runningCommand=c}_dispatchSubcommand(e,i,n){let r=this._findCommand(e);r||this.help({error:!0});let o;return o=this._chainOrCallSubCommandHook(o,r,"preSubcommand"),o=this._chainOrCall(o,()=>{if(r._executableHandler)this._executeSubCommand(r,i.concat(n));else return r._parseCommand(i,n)}),o}_dispatchHelpCommand(e){e||this.help();let i=this._findCommand(e);return i&&!i._executableHandler&&i.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,i)=>{e.required&&this.args[i]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,r,o)=>{let s=r;if(r!==null&&n.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${n.name()}'.`;s=this._callParseArg(n,r,o,a)}return s};this._checkNumberOfArguments();let i=[];this.registeredArguments.forEach((n,r)=>{let o=n.defaultValue;n.variadic?r<this.args.length?(o=this.args.slice(r),n.parseArg&&(o=o.reduce((s,a)=>e(n,a,s),n.defaultValue))):o===void 0&&(o=[]):r<this.args.length&&(o=this.args[r],n.parseArg&&(o=e(n,o,n.defaultValue))),i[r]=o}),this.processedArgs=i}_chainOrCall(e,i){return e&&e.then&&typeof e.then=="function"?e.then(()=>i()):i()}_chainOrCallHooks(e,i){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[i]!==void 0).forEach(o=>{o._lifeCycleHooks[i].forEach(s=>{r.push({hookedCommand:o,callback:s})})}),i==="postAction"&&r.reverse(),r.forEach(o=>{n=this._chainOrCall(n,()=>o.callback(o.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,i,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(o=>{r=this._chainOrCall(r,()=>o(this,i))}),r}_parseCommand(e,i){let n=this.parseOptions(i);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),i=n.unknown,this.args=e.concat(i),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),i);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(i),this._dispatchSubcommand(this._defaultCommandName,e,i);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,i)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(o))r(),this._processArguments(),this.parent.emit(o,e,i);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,i);this.listenerCount("command:*")?this.emit("command:*",e,i):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(i=>i._name===e||i._aliases.includes(e))}_findOption(e){return this.options.find(i=>i.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(i=>{i.mandatory&&e.getOptionValue(i.attributeName())===void 0&&e.missingMandatoryOptionValue(i)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let r=n.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let r=e.find(o=>n.conflictsWith.includes(o.attributeName()));r&&this._conflictingOption(n,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let i=[],n=[],r=i,o=e.slice();function s(c){return c.length>1&&c[0]==="-"}let a=null;for(;o.length;){let c=o.shift();if(c==="--"){r===n&&r.push(c),r.push(...o);break}if(a&&!s(c)){this.emit(`option:${a.name()}`,c);continue}if(a=null,s(c)){let l=this._findOption(c);if(l){if(l.required){let u=o.shift();u===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,u)}else if(l.optional){let u=null;o.length>0&&!s(o[0])&&(u=o.shift()),this.emit(`option:${l.name()}`,u)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let l=this._findOption(`-${c[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,c.slice(2)):(this.emit(`option:${l.name()}`),o.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let l=c.indexOf("="),u=this._findOption(c.slice(0,l));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,c.slice(l+1));continue}}if(s(c)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&i.length===0&&n.length===0){if(this._findCommand(c)){i.push(c),o.length>0&&n.push(...o);break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){i.push(c),o.length>0&&i.push(...o);break}else if(this._defaultCommandName){n.push(c),o.length>0&&n.push(...o);break}}if(this._passThroughOptions){r.push(c),o.length>0&&r.push(...o);break}r.push(c)}return{operands:i,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},i=this.options.length;for(let n=0;n<i;n++){let r=this.options[n].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,i)=>Object.assign(e,i.opts()),{})}error(e,i){this._outputConfiguration.outputError(`${e}
|
|
21
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
22
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
23
|
+
`),this.outputHelp({error:!0}));let n=i||{},r=n.exitCode||1,o=n.code||"commander.error";this._exit(r,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in oe.env){let i=e.attributeName();(this.getOptionValue(i)===void 0||["default","config","env"].includes(this.getOptionValueSource(i)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,oe.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Jy(this.options),i=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&i(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(r=>!i(r)).forEach(r=>{this.setOptionValueWithSource(r,n.implied[r],"implied")})})}missingArgument(e){let i=`error: missing required argument '${e}'`;this.error(i,{code:"commander.missingArgument"})}optionMissingArgument(e){let i=`error: option '${e.flags}' argument missing`;this.error(i,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let i=`error: required option '${e.flags}' not specified`;this.error(i,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,i){let n=s=>{let a=s.attributeName(),c=this.getOptionValue(a),l=this.options.find(p=>p.negate&&a===p.attributeName()),u=this.options.find(p=>!p.negate&&a===p.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||s},r=s=>{let a=n(s),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${r(e)} cannot be used with ${r(i)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let i="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);r=r.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);i=Hl(e,r)}let n=`error: unknown option '${e}'${i}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let i=this.registeredArguments.length,n=i===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${i} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],i="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(o=>{r.push(o.name()),o.alias()&&r.push(o.alias())}),i=Hl(e,r)}let n=`error: unknown command '${e}'${i}`;this.error(n,{code:"commander.unknownCommand"})}version(e,i,n){if(e===void 0)return this._version;this._version=e,i=i||"-V, --version",n=n||"output the version number";let r=this.createOption(i,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
24
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,i){return e===void 0&&i===void 0?this._description:(this._description=e,i&&(this._argsDescription=i),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let i=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(i=this.commands[this.commands.length-1]),e===i._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let r=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${r}'`)}return i._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(i=>this.alias(i)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let i=this.registeredArguments.map(n=>Wy(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?i:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Ot.basename(e,Ot.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let i=this.createHelp();return i.helpWidth===void 0&&(i.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),i.formatHelp(this,i)}_getHelpContext(e){e=e||{};let i={error:!!e.error},n;return i.error?n=r=>this._outputConfiguration.writeErr(r):n=r=>this._outputConfiguration.writeOut(r),i.write=e.write||n,i.command=this,i}outputHelp(e){let i;typeof e=="function"&&(i=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let r=this.helpInformation(n);if(i&&(r=i(r),typeof r!="string"&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(r),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",n))}helpOption(e,i){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",i=i??"display help for command",this._helpOption=this.createOption(e,i),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let i=oe.exitCode||0;i===0&&e&&typeof e!="function"&&e.error&&(i=1),this._exit(i,"commander.help","(outputHelp)")}addHelpText(e,i){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
25
|
+
Expecting one of '${n.join("', '")}'`);let r=`${e}Help`;return this.on(r,o=>{let s;typeof i=="function"?s=i({error:o.error,command:o.command}):s=i,s&&o.write(`${s}
|
|
26
|
+
`)}),this}_outputHelpIfRequested(e){let i=this._getHelpOption();i&&e.find(r=>i.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Gl(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let i,n="127.0.0.1",r="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?i=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(i=o[1],/^\d+$/.test(o[3])?r=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(i=o[1],n=o[3],r=o[4]),i&&r!=="0"?`${i}=${n}:${parseInt(r)+1}`:e})}Wl.Command=Es});var Zl=_(He=>{var{Argument:Jl}=ar(),{Command:Ss}=Kl(),{CommanderError:Yy,InvalidArgumentError:Yl}=an(),{Help:Xy}=hs(),{Option:Xl}=ys();He.program=new Ss;He.createCommand=t=>new Ss(t);He.createOption=(t,e)=>new Xl(t,e);He.createArgument=(t,e)=>new Jl(t,e);He.Command=Ss;He.Option=Xl;He.Argument=Jl;He.Help=Xy;He.CommanderError=Yy;He.InvalidArgumentError=Yl;He.InvalidOptionArgumentError=Yl});var eu=_((e1,Zy)=>{Zy.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var ou=_((t1,Rt)=>{var Os=R("fs"),cr=R("path"),Qy=R("os"),eb=R("crypto"),tb=eu(),Rs=tb.version,ib=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function nb(t){let e={},i=t.toString();i=i.replace(/\r\n?/mg,`
|
|
27
|
+
`);let n;for(;(n=ib.exec(i))!=null;){let r=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
|
|
28
|
+
`),o=o.replace(/\\r/g,"\r")),e[r]=o}return e}function rb(t){t=t||{};let e=ru(t);t.path=e;let i=de.configDotenv(t);if(!i.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=nu(t).split(","),r=n.length,o;for(let s=0;s<r;s++)try{let a=n[s].trim(),c=sb(i,a);o=de.decrypt(c.ciphertext,c.key);break}catch(a){if(s+1>=r)throw a}return de.parse(o)}function ob(t){console.log(`[dotenv@${Rs}][WARN] ${t}`)}function cn(t){console.log(`[dotenv@${Rs}][DEBUG] ${t}`)}function iu(t){console.log(`[dotenv@${Rs}] ${t}`)}function nu(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function sb(t,e){let i;try{i=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let c=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw c.code="INVALID_DOTENV_KEY",c}throw a}let n=i.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let r=i.searchParams.get("environment");if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${r.toUpperCase()}`,s=t.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function ru(t){let e=null;if(t&&t.path&&t.path.length>0)if(Array.isArray(t.path))for(let i of t.path)Os.existsSync(i)&&(e=i.endsWith(".vault")?i:`${i}.vault`);else e=t.path.endsWith(".vault")?t.path:`${t.path}.vault`;else e=cr.resolve(process.cwd(),".env.vault");return Os.existsSync(e)?e:null}function tu(t){return t[0]==="~"?cr.join(Qy.homedir(),t.slice(1)):t}function ab(t){let e=!!(t&&t.debug),i=t&&"quiet"in t?t.quiet:!0;(e||!i)&&iu("Loading env from encrypted .env.vault");let n=de._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),de.populate(r,n,t),{parsed:n}}function cb(t){let e=cr.resolve(process.cwd(),".env"),i="utf8",n=!!(t&&t.debug),r=t&&"quiet"in t?t.quiet:!0;t&&t.encoding?i=t.encoding:n&&cn("No encoding is specified. UTF-8 is used by default");let o=[e];if(t&&t.path)if(!Array.isArray(t.path))o=[tu(t.path)];else{o=[];for(let l of t.path)o.push(tu(l))}let s,a={};for(let l of o)try{let u=de.parse(Os.readFileSync(l,{encoding:i}));de.populate(a,u,t)}catch(u){n&&cn(`Failed to load ${l} ${u.message}`),s=u}let c=process.env;if(t&&t.processEnv!=null&&(c=t.processEnv),de.populate(c,a,t),n||!r){let l=Object.keys(a).length,u=[];for(let p of o)try{let f=cr.relative(process.cwd(),p);u.push(f)}catch(f){n&&cn(`Failed to load ${p} ${f.message}`),s=f}iu(`injecting env (${l}) from ${u.join(",")}`)}return s?{parsed:a,error:s}:{parsed:a}}function lb(t){if(nu(t).length===0)return de.configDotenv(t);let e=ru(t);return e?de._configVault(t):(ob(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),de.configDotenv(t))}function ub(t,e){let i=Buffer.from(e.slice(-64),"hex"),n=Buffer.from(t,"base64"),r=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=eb.createDecipheriv("aes-256-gcm",i,r);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,c=s.message==="Invalid key length",l=s.message==="Unsupported state or unable to authenticate data";if(a||c){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(l){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw s}}function pb(t,e,i={}){let n=!!(i&&i.debug),r=!!(i&&i.override);if(typeof e!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(e))Object.prototype.hasOwnProperty.call(t,o)?(r===!0&&(t[o]=e[o]),n&&cn(r===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):t[o]=e[o]}var de={configDotenv:cb,_configVault:ab,_parseVault:rb,config:lb,decrypt:ub,parse:nb,populate:pb};Rt.exports.configDotenv=de.configDotenv;Rt.exports._configVault=de._configVault;Rt.exports._parseVault=de._parseVault;Rt.exports.config=de.config;Rt.exports.decrypt=de.decrypt;Rt.exports.parse=de.parse;Rt.exports.populate=de.populate;Rt.exports=de});var Is=_((s1,vu)=>{"use strict";var un=t=>t&&typeof t.message=="string",ks=t=>{if(!t)return;let e=t.cause;if(typeof e=="function"){let i=t.cause();return un(i)?i:void 0}else return un(e)?e:void 0},hu=(t,e)=>{if(!un(t))return"";let i=t.stack||"";if(e.has(t))return i+`
|
|
29
|
+
causes have become circular...`;let n=ks(t);return n?(e.add(t),i+`
|
|
30
|
+
caused by: `+hu(n,e)):i},gb=t=>hu(t,new Set),gu=(t,e,i)=>{if(!un(t))return"";let n=i?"":t.message||"";if(e.has(t))return n+": ...";let r=ks(t);if(r){e.add(t);let o=typeof t.cause=="function";return n+(o?"":": ")+gu(r,e,o)}else return n},vb=t=>gu(t,new Set);vu.exports={isErrorLike:un,getErrorCause:ks,stackWithCauses:gb,messageWithCauses:vb}});var Ds=_((a1,yu)=>{"use strict";var xb=Symbol("circular-ref-tag"),pr=Symbol("pino-raw-err-ref"),xu=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[pr]},set:function(t){this[pr]=t}}});Object.defineProperty(xu,pr,{writable:!0,value:{}});yu.exports={pinoErrProto:xu,pinoErrorSymbols:{seen:xb,rawSymbol:pr}}});var _u=_((c1,wu)=>{"use strict";wu.exports=Ns;var{messageWithCauses:yb,stackWithCauses:bb,isErrorLike:bu}=Is(),{pinoErrProto:wb,pinoErrorSymbols:_b}=Ds(),{seen:js}=_b,{toString:Eb}=Object.prototype;function Ns(t){if(!bu(t))return t;t[js]=void 0;let e=Object.create(wb);e.type=Eb.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=yb(t),e.stack=bb(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(i=>Ns(i)));for(let i in t)if(e[i]===void 0){let n=t[i];bu(n)?i!=="cause"&&!Object.prototype.hasOwnProperty.call(n,js)&&(e[i]=Ns(n)):e[i]=n}return delete t[js],e.raw=t,e}});var Su=_((l1,Eu)=>{"use strict";Eu.exports=fr;var{isErrorLike:Fs}=Is(),{pinoErrProto:Sb,pinoErrorSymbols:Ob}=Ds(),{seen:dr}=Ob,{toString:Rb}=Object.prototype;function fr(t){if(!Fs(t))return t;t[dr]=void 0;let e=Object.create(Sb);e.type=Rb.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(i=>fr(i))),Fs(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,dr)&&(e.cause=fr(t.cause));for(let i in t)if(e[i]===void 0){let n=t[i];Fs(n)?Object.prototype.hasOwnProperty.call(n,dr)||(e[i]=fr(n)):e[i]=n}return delete t[dr],e.raw=t,e}});var Au=_((u1,Tu)=>{"use strict";Tu.exports={mapHttpRequest:Tb,reqSerializer:Ru};var Ls=Symbol("pino-raw-req-ref"),Ou=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Ls]},set:function(t){this[Ls]=t}}});Object.defineProperty(Ou,Ls,{writable:!0,value:{}});function Ru(t){let e=t.info||t.socket,i=Object.create(Ou);if(i.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),i.method=t.method,t.originalUrl)i.url=t.originalUrl;else{let n=t.path;i.url=typeof n=="string"?n:t.url?t.url.path||t.url:void 0}return t.query&&(i.query=t.query),t.params&&(i.params=t.params),i.headers=t.headers,i.remoteAddress=e&&e.remoteAddress,i.remotePort=e&&e.remotePort,i.raw=t.raw||t,i}function Tb(t){return{req:Ru(t)}}});var Iu=_((p1,ku)=>{"use strict";ku.exports={mapHttpResponse:Ab,resSerializer:Cu};var Ms=Symbol("pino-raw-res-ref"),Pu=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Ms]},set:function(t){this[Ms]=t}}});Object.defineProperty(Pu,Ms,{writable:!0,value:{}});function Cu(t){let e=Object.create(Pu);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function Ab(t){return{res:Cu(t)}}});var $s=_((d1,Du)=>{"use strict";var Bs=_u(),Pb=Su(),mr=Au(),hr=Iu();Du.exports={err:Bs,errWithCause:Pb,mapHttpRequest:mr.mapHttpRequest,mapHttpResponse:hr.mapHttpResponse,req:mr.reqSerializer,res:hr.resSerializer,wrapErrorSerializer:function(e){return e===Bs?e:function(n){return e(Bs(n))}},wrapRequestSerializer:function(e){return e===mr.reqSerializer?e:function(n){return e(mr.reqSerializer(n))}},wrapResponseSerializer:function(e){return e===hr.resSerializer?e:function(n){return e(hr.resSerializer(n))}}}});var Us=_((f1,ju)=>{"use strict";function Cb(t,e){return e}ju.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=Cb;let i=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(i))return;let n=i.slice(2),r=[];for(let o of n)o&&r.push(o.getFileName());return r}});var $u=_((m1,Bu)=>{"use strict";function qs(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){let e=[];for(let i=0;i<t.length;i++)e[i]=qs(t[i]);return e}if(typeof t=="object"){let e=Object.create(Object.getPrototypeOf(t));for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=qs(t[i]));return e}return t}function Nu(t){let e=[],i="",n=!1,r=!1,o="";for(let s=0;s<t.length;s++){let a=t[s];!n&&a==="."?i&&(e.push(i),i=""):a==="["?(i&&(e.push(i),i=""),n=!0):a==="]"&&n?(e.push(i),i="",n=!1,r=!1):(a==='"'||a==="'")&&n?r?a===o?(r=!1,o=""):i+=a:(r=!0,o=a):i+=a}return i&&e.push(i),e}function Fu(t,e,i){let n=t;for(let o=0;o<e.length-1;o++){let s=e[o];if(typeof n!="object"||n===null||!(s in n)||typeof n[s]!="object"||n[s]===null)return!1;n=n[s]}let r=e[e.length-1];if(r==="*"){if(Array.isArray(n))for(let o=0;o<n.length;o++)n[o]=i;else if(typeof n=="object"&&n!==null)for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(n[o]=i)}else typeof n=="object"&&n!==null&&r in n&&Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=i);return!0}function Lu(t,e){let i=t;for(let r=0;r<e.length-1;r++){let o=e[r];if(typeof i!="object"||i===null||!(o in i)||typeof i[o]!="object"||i[o]===null)return!1;i=i[o]}let n=e[e.length-1];if(n==="*"){if(Array.isArray(i))for(let r=0;r<i.length;r++)i[r]=void 0;else if(typeof i=="object"&&i!==null)for(let r in i)Object.prototype.hasOwnProperty.call(i,r)&&delete i[r]}else typeof i=="object"&&i!==null&&n in i&&Object.prototype.hasOwnProperty.call(i,n)&&delete i[n];return!0}var gr=Symbol("PATH_NOT_FOUND");function kb(t,e){let i=t;for(let n of e){if(i==null||typeof i!="object"||i===null||!(n in i))return gr;i=i[n]}return i}function Ib(t,e){let i=t;for(let n of e){if(i==null||typeof i!="object"||i===null)return;i=i[n]}return i}function Db(t,e,i,n=!1){for(let r of e){let o=Nu(r);if(o.includes("*"))Mu(t,o,i,r,n);else if(n)Lu(t,o);else{let s=kb(t,o);if(s===gr)continue;let a=typeof i=="function"?i(s,o):i;Fu(t,o,a)}}}function Mu(t,e,i,n,r=!1){let o=e.indexOf("*");if(o===e.length-1){let s=e.slice(0,-1),a=t;for(let c of s){if(a==null||typeof a!="object"||a===null)return;a=a[c]}if(Array.isArray(a))if(r)for(let c=0;c<a.length;c++)a[c]=void 0;else for(let c=0;c<a.length;c++){let l=[...s,c.toString()],u=typeof i=="function"?i(a[c],l):i;a[c]=u}else if(typeof a=="object"&&a!==null)if(r){let c=[];for(let l in a)Object.prototype.hasOwnProperty.call(a,l)&&c.push(l);for(let l of c)delete a[l]}else for(let c in a){let l=[...s,c],u=typeof i=="function"?i(a[c],l):i;a[c]=u}}else jb(t,e,i,o,n,r)}function jb(t,e,i,n,r,o=!1){let s=e.slice(0,n),a=e.slice(n+1),c=[];function l(u,p){if(p===s.length){if(Array.isArray(u))for(let f=0;f<u.length;f++)c[p]=f.toString(),l(u[f],p+1);else if(typeof u=="object"&&u!==null)for(let f in u)c[p]=f,l(u[f],p+1)}else if(p<s.length){let f=s[p];u&&typeof u=="object"&&u!==null&&f in u&&(c[p]=f,l(u[f],p+1))}else if(a.includes("*"))Mu(u,a,typeof i=="function"?(m,d)=>{let g=[...c.slice(0,p),...d];return i(m,g)}:i,r,o);else if(o)Lu(u,a);else{let f=typeof i=="function"?i(Ib(u,a),[...c.slice(0,p),...a]):i;Fu(u,a,f)}}if(s.length===0)l(t,0);else{let u=t;for(let p=0;p<s.length;p++){let f=s[p];if(u==null||typeof u!="object"||u===null)return;u=u[f],c[p]=f}u!=null&&l(u,s.length)}}function Nb(t){if(t.length===0)return null;let e=new Map;for(let i of t){let n=Nu(i),r=e;for(let o=0;o<n.length;o++){let s=n[o];r.has(s)||r.set(s,new Map),r=r.get(s)}}return e}function Fb(t,e){if(!e)return t;function i(n,r,o=0){if(!r||r.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let a=[];for(let c=0;c<n.length;c++){let l=c.toString();r.has(l)||r.has("*")?a[c]=i(n[c],r.get(l)||r.get("*")):a[c]=n[c]}return a}let s=Object.create(Object.getPrototypeOf(n));for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r.has(a)||r.has("*")?s[a]=i(n[a],r.get(a)||r.get("*")):s[a]=n[a]);return s}return i(t,e)}function Lb(t){if(typeof t!="string")throw new Error("Paths must be (non-empty) strings");if(t==="")throw new Error("Invalid redaction path ()");if(t.includes(".."))throw new Error(`Invalid redaction path (${t})`);if(t.includes(","))throw new Error(`Invalid redaction path (${t})`);let e=0,i=!1,n="";for(let r=0;r<t.length;r++){let o=t[r];if((o==='"'||o==="'")&&e>0)i?o===n&&(i=!1,n=""):(i=!0,n=o);else if(o==="["&&!i)e++;else if(o==="]"&&!i&&(e--,e<0))throw new Error(`Invalid redaction path (${t})`)}if(e!==0)throw new Error(`Invalid redaction path (${t})`)}function Mb(t){if(!Array.isArray(t))throw new TypeError("paths must be an array");for(let e of t)Lb(e)}function Bb(t={}){let{paths:e=[],censor:i="[REDACTED]",serialize:n=JSON.stringify,strict:r=!0,remove:o=!1}=t;Mb(e);let s=Nb(e);return function(c){if(r&&(c===null||typeof c!="object")&&(c==null||typeof c!="object"))return n?n(c):c;let l=Fb(c,s),u=c,p=i;return typeof i=="function"&&(p=i),Db(l,e,p,o),n===!1?(l.restore=function(){return qs(u)},l):typeof n=="function"?n(l):JSON.stringify(l)}}Bu.exports=Bb});var Si=_((h1,Uu)=>{"use strict";var $b=Symbol("pino.setLevel"),Ub=Symbol("pino.getLevel"),qb=Symbol("pino.levelVal"),Vb=Symbol("pino.levelComp"),zb=Symbol("pino.useLevelLabels"),Hb=Symbol("pino.useOnlyCustomLevels"),Gb=Symbol("pino.mixin"),Wb=Symbol("pino.lsCache"),Kb=Symbol("pino.chindings"),Jb=Symbol("pino.asJson"),Yb=Symbol("pino.write"),Xb=Symbol("pino.redactFmt"),Zb=Symbol("pino.time"),Qb=Symbol("pino.timeSliceIndex"),ew=Symbol("pino.stream"),tw=Symbol("pino.stringify"),iw=Symbol("pino.stringifySafe"),nw=Symbol("pino.stringifiers"),rw=Symbol("pino.end"),ow=Symbol("pino.formatOpts"),sw=Symbol("pino.messageKey"),aw=Symbol("pino.errorKey"),cw=Symbol("pino.nestedKey"),lw=Symbol("pino.nestedKeyStr"),uw=Symbol("pino.mixinMergeStrategy"),pw=Symbol("pino.msgPrefix"),dw=Symbol("pino.wildcardFirst"),fw=Symbol.for("pino.serializers"),mw=Symbol.for("pino.formatters"),hw=Symbol.for("pino.hooks"),gw=Symbol.for("pino.metadata");Uu.exports={setLevelSym:$b,getLevelSym:Ub,levelValSym:qb,levelCompSym:Vb,useLevelLabelsSym:zb,mixinSym:Gb,lsCacheSym:Wb,chindingsSym:Kb,asJsonSym:Jb,writeSym:Yb,serializersSym:fw,redactFmtSym:Xb,timeSym:Zb,timeSliceIndexSym:Qb,streamSym:ew,stringifySym:tw,stringifySafeSym:iw,stringifiersSym:nw,endSym:rw,formatOptsSym:ow,messageKeySym:sw,errorKeySym:aw,nestedKeySym:cw,wildcardFirstSym:dw,needsMetadataGsym:gw,useOnlyCustomLevelsSym:Hb,formattersSym:mw,hooksSym:hw,nestedKeyStrSym:lw,mixinMergeStrategySym:uw,msgPrefixSym:pw}});var zs=_((g1,Hu)=>{"use strict";var qu=$u(),{redactFmtSym:vw,wildcardFirstSym:vr}=Si(),Vs=/[^.[\]]+|\[([^[\]]*?)\]/g,Vu="[Redacted]",zu=!1;function xw(t,e){let{paths:i,censor:n,remove:r}=yw(t),o=i.reduce((c,l)=>{Vs.lastIndex=0;let u=Vs.exec(l),p=Vs.exec(l),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=vr),p===null)return c[f]=null,c;if(c[f]===null)return c;let{index:m}=p,d=`${l.substr(m,l.length-1)}`;return c[f]=c[f]||[],f!==vr&&c[f].length===0&&c[f].push(...c[vr]||[]),f===vr&&Object.keys(c).forEach(function(g){c[g]&&c[g].push(d)}),c[f].push(d),c},{}),s={[vw]:qu({paths:i,censor:n,serialize:e,strict:zu,remove:r})},a=(...c)=>e(typeof n=="function"?n(...c):n);return[...Object.keys(o),...Object.getOwnPropertySymbols(o)].reduce((c,l)=>{if(o[l]===null)c[l]=u=>a(u,[l]);else{let u=typeof n=="function"?(p,f)=>n(p,[l,...f]):n;c[l]=qu({paths:o[l],censor:u,serialize:e,strict:zu,remove:r})}return c},s)}function yw(t){if(Array.isArray(t))return t={paths:t,censor:Vu},t;let{paths:e,censor:i=Vu,remove:n}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(i=void 0),{paths:e,censor:i,remove:n}}Hu.exports=xw});var Ku=_((v1,Wu)=>{"use strict";var bw=()=>"",ww=()=>`,"time":${Date.now()}`,_w=()=>`,"time":${Math.round(Date.now()/1e3)}`,Ew=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,Sw=1000000n,Gu=1000000000n,Ow=BigInt(Date.now())*Sw,Rw=process.hrtime.bigint(),Tw=()=>{let t=process.hrtime.bigint()-Rw,e=Ow+t,i=e/Gu,n=e%Gu,r=Number(i*1000n+n/1000000n),o=new Date(r),s=o.getUTCFullYear(),a=(o.getUTCMonth()+1).toString().padStart(2,"0"),c=o.getUTCDate().toString().padStart(2,"0"),l=o.getUTCHours().toString().padStart(2,"0"),u=o.getUTCMinutes().toString().padStart(2,"0"),p=o.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${s}-${a}-${c}T${l}:${u}:${p}.${n.toString().padStart(9,"0")}Z"`};Wu.exports={nullTime:bw,epochTime:ww,unixTime:_w,isoTime:Ew,isoTimeNano:Tw}});var Yu=_((x1,Ju)=>{"use strict";function Aw(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}Ju.exports=Pw;function Pw(t,e,i){var n=i&&i.stringify||Aw,r=1;if(typeof t=="object"&&t!==null){var o=e.length+r;if(o===1)return t;var s=new Array(o);s[0]=n(t);for(var a=1;a<o;a++)s[a]=n(e[a]);return s.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var l="",u=1-r,p=-1,f=t&&t.length||0,m=0;m<f;){if(t.charCodeAt(m)===37&&m+1<f){switch(p=p>-1?p:0,t.charCodeAt(m+1)){case 100:case 102:if(u>=c||e[u]==null)break;p<m&&(l+=t.slice(p,m)),l+=Number(e[u]),p=m+2,m++;break;case 105:if(u>=c||e[u]==null)break;p<m&&(l+=t.slice(p,m)),l+=Math.floor(Number(e[u])),p=m+2,m++;break;case 79:case 111:case 106:if(u>=c||e[u]===void 0)break;p<m&&(l+=t.slice(p,m));var d=typeof e[u];if(d==="string"){l+="'"+e[u]+"'",p=m+2,m++;break}if(d==="function"){l+=e[u].name||"<anonymous>",p=m+2,m++;break}l+=n(e[u]),p=m+2,m++;break;case 115:if(u>=c)break;p<m&&(l+=t.slice(p,m)),l+=String(e[u]),p=m+2,m++;break;case 37:p<m&&(l+=t.slice(p,m)),l+="%",p=m+2,m++,u--;break}++u}++m}return p===-1?t:(p<f&&(l+=t.slice(p)),l)}});var Gs=_((y1,Hs)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let e=function(i){if((i>0&&i<1/0)===!1)throw typeof i!="number"&&typeof i!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(t,0,0,Number(i))},t=new Int32Array(new SharedArrayBuffer(4));Hs.exports=e}else{let t=function(e){if((e>0&&e<1/0)===!1)throw typeof e!="number"&&typeof e!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(e);for(;n>Date.now(););};Hs.exports=t}});var rp=_((b1,np)=>{"use strict";var te=R("fs"),Cw=R("events"),kw=R("util").inherits,Xu=R("path"),Ks=Gs(),Iw=R("assert"),xr=100,yr=Buffer.allocUnsafe(0),Dw=16*1024,Zu="buffer",Qu="utf8",[jw,Nw]=(process.versions.node||"0.0").split(".").map(Number),Fw=jw>=22&&Nw>=7;function ep(t,e){e._opening=!0,e._writing=!0,e._asyncDrainScheduled=!1;function i(o,s){if(o){e._reopening=!1,e._writing=!1,e._opening=!1,e.sync?process.nextTick(()=>{e.listenerCount("error")>0&&e.emit("error",o)}):e.emit("error",o);return}let a=e._reopening;e.fd=s,e.file=t,e._reopening=!1,e._opening=!1,e._writing=!1,e.sync?process.nextTick(()=>e.emit("ready")):e.emit("ready"),!e.destroyed&&(!e._writing&&e._len>e.minLength||e._flushPending?e._actualWrite():a&&process.nextTick(()=>e.emit("drain")))}let n=e.append?"a":"w",r=e.mode;if(e.sync)try{e.mkdir&&te.mkdirSync(Xu.dirname(t),{recursive:!0});let o=te.openSync(t,n,r);i(null,o)}catch(o){throw i(o),o}else e.mkdir?te.mkdir(Xu.dirname(t),{recursive:!0},o=>{if(o)return i(o);te.open(t,n,r,i)}):te.open(t,n,r,i)}function it(t){if(!(this instanceof it))return new it(t);let{fd:e,dest:i,minLength:n,maxLength:r,maxWrite:o,periodicFlush:s,sync:a,append:c=!0,mkdir:l,retryEAGAIN:u,fsync:p,contentMode:f,mode:m}=t||{};e=e||i,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=r||0,this.maxWrite=o||Dw,this._periodicFlush=s||0,this._periodicFlushTimer=void 0,this.sync=a||!1,this.writable=!0,this._fsync=p||!1,this.append=c||!1,this.mode=m,this.retryEAGAIN=u||(()=>!0),this.mkdir=l||!1;let d,g;if(f===Zu)this._writingBuf=yr,this.write=Bw,this.flush=Uw,this.flushSync=Vw,this._actualWrite=Hw,d=()=>te.writeSync(this.fd,this._writingBuf),g=()=>te.write(this.fd,this._writingBuf,this.release);else if(f===void 0||f===Qu)this._writingBuf="",this.write=Mw,this.flush=$w,this.flushSync=qw,this._actualWrite=zw,d=()=>Buffer.isBuffer(this._writingBuf)?te.writeSync(this.fd,this._writingBuf):te.writeSync(this.fd,this._writingBuf,"utf8"),g=()=>Buffer.isBuffer(this._writingBuf)?te.write(this.fd,this._writingBuf,this.release):te.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Qu}" and "${Zu}", but passed ${f}`);if(typeof e=="number")this.fd=e,process.nextTick(()=>this.emit("ready"));else if(typeof e=="string")ep(e,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(v,x)=>{if(v){if((v.code==="EAGAIN"||v.code==="EBUSY")&&this.retryEAGAIN(v,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Ks(xr),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(g,xr);else this._writing=!1,this.emit("error",v);return}this.emit("write",x);let y=Ws(this._writingBuf,this._len,x);if(this._len=y.len,this._writingBuf=y.writingBuf,this._writingBuf.length){if(!this.sync){g();return}try{do{let O=d(),C=Ws(this._writingBuf,this._len,O);this._len=C.len,this._writingBuf=C.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&te.fsyncSync(this.fd);let w=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):w>this.minLength?this._actualWrite():this._ending?w>0?this._actualWrite():(this._writing=!1,br(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Lw,this)):this.emit("drain"))},this.on("newListener",function(v){v==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function Ws(t,e,i){return typeof t=="string"&&(t=Buffer.from(t)),e=Math.max(e-i,0),t=t.subarray(i),{writingBuf:t,len:e}}function Lw(t){t.listenerCount("drain")>0&&(t._asyncDrainScheduled=!1,t.emit("drain"))}kw(it,Cw);function tp(t,e){return t.length===0?yr:t.length===1?t[0]:Buffer.concat(t,e)}function Mw(t){if(this.destroyed)throw new Error("SonicBoom destroyed");t=""+t;let e=Buffer.byteLength(t),i=this._len+e,n=this._bufs;return this.maxLength&&i>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(n.length===0||Buffer.byteLength(n[n.length-1])+e>this.maxWrite?n.push(t):n[n.length-1]+=t,this._len=i,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Bw(t){if(this.destroyed)throw new Error("SonicBoom destroyed");let e=this._len+t.length,i=this._bufs,n=this._lens;return this.maxLength&&e>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(i.length===0||n[n.length-1]+t.length>this.maxWrite?(i.push([t]),n.push(t.length)):(i[i.length-1].push(t),n[n.length-1]+=t.length),this._len=e,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function ip(t){this._flushPending=!0;let e=()=>{if(this._fsync)this._flushPending=!1,t();else try{te.fsync(this.fd,n=>{this._flushPending=!1,t(n)})}catch(n){t(n)}this.off("error",i)},i=n=>{this._flushPending=!1,t(n),this.off("drain",e)};this.once("drain",e),this.once("error",i)}function $w(t){if(t!=null&&typeof t!="function")throw new Error("flush cb must be a function");if(this.destroyed){let e=new Error("SonicBoom destroyed");if(t){t(e);return}throw e}if(this.minLength<=0){t?.();return}t&&ip.call(this,t),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Uw(t){if(t!=null&&typeof t!="function")throw new Error("flush cb must be a function");if(this.destroyed){let e=new Error("SonicBoom destroyed");if(t){t(e);return}throw e}if(this.minLength<=0){t?.();return}t&&ip.call(this,t),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}it.prototype.reopen=function(t){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(t)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(t&&(this.file=t),this._reopening=!0,this._writing)return;let e=this.fd;this.once("ready",()=>{e!==this.fd&&te.close(e,i=>{if(i)return this.emit("error",i)})}),ep(this.file,this)};it.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():br(this)))};function qw(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let t="";for(;this._bufs.length||t.length;){t.length<=0&&(t=this._bufs[0]);try{let e=Buffer.isBuffer(t)?te.writeSync(this.fd,t):te.writeSync(this.fd,t,"utf8"),i=Ws(t,this._len,e);t=i.writingBuf,this._len=i.len,t.length<=0&&this._bufs.shift()}catch(e){if((e.code==="EAGAIN"||e.code==="EBUSY")&&!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;Ks(xr)}}try{te.fsyncSync(this.fd)}catch{}}function Vw(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=yr);let t=yr;for(;this._bufs.length||t.length;){t.length<=0&&(t=tp(this._bufs[0],this._lens[0]));try{let e=te.writeSync(this.fd,t);t=t.subarray(e),this._len=Math.max(this._len-e,0),t.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(e){if((e.code==="EAGAIN"||e.code==="EBUSY")&&!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;Ks(xr)}}}it.prototype.destroy=function(){this.destroyed||br(this)};function zw(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let e=Buffer.isBuffer(this._writingBuf)?te.writeSync(this.fd,this._writingBuf):te.writeSync(this.fd,this._writingBuf,"utf8");t(null,e)}catch(e){t(e)}else te.write(this.fd,this._writingBuf,t)}function Hw(){let t=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:tp(this._bufs.shift(),this._lens.shift()),this.sync)try{let e=te.writeSync(this.fd,this._writingBuf);t(null,e)}catch(e){t(e)}else Fw&&(this._writingBuf=Buffer.from(this._writingBuf)),te.write(this.fd,this._writingBuf,t)}function br(t){if(t.fd===-1){t.once("ready",br.bind(null,t));return}t._periodicFlushTimer!==void 0&&clearInterval(t._periodicFlushTimer),t.destroyed=!0,t._bufs=[],t._lens=[],Iw(typeof t.fd=="number",`sonic.fd must be a number, got ${typeof t.fd}`);try{te.fsync(t.fd,e)}catch{}function e(){t.fd!==1&&t.fd!==2?te.close(t.fd,i):i()}function i(n){if(n){t.emit("error",n);return}t._ending&&!t._writing&&t.emit("finish"),t.emit("close")}}it.SonicBoom=it;it.default=it;np.exports=it});var Js=_((w1,lp)=>{"use strict";var nt={exit:[],beforeExit:[]},op={exit:Kw,beforeExit:Jw},Oi;function Gw(){Oi===void 0&&(Oi=new FinalizationRegistry(Yw))}function Ww(t){nt[t].length>0||process.on(t,op[t])}function sp(t){nt[t].length>0||(process.removeListener(t,op[t]),nt.exit.length===0&&nt.beforeExit.length===0&&(Oi=void 0))}function Kw(){ap("exit")}function Jw(){ap("beforeExit")}function ap(t){for(let e of nt[t]){let i=e.deref(),n=e.fn;i!==void 0&&n(i,t)}nt[t]=[]}function Yw(t){for(let e of["exit","beforeExit"]){let i=nt[e].indexOf(t);nt[e].splice(i,i+1),sp(e)}}function cp(t,e,i){if(e===void 0)throw new Error("the object can't be undefined");Ww(t);let n=new WeakRef(e);n.fn=i,Gw(),Oi.register(e,n),nt[t].push(n)}function Xw(t,e){cp("exit",t,e)}function Zw(t,e){cp("beforeExit",t,e)}function Qw(t){if(Oi!==void 0){Oi.unregister(t);for(let e of["exit","beforeExit"])nt[e]=nt[e].filter(i=>{let n=i.deref();return n&&n!==t}),sp(e)}}lp.exports={register:Xw,registerBeforeExit:Zw,unregister:Qw}});var up=_((_1,e_)=>{e_.exports={name:"thread-stream",version:"3.2.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var dp=_((E1,pp)=>{"use strict";function t_(t,e,i,n,r){let o=Date.now()+n,s=Atomics.load(t,e);if(s===i){r(null,"ok");return}let a=s,c=l=>{Date.now()>o?r(null,"timed-out"):setTimeout(()=>{a=s,s=Atomics.load(t,e),s===a?c(l>=1e3?1e3:l*2):s===i?r(null,"ok"):r(null,"not-equal")},l)};c(1)}function i_(t,e,i,n,r){let o=Date.now()+n,s=Atomics.load(t,e);if(s!==i){r(null,"ok");return}let a=c=>{Date.now()>o?r(null,"timed-out"):setTimeout(()=>{s=Atomics.load(t,e),s!==i?r(null,"ok"):a(c>=1e3?1e3:c*2)},c)};a(1)}pp.exports={wait:t_,waitDiff:i_}});var mp=_((S1,fp)=>{"use strict";fp.exports={WRITE_INDEX:4,READ_INDEX:8,SEQ_INDEX:2}});var yp=_((O1,xp)=>{"use strict";var{version:n_}=up(),{EventEmitter:r_}=R("events"),{Worker:o_}=R("worker_threads"),{join:s_}=R("path"),{pathToFileURL:a_}=R("url"),{wait:c_}=dp(),{WRITE_INDEX:Ge,READ_INDEX:ke,SEQ_INDEX:Ys}=mp(),l_=R("buffer"),u_=R("assert"),S=Symbol("kImpl"),p_=l_.constants.MAX_STRING_LENGTH;function Ri(t,e){Atomics.add(t[S].state,Ys,1),e(),Atomics.add(t[S].state,Ys,1),Atomics.notify(t[S].state,Ys)}var pn=class{constructor(e){this._value=e}deref(){return this._value}},_r=class{register(){}unregister(){}},d_=process.env.NODE_V8_COVERAGE?_r:global.FinalizationRegistry||_r,f_=process.env.NODE_V8_COVERAGE?pn:global.WeakRef||pn,hp=new d_(t=>{t.exited||t.terminate()});function m_(t,e){let{filename:i,workerData:n}=e,o=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||s_(__dirname,"lib","worker.js"),s=new o_(o,{...e.workerOpts,trackUnmanagedFds:!1,workerData:{filename:i.indexOf("file://")===0?i:a_(i).href,dataBuf:t[S].dataBuf,stateBuf:t[S].stateBuf,workerData:{$context:{threadStreamVersion:n_},...n}}});return s.stream=new pn(t),s.on("message",h_),s.on("exit",vp),hp.register(t,s),s}function gp(t){u_(!t[S].sync),t[S].needDrain&&(t[S].needDrain=!1,t.emit("drain"))}function wr(t){let e=Atomics.load(t[S].state,Ge),i=t[S].data.length-e;if(i>0){if(t[S].buf.length===0){t[S].flushing=!1,t[S].ending?ta(t):t[S].needDrain&&process.nextTick(gp,t);return}let n=t[S].buf.slice(0,i),r=Buffer.byteLength(n);r<=i?(t[S].buf=t[S].buf.slice(i),Er(t,n,wr.bind(null,t))):t.flush(()=>{if(!t.destroyed){for(Ri(t,()=>{Atomics.store(t[S].state,ke,0),Atomics.store(t[S].state,Ge,0)}),Atomics.notify(t[S].state,ke);r>t[S].data.length;)i=i/2,n=t[S].buf.slice(0,i),r=Buffer.byteLength(n);t[S].buf=t[S].buf.slice(i),Er(t,n,wr.bind(null,t))}})}else if(i===0){if(e===0&&t[S].buf.length===0)return;t.flush(()=>{Ri(t,()=>{Atomics.store(t[S].state,ke,0),Atomics.store(t[S].state,Ge,0)}),Atomics.notify(t[S].state,ke),wr(t)})}else xt(t,new Error("overwritten"))}function h_(t){let e=this.stream.deref();if(e===void 0){this.exited=!0,this.terminate();return}if(t?.code!=null)switch(t.code){case"READY":this.stream=new f_(e),e.flush(()=>{e[S].ready=!0,e.emit("ready")});break;case"ERROR":xt(e,t.err);break;case"EVENT":Array.isArray(t.args)?e.emit(t.name,...t.args):e.emit(t.name,t.args);break;case"WARNING":process.emitWarning(t.err);break;default:xt(e,new Error("this should not happen: "+t.code))}}function vp(t){let e=this.stream.deref();e!==void 0&&(hp.unregister(e),e.worker.exited=!0,e.worker.off("exit",vp),xt(e,t!==0?new Error("the worker thread exited"):null))}var Zs=class extends r_{constructor(e={}){if(super(),e.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[S]={},this[S].stateBuf=new SharedArrayBuffer(128),this[S].state=new Int32Array(this[S].stateBuf),this[S].dataBuf=new SharedArrayBuffer(e.bufferSize||4*1024*1024),this[S].data=Buffer.from(this[S].dataBuf),this[S].sync=e.sync||!1,this[S].ending=!1,this[S].ended=!1,this[S].needDrain=!1,this[S].destroyed=!1,this[S].flushing=!1,this[S].ready=!1,this[S].finished=!1,this[S].errored=null,this[S].closed=!1,this[S].buf="",this.worker=m_(this,e),this.on("message",(i,n)=>{this.worker.postMessage(i,n)})}write(e){if(this[S].destroyed)return Qs(this,new Error("the worker has exited")),!1;if(this[S].ending)return Qs(this,new Error("the worker is ending")),!1;if(this[S].flushing&&this[S].buf.length+e.length>=p_)try{Xs(this),this[S].flushing=!0}catch(i){return xt(this,i),!1}if(this[S].buf+=e,this[S].sync)try{return Xs(this),!0}catch(i){return xt(this,i),!1}return this[S].flushing||(this[S].flushing=!0,setImmediate(wr,this)),this[S].needDrain=this[S].data.length-this[S].buf.length-Atomics.load(this[S].state,Ge)<=0,!this[S].needDrain}end(){this[S].destroyed||(this[S].ending=!0,ta(this))}flush(e){if(this[S].destroyed){typeof e=="function"&&process.nextTick(e,new Error("the worker has exited"));return}let i=Atomics.load(this[S].state,Ge);c_(this[S].state,ke,i,1/0,(n,r)=>{if(n){xt(this,n),process.nextTick(e,n);return}if(r==="not-equal"){this.flush(e);return}process.nextTick(e)})}flushSync(){this[S].destroyed||(Xs(this),ea(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[S].ready}get destroyed(){return this[S].destroyed}get closed(){return this[S].closed}get writable(){return!this[S].destroyed&&!this[S].ending}get writableEnded(){return this[S].ending}get writableFinished(){return this[S].finished}get writableNeedDrain(){return this[S].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[S].errored}};function Qs(t,e){setImmediate(()=>{t.emit("error",e)})}function xt(t,e){t[S].destroyed||(t[S].destroyed=!0,e&&(t[S].errored=e,Qs(t,e)),t.worker.exited?setImmediate(()=>{t[S].closed=!0,t.emit("close")}):t.worker.terminate().catch(()=>{}).then(()=>{t[S].closed=!0,t.emit("close")}))}function Er(t,e,i){let n=Atomics.load(t[S].state,Ge),r=Buffer.byteLength(e);return t[S].data.write(e,n),Ri(t,()=>{Atomics.store(t[S].state,Ge,n+r)}),i(),!0}function ta(t){if(!(t[S].ended||!t[S].ending||t[S].flushing)){t[S].ended=!0;try{t.flushSync();let e=Atomics.load(t[S].state,ke);Ri(t,()=>{Atomics.store(t[S].state,Ge,-1)});let i=0;for(;e!==-1;){if(Atomics.wait(t[S].state,ke,e,1e3),e=Atomics.load(t[S].state,ke),e===-2){xt(t,new Error("end() failed"));return}if(++i===10){xt(t,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{t[S].finished=!0,t.emit("finish")})}catch(e){xt(t,e)}}}function Xs(t){let e=()=>{t[S].ending?ta(t):t[S].needDrain&&process.nextTick(gp,t)};for(t[S].flushing=!1;t[S].buf.length!==0;){let i=Atomics.load(t[S].state,Ge),n=t[S].data.length-i;if(n===0){ea(t),Ri(t,()=>{Atomics.store(t[S].state,ke,0),Atomics.store(t[S].state,Ge,0)}),Atomics.notify(t[S].state,ke);continue}else if(n<0)throw new Error("overwritten");let r=t[S].buf.slice(0,n),o=Buffer.byteLength(r);if(o<=n)t[S].buf=t[S].buf.slice(n),Er(t,r,e);else{for(ea(t),Ri(t,()=>{Atomics.store(t[S].state,ke,0),Atomics.store(t[S].state,Ge,0)}),Atomics.notify(t[S].state,ke);o>t[S].buf.length;)n=n/2,r=t[S].buf.slice(0,n),o=Buffer.byteLength(r);t[S].buf=t[S].buf.slice(n),Er(t,r,e)}}}function ea(t){if(t[S].flushing)throw new Error("unable to flush while flushing");let e=Atomics.load(t[S].state,Ge),i=0;for(;;){let n=Atomics.load(t[S].state,ke);if(n===-2)throw Error("_flushSync failed");if(n!==e)Atomics.wait(t[S].state,ke,n,1e3);else break;if(++i===10)throw new Error("_flushSync took too long (10s)")}}xp.exports=Zs});var ra=_((R1,bp)=>{"use strict";var{createRequire:g_}=R("module"),v_=Us(),{join:ia,isAbsolute:x_,sep:y_}=R("node:path"),b_=Gs(),na=Js(),w_=yp();function __(t){na.register(t,S_),na.registerBeforeExit(t,O_),t.on("close",function(){na.unregister(t)})}function E_(t,e,i,n){let r=new w_({filename:t,workerData:e,workerOpts:i,sync:n});r.on("ready",o),r.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function o(){process.removeListener("exit",s),r.unref(),i.autoEnd!==!1&&__(r)}function s(){r.closed||(r.flushSync(),b_(100),r.end())}return r}function S_(t){t.ref(),t.flushSync(),t.end(),t.once("close",function(){t.unref()})}function O_(t){t.flushSync()}function R_(t){let{pipeline:e,targets:i,levels:n,dedupe:r,worker:o={},caller:s=v_(),sync:a=!1}=t,c={...t.options},l=typeof s=="string"?[s]:s,u="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},p=t.target;if(p&&i)throw new Error("only one of target or targets can be specified");return i?(p=u["pino-worker"]||ia(__dirname,"worker.js"),c.targets=i.filter(m=>m.target).map(m=>({...m,target:f(m.target)})),c.pipelines=i.filter(m=>m.pipeline).map(m=>m.pipeline.map(d=>({...d,level:m.level,target:f(d.target)})))):e&&(p=u["pino-worker"]||ia(__dirname,"worker.js"),c.pipelines=[e.map(m=>({...m,target:f(m.target)}))]),n&&(c.levels=n),r&&(c.dedupe=r),c.pinoWillSendConfig=!0,E_(f(p),c,o,a);function f(m){if(m=u[m]||m,x_(m)||m.indexOf("file://")===0)return m;if(m==="pino/file")return ia(__dirname,"..","file.js");let d;for(let g of l)try{let v=g==="node:repl"?process.cwd()+y_:g;d=g_(v).resolve(m);break}catch{continue}if(!d)throw new Error(`unable to determine transport target for "${m}"`);return d}}bp.exports=R_});var Tr=_((T1,Dp)=>{"use strict";var wp=R("node:diagnostics_channel"),_p=Yu(),{mapHttpRequest:T_,mapHttpResponse:A_}=$s(),sa=rp(),Ep=Js(),{lsCacheSym:P_,chindingsSym:Tp,writeSym:Sp,serializersSym:Ap,formatOptsSym:Op,endSym:C_,stringifiersSym:Pp,stringifySym:Cp,stringifySafeSym:aa,wildcardFirstSym:kp,nestedKeySym:k_,formattersSym:Ip,messageKeySym:I_,errorKeySym:D_,nestedKeyStrSym:j_,msgPrefixSym:Sr}=Si(),{isMainThread:N_}=R("worker_threads"),F_=ra(),Rr;typeof wp.tracingChannel=="function"?Rr=wp.tracingChannel("pino_asJson"):Rr={hasSubscribers:!1,traceSync(t,e,i,...n){return t.call(i,...n)}};function Ti(){}function L_(t,e){if(!e)return i;return function(...r){e.call(this,r,i,t)};function i(n,...r){if(typeof n=="object"){let o=n;n!==null&&(n.method&&n.headers&&n.socket?n=T_(n):typeof n.setHeader=="function"&&(n=A_(n)));let s;o===null&&r.length===0?s=[null]:(o=r.shift(),s=r),typeof this[Sr]=="string"&&o!==void 0&&o!==null&&(o=this[Sr]+o),this[Sp](n,_p(o,s,this[Op]),t)}else{let o=n===void 0?r.shift():n;typeof this[Sr]=="string"&&o!==void 0&&o!==null&&(o=this[Sr]+o),this[Sp](null,_p(o,r,this[Op]),t)}}}function oa(t){let e="",i=0,n=!1,r=255,o=t.length;if(o>100)return JSON.stringify(t);for(var s=0;s<o&&r>=32;s++)r=t.charCodeAt(s),(r===34||r===92)&&(e+=t.slice(i,s)+"\\",i=s,n=!0);return n?e+=t.slice(i):e=t,r<32?JSON.stringify(t):'"'+e+'"'}function M_(t,e,i,n){if(Rr.hasSubscribers===!1)return Rp.call(this,t,e,i,n);let r={instance:this,arguments};return Rr.traceSync(Rp,r,this,t,e,i,n)}function Rp(t,e,i,n){let r=this[Cp],o=this[aa],s=this[Pp],a=this[C_],c=this[Tp],l=this[Ap],u=this[Ip],p=this[I_],f=this[D_],m=this[P_][i]+n;m=m+c;let d;u.log&&(t=u.log(t));let g=s[kp],v="";for(let y in t)if(d=t[y],Object.prototype.hasOwnProperty.call(t,y)&&d!==void 0){l[y]?d=l[y](d):y===f&&l.err&&(d=l.err(d));let w=s[y]||g;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":w&&(d=w(d));break;case"string":d=(w||oa)(d);break;default:d=(w||r)(d,o)}if(d===void 0)continue;let O=oa(y);v+=","+O+":"+d}let x="";if(e!==void 0){d=l[p]?l[p](e):e;let y=s[p]||g;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":y&&(d=y(d)),x=',"'+p+'":'+d;break;case"string":d=(y||oa)(d),x=',"'+p+'":'+d;break;default:d=(y||r)(d,o),x=',"'+p+'":'+d}}return this[k_]&&v?m+this[j_]+v.slice(1)+"}"+x+a:m+v+x+a}function B_(t,e){let i,n=t[Tp],r=t[Cp],o=t[aa],s=t[Pp],a=s[kp],c=t[Ap],l=t[Ip].bindings;e=l(e);for(let u in e)if(i=e[u],((u.length<5||u!=="level"&&u!=="serializers"&&u!=="formatters"&&u!=="customLevels")&&e.hasOwnProperty(u)&&i!==void 0)===!0){if(i=c[u]?c[u](i):i,i=(s[u]||a||r)(i,o),i===void 0)continue;n+=',"'+u+'":'+i}return n}function $_(t){return t.write!==t.constructor.prototype.write}function Or(t){let e=new sa(t);return e.on("error",i),!t.sync&&N_&&(Ep.register(e,U_),e.on("close",function(){Ep.unregister(e)})),e;function i(n){if(n.code==="EPIPE"){e.write=Ti,e.end=Ti,e.flushSync=Ti,e.destroy=Ti;return}e.removeListener("error",i),e.emit("error",n)}}function U_(t,e){t.destroyed||(e==="beforeExit"?(t.flush(),t.on("drain",function(){t.end()})):t.flushSync())}function q_(t){return function(i,n,r={},o){if(typeof r=="string")o=Or({dest:r}),r={};else if(typeof o=="string"){if(r&&r.transport)throw Error("only one of option.transport or stream can be specified");o=Or({dest:o})}else if(r instanceof sa||r.writable||r._writableState)o=r,r={};else if(r.transport){if(r.transport instanceof sa||r.transport.writable||r.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(r.transport.targets&&r.transport.targets.length&&r.formatters&&typeof r.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;r.customLevels&&(c=r.useOnlyCustomLevels?r.customLevels:Object.assign({},r.levels,r.customLevels)),o=F_({caller:n,...r.transport,levels:c})}if(r=Object.assign({},t,r),r.serializers=Object.assign({},t.serializers,r.serializers),r.formatters=Object.assign({},t.formatters,r.formatters),r.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:s,onChild:a}=r;return s===!1&&(r.level="silent"),a||(r.onChild=Ti),o||($_(process.stdout)?o=process.stdout:o=Or({fd:process.stdout.fd||1})),{opts:r,stream:o}}}function V_(t,e){try{return JSON.stringify(t)}catch{try{return(e||this[aa])(t)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function z_(t,e,i){return{level:t,bindings:e,log:i}}function H_(t){let e=Number(t);return typeof t=="string"&&Number.isFinite(e)?e:t===void 0?1:t}Dp.exports={noop:Ti,buildSafeSonicBoom:Or,asChindings:B_,asJson:M_,genLog:L_,createArgsNormalizer:q_,stringify:V_,buildFormatters:z_,normalizeDestFileDescriptor:H_}});var Ar=_((A1,jp)=>{var G_={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},W_={ASC:"ASC",DESC:"DESC"};jp.exports={DEFAULT_LEVELS:G_,SORTING_ORDER:W_}});var ua=_((P1,Mp)=>{"use strict";var{lsCacheSym:K_,levelValSym:ca,useOnlyCustomLevelsSym:J_,streamSym:Y_,formattersSym:X_,hooksSym:Z_,levelCompSym:Np}=Si(),{noop:Q_,genLog:Yt}=Tr(),{DEFAULT_LEVELS:yt,SORTING_ORDER:Fp}=Ar(),Lp={fatal:t=>{let e=Yt(yt.fatal,t);return function(...i){let n=this[Y_];if(e.call(this,...i),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:t=>Yt(yt.error,t),warn:t=>Yt(yt.warn,t),info:t=>Yt(yt.info,t),debug:t=>Yt(yt.debug,t),trace:t=>Yt(yt.trace,t)},la=Object.keys(yt).reduce((t,e)=>(t[yt[e]]=e,t),{}),eE=Object.keys(la).reduce((t,e)=>(t[e]='{"level":'+Number(e),t),{});function tE(t){let e=t[X_].level,{labels:i}=t.levels,n={};for(let r in i){let o=e(i[r],Number(r));n[r]=JSON.stringify(o).slice(0,-1)}return t[K_]=n,t}function iE(t,e){if(e)return!1;switch(t){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function nE(t){let{labels:e,values:i}=this.levels;if(typeof t=="number"){if(e[t]===void 0)throw Error("unknown level value"+t);t=e[t]}if(i[t]===void 0)throw Error("unknown level "+t);let n=this[ca],r=this[ca]=i[t],o=this[J_],s=this[Np],a=this[Z_].logMethod;for(let c in i){if(s(i[c],r)===!1){this[c]=Q_;continue}this[c]=iE(c,o)?Lp[c](a):Yt(i[c],a)}this.emit("level-change",t,r,e[n],n,this)}function rE(t){let{levels:e,levelVal:i}=this;return e&&e.labels?e.labels[i]:""}function oE(t){let{values:e}=this.levels,i=e[t];return i!==void 0&&this[Np](i,this[ca])}function sE(t,e,i){return t===Fp.DESC?e<=i:e>=i}function aE(t){return typeof t=="string"?sE.bind(null,t):t}function cE(t=null,e=!1){let i=t?Object.keys(t).reduce((o,s)=>(o[t[s]]=s,o),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),e?null:la,i),r=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),e?null:yt,t);return{labels:n,values:r}}function lE(t,e,i){if(typeof t=="number"){if(![].concat(Object.keys(e||{}).map(o=>e[o]),i?[]:Object.keys(la).map(o=>+o),1/0).includes(t))throw Error(`default level:${t} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),i?null:yt,e);if(!(t in n))throw Error(`default level:${t} must be included in custom levels`)}function uE(t,e){let{labels:i,values:n}=t;for(let r in e){if(r in n)throw Error("levels cannot be overridden");if(e[r]in i)throw Error("pre-existing level values cannot be used for new levels")}}function pE(t){if(typeof t!="function"&&!(typeof t=="string"&&Object.values(Fp).includes(t)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Mp.exports={initialLsCache:eE,genLsCache:tE,levelMethods:Lp,getLevel:rE,setLevel:nE,isLevelEnabled:oE,mappings:cE,assertNoLevelCollisions:uE,assertDefaultLevelFound:lE,genLevelComparison:aE,assertLevelComparison:pE}});var pa=_((C1,Bp)=>{"use strict";Bp.exports={version:"9.14.0"}});var Wp=_((I1,Gp)=>{"use strict";var{EventEmitter:dE}=R("node:events"),{lsCacheSym:fE,levelValSym:mE,setLevelSym:Cr,getLevelSym:$p,chindingsSym:kr,parsedChindingsSym:hE,mixinSym:gE,asJsonSym:qp,writeSym:vE,mixinMergeStrategySym:xE,timeSym:yE,timeSliceIndexSym:bE,streamSym:Vp,serializersSym:Xt,formattersSym:dn,errorKeySym:wE,messageKeySym:_E,useOnlyCustomLevelsSym:EE,needsMetadataGsym:SE,redactFmtSym:OE,stringifySym:RE,formatOptsSym:TE,stringifiersSym:AE,msgPrefixSym:fa,hooksSym:PE}=Si(),{getLevel:CE,setLevel:kE,isLevelEnabled:IE,mappings:DE,initialLsCache:jE,genLsCache:NE,assertNoLevelCollisions:FE}=ua(),{asChindings:ma,asJson:LE,buildFormatters:da,stringify:Up,noop:zp}=Tr(),{version:ME}=pa(),BE=zs(),$E=class{},Hp={constructor:$E,child:UE,bindings:qE,setBindings:VE,flush:GE,isLevelEnabled:IE,version:ME,get level(){return this[$p]()},set level(t){this[Cr](t)},get levelVal(){return this[mE]},set levelVal(t){throw Error("levelVal is read-only")},get msgPrefix(){return this[fa]},get[Symbol.toStringTag](){return"Pino"},[fE]:jE,[vE]:HE,[qp]:LE,[$p]:CE,[Cr]:kE};Object.setPrototypeOf(Hp,dE.prototype);Gp.exports=function(){return Object.create(Hp)};var Pr=t=>t;function UE(t,e){if(!t)throw Error("missing bindings for child Pino");let i=this[Xt],n=this[dn],r=Object.create(this);if(e==null)return r[dn].bindings!==Pr&&(r[dn]=da(n.level,Pr,n.log)),r[kr]=ma(r,t),r[Cr](this.level),this.onChild!==zp&&this.onChild(r),r;if(e.hasOwnProperty("serializers")===!0){r[Xt]=Object.create(null);for(let u in i)r[Xt][u]=i[u];let c=Object.getOwnPropertySymbols(i);for(var o=0;o<c.length;o++){let u=c[o];r[Xt][u]=i[u]}for(let u in e.serializers)r[Xt][u]=e.serializers[u];let l=Object.getOwnPropertySymbols(e.serializers);for(var s=0;s<l.length;s++){let u=l[s];r[Xt][u]=e.serializers[u]}}else r[Xt]=i;if(e.hasOwnProperty("formatters")){let{level:c,bindings:l,log:u}=e.formatters;r[dn]=da(c||n.level,l||Pr,u||n.log)}else r[dn]=da(n.level,Pr,n.log);if(e.hasOwnProperty("customLevels")===!0&&(FE(this.levels,e.customLevels),r.levels=DE(e.customLevels,r[EE]),NE(r)),typeof e.redact=="object"&&e.redact!==null||Array.isArray(e.redact)){r.redact=e.redact;let c=BE(r.redact,Up),l={stringify:c[OE]};r[RE]=Up,r[AE]=c,r[TE]=l}typeof e.msgPrefix=="string"&&(r[fa]=(this[fa]||"")+e.msgPrefix),r[kr]=ma(r,t);let a=e.level||this.level;return r[Cr](a),this.onChild(r),r}function qE(){let e=`{${this[kr].substr(1)}}`,i=JSON.parse(e);return delete i.pid,delete i.hostname,i}function VE(t){let e=ma(this,t);this[kr]=e,delete this[hE]}function zE(t,e){return Object.assign(e,t)}function HE(t,e,i){let n=this[yE](),r=this[gE],o=this[wE],s=this[_E],a=this[xE]||zE,c,l=this[PE].streamWrite;t==null?c={}:t instanceof Error?(c={[o]:t},e===void 0&&(e=t.message)):(c=t,e===void 0&&t[s]===void 0&&t[o]&&(e=t[o].message)),r&&(c=a(c,r(c,i,this)));let u=this[qp](c,e,i,n),p=this[Vp];p[SE]===!0&&(p.lastLevel=i,p.lastObj=c,p.lastMsg=e,p.lastTime=n.slice(this[bE]),p.lastLogger=this),p.write(l?l(u):u)}function GE(t){if(t!=null&&typeof t!="function")throw Error("callback must be a function");let e=this[Vp];typeof e.flush=="function"?e.flush(t||zp):t&&t()}});var Xp=_((xa,Yp)=>{"use strict";var{hasOwnProperty:fn}=Object.prototype,Qt=va();Qt.configure=va;Qt.stringify=Qt;Qt.default=Qt;xa.stringify=Qt;xa.configure=va;Yp.exports=Qt;var WE=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Ft(t){return t.length<5e3&&!WE.test(t)?`"${t}"`:JSON.stringify(t)}function ha(t,e){if(t.length>200||e)return t.sort(e);for(let i=1;i<t.length;i++){let n=t[i],r=i;for(;r!==0&&t[r-1]>n;)t[r]=t[r-1],r--;t[r]=n}return t}var KE=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function ga(t){return KE.call(t)!==void 0&&t.length!==0}function Kp(t,e,i){t.length<i&&(i=t.length);let n=e===","?"":" ",r=`"0":${n}${t[0]}`;for(let o=1;o<i;o++)r+=`${e}"${o}":${n}${t[o]}`;return r}function JE(t){if(fn.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function YE(t){let e;if(fn.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function XE(t,e){let i;if(fn.call(t,e)&&(i=t[e],typeof i!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return i===void 0?!0:i}function Jp(t,e){let i;if(fn.call(t,e)){if(i=t[e],typeof i!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(i))throw new TypeError(`The "${e}" argument must be an integer`);if(i<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return i===void 0?1/0:i}function Zt(t){return t===1?"1 item":`${t} items`}function ZE(t){let e=new Set;for(let i of t)(typeof i=="string"||typeof i=="number")&&e.add(String(i));return e}function QE(t){if(fn.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return i=>{let n=`Object can not safely be stringified. Received type ${typeof i}`;throw typeof i!="function"&&(n+=` (${i.toString()})`),new Error(n)}}}function va(t){t={...t};let e=QE(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let i=JE(t),n=XE(t,"bigint"),r=YE(t),o=typeof r=="function"?r:void 0,s=Jp(t,"maximumDepth"),a=Jp(t,"maximumBreadth");function c(m,d,g,v,x,y){let w=d[m];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(m)),w=v.call(d,m,w),typeof w){case"string":return Ft(w);case"object":{if(w===null)return"null";if(g.indexOf(w)!==-1)return i;let O="",C=",",k=y;if(Array.isArray(w)){if(w.length===0)return"[]";if(s<g.length+1)return'"[Array]"';g.push(w),x!==""&&(y+=x,O+=`
|
|
31
|
+
${y}`,C=`,
|
|
32
|
+
${y}`);let ee=Math.min(w.length,a),ce=0;for(;ce<ee-1;ce++){let be=c(String(ce),w,g,v,x,y);O+=be!==void 0?be:"null",O+=C}let G=c(String(ce),w,g,v,x,y);if(O+=G!==void 0?G:"null",w.length-1>a){let be=w.length-a-1;O+=`${C}"... ${Zt(be)} not stringified"`}return x!==""&&(O+=`
|
|
33
|
+
${k}`),g.pop(),`[${O}]`}let N=Object.keys(w),q=N.length;if(q===0)return"{}";if(s<g.length+1)return'"[Object]"';let F="",D="";x!==""&&(y+=x,C=`,
|
|
34
|
+
${y}`,F=" ");let Y=Math.min(q,a);r&&!ga(w)&&(N=ha(N,o)),g.push(w);for(let ee=0;ee<Y;ee++){let ce=N[ee],G=c(ce,w,g,v,x,y);G!==void 0&&(O+=`${D}${Ft(ce)}:${F}${G}`,D=C)}if(q>a){let ee=q-a;O+=`${D}"...":${F}"${Zt(ee)} not stringified"`,D=C}return x!==""&&D.length>1&&(O=`
|
|
35
|
+
${y}${O}
|
|
36
|
+
${k}`),g.pop(),`{${O}}`}case"number":return isFinite(w)?String(w):e?e(w):"null";case"boolean":return w===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(w);default:return e?e(w):void 0}}function l(m,d,g,v,x,y){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return Ft(d);case"object":{if(d===null)return"null";if(g.indexOf(d)!==-1)return i;let w=y,O="",C=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(s<g.length+1)return'"[Array]"';g.push(d),x!==""&&(y+=x,O+=`
|
|
37
|
+
${y}`,C=`,
|
|
38
|
+
${y}`);let q=Math.min(d.length,a),F=0;for(;F<q-1;F++){let Y=l(String(F),d[F],g,v,x,y);O+=Y!==void 0?Y:"null",O+=C}let D=l(String(F),d[F],g,v,x,y);if(O+=D!==void 0?D:"null",d.length-1>a){let Y=d.length-a-1;O+=`${C}"... ${Zt(Y)} not stringified"`}return x!==""&&(O+=`
|
|
39
|
+
${w}`),g.pop(),`[${O}]`}g.push(d);let k="";x!==""&&(y+=x,C=`,
|
|
40
|
+
${y}`,k=" ");let N="";for(let q of v){let F=l(q,d[q],g,v,x,y);F!==void 0&&(O+=`${N}${Ft(q)}:${k}${F}`,N=C)}return x!==""&&N.length>1&&(O=`
|
|
41
|
+
${y}${O}
|
|
42
|
+
${w}`),g.pop(),`{${O}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(d);default:return e?e(d):void 0}}function u(m,d,g,v,x){switch(typeof d){case"string":return Ft(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return u(m,d,g,v,x);if(d===null)return"null"}if(g.indexOf(d)!==-1)return i;let y=x;if(Array.isArray(d)){if(d.length===0)return"[]";if(s<g.length+1)return'"[Array]"';g.push(d),x+=v;let F=`
|
|
43
|
+
${x}`,D=`,
|
|
44
|
+
${x}`,Y=Math.min(d.length,a),ee=0;for(;ee<Y-1;ee++){let G=u(String(ee),d[ee],g,v,x);F+=G!==void 0?G:"null",F+=D}let ce=u(String(ee),d[ee],g,v,x);if(F+=ce!==void 0?ce:"null",d.length-1>a){let G=d.length-a-1;F+=`${D}"... ${Zt(G)} not stringified"`}return F+=`
|
|
45
|
+
${y}`,g.pop(),`[${F}]`}let w=Object.keys(d),O=w.length;if(O===0)return"{}";if(s<g.length+1)return'"[Object]"';x+=v;let C=`,
|
|
46
|
+
${x}`,k="",N="",q=Math.min(O,a);ga(d)&&(k+=Kp(d,C,a),w=w.slice(d.length),q-=d.length,N=C),r&&(w=ha(w,o)),g.push(d);for(let F=0;F<q;F++){let D=w[F],Y=u(D,d[D],g,v,x);Y!==void 0&&(k+=`${N}${Ft(D)}: ${Y}`,N=C)}if(O>a){let F=O-a;k+=`${N}"...": "${Zt(F)} not stringified"`,N=C}return N!==""&&(k=`
|
|
47
|
+
${x}${k}
|
|
48
|
+
${y}`),g.pop(),`{${k}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(d);default:return e?e(d):void 0}}function p(m,d,g){switch(typeof d){case"string":return Ft(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return p(m,d,g);if(d===null)return"null"}if(g.indexOf(d)!==-1)return i;let v="",x=d.length!==void 0;if(x&&Array.isArray(d)){if(d.length===0)return"[]";if(s<g.length+1)return'"[Array]"';g.push(d);let k=Math.min(d.length,a),N=0;for(;N<k-1;N++){let F=p(String(N),d[N],g);v+=F!==void 0?F:"null",v+=","}let q=p(String(N),d[N],g);if(v+=q!==void 0?q:"null",d.length-1>a){let F=d.length-a-1;v+=`,"... ${Zt(F)} not stringified"`}return g.pop(),`[${v}]`}let y=Object.keys(d),w=y.length;if(w===0)return"{}";if(s<g.length+1)return'"[Object]"';let O="",C=Math.min(w,a);x&&ga(d)&&(v+=Kp(d,",",a),y=y.slice(d.length),C-=d.length,O=","),r&&(y=ha(y,o)),g.push(d);for(let k=0;k<C;k++){let N=y[k],q=p(N,d[N],g);q!==void 0&&(v+=`${O}${Ft(N)}:${q}`,O=",")}if(w>a){let k=w-a;v+=`${O}"...":"${Zt(k)} not stringified"`}return g.pop(),`{${v}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(d);default:return e?e(d):void 0}}function f(m,d,g){if(arguments.length>1){let v="";if(typeof g=="number"?v=" ".repeat(Math.min(g,10)):typeof g=="string"&&(v=g.slice(0,10)),d!=null){if(typeof d=="function")return c("",{"":m},[],d,v,"");if(Array.isArray(d))return l("",m,[],ZE(d),v,"")}if(v.length!==0)return u("",m,[],v,"")}return p("",m,[])}return f}});var td=_((D1,ed)=>{"use strict";var ya=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Qp}=Ar(),eS=Qp.info;function tS(t,e){t=t||[],e=e||{dedupe:!1};let i=Object.create(Qp);i.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(p=>{i[p]=e.levels[p]});let n={write:r,add:a,remove:c,emit:o,flushSync:s,end:l,minLevel:0,lastId:0,streams:[],clone:u,[ya]:!0,streamLevels:i};return Array.isArray(t)?t.forEach(a,n):a.call(n,t),t=null,n;function r(p){let f,m=this.lastLevel,{streams:d}=this,g=0,v;for(let x=iS(d.length,e.dedupe);rS(x,d.length,e.dedupe);x=nS(x,e.dedupe))if(f=d[x],f.level<=m){if(g!==0&&g!==f.level)break;if(v=f.stream,v[ya]){let{lastTime:y,lastMsg:w,lastObj:O,lastLogger:C}=this;v.lastLevel=m,v.lastTime=y,v.lastMsg=w,v.lastObj=O,v.lastLogger=C}v.write(p),e.dedupe&&(g=f.level)}else if(!e.dedupe)break}function o(...p){for(let{stream:f}of this.streams)typeof f.emit=="function"&&f.emit(...p)}function s(){for(let{stream:p}of this.streams)typeof p.flushSync=="function"&&p.flushSync()}function a(p){if(!p)return n;let f=typeof p.write=="function"||p.stream,m=p.write?p:p.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:g}=this,v;typeof p.levelVal=="number"?v=p.levelVal:typeof p.level=="string"?v=g[p.level]:typeof p.level=="number"?v=p.level:v=eS;let x={stream:m,level:v,levelVal:void 0,id:++n.lastId};return d.unshift(x),d.sort(Zp),this.minLevel=d[0].level,n}function c(p){let{streams:f}=this,m=f.findIndex(d=>d.id===p);return m>=0&&(f.splice(m,1),f.sort(Zp),this.minLevel=f.length>0?f[0].level:-1),n}function l(){for(let{stream:p}of this.streams)typeof p.flushSync=="function"&&p.flushSync(),p.end()}function u(p){let f=new Array(this.streams.length);for(let m=0;m<f.length;m++)f[m]={level:p,stream:this.streams[m].stream};return{write:r,add:a,remove:c,minLevel:p,streams:f,clone:u,emit:o,flushSync:s,[ya]:!0}}}function Zp(t,e){return t.level-e.level}function iS(t,e){return e?t-1:0}function nS(t,e){return e?t-1:t+1}function rS(t,e,i){return i?t>=0:t<e}ed.exports=tS});var hd=_((j1,We)=>{"use strict";var oS=R("node:os"),ld=$s(),sS=Us(),aS=zs(),ud=Ku(),cS=Wp(),pd=Si(),{configure:lS}=Xp(),{assertDefaultLevelFound:uS,mappings:dd,genLsCache:pS,genLevelComparison:dS,assertLevelComparison:fS}=ua(),{DEFAULT_LEVELS:fd,SORTING_ORDER:mS}=Ar(),{createArgsNormalizer:hS,asChindings:gS,buildSafeSonicBoom:id,buildFormatters:vS,stringify:ba,normalizeDestFileDescriptor:nd,noop:xS}=Tr(),{version:yS}=pa(),{chindingsSym:rd,redactFmtSym:bS,serializersSym:od,timeSym:wS,timeSliceIndexSym:_S,streamSym:ES,stringifySym:sd,stringifySafeSym:wa,stringifiersSym:ad,setLevelSym:SS,endSym:OS,formatOptsSym:RS,messageKeySym:TS,errorKeySym:AS,nestedKeySym:PS,mixinSym:CS,levelCompSym:kS,useOnlyCustomLevelsSym:IS,formattersSym:cd,hooksSym:DS,nestedKeyStrSym:jS,mixinMergeStrategySym:NS,msgPrefixSym:FS}=pd,{epochTime:md,nullTime:LS}=ud,{pid:MS}=process,BS=oS.hostname(),$S=ld.err,US={level:"info",levelComparison:mS.ASC,levels:fd,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:MS,hostname:BS},serializers:Object.assign(Object.create(null),{err:$S}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:md,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},qS=hS(US),VS=Object.assign(Object.create(null),ld);function _a(...t){let e={},{opts:i,stream:n}=qS(e,sS(),...t);i.level&&typeof i.level=="string"&&fd[i.level.toLowerCase()]!==void 0&&(i.level=i.level.toLowerCase());let{redact:r,crlf:o,serializers:s,timestamp:a,messageKey:c,errorKey:l,nestedKey:u,base:p,name:f,level:m,customLevels:d,levelComparison:g,mixin:v,mixinMergeStrategy:x,useOnlyCustomLevels:y,formatters:w,hooks:O,depthLimit:C,edgeLimit:k,onChild:N,msgPrefix:q}=i,F=lS({maximumDepth:C,maximumBreadth:k}),D=vS(w.level,w.bindings,w.log),Y=ba.bind({[wa]:F}),ee=r?aS(r,Y):{},ce=r?{stringify:ee[bS]}:{stringify:Y},G="}"+(o?`\r
|
|
49
|
+
`:`
|
|
50
|
+
`),be=gS.bind(null,{[rd]:"",[od]:s,[ad]:ee,[sd]:ba,[wa]:F,[cd]:D}),et="";p!==null&&(f===void 0?et=be(p):et=be(Object.assign({},p,{name:f})));let ft=a instanceof Function?a:a?md:LS,bi=ft().indexOf(":")+1;if(y&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(v&&typeof v!="function")throw Error(`Unknown mixin type "${typeof v}" - expected "function"`);if(q&&typeof q!="string")throw Error(`Unknown msgPrefix type "${typeof q}" - expected "string"`);uS(m,d,y);let Gt=dd(d,y);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:Gt,messageKey:c,errorKey:l}}),fS(g);let Z=dS(g);return Object.assign(e,{levels:Gt,[kS]:Z,[IS]:y,[ES]:n,[wS]:ft,[_S]:bi,[sd]:ba,[wa]:F,[ad]:ee,[OS]:G,[RS]:ce,[TS]:c,[AS]:l,[PS]:u,[jS]:u?`,${JSON.stringify(u)}:{`:"",[od]:s,[CS]:v,[NS]:x,[rd]:et,[cd]:D,[DS]:O,silent:xS,onChild:N,[FS]:q}),Object.setPrototypeOf(e,cS()),pS(e),e[SS](m),e}We.exports=_a;We.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=nd(t.dest||process.stdout.fd),id(t)):id({dest:nd(t),minLength:0});We.exports.transport=ra();We.exports.multistream=td();We.exports.levels=dd();We.exports.stdSerializers=VS;We.exports.stdTimeFunctions=Object.assign({},ud);We.exports.symbols=pd;We.exports.version=yS;We.exports.default=_a;We.exports.pino=_a});function Pd(t,e=0){return(Se[t[e+0]]+Se[t[e+1]]+Se[t[e+2]]+Se[t[e+3]]+"-"+Se[t[e+4]]+Se[t[e+5]]+"-"+Se[t[e+6]]+Se[t[e+7]]+"-"+Se[t[e+8]]+Se[t[e+9]]+"-"+Se[t[e+10]]+Se[t[e+11]]+Se[t[e+12]]+Se[t[e+13]]+Se[t[e+14]]+Se[t[e+15]]).toLowerCase()}var Se,Cd=A(()=>{Se=[];for(let t=0;t<256;++t)Se.push((t+256).toString(16).slice(1))});import{randomFillSync as d0}from"crypto";function Ta(){return Gr>Wr.length-16&&(d0(Wr),Gr=0),Wr.slice(Gr,Gr+=16)}var Wr,Gr,kd=A(()=>{Wr=new Uint8Array(256),Gr=Wr.length});import{randomUUID as f0}from"crypto";var Aa,Id=A(()=>{Aa={randomUUID:f0}});function m0(t,e,i){if(Aa.randomUUID&&!e&&!t)return Aa.randomUUID();t=t||{};let n=t.random??t.rng?.()??Ta();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(i=i||0,i<0||i+16>e.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let r=0;r<16;++r)e[i+r]=n[r];return e}return Pd(n)}var Pa,Dd=A(()=>{Id();kd();Cd();Pa=m0});var jd=A(()=>{Dd()});var Fd=_((Dj,Nd)=>{var h0=Nd.exports=function t(e,i){var n;if(e!=null)return i=(i||"").replace(/[^&"<>\']/g,""),n=`([&"<>'])`.replace(new RegExp("["+i+"]","g"),""),e.replace(new RegExp(n,"g"),function(r,o){return t.map[o]})},Ij=h0.map={">":">","<":"<","'":"'",'"':""","&":"&"}});var Tt=_((jj,Bd)=>{"use strict";var Ld=["nodebuffer","arraybuffer","fragments"],Md=typeof Blob<"u";Md&&Ld.push("blob");Bd.exports={BINARY_TYPES:Ld,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Md,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var mn=_((Nj,Kr)=>{"use strict";var{EMPTY_BUFFER:g0}=Tt(),Ca=Buffer[Symbol.species];function v0(t,e){if(t.length===0)return g0;if(t.length===1)return t[0];let i=Buffer.allocUnsafe(e),n=0;for(let r=0;r<t.length;r++){let o=t[r];i.set(o,n),n+=o.length}return n<e?new Ca(i.buffer,i.byteOffset,n):i}function $d(t,e,i,n,r){for(let o=0;o<r;o++)i[n+o]=t[o]^e[o&3]}function Ud(t,e){for(let i=0;i<t.length;i++)t[i]^=e[i&3]}function x0(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function ka(t){if(ka.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Ca(t):ArrayBuffer.isView(t)?e=new Ca(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),ka.readOnly=!1),e}Kr.exports={concat:v0,mask:$d,toArrayBuffer:x0,toBuffer:ka,unmask:Ud};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=R("bufferutil");Kr.exports.mask=function(e,i,n,r,o){o<48?$d(e,i,n,r,o):t.mask(e,i,n,r,o)},Kr.exports.unmask=function(e,i){e.length<32?Ud(e,i):t.unmask(e,i)}}catch{}});var zd=_((Fj,Vd)=>{"use strict";var qd=Symbol("kDone"),Ia=Symbol("kRun"),Da=class{constructor(e){this[qd]=()=>{this.pending--,this[Ia]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ia]()}[Ia](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[qd])}}};Vd.exports=Da});var ei=_((Lj,Kd)=>{"use strict";var hn=R("zlib"),Hd=mn(),y0=zd(),{kStatusCode:Gd}=Tt(),b0=Buffer[Symbol.species],w0=Buffer.from([0,0,255,255]),Yr=Symbol("permessage-deflate"),At=Symbol("total-length"),Ai=Symbol("callback"),Lt=Symbol("buffers"),Pi=Symbol("error"),Jr,ja=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!Jr){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Jr=new y0(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Ai];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let i=this._options,n=e.find(r=>!(i.serverNoContextTakeover===!1&&r.server_no_context_takeover||r.server_max_window_bits&&(i.serverMaxWindowBits===!1||typeof i.serverMaxWindowBits=="number"&&i.serverMaxWindowBits>r.server_max_window_bits)||typeof i.clientMaxWindowBits=="number"&&!r.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return i.serverNoContextTakeover&&(n.server_no_context_takeover=!0),i.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof i.serverMaxWindowBits=="number"&&(n.server_max_window_bits=i.serverMaxWindowBits),typeof i.clientMaxWindowBits=="number"?n.client_max_window_bits=i.clientMaxWindowBits:(n.client_max_window_bits===!0||i.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let i=e[0];if(this._options.clientNoContextTakeover===!1&&i.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!i.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(i.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&i.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return i}normalizeParams(e){return e.forEach(i=>{Object.keys(i).forEach(n=>{let r=i[n];if(r.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(r=r[0],n==="client_max_window_bits"){if(r!==!0){let o=+r;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${n}": ${r}`);r=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${r}`)}else if(n==="server_max_window_bits"){let o=+r;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${n}": ${r}`);r=o}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${r}`)}else throw new Error(`Unknown parameter "${n}"`);i[n]=r})}),e}decompress(e,i,n){Jr.add(r=>{this._decompress(e,i,(o,s)=>{r(),n(o,s)})})}compress(e,i,n){Jr.add(r=>{this._compress(e,i,(o,s)=>{r(),n(o,s)})})}_decompress(e,i,n){let r=this._isServer?"client":"server";if(!this._inflate){let o=`${r}_max_window_bits`,s=typeof this.params[o]!="number"?hn.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=hn.createInflateRaw({...this._options.zlibInflateOptions,windowBits:s}),this._inflate[Yr]=this,this._inflate[At]=0,this._inflate[Lt]=[],this._inflate.on("error",E0),this._inflate.on("data",Wd)}this._inflate[Ai]=n,this._inflate.write(e),i&&this._inflate.write(w0),this._inflate.flush(()=>{let o=this._inflate[Pi];if(o){this._inflate.close(),this._inflate=null,n(o);return}let s=Hd.concat(this._inflate[Lt],this._inflate[At]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[At]=0,this._inflate[Lt]=[],i&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,s)})}_compress(e,i,n){let r=this._isServer?"server":"client";if(!this._deflate){let o=`${r}_max_window_bits`,s=typeof this.params[o]!="number"?hn.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=hn.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:s}),this._deflate[At]=0,this._deflate[Lt]=[],this._deflate.on("data",_0)}this._deflate[Ai]=n,this._deflate.write(e),this._deflate.flush(hn.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=Hd.concat(this._deflate[Lt],this._deflate[At]);i&&(o=new b0(o.buffer,o.byteOffset,o.length-4)),this._deflate[Ai]=null,this._deflate[At]=0,this._deflate[Lt]=[],i&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,o)})}};Kd.exports=ja;function _0(t){this[Lt].push(t),this[At]+=t.length}function Wd(t){if(this[At]+=t.length,this[Yr]._maxPayload<1||this[At]<=this[Yr]._maxPayload){this[Lt].push(t);return}this[Pi]=new RangeError("Max payload size exceeded"),this[Pi].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Pi][Gd]=1009,this.removeListener("data",Wd),this.reset()}function E0(t){if(this[Yr]._inflate=null,this[Pi]){this[Ai](this[Pi]);return}t[Gd]=1007,this[Ai](t)}});var Ci=_((Mj,Xr)=>{"use strict";var{isUtf8:Jd}=R("buffer"),{hasBlob:S0}=Tt(),O0=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function R0(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Na(t){let e=t.length,i=0;for(;i<e;)if(!(t[i]&128))i++;else if((t[i]&224)===192){if(i+1===e||(t[i+1]&192)!==128||(t[i]&254)===192)return!1;i+=2}else if((t[i]&240)===224){if(i+2>=e||(t[i+1]&192)!==128||(t[i+2]&192)!==128||t[i]===224&&(t[i+1]&224)===128||t[i]===237&&(t[i+1]&224)===160)return!1;i+=3}else if((t[i]&248)===240){if(i+3>=e||(t[i+1]&192)!==128||(t[i+2]&192)!==128||(t[i+3]&192)!==128||t[i]===240&&(t[i+1]&240)===128||t[i]===244&&t[i+1]>143||t[i]>244)return!1;i+=4}else return!1;return!0}function T0(t){return S0&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}Xr.exports={isBlob:T0,isValidStatusCode:R0,isValidUTF8:Na,tokenChars:O0};if(Jd)Xr.exports.isValidUTF8=function(t){return t.length<24?Na(t):Jd(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=R("utf-8-validate");Xr.exports.isValidUTF8=function(e){return e.length<32?Na(e):t(e)}}catch{}});var eo=_((Bj,nf)=>{"use strict";var{Writable:A0}=R("stream"),Yd=ei(),{BINARY_TYPES:P0,EMPTY_BUFFER:Xd,kStatusCode:C0,kWebSocket:k0}=Tt(),{concat:Fa,toArrayBuffer:I0,unmask:D0}=mn(),{isValidStatusCode:j0,isValidUTF8:Zd}=Ci(),Zr=Buffer[Symbol.species],Ke=0,Qd=1,ef=2,tf=3,La=4,Ma=5,Qr=6,Ba=class extends A0{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||P0[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[k0]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Ke}_write(e,i,n){if(this._opcode===8&&this._state==Ke)return n();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){n(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new Zr(n.buffer,n.byteOffset+e,n.length-e),new Zr(n.buffer,n.byteOffset,e)}let i=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=i.length-e;e>=n.length?i.set(this._buffers.shift(),r):(i.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new Zr(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return i}startLoop(e){this._loop=!0;do switch(this._state){case Ke:this.getInfo(e);break;case Qd:this.getPayloadLength16(e);break;case ef:this.getPayloadLength64(e);break;case tf:this.getMask();break;case La:this.getData(e);break;case Ma:case Qr:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let i=this.consume(2);if(i[0]&48){let r=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(r);return}let n=(i[0]&64)===64;if(n&&!this._extensions[Yd.extensionName]){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._fin=(i[0]&128)===128,this._opcode=i[0]&15,this._payloadLength=i[1]&127,this._opcode===0){if(n){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(!this._fragmented){let r=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let r=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(r);return}if(n){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(r);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let r=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(r);return}}else{let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(r);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(i[1]&128)===128,this._isServer){if(!this._masked){let r=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(r);return}}else if(this._masked){let r=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(r);return}this._payloadLength===126?this._state=Qd:this._payloadLength===127?this._state=ef:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let i=this.consume(8),n=i.readUInt32BE(0);if(n>Math.pow(2,21)-1){let r=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(r);return}this._payloadLength=n*Math.pow(2,32)+i.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let i=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(i);return}this._masked?this._state=tf:this._state=La}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=La}getData(e){let i=Xd;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}i=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&D0(i,this._mask)}if(this._opcode>7){this.controlMessage(i,e);return}if(this._compressed){this._state=Ma,this.decompress(i,e);return}if(i.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let n=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(n);return}this._messageLength=this._totalPayloadLength,this._fragments.push(i)}this.dataMessage(e)}decompress(e,i){this._extensions[Yd.extensionName].decompress(e,this._fin,(r,o)=>{if(r)return i(r);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");i(s);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let s=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");i(s);return}this._fragments.push(o)}this.dataMessage(i),this._state===Ke&&this.startLoop(i)})}dataMessage(e){if(!this._fin){this._state=Ke;return}let i=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=Fa(n,i):this._binaryType==="arraybuffer"?r=I0(Fa(n,i)):this._binaryType==="blob"?r=new Blob(n):r=n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=Ke):(this._state=Qr,setImmediate(()=>{this.emit("message",r,!0),this._state=Ke,this.startLoop(e)}))}else{let r=Fa(n,i);if(!this._skipUTF8Validation&&!Zd(r)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(o);return}this._state===Ma||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=Ke):(this._state=Qr,setImmediate(()=>{this.emit("message",r,!1),this._state=Ke,this.startLoop(e)}))}}controlMessage(e,i){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Xd),this.end();else{let n=e.readUInt16BE(0);if(!j0(n)){let o=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");i(o);return}let r=new Zr(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Zd(r)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");i(o);return}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=Ke;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Ke):(this._state=Qr,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Ke,this.startLoop(i)}))}createError(e,i,n,r,o){this._loop=!1,this._errored=!0;let s=new e(n?`Invalid WebSocket frame: ${i}`:i);return Error.captureStackTrace(s,this.createError),s.code=o,s[C0]=r,s}};nf.exports=Ba});var io=_((Uj,sf)=>{"use strict";var{Duplex:$j}=R("stream"),{randomFillSync:N0}=R("crypto"),{types:{isUint8Array:F0}}=R("util"),rf=ei(),{EMPTY_BUFFER:L0,kWebSocket:M0,NOOP:B0}=Tt(),{isBlob:ki,isValidStatusCode:$0}=Ci(),{mask:of,toBuffer:ti}=mn(),Je=Symbol("kByteLength"),U0=Buffer.alloc(4),to=8*1024,ii,Ii=to,rt=0,q0=1,V0=2,$a=class t{constructor(e,i,n){this._extensions=i||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=rt,this.onerror=B0,this[M0]=void 0}static frame(e,i){let n,r=!1,o=2,s=!1;i.mask&&(n=i.maskBuffer||U0,i.generateMask?i.generateMask(n):(Ii===to&&(ii===void 0&&(ii=Buffer.alloc(to)),N0(ii,0,to),Ii=0),n[0]=ii[Ii++],n[1]=ii[Ii++],n[2]=ii[Ii++],n[3]=ii[Ii++]),s=(n[0]|n[1]|n[2]|n[3])===0,o=6);let a;typeof e=="string"?(!i.mask||s)&&i[Je]!==void 0?a=i[Je]:(e=Buffer.from(e),a=e.length):(a=e.length,r=i.mask&&i.readOnly&&!s);let c=a;a>=65536?(o+=8,c=127):a>125&&(o+=2,c=126);let l=Buffer.allocUnsafe(r?a+o:o);return l[0]=i.fin?i.opcode|128:i.opcode,i.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(a,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(a,4,6)),i.mask?(l[1]|=128,l[o-4]=n[0],l[o-3]=n[1],l[o-2]=n[2],l[o-1]=n[3],s?[l,e]:r?(of(e,n,l,o,a),[l]):(of(e,n,e,0,a),[l,e])):[l,e]}close(e,i,n,r){let o;if(e===void 0)o=L0;else{if(typeof e!="number"||!$0(e))throw new TypeError("First argument must be a valid error code number");if(i===void 0||!i.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0);else{let a=Buffer.byteLength(i);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");if(o=Buffer.allocUnsafe(2+a),o.writeUInt16BE(e,0),typeof i=="string")o.write(i,2);else if(F0(i))o.set(i,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let s={[Je]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==rt?this.enqueue([this.dispatch,o,!1,s,r]):this.sendFrame(t.frame(o,s),r)}ping(e,i,n){let r,o;if(typeof e=="string"?(r=Buffer.byteLength(e),o=!1):ki(e)?(r=e.size,o=!1):(e=ti(e),r=e.length,o=ti.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[Je]:r,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};ki(e)?this._state!==rt?this.enqueue([this.getBlobData,e,!1,s,n]):this.getBlobData(e,!1,s,n):this._state!==rt?this.enqueue([this.dispatch,e,!1,s,n]):this.sendFrame(t.frame(e,s),n)}pong(e,i,n){let r,o;if(typeof e=="string"?(r=Buffer.byteLength(e),o=!1):ki(e)?(r=e.size,o=!1):(e=ti(e),r=e.length,o=ti.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[Je]:r,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};ki(e)?this._state!==rt?this.enqueue([this.getBlobData,e,!1,s,n]):this.getBlobData(e,!1,s,n):this._state!==rt?this.enqueue([this.dispatch,e,!1,s,n]):this.sendFrame(t.frame(e,s),n)}send(e,i,n){let r=this._extensions[rf.extensionName],o=i.binary?2:1,s=i.compress,a,c;typeof e=="string"?(a=Buffer.byteLength(e),c=!1):ki(e)?(a=e.size,c=!1):(e=ti(e),a=e.length,c=ti.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=a>=r._threshold),this._compress=s):(s=!1,o=0),i.fin&&(this._firstFragment=!0);let l={[Je]:a,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:c,rsv1:s};ki(e)?this._state!==rt?this.enqueue([this.getBlobData,e,this._compress,l,n]):this.getBlobData(e,this._compress,l,n):this._state!==rt?this.enqueue([this.dispatch,e,this._compress,l,n]):this.dispatch(e,this._compress,l,n)}getBlobData(e,i,n,r){this._bufferedBytes+=n[Je],this._state=V0,e.arrayBuffer().then(o=>{if(this._socket.destroyed){let a=new Error("The socket was closed while the blob was being read");process.nextTick(Ua,this,a,r);return}this._bufferedBytes-=n[Je];let s=ti(o);i?this.dispatch(s,i,n,r):(this._state=rt,this.sendFrame(t.frame(s,n),r),this.dequeue())}).catch(o=>{process.nextTick(z0,this,o,r)})}dispatch(e,i,n,r){if(!i){this.sendFrame(t.frame(e,n),r);return}let o=this._extensions[rf.extensionName];this._bufferedBytes+=n[Je],this._state=q0,o.compress(e,n.fin,(s,a)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being compressed");Ua(this,c,r);return}this._bufferedBytes-=n[Je],this._state=rt,n.readOnly=!1,this.sendFrame(t.frame(a,n),r),this.dequeue()})}dequeue(){for(;this._state===rt&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][Je],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Je],this._queue.push(e)}sendFrame(e,i){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],i),this._socket.uncork()):this._socket.write(e[0],i)}};sf.exports=$a;function Ua(t,e,i){typeof i=="function"&&i(e);for(let n=0;n<t._queue.length;n++){let r=t._queue[n],o=r[r.length-1];typeof o=="function"&&o(e)}}function z0(t,e,i){Ua(t,e,i),t.onerror(e)}});var hf=_((qj,mf)=>{"use strict";var{kForOnEventAttribute:gn,kListener:qa}=Tt(),af=Symbol("kCode"),cf=Symbol("kData"),lf=Symbol("kError"),uf=Symbol("kMessage"),pf=Symbol("kReason"),Di=Symbol("kTarget"),df=Symbol("kType"),ff=Symbol("kWasClean"),Pt=class{constructor(e){this[Di]=null,this[df]=e}get target(){return this[Di]}get type(){return this[df]}};Object.defineProperty(Pt.prototype,"target",{enumerable:!0});Object.defineProperty(Pt.prototype,"type",{enumerable:!0});var ni=class extends Pt{constructor(e,i={}){super(e),this[af]=i.code===void 0?0:i.code,this[pf]=i.reason===void 0?"":i.reason,this[ff]=i.wasClean===void 0?!1:i.wasClean}get code(){return this[af]}get reason(){return this[pf]}get wasClean(){return this[ff]}};Object.defineProperty(ni.prototype,"code",{enumerable:!0});Object.defineProperty(ni.prototype,"reason",{enumerable:!0});Object.defineProperty(ni.prototype,"wasClean",{enumerable:!0});var ji=class extends Pt{constructor(e,i={}){super(e),this[lf]=i.error===void 0?null:i.error,this[uf]=i.message===void 0?"":i.message}get error(){return this[lf]}get message(){return this[uf]}};Object.defineProperty(ji.prototype,"error",{enumerable:!0});Object.defineProperty(ji.prototype,"message",{enumerable:!0});var vn=class extends Pt{constructor(e,i={}){super(e),this[cf]=i.data===void 0?null:i.data}get data(){return this[cf]}};Object.defineProperty(vn.prototype,"data",{enumerable:!0});var H0={addEventListener(t,e,i={}){for(let r of this.listeners(t))if(!i[gn]&&r[qa]===e&&!r[gn])return;let n;if(t==="message")n=function(o,s){let a=new vn("message",{data:s?o:o.toString()});a[Di]=this,no(e,this,a)};else if(t==="close")n=function(o,s){let a=new ni("close",{code:o,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Di]=this,no(e,this,a)};else if(t==="error")n=function(o){let s=new ji("error",{error:o,message:o.message});s[Di]=this,no(e,this,s)};else if(t==="open")n=function(){let o=new Pt("open");o[Di]=this,no(e,this,o)};else return;n[gn]=!!i[gn],n[qa]=e,i.once?this.once(t,n):this.on(t,n)},removeEventListener(t,e){for(let i of this.listeners(t))if(i[qa]===e&&!i[gn]){this.removeListener(t,i);break}}};mf.exports={CloseEvent:ni,ErrorEvent:ji,Event:Pt,EventTarget:H0,MessageEvent:vn};function no(t,e,i){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,i):t.call(e,i)}});var yn=_((Vj,gf)=>{"use strict";var{tokenChars:xn}=Ci();function bt(t,e,i){t[e]===void 0?t[e]=[i]:t[e].push(i)}function G0(t){let e=Object.create(null),i=Object.create(null),n=!1,r=!1,o=!1,s,a,c=-1,l=-1,u=-1,p=0;for(;p<t.length;p++)if(l=t.charCodeAt(p),s===void 0)if(u===-1&&xn[l]===1)c===-1&&(c=p);else if(p!==0&&(l===32||l===9))u===-1&&c!==-1&&(u=p);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p);let m=t.slice(c,u);l===44?(bt(e,m,i),i=Object.create(null)):s=m,c=u=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(a===void 0)if(u===-1&&xn[l]===1)c===-1&&(c=p);else if(l===32||l===9)u===-1&&c!==-1&&(u=p);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p),bt(i,t.slice(c,u),!0),l===44&&(bt(e,s,i),i=Object.create(null),s=void 0),c=u=-1}else if(l===61&&c!==-1&&u===-1)a=t.slice(c,p),c=u=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(r){if(xn[l]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1?c=p:n||(n=!0),r=!1}else if(o)if(xn[l]===1)c===-1&&(c=p);else if(l===34&&c!==-1)o=!1,u=p;else if(l===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(l===34&&t.charCodeAt(p-1)===61)o=!0;else if(u===-1&&xn[l]===1)c===-1&&(c=p);else if(c!==-1&&(l===32||l===9))u===-1&&(u=p);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p);let m=t.slice(c,u);n&&(m=m.replace(/\\/g,""),n=!1),bt(i,a,m),l===44&&(bt(e,s,i),i=Object.create(null),s=void 0),a=void 0,c=u=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(c===-1||o||l===32||l===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=p);let f=t.slice(c,u);return s===void 0?bt(e,f,i):(a===void 0?bt(i,f,!0):n?bt(i,a,f.replace(/\\/g,"")):bt(i,a,f),bt(e,s,i)),e}function W0(t){return Object.keys(t).map(e=>{let i=t[e];return Array.isArray(i)||(i=[i]),i.map(n=>[e].concat(Object.keys(n).map(r=>{let o=n[r];return Array.isArray(o)||(o=[o]),o.map(s=>s===!0?r:`${r}=${s}`).join("; ")})).join("; ")).join(", ")}).join(", ")}gf.exports={format:W0,parse:G0}});var bn=_((Gj,Af)=>{"use strict";var K0=R("events"),J0=R("https"),Y0=R("http"),yf=R("net"),X0=R("tls"),{randomBytes:Z0,createHash:Q0}=R("crypto"),{Duplex:zj,Readable:Hj}=R("stream"),{URL:Va}=R("url"),Mt=ei(),eO=eo(),tO=io(),{isBlob:iO}=Ci(),{BINARY_TYPES:vf,CLOSE_TIMEOUT:nO,EMPTY_BUFFER:ro,GUID:rO,kForOnEventAttribute:za,kListener:oO,kStatusCode:sO,kWebSocket:ge,NOOP:bf}=Tt(),{EventTarget:{addEventListener:aO,removeEventListener:cO}}=hf(),{format:lO,parse:uO}=yn(),{toBuffer:pO}=mn(),wf=Symbol("kAborted"),Ha=[8,13],Ct=["CONNECTING","OPEN","CLOSING","CLOSED"],dO=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,ie=class t extends K0{constructor(e,i,n){super(),this._binaryType=vf[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ro,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,i===void 0?i=[]:Array.isArray(i)||(typeof i=="object"&&i!==null?(n=i,i=[]):i=[i]),_f(this,e,i,n)):(this._autoPong=n.autoPong,this._closeTimeout=n.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){vf.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,i,n){let r=new eO({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:n.maxBufferedChunks,maxFragments:n.maxFragments,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new tO(e,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[ge]=this,o[ge]=this,e[ge]=this,r.on("conclude",hO),r.on("drain",gO),r.on("error",vO),r.on("message",xO),r.on("ping",yO),r.on("pong",bO),o.onerror=wO,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),i.length>0&&e.unshift(i),e.on("close",Of),e.on("data",so),e.on("end",Rf),e.on("error",Tf),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Mt.extensionName]&&this._extensions[Mt.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,i){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){Ue(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,i,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Sf(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,i,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=i=void 0):typeof i=="function"&&(n=i,i=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ga(this,e,n);return}i===void 0&&(i=!this._isServer),this._sender.ping(e||ro,i,n)}pong(e,i,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=i=void 0):typeof i=="function"&&(n=i,i=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ga(this,e,n);return}i===void 0&&(i=!this._isServer),this._sender.pong(e||ro,i,n)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,i,n){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof i=="function"&&(n=i,i={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ga(this,e,n);return}let r={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...i};this._extensions[Mt.extensionName]||(r.compress=!1),this._sender.send(e||ro,r,n)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){Ue(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(ie,"CONNECTING",{enumerable:!0,value:Ct.indexOf("CONNECTING")});Object.defineProperty(ie.prototype,"CONNECTING",{enumerable:!0,value:Ct.indexOf("CONNECTING")});Object.defineProperty(ie,"OPEN",{enumerable:!0,value:Ct.indexOf("OPEN")});Object.defineProperty(ie.prototype,"OPEN",{enumerable:!0,value:Ct.indexOf("OPEN")});Object.defineProperty(ie,"CLOSING",{enumerable:!0,value:Ct.indexOf("CLOSING")});Object.defineProperty(ie.prototype,"CLOSING",{enumerable:!0,value:Ct.indexOf("CLOSING")});Object.defineProperty(ie,"CLOSED",{enumerable:!0,value:Ct.indexOf("CLOSED")});Object.defineProperty(ie.prototype,"CLOSED",{enumerable:!0,value:Ct.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(ie.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(ie.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[za])return e[oO];return null},set(e){for(let i of this.listeners(t))if(i[za]){this.removeListener(t,i);break}typeof e=="function"&&this.addEventListener(t,e,{[za]:!0})}})});ie.prototype.addEventListener=aO;ie.prototype.removeEventListener=cO;Af.exports=ie;function _f(t,e,i,n){let r={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:nO,protocolVersion:Ha[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=r.autoPong,t._closeTimeout=r.closeTimeout,!Ha.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${Ha.join(", ")})`);let o;if(e instanceof Va)o=e;else try{o=new Va(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),t._url=o.href;let s=o.protocol==="wss:",a=o.protocol==="ws+unix:",c;if(o.protocol!=="ws:"&&!s&&!a?c=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:a&&!o.pathname?c="The URL's pathname is empty":o.hash&&(c="The URL contains a fragment identifier"),c){let g=new SyntaxError(c);if(t._redirects===0)throw g;oo(t,g);return}let l=s?443:80,u=Z0(16).toString("base64"),p=s?J0.request:Y0.request,f=new Set,m;if(r.createConnection=r.createConnection||(s?mO:fO),r.defaultPort=r.defaultPort||l,r.port=o.port||l,r.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,r.headers={...r.headers,"Sec-WebSocket-Version":r.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},r.path=o.pathname+o.search,r.timeout=r.handshakeTimeout,r.perMessageDeflate&&(m=new Mt({...r.perMessageDeflate,isServer:!1,maxPayload:r.maxPayload}),r.headers["Sec-WebSocket-Extensions"]=lO({[Mt.extensionName]:m.offer()})),i.length){for(let g of i){if(typeof g!="string"||!dO.test(g)||f.has(g))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(g)}r.headers["Sec-WebSocket-Protocol"]=i.join(",")}if(r.origin&&(r.protocolVersion<13?r.headers["Sec-WebSocket-Origin"]=r.origin:r.headers.Origin=r.origin),(o.username||o.password)&&(r.auth=`${o.username}:${o.password}`),a){let g=r.path.split(":");r.socketPath=g[0],r.path=g[1]}let d;if(r.followRedirects){if(t._redirects===0){t._originalIpc=a,t._originalSecure=s,t._originalHostOrSocketPath=a?r.socketPath:o.host;let g=n&&n.headers;if(n={...n,headers:{}},g)for(let[v,x]of Object.entries(g))n.headers[v.toLowerCase()]=x}else if(t.listenerCount("redirect")===0){let g=a?t._originalIpc?r.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:o.host===t._originalHostOrSocketPath;(!g||t._originalSecure&&!s)&&(delete r.headers.authorization,delete r.headers.cookie,g||delete r.headers.host,r.auth=void 0)}r.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),d=t._req=p(r),t._redirects&&t.emit("redirect",t.url,d)}else d=t._req=p(r);r.timeout&&d.on("timeout",()=>{Ue(t,d,"Opening handshake has timed out")}),d.on("error",g=>{d===null||d[wf]||(d=t._req=null,oo(t,g))}),d.on("response",g=>{let v=g.headers.location,x=g.statusCode;if(v&&r.followRedirects&&x>=300&&x<400){if(++t._redirects>r.maxRedirects){Ue(t,d,"Maximum redirects exceeded");return}d.abort();let y;try{y=new Va(v,e)}catch{let O=new SyntaxError(`Invalid URL: ${v}`);oo(t,O);return}_f(t,y,i,n)}else t.emit("unexpected-response",d,g)||Ue(t,d,`Unexpected server response: ${g.statusCode}`)}),d.on("upgrade",(g,v,x)=>{if(t.emit("upgrade",g),t.readyState!==ie.CONNECTING)return;d=t._req=null;let y=g.headers.upgrade;if(y===void 0||y.toLowerCase()!=="websocket"){Ue(t,v,"Invalid Upgrade header");return}let w=Q0("sha1").update(u+rO).digest("base64");if(g.headers["sec-websocket-accept"]!==w){Ue(t,v,"Invalid Sec-WebSocket-Accept header");return}let O=g.headers["sec-websocket-protocol"],C;if(O!==void 0?f.size?f.has(O)||(C="Server sent an invalid subprotocol"):C="Server sent a subprotocol but none was requested":f.size&&(C="Server sent no subprotocol"),C){Ue(t,v,C);return}O&&(t._protocol=O);let k=g.headers["sec-websocket-extensions"];if(k!==void 0){if(!m){Ue(t,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let N;try{N=uO(k)}catch{Ue(t,v,"Invalid Sec-WebSocket-Extensions header");return}let q=Object.keys(N);if(q.length!==1||q[0]!==Mt.extensionName){Ue(t,v,"Server indicated an extension that was not requested");return}try{m.accept(N[Mt.extensionName])}catch{Ue(t,v,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Mt.extensionName]=m}t.setSocket(v,x,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(d,t):d.end()}function oo(t,e){t._readyState=ie.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function fO(t){return t.path=t.socketPath,yf.connect(t)}function mO(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=yf.isIP(t.host)?"":t.host),X0.connect(t)}function Ue(t,e,i){t._readyState=ie.CLOSING;let n=new Error(i);Error.captureStackTrace(n,Ue),e.setHeader?(e[wf]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(oo,t,n)):(e.destroy(n),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Ga(t,e,i){if(e){let n=iO(e)?e.size:pO(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(i){let n=new Error(`WebSocket is not open: readyState ${t.readyState} (${Ct[t.readyState]})`);process.nextTick(i,n)}}function hO(t,e){let i=this[ge];i._closeFrameReceived=!0,i._closeMessage=e,i._closeCode=t,i._socket[ge]!==void 0&&(i._socket.removeListener("data",so),process.nextTick(Ef,i._socket),t===1005?i.close():i.close(t,e))}function gO(){let t=this[ge];t.isPaused||t._socket.resume()}function vO(t){let e=this[ge];e._socket[ge]!==void 0&&(e._socket.removeListener("data",so),process.nextTick(Ef,e._socket),e.close(t[sO])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function xf(){this[ge].emitClose()}function xO(t,e){this[ge].emit("message",t,e)}function yO(t){let e=this[ge];e._autoPong&&e.pong(t,!this._isServer,bf),e.emit("ping",t)}function bO(t){this[ge].emit("pong",t)}function Ef(t){t.resume()}function wO(t){let e=this[ge];e.readyState!==ie.CLOSED&&(e.readyState===ie.OPEN&&(e._readyState=ie.CLOSING,Sf(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Sf(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Of(){let t=this[ge];if(this.removeListener("close",Of),this.removeListener("data",so),this.removeListener("end",Rf),t._readyState=ie.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[ge]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",xf),t._receiver.on("finish",xf))}function so(t){this[ge]._receiver.write(t)||this.pause()}function Rf(){let t=this[ge];t._readyState=ie.CLOSING,t._receiver.end(),this.end()}function Tf(){let t=this[ge];this.removeListener("error",Tf),this.on("error",bf),t&&(t._readyState=ie.CLOSING,this.destroy())}});var Wa=_((Kj,kf)=>{"use strict";var Wj=bn(),{Duplex:_O}=R("stream");function Pf(t){t.emit("close")}function EO(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Cf(t){this.removeListener("error",Cf),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function SO(t,e){let i=!0,n=new _O({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(o,s){let a=!s&&n._readableState.objectMode?o.toString():o;n.push(a)||t.pause()}),t.once("error",function(o){n.destroyed||(i=!1,n.destroy(o))}),t.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(r,o){if(t.readyState===t.CLOSED){o(r),process.nextTick(Pf,n);return}let s=!1;t.once("error",function(c){s=!0,o(c)}),t.once("close",function(){s||o(r),process.nextTick(Pf,n)}),i&&t.terminate()},n._final=function(r){if(t.readyState===t.CONNECTING){t.once("open",function(){n._final(r)});return}t._socket!==null&&(t._socket._writableState.finished?(r(),n._readableState.endEmitted&&n.destroy()):(t._socket.once("finish",function(){r()}),t.close()))},n._read=function(){t.isPaused&&t.resume()},n._write=function(r,o,s){if(t.readyState===t.CONNECTING){t.once("open",function(){n._write(r,o,s)});return}t.send(r,s)},n.on("end",EO),n.on("error",Cf),n}kf.exports=SO});var ao=_((Jj,If)=>{"use strict";var{tokenChars:OO}=Ci();function RO(t){let e=new Set,i=-1,n=-1,r=0;for(r;r<t.length;r++){let s=t.charCodeAt(r);if(n===-1&&OO[s]===1)i===-1&&(i=r);else if(r!==0&&(s===32||s===9))n===-1&&i!==-1&&(n=r);else if(s===44){if(i===-1)throw new SyntaxError(`Unexpected character at index ${r}`);n===-1&&(n=r);let a=t.slice(i,n);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),i=n=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(i===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let o=t.slice(i,r);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return e.add(o),e}If.exports={parse:RO}});var Ja=_((Xj,Mf)=>{"use strict";var TO=R("events"),co=R("http"),{Duplex:Yj}=R("stream"),{createHash:AO}=R("crypto"),Df=yn(),ri=ei(),PO=ao(),CO=bn(),{CLOSE_TIMEOUT:kO,GUID:IO,kWebSocket:DO}=Tt(),jO=/^[+/0-9A-Za-z]{22}==$/,jf=0,Nf=1,Lf=2,Ka=class extends TO{constructor(e,i){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:kO,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:CO,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=co.createServer((n,r)=>{let o=co.STATUS_CODES[426];r.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),r.end(o)}),this._server.listen(e.port,e.host,e.backlog,i)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=NO(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,o,s)=>{this.handleUpgrade(r,o,s,n)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=jf}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Lf){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(wn,this);return}if(e&&this.once("close",e),this._state!==Nf)if(this._state=Nf,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(wn,this):process.nextTick(wn,this);else{let i=this._server;this._removeListeners(),this._removeListeners=this._server=null,i.close(()=>{wn(this)})}}shouldHandle(e){if(this.options.path){let i=e.url.indexOf("?");if((i!==-1?e.url.slice(0,i):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,i,n,r){i.on("error",Ff);let o=e.headers["sec-websocket-key"],s=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){oi(this,e,i,405,"Invalid HTTP method");return}if(s===void 0||s.toLowerCase()!=="websocket"){oi(this,e,i,400,"Invalid Upgrade header");return}if(o===void 0||!jO.test(o)){oi(this,e,i,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==13&&a!==8){oi(this,e,i,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){_n(i,400);return}let c=e.headers["sec-websocket-protocol"],l=new Set;if(c!==void 0)try{l=PO.parse(c)}catch{oi(this,e,i,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],p={};if(this.options.perMessageDeflate&&u!==void 0){let f=new ri({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let m=Df.parse(u);m[ri.extensionName]&&(f.accept(m[ri.extensionName]),p[ri.extensionName]=f)}catch{oi(this,e,i,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(f,(m,d,g,v)=>{if(!m)return _n(i,d||401,g,v);this.completeUpgrade(p,o,l,e,i,n,r)});return}if(!this.options.verifyClient(f))return _n(i,401)}this.completeUpgrade(p,o,l,e,i,n,r)}completeUpgrade(e,i,n,r,o,s,a){if(!o.readable||!o.writable)return o.destroy();if(o[DO])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>jf)return _n(o,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${AO("sha1").update(i+IO).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(n.size){let p=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;p&&(l.push(`Sec-WebSocket-Protocol: ${p}`),u._protocol=p)}if(e[ri.extensionName]){let p=e[ri.extensionName].params,f=Df.format({[ri.extensionName]:[p]});l.push(`Sec-WebSocket-Extensions: ${f}`),u._extensions=e}this.emit("headers",l,r),o.write(l.concat(`\r
|
|
51
|
+
`).join(`\r
|
|
52
|
+
`)),o.removeListener("error",Ff),u.setSocket(o,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(wn,this)})),a(u,r)}};Mf.exports=Ka;function NO(t,e){for(let i of Object.keys(e))t.on(i,e[i]);return function(){for(let n of Object.keys(e))t.removeListener(n,e[n])}}function wn(t){t._state=Lf,t.emit("close")}function Ff(){this.destroy()}function _n(t,e,i,n){i=i||co.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(i),...n},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${co.STATUS_CODES[e]}\r
|
|
53
|
+
`+Object.keys(n).map(r=>`${r}: ${n[r]}`).join(`\r
|
|
54
|
+
`)+`\r
|
|
55
|
+
\r
|
|
56
|
+
`+i)}function oi(t,e,i,n,r,o){if(t.listenerCount("wsClientError")){let s=new Error(r);Error.captureStackTrace(s,oi),t.emit("wsClientError",s,i,e)}else _n(i,n,r,o)}});var Uf=_((Zj,$f)=>{"use strict";var FO=Wa(),LO=yn(),MO=ei(),BO=eo(),$O=io(),UO=ao(),ot=bn(),Bf=Ja();ot.createWebSocketStream=FO;ot.extension=LO;ot.PerMessageDeflate=MO;ot.Receiver=BO;ot.Sender=$O;ot.Server=Bf;ot.subprotocol=UO;ot.WebSocket=ot;ot.WebSocketServer=Bf;$f.exports=ot});var Vf=_((Qj,qf)=>{"use strict";qf.exports=Uf()});function En(t,e){return function(){return t.apply(e,arguments)}}var Ya=A(()=>{"use strict"});function Li(t){return t!==null&&!Fi(t)&&t.constructor!==null&&!Fi(t.constructor)&&De(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}function zO(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Wf(t.buffer),e}function tR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function Rn(t,e,{allOwnKeys:i=!1}={}){if(t===null||typeof t>"u")return;let n,r;if(typeof t!="object"&&(t=[t]),ai(t))for(n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else{if(Li(t))return;let o=i?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length,a;for(n=0;n<s;n++)a=o[n],e.call(null,t[a],a,t)}}function Jf(t,e){if(Li(t))return null;e=e.toLowerCase();let i=Object.keys(t),n=i.length,r;for(;n-- >0;)if(r=i[n],e===r.toLowerCase())return r;return null}function Xa(...t){let{caseless:e,skipUndefined:i}=Yf(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let a=e&&typeof s=="string"&&Jf(n,s)||s,c=uo(n,a)?n[a]:void 0;lo(c)&&lo(o)?n[a]=Xa(c,o):lo(o)?n[a]=Xa({},o):ai(o)?n[a]=o.slice():(!i||!Fi(o))&&(n[a]=o)};for(let o=0,s=t.length;o<s;o++){let a=t[o];if(!a||Li(a)||(Rn(a,r),typeof a!="object"||ai(a)))continue;let c=Object.getOwnPropertySymbols(a);for(let l=0;l<c.length;l++){let u=c[l];bR.call(a,u)&&r(a[u],u)}}return n}function RR(t){return!!(t&&De(t.append)&&t[Gf]==="FormData"&&t[On])}var qO,Ni,On,Gf,uo,Sn,VO,Za,st,po,ai,Fi,Wf,HO,De,Kf,Mi,GO,lo,WO,KO,JO,YO,XO,ZO,QO,eR,zf,Hf,iR,nR,rR,oR,sR,aR,cR,si,Yf,lR,uR,pR,dR,fR,mR,hR,gR,vR,xR,yR,bR,wR,Xf,_R,ER,SR,OR,TR,AR,PR,Zf,CR,Qf,kR,h,X=A(()=>{"use strict";Ya();({toString:qO}=Object.prototype),{getPrototypeOf:Ni}=Object,{iterator:On,toStringTag:Gf}=Symbol,uo=(({hasOwnProperty:t})=>(e,i)=>t.call(e,i))(Object.prototype),Sn=(t,e)=>{let i=t,n=[];for(;i!=null&&i!==Object.prototype;){if(n.indexOf(i)!==-1)return!1;if(n.push(i),uo(i,e))return!0;i=Ni(i)}return!1},VO=(t,e)=>t!=null&&Sn(t,e)?t[e]:void 0,Za=(t=>e=>{let i=qO.call(e);return t[i]||(t[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),st=t=>(t=t.toLowerCase(),e=>Za(e)===t),po=t=>e=>typeof e===t,{isArray:ai}=Array,Fi=po("undefined");Wf=st("ArrayBuffer");HO=po("string"),De=po("function"),Kf=po("number"),Mi=t=>t!==null&&typeof t=="object",GO=t=>t===!0||t===!1,lo=t=>{if(!Mi(t))return!1;let e=Ni(t);return(e===null||e===Object.prototype||Ni(e)===null)&&!Sn(t,Gf)&&!Sn(t,On)},WO=t=>{if(!Mi(t)||Li(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},KO=st("Date"),JO=st("File"),YO=t=>!!(t&&typeof t.uri<"u"),XO=t=>t&&typeof t.getParts<"u",ZO=st("Blob"),QO=st("FileList"),eR=t=>Mi(t)&&De(t.pipe);zf=tR(),Hf=typeof zf.FormData<"u"?zf.FormData:void 0,iR=t=>{if(!t)return!1;if(Hf&&t instanceof Hf)return!0;let e=Ni(t);if(!e||e===Object.prototype||!De(t.append))return!1;let i=Za(t);return i==="formdata"||i==="object"&&De(t.toString)&&t.toString()==="[object FormData]"},nR=st("URLSearchParams"),[rR,oR,sR,aR]=["ReadableStream","Request","Response","Headers"].map(st),cR=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");si=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yf=t=>!Fi(t)&&t!==si;lR=(t,e,i,{allOwnKeys:n}={})=>(Rn(e,(r,o)=>{i&&De(r)?Object.defineProperty(t,o,{__proto__:null,value:En(r,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),uR=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),pR=(t,e,i,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),i&&Object.assign(t.prototype,i)},dR=(t,e,i,n)=>{let r,o,s,a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=i!==!1&&Ni(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},fR=(t,e,i)=>{t=String(t),(i===void 0||i>t.length)&&(i=t.length),i-=e.length;let n=t.indexOf(e,i);return n!==-1&&n===i},mR=t=>{if(!t)return null;if(ai(t))return t;let e=t.length;if(!Kf(e))return null;let i=new Array(e);for(;e-- >0;)i[e]=t[e];return i},hR=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ni(Uint8Array)),gR=(t,e)=>{let n=(t&&t[On]).call(t),r;for(;(r=n.next())&&!r.done;){let o=r.value;e.call(t,o[0],o[1])}},vR=(t,e)=>{let i,n=[];for(;(i=t.exec(e))!==null;)n.push(i);return n},xR=st("HTMLFormElement"),yR=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,r){return n.toUpperCase()+r}),{propertyIsEnumerable:bR}=Object.prototype,wR=st("RegExp"),Xf=(t,e)=>{let i=Object.getOwnPropertyDescriptors(t),n={};Rn(i,(r,o)=>{let s;(s=e(r,o,t))!==!1&&(n[o]=s||r)}),Object.defineProperties(t,n)},_R=t=>{Xf(t,(e,i)=>{if(De(t)&&["arguments","caller","callee"].includes(i))return!1;let n=t[i];if(De(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},ER=(t,e)=>{let i={},n=r=>{r.forEach(o=>{i[o]=!0})};return ai(t)?n(t):n(String(t).split(e)),i},SR=()=>{},OR=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;TR=t=>{let e=new WeakSet,i=n=>{if(Mi(n)){if(e.has(n))return;if(Li(n))return n;if(!("toJSON"in n)){e.add(n);let r=ai(n)?[]:{};return Rn(n,(o,s)=>{let a=i(o);!Fi(a)&&(r[s]=a)}),e.delete(n),r}}return n};return i(t)},AR=st("AsyncFunction"),PR=t=>t&&(Mi(t)||De(t))&&De(t.then)&&De(t.catch),Zf=((t,e)=>t?setImmediate:e?((i,n)=>(si.addEventListener("message",({source:r,data:o})=>{r===si&&o===i&&n.length&&n.shift()()},!1),r=>{n.push(r),si.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",De(si.postMessage)),CR=typeof queueMicrotask<"u"?queueMicrotask.bind(si):typeof process<"u"&&process.nextTick||Zf,Qf=t=>t!=null&&De(t[On]),kR=t=>t!=null&&Sn(t,On)&&Qf(t),h={isArray:ai,isArrayBuffer:Wf,isBuffer:Li,isFormData:iR,isArrayBufferView:zO,isString:HO,isNumber:Kf,isBoolean:GO,isObject:Mi,isPlainObject:lo,isEmptyObject:WO,isReadableStream:rR,isRequest:oR,isResponse:sR,isHeaders:aR,isUndefined:Fi,isDate:KO,isFile:JO,isReactNativeBlob:YO,isReactNative:XO,isBlob:ZO,isRegExp:wR,isFunction:De,isStream:eR,isURLSearchParams:nR,isTypedArray:hR,isFileList:QO,forEach:Rn,merge:Xa,extend:lR,trim:cR,stripBOM:uR,inherits:pR,toFlatObject:dR,kindOf:Za,kindOfTest:st,endsWith:fR,toArray:mR,forEachEntry:gR,matchAll:vR,isHTMLForm:xR,hasOwnProperty:uo,hasOwnProp:uo,hasOwnInPrototypeChain:Sn,getSafeProp:VO,reduceDescriptors:Xf,freezeMethods:_R,toObjectSet:ER,toCamelCase:yR,noop:SR,toFiniteNumber:OR,findKey:Jf,global:si,isContextDefined:Yf,isSpecCompliantForm:RR,toJSONObject:TR,isAsyncFn:AR,isThenable:PR,setImmediate:Zf,asap:CR,isIterable:Qf,isSafeIterable:kR}});var IR,em,tm=A(()=>{"use strict";X();IR=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),em=t=>{let e={},i,n,r;return t&&t.split(`
|
|
57
|
+
`).forEach(function(s){r=s.indexOf(":"),i=s.substring(0,r).trim().toLowerCase(),n=s.substring(r+1).trim(),!(!i||e[i]&&IR[i])&&(i==="set-cookie"?e[i]?e[i].push(n):e[i]=[n]:e[i]=e[i]?e[i]+", "+n:n)}),e}});function DR(t){let e=0,i=t.length;for(;e<i;){let n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;i>e;){let n=t.charCodeAt(i-1);if(n!==9&&n!==32)break;i-=1}return e===0&&i===t.length?t:t.slice(e,i)}function Qa(t,e){return h.isArray(t)?t.map(i=>Qa(i,e)):DR(String(t).replace(e,""))}function Bi(t){let e=Object.create(null);return h.forEach(t.toJSON(),(i,n)=>{e[n]=FR(i)}),e}var jR,NR,im,FR,Tn=A(()=>{"use strict";X();jR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),NR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");im=t=>Qa(t,jR),FR=t=>Qa(t,NR)});function An(t){return t&&String(t).trim().toLowerCase()}function fo(t){return t===!1||t==null?t:h.isArray(t)?t.map(fo):im(String(t))}function LR(t){let e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=i.exec(t);)e[n[1]]=n[2];return e}function ec(t,e,i,n,r){if(h.isFunction(n))return n.call(this,e,i);if(r&&(e=i),!!h.isString(e)){if(h.isString(n))return e.indexOf(n)!==-1;if(h.isRegExp(n))return n.test(e)}}function BR(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,n)=>i.toUpperCase()+n)}function $R(t,e){let i=h.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+i,{__proto__:null,value:function(r,o,s){return this[n].call(this,e,r,o,s)},configurable:!0})})}var nm,MR,$i,Q,at=A(()=>{"use strict";X();tm();Tn();nm=Symbol("internals");MR=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());$i=class{constructor(e){e&&this.set(e)}set(e,i,n){let r=this;function o(a,c,l){let u=An(c);if(!u)return;let p=h.findKey(r,u);(!p||r[p]===void 0||l===!0||l===void 0&&r[p]!==!1)&&(r[p||c]=fo(a))}let s=(a,c)=>h.forEach(a,(l,u)=>o(l,u,c));if(h.isPlainObject(e)||e instanceof this.constructor)s(e,i);else if(h.isString(e)&&(e=e.trim())&&!MR(e))s(em(e),i);else if(h.isObject(e)&&h.isSafeIterable(e)){let a=Object.create(null),c,l;for(let u of e){if(!h.isArray(u))throw new TypeError("Object iterator must return a key-value pair");l=u[0],h.hasOwnProp(a,l)?(c=a[l],a[l]=h.isArray(c)?[...c,u[1]]:[c,u[1]]):a[l]=u[1]}s(a,i)}else e!=null&&o(i,e,n);return this}get(e,i){if(e=An(e),e){let n=h.findKey(this,e);if(n){let r=this[n];if(!i)return r;if(i===!0)return LR(r);if(h.isFunction(i))return i.call(this,r,n);if(h.isRegExp(i))return i.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=An(e),e){let n=h.findKey(this,e);return!!(n&&this[n]!==void 0&&(!i||ec(this,this[n],n,i)))}return!1}delete(e,i){let n=this,r=!1;function o(s){if(s=An(s),s){let a=h.findKey(n,s);a&&(!i||ec(n,n[a],a,i))&&(delete n[a],r=!0)}}return h.isArray(e)?e.forEach(o):o(e),r}clear(e){let i=Object.keys(this),n=i.length,r=!1;for(;n--;){let o=i[n];(!e||ec(this,this[o],o,e,!0))&&(delete this[o],r=!0)}return r}normalize(e){let i=this,n={};return h.forEach(this,(r,o)=>{let s=h.findKey(n,o);if(s){i[s]=fo(r),delete i[o];return}let a=e?BR(o):String(o).trim();a!==o&&delete i[o],i[a]=fo(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let i=Object.create(null);return h.forEach(this,(n,r)=>{n!=null&&n!==!1&&(i[r]=e&&h.isArray(n)?n.join(", "):n)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
|
|
58
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){let n=new this(e);return i.forEach(r=>n.set(r)),n}static accessor(e){let n=(this[nm]=this[nm]={accessors:{}}).accessors,r=this.prototype;function o(s){let a=An(s);n[a]||($R(r,s),n[a]=!0)}return h.isArray(e)?e.forEach(o):o(e),this}};$i.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);h.reduceDescriptors($i.prototype,({value:t},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[i]=n}}});h.freezeMethods($i);Q=$i});function qR(t){if(h.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(h.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function VR(t,e){let i=new Set(e.map(o=>String(o).toLowerCase())),n=[],r=o=>{if(o===null||typeof o!="object"||h.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof Q&&(o=o.toJSON()),n.push(o);let s;if(h.isArray(o))s=[],o.forEach((a,c)=>{let l=r(a);h.isUndefined(l)||(s[c]=l)});else{if(!h.isPlainObject(o)&&qR(o))return n.pop(),o;s=Object.create(null);for(let[a,c]of Object.entries(o)){let l=i.has(a.toLowerCase())?UR:r(c);h.isUndefined(l)||(s[a]=l)}}return n.pop(),s};return r(t)}var UR,Oe,E,Pe=A(()=>{"use strict";X();at();UR="[REDACTED ****]";Oe=class t extends Error{static from(e,i,n,r,o,s){let a=new t(e.message,i||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,i,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,i&&(this.code=i),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){let e=this.config,i=e&&h.hasOwnProp(e,"redact")?e.redact:void 0,n=h.isArray(i)&&i.length>0?VR(e,i):h.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Oe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Oe.ERR_BAD_OPTION="ERR_BAD_OPTION";Oe.ECONNABORTED="ECONNABORTED";Oe.ETIMEDOUT="ETIMEDOUT";Oe.ECONNREFUSED="ECONNREFUSED";Oe.ERR_NETWORK="ERR_NETWORK";Oe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Oe.ERR_DEPRECATED="ERR_DEPRECATED";Oe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Oe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Oe.ERR_CANCELED="ERR_CANCELED";Oe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Oe.ERR_INVALID_URL="ERR_INVALID_URL";Oe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";E=Oe});var sm=_((mN,om)=>{var rm=R("stream").Stream,zR=R("util");om.exports=ct;function ct(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}zR.inherits(ct,rm);ct.create=function(t,e){var i=new this;e=e||{};for(var n in e)i[n]=e[n];i.source=t;var r=t.emit;return t.emit=function(){return i._handleEmit(arguments),r.apply(t,arguments)},t.on("error",function(){}),i.pauseStream&&t.pause(),i};Object.defineProperty(ct.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});ct.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ct.prototype.resume=function(){this._released||this.release(),this.source.resume()};ct.prototype.pause=function(){this.source.pause()};ct.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};ct.prototype.pipe=function(){var t=rm.prototype.pipe.apply(this,arguments);return this.resume(),t};ct.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};ct.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var um=_((hN,lm)=>{var HR=R("util"),cm=R("stream").Stream,am=sm();lm.exports=ae;function ae(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}HR.inherits(ae,cm);ae.create=function(t){var e=new this;t=t||{};for(var i in t)e[i]=t[i];return e};ae.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ae.prototype.append=function(t){var e=ae.isStreamLike(t);if(e){if(!(t instanceof am)){var i=am.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=i}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ae.prototype.pipe=function(t,e){return cm.prototype.pipe.call(this,t,e),this.resume(),t};ae.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ae.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(i){var n=ae.isStreamLike(i);n&&(i.on("data",this._checkDataSize.bind(this)),this._handleErrors(i)),this._pipeNext(i)}.bind(this))};ae.prototype._pipeNext=function(t){this._currentStream=t;var e=ae.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var i=t;this.write(i),this._getNext()};ae.prototype._handleErrors=function(t){var e=this;t.on("error",function(i){e._emitError(i)})};ae.prototype.write=function(t){this.emit("data",t)};ae.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ae.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ae.prototype.end=function(){this._reset(),this.emit("end")};ae.prototype.destroy=function(){this._reset(),this.emit("close")};ae.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ae.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ae.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ae.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var pm=_((gN,GR)=>{GR.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var fm=_((vN,dm)=>{dm.exports=pm()});var gm=_(je=>{"use strict";var mo=fm(),WR=R("path").extname,mm=/^\s*([^;\s]*)(?:;|\s|$)/,KR=/^text\//i;je.charset=hm;je.charsets={lookup:hm};je.contentType=JR;je.extension=YR;je.extensions=Object.create(null);je.lookup=XR;je.types=Object.create(null);ZR(je.extensions,je.types);function hm(t){if(!t||typeof t!="string")return!1;var e=mm.exec(t),i=e&&mo[e[1].toLowerCase()];return i&&i.charset?i.charset:e&&KR.test(e[1])?"UTF-8":!1}function JR(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?je.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var i=je.charset(e);i&&(e+="; charset="+i.toLowerCase())}return e}function YR(t){if(!t||typeof t!="string")return!1;var e=mm.exec(t),i=e&&je.extensions[e[1].toLowerCase()];return!i||!i.length?!1:i[0]}function XR(t){if(!t||typeof t!="string")return!1;var e=WR("x."+t).toLowerCase().substr(1);return e&&je.types[e]||!1}function ZR(t,e){var i=["nginx","apache",void 0,"iana"];Object.keys(mo).forEach(function(r){var o=mo[r],s=o.extensions;if(!(!s||!s.length)){t[r]=s;for(var a=0;a<s.length;a++){var c=s[a];if(e[c]){var l=i.indexOf(mo[e[c]].source),u=i.indexOf(o.source);if(e[c]!=="application/octet-stream"&&(l>u||l===u&&e[c].substr(0,12)==="application/"))continue}e[c]=r}}})}});var xm=_((yN,vm)=>{vm.exports=QR;function QR(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var tc=_((bN,bm)=>{var ym=xm();bm.exports=eT;function eT(t){var e=!1;return ym(function(){e=!0}),function(n,r){e?t(n,r):ym(function(){t(n,r)})}}});var ic=_((wN,wm)=>{wm.exports=tT;function tT(t){Object.keys(t.jobs).forEach(iT.bind(t)),t.jobs={}}function iT(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var nc=_((_N,Em)=>{var _m=tc(),nT=ic();Em.exports=rT;function rT(t,e,i,n){var r=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[r]=oT(e,r,t[r],function(o,s){r in i.jobs&&(delete i.jobs[r],o?nT(i):i.results[r]=s,n(o,i.results))})}function oT(t,e,i,n){var r;return t.length==2?r=t(i,_m(n)):r=t(i,e,_m(n)),r}});var rc=_((EN,Sm)=>{Sm.exports=sT;function sT(t,e){var i=!Array.isArray(t),n={index:0,keyedList:i||e?Object.keys(t):null,jobs:{},results:i?{}:[],size:i?Object.keys(t).length:t.length};return e&&n.keyedList.sort(i?e:function(r,o){return e(t[r],t[o])}),n}});var oc=_((SN,Om)=>{var aT=ic(),cT=tc();Om.exports=lT;function lT(t){Object.keys(this.jobs).length&&(this.index=this.size,aT(this),cT(t)(null,this.results))}});var Tm=_((ON,Rm)=>{var uT=nc(),pT=rc(),dT=oc();Rm.exports=fT;function fT(t,e,i){for(var n=pT(t);n.index<(n.keyedList||t).length;)uT(t,e,n,function(r,o){if(r){i(r,o);return}if(Object.keys(n.jobs).length===0){i(null,n.results);return}}),n.index++;return dT.bind(n,i)}});var sc=_((RN,ho)=>{var Am=nc(),mT=rc(),hT=oc();ho.exports=gT;ho.exports.ascending=Pm;ho.exports.descending=vT;function gT(t,e,i,n){var r=mT(t,i);return Am(t,e,r,function o(s,a){if(s){n(s,a);return}if(r.index++,r.index<(r.keyedList||t).length){Am(t,e,r,o);return}n(null,r.results)}),hT.bind(r,n)}function Pm(t,e){return t<e?-1:t>e?1:0}function vT(t,e){return-1*Pm(t,e)}});var km=_((TN,Cm)=>{var xT=sc();Cm.exports=yT;function yT(t,e,i){return xT(t,e,null,i)}});var Dm=_((AN,Im)=>{Im.exports={parallel:Tm(),serial:km(),serialOrdered:sc()}});var ac=_((PN,jm)=>{"use strict";jm.exports=Object});var Fm=_((CN,Nm)=>{"use strict";Nm.exports=Error});var Mm=_((kN,Lm)=>{"use strict";Lm.exports=EvalError});var $m=_((IN,Bm)=>{"use strict";Bm.exports=RangeError});var qm=_((DN,Um)=>{"use strict";Um.exports=ReferenceError});var zm=_((jN,Vm)=>{"use strict";Vm.exports=SyntaxError});var go=_((NN,Hm)=>{"use strict";Hm.exports=TypeError});var Wm=_((FN,Gm)=>{"use strict";Gm.exports=URIError});var Jm=_((LN,Km)=>{"use strict";Km.exports=Math.abs});var Xm=_((MN,Ym)=>{"use strict";Ym.exports=Math.floor});var Qm=_((BN,Zm)=>{"use strict";Zm.exports=Math.max});var th=_(($N,eh)=>{"use strict";eh.exports=Math.min});var nh=_((UN,ih)=>{"use strict";ih.exports=Math.pow});var oh=_((qN,rh)=>{"use strict";rh.exports=Math.round});var ah=_((VN,sh)=>{"use strict";sh.exports=Number.isNaN||function(e){return e!==e}});var lh=_((zN,ch)=>{"use strict";var bT=ah();ch.exports=function(e){return bT(e)||e===0?e:e<0?-1:1}});var ph=_((HN,uh)=>{"use strict";uh.exports=Object.getOwnPropertyDescriptor});var cc=_((GN,dh)=>{"use strict";var vo=ph();if(vo)try{vo([],"length")}catch{vo=null}dh.exports=vo});var mh=_((WN,fh)=>{"use strict";var xo=Object.defineProperty||!1;if(xo)try{xo({},"a",{value:1})}catch{xo=!1}fh.exports=xo});var lc=_((KN,hh)=>{"use strict";hh.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},i=Symbol("test"),n=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[i]=r;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==i||!Object.prototype.propertyIsEnumerable.call(e,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,i);if(a.value!==r||a.enumerable!==!0)return!1}return!0}});var xh=_((JN,vh)=>{"use strict";var gh=typeof Symbol<"u"&&Symbol,wT=lc();vh.exports=function(){return typeof gh!="function"||typeof Symbol!="function"||typeof gh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wT()}});var uc=_((YN,yh)=>{"use strict";yh.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var pc=_((XN,bh)=>{"use strict";var _T=ac();bh.exports=_T.getPrototypeOf||null});var Eh=_((ZN,_h)=>{"use strict";var ET="Function.prototype.bind called on incompatible ",ST=Object.prototype.toString,OT=Math.max,RT="[object Function]",wh=function(e,i){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<i.length;o+=1)n[o+e.length]=i[o];return n},TT=function(e,i){for(var n=[],r=i||0,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},AT=function(t,e){for(var i="",n=0;n<t.length;n+=1)i+=t[n],n+1<t.length&&(i+=e);return i};_h.exports=function(e){var i=this;if(typeof i!="function"||ST.apply(i)!==RT)throw new TypeError(ET+i);for(var n=TT(arguments,1),r,o=function(){if(this instanceof r){var u=i.apply(this,wh(n,arguments));return Object(u)===u?u:this}return i.apply(e,wh(n,arguments))},s=OT(0,i.length-n.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(r=Function("binder","return function ("+AT(a,",")+"){ return binder.apply(this,arguments); }")(o),i.prototype){var l=function(){};l.prototype=i.prototype,r.prototype=new l,l.prototype=null}return r}});var Pn=_((QN,Sh)=>{"use strict";var PT=Eh();Sh.exports=Function.prototype.bind||PT});var yo=_((eF,Oh)=>{"use strict";Oh.exports=Function.prototype.call});var dc=_((tF,Rh)=>{"use strict";Rh.exports=Function.prototype.apply});var Ah=_((iF,Th)=>{"use strict";Th.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ch=_((nF,Ph)=>{"use strict";var CT=Pn(),kT=dc(),IT=yo(),DT=Ah();Ph.exports=DT||CT.call(IT,kT)});var Ih=_((rF,kh)=>{"use strict";var jT=Pn(),NT=go(),FT=yo(),LT=Ch();kh.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new NT("a function is required");return LT(jT,FT,e)}});var Mh=_((oF,Lh)=>{"use strict";var MT=Ih(),Dh=cc(),Nh;try{Nh=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var fc=!!Nh&&Dh&&Dh(Object.prototype,"__proto__"),Fh=Object,jh=Fh.getPrototypeOf;Lh.exports=fc&&typeof fc.get=="function"?MT([fc.get]):typeof jh=="function"?function(e){return jh(e==null?e:Fh(e))}:!1});var Vh=_((sF,qh)=>{"use strict";var Bh=uc(),$h=pc(),Uh=Mh();qh.exports=Bh?function(e){return Bh(e)}:$h?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return $h(e)}:Uh?function(e){return Uh(e)}:null});var bo=_((aF,zh)=>{"use strict";var BT=Function.prototype.call,$T=Object.prototype.hasOwnProperty,UT=Pn();zh.exports=UT.call(BT,$T)});var Xh=_((cF,Yh)=>{"use strict";var V,qT=ac(),VT=Fm(),zT=Mm(),HT=$m(),GT=qm(),zi=zm(),Vi=go(),WT=Wm(),KT=Jm(),JT=Xm(),YT=Qm(),XT=th(),ZT=nh(),QT=oh(),eA=lh(),Kh=Function,mc=function(t){try{return Kh('"use strict"; return ('+t+").constructor;")()}catch{}},Cn=cc(),tA=mh(),hc=function(){throw new Vi},iA=Cn?function(){try{return arguments.callee,hc}catch{try{return Cn(arguments,"callee").get}catch{return hc}}}():hc,Ui=xh()(),ve=Vh(),nA=pc(),rA=uc(),Jh=dc(),kn=yo(),qi={},oA=typeof Uint8Array>"u"||!ve?V:ve(Uint8Array),ci={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?V:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?V:ArrayBuffer,"%ArrayIteratorPrototype%":Ui&&ve?ve([][Symbol.iterator]()):V,"%AsyncFromSyncIteratorPrototype%":V,"%AsyncFunction%":qi,"%AsyncGenerator%":qi,"%AsyncGeneratorFunction%":qi,"%AsyncIteratorPrototype%":qi,"%Atomics%":typeof Atomics>"u"?V:Atomics,"%BigInt%":typeof BigInt>"u"?V:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?V:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?V:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?V:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":VT,"%eval%":eval,"%EvalError%":zT,"%Float16Array%":typeof Float16Array>"u"?V:Float16Array,"%Float32Array%":typeof Float32Array>"u"?V:Float32Array,"%Float64Array%":typeof Float64Array>"u"?V:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?V:FinalizationRegistry,"%Function%":Kh,"%GeneratorFunction%":qi,"%Int8Array%":typeof Int8Array>"u"?V:Int8Array,"%Int16Array%":typeof Int16Array>"u"?V:Int16Array,"%Int32Array%":typeof Int32Array>"u"?V:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ui&&ve?ve(ve([][Symbol.iterator]())):V,"%JSON%":typeof JSON=="object"?JSON:V,"%Map%":typeof Map>"u"?V:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ui||!ve?V:ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":qT,"%Object.getOwnPropertyDescriptor%":Cn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?V:Promise,"%Proxy%":typeof Proxy>"u"?V:Proxy,"%RangeError%":HT,"%ReferenceError%":GT,"%Reflect%":typeof Reflect>"u"?V:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?V:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ui||!ve?V:ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?V:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ui&&ve?ve(""[Symbol.iterator]()):V,"%Symbol%":Ui?Symbol:V,"%SyntaxError%":zi,"%ThrowTypeError%":iA,"%TypedArray%":oA,"%TypeError%":Vi,"%Uint8Array%":typeof Uint8Array>"u"?V:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?V:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?V:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?V:Uint32Array,"%URIError%":WT,"%WeakMap%":typeof WeakMap>"u"?V:WeakMap,"%WeakRef%":typeof WeakRef>"u"?V:WeakRef,"%WeakSet%":typeof WeakSet>"u"?V:WeakSet,"%Function.prototype.call%":kn,"%Function.prototype.apply%":Jh,"%Object.defineProperty%":tA,"%Object.getPrototypeOf%":nA,"%Math.abs%":KT,"%Math.floor%":JT,"%Math.max%":YT,"%Math.min%":XT,"%Math.pow%":ZT,"%Math.round%":QT,"%Math.sign%":eA,"%Reflect.getPrototypeOf%":rA};if(ve)try{null.error}catch(t){Hh=ve(ve(t)),ci["%Error.prototype%"]=Hh}var Hh,sA=function t(e){var i;if(e==="%AsyncFunction%")i=mc("async function () {}");else if(e==="%GeneratorFunction%")i=mc("function* () {}");else if(e==="%AsyncGeneratorFunction%")i=mc("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(i=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var r=t("%AsyncGenerator%");r&&ve&&(i=ve(r.prototype))}return ci[e]=i,i},Gh={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},In=Pn(),wo=bo(),aA=In.call(kn,Array.prototype.concat),cA=In.call(Jh,Array.prototype.splice),Wh=In.call(kn,String.prototype.replace),_o=In.call(kn,String.prototype.slice),lA=In.call(kn,RegExp.prototype.exec),uA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,pA=/\\(\\)?/g,dA=function(e){var i=_o(e,0,1),n=_o(e,-1);if(i==="%"&&n!=="%")throw new zi("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&i!=="%")throw new zi("invalid intrinsic syntax, expected opening `%`");var r=[];return Wh(e,uA,function(o,s,a,c){r[r.length]=a?Wh(c,pA,"$1"):s||o}),r},fA=function(e,i){var n=e,r;if(wo(Gh,n)&&(r=Gh[n],n="%"+r[0]+"%"),wo(ci,n)){var o=ci[n];if(o===qi&&(o=sA(n)),typeof o>"u"&&!i)throw new Vi("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new zi("intrinsic "+e+" does not exist!")};Yh.exports=function(e,i){if(typeof e!="string"||e.length===0)throw new Vi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof i!="boolean")throw new Vi('"allowMissing" argument must be a boolean');if(lA(/^%?[^%]*%?$/,e)===null)throw new zi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=dA(e),r=n.length>0?n[0]:"",o=fA("%"+r+"%",i),s=o.name,a=o.value,c=!1,l=o.alias;l&&(r=l[0],cA(n,aA([0,1],l)));for(var u=1,p=!0;u<n.length;u+=1){var f=n[u],m=_o(f,0,1),d=_o(f,-1);if((m==='"'||m==="'"||m==="`"||d==='"'||d==="'"||d==="`")&&m!==d)throw new zi("property names with quotes must have matching quotes");if((f==="constructor"||!p)&&(c=!0),r+="."+f,s="%"+r+"%",wo(ci,s))a=ci[s];else if(a!=null){if(!(f in a)){if(!i)throw new Vi("base intrinsic for "+e+" exists, but the property is not available.");return}if(Cn&&u+1>=n.length){var g=Cn(a,f);p=!!g,p&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[f]}else p=wo(a,f),a=a[f];p&&!c&&(ci[s]=a)}}return a}});var Qh=_((lF,Zh)=>{"use strict";var mA=lc();Zh.exports=function(){return mA()&&!!Symbol.toStringTag}});var ig=_((uF,tg)=>{"use strict";var hA=Xh(),eg=hA("%Object.defineProperty%",!0),gA=Qh()(),vA=bo(),xA=go(),Eo=gA?Symbol.toStringTag:null;tg.exports=function(e,i){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,r=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof r<"u"&&typeof r!="boolean")throw new xA("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Eo&&(n||!vA(e,Eo))&&(eg?eg(e,Eo,{configurable:!r,enumerable:!1,value:i,writable:!1}):e[Eo]=i)}});var rg=_((pF,ng)=>{"use strict";ng.exports=function(t,e){return Object.keys(e).forEach(function(i){t[i]=t[i]||e[i]}),t}});var ag=_((dF,sg)=>{"use strict";var yc=um(),yA=R("util"),gc=R("path"),bA=R("http"),wA=R("https"),_A=R("url").parse,EA=R("fs"),SA=R("stream").Stream,OA=R("crypto"),vc=gm(),RA=Dm(),TA=ig(),Bt=bo(),xc=rg();function og(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function H(t){if(!(this instanceof H))return new H(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],yc.call(this),t=t||{};for(var e in t)this[e]=t[e]}yA.inherits(H,yc);H.LINE_BREAK=`\r
|
|
59
|
+
`;H.DEFAULT_CONTENT_TYPE="application/octet-stream";H.prototype.append=function(t,e,i){i=i||{},typeof i=="string"&&(i={filename:i});var n=yc.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,i),o=this._multiPartFooter();n(r),n(e),n(o),this._trackLength(r,e,i)};H.prototype._trackLength=function(t,e,i){var n=0;i.knownLength!=null?n+=Number(i.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+H.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Bt(e,"httpVersion"))&&!(e instanceof SA))&&(i.knownLength||this._valuesToMeasure.push(e))};H.prototype._lengthRetriever=function(t,e){Bt(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):EA.stat(t.path,function(i,n){if(i){e(i);return}var r=n.size-(t.start?t.start:0);e(null,r)}):Bt(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Bt(t,"httpModule")?(t.on("response",function(i){t.pause(),e(null,Number(i.headers["content-length"]))}),t.resume()):e("Unknown stream")};H.prototype._multiPartHeader=function(t,e,i){if(typeof i.header=="string")return i.header;var n=this._getContentDisposition(e,i),r=this._getContentType(e,i),o="",s={"Content-Disposition":["form-data",'name="'+og(t)+'"'].concat(n||[]),"Content-Type":[].concat(r||[])};typeof i.header=="object"&&xc(s,i.header);var a;for(var c in s)if(Bt(s,c)){if(a=s[c],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(o+=c+": "+a.join("; ")+H.LINE_BREAK)}return"--"+this.getBoundary()+H.LINE_BREAK+o+H.LINE_BREAK};H.prototype._getContentDisposition=function(t,e){var i;if(typeof e.filepath=="string"?i=gc.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?i=gc.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Bt(t,"httpVersion")&&(i=gc.basename(t.client._httpMessage.path||"")),i)return'filename="'+og(i)+'"'};H.prototype._getContentType=function(t,e){var i=e.contentType;return!i&&t&&t.name&&(i=vc.lookup(t.name)),!i&&t&&t.path&&(i=vc.lookup(t.path)),!i&&t&&t.readable&&Bt(t,"httpVersion")&&(i=t.headers["content-type"]),!i&&(e.filepath||e.filename)&&(i=vc.lookup(e.filepath||e.filename)),!i&&t&&typeof t=="object"&&(i=H.DEFAULT_CONTENT_TYPE),i};H.prototype._multiPartFooter=function(){return function(t){var e=H.LINE_BREAK,i=this._streams.length===0;i&&(e+=this._lastBoundary()),t(e)}.bind(this)};H.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+H.LINE_BREAK};H.prototype.getHeaders=function(t){var e,i={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Bt(t,e)&&(i[e.toLowerCase()]=t[e]);return i};H.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};H.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};H.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),i=0,n=this._streams.length;i<n;i++)typeof this._streams[i]!="function"&&(Buffer.isBuffer(this._streams[i])?t=Buffer.concat([t,this._streams[i]]):t=Buffer.concat([t,Buffer.from(this._streams[i])]),(typeof this._streams[i]!="string"||this._streams[i].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(H.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};H.prototype._generateBoundary=function(){this._boundary="--------------------------"+OA.randomBytes(12).toString("hex")};H.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};H.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};H.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}RA.parallel(this._valuesToMeasure,this._lengthRetriever,function(i,n){if(i){t(i);return}n.forEach(function(r){e+=r}),t(null,e)})};H.prototype.submit=function(t,e){var i,n,r={method:"post"};return typeof t=="string"?(t=_A(t),n=xc({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(n=xc(t,r),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?i=wA.request(n):i=bA.request(n),this.getLength(function(o,s){if(o&&o!=="Unknown stream"){this._error(o);return}if(s&&i.setHeader("Content-Length",s),this.pipe(i),e){var a,c=function(l,u){return i.removeListener("error",c),i.removeListener("response",a),e.call(this,l,u)};a=c.bind(this,null),i.on("error",c),i.on("response",a)}}.bind(this)),i};H.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};H.prototype.toString=function(){return"[object FormData]"};TA(H.prototype,"FormData");sg.exports=H});var cg,So,bc=A(()=>{cg=Ee(ag(),1),So=cg.default});function _c(t){return h.isPlainObject(t)||h.isArray(t)}function lg(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function wc(t,e,i){return t?t.concat(e).map(function(r,o){return r=lg(r),!i&&o?"["+r+"]":r}).join(i?".":""):e}function AA(t){return h.isArray(t)&&!t.some(_c)}function CA(t,e,i){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new(So||FormData),i=h.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,w){return!h.isUndefined(w[y])});let n=i.metaTokens,r=i.visitor||d,o=i.dots,s=i.indexes,a=i.Blob||typeof Blob<"u"&&Blob,c=i.maxDepth===void 0?Ec:i.maxDepth,l=a&&h.isSpecCompliantForm(e),u=[];if(!h.isFunction(r))throw new TypeError("visitor must be a function");function p(x){if(x===null)return"";if(h.isDate(x))return x.toISOString();if(h.isBoolean(x))return x.toString();if(!l&&h.isBlob(x))throw new E("Blob is not supported. Use a Buffer instead.");if(h.isArrayBuffer(x)||h.isTypedArray(x)){if(l&&typeof a=="function")return new a([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new E("Blob is not supported. Use a Buffer instead.",E.ERR_NOT_SUPPORT)}return x}function f(x){if(x>c)throw new E("Object is too deeply nested ("+x+" levels). Max depth: "+c,E.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(x,y){if(c===1/0)return JSON.stringify(x);let w=[];return JSON.stringify(x,function(C,k){if(!h.isObject(k))return k;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(k),f(y+w.length-1),k})}function d(x,y,w){let O=x;if(h.isReactNative(e)&&h.isReactNativeBlob(x))return e.append(wc(w,y,o),p(x)),!1;if(x&&!w&&typeof x=="object"){if(h.endsWith(y,"{}"))y=n?y:y.slice(0,-2),x=m(x,1);else if(h.isArray(x)&&AA(x)||(h.isFileList(x)||h.endsWith(y,"[]"))&&(O=h.toArray(x)))return y=lg(y),O.forEach(function(k,N){!(h.isUndefined(k)||k===null)&&e.append(s===!0?wc([y],N,o):s===null?y:y+"[]",p(k))}),!1}return _c(x)?!0:(e.append(wc(w,y,o),p(x)),!1)}let g=Object.assign(PA,{defaultVisitor:d,convertValue:p,isVisitable:_c});function v(x,y,w=0){if(!h.isUndefined(x)){if(f(w),u.indexOf(x)!==-1)throw new Error("Circular reference detected in "+y.join("."));u.push(x),h.forEach(x,function(C,k){(!(h.isUndefined(C)||C===null)&&r.call(e,C,h.isString(k)?k.trim():k,y,g))===!0&&v(C,y?y.concat(k):[k],w+1)}),u.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return v(t),e}var Ec,PA,$t,Hi=A(()=>{"use strict";X();Pe();bc();Ec=100;PA=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});$t=CA});function ug(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(n){return e[n]})}function pg(t,e){this._pairs=[],t&&$t(t,this,e)}var dg,fg,mg=A(()=>{"use strict";Hi();dg=pg.prototype;dg.append=function(e,i){this._pairs.push([e,i])};dg.toString=function(e){let i=e?n=>e.call(this,n,ug):ug;return this._pairs.map(function(r){return i(r[0])+"="+i(r[1])},"").join("&")};fg=pg});function kA(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function li(t,e,i){if(!e)return t;t=t||"";let n=h.isFunction(i)?{serialize:i}:i,r=h.getSafeProp(n,"encode")||kA,o=h.getSafeProp(n,"serialize"),s;if(o?s=o(e,n):s=h.isURLSearchParams(e)?e.toString():new fg(e,n).toString(r),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Oo=A(()=>{"use strict";X();mg()});var Sc,Oc,hg=A(()=>{"use strict";X();Sc=class{constructor(){this.handlers=[]}use(e,i,n){return this.handlers.push({fulfilled:e,rejected:i,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(n){n!==null&&e(n)})}},Oc=Sc});var Ut,Dn=A(()=>{"use strict";Ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import IA from"url";var gg,vg=A(()=>{"use strict";gg=IA.URLSearchParams});import DA from"crypto";var Rc,xg,yg,jA,bg,wg=A(()=>{vg();bc();Rc="abcdefghijklmnopqrstuvwxyz",xg="0123456789",yg={DIGIT:xg,ALPHA:Rc,ALPHA_DIGIT:Rc+Rc.toUpperCase()+xg},jA=(t=16,e=yg.ALPHA_DIGIT)=>{let i="",{length:n}=e,r=new Uint32Array(t);DA.randomFillSync(r);for(let o=0;o<t;o++)i+=e[r[o]%n];return i},bg={isNode:!0,classes:{URLSearchParams:gg,FormData:So,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:yg,generateString:jA,protocols:["http","https","file","data"]}});var Pc={};ls(Pc,{hasBrowserEnv:()=>Ac,hasStandardBrowserEnv:()=>NA,hasStandardBrowserWebWorkerEnv:()=>FA,navigator:()=>Tc,origin:()=>LA});var Ac,Tc,NA,FA,LA,_g=A(()=>{Ac=typeof window<"u"&&typeof document<"u",Tc=typeof navigator=="object"&&navigator||void 0,NA=Ac&&(!Tc||["ReactNative","NativeScript","NS"].indexOf(Tc.product)<0),FA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LA=Ac&&window.location.href||"http://localhost"});var K,lt=A(()=>{wg();_g();K={...Pc,...bg}});function Cc(t,e){return $t(t,new K.classes.URLSearchParams,{visitor:function(i,n,r,o){return K.isNode&&h.isBuffer(i)?(this.append(n,i.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}var Eg=A(()=>{"use strict";X();Hi();lt()});function Og(t){if(t>Sg)throw new E("FormData field is too deeply nested ("+t+" levels). Max depth: "+Sg,E.ERR_FORM_DATA_DEPTH_EXCEEDED)}function MA(t){let e=[],i=/\w+|\[(\w*)]/g,n;for(;(n=i.exec(t))!==null;)Og(e.length),e.push(n[0]==="[]"?"":n[1]||n[0]);return e}function BA(t){let e={},i=Object.keys(t),n,r=i.length,o;for(n=0;n<r;n++)o=i[n],e[o]=t[o];return e}function $A(t){function e(i,n,r,o){Og(o);let s=i[o++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=o>=i.length;return s=!s&&h.isArray(r)?r.length:s,c?(h.hasOwnProp(r,s)?r[s]=h.isArray(r[s])?r[s].concat(n):[r[s],n]:r[s]=n,!a):((!h.hasOwnProp(r,s)||!h.isObject(r[s]))&&(r[s]=[]),e(i,n,r[s],o)&&h.isArray(r[s])&&(r[s]=BA(r[s])),!a)}if(h.isFormData(t)&&h.isFunction(t.entries)){let i={};return h.forEachEntry(t,(n,r)=>{e(MA(n),r,i,0)}),i}return null}var Sg,Ro,kc=A(()=>{"use strict";X();Pe();Hi();Sg=Ec;Ro=$A});function UA(t,e,i){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(i||JSON.stringify)(t)}var Gi,Ic,Wi,To=A(()=>{"use strict";X();Pe();Dn();Hi();Eg();lt();kc();Gi=(t,e)=>t!=null&&h.hasOwnProp(t,e)?t[e]:void 0;Ic={transitional:Ut,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){let n=i.getContentType()||"",r=n.indexOf("application/json")>-1,o=h.isObject(e);if(o&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r?JSON.stringify(Ro(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e)||h.isReadableStream(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){let c=Gi(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Cc(e,c).toString();if((a=h.isFileList(e))||n.indexOf("multipart/form-data")>-1){let l=Gi(this,"env"),u=l&&l.FormData;return $t(a?{"files[]":e}:e,u&&new u,c)}}return o||r?(i.setContentType("application/json",!1),UA(e)):e}],transformResponse:[function(e){let i=Gi(this,"transitional")||Ic.transitional,n=i&&i.forcedJSONParsing,r=Gi(this,"responseType"),o=r==="json";if(h.isResponse(e)||h.isReadableStream(e))return e;if(e&&h.isString(e)&&(n&&!r||o)){let a=!(i&&i.silentJSONParsing)&&o;try{return JSON.parse(e,Gi(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?E.from(c,E.ERR_BAD_RESPONSE,this,null,Gi(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:K.classes.FormData,Blob:K.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch","query"],t=>{Ic.headers[t]={}});Wi=Ic});function jn(t,e){let i=this||Wi,n=e||i,r=Q.from(n.headers),o=n.data;return h.forEach(t,function(a){o=a.call(i,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}var Rg=A(()=>{"use strict";X();To();at()});function Nn(t){return!!(t&&t.e)}var Dc=A(()=>{"use strict"});var jc,qe,ui=A(()=>{"use strict";Pe();jc=class extends E{constructor(e,i,n){super(e??"canceled",E.ERR_CANCELED,i,n),this.name="CanceledError",this.e=!0}},qe=jc});function wt(t,e,i){let n=i.config.validateStatus;!i.status||!n||n(i.status)?t(i):e(new E("Request failed with status code "+i.status,i.status>=400&&i.status<500?E.ERR_BAD_REQUEST:E.ERR_BAD_RESPONSE,i.config,i.request,i))}var Ao=A(()=>{"use strict";Pe()});function Nc(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}var Tg=A(()=>{"use strict"});function Fc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var Ag=A(()=>{"use strict"});function zA(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function HA(t){return zA(t).replace(VA,"")}function Pg(t,e){if(typeof t=="string"&&qA.test(HA(t)))throw new E('Invalid URL: missing "//" after protocol',E.ERR_INVALID_URL,e)}function pi(t,e,i,n){Pg(e,n);let r=!Nc(e);return t&&(r||i===!1)?(Pg(t,n),Fc(t,e)):e}var qA,VA,Po=A(()=>{"use strict";Pe();Tg();Ag();qA=/^https?:(?!\/\/)/i,VA=/[\t\n\r]/g});function WA(t){try{return new URL(t)}catch{return null}}function Cg(t){var e=(typeof t=="string"?WA(t):t)||{},i=e.protocol,n=e.host,r=e.port;if(typeof n!="string"||!n||typeof i!="string"||(i=i.split(":",1)[0],n=n.replace(/:\d*$/,""),r=parseInt(r)||GA[i]||0,!KA(n,r)))return"";var o=Lc(i+"_proxy")||Lc("all_proxy");return o&&o.indexOf("://")===-1&&(o=i+"://"+o),o}function KA(t,e){var i=Lc("no_proxy").toLowerCase();return i?i==="*"?!1:i.split(/[,\s]/).every(function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),o=r?r[1]:n,s=r?parseInt(r[2]):0;return s&&s!==e?!0:/^[.*]/.test(o)?(o.charAt(0)==="*"&&(o=o.slice(1)),!t.endsWith(o)):t!==o}):!0}function Lc(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var GA,kg=A(()=>{"use strict";GA={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var Dg=_((dL,Ig)=>{var Ki=1e3,Ji=Ki*60,Yi=Ji*60,di=Yi*24,JA=di*7,YA=di*365.25;Ig.exports=function(t,e){e=e||{};var i=typeof t;if(i==="string"&&t.length>0)return XA(t);if(i==="number"&&isFinite(t))return e.long?QA(t):ZA(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function XA(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*YA;case"weeks":case"week":case"w":return i*JA;case"days":case"day":case"d":return i*di;case"hours":case"hour":case"hrs":case"hr":case"h":return i*Yi;case"minutes":case"minute":case"mins":case"min":case"m":return i*Ji;case"seconds":case"second":case"secs":case"sec":case"s":return i*Ki;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function ZA(t){var e=Math.abs(t);return e>=di?Math.round(t/di)+"d":e>=Yi?Math.round(t/Yi)+"h":e>=Ji?Math.round(t/Ji)+"m":e>=Ki?Math.round(t/Ki)+"s":t+"ms"}function QA(t){var e=Math.abs(t);return e>=di?Co(t,e,di,"day"):e>=Yi?Co(t,e,Yi,"hour"):e>=Ji?Co(t,e,Ji,"minute"):e>=Ki?Co(t,e,Ki,"second"):t+" ms"}function Co(t,e,i,n){var r=e>=i*1.5;return Math.round(t/i)+" "+n+(r?"s":"")}});var Mc=_((fL,jg)=>{function eP(t){i.debug=i,i.default=i,i.coerce=c,i.disable=s,i.enable=r,i.enabled=a,i.humanize=Dg(),i.destroy=l,Object.keys(t).forEach(u=>{i[u]=t[u]}),i.names=[],i.skips=[],i.formatters={};function e(u){let p=0;for(let f=0;f<u.length;f++)p=(p<<5)-p+u.charCodeAt(f),p|=0;return i.colors[Math.abs(p)%i.colors.length]}i.selectColor=e;function i(u){let p,f=null,m,d;function g(...v){if(!g.enabled)return;let x=g,y=Number(new Date),w=y-(p||y);x.diff=w,x.prev=p,x.curr=y,p=y,v[0]=i.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let O=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(k,N)=>{if(k==="%%")return"%";O++;let q=i.formatters[N];if(typeof q=="function"){let F=v[O];k=q.call(x,F),v.splice(O,1),O--}return k}),i.formatArgs.call(x,v),(x.log||i.log).apply(x,v)}return g.namespace=u,g.useColors=i.useColors(),g.color=i.selectColor(u),g.extend=n,g.destroy=i.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==i.namespaces&&(m=i.namespaces,d=i.enabled(u)),d),set:v=>{f=v}}),typeof i.init=="function"&&i.init(g),g}function n(u,p){let f=i(this.namespace+(typeof p>"u"?":":p)+u);return f.log=this.log,f}function r(u){i.save(u),i.namespaces=u,i.names=[],i.skips=[];let p=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of p)f[0]==="-"?i.skips.push(f.slice(1)):i.names.push(f)}function o(u,p){let f=0,m=0,d=-1,g=0;for(;f<u.length;)if(m<p.length&&(p[m]===u[f]||p[m]==="*"))p[m]==="*"?(d=m,g=f,m++):(f++,m++);else if(d!==-1)m=d+1,g++,f=g;else return!1;for(;m<p.length&&p[m]==="*";)m++;return m===p.length}function s(){let u=[...i.names,...i.skips.map(p=>"-"+p)].join(",");return i.enable(""),u}function a(u){for(let p of i.skips)if(o(u,p))return!1;for(let p of i.names)if(o(u,p))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return i.enable(i.load()),i}jg.exports=eP});var Ng=_((Ne,ko)=>{Ne.formatArgs=iP;Ne.save=nP;Ne.load=rP;Ne.useColors=tP;Ne.storage=oP();Ne.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ne.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function tP(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function iP(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ko.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let i=0,n=0;t[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(i++,r==="%c"&&(n=i))}),t.splice(n,0,e)}Ne.log=console.debug||console.log||(()=>{});function nP(t){try{t?Ne.storage.setItem("debug",t):Ne.storage.removeItem("debug")}catch{}}function rP(){let t;try{t=Ne.storage.getItem("debug")||Ne.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function oP(){try{return localStorage}catch{}}ko.exports=Mc()(Ne);var{formatters:sP}=ko.exports;sP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Lg=_((mL,Fg)=>{"use strict";Fg.exports=(t,e=process.argv)=>{let i=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(i+t),r=e.indexOf("--");return n!==-1&&(r===-1||n<r)}});var $g=_((hL,Bg)=>{"use strict";var aP=R("os"),Mg=R("tty"),Ye=Lg(),{env:xe}=process,qt;Ye("no-color")||Ye("no-colors")||Ye("color=false")||Ye("color=never")?qt=0:(Ye("color")||Ye("colors")||Ye("color=true")||Ye("color=always"))&&(qt=1);"FORCE_COLOR"in xe&&(xe.FORCE_COLOR==="true"?qt=1:xe.FORCE_COLOR==="false"?qt=0:qt=xe.FORCE_COLOR.length===0?1:Math.min(parseInt(xe.FORCE_COLOR,10),3));function Bc(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function $c(t,e){if(qt===0)return 0;if(Ye("color=16m")||Ye("color=full")||Ye("color=truecolor"))return 3;if(Ye("color=256"))return 2;if(t&&!e&&qt===void 0)return 0;let i=qt||0;if(xe.TERM==="dumb")return i;if(process.platform==="win32"){let n=aP.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in xe)||xe.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xe.TEAMCITY_VERSION)?1:0;if(xe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xe){let n=parseInt((xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xe.TERM)||"COLORTERM"in xe?1:i}function cP(t){let e=$c(t,t&&t.isTTY);return Bc(e)}Bg.exports={supportsColor:cP,stdout:Bc($c(!0,Mg.isatty(1))),stderr:Bc($c(!0,Mg.isatty(2)))}});var qg=_((ye,Do)=>{var lP=R("tty"),Io=R("util");ye.init=gP;ye.log=fP;ye.formatArgs=pP;ye.save=mP;ye.load=hP;ye.useColors=uP;ye.destroy=Io.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ye.colors=[6,2,3,4,5,1];try{let t=$g();t&&(t.stderr||t).level>=2&&(ye.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ye.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let i=e.substring(6).toLowerCase().replace(/_([a-z])/g,(r,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[i]=n,t},{});function uP(){return"colors"in ye.inspectOpts?!!ye.inspectOpts.colors:lP.isatty(process.stderr.fd)}function pP(t){let{namespace:e,useColors:i}=this;if(i){let n=this.color,r="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${r};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
|
|
60
|
+
`).join(`
|
|
61
|
+
`+o),t.push(r+"m+"+Do.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=dP()+e+" "+t[0]}function dP(){return ye.inspectOpts.hideDate?"":new Date().toISOString()+" "}function fP(...t){return process.stderr.write(Io.formatWithOptions(ye.inspectOpts,...t)+`
|
|
62
|
+
`)}function mP(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function hP(){return process.env.DEBUG}function gP(t){t.inspectOpts={};let e=Object.keys(ye.inspectOpts);for(let i=0;i<e.length;i++)t.inspectOpts[e[i]]=ye.inspectOpts[e[i]]}Do.exports=Mc()(ye);var{formatters:Ug}=Do.exports;Ug.o=function(t){return this.inspectOpts.colors=this.useColors,Io.inspect(t,this.inspectOpts).split(`
|
|
63
|
+
`).map(e=>e.trim()).join(" ")};Ug.O=function(t){return this.inspectOpts.colors=this.useColors,Io.inspect(t,this.inspectOpts)}});var fi=_((gL,Uc)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Uc.exports=Ng():Uc.exports=qg()});var Vg=_(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});function vP(t){return function(e,i){return new Promise((n,r)=>{t.call(this,e,i,(o,s)=>{o?r(o):n(s)})})}}qc.default=vP});var Gg=_((zc,Hg)=>{"use strict";var zg=zc&&zc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},xP=R("events"),yP=zg(fi()),bP=zg(Vg()),Fn=yP.default("agent-base");function wP(t){return!!t&&typeof t.addRequest=="function"}function Vc(){let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
64
|
+
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function jo(t,e){return new jo.Agent(t,e)}(function(t){class e extends xP.EventEmitter{constructor(n,r){super();let o=r;typeof n=="function"?this.callback=n:n&&(o=n),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:Vc()?443:80}set defaultPort(n){this.explicitDefaultPort=n}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:Vc()?"https:":"http:"}set protocol(n){this.explicitProtocol=n}callback(n,r,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(n,r){let o=Object.assign({},r);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=Vc()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,n._last=!0,n.shouldKeepAlive=!1;let s=!1,a=null,c=o.timeout||this.timeout,l=m=>{n._hadError||(n.emit("error",m),n._hadError=!0)},u=()=>{a=null,s=!0;let m=new Error(`A "socket" was not created for HTTP request before ${c}ms`);m.code="ETIMEOUT",l(m)},p=m=>{s||(a!==null&&(clearTimeout(a),a=null),l(m))},f=m=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),wP(m)){Fn("Callback returned another Agent instance %o",m.constructor.name),m.addRequest(n,o);return}if(m){m.once("free",()=>{this.freeSocket(m,o)}),n.onSocket(m);return}let d=new Error(`no Duplex stream was returned to agent-base for \`${n.method} ${n.path}\``);l(d)};if(typeof this.callback!="function"){l(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Fn("Converting legacy callback function to promise"),this.promisifiedCallback=bP.default(this.callback)):this.promisifiedCallback=this.callback),typeof c=="number"&&c>0&&(a=setTimeout(u,c)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{Fn("Resolving socket for %o request: %o",o.protocol,`${n.method} ${n.path}`),Promise.resolve(this.promisifiedCallback(n,o)).then(f,p)}catch(m){Promise.reject(m).catch(p)}}freeSocket(n,r){Fn("Freeing socket %o %o",n.constructor.name,r),n.destroy()}destroy(){Fn("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(jo||(jo={}));Hg.exports=jo});var Wg=_(Mn=>{"use strict";var _P=Mn&&Mn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mn,"__esModule",{value:!0});var EP=_P(fi()),Ln=EP.default("https-proxy-agent:parse-proxy-response");function SP(t){return new Promise((e,i)=>{let n=0,r=[];function o(){let p=t.read();p?u(p):t.once("readable",o)}function s(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",a),t.removeListener("readable",o)}function a(p){Ln("onclose had error %o",p)}function c(){Ln("onend")}function l(p){s(),Ln("onerror %o",p),i(p)}function u(p){r.push(p),n+=p.length;let f=Buffer.concat(r,n);if(f.indexOf(`\r
|
|
65
|
+
\r
|
|
66
|
+
`)===-1){Ln("have not received end of HTTP headers yet..."),o();return}let d=f.toString("ascii",0,f.indexOf(`\r
|
|
67
|
+
`)),g=+d.split(" ")[1];Ln("got proxy server response: %o",d),e({statusCode:g,buffered:f})}t.on("error",l),t.on("close",a),t.on("end",c),o()})}Mn.default=SP});var Yg=_(mi=>{"use strict";var OP=mi&&mi.__awaiter||function(t,e,i,n){function r(o){return o instanceof i?o:new i(function(s){s(o)})}return new(i||(i=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?o(u.value):r(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},Xi=mi&&mi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mi,"__esModule",{value:!0});var Kg=Xi(R("net")),Jg=Xi(R("tls")),RP=Xi(R("url")),TP=Xi(R("assert")),AP=Xi(fi()),PP=Gg(),CP=Xi(Wg()),Bn=AP.default("https-proxy-agent:agent"),Hc=class extends PP.Agent{constructor(e){let i;if(typeof e=="string"?i=RP.default.parse(e):i=e,!i)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Bn("creating new HttpsProxyAgent instance: %o",i),super(i);let n=Object.assign({},i);this.secureProxy=i.secureProxy||DP(n.protocol),n.host=n.hostname||n.host,typeof n.port=="string"&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,i){return OP(this,void 0,void 0,function*(){let{proxy:n,secureProxy:r}=this,o;r?(Bn("Creating `tls.Socket`: %o",n),o=Jg.default.connect(n)):(Bn("Creating `net.Socket`: %o",n),o=Kg.default.connect(n));let s=Object.assign({},n.headers),c=`CONNECT ${`${i.host}:${i.port}`} HTTP/1.1\r
|
|
68
|
+
`;n.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:u,secureEndpoint:p}=i;IP(u,p)||(l+=`:${u}`),s.Host=l,s.Connection="close";for(let v of Object.keys(s))c+=`${v}: ${s[v]}\r
|
|
69
|
+
`;let f=CP.default(o);o.write(`${c}\r
|
|
70
|
+
`);let{statusCode:m,buffered:d}=yield f;if(m===200){if(e.once("socket",kP),i.secureEndpoint){Bn("Upgrading socket connection to TLS");let v=i.servername||i.host;return Jg.default.connect(Object.assign(Object.assign({},jP(i,"host","hostname","path","port")),{socket:o,servername:v}))}return o}o.destroy();let g=new Kg.default.Socket({writable:!1});return g.readable=!0,e.once("socket",v=>{Bn("replaying proxy buffer for failed request"),TP.default(v.listenerCount("data")>0),v.push(d),v.push(null)}),g})}};mi.default=Hc;function kP(t){t.resume()}function IP(t,e){return!!(!e&&t===80||e&&t===443)}function DP(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function jP(t,...e){let i={},n;for(n in t)e.includes(n)||(i[n]=t[n]);return i}});var Zg=_((Kc,Xg)=>{"use strict";var NP=Kc&&Kc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Gc=NP(Yg());function Wc(t){return new Gc.default(t)}(function(t){t.HttpsProxyAgent=Gc.default,t.prototype=Gc.default.prototype})(Wc||(Wc={}));Xg.exports=Wc});var ev=_((bL,Qg)=>{var $n;Qg.exports=function(){if(!$n){try{$n=fi()("follow-redirects")}catch{}typeof $n!="function"&&($n=function(){})}$n.apply(null,arguments)}});var ov=_((wL,sl)=>{var qn=R("url"),Un=qn.URL,FP=R("http"),LP=R("https"),Qc=R("stream").Writable,el=R("assert"),tv=ev();(function(){var e=typeof process<"u",i=typeof window<"u"&&typeof document<"u",n=gi(Error.captureStackTrace);!e&&(i||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var tl=!1;try{el(new Un(""))}catch(t){tl=t.code==="ERR_INVALID_URL"}var MP=["Authorization","Proxy-Authorization","Cookie"],BP=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],il=["abort","aborted","connect","error","socket","timeout"],nl=Object.create(null);il.forEach(function(t){nl[t]=function(e,i,n){this._redirectable.emit(t,e,i,n)}});var Yc=Vn("ERR_INVALID_URL","Invalid URL",TypeError),Xc=Vn("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),$P=Vn("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Xc),UP=Vn("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),qP=Vn("ERR_STREAM_WRITE_AFTER_END","write after end"),VP=Qc.prototype.destroy||nv;function Fe(t,e){Qc.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var i=this;this._onNativeResponse=function(n){try{i._processResponse(n)}catch(r){i.emit("error",r instanceof Xc?r:new Xc({cause:r}))}},this._headerFilter=new RegExp("^(?:"+MP.concat(t.sensitiveHeaders).map(JP).join("|")+")$","i"),this._performRequest()}Fe.prototype=Object.create(Qc.prototype);Fe.prototype.abort=function(){ol(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Fe.prototype.destroy=function(t){return ol(this._currentRequest,t),VP.call(this,t),this};Fe.prototype.write=function(t,e,i){if(this._ending)throw new qP;if(!hi(t)&&!WP(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(gi(e)&&(i=e,e=null),t.length===0){i&&i();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,i)):(this.emit("error",new UP),this.abort())};Fe.prototype.end=function(t,e,i){if(gi(t)?(i=t,t=e=null):gi(e)&&(i=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,i);else{var n=this,r=this._currentRequest;this.write(t,e,function(){n._ended=!0,r.end(null,null,i)}),this._ending=!0}};Fe.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Fe.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Fe.prototype.setTimeout=function(t,e){var i=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function r(s){i._timeout&&clearTimeout(i._timeout),i._timeout=setTimeout(function(){i.emit("timeout"),o()},t),n(s)}function o(){i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i.removeListener("abort",o),i.removeListener("error",o),i.removeListener("response",o),i.removeListener("close",o),e&&i.removeListener("timeout",e),i.socket||i._currentRequest.removeListener("socket",r)}return e&&this.on("timeout",e),this.socket?r(this.socket):this._currentRequest.once("socket",r),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Fe.prototype[t]=function(e,i){return this._currentRequest[t](e,i)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Fe.prototype,t,{get:function(){return this._currentRequest[t]}})});Fe.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),GP(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};Fe.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var i=t.slice(0,-1);this._options.agent=this._options.agents[i]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var r of il)n.on(r,nl[r]);if(this._currentUrl=/^\//.test(this._options.path)?qn.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(l){if(n===s._currentRequest)if(l)s.emit("error",l);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};Fe.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var i=t.headers.location;if(!i||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(ol(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new $P;var n,r=this._options.beforeRedirect;r&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Jc(/^content-/i,this._options.headers));var s=Jc(/^host$/i,this._options.headers),a=rl(this._currentUrl),c=s||a.host,l=/^\w+:/.test(i)?this._currentUrl:qn.format(Object.assign(a,{host:c})),u=zP(i,l);if(tv("redirecting to",u.href),this._isRedirect=!0,Zc(u,this._options),(u.protocol!==a.protocol&&u.protocol!=="https:"||u.host!==c&&!HP(u.host,c))&&Jc(this._headerFilter,this._options.headers),gi(r)){var p={headers:t.headers,statusCode:e},f={url:l,method:o,headers:n};r(this._options,p,f),this._sanitizeOptions(this._options)}this._performRequest()};function iv(t){var e={maxRedirects:21,maxBodyLength:10485760},i={};return Object.keys(t).forEach(function(n){var r=n+":",o=i[r]=t[n],s=e[n]=Object.create(o);function a(l,u,p){return KP(l)?l=Zc(l):hi(l)?l=Zc(rl(l)):(p=u,u=rv(l),l={protocol:r}),gi(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,u),u.nativeProtocols=i,!hi(u.host)&&!hi(u.hostname)&&(u.hostname="::1"),el.equal(u.protocol,r,"protocol mismatch"),tv("options",u),new Fe(u,p)}function c(l,u,p){var f=s.request(l,u,p);return f.end(),f}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function nv(){}function rl(t){var e;if(tl)e=new Un(t);else if(e=rv(qn.parse(t)),!hi(e.protocol))throw new Yc({input:t});return e}function zP(t,e){return tl?new Un(t,e):rl(qn.resolve(e,t))}function rv(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Yc({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Yc({input:t.href||t});return t}function Zc(t,e){var i=e||{};for(var n of BP)i[n]=t[n];return i.hostname.startsWith("[")&&(i.hostname=i.hostname.slice(1,-1)),i.port!==""&&(i.port=Number(i.port)),i.path=i.search?i.pathname+i.search:i.pathname,i}function Jc(t,e){var i;for(var n in e)t.test(n)&&(i=e[n],delete e[n]);return i===null||typeof i>"u"?void 0:String(i).trim()}function Vn(t,e,i){function n(r){gi(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(i||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),n}function ol(t,e){for(var i of il)t.removeListener(i,nl[i]);t.on("error",nv),t.destroy(e)}function HP(t,e){el(hi(t)&&hi(e));var i=t.length-e.length-1;return i>0&&t[i]==="."&&t.endsWith(e)}function GP(t){return t instanceof Array}function hi(t){return typeof t=="string"||t instanceof String}function gi(t){return typeof t=="function"}function WP(t){return typeof t=="object"&&"length"in t}function KP(t){return Un&&t instanceof Un}function JP(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}sl.exports=iv({http:FP,https:LP});sl.exports.wrap=iv});var kt,zn=A(()=>{kt="1.18.1"});function Hn(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var al=A(()=>{"use strict"});function cl(t,e,i){let n=i&&i.Blob||K.classes.Blob,r=Hn(t);if(e===void 0&&n&&(e=!0),r==="data"){t=r.length?t.slice(r.length+1):t;let o=YP.exec(t);if(!o)throw new E("Invalid URL",E.ERR_INVALID_URL);let s=o[1],a=o[2],c=o[3]?"base64":"utf8",l=o[4],u="";s?u=a?s+a:s:a&&(u="text/plain"+a);let p=c==="base64"?Buffer.from(l,"base64"):Buffer.from(decodeURIComponent(l),c);if(e){if(!n)throw new E("Blob is not supported",E.ERR_NOT_SUPPORT);return new n([p],{type:u})}return p}throw new E("Unsupported protocol "+r,E.ERR_NOT_SUPPORT)}var YP,sv=A(()=>{"use strict";Pe();al();lt();YP=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import XP from"stream";var ll,ul,pl,av=A(()=>{"use strict";X();ll=Symbol("internals"),ul=class extends XP.Transform{constructor(e){e=h.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,r)=>!h.isUndefined(r[n])),super({readableHighWaterMark:e.chunkSize});let i=this[ll]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(i.isCaptured||(i.isCaptured=!0))})}_read(e){let i=this[ll];return i.onReadCallback&&i.onReadCallback(),super._read(e)}_transform(e,i,n){let r=this[ll],o=r.maxRate,s=this.readableHighWaterMark,a=r.timeWindow,c=1e3/a,l=o/c,u=r.minChunkSize!==!1?Math.max(r.minChunkSize,l*.01):0,p=(m,d)=>{let g=Buffer.byteLength(m);r.bytesSeen+=g,r.bytes+=g,r.isCaptured&&this.emit("progress",r.bytesSeen),this.push(m)?process.nextTick(d):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(d)}},f=(m,d)=>{let g=Buffer.byteLength(m),v=null,x=s,y,w=0;if(o){let O=Date.now();(!r.ts||(w=O-r.ts)>=a)&&(r.ts=O,y=l-r.bytes,r.bytes=y<0?-y:0,w=0),y=l-r.bytes}if(o){if(y<=0)return setTimeout(()=>{d(null,m)},a-w);y<x&&(x=y)}x&&g>x&&g-x>u&&(v=m.subarray(x),m=m.subarray(0,x)),p(m,v?()=>{process.nextTick(d,null,v)}:d)};f(e,function m(d,g){if(d)return n(d);g?f(g,m):n(null)})}},pl=ul});var cv,ZP,No,dl=A(()=>{({asyncIterator:cv}=Symbol),ZP=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[cv]?yield*t[cv]():yield t},No=ZP});import QP from"util";import{Readable as eC}from"stream";var tC,Gn,vi,iC,nC,fl,rC,lv,uv=A(()=>{X();dl();lt();tC=K.ALPHABET.ALPHA_DIGIT+"-_",Gn=typeof TextEncoder=="function"?new TextEncoder:new QP.TextEncoder,vi=`\r
|
|
71
|
+
`,iC=Gn.encode(vi),nC=2,fl=class{constructor(e,i){let{escapeName:n}=this.constructor,r=h.isString(i),o=`Content-Disposition: form-data; name="${n(e)}"${!r&&i.name?`; filename="${n(i.name)}"`:""}${vi}`;if(r)i=Gn.encode(String(i).replace(/\r?\n|\r\n?/g,vi));else{let s=String(i.type||"application/octet-stream").replace(/[\r\n]/g,"");o+=`Content-Type: ${s}${vi}`}this.headers=Gn.encode(o+vi),this.contentLength=r?i.byteLength:i.size,this.size=this.headers.byteLength+this.contentLength+nC,this.name=e,this.value=i}async*encode(){yield this.headers;let{value:e}=this;h.isTypedArray(e)?yield e:yield*No(e),yield iC}static escapeName(e){return String(e).replace(/[\r\n"]/g,i=>({"\r":"%0D","\n":"%0A",'"':"%22"})[i])}},rC=(t,e,i)=>{let{tag:n="form-data-boundary",size:r=25,boundary:o=n+"-"+K.generateString(r,tC)}=i||{};if(!h.isFormData(t))throw new TypeError("FormData instance required");if(o.length<1||o.length>70)throw new Error("boundary must be 1-70 characters long");let s=Gn.encode("--"+o+vi),a=Gn.encode("--"+o+"--"+vi),c=a.byteLength,l=Array.from(t.entries()).map(([p,f])=>{let m=new fl(p,f);return c+=m.size,m});c+=s.byteLength*l.length,c=h.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(u["Content-Length"]=c),e&&e(u),eC.from(async function*(){for(let p of l)yield s,yield*p.encode();yield a}())},lv=rC});import oC from"stream";var ml,pv,dv=A(()=>{"use strict";ml=class extends oC.Transform{__transform(e,i,n){this.push(e),n()}_transform(e,i,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,i)}this.__transform(e,i,n)}},pv=ml});import sC from"http2";import aC from"util";var hl,fv,mv=A(()=>{"use strict";hl=class{constructor(){this.sessions=Object.create(null)}getSession(e,i){i=Object.assign({sessionTimeout:1e3},i);let n=this.sessions[e];if(n){let p=n.length;for(let f=0;f<p;f++){let[m,d]=n[f];if(!m.destroyed&&!m.closed&&aC.isDeepStrictEqual(d,i))return m}}let r=sC.connect(e,i),o,s,a=()=>{if(o)return;o=!0,s&&(clearTimeout(s),s=null);let p=n,f=p.length,m=f;for(;m--;)if(p[m][0]===r){f===1?delete this.sessions[e]:p.splice(m,1),r.closed||r.close();return}},c=r.request,{sessionTimeout:l}=i;if(l!=null){let p=0;r.request=function(){let f=c.apply(this,arguments);return p++,s&&(clearTimeout(s),s=null),f.once("close",()=>{--p||(s=setTimeout(()=>{s=null,a()},l))}),f}}r.once("close",a);let u=[r,i];return n?n.push(u):n=this.sessions[e]=[u],r}},fv=hl});var cC,hv,gv=A(()=>{X();cC=(t,e)=>h.isAsyncFn(t)?function(...i){let n=i.pop();t.apply(this,i).then(r=>{try{e?n(null,...e(r)):n(null,r)}catch(o){n(o)}},n)}:t,hv=cC});function vl(t){let e;try{e=new URL(t)}catch{return!1}let i=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!i)return!1;if(i==="*")return!0;let n=Number.parseInt(e.port,10)||dC[e.protocol.split(":",1)[0]]||0,r=xv(e.hostname.toLowerCase());return i.split(/[\s,]+/).some(o=>{if(!o)return!1;let[s,a]=fC(o);return s=xv(s),!s||a&&a!==n?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?r.endsWith(s):r===s||vv(r)&&vv(s))})}var lC,yv,gl,uC,pC,vv,dC,fC,mC,hC,gC,xv,bv=A(()=>{lC=new Set(["localhost","0.0.0.0"]),yv=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(i=>/^\d+$/.test(i)&&Number(i)>=0&&Number(i)<=255)},gl=t=>/^0{1,4}$/.test(t),uC=t=>{if(t==="::")return!0;let e=t.indexOf("::");if(e!==-1){if(e!==t.lastIndexOf("::"))return!1;let n=t.slice(0,e),r=t.slice(e+2),o=n?n.split(":"):[],s=r?r.split(":"):[];return o.length+s.length<8&&o.every(gl)&&s.every(gl)}let i=t.split(":");return i.length===8&&i.every(gl)},pC=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return yv(e[1]);let i=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(i){let r=parseInt(i[1],16);return r>=32512&&r<=32767}let n=t.split(":");if(n.length===8){for(let r=0;r<7;r++)if(!/^0+$/.test(n[r]))return!1;return/^0*1$/.test(n[7])}return!1},vv=t=>t?lC.has(t)||yv(t)||uC(t)?!0:pC(t):!1,dC={http:80,https:443,ws:80,wss:443,ftp:21},fC=t=>{let e=t,i=0;if(e.charAt(0)==="["){let o=e.indexOf("]");if(o!==-1){let s=e.slice(1,o),a=e.slice(o+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(i=Number.parseInt(a.slice(1),10)),[s,i]}}let n=e.indexOf(":"),r=e.lastIndexOf(":");return n!==-1&&n===r&&/^\d+$/.test(e.slice(r+1))&&(i=Number.parseInt(e.slice(r+1),10),e=e.slice(0,r)),[e,i]},mC=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,hC=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,gC=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(mC);if(e)return e[1];let i=t.match(hC);if(i){let n=parseInt(i[1],16),r=parseInt(i[2],16);return`${n>>8}.${n&255}.${r>>8}.${r&255}`}return t},xv=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),gC(t.replace(/\.+$/,"")))});function vC(t,e){t=t||10;let i=new Array(t),n=new Array(t),r=0,o=0,s;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),u=n[o];s||(s=l),i[r]=c,n[r]=l;let p=o,f=0;for(;p!==r;)f+=i[p++],p=p%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),l-s<e)return;let m=u&&l-u;return m?Math.round(f*1e3/m):void 0}}var wv,_v=A(()=>{"use strict";wv=vC});function xC(t,e){let i=0,n=1e3/e,r,o,s=(l,u=Date.now())=>{i=u,r=null,o&&(clearTimeout(o),o=null),t(...l)};return[(...l)=>{let u=Date.now(),p=u-i;p>=n?s(l,u):(r=l,o||(o=setTimeout(()=>{o=null,s(r)},n-p)))},()=>r&&s(r)]}var Ev,Sv=A(()=>{Ev=xC});var It,Zi,Qi,Fo=A(()=>{_v();Sv();X();It=(t,e,i=3)=>{let n=0,r=wv(50,250);return Ev(o=>{if(!o||typeof o.loaded!="number")return;let s=o.loaded,a=o.lengthComputable?o.total:void 0,c=a!=null?Math.min(s,a):s,l=Math.max(0,c-n),u=r(l);n=Math.max(n,c);let p={loaded:c,total:a,progress:a?c/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a?(a-c)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(p)},i)},Zi=(t,e)=>{let i=t!=null;return[n=>e[0]({lengthComputable:i,total:t,loaded:n}),e[1]]},Qi=t=>(...e)=>h.asap(()=>t(...e))});function Wn(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let i=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(i)){let s=n.length,a=n.length;for(let m=0;m<a;m++)if(n.charCodeAt(m)===37&&m+2<a){let d=n.charCodeAt(m+1),g=n.charCodeAt(m+2);Lo(d)&&Lo(g)&&(s-=2,m+=2)}let c=0,l=a-1,u=m=>m>=2&&n.charCodeAt(m-2)===37&&n.charCodeAt(m-1)===51&&(n.charCodeAt(m)===68||n.charCodeAt(m)===100);l>=0&&(n.charCodeAt(l)===61?(c++,l--):u(l)&&(c++,l-=3)),c===1&&l>=0&&(n.charCodeAt(l)===61||u(l))&&c++;let f=Math.floor(s/4)*3-(c||0);return f>0?f:0}let o=0;for(let s=0,a=n.length;s<a;s++){let c=n.charCodeAt(s);if(c===37&&yC(n,s,a))o+=1,s+=2;else if(c<128)o+=1;else if(c<2048)o+=2;else if(c>=55296&&c<=56319&&s+1<a){let l=n.charCodeAt(s+1);l>=56320&&l<=57343?(o+=4,s++):o+=3}else o+=3}return o}var Lo,yC,xl=A(()=>{Lo=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,yC=(t,e,i)=>e+2<i&&Lo(t.charCodeAt(e+1))&&Lo(t.charCodeAt(e+2))});import jv from"http";import Nv from"https";import bC from"http2";import wC from"util";import{resolve as Ov}from"path";import Xe from"zlib";import ut from"stream";import{EventEmitter as _C}from"events";function PC(t,e,i){if(i!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,r])=>{AC.includes(n.toLowerCase())&&t.set(n,r)})}function kC(t=process.versions&&process.versions.node){if(!t)return!1;let[e,i]=t.split(".").map(n=>Number(n));return!Number.isInteger(e)||!Number.isInteger(i)?!1:e>24?!0:Pv[e]!=null&&i>=Pv[e]}function IC(t,e=process.versions&&process.versions.node){if(!kC(e))return!1;let i=t&&t.options;return!!(i&&h.hasOwnProp(i,"proxyEnv")&&i.proxyEnv!=null)}function DC(t,e,i){return bl.test(t.protocol)?i||Nv.globalAgent:e||jv.globalAgent}function jC(t,e){let i=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),n=e?Av.get(e)||Av.set(e,new Map).get(e):CC,r=n.get(i);if(r)return r;let o=e&&e.options?{...e.options,...t}:t;if(r=new yl.default(o),e&&e.options){let s={...e.options},a=r.callback;r.callback=function(l,u){return a.call(this,l,{...s,...u})}}return r[$v]=!0,n.set(i,r),r}function FC(t,e,i){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.sensitiveHeaders&&t.beforeRedirects.sensitiveHeaders(t,i),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,i)}function LC(t,e){t&&Object.keys(t).forEach(i=>{e.has(i.toLowerCase())&&delete t[i]})}function MC(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function Uv(t,e,i,n,r,o){let s=e,a=DC(t,o,r);if(!s&&s!==!1&&!IC(a)){let c=Cg(i);c&&(vl(i)||(s=new URL(c)))}if(n&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(n&&t.agent&&t.agent[$v]&&(t.agent=void 0),s){let c=s instanceof URL,l=d=>c||h.hasOwnProp(s,d)?s[d]:void 0,u=l("username"),p=l("password"),f=h.hasOwnProp(s,"auth")?s.auth:void 0;if(u&&(f=(u||"")+":"+(p||"")),f){let d=typeof f=="object",g=d&&h.hasOwnProp(f,"username")?f.username:void 0,v=d&&h.hasOwnProp(f,"password")?f.password:void 0;if(!!(g||v))f=(g||"")+":"+(v||"");else if(d)throw new E("Invalid proxy authorization",E.ERR_BAD_OPTION,{proxy:s})}if(bl.test(t.protocol)){if(!(r instanceof yl.default)){let d=l("hostname")||l("host"),g=l("port"),v=l("protocol"),x=v?v.includes(":")?v:`${v}:`:"http:",y=d&&d.includes(":")&&!d.startsWith("[")?`[${d}]`:d,w=new URL(`${x}//${y}${g?":"+g:""}`),O={protocol:w.protocol,hostname:w.hostname.replace(/^\[|\]$/g,""),port:w.port,auth:f&&typeof f=="string"?f:void 0};w.protocol==="https:"&&(O.ALPNProtocols=["http/1.1"]);let C=jC(O,r);t.agent=C,t.agents&&(t.agents.https=C)}}else{if(f){let x=Buffer.from(f,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+x}let d=!1;for(let x of Object.keys(t.headers))if(x.toLowerCase()==="host"){d=!0;break}d||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let g=l("hostname")||l("host");t.hostname=g,t.host=g,t.port=l("port"),t.path=i;let v=l("protocol");v&&(t.protocol=v.includes(":")?v:`${v}:`)}}t.beforeRedirects.proxy=function(l){Uv(l,e,l.href,!0,r,o)}}var yl,Fv,Rv,EC,SC,Lv,Mv,Bv,OC,RC,TC,bl,AC,Tv,Mo,$v,CC,Av,Pv,Cv,kv,Iv,NC,BC,$C,UC,Dv,qC,qv,Vv=A(()=>{X();Ao();Po();Oo();kg();yl=Ee(Zg(),1),Fv=Ee(ov(),1);zn();Dn();Pe();ui();lt();sv();at();av();uv();dl();dv();mv();gv();bv();Tn();Fo();xl();Rv={flush:Xe.constants.Z_SYNC_FLUSH,finishFlush:Xe.constants.Z_SYNC_FLUSH},EC={flush:Xe.constants.BROTLI_OPERATION_FLUSH,finishFlush:Xe.constants.BROTLI_OPERATION_FLUSH},SC={flush:Xe.constants.ZSTD_e_flush,finishFlush:Xe.constants.ZSTD_e_flush},Lv=h.isFunction(Xe.createBrotliDecompress),Mv=h.isFunction(Xe.createZstdDecompress),Bv="gzip, compress, deflate"+(Lv?", br":""),OC=Bv+(Mv?", zstd":""),{http:RC,https:TC}=Fv.default,bl=/https:?/,AC=["content-type","content-length"];Tv=Symbol("axios.http.socketListener"),Mo=Symbol("axios.http.currentReq"),$v=Symbol("axios.http.installedTunnel"),CC=new Map,Av=new WeakMap,Pv={22:21,24:5};Cv=K.protocols.map(t=>t+":"),kv=t=>{if(!h.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Iv=(t,[e,i])=>(t.on("end",i).on("error",i),e),NC=new fv;BC=typeof process<"u"&&h.kindOf(process)==="process",$C=t=>new Promise((e,i)=>{let n,r,o=(c,l)=>{r||(r=!0,n&&n(c,l))},s=c=>{o(c),e(c)},a=c=>{o(c,!0),i(c)};t(s,a,c=>n=c).catch(a)}),UC=({address:t,family:e})=>{if(!h.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},Dv=(t,e)=>UC(h.isObject(t)?t:{address:t,family:e}),qC={request(t,e){let i=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:r}=t,o=NC.getSession(i,n),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=bC.constants,u={[s]:t.protocol.replace(":",""),[a]:t.method,[c]:t.path};h.forEach(r,(f,m)=>{m.charAt(0)!==":"&&(u[m]=f)});let p=o.request(u);return p.once("response",f=>{let m=p;f=Object.assign({},f);let d=f[l];delete f[l],m.headers=f,m.statusCode=+d,e(m)}),p}},qv=BC&&function(e){return $C(async function(n,r,o){let s=P=>h.getSafeProp(e,P),a=s("transitional")||Ut,c=s("data"),l=s("lookup"),u=s("family"),p=s("httpVersion");p===void 0&&(p=1);let f=s("http2Options"),m=s("httpAgent"),d=s("httpsAgent"),g=s("proxy"),v=s("responseType"),x=s("responseEncoding"),y=s("socketPath"),w=s("method").toUpperCase(),O=s("maxRedirects"),C=s("maxBodyLength"),k=s("maxContentLength"),N=s("decompress"),q,F=!1,D,Y;if(p=+p,Number.isNaN(p))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(p!==1&&p!==2)throw TypeError(`Unsupported protocol version '${p}'`);let ee=p===2;if(l){let P=hv(l,T=>h.isArray(T)?T:[T]);l=(T,z,re)=>{P(T,z,($,fe,Te)=>{if($)return re($);let ue=h.isArray(fe)?fe.map(Ei=>Dv(Ei)):[Dv(fe,Te)];z.all?re($,ue):re($,ue[0].address,ue[0].family)})}}let ce=new _C;function G(P){try{ce.emit("abort",!P||P.type?new qe(null,e,D):P)}catch{}}function be(){Y&&(clearTimeout(Y),Y=null)}function et(){let P=s("timeout"),T=P?"timeout of "+P+"ms exceeded":"timeout exceeded",z=s("timeoutErrorMessage");return z&&(T=z),new E(T,a.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,D)}ce.once("abort",r);let ft=()=>{be(),e.cancelToken&&e.cancelToken.unsubscribe(G),e.signal&&e.signal.removeEventListener("abort",G),ce.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(G),e.signal&&(e.signal.aborted?G():e.signal.addEventListener("abort",G))),o((P,T)=>{if(q=!0,be(),T){F=!0,ft();return}let{data:z}=P;if(z instanceof ut.Readable||z instanceof ut.Duplex){let re=ut.finished(z,()=>{re(),ft()})}else ft()});let bi=pi(s("baseURL"),s("url"),s("allowAbsoluteUrls"),e),Gt=y?"http://localhost":K.hasBrowserEnv?K.origin:void 0,Z=new URL(bi,Gt),ne=Z.protocol||Cv[0];if(ne==="data:"){if(k>-1){let T=String(s("url")||bi||"");if(Wn(T)>k)return r(new E("maxContentLength size of "+k+" exceeded",E.ERR_BAD_RESPONSE,e))}let P;if(w!=="GET")return wt(n,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{P=cl(s("url"),v==="blob",{Blob:e.env&&e.env.Blob})}catch(T){throw E.from(T,E.ERR_BAD_REQUEST,e)}return v==="text"?(P=P.toString(x),(!x||x==="utf8")&&(P=h.stripBOM(P))):v==="stream"&&(P=ut.Readable.from(P)),wt(n,r,{data:P,status:200,statusText:"OK",headers:new Q,config:e})}if(Cv.indexOf(ne)===-1)return r(new E("Unsupported protocol "+ne,E.ERR_BAD_REQUEST,e));let le=Q.from(e.headers).normalize();le.set("User-Agent","axios/"+kt,!1);let{onUploadProgress:mt,onDownloadProgress:St}=e,Wt=e.maxRate,W,we;if(h.isSpecCompliantForm(c)){let P=le.getContentType(/boundary=([-_\w\d]{10,70})/i);c=lv(c,T=>{le.set(T)},{tag:`axios-${kt}-boundary`,boundary:P&&P[1]||void 0})}else if(h.isFormData(c)&&h.isFunction(c.getHeaders)&&c.getHeaders!==Object.prototype.getHeaders){if(PC(le,c.getHeaders(),s("formDataHeaderPolicy")),!le.hasContentLength())try{let P=await wC.promisify(c.getLength).call(c);Number.isFinite(P)&&P>=0&&le.setContentLength(P)}catch{}}else if(h.isBlob(c)||h.isFile(c))c.size&&le.setContentType(c.type||"application/octet-stream"),le.setContentLength(c.size||0),c=ut.Readable.from(No(c));else if(c&&!h.isStream(c)){if(!Buffer.isBuffer(c))if(h.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(h.isString(c))c=Buffer.from(c,"utf-8");else return r(new E("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",E.ERR_BAD_REQUEST,e));if(le.setContentLength(c.length,!1),C>-1&&c.length>C)return r(new E("Request body larger than maxBodyLength limit",E.ERR_BAD_REQUEST,e))}let wi=h.toFiniteNumber(le.getContentLength());h.isArray(Wt)?(W=Wt[0],we=Wt[1]):W=we=Wt,c&&(mt||W)&&(h.isStream(c)||(c=ut.Readable.from(c,{objectMode:!1})),c=ut.pipeline([c,new pl({maxRate:h.toFiniteNumber(W)})],h.noop),mt&&c.on("progress",Iv(c,Zi(wi,It(Qi(mt),!1,3)))));let ht,rn=s("auth");if(rn){let P=h.getSafeProp(rn,"username")||"",T=h.getSafeProp(rn,"password")||"";ht=P+":"+T}if(!ht&&(Z.username||Z.password)){let P=kv(Z.username),T=kv(Z.password);ht=P+":"+T}ht&&le.delete("authorization");let on;try{on=li(Z.pathname+Z.search,s("params"),s("paramsSerializer")).replace(/^\?/,"")}catch(P){return r(E.from(P,E.ERR_BAD_REQUEST,e,null,null,{url:s("url"),exists:!0}))}le.set("Accept-Encoding",h.hasOwnProp(a,"advertiseZstdAcceptEncoding")&&a.advertiseZstdAcceptEncoding===!0?OC:Bv,!1);let J=Object.assign(Object.create(null),{path:on,method:w,headers:Bi(le),agents:{http:m,https:d},auth:ht,protocol:ne,family:u,beforeRedirect:FC,beforeRedirects:Object.create(null),http2Options:f});if(!h.isUndefined(l)&&(J.lookup=l),y){if(typeof y!="string")return r(new E("socketPath must be a string",E.ERR_BAD_OPTION_VALUE,e));let P=s("allowedSocketPaths");if(P!=null){let T=Array.isArray(P)?P:[P],z=Ov(y);if(!T.some($=>typeof $=="string"&&Ov($)===z))return r(new E(`socketPath "${y}" is not permitted by allowedSocketPaths`,E.ERR_BAD_OPTION_VALUE,e))}J.socketPath=y}else J.hostname=Z.hostname.startsWith("[")?Z.hostname.slice(1,-1):Z.hostname,J.port=Z.port,Uv(J,g,ne+"//"+Z.hostname+(Z.port?":"+Z.port:"")+J.path,!1,d,m);let Nt,_i=!1,ze=!1,M=bl.test(J.protocol);if(J.agent==null&&(J.agent=M?d:m),ee)Nt=qC;else{let P=s("transport");if(P)Nt=P;else if(O===0)Nt=M?Nv:jv,_i=!0;else{ze=!0,J.sensitiveHeaders=[],O&&(J.maxRedirects=O);let T=s("beforeRedirect");if(T&&(J.beforeRedirects.config=T),ht){let re=Z.origin,$=ht;J.beforeRedirects.auth=function(Te){try{new URL(Te.href).origin===re&&(Te.auth=$)}catch{}}}let z=s("sensitiveHeaders");if(z!=null){if(!h.isArray(z))return r(new E("sensitiveHeaders must be an array of strings",E.ERR_BAD_OPTION_VALUE,e));let re=new Set;for(let $ of z){if(!h.isString($))return r(new E("sensitiveHeaders must be an array of strings",E.ERR_BAD_OPTION_VALUE,e));re.add($.toLowerCase())}re.size&&(J.sensitiveHeaders=Array.from(re),J.beforeRedirects.sensitiveHeaders=function(fe,Te){MC(fe,Te)||LC(fe.headers,re)})}Nt=M?TC:RC}}C>-1?J.maxBodyLength=C:J.maxBodyLength=1/0,J.insecureHTTPParser=!!s("insecureHTTPParser"),D=Nt.request(J,function(T){if(be(),D.destroyed)return;let z=[T],re=h.toFiniteNumber(T.headers["content-length"]);if(St||we){let ue=new pl({maxRate:h.toFiniteNumber(we)});St&&ue.on("progress",Iv(ue,Zi(re,It(Qi(St),!0,3)))),z.push(ue)}let $=T,fe=T.req||D;if(N!==!1&&T.headers["content-encoding"])switch((w==="HEAD"||T.statusCode===204)&&delete T.headers["content-encoding"],(T.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":z.push(Xe.createUnzip(Rv)),delete T.headers["content-encoding"];break;case"deflate":z.push(new pv),z.push(Xe.createUnzip(Rv)),delete T.headers["content-encoding"];break;case"br":Lv&&(z.push(Xe.createBrotliDecompress(EC)),delete T.headers["content-encoding"]);break;case"zstd":Mv&&(z.push(Xe.createZstdDecompress(SC)),delete T.headers["content-encoding"]);break}$=z.length>1?ut.pipeline(z,h.noop):z[0];let Te={status:T.statusCode,statusText:T.statusMessage,headers:new Q(T.headers),config:e,request:fe};if(v==="stream"){if(k>-1){let ue=k,Ei=$;async function*sn(){let me=0;for await(let $l of Ei){if(me+=$l.length,me>ue)throw new E("maxContentLength size of "+ue+" exceeded",E.ERR_BAD_RESPONSE,e,fe);yield $l}}$=ut.Readable.from(sn(),{objectMode:!1})}Te.data=$,wt(n,r,Te)}else{let ue=[],Ei=0;$.on("data",function(me){ue.push(me),Ei+=me.length,k>-1&&Ei>k&&(F=!0,$.destroy(),G(new E("maxContentLength size of "+k+" exceeded",E.ERR_BAD_RESPONSE,e,fe)))}),$.on("aborted",function(){if(F)return;let me=new E("stream has been aborted",E.ERR_BAD_RESPONSE,e,fe,Te);$.destroy(me),r(me)}),$.on("error",function(me){F||r(E.from(me,null,e,fe,Te))}),$.on("end",function(){try{let me=ue.length===1?ue[0]:Buffer.concat(ue);v!=="arraybuffer"&&(me=me.toString(x),(!x||x==="utf8")&&(me=h.stripBOM(me))),Te.data=me}catch(me){return r(E.from(me,null,e,Te.request,Te))}wt(n,r,Te)})}ce.once("abort",ue=>{$.destroyed||($.emit("error",ue),$.destroy())})}),ce.once("abort",P=>{D.close?D.close():D.destroy(P)}),D.on("error",function(T){r(E.from(T,null,e,D))});let _e=new Set;if(D.on("socket",function(T){typeof T.setKeepAlive=="function"&&T.setKeepAlive(!0,1e3*60),T[Tv]||(T.on("error",function(re){let $=T[Mo];$&&!$.destroyed&&$.destroy(re)}),T[Tv]=!0),T[Mo]=D,_e.add(T)}),D.once("close",function(){be();for(let T of _e)T[Mo]===D&&(T[Mo]=null);_e.clear()}),s("timeout")){let P=parseInt(s("timeout"),10);if(Number.isNaN(P)){G(new E("error trying to parse `config.timeout` to int",E.ERR_BAD_OPTION_VALUE,e,D));return}let T=function(){q||G(et())};_i&&P>0&&(Y=setTimeout(T,P)),D.setTimeout(P,T)}else D.setTimeout(0);if(h.isStream(c)){let P=!1,T=!1;c.on("end",()=>{P=!0}),c.once("error",re=>{T=!0,D.destroy(re)}),c.on("close",()=>{!P&&!T&&G(new qe("Request stream has been aborted",e,D))});let z=c;if(C>-1&&!ze){let re=C,$=0;z=ut.pipeline([c,new ut.Transform({transform(fe,Te,ue){if($+=fe.length,$>re)return ue(new E("Request body larger than maxBodyLength limit",E.ERR_BAD_REQUEST,e,D));ue(null,fe)}})],h.noop),z.on("error",fe=>{D.destroyed||D.destroy(fe)})}z.pipe(D)}else c&&D.write(c),D.end()})}});var zv,Hv=A(()=>{lt();zv=K.hasStandardBrowserEnv?((t,e)=>i=>(i=new URL(i,K.origin),t.protocol===i.protocol&&t.host===i.host&&(e||t.port===i.port)))(new URL(K.origin),K.navigator&&/(msie|trident)/i.test(K.navigator.userAgent)):()=>!0});var Gv,Wv=A(()=>{X();lt();Gv=K.hasStandardBrowserEnv?{write(t,e,i,n,r,o,s){if(typeof document>"u")return;let a=[`${t}=${encodeURIComponent(e)}`];h.isNumber(i)&&a.push(`expires=${new Date(i).toUTCString()}`),h.isString(n)&&a.push(`path=${n}`),h.isString(r)&&a.push(`domain=${r}`),o===!0&&a.push("secure"),h.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let i=0;i<e.length;i++){let n=e[i].replace(/^\s+/,""),r=n.indexOf("=");if(r!==-1&&n.slice(0,r)===t)try{return decodeURIComponent(n.slice(r+1))}catch{return n.slice(r+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}}});function pt(t,e){t=t||{},e=e||{};let i=Object.create(null);Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(u,p,f,m){return h.isPlainObject(u)&&h.isPlainObject(p)?h.merge.call({caseless:m},u,p):h.isPlainObject(p)?h.merge({},p):h.isArray(p)?p.slice():p}function r(u,p,f,m){if(h.isUndefined(p)){if(!h.isUndefined(u))return n(void 0,u,f,m)}else return n(u,p,f,m)}function o(u,p){if(!h.isUndefined(p))return n(void 0,p)}function s(u,p){if(h.isUndefined(p)){if(!h.isUndefined(u))return n(void 0,u)}else return n(void 0,p)}function a(u){let p=h.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!h.isUndefined(p))if(h.isPlainObject(p)){if(h.hasOwnProp(p,u))return p[u]}else return;let f=h.hasOwnProp(t,"transitional")?t.transitional:void 0;if(h.isPlainObject(f)&&h.hasOwnProp(f,u))return f[u]}function c(u,p,f){if(h.hasOwnProp(e,f))return n(u,p);if(h.hasOwnProp(t,f))return n(void 0,u)}let l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(u,p,f)=>r(Kv(u),Kv(p),f,!0)};return h.forEach(Object.keys({...t,...e}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;let f=h.hasOwnProp(l,p)?l[p]:r,m=h.hasOwnProp(t,p)?t[p]:void 0,d=h.hasOwnProp(e,p)?e[p]:void 0,g=f(m,d,p);h.isUndefined(g)&&f!==c||(i[p]=g)}),h.hasOwnProp(e,"validateStatus")&&h.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(h.hasOwnProp(t,"validateStatus")?i.validateStatus=n(void 0,t.validateStatus):delete i.validateStatus),i}var Kv,Bo=A(()=>{"use strict";X();at();Kv=t=>t instanceof Q?{...t}:t});function zC(t,e,i){if(i!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([n,r])=>{VC.includes(n.toLowerCase())&&t.set(n,r)})}function GC(t){let e=pt({},t),i=f=>h.hasOwnProp(e,f)?e[f]:void 0,n=i("data"),r=i("withXSRFToken"),o=i("xsrfHeaderName"),s=i("xsrfCookieName"),a=i("headers"),c=i("auth"),l=i("baseURL"),u=i("allowAbsoluteUrls"),p=i("url");if(e.headers=a=Q.from(a),e.url=li(pi(l,p,u,e),i("params"),i("paramsSerializer")),c){let f=h.getSafeProp(c,"username")||"",m=h.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(m?HC(m):"")))}catch(d){throw E.from(d,E.ERR_BAD_OPTION_VALUE,t)}}if(h.isFormData(n)&&(K.hasStandardBrowserEnv||K.hasStandardBrowserWebWorkerEnv||h.isReactNative(n)?a.setContentType(void 0):h.isFunction(n.getHeaders)&&zC(a,n.getHeaders(),i("formDataHeaderPolicy"))),K.hasStandardBrowserEnv&&(h.isFunction(r)&&(r=r(e)),r===!0||r==null&&zv(e.url))){let m=o&&s&&Gv.read(s);m&&a.set(o,m)}return e}var VC,HC,$o,wl=A(()=>{lt();X();Pe();Hv();Wv();Po();Bo();at();Oo();VC=["content-type","content-length"];HC=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16)));$o=GC});var WC,Jv,Yv=A(()=>{X();Ao();Dn();Pe();ui();al();lt();at();Fo();wl();Tn();WC=typeof XMLHttpRequest<"u",Jv=WC&&function(t){return new Promise(function(i,n){let r=$o(t),o=r.data,s=Q.from(r.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=r,u,p,f,m,d;function g(){m&&m(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function x(){if(!v)return;let w=Q.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:w,config:t,request:v};wt(function(N){i(N),g()},function(N){n(N),g()},C),v=null}"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(x)},v.onabort=function(){v&&(n(new E("Request aborted",E.ECONNABORTED,t,v)),g(),v=null)},v.onerror=function(O){let C=O&&O.message?O.message:"Network Error",k=new E(C,E.ERR_NETWORK,t,v);k.event=O||null,n(k),g(),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",C=r.transitional||Ut;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),n(new E(O,C.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,t,v)),g(),v=null},o===void 0&&s.setContentType(null),"setRequestHeader"in v&&h.forEach(Bi(s),function(O,C){v.setRequestHeader(C,O)}),h.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),l&&([f,d]=It(l,!0),v.addEventListener("progress",f)),c&&v.upload&&([p,m]=It(c),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(u=w=>{v&&(n(!w||w.type?new qe(null,t,v):w),v.abort(),g(),v=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));let y=Hn(r.url);if(y&&!K.protocols.includes(y)){n(new E("Unsupported protocol "+y+":",E.ERR_BAD_REQUEST,t)),g();return}v.send(o||null)})}});var KC,Xv,Zv=A(()=>{ui();Pe();X();KC=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let i=new AbortController,n=!1,r=function(c){if(!n){n=!0,s();let l=c instanceof Error?c:this.reason;i.abort(l instanceof E?l:new qe(l instanceof Error?l.message:l))}},o=e&&setTimeout(()=>{o=null,r(new E(`timeout of ${e}ms exceeded`,E.ETIMEDOUT))},e),s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),t=null)};t.forEach(c=>c.addEventListener("abort",r,{once:!0}));let{signal:a}=i;return a.unsubscribe=()=>h.asap(s),a},Xv=KC});var JC,YC,XC,_l,Qv=A(()=>{JC=function*(t,e){let i=t.byteLength;if(!e||i<e){yield t;return}let n=0,r;for(;n<i;)r=n+e,yield t.slice(n,r),n=r},YC=async function*(t,e){for await(let i of XC(t))yield*JC(i,e)},XC=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:i,value:n}=await e.read();if(i)break;yield n}}finally{await e.cancel()}},_l=(t,e,i,n)=>{let r=YC(t,e),o=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:l,value:u}=await r.next();if(l){a(),c.close();return}let p=u.byteLength;if(i){let f=o+=p;i(f)}c.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(c){return a(c),r.return()}},{highWaterMark:2})}});var ex,Uo,ZC,tx,ix,QC,ek,tk,El,EB,nx=A(()=>{lt();X();Pe();Zv();Qv();at();Fo();wl();Ao();xl();zn();Tn();ex=64*1024,{isFunction:Uo}=h,ZC=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,i)=>String.fromCharCode(parseInt(i,16))),tx=t=>{if(!h.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},ix=(t,...e)=>{try{return!!t(...e)}catch{return!1}},QC=t=>{let e=t.indexOf("://"),i=t;return e!==-1&&(i=i.slice(e+3)),i.includes("@")||i.includes(":")},ek=t=>{let e=h.global!==void 0&&h.global!==null?h.global:globalThis,{ReadableStream:i,TextEncoder:n}=e;t=h.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:r,Request:o,Response:s}=t,a=r?Uo(r):typeof fetch=="function",c=Uo(o),l=Uo(s);if(!a)return!1;let u=a&&Uo(i),p=a&&(typeof n=="function"?(x=>y=>x.encode(y))(new n):async x=>new Uint8Array(await new o(x).arrayBuffer())),f=c&&u&&ix(()=>{let x=!1,y=new o(K.origin,{body:new i,method:"POST",get duplex(){return x=!0,"half"}}),w=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),x&&!w}),m=l&&u&&ix(()=>h.isReadableStream(new s("").body)),d={stream:m&&(x=>x.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!d[x]&&(d[x]=(y,w)=>{let O=y&&y[x];if(O)return O.call(y);throw new E(`Response type '${x}' is not supported`,E.ERR_NOT_SUPPORT,w)})});let g=async x=>{if(x==null)return 0;if(h.isBlob(x))return x.size;if(h.isSpecCompliantForm(x))return(await new o(K.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(h.isArrayBufferView(x)||h.isArrayBuffer(x))return x.byteLength;if(h.isURLSearchParams(x)&&(x=x+""),h.isString(x))return(await p(x)).byteLength},v=async(x,y)=>{let w=h.toFiniteNumber(x.getContentLength());return w??g(y)};return async x=>{let{url:y,method:w,data:O,signal:C,cancelToken:k,timeout:N,onDownloadProgress:q,onUploadProgress:F,responseType:D,headers:Y,withCredentials:ee="same-origin",fetchOptions:ce,maxContentLength:G,maxBodyLength:be}=$o(x),et=h.isNumber(G)&&G>-1,ft=h.isNumber(be)&&be>-1,bi=W=>h.hasOwnProp(x,W)?x[W]:void 0,Gt=r||fetch;D=D?(D+"").toLowerCase():"text";let Z=Xv([C,k&&k.toAbortSignal()],N),ne=null,le=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()}),mt,St=null,Wt=()=>new E("Request body larger than maxBodyLength limit",E.ERR_BAD_REQUEST,x,ne);try{let W,we=bi("auth");if(we){let M=h.getSafeProp(we,"username")||"",_e=h.getSafeProp(we,"password")||"";W={username:M,password:_e}}if(QC(y)){let M=new URL(y,K.origin);if(!W&&(M.username||M.password)){let _e=tx(M.username),P=tx(M.password);W={username:_e,password:P}}(M.username||M.password)&&(M.username="",M.password="",y=M.href)}if(W&&(Y.delete("authorization"),Y.set("Authorization","Basic "+btoa(ZC((W.username||"")+":"+(W.password||""))))),et&&typeof y=="string"&&y.startsWith("data:")&&Wn(y)>G)throw new E("maxContentLength size of "+G+" exceeded",E.ERR_BAD_RESPONSE,x,ne);if(ft&&w!=="get"&&w!=="head"){let M=await g(O);if(typeof M=="number"&&isFinite(M)&&(mt=M,M>be))throw Wt()}let wi=ft&&(h.isReadableStream(O)||h.isStream(O)),ht=(M,_e,P)=>_l(M,ex,T=>{if(ft&&T>be)throw St=Wt();_e&&_e(T)},P);if(f&&w!=="get"&&w!=="head"&&(F||wi)){if(mt=mt??await v(Y,O),mt!==0||wi){let M=new o(y,{method:"POST",body:O,duplex:"half"}),_e;if(h.isFormData(O)&&(_e=M.headers.get("content-type"))&&Y.setContentType(_e),M.body){let[P,T]=F&&Zi(mt,It(Qi(F)))||[];O=ht(M.body,P,T)}}}else if(wi&&!c&&u&&w!=="get"&&w!=="head")O=ht(O);else if(wi&&c&&!f&&w!=="get"&&w!=="head")throw new E("Stream request bodies are not supported by the current fetch implementation",E.ERR_NOT_SUPPORT,x,ne);h.isString(ee)||(ee=ee?"include":"omit");let rn=c&&"credentials"in o.prototype;if(h.isFormData(O)){let M=Y.getContentType();M&&/^multipart\/form-data/i.test(M)&&!/boundary=/i.test(M)&&Y.delete("content-type")}Y.set("User-Agent","axios/"+kt,!1);let on={...ce,signal:Z,method:w.toUpperCase(),headers:Bi(Y.normalize()),body:O,duplex:"half",credentials:rn?ee:void 0};ne=c&&new o(y,on);let J=await(c?Gt(ne,ce):Gt(y,on)),Nt=Q.from(J.headers);if(et){let M=h.toFiniteNumber(Nt.getContentLength());if(M!=null&&M>G)throw new E("maxContentLength size of "+G+" exceeded",E.ERR_BAD_RESPONSE,x,ne)}let _i=m&&(D==="stream"||D==="response");if(m&&J.body&&(q||et||_i&&le)){let M={};["status","statusText","headers"].forEach($=>{M[$]=J[$]});let _e=h.toFiniteNumber(Nt.getContentLength()),[P,T]=q&&Zi(_e,It(Qi(q),!0))||[],z=0,re=$=>{if(et&&(z=$,z>G))throw new E("maxContentLength size of "+G+" exceeded",E.ERR_BAD_RESPONSE,x,ne);P&&P($)};J=new s(_l(J.body,ex,re,()=>{T&&T(),le&&le()}),M)}D=D||"text";let ze=await d[h.findKey(d,D)||"text"](J,x);if(et&&!m&&!_i){let M;if(ze!=null&&(typeof ze.byteLength=="number"?M=ze.byteLength:typeof ze.size=="number"?M=ze.size:typeof ze=="string"&&(M=typeof n=="function"?new n().encode(ze).byteLength:ze.length)),typeof M=="number"&&M>G)throw new E("maxContentLength size of "+G+" exceeded",E.ERR_BAD_RESPONSE,x,ne)}return!_i&&le&&le(),await new Promise((M,_e)=>{wt(M,_e,{data:ze,headers:Q.from(J.headers),status:J.status,statusText:J.statusText,config:x,request:ne})})}catch(W){if(le&&le(),Z&&Z.aborted&&Z.reason instanceof E){let we=Z.reason;throw we.config=x,ne&&(we.request=ne),W!==we&&Object.defineProperty(we,"cause",{__proto__:null,value:W,writable:!0,enumerable:!1,configurable:!0}),we}if(St)throw ne&&!St.request&&(St.request=ne),St;if(W instanceof E)throw ne&&!W.request&&(W.request=ne),W;if(W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)){let we=new E("Network Error",E.ERR_NETWORK,x,ne,W&&W.response);throw Object.defineProperty(we,"cause",{__proto__:null,value:W.cause||W,writable:!0,enumerable:!1,configurable:!0}),we}throw E.from(W,W&&W.code,x,ne,W&&W.response)}}},tk=new Map,El=t=>{let e=t&&t.env||{},{fetch:i,Request:n,Response:r}=e,o=[n,r,i],s=o.length,a=s,c,l,u=tk;for(;a--;)c=o[a],l=u.get(c),l===void 0&&u.set(c,l=a?new Map:ek(e)),u=l;return l},EB=El()});function rk(t,e){t=h.isArray(t)?t:[t];let{length:i}=t,n,r,o={};for(let s=0;s<i;s++){n=t[s];let a;if(r=n,!nk(n)&&(r=Sl[(a=String(n)).toLowerCase()],r===void 0))throw new E(`Unknown adapter '${a}'`);if(r&&(h.isFunction(r)||(r=r.get(e))))break;o[a||"#"+s]=r}if(!r){let s=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),a=i?s.length>1?`since :
|
|
72
|
+
`+s.map(rx).join(`
|
|
73
|
+
`):" "+rx(s[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,E.ERR_NOT_SUPPORT)}return r}var Sl,rx,nk,qo,Ol=A(()=>{X();Vv();Yv();nx();Pe();Sl={http:qv,xhr:Jv,fetch:{get:El}};h.forEach(Sl,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});rx=t=>`- ${t}`,nk=t=>h.isFunction(t)||t===null||t===!1;qo={getAdapter:rk,adapters:Sl}});function Rl(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qe(null,t)}function Vo(t){return Rl(t),t.headers=Q.from(t.headers),t.data=jn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),qo.getAdapter(t.adapter||Wi.adapter,t)(t).then(function(n){Rl(t),t.response=n;try{n.data=jn.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=Q.from(n.headers),n},function(n){if(!Nn(n)&&(Rl(t),n&&n.response)){t.response=n.response;try{n.response.data=jn.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=Q.from(n.response.headers)}return Promise.reject(n)})}var ox=A(()=>{"use strict";Rg();Dc();To();ui();at();Ol()});function ok(t,e,i){if(typeof t!="object"||t===null)throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),r=n.length;for(;r-- >0;){let o=n[r],s=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(s){let a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new E("option "+o+" must be "+c,E.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}var zo,sx,Kn,ax=A(()=>{"use strict";zn();Pe();zo={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{zo[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});sx={};zo.transitional=function(e,i,n){function r(o,s){return"[Axios v"+kt+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,a)=>{if(e===!1)throw new E(r(s," has been removed"+(i?" in "+i:"")),E.ERR_DEPRECATED);return i&&!sx[s]&&(sx[s]=!0,console.warn(r(s," has been deprecated since v"+i+" and will be removed in the near future"))),e?e(o,s,a):!0}};zo.spelling=function(e){return(i,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};Kn={assertOptions:ok,validators:zo}});var Ce,en,Jn,cx=A(()=>{"use strict";X();Oo();hg();ox();Bo();Po();ax();at();Dn();Ce=Kn.validators,en=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Oc,response:new Oc}}async request(e,i){try{return await this._request(e,i)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;let o=(()=>{if(!r.stack)return"";let s=r.stack.indexOf(`
|
|
74
|
+
`);return s===-1?"":r.stack.slice(s+1)})();try{if(!n.stack)n.stack=o;else if(o){let s=o.indexOf(`
|
|
75
|
+
`),a=s===-1?-1:o.indexOf(`
|
|
76
|
+
`,s+1),c=a===-1?"":o.slice(a+1);String(n.stack).endsWith(c)||(n.stack+=`
|
|
77
|
+
`+o)}}catch{}}throw n}}_request(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=pt(this.defaults,i);let{transitional:n,paramsSerializer:r,headers:o}=i;n!==void 0&&Kn.assertOptions(n,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean),legacyInterceptorReqResOrdering:Ce.transitional(Ce.boolean),advertiseZstdAcceptEncoding:Ce.transitional(Ce.boolean),validateStatusUndefinedResolves:Ce.transitional(Ce.boolean)},!1),r!=null&&(h.isFunction(r)?i.paramsSerializer={serialize:r}:Kn.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Kn.assertOptions(i,{baseUrl:Ce.spelling("baseURL"),withXsrfToken:Ce.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let s=o&&h.merge(o.common,o[i.method]);o&&h.forEach(["delete","get","head","post","put","patch","query","common"],d=>{delete o[d]}),i.headers=Q.concat(s,o);let a=[],c=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(i)===!1)return;c=c&&g.synchronous;let v=i.transitional||Ut;v&&v.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});let l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let u,p=0,f;if(!c){let d=[Vo.bind(this),void 0];for(d.unshift(...a),d.push(...l),f=d.length,u=Promise.resolve(i);p<f;)u=u.then(d[p++],d[p++]);return u}f=a.length;let m=i;for(;p<f;){let d=a[p++],g=a[p++];try{m=d(m)}catch(v){g.call(this,v);break}}try{u=Vo.call(this,m)}catch(d){return Promise.reject(d)}for(p=0,f=l.length;p<f;)u=u.then(l[p++],l[p++]);return u}getUri(e){e=pt(this.defaults,e);let i=pi(e.baseURL,e.url,e.allowAbsoluteUrls,e);return li(i,e.params,e.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(e){en.prototype[e]=function(i,n){return this.request(pt(n||{},{method:e,url:i,data:n&&h.hasOwnProp(n,"data")?n.data:void 0}))}});h.forEach(["post","put","patch","query"],function(e){function i(n){return function(o,s,a){return this.request(pt(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}en.prototype[e]=i(),e!=="query"&&(en.prototype[e+"Form"]=i(!0))});Jn=en});var Tl,lx,ux=A(()=>{"use strict";ui();Tl=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(o){i=o});let n=this;this.promise.then(r=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](r);n._listeners=null}),this.promise.then=r=>{let o,s=new Promise(a=>{n.subscribe(a),o=a}).then(r);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,a){n.reason||(n.reason=new qe(o,s,a),i(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){let e=new AbortController,i=n=>{e.abort(n)};return this.subscribe(i),e.signal.unsubscribe=()=>this.unsubscribe(i),e.signal}static source(){let e;return{token:new t(function(r){e=r}),cancel:e}}},lx=Tl});function Al(t){return function(i){return t.apply(null,i)}}var px=A(()=>{"use strict"});function Pl(t){return h.isObject(t)&&t.isAxiosError===!0}var dx=A(()=>{"use strict";X()});var Cl,fx,mx=A(()=>{Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([t,e])=>{Cl[e]=t});fx=Cl});function hx(t){let e=new Jn(t),i=En(Jn.prototype.request,e);return h.extend(i,Jn.prototype,e,{allOwnKeys:!0}),h.extend(i,e,null,{allOwnKeys:!0}),i.create=function(r){return hx(pt(t,r))},i}var pe,Ho,gx=A(()=>{"use strict";X();Ya();cx();Bo();To();kc();ui();ux();Dc();zn();Hi();Pe();px();dx();at();Ol();mx();pe=hx(Wi);pe.Axios=Jn;pe.CanceledError=qe;pe.CancelToken=lx;pe.isCancel=Nn;pe.VERSION=kt;pe.toFormData=$t;pe.AxiosError=E;pe.Cancel=pe.CanceledError;pe.all=function(e){return Promise.all(e)};pe.spread=Al;pe.isAxiosError=Pl;pe.mergeConfig=pt;pe.AxiosHeaders=Q;pe.formToJSON=t=>Ro(h.isHTMLForm(t)?new FormData(t):t);pe.getAdapter=qo.getAdapter;pe.HttpStatusCode=fx;pe.default=pe;Ho=pe});var b2,kl,w2,_2,E2,S2,O2,R2,T2,A2,P2,C2,k2,I2,D2,j2,N2,vx=A(()=>{gx();({Axios:b2,AxiosError:kl,CanceledError:w2,isCancel:_2,CancelToken:E2,VERSION:S2,all:O2,Cancel:R2,isAxiosError:T2,spread:A2,toFormData:P2,AxiosHeaders:C2,HttpStatusCode:k2,formToJSON:I2,getAdapter:D2,mergeConfig:j2,create:N2}=Ho)});var bx=_(Le=>{"use strict";var sk=Le&&Le.__createBinding||(Object.create?function(t,e,i,n){n===void 0&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){n===void 0&&(n=i),t[n]=e[i]}),ak=Le&&Le.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xx=Le&&Le.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&sk(e,t,i);return ak(e,t),e};Object.defineProperty(Le,"__esModule",{value:!0});Le.req=Le.json=Le.toBuffer=void 0;var ck=xx(R("http")),lk=xx(R("https"));async function yx(t){let e=0,i=[];for await(let n of t)e+=n.length,i.push(n);return Buffer.concat(i,e)}Le.toBuffer=yx;async function uk(t){let i=(await yx(t)).toString("utf8");try{return JSON.parse(i)}catch(n){let r=n;throw r.message+=` (input: ${i})`,r}}Le.json=uk;function pk(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?lk:ck).request(t,e),r=new Promise((o,s)=>{n.once("response",o).once("error",s).end()});return n.then=r.then.bind(r),n}Le.req=pk});var Sx=_(Ve=>{"use strict";var _x=Ve&&Ve.__createBinding||(Object.create?function(t,e,i,n){n===void 0&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){n===void 0&&(n=i),t[n]=e[i]}),dk=Ve&&Ve.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ex=Ve&&Ve.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&_x(e,t,i);return dk(e,t),e},fk=Ve&&Ve.__exportStar||function(t,e){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(e,i)&&_x(e,t,i)};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Agent=void 0;var mk=Ex(R("net")),wx=Ex(R("http")),hk=R("https");fk(bx(),Ve);var _t=Symbol("AgentBaseInternalState"),Il=class extends wx.Agent{constructor(e){super(e),this[_t]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:i}=new Error;return typeof i!="string"?!1:i.split(`
|
|
78
|
+
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let i=new mk.Socket({writable:!1});return this.sockets[e].push(i),this.totalSocketCount++,i}decrementSockets(e,i){if(!this.sockets[e]||i===null)return;let n=this.sockets[e],r=n.indexOf(i);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?hk.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,i,n){let r={...i,secureEndpoint:this.isSecureEndpoint(i)},o=this.getName(r),s=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,r)).then(a=>{if(this.decrementSockets(o,s),a instanceof wx.Agent)try{return a.addRequest(e,r)}catch(c){return n(c)}this[_t].currentSocket=a,super.createSocket(e,i,n)},a=>{this.decrementSockets(o,s),n(a)})}createConnection(){let e=this[_t].currentSocket;if(this[_t].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[_t].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[_t]&&(this[_t].defaultPort=e)}get protocol(){return this[_t].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[_t]&&(this[_t].protocol=e)}};Ve.Agent=Il});var Ox=_(tn=>{"use strict";var gk=tn&&tn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tn,"__esModule",{value:!0});tn.parseProxyResponse=void 0;var vk=gk(fi()),Go=(0,vk.default)("https-proxy-agent:parse-proxy-response");function xk(t){return new Promise((e,i)=>{let n=0,r=[];function o(){let u=t.read();u?l(u):t.once("readable",o)}function s(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",o)}function a(){s(),Go("onend"),i(new Error("Proxy connection ended before receiving CONNECT response"))}function c(u){s(),Go("onerror %o",u),i(u)}function l(u){r.push(u),n+=u.length;let p=Buffer.concat(r,n),f=p.indexOf(`\r
|
|
79
|
+
\r
|
|
80
|
+
`);if(f===-1){Go("have not received end of HTTP headers yet..."),o();return}let m=p.slice(0,f).toString("ascii").split(`\r
|
|
81
|
+
`),d=m.shift();if(!d)return t.destroy(),i(new Error("No header received from proxy CONNECT response"));let g=d.split(" "),v=+g[1],x=g.slice(2).join(" "),y={};for(let w of m){if(!w)continue;let O=w.indexOf(":");if(O===-1)return t.destroy(),i(new Error(`Invalid header from proxy CONNECT response: "${w}"`));let C=w.slice(0,O).toLowerCase(),k=w.slice(O+1).trimStart(),N=y[C];typeof N=="string"?y[C]=[N,k]:Array.isArray(N)?N.push(k):y[C]=k}Go("got proxy server response: %o %o",d,y),s(),e({connect:{statusCode:v,statusText:x,headers:y},buffered:p})}t.on("error",c),t.on("end",a),o()})}tn.parseProxyResponse=xk});var kx=_(Ze=>{"use strict";var yk=Ze&&Ze.__createBinding||(Object.create?function(t,e,i,n){n===void 0&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){n===void 0&&(n=i),t[n]=e[i]}),bk=Ze&&Ze.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Px=Ze&&Ze.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&yk(e,t,i);return bk(e,t),e},Cx=Ze&&Ze.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.HttpsProxyAgent=void 0;var Wo=Px(R("net")),Rx=Px(R("tls")),wk=Cx(R("assert")),_k=Cx(fi()),Ek=Sx(),Sk=R("url"),Ok=Ox(),Yn=(0,_k.default)("https-proxy-agent"),Tx=t=>t.servername===void 0&&t.host&&!Wo.isIP(t.host)?{...t,servername:t.host}:t,Ko=class extends Ek.Agent{constructor(e,i){super(i),this.options={path:void 0},this.proxy=typeof e=="string"?new Sk.URL(e):e,this.proxyHeaders=i?.headers??{},Yn("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...i?Ax(i,"headers"):null,host:n,port:r}}async connect(e,i){let{proxy:n}=this;if(!i.host)throw new TypeError('No "host" provided');let r;n.protocol==="https:"?(Yn("Creating `tls.Socket`: %o",this.connectOpts),r=Rx.connect(Tx(this.connectOpts))):(Yn("Creating `net.Socket`: %o",this.connectOpts),r=Wo.connect(this.connectOpts));let o=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Wo.isIPv6(i.host)?`[${i.host}]`:i.host,a=`CONNECT ${s}:${i.port} HTTP/1.1\r
|
|
82
|
+
`;if(n.username||n.password){let f=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}o.Host=`${s}:${i.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(o))a+=`${f}: ${o[f]}\r
|
|
83
|
+
`;let c=(0,Ok.parseProxyResponse)(r);r.write(`${a}\r
|
|
84
|
+
`);let{connect:l,buffered:u}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)return e.once("socket",Rk),i.secureEndpoint?(Yn("Upgrading socket connection to TLS"),Rx.connect({...Ax(Tx(i),"host","path","port"),socket:r})):r;r.destroy();let p=new Wo.Socket({writable:!1});return p.readable=!0,e.once("socket",f=>{Yn("Replaying proxy buffer for failed request"),(0,wk.default)(f.listenerCount("data")>0),f.push(u),f.push(null)}),p}};Ko.protocols=["http","https"];Ze.HttpsProxyAgent=Ko;function Rk(t){t.resume()}function Ax(t,...e){let i={},n;for(n in t)e.includes(n)||(i[n]=t[n]);return i}});var Bx={};ls(Bx,{PerMessageDeflate:()=>jx.default,Receiver:()=>Nx.default,Sender:()=>Fx.default,WebSocket:()=>Dl.default,WebSocketServer:()=>Mx.default,createWebSocketStream:()=>Ix.default,default:()=>Tk,extension:()=>Dx.default,subprotocol:()=>Lx.default});var Ix,Dx,jx,Nx,Fx,Lx,Dl,Mx,Tk,$x=A(()=>{Ix=Ee(Wa(),1),Dx=Ee(yn(),1),jx=Ee(ei(),1),Nx=Ee(eo(),1),Fx=Ee(io(),1),Lx=Ee(ao(),1),Dl=Ee(bn(),1),Mx=Ee(Ja(),1),Tk=Dl.default});var fy={};ls(fy,{Communicate:()=>oy,EdgeTTS:()=>Hk,EdgeTTSBrowser:()=>dI,EdgeTTSException:()=>yi,FetchError:()=>Qn,IsomorphicCommunicate:()=>ly,IsomorphicDRM:()=>ir,IsomorphicEdgeTTS:()=>sI,IsomorphicVoicesManager:()=>rI,NoAudioReceived:()=>jl,SkewAdjustmentError:()=>Dt,SubMaker:()=>qk,UnexpectedResponse:()=>Me,UniversalCommunicate:()=>ly,UniversalDRM:()=>ir,UniversalEdgeTTS:()=>Hk,UniversalEdgeTTS_Isomorphic:()=>sI,UniversalFetchError:()=>Qn,UniversalVoicesManager:()=>rI,UnknownResponse:()=>er,ValueError:()=>tr,VoicesManager:()=>zk,WebSocketError:()=>Nl,createSRT:()=>Wk,createSRTBrowser:()=>mI,createSRTIsomorphic:()=>cI,createSRTUniversal_Isomorphic:()=>cI,createVTT:()=>Gk,createVTTBrowser:()=>fI,createVTTIsomorphic:()=>aI,createVTTUniversal_Isomorphic:()=>aI,listVoices:()=>sy,listVoicesIsomorphic:()=>uy,listVoicesUniversal:()=>uy});import{createHash as Ak,randomBytes as Pk}from"crypto";function Ck(t){let e=t.indexOf(`\r
|
|
85
|
+
\r
|
|
86
|
+
`),i={},n=t.subarray(0,e).toString("utf-8");if(n){let r=n.split(`\r
|
|
87
|
+
`);for(let o of r){let[s,a]=o.split(":",2);s&&a&&(i[s]=a.trim())}}return[i,t.subarray(e+2)]}function kk(t){let e=t.readUInt16BE(0),i={},n=t.subarray(2,e+2).toString("utf-8");if(n){let r=n.split(`\r
|
|
88
|
+
`);for(let o of r){let[s,a]=o.split(":",2);s&&a&&(i[s]=a.trim())}}return[i,t.subarray(e+2)]}function Ik(t){return t.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g," ")}function Ux(){return Pa().replace(/-/g,"")}function Dk(t,e){let i=t.subarray(0,e),n=i.lastIndexOf(`
|
|
89
|
+
`);return n<0&&(n=i.lastIndexOf(" ")),n}function jk(t){let e=t.length;for(;e>0;){if(t.subarray(0,e).toString("utf-8").endsWith("\uFFFD")){e--;continue}return e}return e}function Nk(t,e){let i=t.lastIndexOf("&",e-1);for(;i!==-1;){let n=t.indexOf(";",i);if(n!==-1&&n<e)break;e=i,i=t.lastIndexOf("&",e-1)}return e}function*Fk(t,e){let i=Buffer.isBuffer(t)?t:Buffer.from(t,"utf-8");for(;i.length>e;){let r=Dk(i,e);if(r<0&&(r=jk(i.subarray(0,e))),r=Nk(i,r),r<=0)throw new tr("Maximum byte length is too small or invalid text structure near '&' or invalid UTF-8");let s=i.subarray(0,r).toString("utf-8").trim();s&&(yield Buffer.from(s,"utf-8")),i=i.subarray(r)}let n=i.toString("utf-8").trim();n&&(yield Buffer.from(n,"utf-8"))}function Lk(t,e){let i=Buffer.isBuffer(e)?e.toString("utf-8"):e;return`<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice name='${t.voice}'><prosody pitch='${t.pitch}' rate='${t.rate}' volume='${t.volume}'>${i}</prosody></voice></speak>`}function qx(){return new Date().toUTCString().replace("GMT","GMT+0000 (Coordinated Universal Time)")}function Mk(t,e,i){return`X-RequestId:${t}\r
|
|
90
|
+
Content-Type:application/ssml+xml\r
|
|
91
|
+
X-Timestamp:${e}Z\r
|
|
92
|
+
Path:ssml\r
|
|
93
|
+
\r
|
|
94
|
+
${i}`}function Bk(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Vx(t){let e=Math.floor(t/3600),i=Math.floor(t%3600/60),n=Math.floor(t%60),r=Math.round((t-Math.floor(t))*1e3),o=(s,a=2)=>s.toString().padStart(a,"0");return`${o(e)}:${o(i)}:${o(n)},${o(r,3)}`}function Vk(t){try{let e=new URL(t);return{host:e.hostname,port:parseInt(e.port),protocol:e.protocol}}catch{return!1}}async function zx(t){let e=`${Zx}&Sec-MS-GEC=${Zn.generateSecMsGec()}&Sec-MS-GEC-Version=${rr}`,n=(await Ho.get(e,{headers:ny,proxy:t?Vk(t):!1})).data;for(let r of n)r.VoiceTag.ContentCategories=r.VoiceTag.ContentCategories.map(o=>o.trim()),r.VoiceTag.VoicePersonalities=r.VoiceTag.VoicePersonalities.map(o=>o.trim());return n}async function sy(t){try{return await zx(t)}catch(e){if(e instanceof kl&&e.response?.status===403)return Zn.handleClientResponseError(e),await zx(t);throw e}}function es(t,e){let i=Math.floor(t/1e7),n=Math.floor(i/3600),r=Math.floor(i%3600/60),o=i%60,s=Math.floor(t%1e7/1e4),a=e==="vtt"?".":",";return`${Yo(n)}:${Yo(r)}:${Yo(o)}${a}${Yo(s,3)}`}function Yo(t,e=2){return t.toString().padStart(e,"0")}function Gk(t){let e=`WEBVTT
|
|
95
|
+
|
|
96
|
+
`;return t.forEach((i,n)=>{let r=es(i.offset,"vtt"),o=es(i.offset+i.duration,"vtt");e+=`${n+1}
|
|
97
|
+
`,e+=`${r} --> ${o}
|
|
98
|
+
`,e+=`${i.text}
|
|
99
|
+
|
|
100
|
+
`}),e}function Wk(t){let e="";return t.forEach((i,n)=>{let r=es(i.offset,"srt"),o=es(i.offset+i.duration,"srt");e+=`${n+1}
|
|
101
|
+
`,e+=`${r} --> ${o}
|
|
102
|
+
`,e+=`${i.text}
|
|
103
|
+
|
|
104
|
+
`}),e}function Hx(){let t=new Uint8Array(16);globalThis.crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let e=Array.from(t,n=>n.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`.replace(/-/g,"")}function Kk(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Jk(t){return t.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function Gx(t){return t||(t=new Date),t.toISOString().replace(/[-:.]/g,"").slice(0,-1)}function Yk(t){let e='*/()[]{}$%^@#+=|\\~`><"&',i=t;for(let n of e)i=i.replace(new RegExp("\\"+n,"g"),"");return i}function Xk(t,e){let i=e instanceof Uint8Array?new TextDecoder().decode(e):e;return`<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice name='${t.voice}'><prosody pitch='${t.pitch}' rate='${t.rate}' volume='${t.volume}'>${i}</prosody></voice></speak>`}function Zk(t,e){let i=new TextEncoder,n=t.split(/(\s+)/),r=[],o="";for(let s of n){let a=o+s;if(i.encode(a).length<=e)o=a;else if(o)r.push(o.trim()),o=s;else{let c=i.encode(s);for(let l=0;l<c.length;l+=e){let u=c.slice(l,l+e);r.push(new TextDecoder().decode(u))}o=""}}return o.trim()&&r.push(o.trim()),r}function Qk(t,e,i){return`X-RequestId:${t}\r
|
|
105
|
+
Content-Type:application/ssml+xml\r
|
|
106
|
+
X-Timestamp:${e}Z\r
|
|
107
|
+
Path:ssml\r
|
|
108
|
+
\r
|
|
109
|
+
${i}`}function iI(t){let e=xi.toString(t),i=e.indexOf(`\r
|
|
110
|
+
\r
|
|
111
|
+
`),n={};if(i!==-1){let s=e.substring(0,i).split(`\r
|
|
112
|
+
`);for(let a of s){let[c,l]=a.split(":",2);c&&l&&(n[c]=l.trim())}}let r=new TextEncoder().encode(e.substring(0,i+4)).length;return[n,t.slice(r)]}function nI(t){if(t.length<2)throw new Error("Message too short to contain header length");let e=t[0]<<8|t[1],i={};if(e>0&&e+2<=t.length){let n=t.slice(2,e+2),o=xi.toString(n).split(`\r
|
|
113
|
+
`);for(let s of o){let[a,c]=s.split(":",2);a&&c&&(i[a]=c.trim())}}return[i,t.slice(e+2)]}async function Wx(t){let e=`${Zx}&Sec-MS-GEC=${await ir.generateSecMsGec()}&Sec-MS-GEC-Version=${rr}`,i={headers:ny};t&&console.warn("Proxy support in isomorphic environment is limited. Consider using a backend proxy.");try{let n=await fetch(e,i);if(!n.ok){let o={};throw n.headers.forEach((s,a)=>{o[a]=s}),new Qn(`HTTP ${n.status}`,{status:n.status,headers:o})}let r=await n.json();for(let o of r)o.VoiceTag.ContentCategories=o.VoiceTag.ContentCategories.map(s=>s.trim()),o.VoiceTag.VoicePersonalities=o.VoiceTag.VoicePersonalities.map(s=>s.trim());return r}catch(n){throw n instanceof Qn?n:new Qn(n instanceof Error?n.message:"Unknown fetch error")}}async function uy(t){try{return await Wx(t)}catch(e){if(e instanceof Qn&&e.response?.status===403)return ir.handleClientResponseError(e.response),await Wx(t);throw e}}function oI(t){if(t.length===0)return new Uint8Array(0);if(t.length===1)return t[0];let e=t.reduce((r,o)=>r+o.length,0),i=new Uint8Array(e),n=0;for(let r of t)r.length>0&&(i.set(r,n),n+=r.length);return i}function ts(t,e){let i=Math.floor(t/1e7),n=Math.floor(i/3600),r=Math.floor(i%3600/60),o=i%60,s=Math.floor(t%1e7/1e4),a=e==="vtt"?".":",";return`${Xo(n)}:${Xo(r)}:${Xo(o)}${a}${Xo(s,3)}`}function Xo(t,e=2){return t.toString().padStart(e,"0")}function aI(t){let e=`WEBVTT
|
|
114
|
+
|
|
115
|
+
`;return t.forEach((i,n)=>{let r=ts(i.offset,"vtt"),o=ts(i.offset+i.duration,"vtt");e+=`${n+1}
|
|
116
|
+
`,e+=`${r} --> ${o}
|
|
117
|
+
`,e+=`${i.text}
|
|
118
|
+
|
|
119
|
+
`}),e}function cI(t){let e="";return t.forEach((i,n)=>{let r=ts(i.offset,"srt"),o=ts(i.offset+i.duration,"srt");e+=`${n+1}
|
|
120
|
+
`,e+=`${r} --> ${o}
|
|
121
|
+
`,e+=`${i.text}
|
|
122
|
+
|
|
123
|
+
`}),e}function is(t,e){let i=Math.floor(t/1e7),n=Math.floor(i/3600),r=Math.floor(i%3600/60),o=i%60,s=Math.floor(t%1e7/1e4),a=e==="vtt"?".":",";return`${Zo(n)}:${Zo(r)}:${Zo(o)}${a}${Zo(s,3)}`}function Zo(t,e=2){return t.toString().padStart(e,"0")}function fI(t){let e=`WEBVTT
|
|
124
|
+
|
|
125
|
+
`;return t.forEach((i,n)=>{let r=is(i.offset,"vtt"),o=is(i.offset+i.duration,"vtt");e+=`${n+1}
|
|
126
|
+
`,e+=`${r} --> ${o}
|
|
127
|
+
`,e+=`${i.text}
|
|
128
|
+
|
|
129
|
+
`}),e}function mI(t){let e="";return t.forEach((i,n)=>{let r=is(i.offset,"srt"),o=is(i.offset+i.duration,"srt");e+=`${n+1}
|
|
130
|
+
`,e+=`${r} --> ${o}
|
|
131
|
+
`,e+=`${i.text}
|
|
132
|
+
|
|
133
|
+
`}),e}var Kx,Jx,yi,Dt,er,Me,jl,Nl,tr,Yx,Xx,nr,Fl,Zx,Qx,ey,Qo,rr,ty,iy,ny,$k,Uk,ry,Zn,Jo,oy,qk,zk,Hk,eI,tI,cy,ir,xi,ly,Qn,rI,sI,lI,uI,dy,pI,dI,my=A(()=>{jd();Kx=Ee(Fd(),1),Jx=Ee(Vf(),1);vx();yi=class extends Error{constructor(t){super(t),this.name="EdgeTTSException"}},Dt=class extends yi{constructor(t){super(t),this.name="SkewAdjustmentError"}},er=class extends yi{constructor(t){super(t),this.name="UnknownResponse"}},Me=class extends yi{constructor(t){super(t),this.name="UnexpectedResponse"}},jl=class extends yi{constructor(t){super(t),this.name="NoAudioReceived"}},Nl=class extends yi{constructor(t){super(t),this.name="WebSocketError"}},tr=class extends yi{constructor(t){super(t),this.name="ValueError"}};Yx=class Xn{constructor({voice:e,rate:i="+0%",volume:n="+0%",pitch:r="+0Hz"}){this.voice=e,this.rate=i,this.volume=n,this.pitch=r,this.validate()}validate(){let e=/^([a-z]{2,})-([A-Z]{2,})-(.+Neural)$/.exec(this.voice);if(e){let[,i]=e,[,,n,r]=e;if(r.includes("-")){let o=r.split("-");n+=`-${o[0]}`,r=o[1]}this.voice=`Microsoft Server Speech Text to Speech Voice (${i}-${n}, ${r})`}Xn.validateStringParam("voice",this.voice,/^Microsoft Server Speech Text to Speech Voice \(.+,.+\)$/),Xn.validateStringParam("rate",this.rate,/^[+-]\d+%$/),Xn.validateStringParam("volume",this.volume,/^[+-]\d+%$/),Xn.validateStringParam("pitch",this.pitch,/^[+-]\d+Hz$/)}static validateStringParam(e,i,n){if(typeof i!="string")throw new TypeError(`${e} must be a string`);if(!n.test(i))throw new tr(`Invalid ${e} '${i}'.`)}},Xx="speech.platform.bing.com/consumer/speech/synthesize/readaloud",nr="6A5AA1D4EAFF4E9FB37E23D68491D6F4",Fl=`wss://${Xx}/edge/v1?TrustedClientToken=${nr}`,Zx=`https://${Xx}/voices/list?trustedclienttoken=${nr}`,Qx="en-US-EmmaMultilingualNeural",ey="143.0.3650.75",Qo=ey.split(".")[0],rr=`1-${ey}`,ty={"User-Agent":`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${Qo}.0.0.0 Safari/537.36 Edg/${Qo}.0.0.0`,"Accept-Encoding":"gzip, deflate, br, zstd","Accept-Language":"en-US,en;q=0.9"},iy={...ty,Pragma:"no-cache","Cache-Control":"no-cache",Origin:"chrome-extension://jdiccldimpdaibmpdkjnbmckianbfold","Sec-WebSocket-Version":"13"},ny={...ty,Authority:"speech.platform.bing.com","Sec-CH-UA":`" Not;A Brand";v="99", "Microsoft Edge";v="${Qo}", "Chromium";v="${Qo}"`,"Sec-CH-UA-Mobile":"?0",Accept:"*/*","Sec-Fetch-Site":"none","Sec-Fetch-Mode":"cors","Sec-Fetch-Dest":"empty"},$k=11644473600,Uk=1e9,ry=class Vt{static adjClockSkewSeconds(e){Vt.clockSkewSeconds+=e}static getUnixTimestamp(){return Date.now()/1e3+Vt.clockSkewSeconds}static parseRfc2616Date(e){try{return new Date(e).getTime()/1e3}catch{return null}}static handleClientResponseError(e){if(!e.response||!e.response.headers)throw new Dt("No server date in headers.");let i=e.response.headers.date;if(!i||typeof i!="string")throw new Dt("No server date in headers.");let n=Vt.parseRfc2616Date(i);if(n===null)throw new Dt(`Failed to parse server date: ${i}`);let r=Vt.getUnixTimestamp();Vt.adjClockSkewSeconds(n-r)}static generateSecMsGec(){let e=Vt.getUnixTimestamp();e+=$k,e-=e%300,e*=Uk/100;let i=`${e.toFixed(0)}${nr}`;return Ak("sha256").update(i,"ascii").digest("hex").toUpperCase()}static generateMuid(){return Pk(16).toString("hex").toUpperCase()}static headersWithMuid(e){return{...e,Cookie:`muid=${Vt.generateMuid()};`}}};ry.clockSkewSeconds=0;Zn=ry,oy=class{constructor(t,e={}){if(this.state={partialText:Buffer.from(""),offsetCompensation:0,lastDurationOffset:0,streamWasCalled:!1},this.ttsConfig=new Yx({voice:e.voice||Qx,rate:e.rate,volume:e.volume,pitch:e.pitch}),typeof t!="string")throw new TypeError("text must be a string");this.texts=Fk((0,Kx.default)(Ik(t)),4096),this.proxy=e.proxy,this.connectionTimeout=e.connectionTimeout}parseMetadata(t){let e=JSON.parse(t.toString("utf-8"));for(let i of e.Metadata){let n=i.Type;if(n==="WordBoundary"||n==="SentenceBoundary"){let r=i.Data.Offset+this.state.offsetCompensation,o=i.Data.Duration;return{type:n,offset:r,duration:o,text:Bk(i.Data.text.Text)}}if(n!=="SessionEnd")throw new er(`Unknown metadata type: ${n}`)}throw new Me("No WordBoundary metadata found")}async*_stream(){let t=`${Fl}&Sec-MS-GEC=${Zn.generateSecMsGec()}&Sec-MS-GEC-Version=${rr}&ConnectionId=${Ux()}`,e;if(this.proxy){if(!Jo)try{Jo=(await Promise.resolve().then(()=>Ee(kx(),1))).HttpsProxyAgent}catch(s){console.warn("https-proxy-agent not available:",s)}Jo&&(e=new Jo(this.proxy))}let i=new Jx.default(t,{headers:Zn.headersWithMuid(iy),timeout:this.connectionTimeout,agent:e}),n=[],r=null;i.on("message",(s,a)=>{if(a)if(s.length<2)n.push(new Me("We received a binary message, but it is missing the header length."));else if(s.readUInt16BE(0)>s.length)n.push(new Me("The header length is greater than the length of the data."));else{let[l,u]=kk(s);l.Path!=="audio"?n.push(new Me("Received binary message, but the path is not audio.")):l["Content-Type"]!=="audio/mpeg"?u.length>0&&n.push(new Me("Received binary message, but with an unexpected Content-Type.")):u.length===0?n.push(new Me("Received binary message, but it is missing the audio data.")):n.push({type:"audio",data:u})}else{let[c,l]=Ck(s),u=c.Path;if(u==="audio.metadata")try{let p=this.parseMetadata(l);this.state.lastDurationOffset=p.offset+p.duration,n.push(p)}catch(p){n.push(p)}else u==="turn.end"?(this.state.offsetCompensation=this.state.lastDurationOffset,this.state.offsetCompensation+=875e4,i.close()):u!=="response"&&u!=="turn.start"&&n.push(new er(`Unknown path received: ${u}`))}r&&r()}),i.on("error",s=>{n.push(new Nl(s.message)),r&&r()}),i.on("close",()=>{n.push("close"),r&&r()}),await new Promise(s=>i.on("open",s)),i.send(`X-Timestamp:${qx()}\r
|
|
134
|
+
Content-Type:application/json; charset=utf-8\r
|
|
135
|
+
Path:speech.config\r
|
|
136
|
+
\r
|
|
137
|
+
{"context":{"synthesis":{"audio":{"metadataoptions":{"sentenceBoundaryEnabled":"false","wordBoundaryEnabled":"true"},"outputFormat":"audio-24khz-48kbitrate-mono-mp3"}}}}\r
|
|
138
|
+
`),i.send(Mk(Ux(),qx(),Lk(this.ttsConfig,this.state.partialText)));let o=!1;for(;;)if(n.length>0){let s=n.shift();if(s==="close"){if(!o)throw new jl("No audio was received.");break}else{if(s instanceof Error)throw s;s.type==="audio"&&(o=!0),yield s}}else await new Promise(s=>{r=s,setTimeout(s,50)})}async*stream(){if(this.state.streamWasCalled)throw new Error("stream can only be called once.");this.state.streamWasCalled=!0;for(let t of this.texts){this.state.partialText=t;try{for await(let e of this._stream())yield e}catch(e){if(e instanceof kl&&e.response?.status===403){Zn.handleClientResponseError(e);for await(let i of this._stream())yield i}else throw e}}}};qk=class{constructor(){this.cues=[]}feed(t){if(t.type!=="WordBoundary"||t.offset===void 0||t.duration===void 0||t.text===void 0)throw new tr("Invalid message type, expected 'WordBoundary' with offset, duration and text");let e=t.offset/1e7,i=(t.offset+t.duration)/1e7;this.cues.push({index:this.cues.length+1,start:e,end:i,content:t.text})}mergeCues(t){if(t<=0)throw new tr("Invalid number of words to merge, expected > 0");if(this.cues.length===0)return;let e=[],i=this.cues[0];for(let n of this.cues.slice(1))i.content.split(" ").length<t?i={...i,end:n.end,content:`${i.content} ${n.content}`}:(e.push(i),i=n);e.push(i),this.cues=e.map((n,r)=>({...n,index:r+1}))}getSrt(){return this.cues.map(t=>`${t.index}\r
|
|
139
|
+
${Vx(t.start)} --> ${Vx(t.end)}\r
|
|
140
|
+
${t.content}\r
|
|
141
|
+
`).join(`\r
|
|
142
|
+
`)}toString(){return this.getSrt()}};zk=class ay{constructor(){this.voices=[],this.calledCreate=!1}static async create(e,i){let n=new ay,r=e??await sy(i);return n.voices=r.map(o=>({...o,Language:o.Locale.split("-")[0]})),n.calledCreate=!0,n}find(e){if(!this.calledCreate)throw new Error("VoicesManager.find() called before VoicesManager.create()");return this.voices.filter(i=>Object.entries(e).every(([n,r])=>i[n]===r))}},Hk=class{constructor(t,e="Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoxiaoNeural)",i={}){this.text=t,this.voice=e,this.rate=i.rate||"+0%",this.volume=i.volume||"+0%",this.pitch=i.pitch||"+0Hz"}async synthesize(){let t=new oy(this.text,{voice:this.voice,rate:this.rate,volume:this.volume,pitch:this.pitch}),e=[],i=[];for await(let o of t.stream())o.type==="audio"&&o.data?e.push(o.data):o.type==="WordBoundary"&&o.offset!==void 0&&o.duration!==void 0&&o.text!==void 0&&i.push({offset:o.offset,duration:o.duration,text:o.text});let n=Buffer.concat(e);return{audio:new Blob([n],{type:"audio/mpeg"}),subtitle:i}}};eI=11644473600,tI=1e9,cy=class zt{static adjClockSkewSeconds(e){zt.clockSkewSeconds+=e}static getUnixTimestamp(){return Date.now()/1e3+zt.clockSkewSeconds}static parseRfc2616Date(e){try{return new Date(e).getTime()/1e3}catch{return null}}static handleClientResponseError(e){let i=null;if("headers"in e&&typeof e.headers=="object")if("get"in e.headers&&typeof e.headers.get=="function")i=e.headers.get("date");else{let o=e.headers;i=o.date||o.Date}if(!i)throw new Dt("No server date in headers.");let n=zt.parseRfc2616Date(i);if(n===null)throw new Dt(`Failed to parse server date: ${i}`);let r=zt.getUnixTimestamp();zt.adjClockSkewSeconds(n-r)}static async generateSecMsGec(){let e=zt.getUnixTimestamp();e+=eI,e-=e%300,e*=tI/100;let i=`${e.toFixed(0)}${nr}`;if(!globalThis.crypto||!globalThis.crypto.subtle)throw new Error("Web Crypto API not available");let r=new TextEncoder().encode(i),o=await globalThis.crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(o)).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase()}static generateMuid(){let e=new Uint8Array(16);return globalThis.crypto.getRandomValues(e),Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("").toUpperCase()}static headersWithMuid(e){return{...e,Cookie:`muid=${zt.generateMuid()};`}}};cy.clockSkewSeconds=0;ir=cy,xi={from:(t,e)=>{if(typeof t=="string")return new TextEncoder().encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(t instanceof Uint8Array)return t;throw new Error("Unsupported input type for IsomorphicBuffer.from")},concat:t=>{let e=t.reduce((r,o)=>r+o.length,0),i=new Uint8Array(e),n=0;for(let r of t)i.set(r,n),n+=r.length;return i},isBuffer:t=>t instanceof Uint8Array,toString:(t,e)=>new TextDecoder(e||"utf-8").decode(t)};ly=class{constructor(t,e={}){if(this.state={partialText:xi.from(""),offsetCompensation:0,lastDurationOffset:0,streamWasCalled:!1},this.ttsConfig=new Yx({voice:e.voice||Qx,rate:e.rate,volume:e.volume,pitch:e.pitch}),typeof t!="string")throw new TypeError("text must be a string");let i=Kk(Yk(t)),n=4096;this.texts=function*(){for(let r of Zk(i,n))yield new TextEncoder().encode(r)}()}parseMetadata(t){let e=JSON.parse(xi.toString(t));for(let i of e.Metadata){let n=i.Type;if(n==="WordBoundary"||n==="SentenceBoundary"){let r=i.Data.Offset+this.state.offsetCompensation,o=i.Data.Duration;return{type:n,offset:r,duration:o,text:Jk(i.Data.text.Text)}}if(n!=="SessionEnd")throw new er(`Unknown metadata type: ${n}`)}throw new Me("No WordBoundary metadata found")}async createWebSocket(t){if(typeof globalThis<"u"?globalThis.process?.versions?.node!==void 0:typeof process<"u"&&process.versions?.node!==void 0)try{let{default:i}=await Promise.resolve().then(()=>($x(),Bx));return new i(t,{headers:ir.headersWithMuid(iy)})}catch{return console.warn("ws library not available, using native WebSocket without headers"),new WebSocket(t)}else return new WebSocket(t)}async*_stream(){let t=`${Fl}&Sec-MS-GEC=${await ir.generateSecMsGec()}&Sec-MS-GEC-Version=${rr}&ConnectionId=${Hx()}`,e=await this.createWebSocket(t),i=[],n=null,r=(a,c)=>{let l=a.data||a;if(!(c??(l instanceof ArrayBuffer||l instanceof Uint8Array))&&typeof l=="string"){let[p,f]=iI(xi.from(l)),m=p.Path;if(m==="audio.metadata")try{let d=this.parseMetadata(f);this.state.lastDurationOffset=d.offset+d.duration,i.push(d)}catch(d){i.push(d)}else m==="turn.end"?(this.state.offsetCompensation=this.state.lastDurationOffset,this.state.offsetCompensation+=875e4,e.close()):m!=="response"&&m!=="turn.start"&&i.push(new er(`Unknown path received: ${m}`))}else{let p;if(l instanceof ArrayBuffer)p=xi.from(l);else if(l instanceof Uint8Array)p=l;else if(typeof Buffer<"u"&&l instanceof Buffer)p=new Uint8Array(l);else if(typeof Blob<"u"&&l instanceof Blob){l.arrayBuffer().then(f=>{let m=new Uint8Array(f);o(m)}).catch(f=>{i.push(new Me(`Failed to process Blob data: ${f.message}`)),n&&n()});return}else{i.push(new Me(`Unknown binary data type: ${typeof l} ${l.constructor?.name}`));return}o(p)}n&&n()},o=a=>{if(a.length<2)i.push(new Me("We received a binary message, but it is missing the header length."));else{let[c,l]=nI(a);c.Path!=="audio"?i.push(new Me("Received binary message, but the path is not audio.")):c["Content-Type"]!=="audio/mpeg"?l.length>0&&i.push(new Me("Received binary message, but with an unexpected Content-Type.")):l.length===0?i.push(new Me("Received binary message, but it is missing the audio data.")):i.push({type:"audio",data:l})}};e.onmessage=r,e.onerror=a=>{i.push(new Nl(a.message||"WebSocket error")),n&&n()},e.onclose=()=>{i.push("close"),n&&n()},await new Promise((a,c)=>{let l=()=>a(),u=p=>c(p);e.onopen=l,e.onerror=u}),e.send(`X-Timestamp:${Gx()}\r
|
|
143
|
+
Content-Type:application/json; charset=utf-8\r
|
|
144
|
+
Path:speech.config\r
|
|
145
|
+
\r
|
|
146
|
+
{"context":{"synthesis":{"audio":{"metadataoptions":{"sentenceBoundaryEnabled":"false","wordBoundaryEnabled":"true"},"outputFormat":"audio-24khz-48kbitrate-mono-mp3"}}}}\r
|
|
147
|
+
`),e.send(Qk(Hx(),Gx(),Xk(this.ttsConfig,xi.toString(this.state.partialText))));let s=!1;for(;;)if(i.length>0){let a=i.shift();if(a==="close"){if(!s)throw new jl("No audio was received.");break}else{if(a instanceof Error)throw a;a.type==="audio"&&(s=!0),yield a}}else await new Promise(a=>{n=a,setTimeout(a,50)})}async*stream(){if(this.state.streamWasCalled)throw new Error("stream can only be called once.");this.state.streamWasCalled=!0;for(let t of this.texts){this.state.partialText=t;for await(let e of this._stream())yield e}}},Qn=class extends Error{constructor(t,e){super(t),this.name="FetchError",this.response=e}};rI=class py{constructor(){this.voices=[],this.calledCreate=!1}static async create(e,i){let n=new py,r=e??await uy(i);return n.voices=r.map(o=>({...o,Language:o.Locale.split("-")[0]})),n.calledCreate=!0,n}find(e){if(!this.calledCreate)throw new Error("IsomorphicVoicesManager.find() called before IsomorphicVoicesManager.create()");return this.voices.filter(i=>Object.entries(e).every(([n,r])=>i[n]===r))}};sI=class{constructor(t,e="Microsoft Server Speech Text to Speech Voice (en-US, EmmaMultilingualNeural)",i={}){this.text=t,this.voice=e,this.rate=i.rate||"+0%",this.volume=i.volume||"+0%",this.pitch=i.pitch||"+0Hz"}async synthesize(){let t=new ly(this.text,{voice:this.voice,rate:this.rate,volume:this.volume,pitch:this.pitch}),e=[],i=[];for await(let o of t.stream())o.type==="audio"&&o.data?e.push(o.data):o.type==="WordBoundary"&&o.offset!==void 0&&o.duration!==void 0&&o.text!==void 0&&i.push({offset:o.offset,duration:o.duration,text:o.text});let n=oI(e);return{audio:new Blob([n],{type:"audio/mpeg"}),subtitle:i}}};lI=11644473600,uI=1e9,dy=class Ht{static adjClockSkewSeconds(e){Ht.clockSkewSeconds+=e}static getUnixTimestamp(){return Date.now()/1e3+Ht.clockSkewSeconds}static parseRfc2616Date(e){try{return new Date(e).getTime()/1e3}catch{return null}}static handleClientResponseError(e){if(!e.headers)throw new Dt("No headers in response.");let i=e.headers.date||e.headers.Date;if(!i)throw new Dt("No server date in headers.");let n=Ht.parseRfc2616Date(i);if(n===null)throw new Dt(`Failed to parse server date: ${i}`);let r=Ht.getUnixTimestamp();Ht.adjClockSkewSeconds(n-r)}static async generateSecMsGec(){let e=Ht.getUnixTimestamp();e+=lI,e-=e%300,e*=uI/100;let i=`${e.toFixed(0)}${nr}`,r=new TextEncoder().encode(i),o=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(o)).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase()}static generateMuid(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("").toUpperCase()}static headersWithMuid(e){return{...e,Cookie:`muid=${Ht.generateMuid()};`}}};dy.clockSkewSeconds=0;pI=dy,dI=class{constructor(t,e="Microsoft Server Speech Text to Speech Voice (en-US, EmmaMultilingualNeural)",i={}){this.ws=null,this.text=t,this.voice=e,this.rate=i.rate||"+0%",this.volume=i.volume||"+0%",this.pitch=i.pitch||"+0Hz"}async synthesize(){if(await this.connect(),!this.ws||this.ws.readyState!==WebSocket.OPEN)throw new Error("WebSocket is not connected.");return this.ws.send(this.createSpeechConfig()),this.ws.send(this.createSSML()),new Promise((t,e)=>{let i=[],n=[];this.ws&&(this.ws.onmessage=r=>{if(typeof r.data=="string"){let{headers:o,body:s}=this.parseMessage(r.data);if(o.Path==="audio.metadata")try{let a=JSON.parse(s);if(a.Metadata&&Array.isArray(a.Metadata)){let c=a.Metadata.filter(l=>l.Type==="WordBoundary"&&l.Data).map(l=>({offset:l.Data.Offset,duration:l.Data.Duration,text:l.Data.text.Text}));n=n.concat(c)}}catch{}else o.Path==="turn.end"&&this.ws&&this.ws.close()}else r.data instanceof Blob&&r.data.arrayBuffer().then(o=>{let a=new DataView(o).getUint16(0);if(o.byteLength>a+2){let c=new Uint8Array(o,a+2);i.push(c)}})},this.ws.onclose=()=>{let r=new Blob(i,{type:"audio/mpeg"});t({audio:r,subtitle:n})},this.ws.onerror=r=>{e(r)})})}async connect(){let t=this.generateConnectionId(),e=await pI.generateSecMsGec(),i=`${Fl}&Sec-MS-GEC=${e}&Sec-MS-GEC-Version=${rr}&ConnectionId=${t}`;return this.ws=new WebSocket(i),new Promise((n,r)=>{if(!this.ws)return r(new Error("WebSocket not initialized"));this.ws.onopen=()=>{n()},this.ws.onerror=o=>{r(o)}})}parseMessage(t){let e=t.split(`\r
|
|
148
|
+
\r
|
|
149
|
+
`),i=e[0].split(`\r
|
|
150
|
+
`),n={};return i.forEach(r=>{let[o,s]=r.split(":",2);o&&s&&(n[o.trim()]=s.trim())}),{headers:n,body:e[1]||""}}createSpeechConfig(){let t={context:{synthesis:{audio:{metadataoptions:{sentenceBoundaryEnabled:!1,wordBoundaryEnabled:!0},outputFormat:"audio-24khz-48kbitrate-mono-mp3"}}}};return`X-Timestamp:${this.getTimestamp()}\r
|
|
151
|
+
Content-Type:application/json; charset=utf-8\r
|
|
152
|
+
Path:speech.config\r
|
|
153
|
+
\r
|
|
154
|
+
${JSON.stringify(t)}`}createSSML(){let t=`<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'>
|
|
155
|
+
<voice name='${this.voice}'>
|
|
156
|
+
<prosody pitch='${this.pitch}' rate='${this.rate}' volume='${this.volume}'>
|
|
157
|
+
${this.escapeXml(this.text)}
|
|
158
|
+
</prosody>
|
|
159
|
+
</voice>
|
|
160
|
+
</speak>`;return`X-RequestId:${this.generateConnectionId()}\r
|
|
161
|
+
Content-Type:application/ssml+xml\r
|
|
162
|
+
X-Timestamp:${this.getTimestamp()}Z\r
|
|
163
|
+
Path:ssml\r
|
|
164
|
+
\r
|
|
165
|
+
${t}`}generateConnectionId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}getTimestamp(){return new Date().toISOString().replace(/[:-]|\.\d{3}/g,"")}escapeXml(t){return t.replace(/[<>&'"]/g,e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return e}})}}});var Ql=Ee(Zl(),1),{program:qI,createCommand:VI,createArgument:zI,createOption:HI,CommanderError:GI,InvalidArgumentError:WI,InvalidOptionArgumentError:KI,Command:he,Argument:JI,Option:YI,Help:XI}=Ql.default;var b=class extends Error{code;provider;suggestion;details;constructor(e,i,n){super(i),this.name="MediaGenError",this.code=e,this.provider=n?.provider,this.suggestion=n?.suggestion,this.details=n?.details}toJSON(){return{ok:!1,error:{code:this.code,message:this.message,...this.provider&&{provider:this.provider},...this.suggestion&&{suggestion:this.suggestion},...this.details?{details:this.details}:{}}}}};function se(t){return t instanceof b?t.toJSON():{ok:!1,error:{code:"UNKNOWN_ERROR",message:t instanceof Error?t.message:String(t)}}}var Ts=Ee(ou(),1);import{existsSync as tt,readFileSync as su,writeFileSync as lr,mkdirSync as As}from"node:fs";import{resolve as au,join as Kt}from"node:path";import{homedir as db}from"node:os";var fb=".media-gen",Ps="config.json",mb={openai:{apiKey:"OPENAI_API_KEY"},google:{apiKey:"GOOGLE_GENERATIVE_AI_API_KEY"},azure:{apiKey:"AZURE_OPENAI_API_KEY",endpoint:"AZURE_OPENAI_ENDPOINT"},elevenlabs:{apiKey:"ELEVENLABS_API_KEY"},deepgram:{apiKey:"DEEPGRAM_API_KEY"},fal:{apiKey:"FAL_KEY"},luma:{apiKey:"LUMA_API_KEY"},replicate:{apiKey:"REPLICATE_API_TOKEN"},stability:{apiKey:"STABILITY_API_KEY"},runway:{apiKey:"RUNWAY_API_KEY"},minimax:{apiKey:"MINIMAX_API_KEY"},openrouter:{apiKey:"OPENROUTER_API_KEY"}};function Jt(){return process.env.MEDIA_GEN_HOME?process.env.MEDIA_GEN_HOME:Kt(db(),".media-gen")}function cu(){let t=Jt(),e=Kt(t,".env");if(tt(e))return;tt(t)||As(t,{recursive:!0}),lr(e,`# media-gen-cli user-level configuration
|
|
166
|
+
# Uncomment and set the API keys for providers you want to use.
|
|
167
|
+
# Keys here apply to all projects unless overridden by a project-level .env
|
|
168
|
+
|
|
169
|
+
# OpenAI (images, TTS, transcription)
|
|
170
|
+
# OPENAI_API_KEY=
|
|
171
|
+
|
|
172
|
+
# Google (Imagen, Veo, Gemini TTS)
|
|
173
|
+
# GOOGLE_GENERATIVE_AI_API_KEY=
|
|
174
|
+
|
|
175
|
+
# Azure AI Services (OpenAI-compatible endpoint)
|
|
176
|
+
# AZURE_OPENAI_API_KEY=
|
|
177
|
+
# AZURE_OPENAI_ENDPOINT=https://{resource}.services.ai.azure.com/openai/v1
|
|
178
|
+
|
|
179
|
+
# ElevenLabs (TTS, voice clone, isolation)
|
|
180
|
+
# ELEVENLABS_API_KEY=
|
|
181
|
+
|
|
182
|
+
# Deepgram (transcription, translation, TTS)
|
|
183
|
+
# DEEPGRAM_API_KEY=
|
|
184
|
+
|
|
185
|
+
# Fal.ai (images, video)
|
|
186
|
+
# FAL_KEY=
|
|
187
|
+
|
|
188
|
+
# Luma AI (video)
|
|
189
|
+
# LUMA_API_KEY=
|
|
190
|
+
|
|
191
|
+
# Replicate (images, video)
|
|
192
|
+
# REPLICATE_API_TOKEN=
|
|
193
|
+
|
|
194
|
+
# Stability AI (images)
|
|
195
|
+
# STABILITY_API_KEY=
|
|
196
|
+
|
|
197
|
+
# Runway (images, video)
|
|
198
|
+
# RUNWAY_API_KEY=
|
|
199
|
+
|
|
200
|
+
# MiniMax (video, TTS)
|
|
201
|
+
# MINIMAX_API_KEY=
|
|
202
|
+
|
|
203
|
+
# OpenRouter (images, multi-provider gateway)
|
|
204
|
+
# OPENROUTER_API_KEY=
|
|
205
|
+
|
|
206
|
+
# Edge TTS is FREE - no API key needed
|
|
207
|
+
|
|
208
|
+
# Default provider and model (so --provider and --model are optional)
|
|
209
|
+
# MEDIA_GEN_DEFAULT_PROVIDER=openrouter
|
|
210
|
+
# MEDIA_GEN_DEFAULT_MODEL=openai/gpt-image-2
|
|
211
|
+
|
|
212
|
+
# Per-type overrides
|
|
213
|
+
# MEDIA_GEN_IMAGE_PROVIDER=
|
|
214
|
+
# MEDIA_GEN_IMAGE_MODEL=
|
|
215
|
+
# MEDIA_GEN_VIDEO_PROVIDER=
|
|
216
|
+
# MEDIA_GEN_VIDEO_MODEL=
|
|
217
|
+
# MEDIA_GEN_VOICE_PROVIDER=edge-tts
|
|
218
|
+
# MEDIA_GEN_VOICE_MODEL=
|
|
219
|
+
# MEDIA_GEN_VOICE_ID=en-US-EmmaMultilingualNeural
|
|
220
|
+
# MEDIA_GEN_AUDIO_PROVIDER=
|
|
221
|
+
# MEDIA_GEN_AUDIO_MODEL=
|
|
222
|
+
|
|
223
|
+
# Log level: silent, error, warn, info, debug, trace (default: error)
|
|
224
|
+
# MEDIA_GEN_LOG_LEVEL=error
|
|
225
|
+
`,"utf-8")}function lu(t){return au(t||process.cwd(),fb)}function ln(t){return Kt(lu(t),Ps)}function ur(t){let e=t||process.cwd(),i=Jt(),n=Kt(i,".env");tt(n)&&(0,Ts.config)({path:n,override:!0});let r=au(e,".env");tt(r)&&(0,Ts.config)({path:r,override:!0});let o={providers:{}},s=Kt(i,Ps);if(tt(s))try{let c=su(s,"utf-8"),l=JSON.parse(c);l.providers&&(o.providers={...l.providers}),l.defaults&&(o.defaults={...l.defaults})}catch{}let a=ln(e);if(tt(a))try{let c=su(a,"utf-8"),l=JSON.parse(c);if(l.providers)for(let[u,p]of Object.entries(l.providers))o.providers[u]={...o.providers[u],...p};l.defaults&&(o.defaults={...o.defaults,...l.defaults})}catch{}for(let[c,l]of Object.entries(mb))for(let[u,p]of Object.entries(l)){let f=process.env[p];f&&(o.providers[c]||(o.providers[c]={}),o.providers[c][u]=f)}return o}function U(t,e){return ur(e).providers[t]}var hb=new Set(["edge-tts"]);function Cs(t,e){return hb.has(t)?!0:!!U(t,e)?.apiKey}function uu(t){let e=ur(t);return Object.entries(e.providers).filter(([i,n])=>!!n.apiKey).map(([i])=>i)}function pu(t){let e=lu(t),i=ln(t);return tt(e)||As(e,{recursive:!0}),tt(i)||lr(i,JSON.stringify({providers:{},defaults:{outputDir:"./outputs"}},null,2),"utf-8"),i}function du(){let t=Jt(),e=Kt(t,Ps);if(tt(t)||As(t,{recursive:!0}),tt(e))return e;lr(e,JSON.stringify({providers:{},defaults:{}},null,2),"utf-8");let n=Kt(t,".env");return tt(n)||lr(n,`# media-gen-cli user-level configuration
|
|
226
|
+
# API keys here apply to all projects unless overridden by a project .env
|
|
227
|
+
|
|
228
|
+
OPENAI_API_KEY=
|
|
229
|
+
GOOGLE_GENERATIVE_AI_API_KEY=
|
|
230
|
+
ELEVENLABS_API_KEY=
|
|
231
|
+
DEEPGRAM_API_KEY=
|
|
232
|
+
OPENROUTER_API_KEY=
|
|
233
|
+
|
|
234
|
+
# Default provider/model
|
|
235
|
+
MEDIA_GEN_DEFAULT_PROVIDER=
|
|
236
|
+
MEDIA_GEN_DEFAULT_MODEL=
|
|
237
|
+
`,"utf-8"),e}function fu(t,e){let i=ur(e),n=t.toUpperCase(),r=process.env[`MEDIA_GEN_${n}_PROVIDER`],o=process.env[`MEDIA_GEN_${n}_MODEL`],s=process.env.MEDIA_GEN_DEFAULT_PROVIDER,a=process.env.MEDIA_GEN_DEFAULT_MODEL,c=i.defaults?.[`${t}Provider`],l=i.defaults?.[`${t}Model`];return{provider:r||s||c||void 0,model:o||a||l||void 0}}function gt(t,e,i){return t||fu(e,i).provider}function vt(t,e,i){return t||fu(e,i).model}function mu(t,e){if(t)return t;let i=process.env.MEDIA_GEN_VOICE_ID;return i||ur(e).defaults?.voiceId||void 0}var Ir=Ee(hd(),1);import{existsSync as zS,mkdirSync as HS,appendFileSync as gd}from"node:fs";import{join as xd}from"node:path";import{homedir as GS}from"node:os";var Ae,WS=!1,Ea,KS=["silent","fatal","error","warn","info","debug","trace"];function yd(){return xd(GS(),".media-gen","logs")}function JS(){let t=yd();zS(t)||HS(t,{recursive:!0})}function vd(){if(!Ea){let t=new Date().toISOString().slice(0,10);Ea=xd(yd(),`media-gen-${t}.log`)}return Ea}function YS(t){if(t)return"debug";let e=process.env.MEDIA_GEN_LOG_LEVEL?.toLowerCase();return e&&KS.includes(e)?e:"error"}function Dr(t){WS=t,JS();let e=YS(t);if(t){Ae=(0,Ir.default)({level:e,transport:{target:"pino-pretty",options:{colorize:!0,translateTime:"HH:MM:ss",ignore:"pid,hostname",destination:2}}});let n=(0,Ir.default)({level:e},{write(c){try{gd(vd(),c,"utf-8")}catch{}}}),r=Ae.debug.bind(Ae),o=Ae.info.bind(Ae),s=Ae.warn.bind(Ae),a=Ae.error.bind(Ae);Ae.debug=(...c)=>{r(...c),n.debug(...c)},Ae.info=(...c)=>{o(...c),n.info(...c)},Ae.warn=(...c)=>{s(...c),n.warn(...c)},Ae.error=(...c)=>{a(...c),n.error(...c)}}else Ae=(0,Ir.default)({level:e},{write(n){try{gd(vd(),n,"utf-8")}catch{}}})}function I(){return Ae||Dr(!1),Ae}import{existsSync as XS,mkdirSync as ZS,writeFileSync as QS}from"node:fs";import{dirname as e0}from"node:path";function t0(t){XS(t)||ZS(t,{recursive:!0})}function L(t){t0(e0(t))}function Ie(t,e){L(t),QS(t,e)}import{writeFileSync as Sa,readFileSync as jr,statSync as bd}from"node:fs";var i0={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".avi":"video/x-msvideo",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".flac":"audio/flac",".aac":"audio/aac",".m4a":"audio/mp4",".json":"application/json",".txt":"text/plain"};function B(t){let e=t.toLowerCase().match(/\.[^.]+$/)?.[0]||"";return i0[e]||"application/octet-stream"}var Nr=class{id="openai";name="OpenAI";capabilities=["image-generate","image-edit","voice-tts","audio-transcribe","audio-translate"];getApiKey(){let e=U("openai");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing OPENAI_API_KEY",{provider:"openai",suggestion:"Set OPENAI_API_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json"}}async validateConfig(){let e=U("openai"),i=[],n=[];return e?.apiKey||i.push("OPENAI_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:n}}async generateImage(e){let i=I(),n=Date.now();i.debug({model:e.model,prompt:e.prompt},"OpenAI image generation");let r={model:e.model||"gpt-image-1",prompt:e.prompt,n:e.n||1,size:e.size||"1024x1024"};e.quality&&(r.quality=e.quality),e.style&&(r.style=e.style);let o=await fetch("https://api.openai.com/v1/images/generations",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let u=(await o.json().catch(()=>({})))?.error?.message||`HTTP ${o.status}`;throw new b("API_ERROR",u,{provider:"openai"})}let a=(await o.json()).data[0];if(L(e.outputFile),a.b64_json){let l=Buffer.from(a.b64_json,"base64");Ie(e.outputFile,l)}else if(a.url){let l=await fetch(a.url),u=Buffer.from(await l.arrayBuffer());Ie(e.outputFile,u)}let c=bd(e.outputFile).size;return{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:c,durationMs:Date.now()-n,metadata:{revisedPrompt:a.revised_prompt}}}async editImage(e){let i=I(),n=Date.now();i.debug({model:e.model,prompt:e.prompt},"OpenAI image edit");let r=new FormData,o=jr(e.image);if(r.append("image",new Blob([o]),"image.png"),r.append("prompt",e.prompt),r.append("model",e.model||"gpt-image-1"),e.size&&r.append("size",e.size),e.mask){let u=jr(e.mask);r.append("mask",new Blob([u]),"mask.png")}let s=await fetch("https://api.openai.com/v1/images/edits",{method:"POST",headers:{Authorization:`Bearer ${this.getApiKey()}`},body:r});if(!s.ok){let p=(await s.json().catch(()=>({})))?.error?.message||`HTTP ${s.status}`;throw new b("API_ERROR",p,{provider:"openai"})}let c=(await s.json()).data[0];if(L(e.outputFile),c.b64_json){let u=Buffer.from(c.b64_json,"base64");Ie(e.outputFile,u)}else if(c.url){let u=await fetch(c.url),p=Buffer.from(await u.arrayBuffer());Ie(e.outputFile,p)}let l=bd(e.outputFile).size;return{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:l,durationMs:Date.now()-n}}async textToSpeech(e){let i=I(),n=Date.now();i.debug({voiceId:e.voiceId,model:e.model},"OpenAI TTS");let r={model:e.model||"tts-1",input:e.text,voice:e.voiceId,response_format:e.format||"mp3"};e.speed&&(r.speed=e.speed),e.instructions&&(r.instructions=e.instructions);let o=await fetch("https://api.openai.com/v1/audio/speech",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let c=(await o.json().catch(()=>({})))?.error?.message||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"openai"})}let s=Buffer.from(await o.arrayBuffer());return L(e.outputFile),Sa(e.outputFile,s),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:s.length,durationMs:Date.now()-n}}async transcribe(e){let i=I(),n=Date.now();i.debug({model:e.model,input:e.inputFile},"OpenAI transcription");let r=jr(e.inputFile),o=new FormData;o.append("file",new Blob([r]),"audio.mp3"),o.append("model",e.model||"whisper-1"),o.append("response_format","verbose_json"),e.language&&o.append("language",e.language);let s=await fetch("https://api.openai.com/v1/audio/transcriptions",{method:"POST",headers:{Authorization:`Bearer ${this.getApiKey()}`},body:o});if(!s.ok){let l=(await s.json().catch(()=>({})))?.error?.message||`HTTP ${s.status}`;throw new b("API_ERROR",l,{provider:"openai"})}let a=await s.json();return e.outputFile&&(L(e.outputFile),Sa(e.outputFile,JSON.stringify(a,null,2),"utf-8")),{text:a.text,outputFile:e.outputFile,segments:a.segments?.map(c=>({start:c.start,end:c.end,text:c.text})),durationMs:Date.now()-n}}async translate(e){let i=I(),n=Date.now();i.debug({model:e.model,input:e.inputFile},"OpenAI translation");let r=jr(e.inputFile),o=new FormData;o.append("file",new Blob([r]),"audio.mp3"),o.append("model",e.model||"whisper-1"),o.append("response_format","verbose_json");let s=await fetch("https://api.openai.com/v1/audio/translations",{method:"POST",headers:{Authorization:`Bearer ${this.getApiKey()}`},body:o});if(!s.ok){let l=(await s.json().catch(()=>({})))?.error?.message||`HTTP ${s.status}`;throw new b("API_ERROR",l,{provider:"openai"})}let a=await s.json();return e.outputFile&&(L(e.outputFile),Sa(e.outputFile,JSON.stringify(a,null,2),"utf-8")),{text:a.text,outputFile:e.outputFile,durationMs:Date.now()-n}}};import{statSync as n0,writeFileSync as wd}from"node:fs";var Fr=class{id="google";name="Google (Gemini / Imagen / Veo)";capabilities=["image-generate","video-generate","voice-tts"];getApiKey(){let e=U("google");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing GOOGLE_GENERATIVE_AI_API_KEY",{provider:"google",suggestion:"Set GOOGLE_GENERATIVE_AI_API_KEY in your environment or run media-gen config init."});return e.apiKey}getBaseUrl(){return"https://generativelanguage.googleapis.com/v1beta"}getHeaders(){return{"x-goog-api-key":this.getApiKey(),"Content-Type":"application/json"}}async validateConfig(){let e=U("google"),i=[],n=[];return e?.apiKey||i.push("GOOGLE_GENERATIVE_AI_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:n}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"imagen-3.0-generate-002";i.debug({model:r,prompt:e.prompt},"Google image generation");let o=`${this.getBaseUrl()}/models/${r}:predict`,s={instances:[{prompt:e.prompt}],parameters:{sampleCount:e.n||1,...e.size&&{aspectRatio:this.sizeToAspectRatio(e.size)}}},a=await fetch(o,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(s)});if(!a.ok){let f=(await a.json().catch(()=>({})))?.error?.message||`HTTP ${a.status}`;throw new b("API_ERROR",f,{provider:"google"})}let l=(await a.json()).predictions[0],u=Buffer.from(l.bytesBase64Encoded,"base64");return L(e.outputFile),Ie(e.outputFile,u),{outputFile:e.outputFile,mimeType:l.mimeType||B(e.outputFile),sizeBytes:n0(e.outputFile).size,durationMs:Date.now()-n}}async generateVideo(e){let i=I(),n=e.model||"veo-3.1-generate-preview";i.debug({model:n,prompt:e.prompt},"Google video generation");let r=`${this.getBaseUrl()}/models/${n}:predictLongRunning`,o={instances:[{prompt:e.prompt}],parameters:{...e.duration&&{durationSeconds:e.duration},...e.aspectRatio&&{aspectRatio:e.aspectRatio}}},s=await fetch(r,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!s.ok){let l=(await s.json().catch(()=>({})))?.error?.message||`HTTP ${s.status}`;throw new b("API_ERROR",l,{provider:"google"})}return{jobId:(await s.json()).name,provider:"google",status:"processing"}}async getJobStatus(e){let i=`${this.getBaseUrl()}/${e}`,n=await fetch(i,{headers:{"x-goog-api-key":this.getApiKey()}});if(!n.ok)throw new b("API_ERROR",`Failed to get job status: HTTP ${n.status}`,{provider:"google"});let r=await n.json();return r.error?{jobId:e,provider:"google",status:"failed",error:r.error.message}:r.done?{jobId:e,provider:"google",status:"completed"}:{jobId:e,provider:"google",status:"processing"}}async downloadJob(e,i){let n=Date.now(),r=`${this.getBaseUrl()}/${e}`,o=await fetch(r,{headers:{"x-goog-api-key":this.getApiKey()}});if(!o.ok)throw new b("API_ERROR",`Failed to get job result: HTTP ${o.status}`,{provider:"google"});let s=await o.json();if(!s.done||!s.response?.generateVideoResponse?.generatedSamples?.length)throw new b("JOB_FAILED","Job not yet completed or no video generated",{provider:"google"});let a=s.response.generateVideoResponse.generatedSamples[0].video?.uri;if(!a)throw new b("JOB_FAILED","No video URI in response",{provider:"google"});let c=await fetch(a,{headers:{"x-goog-api-key":this.getApiKey()},redirect:"follow"});if(!c.ok)throw new b("API_ERROR",`Failed to download video: HTTP ${c.status}`,{provider:"google"});let l=Buffer.from(await c.arrayBuffer());return L(i),wd(i,l),{outputFile:i,mimeType:B(i),sizeBytes:l.length,durationMs:Date.now()-n}}async textToSpeech(e){let i=I(),n=Date.now(),r=e.model||"gemini-3.1-flash-tts-preview",o=e.voiceId||"Kore";i.debug({model:r,voice:o},"Google Gemini TTS");let s=`${this.getBaseUrl()}/interactions`,a={model:r,input:e.text,response_format:{type:"audio"},generation_config:{speech_config:[{voice:o}]}},c=await fetch(s,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(a)});if(!c.ok){let m=(await c.json().catch(()=>({})))?.error?.message||`HTTP ${c.status}`;throw new b("API_ERROR",m,{provider:"google"})}let l=await c.json();if(!l.output_audio?.data)throw new b("API_ERROR","No audio data in response",{provider:"google"});let u=Buffer.from(l.output_audio.data,"base64"),p=this.pcmToWav(u,24e3,1,16);return L(e.outputFile),wd(e.outputFile,p),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:p.length,durationMs:Date.now()-n,metadata:{voice:o,model:r}}}pcmToWav(e,i,n,r){let o=i*n*(r/8),s=n*(r/8),a=44,c=e.length,l=Buffer.alloc(a+c);return l.write("RIFF",0),l.writeUInt32LE(36+c,4),l.write("WAVE",8),l.write("fmt ",12),l.writeUInt32LE(16,16),l.writeUInt16LE(1,20),l.writeUInt16LE(n,22),l.writeUInt32LE(i,24),l.writeUInt32LE(o,28),l.writeUInt16LE(s,32),l.writeUInt16LE(r,34),l.write("data",36),l.writeUInt32LE(c,40),e.copy(l,44),l}sizeToAspectRatio(e){let[i,n]=e.split("x").map(Number);return i===n?"1:1":i>n?"16:9":"9:16"}};import{readFileSync as _d,writeFileSync as Oa,statSync as r0}from"node:fs";var Lr=class{id="azure";name="Azure AI Services";capabilities=["image-generate","voice-tts","audio-transcribe","audio-translate"];getConfig(){let e=U("azure");if(!e?.apiKey||!e?.endpoint)throw new b("PROVIDER_NOT_CONFIGURED","Missing AZURE_OPENAI_API_KEY or AZURE_OPENAI_ENDPOINT",{provider:"azure",suggestion:"Set AZURE_OPENAI_API_KEY and AZURE_OPENAI_ENDPOINT in your environment. Endpoint format: https://{resource}.services.ai.azure.com/openai/v1"});return e}getBaseUrl(){let i=this.getConfig().endpoint;return i=i.replace(/\/+$/,""),i.includes("/openai/v1")||(i=`${i}/openai/v1`),i}getHeaders(){return{"api-key":this.getConfig().apiKey,"Content-Type":"application/json"}}async validateConfig(){let e=U("azure"),i=[],n=[];return e?.apiKey||i.push("AZURE_OPENAI_API_KEY is not set"),e?.endpoint||i.push("AZURE_OPENAI_ENDPOINT is not set"),{valid:i.length===0,errors:i,warnings:n}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"gpt-image-2";i.debug({model:r,prompt:e.prompt},"Azure image generation");let o={model:r,prompt:e.prompt,n:e.n||1,size:e.size||"1024x1024"};e.quality&&(o.quality=e.quality),e.style&&(o.style=e.style);let s=`${this.getBaseUrl()}/images/generations`,a=await fetch(s,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!a.ok){let p=(await a.json().catch(()=>({})))?.error?.message||`HTTP ${a.status}`;throw new b("API_ERROR",p,{provider:"azure"})}let l=(await a.json()).data[0];if(L(e.outputFile),l.b64_json)Ie(e.outputFile,Buffer.from(l.b64_json,"base64"));else if(l.url){let u=await fetch(l.url);Ie(e.outputFile,Buffer.from(await u.arrayBuffer()))}return{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:r0(e.outputFile).size,durationMs:Date.now()-n}}async textToSpeech(e){let i=I(),n=Date.now(),r=e.model||"gpt-4o-mini-tts";i.debug({voiceId:e.voiceId,model:r},"Azure TTS");let o={model:r,input:e.text,voice:e.voiceId,response_format:e.format||"mp3"};e.speed&&(o.speed=e.speed),e.instructions&&(o.instructions=e.instructions);let s=`${this.getBaseUrl()}/audio/speech`,a=await fetch(s,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!a.ok){let u=(await a.json().catch(()=>({})))?.error?.message||`HTTP ${a.status}`;throw new b("API_ERROR",u,{provider:"azure"})}let c=Buffer.from(await a.arrayBuffer());return L(e.outputFile),Oa(e.outputFile,c),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:c.length,durationMs:Date.now()-n}}async transcribe(e){let i=I(),n=Date.now();i.debug({input:e.inputFile,model:e.model},"Azure transcription");let r=_d(e.inputFile),o=new FormData;o.append("file",new Blob([r]),"audio.mp3"),o.append("model",e.model||"whisper-1"),o.append("response_format","verbose_json"),e.language&&o.append("language",e.language);let s=`${this.getBaseUrl()}/audio/transcriptions`,a=await fetch(s,{method:"POST",headers:{"api-key":this.getConfig().apiKey},body:o});if(!a.ok){let u=(await a.json().catch(()=>({})))?.error?.message||`HTTP ${a.status}`;throw new b("API_ERROR",u,{provider:"azure"})}let c=await a.json();return e.outputFile&&(L(e.outputFile),Oa(e.outputFile,JSON.stringify(c,null,2),"utf-8")),{text:c.text,outputFile:e.outputFile,durationMs:Date.now()-n}}async translate(e){let i=I(),n=Date.now();i.debug({input:e.inputFile},"Azure translation");let r=_d(e.inputFile),o=new FormData;o.append("file",new Blob([r]),"audio.mp3"),o.append("model",e.model||"whisper-1"),o.append("response_format","verbose_json");let s=`${this.getBaseUrl()}/audio/translations`,a=await fetch(s,{method:"POST",headers:{"api-key":this.getConfig().apiKey},body:o});if(!a.ok){let u=(await a.json().catch(()=>({})))?.error?.message||`HTTP ${a.status}`;throw new b("API_ERROR",u,{provider:"azure"})}let c=await a.json();return e.outputFile&&(L(e.outputFile),Oa(e.outputFile,JSON.stringify(c,null,2),"utf-8")),{text:c.text,outputFile:e.outputFile,durationMs:Date.now()-n}}};import{readFileSync as Ed,writeFileSync as Sd}from"node:fs";var Mr=class{id="elevenlabs";name="ElevenLabs";capabilities=["voice-tts","voice-clone","voice-isolate"];getApiKey(){let e=U("elevenlabs");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing ELEVENLABS_API_KEY",{provider:"elevenlabs",suggestion:"Set ELEVENLABS_API_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{"xi-api-key":this.getApiKey()}}async validateConfig(){let e=U("elevenlabs"),i=[];return e?.apiKey||i.push("ELEVENLABS_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async textToSpeech(e){let i=I(),n=Date.now(),r=e.model||"eleven_multilingual_v2";i.debug({voiceId:e.voiceId,model:r},"ElevenLabs TTS");let o=`https://api.elevenlabs.io/v1/text-to-speech/${e.voiceId}`,s={text:e.text,model_id:r,voice_settings:{stability:.5,similarity_boost:.75}},a=await fetch(o,{method:"POST",headers:{...this.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){let u=(await a.json().catch(()=>({})))?.detail?.message||`HTTP ${a.status}`;throw new b("API_ERROR",u,{provider:"elevenlabs"})}let c=Buffer.from(await a.arrayBuffer());return L(e.outputFile),Sd(e.outputFile,c),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:c.length,durationMs:Date.now()-n}}async cloneVoice(e){I().debug({name:e.name,files:e.files.length},"ElevenLabs voice clone");let n=new FormData;n.append("name",e.name),e.description&&n.append("description",e.description);for(let s of e.files){let a=Ed(s);n.append("files",new Blob([a]),s.split(/[/\\]/).pop())}let r=await fetch("https://api.elevenlabs.io/v1/voices/add",{method:"POST",headers:this.getHeaders(),body:n});if(!r.ok){let a=(await r.json().catch(()=>({})))?.detail?.message||`HTTP ${r.status}`;throw new b("API_ERROR",a,{provider:"elevenlabs"})}return{voiceId:(await r.json()).voice_id,name:e.name,provider:"elevenlabs"}}async isolateVoice(e){let i=I(),n=Date.now();i.debug({input:e.inputFile},"ElevenLabs voice isolation");let r=Ed(e.inputFile),o=new FormData;o.append("audio",new Blob([r]),"audio.mp3");let s=await fetch("https://api.elevenlabs.io/v1/audio-isolation",{method:"POST",headers:this.getHeaders(),body:o});if(!s.ok){let l=(await s.json().catch(()=>({})))?.detail?.message||`HTTP ${s.status}`;throw new b("API_ERROR",l,{provider:"elevenlabs"})}let a=Buffer.from(await s.arrayBuffer());return L(e.outputFile),Sd(e.outputFile,a),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:a.length,durationMs:Date.now()-n}}};import{readFileSync as Od,writeFileSync as Ra,statSync as o0}from"node:fs";var Br=class{id="deepgram";name="Deepgram";capabilities=["audio-transcribe","audio-translate","voice-tts"];getApiKey(){let e=U("deepgram");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing DEEPGRAM_API_KEY",{provider:"deepgram",suggestion:"Set DEEPGRAM_API_KEY in your environment or run media-gen config init."});return e.apiKey}async validateConfig(){let e=U("deepgram"),i=[];return e?.apiKey||i.push("DEEPGRAM_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async textToSpeech(e){let i=I(),n=Date.now(),r=e.voiceId||"aura-2-thalia-en";i.debug({voiceModel:r},"Deepgram TTS");let o=await fetch(`https://api.deepgram.com/v1/speak?model=${r}`,{method:"POST",headers:{Authorization:`Token ${this.getApiKey()}`,"Content-Type":"application/json"},body:JSON.stringify({text:e.text})});if(!o.ok){let c=(await o.json().catch(()=>({})))?.err_msg||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"deepgram"})}let s=Buffer.from(await o.arrayBuffer());return L(e.outputFile),Ra(e.outputFile,s),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:o0(e.outputFile).size,durationMs:Date.now()-n,metadata:{voiceModel:r}}}async transcribe(e){let i=I(),n=Date.now();i.debug({input:e.inputFile,model:e.model},"Deepgram transcription");let r=Od(e.inputFile),o=B(e.inputFile),s=e.model||"nova-2",a=new URLSearchParams({model:s,punctuate:"true",utterances:"true"});e.language&&a.set("language",e.language);let c=await fetch(`https://api.deepgram.com/v1/listen?${a.toString()}`,{method:"POST",headers:{Authorization:`Token ${this.getApiKey()}`,"Content-Type":o},body:r});if(!c.ok){let d=(await c.json().catch(()=>({})))?.err_msg||`HTTP ${c.status}`;throw new b("API_ERROR",d,{provider:"deepgram"})}let l=await c.json(),u=l.results.channels[0]?.alternatives[0],p=u?.transcript||"",f=u?.words?.map(m=>({start:m.start,end:m.end,text:m.word,confidence:m.confidence}));return e.outputFile&&(L(e.outputFile),Ra(e.outputFile,JSON.stringify({text:p,segments:f,raw:l},null,2),"utf-8")),{text:p,outputFile:e.outputFile,segments:f,durationMs:Date.now()-n}}async translate(e){let i=I(),n=Date.now();i.debug({input:e.inputFile},"Deepgram translation");let r=Od(e.inputFile),o=B(e.inputFile),s=e.model||"nova-2",a=new URLSearchParams({model:s,punctuate:"true",translate:e.targetLanguage||"en"}),c=await fetch(`https://api.deepgram.com/v1/listen?${a.toString()}`,{method:"POST",headers:{Authorization:`Token ${this.getApiKey()}`,"Content-Type":o},body:r});if(!c.ok){let f=(await c.json().catch(()=>({})))?.err_msg||`HTTP ${c.status}`;throw new b("API_ERROR",f,{provider:"deepgram"})}let l=await c.json(),u=l.results.channels[0]?.alternatives[0]?.transcript||"";return e.outputFile&&(L(e.outputFile),Ra(e.outputFile,JSON.stringify({text:u,raw:l},null,2),"utf-8")),{text:u,outputFile:e.outputFile,durationMs:Date.now()-n}}};import{writeFileSync as s0}from"node:fs";async function $e(t,e){let i=I();i.debug({url:t,outputFile:e},"Downloading file"),L(e);let n=await fetch(t);if(!n.ok)throw new Error(`Download failed: HTTP ${n.status} from ${t}`);let r=Buffer.from(await n.arrayBuffer());return s0(e,r),i.debug({size:r.length},"Download complete"),r.length}import{statSync as Rd}from"node:fs";var $r=class{id="fal";name="Fal.ai";capabilities=["image-generate","video-generate"];getApiKey(){let e=U("fal");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing FAL_KEY",{provider:"fal",suggestion:"Set FAL_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Key ${this.getApiKey()}`,"Content-Type":"application/json"}}async validateConfig(){let e=U("fal"),i=[];return e?.apiKey||i.push("FAL_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"fal-ai/flux/dev";i.debug({model:r,prompt:e.prompt},"Fal image generation");let o={prompt:e.prompt,num_images:e.n||1};if(e.size){let[l,u]=e.size.split("x").map(Number);o.image_size={width:l,height:u}}e.negativePrompt&&(o.negative_prompt=e.negativePrompt);let s=await fetch(`https://fal.run/${r}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!s.ok){let u=(await s.json().catch(()=>({})))?.detail||`HTTP ${s.status}`;throw new b("API_ERROR",u,{provider:"fal"})}let c=(await s.json()).images[0]?.url;if(!c)throw new b("API_ERROR","No image returned",{provider:"fal"});return L(e.outputFile),await $e(c,e.outputFile),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:Rd(e.outputFile).size,durationMs:Date.now()-n}}async generateVideo(e){let i=I(),n=e.model||"fal-ai/minimax-video-01";i.debug({model:n,prompt:e.prompt},"Fal video generation");let r={prompt:e.prompt};e.duration&&(r.duration=e.duration);let o=await fetch(`https://queue.fal.run/${n}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let c=(await o.json().catch(()=>({})))?.detail||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"fal"})}let s=await o.json();return{jobId:`${n}::${s.request_id}`,provider:"fal",status:"processing",statusUrl:s.status_url}}parseJobId(e){let i=e.indexOf("::");return i===-1?{model:"fal-ai/minimax-video-01",requestId:e}:{model:e.substring(0,i),requestId:e.substring(i+2)}}getQueueModel(e){let i=["/text-to-video","/image-to-video","/fast/text-to-video","/mini/text-to-video"];for(let n of i)if(e.endsWith(n))return e.slice(0,-n.length);return e}async getJobStatus(e){let{model:i,requestId:n}=this.parseJobId(e),r=this.getQueueModel(i),o=await fetch(`https://queue.fal.run/${r}/requests/${n}/status`,{headers:this.getHeaders()});if(!o.ok)throw new b("API_ERROR",`Status check failed: HTTP ${o.status}`,{provider:"fal"});let s=await o.json();return{jobId:e,provider:"fal",status:{IN_QUEUE:"queued",IN_PROGRESS:"processing",COMPLETED:"completed",FAILED:"failed"}[s.status]||"processing"}}async downloadJob(e,i){let n=Date.now(),{model:r,requestId:o}=this.parseJobId(e),s=this.getQueueModel(r),a=await fetch(`https://queue.fal.run/${s}/requests/${o}`,{headers:this.getHeaders()});if(!a.ok)throw new b("API_ERROR",`Download failed: HTTP ${a.status}`,{provider:"fal"});let c=await a.json();if(!c.video?.url)throw new b("JOB_FAILED","No video URL in result",{provider:"fal"});return L(i),await $e(c.video.url,i),{outputFile:i,mimeType:B(i),sizeBytes:Rd(i).size,durationMs:Date.now()-n}}};import{readFileSync as a0,statSync as c0}from"node:fs";var Ur=class{id="luma";name="Luma AI";capabilities=["video-generate","video-image-to-video"];getApiKey(){let e=U("luma");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing LUMA_API_KEY",{provider:"luma",suggestion:"Set LUMA_API_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json"}}async validateConfig(){let e=U("luma"),i=[];return e?.apiKey||i.push("LUMA_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async generateVideo(e){let i=I(),n=e.model||"ray-2";i.debug({model:n,prompt:e.prompt},"Luma video generation");let r={prompt:e.prompt,model:n};e.aspectRatio&&(r.aspect_ratio=e.aspectRatio),e.duration&&(r.duration=`${e.duration}s`),e.resolution&&(r.resolution=e.resolution);let o=await fetch("https://api.lumalabs.ai/dream-machine/v1/generations",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let c=(await o.json().catch(()=>({})))?.detail||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"luma"})}return{jobId:(await o.json()).id,provider:"luma",status:"processing"}}async imageToVideo(e){I().debug({model:e.model,image:e.image},"Luma image-to-video");let n=a0(e.image),o=`data:${B(e.image)};base64,${n.toString("base64")}`,s={prompt:e.prompt||"",model:e.model||"ray-2",keyframes:{frame0:{type:"image",url:o}}};e.aspectRatio&&(s.aspect_ratio=e.aspectRatio);let a=await fetch("https://api.lumalabs.ai/dream-machine/v1/generations",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(s)});if(!a.ok){let u=(await a.json().catch(()=>({})))?.detail||`HTTP ${a.status}`;throw new b("API_ERROR",u,{provider:"luma"})}return{jobId:(await a.json()).id,provider:"luma",status:"processing"}}async getJobStatus(e){let i=await fetch(`https://api.lumalabs.ai/dream-machine/v1/generations/${e}`,{headers:this.getHeaders()});if(!i.ok)throw new b("API_ERROR",`Status check failed: HTTP ${i.status}`,{provider:"luma"});let n=await i.json();return{jobId:e,provider:"luma",status:{queued:"queued",dreaming:"processing",completed:"completed",failed:"failed"}[n.state]||"processing",error:n.failure_reason}}async downloadJob(e,i){let n=Date.now(),r=await fetch(`https://api.lumalabs.ai/dream-machine/v1/generations/${e}`,{headers:this.getHeaders()});if(!r.ok)throw new b("API_ERROR",`Failed to get job: HTTP ${r.status}`,{provider:"luma"});let o=await r.json();if(o.state!=="completed"||!o.assets?.video)throw new b("JOB_FAILED","Job not completed or no video available",{provider:"luma"});return L(i),await $e(o.assets.video,i),{outputFile:i,mimeType:B(i),sizeBytes:c0(i).size,durationMs:Date.now()-n}}};import{statSync as Td}from"node:fs";var qr=class{id="replicate";name="Replicate";capabilities=["image-generate","video-generate"];getApiKey(){let e=U("replicate");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing REPLICATE_API_TOKEN",{provider:"replicate",suggestion:"Set REPLICATE_API_TOKEN in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json",Prefer:"wait"}}async validateConfig(){let e=U("replicate"),i=[];return e?.apiKey||i.push("REPLICATE_API_TOKEN is not set"),{valid:i.length===0,errors:i,warnings:[]}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"black-forest-labs/flux-schnell";i.debug({model:r,prompt:e.prompt},"Replicate image generation");let o={input:{prompt:e.prompt,...e.size&&{width:parseInt(e.size.split("x")[0]),height:parseInt(e.size.split("x")[1])},...e.negativePrompt&&{negative_prompt:e.negativePrompt}}},s=await fetch(`https://api.replicate.com/v1/models/${r}/predictions`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!s.ok){let u=(await s.json().catch(()=>({})))?.detail||`HTTP ${s.status}`;throw new b("API_ERROR",u,{provider:"replicate"})}let a=await s.json(),c=Array.isArray(a.output)?a.output[0]:a.output;if(!c)throw new b("API_ERROR","No output URL",{provider:"replicate"});return L(e.outputFile),await $e(c,e.outputFile),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:Td(e.outputFile).size,durationMs:Date.now()-n}}async generateVideo(e){let i=I(),n=e.model||"minimax/video-01";i.debug({model:n,prompt:e.prompt},"Replicate video generation");let r={input:{prompt:e.prompt,...e.duration&&{duration:e.duration}}},o=await fetch(`https://api.replicate.com/v1/models/${n}/predictions`,{method:"POST",headers:{...this.getHeaders(),Prefer:""},body:JSON.stringify(r)});if(!o.ok){let c=(await o.json().catch(()=>({})))?.detail||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"replicate"})}let s=await o.json();return{jobId:s.id,provider:"replicate",status:"processing",statusUrl:s.urls.get}}async getJobStatus(e){let i=await fetch(`https://api.replicate.com/v1/predictions/${e}`,{headers:this.getHeaders()});if(!i.ok)throw new b("API_ERROR",`Status check failed: HTTP ${i.status}`,{provider:"replicate"});let n=await i.json();return{jobId:e,provider:"replicate",status:{starting:"queued",processing:"processing",succeeded:"completed",failed:"failed",canceled:"failed"}[n.status]||"processing",error:n.error}}async downloadJob(e,i){let n=Date.now(),r=await fetch(`https://api.replicate.com/v1/predictions/${e}`,{headers:this.getHeaders()});if(!r.ok)throw new b("API_ERROR",`Failed to get prediction: HTTP ${r.status}`,{provider:"replicate"});let o=await r.json();if(o.status!=="succeeded"||!o.output)throw new b("JOB_FAILED","Job not completed",{provider:"replicate"});let s=Array.isArray(o.output)?o.output[0]:o.output;return L(i),await $e(s,i),{outputFile:i,mimeType:B(i),sizeBytes:Td(i).size,durationMs:Date.now()-n}}};import{statSync as l0}from"node:fs";var Vr=class{id="stability";name="Stability AI";capabilities=["image-generate"];getApiKey(){let e=U("stability");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing STABILITY_API_KEY",{provider:"stability",suggestion:"Set STABILITY_API_KEY in your environment or run media-gen config init."});return e.apiKey}async validateConfig(){let e=U("stability"),i=[];return e?.apiKey||i.push("STABILITY_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"stable-diffusion-xl-1024-v1-0";i.debug({model:r,prompt:e.prompt},"Stability image generation");let o={text_prompts:[{text:e.prompt,weight:1}],samples:e.n||1};if(e.negativePrompt&&o.text_prompts.push({text:e.negativePrompt,weight:-1}),e.size){let[u,p]=e.size.split("x").map(Number);o.width=u,o.height=p}let s=await fetch(`https://api.stability.ai/v1/generation/${r}/text-to-image`,{method:"POST",headers:{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!s.ok){let p=(await s.json().catch(()=>({})))?.message||`HTTP ${s.status}`;throw new b("API_ERROR",p,{provider:"stability"})}let c=(await s.json()).artifacts[0];if(c.finishReason==="CONTENT_FILTERED")throw new b("CONTENT_POLICY_VIOLATION","Content filtered by Stability AI safety system",{provider:"stability"});let l=Buffer.from(c.base64,"base64");return L(e.outputFile),Ie(e.outputFile,l),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:l0(e.outputFile).size,durationMs:Date.now()-n}}};import{readFileSync as u0,statSync as Ad}from"node:fs";var zr=class{id="runway";name="Runway";capabilities=["image-generate","video-generate","video-image-to-video"];getApiKey(){let e=U("runway");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing RUNWAY_API_KEY",{provider:"runway",suggestion:"Set RUNWAY_API_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json","X-Runway-Version":"2024-11-06"}}async validateConfig(){let e=U("runway"),i=[];return e?.apiKey||i.push("RUNWAY_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"gen4_image";i.debug({model:r,prompt:e.prompt},"Runway image generation");let o={model:r,promptText:e.prompt};e.size&&(o.ratio=this.sizeToRatio(e.size));let s=await fetch("https://api.dev.runwayml.com/v1/text_to_image",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!s.ok){let p=(await s.json().catch(()=>({})))?.error||`HTTP ${s.status}`;throw new b("API_ERROR",p,{provider:"runway"})}let a=await s.json();if(a.output?.[0])return L(e.outputFile),await $e(a.output[0],e.outputFile),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:Ad(e.outputFile).size,durationMs:Date.now()-n};let c=a.id,l=0;for(;l<60;){await new Promise(p=>setTimeout(p,3e3));let u=await this.getJobStatus(c);if(u.status==="completed")return await this.downloadJob(c,e.outputFile);if(u.status==="failed")throw new b("JOB_FAILED",u.error||"Image generation failed",{provider:"runway"});l++}throw new b("JOB_TIMEOUT","Image generation timed out",{provider:"runway"})}sizeToRatio(e){let[i,n]=e.split("x").map(Number);return i===n?"1:1":i>n?"16:9":"9:16"}async generateVideo(e){let i=I(),n=e.model||"gen4_turbo";i.debug({model:n,prompt:e.prompt},"Runway video generation");let r={model:n,promptText:e.prompt};e.duration&&(r.duration=e.duration),e.aspectRatio&&(r.ratio=e.aspectRatio);let o=await fetch("https://api.dev.runwayml.com/v1/text_to_video",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let c=(await o.json().catch(()=>({})))?.error||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"runway"})}return{jobId:(await o.json()).id,provider:"runway",status:"processing"}}async imageToVideo(e){I().debug({model:e.model,image:e.image},"Runway image-to-video");let n=u0(e.image),o=`data:${B(e.image)};base64,${n.toString("base64")}`,s={model:e.model||"gen4_turbo",promptImage:o,promptText:e.prompt||""};e.duration&&(s.duration=e.duration);let a=await fetch("https://api.dev.runwayml.com/v1/image_to_video",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(s)});if(!a.ok){let u=(await a.json().catch(()=>({})))?.error||`HTTP ${a.status}`;throw new b("API_ERROR",u,{provider:"runway"})}return{jobId:(await a.json()).id,provider:"runway",status:"processing"}}async getJobStatus(e){let i=await fetch(`https://api.dev.runwayml.com/v1/tasks/${e}`,{headers:this.getHeaders()});if(!i.ok)throw new b("API_ERROR",`Status check failed: HTTP ${i.status}`,{provider:"runway"});let n=await i.json();return{jobId:e,provider:"runway",status:{PENDING:"queued",THROTTLED:"queued",RUNNING:"processing",SUCCEEDED:"completed",FAILED:"failed"}[n.status]||"processing",error:n.failure}}async downloadJob(e,i){let n=Date.now(),r=await fetch(`https://api.dev.runwayml.com/v1/tasks/${e}`,{headers:this.getHeaders()});if(!r.ok)throw new b("API_ERROR",`Failed to get task: HTTP ${r.status}`,{provider:"runway"});let o=await r.json();if(o.status!=="SUCCEEDED"||!o.output?.[0])throw new b("JOB_FAILED","Job not completed or no output",{provider:"runway"});return L(i),await $e(o.output[0],i),{outputFile:i,mimeType:B(i),sizeBytes:Ad(i).size,durationMs:Date.now()-n}}};import{statSync as p0}from"node:fs";var Hr=class{id="openrouter";name="OpenRouter";capabilities=["image-generate","video-generate"];getApiKey(){let e=U("openrouter");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing OPENROUTER_API_KEY",{provider:"openrouter",suggestion:"Set OPENROUTER_API_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json","HTTP-Referer":"https://github.com/media-gen-cli","X-Title":"media-gen-cli"}}async validateConfig(){let e=U("openrouter"),i=[],n=[];return e?.apiKey||i.push("OPENROUTER_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:n}}async generateImage(e){let i=I(),n=Date.now(),r=e.model||"openai/gpt-image-1";i.debug({model:r,prompt:e.prompt},"OpenRouter image generation");let o={model:r,prompt:e.prompt,n:e.n||1};e.size&&(o.size=e.size),e.quality&&(o.quality=e.quality);let s=await fetch("https://openrouter.ai/api/v1/images",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(o)});if(!s.ok){let p=await s.json().catch(()=>({})),f=p?.error?.message||p?.message||`HTTP ${s.status}`;throw new b("API_ERROR",f,{provider:"openrouter"})}let c=(await s.json()).data?.[0];if(!c)throw new b("API_ERROR","No image data in response",{provider:"openrouter"});if(L(e.outputFile),c.b64_json){let u=Buffer.from(c.b64_json,"base64");Ie(e.outputFile,u)}else if(c.url)await $e(c.url,e.outputFile);else throw new b("API_ERROR","Response has no image data or URL",{provider:"openrouter"});let l=p0(e.outputFile).size;return{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:l,durationMs:Date.now()-n,metadata:{revisedPrompt:c.revised_prompt}}}async generateVideo(e){let i=I(),n=e.model||"google/veo-3.1";i.debug({model:n,prompt:e.prompt},"OpenRouter video generation");let r={model:n,prompt:e.prompt};e.duration&&(r.duration=e.duration),e.aspectRatio&&(r.aspect_ratio=e.aspectRatio),e.resolution&&(r.resolution=e.resolution);let o=await fetch("https://openrouter.ai/api/v1/videos",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let c=await o.json().catch(()=>({})),l=c?.error?.message||c?.message||`HTTP ${o.status}`;throw new b("API_ERROR",l,{provider:"openrouter"})}let s=await o.json();return{jobId:s.id||s.generation_id||"unknown",provider:"openrouter",status:"queued",statusUrl:s.polling_url?s.polling_url.startsWith("http")?s.polling_url:`https://openrouter.ai${s.polling_url}`:void 0}}async getJobStatus(e){let i=`https://openrouter.ai/api/v1/videos/${e}`,n=await fetch(i,{headers:{Authorization:`Bearer ${this.getApiKey()}`}});if(!n.ok)throw new b("API_ERROR",`Status check failed: HTTP ${n.status}`,{provider:"openrouter"});let r=await n.json(),o={pending:"queued",processing:"processing",completed:"completed",failed:"failed"};return{jobId:r.id||e,provider:"openrouter",status:o[r.status]||"processing",error:r.error}}async downloadJob(e,i){let n=Date.now(),r=`https://openrouter.ai/api/v1/videos/${e}`,o=await fetch(r,{headers:{Authorization:`Bearer ${this.getApiKey()}`}});if(!o.ok)throw new b("API_ERROR",`Failed to get job: HTTP ${o.status}`,{provider:"openrouter"});let s=await o.json();if(s.status!=="completed"||!s.unsigned_urls?.[0])throw new b("JOB_FAILED","Job not completed or no video URL",{provider:"openrouter"});let a=s.unsigned_urls[0],c=await fetch(a,{headers:{Authorization:`Bearer ${this.getApiKey()}`},redirect:"follow"});if(!c.ok)throw new b("API_ERROR",`Video download failed: HTTP ${c.status}`,{provider:"openrouter"});let l=Buffer.from(await c.arrayBuffer());L(i);let{writeFileSync:u}=await import("node:fs");return u(i,l),{outputFile:i,mimeType:B(i),sizeBytes:l.length,durationMs:Date.now()-n}}};import{writeFileSync as hI,statSync as gI}from"node:fs";var ns=class{id="edge-tts";name="Microsoft Edge TTS (Free)";capabilities=["voice-tts"];async validateConfig(){return{valid:!0,errors:[],warnings:[]}}async textToSpeech(e){let i=I(),n=Date.now(),r=e.voiceId||"en-US-EmmaMultilingualNeural";i.debug({voice:r,textLength:e.text.length},"Edge TTS synthesis");try{let{EdgeTTS:o}=await Promise.resolve().then(()=>(my(),fy)),a=await new o(e.text,r,{rate:e.speed?`${Math.round((e.speed-1)*100)}%`:void 0}).synthesize();if(!a.audio)throw new b("API_ERROR","Edge TTS returned empty audio",{provider:"edge-tts"});let c=await a.audio.arrayBuffer();if(c.byteLength===0)throw new b("API_ERROR","Edge TTS returned empty audio",{provider:"edge-tts"});let l=Buffer.from(c);return L(e.outputFile),hI(e.outputFile,l),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:gI(e.outputFile).size,durationMs:Date.now()-n,metadata:{voice:r,subtitles:a.subtitle}}}catch(o){if(o instanceof b)throw o;let s=o instanceof Error?o.message:String(o);throw new b("API_ERROR",`Edge TTS failed: ${s}`,{provider:"edge-tts",suggestion:"Check your internet connection. Edge TTS requires network access to Microsoft servers."})}}};import{writeFileSync as hy,statSync as vI}from"node:fs";var rs=class{id="minimax";name="MiniMax (Hailuo)";capabilities=["video-generate","video-image-to-video","voice-tts"];getApiKey(){let e=U("minimax");if(!e?.apiKey)throw new b("PROVIDER_NOT_CONFIGURED","Missing MINIMAX_API_KEY",{provider:"minimax",suggestion:"Set MINIMAX_API_KEY in your environment or run media-gen config init."});return e.apiKey}getHeaders(){return{Authorization:`Bearer ${this.getApiKey()}`,"Content-Type":"application/json"}}async validateConfig(){let e=U("minimax"),i=[];return e?.apiKey||i.push("MINIMAX_API_KEY is not set"),{valid:i.length===0,errors:i,warnings:[]}}async generateVideo(e){let i=I(),n=e.model||"MiniMax-Hailuo-2.3";i.debug({model:n,prompt:e.prompt},"MiniMax video generation");let r={model:n,prompt:e.prompt};e.duration&&(r.duration=e.duration),e.resolution&&(r.resolution=e.resolution);let o=await fetch("https://api.minimax.io/v1/video_generation",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(r)});if(!o.ok){let c=(await o.json().catch(()=>({})))?.base_resp?.status_msg||`HTTP ${o.status}`;throw new b("API_ERROR",c,{provider:"minimax"})}let s=await o.json();if(s.base_resp.status_code!==0)throw new b("API_ERROR","Video generation request failed",{provider:"minimax"});return{jobId:s.task_id,provider:"minimax",status:"processing"}}async imageToVideo(e){let i=I(),n=e.model||"MiniMax-Hailuo-2.3";i.debug({model:n,image:e.image},"MiniMax image-to-video");let{readFileSync:r}=await import("node:fs"),o=r(e.image),a=`data:${B(e.image)};base64,${o.toString("base64")}`,c={model:n,first_frame_image:a};e.prompt&&(c.prompt=e.prompt),e.duration&&(c.duration=e.duration);let l=await fetch("https://api.minimax.io/v1/video_generation",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(c)});if(!l.ok){let f=(await l.json().catch(()=>({})))?.base_resp?.status_msg||`HTTP ${l.status}`;throw new b("API_ERROR",f,{provider:"minimax"})}return{jobId:(await l.json()).task_id,provider:"minimax",status:"processing"}}async getJobStatus(e){let i=await fetch(`https://api.minimax.io/v1/query/video_generation?task_id=${e}`,{headers:{Authorization:`Bearer ${this.getApiKey()}`}});if(!i.ok)throw new b("API_ERROR",`Status check failed: HTTP ${i.status}`,{provider:"minimax"});let n=await i.json(),r={Queueing:"queued",Processing:"processing",Success:"completed",Failed:"failed"};return{jobId:n.task_id,provider:"minimax",status:r[n.status]||"processing",error:n.status==="Failed"?n.base_resp.status_msg:void 0}}async downloadJob(e,i){let n=Date.now(),r=await fetch(`https://api.minimax.io/v1/query/video_generation?task_id=${e}`,{headers:{Authorization:`Bearer ${this.getApiKey()}`}});if(!r.ok)throw new b("API_ERROR",`Failed to query job: HTTP ${r.status}`,{provider:"minimax"});let o=await r.json();if(o.status!=="Success"||!o.file_id)throw new b("JOB_FAILED","Job not completed or no file_id",{provider:"minimax"});let s=await fetch(`https://api.minimax.io/v1/files/retrieve?file_id=${o.file_id}`,{headers:{Authorization:`Bearer ${this.getApiKey()}`}});if(!s.ok)throw new b("API_ERROR",`Download failed: HTTP ${s.status}`,{provider:"minimax"});let c=(await s.json()).file?.download_url;if(!c)throw new b("JOB_FAILED","No download URL in response",{provider:"minimax"});let l=await fetch(c);if(!l.ok)throw new b("API_ERROR",`Video download failed: HTTP ${l.status}`,{provider:"minimax"});let u=Buffer.from(await l.arrayBuffer());return L(i),hy(i,u),{outputFile:i,mimeType:B(i),sizeBytes:vI(i).size,durationMs:Date.now()-n}}async textToSpeech(e){let i=I(),n=Date.now(),r=e.model||"speech-2.8-hd",o=e.voiceId||"English_expressive_narrator";i.debug({model:r,voiceId:o},"MiniMax TTS");let s={model:r,text:e.text,voice_setting:{voice_id:o,speed:e.speed||1},audio_setting:{format:e.format==="wav"?"wav":"mp3",sample_rate:32e3}},a=await fetch("https://api.minimax.io/v1/t2a_v2",{method:"POST",headers:this.getHeaders(),body:JSON.stringify(s)});if(!a.ok){let p=(await a.json().catch(()=>({})))?.base_resp?.status_msg||`HTTP ${a.status}`;throw new b("API_ERROR",p,{provider:"minimax"})}let c=await a.json();if(c.base_resp.status_code!==0||!c.audio_file)throw new b("API_ERROR",c.base_resp.status_msg||"TTS failed",{provider:"minimax"});let l=Buffer.from(c.audio_file,"hex");return L(e.outputFile),hy(e.outputFile,l),{outputFile:e.outputFile,mimeType:B(e.outputFile),sizeBytes:l.length,durationMs:Date.now()-n,metadata:{model:r,voiceId:o}}}};var nn=new Map;function os(){if(nn.size>0)return;let t=[new Nr,new Fr,new Lr,new Mr,new Br,new $r,new Ur,new qr,new Vr,new zr,new Hr,new ns,new rs];for(let e of t)nn.set(e.id,e)}function Re(t){os();let e=nn.get(t);if(!e)throw new b("PROVIDER_NOT_FOUND",`Unknown provider: "${t}"`,{suggestion:`Available providers: ${xI().join(", ")}`});return e}function or(){return os(),Array.from(nn.values())}function xI(){return os(),Array.from(nn.keys())}function gy(t){return os(),Array.from(nn.values()).filter(e=>e.capabilities.includes(t))}import{existsSync as vy,mkdirSync as yI,writeFileSync as bI,statSync as D$}from"node:fs";import{dirname as wI,resolve as ss,relative as _I,isAbsolute as Ll}from"node:path";function Be(t,e,i){let n=i||process.cwd(),r;if(e.output)r=Ll(e.output)?e.output:ss(n,e.output);else if(e.outputDir){let o=Ll(e.outputDir)?e.outputDir:ss(n,e.outputDir);r=ss(o,t)}else r=ss(n,"outputs",t);if(!e.allowExternalOutput){let o=_I(n,r);if(o.startsWith("..")||Ll(o))throw new b("EXTERNAL_OUTPUT_BLOCKED",`Output path "${r}" is outside the project directory.`,{suggestion:"Use --allow-external-output to write outside the project directory."})}return r}function dt(t){let e=wI(t);vy(e)||yI(e,{recursive:!0})}function jt(t,e){if(vy(t)&&!e)throw new b("FILE_ALREADY_EXISTS",`File already exists: ${t}`,{suggestion:"Use --overwrite to replace existing files."})}function Et(t,e){let i=t.replace(/\.[^.]+$/,".metadata.json");return bI(i,JSON.stringify(e,null,2),"utf-8"),i}function EI(t,e){if(e)return JSON.stringify(t,null,2);if(!t.ok){let r=t,o=`Error [${r.error.code}]: ${r.error.message}`;return r.error.provider&&(o+=` (provider: ${r.error.provider})`),r.error.suggestion&&(o+=`
|
|
238
|
+
Suggestion: ${r.error.suggestion}`),o}let i=t,n=[];return n.push(`\u2713 ${i.type} generated successfully`),i.provider&&n.push(` Provider: ${i.provider}`),i.model&&n.push(` Model: ${i.model}`),i.outputFile&&n.push(` Output: ${i.outputFile}`),i.durationMs&&n.push(` Duration: ${i.durationMs}ms`),i.jobId&&n.push(` Job ID: ${i.jobId}`),n.join(`
|
|
239
|
+
`)}function j(t,e){let i=EI(t,e);t.ok?console.log(i):console.error(i),I().debug(t,"CLI response")}import{existsSync as SI}from"node:fs";function Qe(t,e){if(!SI(t))throw new b("FILE_NOT_FOUND",`${e} not found: ${t}`)}function xy(){let t=new he("image").description("Image generation and editing");return t.command("generate").description("Generate an image from a text prompt").requiredOption("--prompt <prompt>","Image generation prompt").option("--provider <provider>","Provider to use (e.g., openai, stability, fal, openrouter)").option("--model <model>","Model to use").option("--size <size>","Image size (e.g., 1024x1024)","1024x1024").option("--quality <quality>","Image quality").option("--style <style>","Image style").option("-n, --count <n>","Number of images","1").option("--negative-prompt <prompt>","Negative prompt").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing files",!1).option("--metadata","Save metadata JSON file",!1).option("--json","Output result as JSON",!1).option("--dry-run","Validate inputs without calling the provider",!1).option("--allow-external-output","Allow output outside project dir",!1).option("--debug","Enable debug logging",!1).action(async e=>{let i=I();try{let n=gt(e.provider,"image"),r=vt(e.model,"image");if(!n)throw new b("INVALID_INPUT","No provider specified. Use --provider or set MEDIA_GEN_DEFAULT_PROVIDER / MEDIA_GEN_IMAGE_PROVIDER in .env");let o=Be(e.output?e.output.split(/[/\\]/).pop():`image-${Date.now()}.png`,{output:e.output,outputDir:e.outputDir,allowExternalOutput:e.allowExternalOutput});if(e.dryRun){j({ok:!0,type:"image",provider:n,model:r||"default",outputFile:o,dryRun:!0},e.json);return}jt(o,e.overwrite),dt(o);let s=Re(n);if(!s.generateImage)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${n}" does not support image generation`,{provider:n,suggestion:"Try: openai, stability, fal, replicate, google, openrouter"});let a=await s.generateImage({prompt:e.prompt,model:r||"gpt-image-1",size:e.size,quality:e.quality,style:e.style,n:parseInt(e.count),negativePrompt:e.negativePrompt,outputFile:o}),c;e.metadata&&(c=Et(o,{provider:n,model:e.model,type:"image",prompt:e.prompt,input:{size:e.size,quality:e.quality,style:e.style},outputFile:a.outputFile,createdAt:new Date().toISOString(),durationMs:a.durationMs}));let l={ok:!0,type:"image",provider:n,model:r,outputFile:a.outputFile,metadataFile:c,durationMs:a.durationMs};j(l,e.json)}catch(n){i.error(n,"Image generate error"),j(se(n),e.json),process.exitCode=1}}),t.command("edit").description("Edit an existing image with a prompt").option("--provider <provider>","Provider to use").requiredOption("--image <path>","Source image file").requiredOption("--prompt <prompt>","Edit prompt").option("--model <model>","Model to use").option("--mask <path>","Mask image for inpainting").option("--size <size>","Output size").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing files",!1).option("--metadata","Save metadata JSON",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).option("--allow-external-output","Allow output outside project dir",!1).option("--debug","Enable debug logging",!1).action(async e=>{try{Qe(e.image,"Source image"),e.mask&&Qe(e.mask,"Mask image");let i=gt(e.provider,"image"),n=vt(e.model,"image");if(!i)throw new b("INVALID_INPUT","No provider specified. Use --provider or set MEDIA_GEN_DEFAULT_PROVIDER / MEDIA_GEN_IMAGE_PROVIDER in .env");let r=Be(e.output?e.output.split(/[/\\]/).pop():`edited-${Date.now()}.png`,{output:e.output,outputDir:e.outputDir,allowExternalOutput:e.allowExternalOutput});if(e.dryRun){j({ok:!0,type:"image-edit",provider:i,outputFile:r,dryRun:!0},e.json);return}jt(r,e.overwrite),dt(r);let o=Re(i);if(!o.editImage)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${i}" does not support image editing`,{provider:i,suggestion:"Try: openai"});let s=await o.editImage({image:e.image,prompt:e.prompt,model:n||"gpt-image-1",mask:e.mask,size:e.size,outputFile:r}),a;e.metadata&&(a=Et(r,{provider:i,model:n,type:"image-edit",prompt:e.prompt,input:{image:e.image,mask:e.mask},outputFile:s.outputFile,createdAt:new Date().toISOString(),durationMs:s.durationMs})),j({ok:!0,type:"image-edit",provider:i,model:n,outputFile:s.outputFile,metadataFile:a,durationMs:s.durationMs},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t}async function Ml(t,e,i,n,r){let o=I(),s=Date.now();for(o.debug({jobId:t,provider:e,options:n},"Starting job poll");;){if(Date.now()-s>n.timeout)throw new b("JOB_TIMEOUT",`Job ${t} timed out after ${n.timeout}ms`,{provider:e,suggestion:"Increase --timeout or check job status manually with: media-gen job status"});let c=await i(t);if(o.debug({jobId:t,status:c.status,progress:c.progress},"Job status update"),r&&r(c),c.status==="completed")return c;if(c.status==="failed")throw new b("JOB_FAILED",`Job ${t} failed: ${c.error||"Unknown error"}`,{provider:e});await OI(n.pollInterval)}}function as(t){return"jobId"in t&&"status"in t}function OI(t){return new Promise(e=>setTimeout(e,t))}function yy(){let t=new he("video").description("Video generation");return t.command("generate").description("Generate a video from a text prompt").requiredOption("--prompt <prompt>","Video generation prompt").option("--provider <provider>","Provider to use (e.g., google, luma, runway, fal)").option("--model <model>","Model to use").option("--duration <seconds>","Video duration in seconds").option("--aspect-ratio <ratio>","Aspect ratio (e.g., 16:9)").option("--resolution <res>","Resolution (e.g., 1080p)").option("--fps <fps>","Frames per second").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing files",!1).option("--metadata","Save metadata JSON",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).option("--wait","Wait for async job to complete",!1).option("--poll-interval <ms>","Polling interval in ms","5000").option("--timeout <ms>","Max wait time in ms","600000").option("--allow-external-output","Allow output outside project dir",!1).option("--debug","Enable debug logging",!1).action(async e=>{let i=I();try{let n=gt(e.provider,"video"),r=vt(e.model,"video");if(!n)throw new b("INVALID_INPUT","No provider specified. Use --provider or set MEDIA_GEN_DEFAULT_PROVIDER / MEDIA_GEN_VIDEO_PROVIDER in .env");if(!r)throw new b("INVALID_INPUT","No model specified. Use --model or set MEDIA_GEN_DEFAULT_MODEL / MEDIA_GEN_VIDEO_MODEL in .env");let o=Be(e.output?e.output.split(/[/\\]/).pop():`video-${Date.now()}.mp4`,{output:e.output,outputDir:e.outputDir,allowExternalOutput:e.allowExternalOutput});if(e.dryRun){j({ok:!0,type:"video",provider:n,model:r,outputFile:o,dryRun:!0},e.json);return}jt(o,e.overwrite),dt(o);let s=Re(n);if(!s.generateVideo)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support video generation`,{provider:e.provider,suggestion:"Try: google, luma, runway, fal, replicate"});let a=await s.generateVideo({prompt:e.prompt,model:e.model,duration:e.duration?parseFloat(e.duration):void 0,aspectRatio:e.aspectRatio,resolution:e.resolution,fps:e.fps?parseInt(e.fps):void 0,outputFile:o});if(as(a)){if(e.wait&&s.getJobStatus&&s.downloadJob&&(await Ml(a.jobId,e.provider,u=>s.getJobStatus(u),{wait:!0,pollInterval:parseInt(e.pollInterval),timeout:parseInt(e.timeout)})).status==="completed"){let u=await s.downloadJob(a.jobId,o),p;e.metadata&&(p=Et(o,{provider:e.provider,model:e.model,type:"video",prompt:e.prompt,outputFile:o,createdAt:new Date().toISOString(),durationMs:u.durationMs,jobId:a.jobId})),j({ok:!0,type:"video",provider:e.provider,model:e.model,outputFile:o,metadataFile:p,durationMs:u.durationMs,jobId:a.jobId},e.json);return}let c={ok:!0,type:"video",provider:e.provider,model:e.model,jobId:a.jobId,status:a.status,statusUrl:a.statusUrl};j(c,e.json)}else{let c;e.metadata&&(c=Et(o,{provider:e.provider,model:e.model,type:"video",prompt:e.prompt,outputFile:a.outputFile,createdAt:new Date().toISOString(),durationMs:a.durationMs})),j({ok:!0,type:"video",provider:e.provider,model:e.model,outputFile:a.outputFile,metadataFile:c,durationMs:a.durationMs},e.json)}}catch(n){i.error(n,"Video generate error"),j(se(n),e.json),process.exitCode=1}}),t.command("image-to-video").description("Generate a video from an image").requiredOption("--provider <provider>","Provider to use").requiredOption("--image <path>","Source image file").requiredOption("--model <model>","Model to use").option("--prompt <prompt>","Optional guiding prompt").option("--duration <seconds>","Video duration").option("--aspect-ratio <ratio>","Aspect ratio").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing files",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).option("--wait","Wait for completion",!1).option("--poll-interval <ms>","Polling interval","5000").option("--timeout <ms>","Max wait time","600000").option("--allow-external-output","Allow external output",!1).action(async e=>{try{Qe(e.image,"Source image");let i=Be(e.output?e.output.split(/[/\\]/).pop():`i2v-${Date.now()}.mp4`,{output:e.output,outputDir:e.outputDir,allowExternalOutput:e.allowExternalOutput});if(e.dryRun){j({ok:!0,type:"image-to-video",provider:e.provider,model:e.model,outputFile:i,dryRun:!0},e.json);return}let n=Re(e.provider);if(!n.imageToVideo)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support image-to-video`,{provider:e.provider,suggestion:"Try: luma, runway"});let r=await n.imageToVideo({image:e.image,prompt:e.prompt,model:e.model,duration:e.duration?parseFloat(e.duration):void 0,aspectRatio:e.aspectRatio,outputFile:i});if(as(r))if(e.wait&&n.getJobStatus&&n.downloadJob){await Ml(r.jobId,e.provider,s=>n.getJobStatus(s),{wait:!0,pollInterval:parseInt(e.pollInterval),timeout:parseInt(e.timeout)});let o=await n.downloadJob(r.jobId,i);j({ok:!0,type:"image-to-video",provider:e.provider,model:e.model,outputFile:o.outputFile,durationMs:o.durationMs,jobId:r.jobId},e.json)}else j({ok:!0,type:"image-to-video",provider:e.provider,jobId:r.jobId,status:r.status},e.json);else j({ok:!0,type:"image-to-video",provider:e.provider,model:e.model,outputFile:r.outputFile,durationMs:r.durationMs},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t.command("extend").description("Extend an existing video").requiredOption("--provider <provider>","Provider to use").requiredOption("--video <path>","Source video file").requiredOption("--model <model>","Model to use").option("--prompt <prompt>","Extension prompt").option("--duration <seconds>","Additional duration").option("--output <path>","Output file path").option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).option("--wait","Wait for completion",!1).option("--poll-interval <ms>","Polling interval","5000").option("--timeout <ms>","Max wait time","600000").action(async e=>{try{if(Qe(e.video,"Source video"),e.dryRun){j({ok:!0,type:"video-extend",provider:e.provider,dryRun:!0},e.json);return}let i=Re(e.provider);if(!i.extendVideo)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support video extension`,{provider:e.provider});let n=await i.extendVideo({video:e.video,prompt:e.prompt,model:e.model,duration:e.duration?parseFloat(e.duration):void 0,outputFile:e.output||`extended-${Date.now()}.mp4`});as(n)?j({ok:!0,type:"video-extend",provider:e.provider,jobId:n.jobId,status:n.status},e.json):j({ok:!0,type:"video-extend",provider:e.provider,outputFile:n.outputFile,durationMs:n.durationMs},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t}function by(){let t=new he("voice").description("Voice synthesis and cloning");return t.command("tts").description("Convert text to speech").option("--provider <provider>","Provider (e.g., openai, elevenlabs, edge-tts, azure)").option("--voice-id <id>","Voice ID to use (or set MEDIA_GEN_VOICE_ID in .env)").requiredOption("--text <text>","Text to convert to speech").option("--model <model>","TTS model").option("--speed <speed>","Playback speed multiplier").option("--instructions <text>","Voice style instructions (OpenAI gpt-4o-mini-tts only)").option("--format <format>","Output format (mp3, wav, ogg, flac)").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing files",!1).option("--metadata","Save metadata JSON",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).option("--allow-external-output","Allow output outside project",!1).option("--debug","Enable debug logging",!1).action(async e=>{let i=I();try{let n=gt(e.provider,"voice"),r=vt(e.model,"voice"),o=mu(e.voiceId);if(!n)throw new b("INVALID_INPUT","No provider specified. Use --provider or set MEDIA_GEN_DEFAULT_PROVIDER / MEDIA_GEN_VOICE_PROVIDER in .env");if(!o)throw new b("INVALID_INPUT","No voice ID specified. Use --voice-id or set MEDIA_GEN_VOICE_ID in .env");let s=e.format||"mp3",a=Be(e.output?e.output.split(/[/\\]/).pop():`speech-${Date.now()}.${s}`,{output:e.output,outputDir:e.outputDir,allowExternalOutput:e.allowExternalOutput});if(e.dryRun){j({ok:!0,type:"tts",provider:n,model:r,voiceId:o,outputFile:a,dryRun:!0},e.json);return}jt(a,e.overwrite),dt(a);let c=Re(n);if(!c.textToSpeech)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${n}" does not support TTS`,{provider:n,suggestion:"Try: openai, elevenlabs, azure"});let l=await c.textToSpeech({text:e.text,voiceId:o,model:r,speed:e.speed?parseFloat(e.speed):void 0,format:e.format,instructions:e.instructions,outputFile:a}),u;e.metadata&&(u=Et(a,{provider:n,model:r,type:"tts",input:{text:e.text,voiceId:o},outputFile:l.outputFile,createdAt:new Date().toISOString(),durationMs:l.durationMs})),j({ok:!0,type:"tts",provider:n,model:r,outputFile:l.outputFile,metadataFile:u,durationMs:l.durationMs},e.json)}catch(n){i.error(n,"TTS error"),j(se(n),e.json),process.exitCode=1}}),t.command("clone").description("Clone a voice from audio samples").requiredOption("--provider <provider>","Provider (e.g., elevenlabs)").requiredOption("--name <name>","Name for the cloned voice").requiredOption("--files <paths...>","Audio sample file paths").option("--description <desc>","Voice description").option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).action(async e=>{try{for(let r of e.files)Qe(r,"Audio sample");if(e.dryRun){j({ok:!0,type:"voice-clone",provider:e.provider,dryRun:!0,name:e.name},e.json);return}let i=Re(e.provider);if(!i.cloneVoice)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support voice cloning`,{provider:e.provider,suggestion:"Try: elevenlabs"});let n=await i.cloneVoice({name:e.name,files:e.files,description:e.description});j({ok:!0,type:"voice-clone",provider:e.provider,voiceId:n.voiceId,voiceName:n.name},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t.command("isolate").description("Isolate voice from background audio").requiredOption("--provider <provider>","Provider (e.g., elevenlabs)").requiredOption("--input <path>","Input audio file").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing files",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).action(async e=>{try{Qe(e.input,"Input audio");let i=Be(e.output?e.output.split(/[/\\]/).pop():`isolated-${Date.now()}.mp3`,{output:e.output,outputDir:e.outputDir});if(e.dryRun){j({ok:!0,type:"voice-isolate",provider:e.provider,outputFile:i,dryRun:!0},e.json);return}let n=Re(e.provider);if(!n.isolateVoice)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support voice isolation`,{provider:e.provider,suggestion:"Try: elevenlabs"});let r=await n.isolateVoice({inputFile:e.input,outputFile:i});j({ok:!0,type:"voice-isolate",provider:e.provider,outputFile:r.outputFile,durationMs:r.durationMs},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t}function wy(){let t=new he("audio").description("Audio transcription and translation");return t.command("transcribe").description("Transcribe audio to text").option("--provider <provider>","Provider (e.g., openai, deepgram, azure)").requiredOption("--input <path>","Input audio file").option("--model <model>","Transcription model").option("--language <lang>","Audio language code").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing",!1).option("--metadata","Save metadata",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).option("--allow-external-output","Allow external output",!1).action(async e=>{let i=I();try{Qe(e.input,"Input audio");let n=gt(e.provider,"audio"),r=vt(e.model,"audio");if(!n)throw new b("INVALID_INPUT","No provider specified. Use --provider or set MEDIA_GEN_DEFAULT_PROVIDER / MEDIA_GEN_AUDIO_PROVIDER in .env");let o=Be(e.output?e.output.split(/[/\\]/).pop():`transcript-${Date.now()}.json`,{output:e.output,outputDir:e.outputDir,allowExternalOutput:e.allowExternalOutput});if(e.dryRun){j({ok:!0,type:"transcription",provider:n,outputFile:o,dryRun:!0},e.json);return}jt(o,e.overwrite),dt(o);let s=Re(n);if(!s.transcribe)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${n}" does not support transcription`,{provider:n,suggestion:"Try: openai, deepgram, azure"});let a=await s.transcribe({inputFile:e.input,model:r,language:e.language,outputFile:o}),c;e.metadata&&(c=Et(o,{provider:n,model:r,type:"transcription",input:{file:e.input,language:e.language},outputFile:o,createdAt:new Date().toISOString(),durationMs:a.durationMs})),j({ok:!0,type:"transcription",provider:n,model:r,outputFile:a.outputFile,metadataFile:c,durationMs:a.durationMs,text:a.text.substring(0,200)+(a.text.length>200?"...":"")},e.json)}catch(n){i.error(n,"Transcribe error"),j(se(n),e.json),process.exitCode=1}}),t.command("translate").description("Translate audio to another language").option("--provider <provider>","Provider (e.g., openai, deepgram, azure)").requiredOption("--input <path>","Input audio file").option("--model <model>","Translation model").option("--target-language <lang>","Target language","en").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing",!1).option("--json","Output as JSON",!1).option("--dry-run","Validate without calling provider",!1).action(async e=>{try{Qe(e.input,"Input audio");let i=gt(e.provider,"audio"),n=vt(e.model,"audio");if(!i)throw new b("INVALID_INPUT","No provider specified. Use --provider or set MEDIA_GEN_DEFAULT_PROVIDER / MEDIA_GEN_AUDIO_PROVIDER in .env");let r=Be(e.output?e.output.split(/[/\\]/).pop():`translation-${Date.now()}.json`,{output:e.output,outputDir:e.outputDir});if(e.dryRun){j({ok:!0,type:"translation",provider:i,outputFile:r,dryRun:!0},e.json);return}let o=Re(i);if(!o.translate)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${i}" does not support translation`,{provider:i,suggestion:"Try: openai, deepgram, azure"});let s=await o.translate({inputFile:e.input,model:n,targetLanguage:e.targetLanguage,outputFile:r});j({ok:!0,type:"translation",provider:i,outputFile:s.outputFile,durationMs:s.durationMs},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t}function _y(t){return!t||t.length<8?"***":t.substring(0,4)+"..."+t.substring(t.length-4)}function Ey(){let t=new he("config").description("Configuration management");return t.command("init").description("Initialize configuration directory and file").option("--global","Initialize user-level config at ~/.media-gen/",!1).option("--json","Output as JSON",!1).action(e=>{try{let i;e.global?(i=du(),j({ok:!0,type:"config-init",provider:"",configFile:i,configDir:Jt(),message:`User-level config initialized at ${i}. Edit ~/.media-gen/.env to set API keys globally.`},e.json)):(i=pu(),j({ok:!0,type:"config-init",provider:"",configFile:i,message:`Project config initialized at ${i}`},e.json))}catch(i){j(se(i),e.json),process.exitCode=1}}),t.command("validate").description("Validate configuration and show provider status").option("--json","Output as JSON",!1).action(async e=>{try{let i=uu(),n=or(),r=await Promise.all(n.map(async o=>{let s=await o.validateConfig(),a=U(o.id);return{id:o.id,name:o.name,configured:i.includes(o.id),valid:s.valid,capabilities:o.capabilities,errors:s.errors,warnings:s.warnings,apiKey:a?.apiKey?_y(a.apiKey):void 0}}));if(e.json)console.log(JSON.stringify({ok:!0,type:"config-validate",homeConfigDir:Jt(),projectConfigFile:ln(),providers:r,configuredCount:i.length,totalProviders:n.length},null,2));else{console.log(`Provider Configuration Status
|
|
240
|
+
`),console.log(`Home config: ${Jt()}`),console.log(`Project config: ${ln()}`),console.log(`Configured: ${i.length}/${n.length} providers
|
|
241
|
+
`);for(let o of r){let s=o.configured?"\u2713":"\u2717",a=o.apiKey?` (${o.apiKey})`:"";if(console.log(` ${s} ${o.name}${a}`),o.configured&&console.log(` Capabilities: ${o.capabilities.join(", ")}`),o.errors.length>0)for(let c of o.errors)console.log(` Error: ${c}`);if(o.warnings.length>0)for(let c of o.warnings)console.log(` Warning: ${c}`)}}}catch(i){j(se(i),e.json),process.exitCode=1}}),t}import{existsSync as TI,readFileSync as AI}from"node:fs";import{resolve as PI}from"node:path";var Sy={openai:{models:["gpt-image-2","gpt-image-1","gpt-4o-mini-tts","tts-1","tts-1-hd","whisper-1","gpt-4o-transcribe","gpt-4o-mini-transcribe"],voiceIds:["alloy","ash","ballad","coral","echo","fable","nova","onyx","sage","shimmer","verse","marin","cedar"],capabilities:{"image-generate":["gpt-image-2","gpt-image-1"],"image-edit":["gpt-image-2","gpt-image-1"],"voice-tts":["gpt-4o-mini-tts","tts-1","tts-1-hd"],"audio-transcribe":["whisper-1","gpt-4o-transcribe","gpt-4o-mini-transcribe"],"audio-translate":["whisper-1"]}},google:{models:["imagen-4.0-generate-001","imagen-3.0-generate-002","gemini-3.1-flash-tts-preview","gemini-2.5-flash-preview-tts","gemini-2.5-pro-preview-tts","veo-3.1-generate-preview","veo-3.1-fast-generate-preview","veo-3.1-lite-generate-preview","veo-3.0-generate-001","veo-3.0-fast-generate-001","veo-2.0-generate-001"],voiceIds:["Zephyr","Puck","Charon","Kore","Fenrir","Leda","Orus","Aoede","Callirrhoe","Autonoe","Enceladus","Iapetus","Umbriel","Algieba","Despina","Erinome","Algenib","Rasalgethi","Laomedeia","Achernar","Alnilam","Schedar","Gacrux","Pulcherrima","Achird","Zubenelgenubi","Vindemiatrix","Sadachbia","Sadaltager","Sulafat"],capabilities:{"image-generate":["imagen-4.0-generate-001","imagen-3.0-generate-002"],"video-generate":["veo-3.1-generate-preview","veo-3.1-fast-generate-preview","veo-3.1-lite-generate-preview","veo-3.0-generate-001","veo-3.0-fast-generate-001","veo-2.0-generate-001"],"voice-tts":["gemini-3.1-flash-tts-preview","gemini-2.5-flash-preview-tts","gemini-2.5-pro-preview-tts"]}},azure:{models:["gpt-image-2","gpt-image-1.5","gpt-4o-mini-tts","whisper-1","gpt-4o-transcribe","gpt-4o-mini-transcribe"],voiceIds:["alloy","ash","ballad","coral","echo","fable","nova","onyx","sage","shimmer","verse","marin","cedar"],capabilities:{"image-generate":["gpt-image-2","gpt-image-1.5"],"voice-tts":["gpt-4o-mini-tts"],"audio-transcribe":["whisper-1","gpt-4o-transcribe","gpt-4o-mini-transcribe"],"audio-translate":["whisper-1"]}},elevenlabs:{models:["eleven_v3","eleven_multilingual_v2","eleven_turbo_v2_5","eleven_turbo_v2","eleven_monolingual_v1"],voiceIds:["CwhRBWXzGAHq8TQ4Fs17:Roger (premade)","EXAVITQu4vr4xnSDxMaL:Sarah (premade)","FGY2WhTYpPnrIDTdsKH5:Laura (premade)","IKne3meq5aSn9XLyUdCD:Charlie (premade)","JBFqnCBsd6RMkjVDRZzb:George (premade)","N2lVS1w4EtoT3dr4eOWO:Callum (premade)","SAz9YHcvj6GT2YYXdXww:River (premade)","SOYHLrjzK2X1ezoPC6cr:Harry (premade)","TX3LPaxmHKxFdv7VOQHJ:Liam (premade)","Xb7hH8MSUJpSbSDYk0k2:Alice (premade)","XrExE9yKIg1WjnnlVkGX:Matilda (premade)","bIHbv24MWmeRgasZH58o:Will (premade)","cgSgspJ2msm6clMCkdW9:Jessica (premade)","cjVigY5qzO86Huf0OWal:Eric (premade)","hpp4J3VqNfWAUOO0d1Us:Bella (premade)","iP95p4xoKVk53GoZ742B:Chris (premade)","nPczCjzI2devNBz1zQrb:Brian (premade)","onwK4e9ZLuTAKqWW03F9:Daniel (premade)","pFZP5JQG7iQjIQuC4Bku:Lily (premade)","pNInz6obpgDQGcFmaJgB:Adam (premade)","pqHfZKP75CvOlQylNhV4:Bill (premade)"],capabilities:{"voice-tts":["eleven_v3","eleven_multilingual_v2","eleven_turbo_v2_5","eleven_turbo_v2","eleven_monolingual_v1"],"voice-clone":["eleven_v3","eleven_multilingual_v2"],"voice-isolate":[]}},deepgram:{models:["nova-3","nova-3-medical","nova-2","nova","enhanced","base","aura-2","aura"],voiceIds:["aura-2-thalia-en","aura-2-andromeda-en","aura-2-helena-en","aura-2-apollo-en","aura-2-arcas-en","aura-2-aries-en","aura-2-asteria-en","aura-2-athena-en","aura-2-atlas-en","aura-2-aurora-en","aura-2-draco-en","aura-2-luna-en","aura-2-orion-en","aura-2-neptune-en","aura-2-lara-de","aura-2-julius-de","aura-2-livia-it","aura-2-fujin-ja","aura-2-izanami-ja"],capabilities:{"audio-transcribe":["nova-3","nova-3-medical","nova-2","nova","enhanced","base"],"audio-translate":["nova-3","nova-2"],"voice-tts":["aura-2","aura"]}},fal:{models:["fal-ai/flux-2/pro","fal-ai/flux-2/max","fal-ai/flux-pro/v1.1","fal-ai/flux/dev","fal-ai/flux-realism","fal-ai/flux-kontext/pro","fal-ai/seedream-4.5","fal-ai/bytedance/seedream/v5/lite/text-to-image","fal-ai/bytedance/seedream/v4/text-to-image","fal-ai/bytedance/dreamina/v3.1/text-to-image","fal-ai/veo-3.1","bytedance/seedance-2.0/text-to-video","bytedance/seedance-2.0/fast/text-to-video","bytedance/seedance-2.0/mini/text-to-video","fal-ai/bytedance/seedance/v1.5/pro/text-to-video","fal-ai/kling-video/v3.0/pro","fal-ai/minimax/video-01"],capabilities:{"image-generate":["fal-ai/flux-2/pro","fal-ai/flux-2/max","fal-ai/flux-pro/v1.1","fal-ai/flux/dev","fal-ai/flux-realism","fal-ai/seedream-4.5","fal-ai/bytedance/seedream/v5/lite/text-to-image","fal-ai/bytedance/seedream/v4/text-to-image","fal-ai/bytedance/dreamina/v3.1/text-to-image"],"image-edit":["fal-ai/flux-kontext/pro","fal-ai/flux-2/pro"],"video-generate":["fal-ai/veo-3.1","bytedance/seedance-2.0/text-to-video","bytedance/seedance-2.0/fast/text-to-video","bytedance/seedance-2.0/mini/text-to-video","fal-ai/bytedance/seedance/v1.5/pro/text-to-video","fal-ai/kling-video/v3.0/pro","fal-ai/minimax/video-01"],"video-image-to-video":["fal-ai/bytedance/seedance/v1.5/pro/image-to-video","fal-ai/kling-video/v3.0/pro"]}},luma:{models:["ray3.2","ray3.14","ray-2","ray-1"],capabilities:{"video-generate":["ray3.2","ray3.14","ray-2","ray-1"],"video-image-to-video":["ray3.2","ray3.14","ray-2"],"video-extend":["ray3.2","ray3.14"]}},replicate:{models:["black-forest-labs/flux-2-pro","black-forest-labs/flux-2-max","black-forest-labs/flux-kontext-pro","black-forest-labs/flux-1.1-pro","black-forest-labs/flux-schnell","runwayml/gen-4.5","minimax/video-01","alibaba/happy-horse-1.0"],capabilities:{"image-generate":["black-forest-labs/flux-2-pro","black-forest-labs/flux-2-max","black-forest-labs/flux-1.1-pro","black-forest-labs/flux-schnell"],"image-edit":["black-forest-labs/flux-kontext-pro","black-forest-labs/flux-2-pro"],"video-generate":["runwayml/gen-4.5","minimax/video-01","alibaba/happy-horse-1.0"]}},stability:{models:["sd3.5-large","sd3.5-large-turbo","sd3.5-medium","stable-image-ultra","stable-image-core"],capabilities:{"image-generate":["sd3.5-large","sd3.5-large-turbo","sd3.5-medium","stable-image-ultra","stable-image-core"]}},runway:{models:["gen4.5","gen4_turbo","gen4","gen4_image","gen4_image_turbo","gen3a_turbo","aleph-2.0","veo3","veo3.1","seedance2","seedance2_fast","seedance2_mini","happyhorse_1_0","gemini_omni_flash","gemini_image3_pro","gemini_image3.1_flash","gemini_2.5_flash","gpt_image_2"],capabilities:{"image-generate":["gen4_image","gen4_image_turbo","gemini_image3_pro","gemini_image3.1_flash","gemini_2.5_flash","gpt_image_2"],"video-generate":["gen4.5","veo3","veo3.1","seedance2","seedance2_fast","seedance2_mini","happyhorse_1_0","gemini_omni_flash"],"video-image-to-video":["gen4.5","gen4_turbo","gen3a_turbo","veo3","veo3.1","seedance2","seedance2_fast","seedance2_mini","happyhorse_1_0","gemini_omni_flash"]}},openrouter:{models:["openai/gpt-image-2","openai/gpt-image-1","microsoft/mai-image-2.5","google/gemini-2.5-flash-image","google/gemini-3.1-flash-image","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite-image","google/gemini-3-pro-image","google/gemini-3-pro-image-preview","x-ai/grok-imagine-image-quality","bytedance-seed/seedream-4.5","black-forest-labs/flux.2-klein-4b","recraft/recraft-v3","alibaba/happy-horse-1.1","alibaba/happy-horse-1.0","x-ai/grok-imagine-video","kuaishou/kling-video-3.0-pro","kuaishou/kling-video-3.0-standard","google/veo-3.1","google/veo-3.1-fast","google/veo-3.1-lite","minimax/hailuo-2.3","alibaba/wan-2.7","bytedance-seed/seedance-2.0-fast","bytedance-seed/seedance-2.0"],capabilities:{"image-generate":["openai/gpt-image-2","openai/gpt-image-1","microsoft/mai-image-2.5","google/gemini-2.5-flash-image","google/gemini-3.1-flash-image","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite-image","google/gemini-3-pro-image","google/gemini-3-pro-image-preview","x-ai/grok-imagine-image-quality","bytedance-seed/seedream-4.5","black-forest-labs/flux.2-klein-4b","recraft/recraft-v3"],"video-generate":["alibaba/happy-horse-1.1","alibaba/happy-horse-1.0","x-ai/grok-imagine-video","kuaishou/kling-video-3.0-pro","kuaishou/kling-video-3.0-standard","google/veo-3.1","google/veo-3.1-fast","google/veo-3.1-lite","minimax/hailuo-2.3","alibaba/wan-2.7","bytedance-seed/seedance-2.0-fast","bytedance-seed/seedance-2.0"]}},minimax:{models:["MiniMax-Hailuo-2.3","MiniMax-Hailuo-2.3Fast","MiniMax-Hailuo-02","T2V-01-Director","T2V-01","speech-2.8-hd","speech-2.8-turbo","speech-2.6-hd","speech-2.6-turbo"],voiceIds:["English_expressive_narrator","English_calm_female","English_storyteller_male","English_conversational_female","English_news_anchor_male","Chinese_expressive_narrator","Chinese_calm_female","Chinese_storyteller_male"],capabilities:{"video-generate":["MiniMax-Hailuo-2.3","MiniMax-Hailuo-02","T2V-01-Director","T2V-01"],"video-image-to-video":["MiniMax-Hailuo-2.3","MiniMax-Hailuo-2.3Fast","MiniMax-Hailuo-02"],"voice-tts":["speech-2.8-hd","speech-2.8-turbo","speech-2.6-hd","speech-2.6-turbo"]}},"edge-tts":{models:[],voiceIds:["en-US-EmmaMultilingualNeural","en-US-AndrewMultilingualNeural","en-US-AvaMultilingualNeural","en-US-BrianMultilingualNeural","en-US-JennyNeural","en-US-GuyNeural","en-US-AriaNeural","en-GB-SoniaNeural","en-GB-RyanNeural","zh-CN-XiaoxiaoNeural","zh-CN-YunxiNeural","ja-JP-NanamiNeural","ko-KR-SunHiNeural","fr-FR-DeniseNeural","de-DE-KatjaNeural","es-ES-ElviraNeural","pt-BR-FranciscaNeural","hi-IN-SwaraNeural","ar-SA-ZariyahNeural"],capabilities:{"voice-tts":[]}}};function Bl(t){let e={...Sy},i=PI(t||process.cwd(),".media-gen","models.json");if(TI(i))try{let n=AI(i,"utf-8"),r=JSON.parse(n);for(let[o,s]of Object.entries(r))e[o]=s}catch{}return e}function Oy(){let t=new he("providers").description("List providers and models");return t.command("list").description("List all supported providers with their capabilities and models").option("--json","Output as JSON",!1).option("--capability <cap>","Filter by capability (e.g., image-generate, video-generate, voice-tts, audio-transcribe)").option("--configured","Only show configured providers",!1).action(e=>{let i=Bl(),n=or();e.capability&&(n=gy(e.capability));let r=n.map(o=>({id:o.id,name:o.name,configured:Cs(o.id),capabilities:o.capabilities,models:i[o.id]?.models||[],voiceIds:i[o.id]?.voiceIds||[]})).filter(o=>!e.configured||o.configured);if(e.json)console.log(JSON.stringify({ok:!0,providers:r},null,2));else{console.log(`Supported Providers:
|
|
242
|
+
`);for(let o of r){let s=o.configured?"\u2713":"\u2717";console.log(` ${s} ${o.name} (${o.id})`),console.log(` Capabilities: ${o.capabilities.join(", ")}`),o.models.length>0&&console.log(` Models: ${o.models.join(", ")}`),o.voiceIds.length>0&&console.log(` Voices: ${o.voiceIds.join(", ")}`)}console.log(`
|
|
243
|
+
Total: ${r.length} providers (${r.filter(o=>o.configured).length} configured)`)}}),t.command("models").description("List models for a provider (or all providers if --provider is omitted)").option("--provider <id>","Provider ID (omit to show all)").option("--capability <cap>","Filter models by capability").option("--json","Output as JSON",!1).action(e=>{let i=Bl();if(e.provider){let n=i[e.provider],r;e.capability&&n?.capabilities?r=n.capabilities[e.capability]||[]:r=n?.models||[];let o=n?.voiceIds||[];if(e.json){let s={ok:!0,provider:e.provider,models:r};o.length>0&&(s.voiceIds=o),console.log(JSON.stringify(s,null,2))}else{if(r.length>0){console.log(`Models for ${e.provider}:
|
|
244
|
+
`);for(let s of r)console.log(` - ${s}`)}if(o.length>0){console.log(`Voices for ${e.provider}:
|
|
245
|
+
`);for(let s of o)console.log(` - ${s}`)}r.length===0&&o.length===0&&console.log(" No predefined models or voices. Check provider documentation.")}}else{let n={};for(let r of or()){let o=i[r.id],s;e.capability&&o?.capabilities?s=o.capabilities[e.capability]||[]:s=o?.models||[];let a=o?.voiceIds||[];(s.length>0||a.length>0||!e.capability)&&(n[r.id]={models:s,voiceIds:a,configured:Cs(r.id)})}if(e.json)console.log(JSON.stringify({ok:!0,providers:n},null,2));else{console.log(`All Provider Models:
|
|
246
|
+
`);for(let[r,o]of Object.entries(n)){let s=o.configured?"\u2713":"\u2717";console.log(` ${s} ${r}`);for(let a of o.models)console.log(` ${a}`);if(o.voiceIds.length>0){console.log(" Voices:");for(let a of o.voiceIds)console.log(` ${a}`)}o.models.length===0&&o.voiceIds.length===0&&console.log(" (no predefined models)")}}}}),t}import{existsSync as CI,mkdirSync as kI,writeFileSync as II}from"node:fs";import{resolve as Ty}from"node:path";function Ry(){return`---
|
|
247
|
+
name: media-generation
|
|
248
|
+
description: Generate and edit images, create videos, synthesize speech, transcribe and translate audio using multiple AI providers (OpenAI, Google, ElevenLabs, Deepgram, Fal, Luma, Replicate, Stability, Runway, OpenRouter, Edge TTS). Use when the user asks to create media assets, generate pictures, make videos, produce voiceovers, transcribe recordings, or work with any visual/audio content.
|
|
249
|
+
compatibility: Requires Node.js 18+ and at least one provider API key configured in .env (Edge TTS is free, no key needed)
|
|
250
|
+
metadata:
|
|
251
|
+
author: Francis Hor <francishoe@gmail.com>
|
|
252
|
+
version: "1.0"
|
|
253
|
+
allowed-tools: Bash(node:*)
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
# Media Generation
|
|
257
|
+
|
|
258
|
+
Run the CLI with Node.js. Always use \`--json\` for parseable output.
|
|
259
|
+
|
|
260
|
+
\`\`\`bash
|
|
261
|
+
node ./skills/media-generation/scripts/media-gen.mjs <command> [options] --json
|
|
262
|
+
\`\`\`
|
|
263
|
+
|
|
264
|
+
## Commands
|
|
265
|
+
|
|
266
|
+
| Command | Purpose |
|
|
267
|
+
|---------|---------|
|
|
268
|
+
| \`image generate\` | Generate images from text prompts |
|
|
269
|
+
| \`image edit\` | Edit existing images with a prompt |
|
|
270
|
+
| \`video generate\` | Generate video from text (async) |
|
|
271
|
+
| \`video image-to-video\` | Animate an image into video |
|
|
272
|
+
| \`video extend\` | Extend an existing video |
|
|
273
|
+
| \`voice tts\` | Text to speech synthesis |
|
|
274
|
+
| \`voice clone\` | Clone a voice from audio samples |
|
|
275
|
+
| \`voice isolate\` | Isolate voice from background audio |
|
|
276
|
+
| \`audio transcribe\` | Transcribe audio to text |
|
|
277
|
+
| \`audio translate\` | Translate audio to another language |
|
|
278
|
+
| \`providers list\` | List all providers with capabilities, models, and voices |
|
|
279
|
+
| \`providers models\` | List all models across all providers |
|
|
280
|
+
| \`providers models --provider <id>\` | List models/voices for a specific provider |
|
|
281
|
+
| \`config init\` | Initialize project-level config |
|
|
282
|
+
| \`config init --global\` | Initialize user-level config at ~/.media-gen/ |
|
|
283
|
+
| \`config validate\` | Check which providers are configured |
|
|
284
|
+
| \`job status\` | Check async job status |
|
|
285
|
+
| \`job download\` | Download completed async job result |
|
|
286
|
+
|
|
287
|
+
## Configuration
|
|
288
|
+
|
|
289
|
+
Defaults are set via \`.env\` (project root or ~/.media-gen/.env for global):
|
|
290
|
+
|
|
291
|
+
\`\`\`
|
|
292
|
+
MEDIA_GEN_DEFAULT_PROVIDER=openrouter
|
|
293
|
+
MEDIA_GEN_DEFAULT_MODEL=openai/gpt-image-2
|
|
294
|
+
MEDIA_GEN_VOICE_PROVIDER=edge-tts
|
|
295
|
+
MEDIA_GEN_VOICE_ID=en-US-EmmaMultilingualNeural
|
|
296
|
+
MEDIA_GEN_VIDEO_PROVIDER=google
|
|
297
|
+
MEDIA_GEN_VIDEO_MODEL=veo-3.1-generate-preview
|
|
298
|
+
MEDIA_GEN_AUDIO_PROVIDER=deepgram
|
|
299
|
+
MEDIA_GEN_AUDIO_MODEL=nova-3
|
|
300
|
+
\`\`\`
|
|
301
|
+
|
|
302
|
+
## Examples
|
|
303
|
+
|
|
304
|
+
### Image generation
|
|
305
|
+
|
|
306
|
+
\`\`\`bash
|
|
307
|
+
node ./skills/media-generation/scripts/media-gen.mjs image generate \\
|
|
308
|
+
--prompt "A pixel art fantasy arena" \\
|
|
309
|
+
--output ./outputs/arena.png \\
|
|
310
|
+
--json
|
|
311
|
+
\`\`\`
|
|
312
|
+
|
|
313
|
+
### Text to speech (Edge TTS - free)
|
|
314
|
+
|
|
315
|
+
\`\`\`bash
|
|
316
|
+
node ./skills/media-generation/scripts/media-gen.mjs voice tts \\
|
|
317
|
+
--provider edge-tts \\
|
|
318
|
+
--voice-id en-US-EmmaMultilingualNeural \\
|
|
319
|
+
--text "Hello world" \\
|
|
320
|
+
--output ./outputs/voice.mp3 \\
|
|
321
|
+
--json
|
|
322
|
+
\`\`\`
|
|
323
|
+
|
|
324
|
+
### Text to speech (with defaults, minimal)
|
|
325
|
+
|
|
326
|
+
\`\`\`bash
|
|
327
|
+
node ./skills/media-generation/scripts/media-gen.mjs voice tts \\
|
|
328
|
+
--text "Just provide text" \\
|
|
329
|
+
--output ./outputs/speech.mp3 \\
|
|
330
|
+
--json
|
|
331
|
+
\`\`\`
|
|
332
|
+
|
|
333
|
+
### List providers and voices
|
|
334
|
+
|
|
335
|
+
\`\`\`bash
|
|
336
|
+
node ./skills/media-generation/scripts/media-gen.mjs providers list --json
|
|
337
|
+
node ./skills/media-generation/scripts/media-gen.mjs providers models --provider edge-tts --json
|
|
338
|
+
node ./skills/media-generation/scripts/media-gen.mjs providers models --provider elevenlabs --json
|
|
339
|
+
\`\`\`
|
|
340
|
+
|
|
341
|
+
### Transcription
|
|
342
|
+
|
|
343
|
+
\`\`\`bash
|
|
344
|
+
node ./skills/media-generation/scripts/media-gen.mjs audio transcribe \\
|
|
345
|
+
--input ./audio/recording.mp3 \\
|
|
346
|
+
--output ./outputs/transcript.json \\
|
|
347
|
+
--json
|
|
348
|
+
\`\`\`
|
|
349
|
+
|
|
350
|
+
## Rules
|
|
351
|
+
|
|
352
|
+
- Use \`--json\` for all calls.
|
|
353
|
+
- Use \`--dry-run\` before expensive operations when unsure.
|
|
354
|
+
- Never use \`--overwrite\` unless the user confirms.
|
|
355
|
+
- Keep outputs inside the project workspace.
|
|
356
|
+
- For video, use \`--wait\` only when the user wants the file immediately.
|
|
357
|
+
- Check the \`ok\` field in every response before proceeding.
|
|
358
|
+
- On error, show the \`suggestion\` field to the user.
|
|
359
|
+
- Edge TTS is free and requires no API key.
|
|
360
|
+
`}function Ay(){let t=new he("skill").description("Generate agent skill files");return t.command("generate").description("Generate a SKILL.md file for AI agent discovery").option("--output <path>","Output path",".media-gen/SKILL.md").option("--json","Output as JSON",!1).action(e=>{try{let i=Ty(process.cwd(),e.output),n=Ty(i,"..");CI(n)||kI(n,{recursive:!0});let r=Ry();II(i,r,"utf-8"),j({ok:!0,type:"skill-generate",provider:"",outputFile:i,message:`Skill file generated at ${i}`},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t}function Py(){let t=new he("job").description("Manage async generation jobs");return t.command("status").description("Check the status of an async job").requiredOption("--provider <provider>","Provider ID").requiredOption("--job-id <id>","Job ID").option("--json","Output as JSON",!1).action(async e=>{try{let i=Re(e.provider);if(!i.getJobStatus)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support job status checks`,{provider:e.provider});let n=await i.getJobStatus(e.jobId);e.json?console.log(JSON.stringify({ok:!0,...n},null,2)):(console.log(`Job: ${n.jobId}`),console.log(`Provider: ${n.provider}`),console.log(`Status: ${n.status}`),n.progress!==void 0&&console.log(`Progress: ${n.progress}%`),n.error&&console.log(`Error: ${n.error}`))}catch(i){j(se(i),e.json),process.exitCode=1}}),t.command("download").description("Download the result of a completed job").requiredOption("--provider <provider>","Provider ID").requiredOption("--job-id <id>","Job ID").option("--output <path>","Output file path").option("--output-dir <dir>","Output directory").option("--overwrite","Overwrite existing",!1).option("--json","Output as JSON",!1).action(async e=>{try{let i=Re(e.provider);if(!i.downloadJob)throw new b("CAPABILITY_NOT_SUPPORTED",`Provider "${e.provider}" does not support job downloads`,{provider:e.provider});let n=Be(e.output?e.output.split(/[/\\]/).pop():`job-${e.jobId}.mp4`,{output:e.output,outputDir:e.outputDir});dt(n);let r=await i.downloadJob(e.jobId,n);j({ok:!0,type:"job-download",provider:e.provider,jobId:e.jobId,outputFile:r.outputFile,durationMs:r.durationMs},e.json)}catch(i){j(se(i),e.json),process.exitCode=1}}),t}function Cy(){let t=new he;return cu(),Dr(!1),t.name("media-gen").description("Multi-provider media generation CLI for images, video, voice, and audio").version("1.5.0").option("--debug","Enable debug logging",!1).hook("preAction",e=>{e.opts().debug&&Dr(!0)}),t.addCommand(xy()),t.addCommand(yy()),t.addCommand(by()),t.addCommand(wy()),t.addCommand(Ey()),t.addCommand(Oy()),t.addCommand(Ay()),t.addCommand(Py()),t}var DI=Cy();DI.parseAsync(process.argv).catch(t=>{console.error("Fatal error:",t?.message||t),process.exit(1)});
|